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

288 lines
13 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 157
; Schema: 0
OpCapability Shader
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 "vec2_f32"
OpMemberName %Inner 4 "vec2_i32"
OpMemberName %Inner 5 "vec2_u32"
OpMemberName %Inner 6 "vec3_f32"
OpMemberName %Inner 7 "vec3_i32"
OpMemberName %Inner 8 "vec3_u32"
OpMemberName %Inner 9 "vec4_f32"
OpMemberName %Inner 10 "vec4_i32"
OpMemberName %Inner 11 "vec4_u32"
OpMemberName %Inner 12 "mat2x2_f32"
OpMemberName %Inner 13 "mat2x3_f32"
OpMemberName %Inner 14 "mat2x4_f32"
OpMemberName %Inner 15 "mat3x2_f32"
OpMemberName %Inner 16 "mat3x3_f32"
OpMemberName %Inner 17 "mat3x4_f32"
OpMemberName %Inner 18 "mat4x2_f32"
OpMemberName %Inner 19 "mat4x3_f32"
OpMemberName %Inner 20 "mat4x4_f32"
OpMemberName %Inner 21 "arr2_vec3_f32"
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 16
OpMemberDecorate %Inner 4 Offset 24
OpMemberDecorate %Inner 5 Offset 32
OpMemberDecorate %Inner 6 Offset 48
OpMemberDecorate %Inner 7 Offset 64
OpMemberDecorate %Inner 8 Offset 80
OpMemberDecorate %Inner 9 Offset 96
OpMemberDecorate %Inner 10 Offset 112
OpMemberDecorate %Inner 11 Offset 128
OpMemberDecorate %Inner 12 Offset 144
OpMemberDecorate %Inner 12 ColMajor
OpMemberDecorate %Inner 12 MatrixStride 8
OpMemberDecorate %Inner 13 Offset 160
OpMemberDecorate %Inner 13 ColMajor
OpMemberDecorate %Inner 13 MatrixStride 16
OpMemberDecorate %Inner 14 Offset 192
OpMemberDecorate %Inner 14 ColMajor
OpMemberDecorate %Inner 14 MatrixStride 16
OpMemberDecorate %Inner 15 Offset 224
OpMemberDecorate %Inner 15 ColMajor
OpMemberDecorate %Inner 15 MatrixStride 8
OpMemberDecorate %Inner 16 Offset 256
OpMemberDecorate %Inner 16 ColMajor
OpMemberDecorate %Inner 16 MatrixStride 16
OpMemberDecorate %Inner 17 Offset 304
OpMemberDecorate %Inner 17 ColMajor
OpMemberDecorate %Inner 17 MatrixStride 16
OpMemberDecorate %Inner 18 Offset 352
OpMemberDecorate %Inner 18 ColMajor
OpMemberDecorate %Inner 18 MatrixStride 8
OpMemberDecorate %Inner 19 Offset 384
OpMemberDecorate %Inner 19 ColMajor
OpMemberDecorate %Inner 19 MatrixStride 16
OpMemberDecorate %Inner 20 Offset 448
OpMemberDecorate %Inner 20 ColMajor
OpMemberDecorate %Inner 20 MatrixStride 16
OpMemberDecorate %Inner 21 Offset 512
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpDecorate %_runtimearr_Inner ArrayStride 544
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
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 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
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%Inner = OpTypeStruct %float %int %uint %v2float %v2int %v2uint %v3float %v3int %v3uint %v4float %v4int %v4uint %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %_arr_v3float_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
%31 = OpTypeFunction %void %_arr_uint_uint_1 %_arr_v3float_uint_2
%39 = OpConstantNull %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%bool = OpTypeBool
%_ptr_Function__arr_v3float_uint_2 = OpTypePointer Function %_arr_v3float_uint_2
%54 = OpConstantNull %_arr_v3float_uint_2
%uint_0 = OpConstant %uint 0
%56 = OpConstantNull %int
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%_ptr_Function_v3float = OpTypePointer Function %v3float
%68 = OpTypeFunction %void %uint
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%74 = OpConstantNull %float
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%82 = OpConstantNull %v2float
%uint_4 = OpConstant %uint 4
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%86 = OpConstantNull %v2int
%uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%90 = OpConstantNull %v2uint
%uint_6 = OpConstant %uint 6
%93 = OpConstantNull %v3float
%uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%97 = OpConstantNull %v3int
%uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%101 = OpConstantNull %v3uint
%uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%105 = OpConstantNull %v4float
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%109 = OpConstantNull %v4int
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%113 = OpConstantNull %v4uint
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%117 = OpConstantNull %mat2v2float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%121 = OpConstantNull %mat2v3float
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%125 = OpConstantNull %mat2v4float
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%129 = OpConstantNull %mat3v2float
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%133 = OpConstantNull %mat3v3float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%137 = OpConstantNull %mat3v4float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%141 = OpConstantNull %mat4v2float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%145 = OpConstantNull %mat4v3float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%149 = OpConstantNull %mat4v4float
%152 = OpTypeFunction %void
%assign_and_preserve_padding_sb_arr_X_arr2_vec3_f32 = OpFunction %void None %31
%dest = OpFunctionParameter %_arr_uint_uint_1
%value = OpFunctionParameter %_arr_v3float_uint_2
%38 = OpLabel
%i = OpVariable %_ptr_Function_uint Function %39
%var_for_index = OpVariable %_ptr_Function__arr_v3float_uint_2 Function %54
OpStore %i %39
OpBranch %42
%42 = OpLabel
OpLoopMerge %43 %44 None
OpBranch %45
%45 = OpLabel
%47 = OpLoad %uint %i
%48 = OpULessThan %bool %47 %uint_2
%46 = OpLogicalNot %bool %48
OpSelectionMerge %50 None
OpBranchConditional %46 %51 %50
%51 = OpLabel
OpBranch %43
%50 = OpLabel
OpStore %var_for_index %value
%57 = OpCompositeExtract %uint %dest 0
%59 = OpLoad %uint %i
%61 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %57 %uint_21 %59
%62 = OpLoad %uint %i
%64 = OpAccessChain %_ptr_Function_v3float %var_for_index %62
%65 = OpLoad %v3float %64
OpStore %61 %65
OpBranch %44
%44 = OpLabel
%66 = OpLoad %uint %i
%67 = OpIAdd %uint %66 %uint_1
OpStore %i %67
OpBranch %42
%43 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %void None %68
%idx = OpFunctionParameter %uint
%71 = OpLabel
%73 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %idx %uint_0
OpStore %73 %74
%76 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %idx %uint_1
OpStore %76 %56
%78 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %idx %uint_2
OpStore %78 %39
%81 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %idx %uint_3
OpStore %81 %82
%85 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %idx %uint_4
OpStore %85 %86
%89 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %idx %uint_5
OpStore %89 %90
%92 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %idx %uint_6
OpStore %92 %93
%96 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %idx %uint_7
OpStore %96 %97
%100 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %idx %uint_8
OpStore %100 %101
%104 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %idx %uint_9
OpStore %104 %105
%108 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %idx %uint_10
OpStore %108 %109
%112 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %idx %uint_11
OpStore %112 %113
%116 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %idx %uint_12
OpStore %116 %117
%120 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %idx %uint_13
OpStore %120 %121
%124 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %idx %uint_14
OpStore %124 %125
%128 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %idx %uint_15
OpStore %128 %129
%132 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %idx %uint_16
OpStore %132 %133
%136 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %idx %uint_17
OpStore %136 %137
%140 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %idx %uint_18
OpStore %140 %141
%144 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %idx %uint_19
OpStore %144 %145
%148 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %idx %uint_20
OpStore %148 %149
%151 = OpCompositeConstruct %_arr_uint_uint_1 %idx
%150 = OpFunctionCall %void %assign_and_preserve_padding_sb_arr_X_arr2_vec3_f32 %151 %54
OpReturn
OpFunctionEnd
%main = OpFunction %void None %152
%154 = OpLabel
%156 = OpLoad %uint %idx_1
%155 = OpFunctionCall %void %main_inner %156
OpReturn
OpFunctionEnd