blob: d319985e392ade43a3cbd14b964a986553f81ccf [file] [log] [blame]
Ben Clayton009d1292022-02-04 15:39:34 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
James Price87537962022-12-06 18:32:19 +00004; Bound: 151
Ben Clayton009d1292022-02-04 15:39:34 +00005; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint GLCompute %f "f"
9 OpExecutionMode %f LocalSize 1 1 1
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000010 OpName %s_block "s_block"
11 OpMemberName %s_block 0 "inner"
Ben Clayton009d1292022-02-04 15:39:34 +000012 OpName %S "S"
13 OpMemberName %S 0 "a"
14 OpName %strided_arr_1 "strided_arr_1"
15 OpMemberName %strided_arr_1 0 "el"
16 OpName %strided_arr "strided_arr"
17 OpMemberName %strided_arr 0 "el"
18 OpName %s "s"
James Price87537962022-12-06 18:32:19 +000019 OpName %assign_and_preserve_padding_4_s_a_X_el_X_X "assign_and_preserve_padding_4_s_a_X_el_X_X"
20 OpName %dest "dest"
21 OpName %value "value"
22 OpName %assign_and_preserve_padding_3_s_a_X_el_X "assign_and_preserve_padding_3_s_a_X_el_X"
23 OpName %dest_0 "dest"
24 OpName %value_0 "value"
25 OpName %i "i"
26 OpName %var_for_index "var_for_index"
27 OpName %assign_and_preserve_padding_2_s_a_X_el "assign_and_preserve_padding_2_s_a_X_el"
28 OpName %dest_1 "dest"
29 OpName %value_1 "value"
30 OpName %i_0 "i"
31 OpName %var_for_index_1 "var_for_index_1"
32 OpName %assign_and_preserve_padding_1_s_a_X "assign_and_preserve_padding_1_s_a_X"
33 OpName %dest_2 "dest"
34 OpName %value_2 "value"
35 OpName %assign_and_preserve_padding_s_a "assign_and_preserve_padding_s_a"
36 OpName %value_3 "value"
37 OpName %i_1 "i"
38 OpName %var_for_index_2 "var_for_index_2"
Ben Clayton009d1292022-02-04 15:39:34 +000039 OpName %f_1 "f_1"
40 OpName %f "f"
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000041 OpDecorate %s_block Block
42 OpMemberDecorate %s_block 0 Offset 0
Ben Clayton009d1292022-02-04 15:39:34 +000043 OpMemberDecorate %S 0 Offset 0
44 OpMemberDecorate %strided_arr_1 0 Offset 0
45 OpMemberDecorate %strided_arr 0 Offset 0
46 OpDecorate %_arr_strided_arr_uint_2 ArrayStride 8
47 OpDecorate %_arr__arr_strided_arr_uint_2_uint_3 ArrayStride 16
48 OpDecorate %_arr_strided_arr_1_uint_4 ArrayStride 128
49 OpDecorate %s DescriptorSet 0
50 OpDecorate %s Binding 0
James Price87537962022-12-06 18:32:19 +000051 OpDecorate %_arr_uint_uint_3 ArrayStride 4
52 OpDecorate %_arr_uint_uint_2 ArrayStride 4
53 OpDecorate %_arr_uint_uint_1 ArrayStride 4
Ben Clayton009d1292022-02-04 15:39:34 +000054 %float = OpTypeFloat 32
55%strided_arr = OpTypeStruct %float
56 %uint = OpTypeInt 32 0
57 %uint_2 = OpConstant %uint 2
58%_arr_strided_arr_uint_2 = OpTypeArray %strided_arr %uint_2
59 %uint_3 = OpConstant %uint 3
60%_arr__arr_strided_arr_uint_2_uint_3 = OpTypeArray %_arr_strided_arr_uint_2 %uint_3
61%strided_arr_1 = OpTypeStruct %_arr__arr_strided_arr_uint_2_uint_3
62 %uint_4 = OpConstant %uint 4
63%_arr_strided_arr_1_uint_4 = OpTypeArray %strided_arr_1 %uint_4
64 %S = OpTypeStruct %_arr_strided_arr_1_uint_4
Zhaoming Jiang6ab5d3c2022-11-02 02:25:38 +000065 %s_block = OpTypeStruct %S
66%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
67 %s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
Ben Clayton009d1292022-02-04 15:39:34 +000068 %void = OpTypeVoid
James Price87537962022-12-06 18:32:19 +000069%_arr_uint_uint_3 = OpTypeArray %uint %uint_3
70 %15 = OpTypeFunction %void %_arr_uint_uint_3 %strided_arr
Ben Clayton009d1292022-02-04 15:39:34 +000071 %uint_0 = OpConstant %uint 0
Ben Clayton009d1292022-02-04 15:39:34 +000072 %int = OpTypeInt 32 1
James Price87537962022-12-06 18:32:19 +000073 %24 = OpConstantNull %int
Ben Claytonaf25bec2024-01-15 13:35:27 +000074 %int_1 = OpConstant %int 1
75 %int_2 = OpConstant %int 2
James Price87537962022-12-06 18:32:19 +000076%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
77%_arr_uint_uint_2 = OpTypeArray %uint %uint_2
Ben Claytonaf25bec2024-01-15 13:35:27 +000078 %33 = OpTypeFunction %void %_arr_uint_uint_2 %_arr_strided_arr_uint_2
79 %39 = OpConstantNull %uint
James Price87537962022-12-06 18:32:19 +000080%_ptr_Function_uint = OpTypePointer Function %uint
81 %bool = OpTypeBool
82%_ptr_Function__arr_strided_arr_uint_2 = OpTypePointer Function %_arr_strided_arr_uint_2
Ben Claytonaf25bec2024-01-15 13:35:27 +000083 %54 = OpConstantNull %_arr_strided_arr_uint_2
James Price87537962022-12-06 18:32:19 +000084 %uint_1 = OpConstant %uint 1
85%_ptr_Function_strided_arr = OpTypePointer Function %strided_arr
86%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
Ben Claytonaf25bec2024-01-15 13:35:27 +000087 %67 = OpTypeFunction %void %_arr_uint_uint_1 %_arr__arr_strided_arr_uint_2_uint_3
James Price87537962022-12-06 18:32:19 +000088%_ptr_Function__arr__arr_strided_arr_uint_2_uint_3 = OpTypePointer Function %_arr__arr_strided_arr_uint_2_uint_3
Ben Claytonaf25bec2024-01-15 13:35:27 +000089 %85 = OpConstantNull %_arr__arr_strided_arr_uint_2_uint_3
90 %95 = OpTypeFunction %void %_arr_uint_uint_1 %strided_arr_1
91 %104 = OpTypeFunction %void %_arr_strided_arr_1_uint_4
James Price87537962022-12-06 18:32:19 +000092%_ptr_Function__arr_strided_arr_1_uint_4 = OpTypePointer Function %_arr_strided_arr_1_uint_4
Ben Claytonaf25bec2024-01-15 13:35:27 +000093 %120 = OpConstantNull %_arr_strided_arr_1_uint_4
James Price87537962022-12-06 18:32:19 +000094%_ptr_Function_strided_arr_1 = OpTypePointer Function %strided_arr_1
Ben Claytonaf25bec2024-01-15 13:35:27 +000095 %130 = OpTypeFunction %void
James Price87537962022-12-06 18:32:19 +000096%_ptr_StorageBuffer__arr_strided_arr_1_uint_4 = OpTypePointer StorageBuffer %_arr_strided_arr_1_uint_4
Ben Clayton009d1292022-02-04 15:39:34 +000097 %int_3 = OpConstant %int 3
98%_ptr_StorageBuffer__arr__arr_strided_arr_uint_2_uint_3 = OpTypePointer StorageBuffer %_arr__arr_strided_arr_uint_2_uint_3
Ben Clayton009d1292022-02-04 15:39:34 +000099%_ptr_StorageBuffer__arr_strided_arr_uint_2 = OpTypePointer StorageBuffer %_arr_strided_arr_uint_2
Ben Clayton009d1292022-02-04 15:39:34 +0000100 %float_5 = OpConstant %float 5
James Price87537962022-12-06 18:32:19 +0000101%assign_and_preserve_padding_4_s_a_X_el_X_X = OpFunction %void None %15
102 %dest = OpFunctionParameter %_arr_uint_uint_3
103 %value = OpFunctionParameter %strided_arr
104 %21 = OpLabel
105 %25 = OpCompositeExtract %uint %dest 0
Ben Claytonaf25bec2024-01-15 13:35:27 +0000106 %27 = OpCompositeExtract %uint %dest 1
107 %29 = OpCompositeExtract %uint %dest 2
108 %31 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %25 %uint_0 %27 %29 %uint_0
109 %32 = OpCompositeExtract %float %value 0
110 OpStore %31 %32
Ben Clayton009d1292022-02-04 15:39:34 +0000111 OpReturn
112 OpFunctionEnd
Ben Claytonaf25bec2024-01-15 13:35:27 +0000113%assign_and_preserve_padding_3_s_a_X_el_X = OpFunction %void None %33
James Price87537962022-12-06 18:32:19 +0000114 %dest_0 = OpFunctionParameter %_arr_uint_uint_2
115 %value_0 = OpFunctionParameter %_arr_strided_arr_uint_2
Ben Claytonaf25bec2024-01-15 13:35:27 +0000116 %38 = OpLabel
117 %i = OpVariable %_ptr_Function_uint Function %39
118%var_for_index = OpVariable %_ptr_Function__arr_strided_arr_uint_2 Function %54
119 OpStore %i %39
James Price87537962022-12-06 18:32:19 +0000120 OpBranch %42
121 %42 = OpLabel
Ben Claytonaf25bec2024-01-15 13:35:27 +0000122 OpLoopMerge %43 %44 None
123 OpBranch %45
124 %45 = OpLabel
125 %47 = OpLoad %uint %i
126 %48 = OpULessThan %bool %47 %uint_2
127 %46 = OpLogicalNot %bool %48
128 OpSelectionMerge %50 None
129 OpBranchConditional %46 %51 %50
130 %51 = OpLabel
131 OpBranch %43
132 %50 = OpLabel
133 OpStore %var_for_index %value_0
134 %56 = OpCompositeExtract %uint %dest_0 0
135 %58 = OpCompositeExtract %uint %dest_0 1
136 %59 = OpLoad %uint %i
137 %60 = OpCompositeConstruct %_arr_uint_uint_3 %56 %58 %59
138 %61 = OpLoad %uint %i
139 %63 = OpAccessChain %_ptr_Function_strided_arr %var_for_index %61
140 %64 = OpLoad %strided_arr %63
141 %55 = OpFunctionCall %void %assign_and_preserve_padding_4_s_a_X_el_X_X %60 %64
142 OpBranch %44
143 %44 = OpLabel
144 %65 = OpLoad %uint %i
145 %66 = OpIAdd %uint %65 %uint_1
146 OpStore %i %66
147 OpBranch %42
148 %43 = OpLabel
James Price87537962022-12-06 18:32:19 +0000149 OpReturn
150 OpFunctionEnd
Ben Claytonaf25bec2024-01-15 13:35:27 +0000151%assign_and_preserve_padding_2_s_a_X_el = OpFunction %void None %67
James Price87537962022-12-06 18:32:19 +0000152 %dest_1 = OpFunctionParameter %_arr_uint_uint_1
153 %value_1 = OpFunctionParameter %_arr__arr_strided_arr_uint_2_uint_3
James Price87537962022-12-06 18:32:19 +0000154 %72 = OpLabel
Ben Claytonaf25bec2024-01-15 13:35:27 +0000155 %i_0 = OpVariable %_ptr_Function_uint Function %39
156%var_for_index_1 = OpVariable %_ptr_Function__arr__arr_strided_arr_uint_2_uint_3 Function %85
157 OpStore %i_0 %39
James Price87537962022-12-06 18:32:19 +0000158 OpBranch %74
159 %74 = OpLabel
Ben Claytonaf25bec2024-01-15 13:35:27 +0000160 OpLoopMerge %75 %76 None
161 OpBranch %77
162 %77 = OpLabel
163 %79 = OpLoad %uint %i_0
164 %80 = OpULessThan %bool %79 %uint_3
165 %78 = OpLogicalNot %bool %80
166 OpSelectionMerge %81 None
167 OpBranchConditional %78 %82 %81
168 %82 = OpLabel
169 OpBranch %75
170 %81 = OpLabel
171 OpStore %var_for_index_1 %value_1
172 %87 = OpCompositeExtract %uint %dest_1 0
173 %88 = OpLoad %uint %i_0
174 %89 = OpCompositeConstruct %_arr_uint_uint_2 %87 %88
175 %90 = OpLoad %uint %i_0
176 %91 = OpAccessChain %_ptr_Function__arr_strided_arr_uint_2 %var_for_index_1 %90
177 %92 = OpLoad %_arr_strided_arr_uint_2 %91
178 %86 = OpFunctionCall %void %assign_and_preserve_padding_3_s_a_X_el_X %89 %92
179 OpBranch %76
180 %76 = OpLabel
181 %93 = OpLoad %uint %i_0
182 %94 = OpIAdd %uint %93 %uint_1
183 OpStore %i_0 %94
184 OpBranch %74
185 %75 = OpLabel
James Price87537962022-12-06 18:32:19 +0000186 OpReturn
187 OpFunctionEnd
Ben Claytonaf25bec2024-01-15 13:35:27 +0000188%assign_and_preserve_padding_1_s_a_X = OpFunction %void None %95
James Price87537962022-12-06 18:32:19 +0000189 %dest_2 = OpFunctionParameter %_arr_uint_uint_1
190 %value_2 = OpFunctionParameter %strided_arr_1
Ben Claytonaf25bec2024-01-15 13:35:27 +0000191 %99 = OpLabel
192 %101 = OpCompositeExtract %uint %dest_2 0
193 %102 = OpCompositeConstruct %_arr_uint_uint_1 %101
194 %103 = OpCompositeExtract %_arr__arr_strided_arr_uint_2_uint_3 %value_2 0
195 %100 = OpFunctionCall %void %assign_and_preserve_padding_2_s_a_X_el %102 %103
James Price87537962022-12-06 18:32:19 +0000196 OpReturn
197 OpFunctionEnd
Ben Claytonaf25bec2024-01-15 13:35:27 +0000198%assign_and_preserve_padding_s_a = OpFunction %void None %104
James Price87537962022-12-06 18:32:19 +0000199 %value_3 = OpFunctionParameter %_arr_strided_arr_1_uint_4
James Price87537962022-12-06 18:32:19 +0000200 %107 = OpLabel
Ben Claytonaf25bec2024-01-15 13:35:27 +0000201 %i_1 = OpVariable %_ptr_Function_uint Function %39
202%var_for_index_2 = OpVariable %_ptr_Function__arr_strided_arr_1_uint_4 Function %120
203 OpStore %i_1 %39
James Price87537962022-12-06 18:32:19 +0000204 OpBranch %109
205 %109 = OpLabel
Ben Claytonaf25bec2024-01-15 13:35:27 +0000206 OpLoopMerge %110 %111 None
207 OpBranch %112
208 %112 = OpLabel
209 %114 = OpLoad %uint %i_1
210 %115 = OpULessThan %bool %114 %uint_4
211 %113 = OpLogicalNot %bool %115
212 OpSelectionMerge %116 None
213 OpBranchConditional %113 %117 %116
214 %117 = OpLabel
215 OpBranch %110
216 %116 = OpLabel
217 OpStore %var_for_index_2 %value_3
218 %122 = OpLoad %uint %i_1
219 %123 = OpCompositeConstruct %_arr_uint_uint_1 %122
220 %124 = OpLoad %uint %i_1
221 %126 = OpAccessChain %_ptr_Function_strided_arr_1 %var_for_index_2 %124
222 %127 = OpLoad %strided_arr_1 %126
223 %121 = OpFunctionCall %void %assign_and_preserve_padding_1_s_a_X %123 %127
224 OpBranch %111
225 %111 = OpLabel
226 %128 = OpLoad %uint %i_1
227 %129 = OpIAdd %uint %128 %uint_1
228 OpStore %i_1 %129
229 OpBranch %109
230 %110 = OpLabel
James Price87537962022-12-06 18:32:19 +0000231 OpReturn
232 OpFunctionEnd
Ben Claytonaf25bec2024-01-15 13:35:27 +0000233 %f_1 = OpFunction %void None %130
234 %132 = OpLabel
235 %134 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_1_uint_4 %s %uint_0 %uint_0
236 %135 = OpLoad %_arr_strided_arr_1_uint_4 %134
237 %138 = OpAccessChain %_ptr_StorageBuffer__arr__arr_strided_arr_uint_2_uint_3 %s %uint_0 %uint_0 %int_3 %uint_0
238 %139 = OpLoad %_arr__arr_strided_arr_uint_2_uint_3 %138
239 %141 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_uint_2 %s %uint_0 %uint_0 %int_3 %uint_0 %int_2
240 %142 = OpLoad %_arr_strided_arr_uint_2 %141
James Price87537962022-12-06 18:32:19 +0000241 %143 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 %int_1 %uint_0
242 %144 = OpLoad %float %143
Ben Claytonaf25bec2024-01-15 13:35:27 +0000243 %145 = OpFunctionCall %void %assign_and_preserve_padding_s_a %120
James Price87537962022-12-06 18:32:19 +0000244 %146 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 %int_1 %uint_0
245 OpStore %146 %float_5
246 OpReturn
247 OpFunctionEnd
Ben Claytonaf25bec2024-01-15 13:35:27 +0000248 %f = OpFunction %void None %130
James Price87537962022-12-06 18:32:19 +0000249 %149 = OpLabel
250 %150 = OpFunctionCall %void %f_1
Ben Clayton009d1292022-02-04 15:39:34 +0000251 OpReturn
252 OpFunctionEnd