dawn-cmake/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.spvasm

425 lines
20 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 227
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %idx_1
OpExecutionMode %main LocalSize 1 1 1
OpName %idx_1 "idx_1"
OpName %S "S"
OpMemberName %S 0 "arr"
OpName %Inner "Inner"
OpMemberName %Inner 0 "scalar_f32"
OpMemberName %Inner 1 "scalar_i32"
OpMemberName %Inner 2 "scalar_u32"
OpMemberName %Inner 3 "scalar_f16"
OpMemberName %Inner 4 "vec2_f32"
OpMemberName %Inner 5 "vec2_i32"
OpMemberName %Inner 6 "vec2_u32"
OpMemberName %Inner 7 "vec2_f16"
OpMemberName %Inner 8 "vec3_f32"
OpMemberName %Inner 9 "vec3_i32"
OpMemberName %Inner 10 "vec3_u32"
OpMemberName %Inner 11 "vec3_f16"
OpMemberName %Inner 12 "vec4_f32"
OpMemberName %Inner 13 "vec4_i32"
OpMemberName %Inner 14 "vec4_u32"
OpMemberName %Inner 15 "vec4_f16"
OpMemberName %Inner 16 "mat2x2_f32"
OpMemberName %Inner 17 "mat2x3_f32"
OpMemberName %Inner 18 "mat2x4_f32"
OpMemberName %Inner 19 "mat3x2_f32"
OpMemberName %Inner 20 "mat3x3_f32"
OpMemberName %Inner 21 "mat3x4_f32"
OpMemberName %Inner 22 "mat4x2_f32"
OpMemberName %Inner 23 "mat4x3_f32"
OpMemberName %Inner 24 "mat4x4_f32"
OpMemberName %Inner 25 "mat2x2_f16"
OpMemberName %Inner 26 "mat2x3_f16"
OpMemberName %Inner 27 "mat2x4_f16"
OpMemberName %Inner 28 "mat3x2_f16"
OpMemberName %Inner 29 "mat3x3_f16"
OpMemberName %Inner 30 "mat3x4_f16"
OpMemberName %Inner 31 "mat4x2_f16"
OpMemberName %Inner 32 "mat4x3_f16"
OpMemberName %Inner 33 "mat4x4_f16"
OpMemberName %Inner 34 "arr2_vec3_f32"
OpMemberName %Inner 35 "arr2_mat4x2_f16"
OpName %sb "sb"
OpName %assign_and_preserve_padding_sb_arr_X_arr2_vec3_f32 "assign_and_preserve_padding_sb_arr_X_arr2_vec3_f32"
OpName %dest "dest"
OpName %value "value"
OpName %i "i"
OpName %var_for_index "var_for_index"
OpName %main_inner "main_inner"
OpName %idx "idx"
OpName %main "main"
OpDecorate %idx_1 BuiltIn LocalInvocationIndex
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %Inner 3 Offset 12
OpMemberDecorate %Inner 4 Offset 16
OpMemberDecorate %Inner 5 Offset 24
OpMemberDecorate %Inner 6 Offset 32
OpMemberDecorate %Inner 7 Offset 40
OpMemberDecorate %Inner 8 Offset 48
OpMemberDecorate %Inner 9 Offset 64
OpMemberDecorate %Inner 10 Offset 80
OpMemberDecorate %Inner 11 Offset 96
OpMemberDecorate %Inner 12 Offset 112
OpMemberDecorate %Inner 13 Offset 128
OpMemberDecorate %Inner 14 Offset 144
OpMemberDecorate %Inner 15 Offset 160
OpMemberDecorate %Inner 16 Offset 168
OpMemberDecorate %Inner 16 ColMajor
OpMemberDecorate %Inner 16 MatrixStride 8
OpMemberDecorate %Inner 17 Offset 192
OpMemberDecorate %Inner 17 ColMajor
OpMemberDecorate %Inner 17 MatrixStride 16
OpMemberDecorate %Inner 18 Offset 224
OpMemberDecorate %Inner 18 ColMajor
OpMemberDecorate %Inner 18 MatrixStride 16
OpMemberDecorate %Inner 19 Offset 256
OpMemberDecorate %Inner 19 ColMajor
OpMemberDecorate %Inner 19 MatrixStride 8
OpMemberDecorate %Inner 20 Offset 288
OpMemberDecorate %Inner 20 ColMajor
OpMemberDecorate %Inner 20 MatrixStride 16
OpMemberDecorate %Inner 21 Offset 336
OpMemberDecorate %Inner 21 ColMajor
OpMemberDecorate %Inner 21 MatrixStride 16
OpMemberDecorate %Inner 22 Offset 384
OpMemberDecorate %Inner 22 ColMajor
OpMemberDecorate %Inner 22 MatrixStride 8
OpMemberDecorate %Inner 23 Offset 416
OpMemberDecorate %Inner 23 ColMajor
OpMemberDecorate %Inner 23 MatrixStride 16
OpMemberDecorate %Inner 24 Offset 480
OpMemberDecorate %Inner 24 ColMajor
OpMemberDecorate %Inner 24 MatrixStride 16
OpMemberDecorate %Inner 25 Offset 544
OpMemberDecorate %Inner 25 ColMajor
OpMemberDecorate %Inner 25 MatrixStride 4
OpMemberDecorate %Inner 26 Offset 552
OpMemberDecorate %Inner 26 ColMajor
OpMemberDecorate %Inner 26 MatrixStride 8
OpMemberDecorate %Inner 27 Offset 568
OpMemberDecorate %Inner 27 ColMajor
OpMemberDecorate %Inner 27 MatrixStride 8
OpMemberDecorate %Inner 28 Offset 584
OpMemberDecorate %Inner 28 ColMajor
OpMemberDecorate %Inner 28 MatrixStride 4
OpMemberDecorate %Inner 29 Offset 600
OpMemberDecorate %Inner 29 ColMajor
OpMemberDecorate %Inner 29 MatrixStride 8
OpMemberDecorate %Inner 30 Offset 624
OpMemberDecorate %Inner 30 ColMajor
OpMemberDecorate %Inner 30 MatrixStride 8
OpMemberDecorate %Inner 31 Offset 648
OpMemberDecorate %Inner 31 ColMajor
OpMemberDecorate %Inner 31 MatrixStride 4
OpMemberDecorate %Inner 32 Offset 664
OpMemberDecorate %Inner 32 ColMajor
OpMemberDecorate %Inner 32 MatrixStride 8
OpMemberDecorate %Inner 33 Offset 696
OpMemberDecorate %Inner 33 ColMajor
OpMemberDecorate %Inner 33 MatrixStride 8
OpMemberDecorate %Inner 34 Offset 736
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %Inner 35 Offset 768
OpMemberDecorate %Inner 35 ColMajor
OpMemberDecorate %Inner 35 MatrixStride 4
OpDecorate %_arr_mat4v2half_uint_2 ArrayStride 16
OpDecorate %_runtimearr_Inner ArrayStride 800
OpDecorate %sb Binding 0
OpDecorate %sb DescriptorSet 0
OpDecorate %_arr_uint_uint_1 ArrayStride 4
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%idx_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%half = OpTypeFloat 16
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v2half = OpTypeVector %half 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v3half = OpTypeVector %half 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 4
%v4half = OpTypeVector %half 4
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%mat2v2half = OpTypeMatrix %v2half 2
%mat2v3half = OpTypeMatrix %v3half 2
%mat2v4half = OpTypeMatrix %v4half 2
%mat3v2half = OpTypeMatrix %v2half 3
%mat3v3half = OpTypeMatrix %v3half 3
%mat3v4half = OpTypeMatrix %v4half 3
%mat4v2half = OpTypeMatrix %v2half 4
%mat4v3half = OpTypeMatrix %v3half 4
%mat4v4half = OpTypeMatrix %v4half 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%_arr_mat4v2half_uint_2 = OpTypeArray %mat4v2half %uint_2
%Inner = OpTypeStruct %float %int %uint %half %v2float %v2int %v2uint %v2half %v3float %v3int %v3uint %v3half %v4float %v4int %v4uint %v4half %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %mat2v2half %mat2v3half %mat2v4half %mat3v2half %mat3v3half %mat3v4half %mat4v2half %mat4v3half %mat4v4half %_arr_v3float_uint_2 %_arr_mat4v2half_uint_2
%_runtimearr_Inner = OpTypeRuntimeArray %Inner
%S = OpTypeStruct %_runtimearr_Inner
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%sb = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%uint_1 = OpConstant %uint 1
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
%45 = OpTypeFunction %void %_arr_uint_uint_1 %_arr_v3float_uint_2
%53 = OpConstantNull %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%bool = OpTypeBool
%_ptr_Function__arr_v3float_uint_2 = OpTypePointer Function %_arr_v3float_uint_2
%68 = OpConstantNull %_arr_v3float_uint_2
%uint_0 = OpConstant %uint 0
%70 = OpConstantNull %int
%uint_34 = OpConstant %uint 34
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%_ptr_Function_v3float = OpTypePointer Function %v3float
%82 = OpTypeFunction %void %uint
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%88 = OpConstantNull %float
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%96 = OpConstantNull %half
%uint_4 = OpConstant %uint 4
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%100 = OpConstantNull %v2float
%uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%104 = OpConstantNull %v2int
%uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%108 = OpConstantNull %v2uint
%uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_v2half = OpTypePointer StorageBuffer %v2half
%112 = OpConstantNull %v2half
%uint_8 = OpConstant %uint 8
%115 = OpConstantNull %v3float
%uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%119 = OpConstantNull %v3int
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%123 = OpConstantNull %v3uint
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
%127 = OpConstantNull %v3half
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%131 = OpConstantNull %v4float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%135 = OpConstantNull %v4int
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%139 = OpConstantNull %v4uint
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_v4half = OpTypePointer StorageBuffer %v4half
%143 = OpConstantNull %v4half
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%147 = OpConstantNull %mat2v2float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%151 = OpConstantNull %mat2v3float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%155 = OpConstantNull %mat2v4float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%159 = OpConstantNull %mat3v2float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%163 = OpConstantNull %mat3v3float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%167 = OpConstantNull %mat3v4float
%uint_22 = OpConstant %uint 22
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%171 = OpConstantNull %mat4v2float
%uint_23 = OpConstant %uint 23
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%175 = OpConstantNull %mat4v3float
%uint_24 = OpConstant %uint 24
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%179 = OpConstantNull %mat4v4float
%uint_25 = OpConstant %uint 25
%_ptr_StorageBuffer_mat2v2half = OpTypePointer StorageBuffer %mat2v2half
%183 = OpConstantNull %mat2v2half
%uint_26 = OpConstant %uint 26
%_ptr_StorageBuffer_mat2v3half = OpTypePointer StorageBuffer %mat2v3half
%187 = OpConstantNull %mat2v3half
%uint_27 = OpConstant %uint 27
%_ptr_StorageBuffer_mat2v4half = OpTypePointer StorageBuffer %mat2v4half
%191 = OpConstantNull %mat2v4half
%uint_28 = OpConstant %uint 28
%_ptr_StorageBuffer_mat3v2half = OpTypePointer StorageBuffer %mat3v2half
%195 = OpConstantNull %mat3v2half
%uint_29 = OpConstant %uint 29
%_ptr_StorageBuffer_mat3v3half = OpTypePointer StorageBuffer %mat3v3half
%199 = OpConstantNull %mat3v3half
%uint_30 = OpConstant %uint 30
%_ptr_StorageBuffer_mat3v4half = OpTypePointer StorageBuffer %mat3v4half
%203 = OpConstantNull %mat3v4half
%uint_31 = OpConstant %uint 31
%_ptr_StorageBuffer_mat4v2half = OpTypePointer StorageBuffer %mat4v2half
%207 = OpConstantNull %mat4v2half
%uint_32 = OpConstant %uint 32
%_ptr_StorageBuffer_mat4v3half = OpTypePointer StorageBuffer %mat4v3half
%211 = OpConstantNull %mat4v3half
%uint_33 = OpConstant %uint 33
%_ptr_StorageBuffer_mat4v4half = OpTypePointer StorageBuffer %mat4v4half
%215 = OpConstantNull %mat4v4half
%uint_35 = OpConstant %uint 35
%_ptr_StorageBuffer__arr_mat4v2half_uint_2 = OpTypePointer StorageBuffer %_arr_mat4v2half_uint_2
%221 = OpConstantNull %_arr_mat4v2half_uint_2
%222 = OpTypeFunction %void
%assign_and_preserve_padding_sb_arr_X_arr2_vec3_f32 = OpFunction %void None %45
%dest = OpFunctionParameter %_arr_uint_uint_1
%value = OpFunctionParameter %_arr_v3float_uint_2
%52 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %53
%var_for_index = OpVariable %_ptr_Function__arr_v3float_uint_2 Function %68
OpStore %i %53
OpBranch %56
%56 = OpLabel
OpLoopMerge %57 %58 None
OpBranch %59
%59 = OpLabel
%61 = OpLoad %uint %i
%62 = OpULessThan %bool %61 %uint_2
%60 = OpLogicalNot %bool %62
OpSelectionMerge %64 None
OpBranchConditional %60 %65 %64
%65 = OpLabel
OpBranch %57
%64 = OpLabel
OpStore %var_for_index %value
%71 = OpCompositeExtract %uint %dest 0
%73 = OpLoad %uint %i
%75 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %71 %uint_34 %73
%76 = OpLoad %uint %i
%78 = OpAccessChain %_ptr_Function_v3float %var_for_index %76
%79 = OpLoad %v3float %78
OpStore %75 %79
OpBranch %58
%58 = OpLabel
%80 = OpLoad %uint %i
%81 = OpIAdd %uint %80 %uint_1
OpStore %i %81
OpBranch %56
%57 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %void None %82
%idx = OpFunctionParameter %uint
%85 = OpLabel
%87 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %idx %uint_0
OpStore %87 %88
%90 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %idx %uint_1
OpStore %90 %70
%92 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %idx %uint_2
OpStore %92 %53
%95 = OpAccessChain %_ptr_StorageBuffer_half %sb %uint_0 %idx %uint_3
OpStore %95 %96
%99 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %idx %uint_4
OpStore %99 %100
%103 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %idx %uint_5
OpStore %103 %104
%107 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %idx %uint_6
OpStore %107 %108
%111 = OpAccessChain %_ptr_StorageBuffer_v2half %sb %uint_0 %idx %uint_7
OpStore %111 %112
%114 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %idx %uint_8
OpStore %114 %115
%118 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %idx %uint_9
OpStore %118 %119
%122 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %idx %uint_10
OpStore %122 %123
%126 = OpAccessChain %_ptr_StorageBuffer_v3half %sb %uint_0 %idx %uint_11
OpStore %126 %127
%130 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %idx %uint_12
OpStore %130 %131
%134 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %idx %uint_13
OpStore %134 %135
%138 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %idx %uint_14
OpStore %138 %139
%142 = OpAccessChain %_ptr_StorageBuffer_v4half %sb %uint_0 %idx %uint_15
OpStore %142 %143
%146 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %idx %uint_16
OpStore %146 %147
%150 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %idx %uint_17
OpStore %150 %151
%154 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %idx %uint_18
OpStore %154 %155
%158 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %idx %uint_19
OpStore %158 %159
%162 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %idx %uint_20
OpStore %162 %163
%166 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %idx %uint_21
OpStore %166 %167
%170 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %idx %uint_22
OpStore %170 %171
%174 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %idx %uint_23
OpStore %174 %175
%178 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %idx %uint_24
OpStore %178 %179
%182 = OpAccessChain %_ptr_StorageBuffer_mat2v2half %sb %uint_0 %idx %uint_25
OpStore %182 %183
%186 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %sb %uint_0 %idx %uint_26
OpStore %186 %187
%190 = OpAccessChain %_ptr_StorageBuffer_mat2v4half %sb %uint_0 %idx %uint_27
OpStore %190 %191
%194 = OpAccessChain %_ptr_StorageBuffer_mat3v2half %sb %uint_0 %idx %uint_28
OpStore %194 %195
%198 = OpAccessChain %_ptr_StorageBuffer_mat3v3half %sb %uint_0 %idx %uint_29
OpStore %198 %199
%202 = OpAccessChain %_ptr_StorageBuffer_mat3v4half %sb %uint_0 %idx %uint_30
OpStore %202 %203
%206 = OpAccessChain %_ptr_StorageBuffer_mat4v2half %sb %uint_0 %idx %uint_31
OpStore %206 %207
%210 = OpAccessChain %_ptr_StorageBuffer_mat4v3half %sb %uint_0 %idx %uint_32
OpStore %210 %211
%214 = OpAccessChain %_ptr_StorageBuffer_mat4v4half %sb %uint_0 %idx %uint_33
OpStore %214 %215
%217 = OpCompositeConstruct %_arr_uint_uint_1 %idx
%216 = OpFunctionCall %void %assign_and_preserve_padding_sb_arr_X_arr2_vec3_f32 %217 %68
%220 = OpAccessChain %_ptr_StorageBuffer__arr_mat4v2half_uint_2 %sb %uint_0 %idx %uint_35
OpStore %220 %221
OpReturn
OpFunctionEnd
%main = OpFunction %void None %222
%224 = OpLabel
%226 = OpLoad %uint %idx_1
%225 = OpFunctionCall %void %main_inner %226
OpReturn
OpFunctionEnd