mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 17:05:31 +00:00
spir-writer: handle break continuing block
The continuing block can exit the loop in very constrained ways:
When a break statement is placed such that it would exit from a loop’s
§ 7.3.8 Continuing Statement, then:
- The break statement must appear as either:
- The only statement in the if clause of an if statement that has:
- no else clause or an empty else clause
- no elseif clauses
- The only statement in the else clause of an if statement that has an
empty if clause and no elseif clauses.
- That if statement must appear last in the continuing clause.
By design, this allows a lossless round-trip from SPIR-V to WGSL and
back to SPIR-V. But that requires this special case construct in WGSL
to be translated to an OpBranchConditional with one target being
the loop's megre block (which is where 'break' branches to), and the
other targets the loop header (which is the loop backedge). That
OpBranchConditional takes the place of the normal case of an
unconditional backedge.
Avoids errors like this:
continue construct with the continue target X is not
post dominated by the back-edge block Y
Fixed: 1034
Change-Id: If472a179380b8d77af746a3cd8e279c8a5e56b37
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59800
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
SKIP: FAILED
|
||||
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 324
|
||||
; Bound: 321
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -100,9 +98,9 @@ SKIP: FAILED
|
||||
%int_19 = OpConstant %int 19
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%276 = OpConstantNull %bool
|
||||
%273 = OpConstantNull %bool
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%312 = OpTypeFunction %void %main_out
|
||||
%309 = OpTypeFunction %void %main_out
|
||||
%main_1 = OpFunction %void None %18
|
||||
%21 = OpLabel
|
||||
%arr0 = OpVariable %_ptr_Function__arr_int_uint_10 Function %26
|
||||
@@ -117,8 +115,8 @@ SKIP: FAILED
|
||||
%ref0 = OpVariable %_ptr_Function__arr_int_uint_10 Function %26
|
||||
%ref1 = OpVariable %_ptr_Function__arr_int_uint_10 Function %26
|
||||
%i = OpVariable %_ptr_Function_int Function %30
|
||||
%x_277 = OpVariable %_ptr_Function_bool Function %276
|
||||
%x_278_phi = OpVariable %_ptr_Function_bool Function %276
|
||||
%x_277 = OpVariable %_ptr_Function_bool Function %273
|
||||
%x_278_phi = OpVariable %_ptr_Function_bool Function %273
|
||||
%43 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%44 = OpLoad %int %43
|
||||
%46 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
@@ -332,158 +330,148 @@ SKIP: FAILED
|
||||
%205 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%206 = OpLoad %int %205
|
||||
%207 = OpIEqual %bool %204 %206
|
||||
OpSelectionMerge %208 None
|
||||
OpBranchConditional %207 %209 %210
|
||||
%209 = OpLabel
|
||||
OpBranch %208
|
||||
%210 = OpLabel
|
||||
OpBranch %178
|
||||
%208 = OpLabel
|
||||
OpBranch %177
|
||||
OpBranchConditional %207 %177 %178
|
||||
%178 = OpLabel
|
||||
OpBranch %108
|
||||
%108 = OpLabel
|
||||
%211 = OpLoad %int %a
|
||||
%212 = OpIAdd %int %211 %int_1
|
||||
OpStore %a %212
|
||||
%208 = OpLoad %int %a
|
||||
%209 = OpIAdd %int %208 %int_1
|
||||
OpStore %a %209
|
||||
OpBranch %106
|
||||
%107 = OpLabel
|
||||
%213 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%214 = OpLoad %int %213
|
||||
%215 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%216 = OpLoad %int %215
|
||||
%217 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%218 = OpLoad %int %217
|
||||
%219 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%220 = OpLoad %int %219
|
||||
%221 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%222 = OpLoad %int %221
|
||||
%223 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_7
|
||||
%224 = OpLoad %int %223
|
||||
%225 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_8
|
||||
%226 = OpLoad %int %225
|
||||
%227 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
|
||||
%228 = OpLoad %int %227
|
||||
%229 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
|
||||
%230 = OpLoad %int %229
|
||||
%231 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_10
|
||||
%210 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%211 = OpLoad %int %210
|
||||
%212 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%213 = OpLoad %int %212
|
||||
%214 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%215 = OpLoad %int %214
|
||||
%216 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%217 = OpLoad %int %216
|
||||
%218 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%219 = OpLoad %int %218
|
||||
%220 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_7
|
||||
%221 = OpLoad %int %220
|
||||
%222 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_8
|
||||
%223 = OpLoad %int %222
|
||||
%224 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
|
||||
%225 = OpLoad %int %224
|
||||
%226 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
|
||||
%227 = OpLoad %int %226
|
||||
%228 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_10
|
||||
%229 = OpLoad %int %228
|
||||
%230 = OpCompositeConstruct %_arr_int_uint_10 %211 %213 %215 %217 %219 %221 %223 %225 %227 %229
|
||||
OpStore %ref0 %230
|
||||
%231 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%232 = OpLoad %int %231
|
||||
%233 = OpCompositeConstruct %_arr_int_uint_10 %214 %216 %218 %220 %222 %224 %226 %228 %230 %232
|
||||
OpStore %ref0 %233
|
||||
%234 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%235 = OpLoad %int %234
|
||||
%236 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%237 = OpLoad %int %236
|
||||
%238 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%239 = OpLoad %int %238
|
||||
%240 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%241 = OpLoad %int %240
|
||||
%242 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%243 = OpLoad %int %242
|
||||
%244 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_13
|
||||
%245 = OpLoad %int %244
|
||||
%246 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_14
|
||||
%247 = OpLoad %int %246
|
||||
%248 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%249 = OpLoad %int %248
|
||||
%250 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_18
|
||||
%251 = OpLoad %int %250
|
||||
%252 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_19
|
||||
%233 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%234 = OpLoad %int %233
|
||||
%235 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%236 = OpLoad %int %235
|
||||
%237 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%238 = OpLoad %int %237
|
||||
%239 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%240 = OpLoad %int %239
|
||||
%241 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_13
|
||||
%242 = OpLoad %int %241
|
||||
%243 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_14
|
||||
%244 = OpLoad %int %243
|
||||
%245 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%246 = OpLoad %int %245
|
||||
%247 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_18
|
||||
%248 = OpLoad %int %247
|
||||
%249 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_19
|
||||
%250 = OpLoad %int %249
|
||||
%251 = OpCompositeConstruct %_arr_int_uint_10 %232 %234 %236 %238 %240 %242 %244 %246 %248 %250
|
||||
OpStore %ref1 %251
|
||||
%252 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%253 = OpLoad %int %252
|
||||
%254 = OpCompositeConstruct %_arr_int_uint_10 %235 %237 %239 %241 %243 %245 %247 %249 %251 %253
|
||||
OpStore %ref1 %254
|
||||
%255 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%256 = OpLoad %int %255
|
||||
%257 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%258 = OpLoad %int %257
|
||||
%259 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%260 = OpLoad %int %259
|
||||
%261 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%262 = OpLoad %int %261
|
||||
%263 = OpConvertSToF %float %256
|
||||
%264 = OpConvertSToF %float %258
|
||||
%265 = OpConvertSToF %float %260
|
||||
%266 = OpConvertSToF %float %262
|
||||
%267 = OpCompositeConstruct %v4float %263 %264 %265 %266
|
||||
OpStore %x_GLF_color %267
|
||||
%268 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%269 = OpLoad %int %268
|
||||
OpStore %i %269
|
||||
%254 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%255 = OpLoad %int %254
|
||||
%256 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%257 = OpLoad %int %256
|
||||
%258 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%259 = OpLoad %int %258
|
||||
%260 = OpConvertSToF %float %253
|
||||
%261 = OpConvertSToF %float %255
|
||||
%262 = OpConvertSToF %float %257
|
||||
%263 = OpConvertSToF %float %259
|
||||
%264 = OpCompositeConstruct %v4float %260 %261 %262 %263
|
||||
OpStore %x_GLF_color %264
|
||||
%265 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%266 = OpLoad %int %265
|
||||
OpStore %i %266
|
||||
OpBranch %267
|
||||
%267 = OpLabel
|
||||
OpLoopMerge %268 %269 None
|
||||
OpBranch %270
|
||||
%270 = OpLabel
|
||||
OpLoopMerge %271 %272 None
|
||||
OpBranch %273
|
||||
%273 = OpLabel
|
||||
%278 = OpLoad %int %i
|
||||
%279 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%280 = OpLoad %int %279
|
||||
%281 = OpSLessThan %bool %278 %280
|
||||
OpSelectionMerge %282 None
|
||||
OpBranchConditional %281 %283 %284
|
||||
%283 = OpLabel
|
||||
OpBranch %282
|
||||
%284 = OpLabel
|
||||
OpBranch %271
|
||||
%282 = OpLabel
|
||||
%275 = OpLoad %int %i
|
||||
%276 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%277 = OpLoad %int %276
|
||||
%278 = OpSLessThan %bool %275 %277
|
||||
OpSelectionMerge %279 None
|
||||
OpBranchConditional %278 %280 %281
|
||||
%280 = OpLabel
|
||||
OpBranch %279
|
||||
%281 = OpLabel
|
||||
OpBranch %268
|
||||
%279 = OpLabel
|
||||
%282 = OpLoad %int %i
|
||||
%283 = OpAccessChain %_ptr_Function_int %arr0 %282
|
||||
%284 = OpLoad %int %283
|
||||
%285 = OpLoad %int %i
|
||||
%286 = OpAccessChain %_ptr_Function_int %arr0 %285
|
||||
%286 = OpAccessChain %_ptr_Function_int %ref0 %285
|
||||
%287 = OpLoad %int %286
|
||||
%288 = OpLoad %int %i
|
||||
%289 = OpAccessChain %_ptr_Function_int %ref0 %288
|
||||
%290 = OpLoad %int %289
|
||||
%291 = OpINotEqual %bool %287 %290
|
||||
OpStore %x_278_phi %291
|
||||
%292 = OpLogicalNot %bool %291
|
||||
OpSelectionMerge %293 None
|
||||
OpBranchConditional %292 %294 %293
|
||||
%294 = OpLabel
|
||||
%288 = OpINotEqual %bool %284 %287
|
||||
OpStore %x_278_phi %288
|
||||
%289 = OpLogicalNot %bool %288
|
||||
OpSelectionMerge %290 None
|
||||
OpBranchConditional %289 %291 %290
|
||||
%291 = OpLabel
|
||||
%292 = OpLoad %int %i
|
||||
%293 = OpAccessChain %_ptr_Function_int %arr1 %292
|
||||
%294 = OpLoad %int %293
|
||||
%295 = OpLoad %int %i
|
||||
%296 = OpAccessChain %_ptr_Function_int %arr1 %295
|
||||
%296 = OpAccessChain %_ptr_Function_int %ref1 %295
|
||||
%297 = OpLoad %int %296
|
||||
%298 = OpLoad %int %i
|
||||
%299 = OpAccessChain %_ptr_Function_int %ref1 %298
|
||||
%300 = OpLoad %int %299
|
||||
%301 = OpINotEqual %bool %297 %300
|
||||
OpStore %x_277 %301
|
||||
%302 = OpLoad %bool %x_277
|
||||
OpStore %x_278_phi %302
|
||||
OpBranch %293
|
||||
%293 = OpLabel
|
||||
%303 = OpLoad %bool %x_278_phi
|
||||
OpSelectionMerge %304 None
|
||||
OpBranchConditional %303 %305 %304
|
||||
%305 = OpLabel
|
||||
%306 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%307 = OpLoad %int %306
|
||||
%308 = OpConvertSToF %float %307
|
||||
%309 = OpCompositeConstruct %v4float %308 %308 %308 %308
|
||||
OpStore %x_GLF_color %309
|
||||
OpBranch %304
|
||||
%304 = OpLabel
|
||||
OpBranch %272
|
||||
%272 = OpLabel
|
||||
%310 = OpLoad %int %i
|
||||
%311 = OpIAdd %int %310 %int_1
|
||||
OpStore %i %311
|
||||
OpBranch %270
|
||||
%271 = OpLabel
|
||||
%298 = OpINotEqual %bool %294 %297
|
||||
OpStore %x_277 %298
|
||||
%299 = OpLoad %bool %x_277
|
||||
OpStore %x_278_phi %299
|
||||
OpBranch %290
|
||||
%290 = OpLabel
|
||||
%300 = OpLoad %bool %x_278_phi
|
||||
OpSelectionMerge %301 None
|
||||
OpBranchConditional %300 %302 %301
|
||||
%302 = OpLabel
|
||||
%303 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%304 = OpLoad %int %303
|
||||
%305 = OpConvertSToF %float %304
|
||||
%306 = OpCompositeConstruct %v4float %305 %305 %305 %305
|
||||
OpStore %x_GLF_color %306
|
||||
OpBranch %301
|
||||
%301 = OpLabel
|
||||
OpBranch %269
|
||||
%269 = OpLabel
|
||||
%307 = OpLoad %int %i
|
||||
%308 = OpIAdd %int %307 %int_1
|
||||
OpStore %i %308
|
||||
OpBranch %267
|
||||
%268 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %312
|
||||
%tint_symbol_2 = OpFunction %void None %309
|
||||
%tint_symbol = OpFunctionParameter %main_out
|
||||
%316 = OpLabel
|
||||
%317 = OpCompositeExtract %v4float %tint_symbol 0
|
||||
OpStore %tint_symbol_1 %317
|
||||
%313 = OpLabel
|
||||
%314 = OpCompositeExtract %v4float %tint_symbol 0
|
||||
OpStore %tint_symbol_1 %314
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %18
|
||||
%319 = OpLabel
|
||||
%320 = OpFunctionCall %void %main_1
|
||||
%322 = OpLoad %v4float %x_GLF_color
|
||||
%323 = OpCompositeConstruct %main_out %322
|
||||
%321 = OpFunctionCall %void %tint_symbol_2 %323
|
||||
%316 = OpLabel
|
||||
%317 = OpFunctionCall %void %main_1
|
||||
%319 = OpLoad %v4float %x_GLF_color
|
||||
%320 = OpCompositeConstruct %main_out %319
|
||||
%318 = OpFunctionCall %void %tint_symbol_2 %320
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
1:1: The continue construct with the continue target 179[%179] is not post dominated by the back-edge block 208[%208]
|
||||
%208 = OpLabel
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
SKIP: FAILED
|
||||
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 324
|
||||
; Bound: 321
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -100,9 +98,9 @@ SKIP: FAILED
|
||||
%int_19 = OpConstant %int 19
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%276 = OpConstantNull %bool
|
||||
%273 = OpConstantNull %bool
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%312 = OpTypeFunction %void %main_out
|
||||
%309 = OpTypeFunction %void %main_out
|
||||
%main_1 = OpFunction %void None %18
|
||||
%21 = OpLabel
|
||||
%arr0 = OpVariable %_ptr_Function__arr_int_uint_10 Function %26
|
||||
@@ -117,8 +115,8 @@ SKIP: FAILED
|
||||
%ref0 = OpVariable %_ptr_Function__arr_int_uint_10 Function %26
|
||||
%ref1 = OpVariable %_ptr_Function__arr_int_uint_10 Function %26
|
||||
%i = OpVariable %_ptr_Function_int Function %30
|
||||
%x_277 = OpVariable %_ptr_Function_bool Function %276
|
||||
%x_278_phi = OpVariable %_ptr_Function_bool Function %276
|
||||
%x_277 = OpVariable %_ptr_Function_bool Function %273
|
||||
%x_278_phi = OpVariable %_ptr_Function_bool Function %273
|
||||
%43 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%44 = OpLoad %int %43
|
||||
%46 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
@@ -332,158 +330,148 @@ SKIP: FAILED
|
||||
%205 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%206 = OpLoad %int %205
|
||||
%207 = OpIEqual %bool %204 %206
|
||||
OpSelectionMerge %208 None
|
||||
OpBranchConditional %207 %209 %210
|
||||
%209 = OpLabel
|
||||
OpBranch %208
|
||||
%210 = OpLabel
|
||||
OpBranch %178
|
||||
%208 = OpLabel
|
||||
OpBranch %177
|
||||
OpBranchConditional %207 %177 %178
|
||||
%178 = OpLabel
|
||||
OpBranch %108
|
||||
%108 = OpLabel
|
||||
%211 = OpLoad %int %a
|
||||
%212 = OpIAdd %int %211 %int_1
|
||||
OpStore %a %212
|
||||
%208 = OpLoad %int %a
|
||||
%209 = OpIAdd %int %208 %int_1
|
||||
OpStore %a %209
|
||||
OpBranch %106
|
||||
%107 = OpLabel
|
||||
%213 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%214 = OpLoad %int %213
|
||||
%215 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%216 = OpLoad %int %215
|
||||
%217 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%218 = OpLoad %int %217
|
||||
%219 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%220 = OpLoad %int %219
|
||||
%221 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%222 = OpLoad %int %221
|
||||
%223 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_7
|
||||
%224 = OpLoad %int %223
|
||||
%225 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_8
|
||||
%226 = OpLoad %int %225
|
||||
%227 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
|
||||
%228 = OpLoad %int %227
|
||||
%229 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
|
||||
%230 = OpLoad %int %229
|
||||
%231 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_10
|
||||
%210 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%211 = OpLoad %int %210
|
||||
%212 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%213 = OpLoad %int %212
|
||||
%214 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%215 = OpLoad %int %214
|
||||
%216 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%217 = OpLoad %int %216
|
||||
%218 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%219 = OpLoad %int %218
|
||||
%220 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_7
|
||||
%221 = OpLoad %int %220
|
||||
%222 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_8
|
||||
%223 = OpLoad %int %222
|
||||
%224 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_9
|
||||
%225 = OpLoad %int %224
|
||||
%226 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
|
||||
%227 = OpLoad %int %226
|
||||
%228 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_10
|
||||
%229 = OpLoad %int %228
|
||||
%230 = OpCompositeConstruct %_arr_int_uint_10 %211 %213 %215 %217 %219 %221 %223 %225 %227 %229
|
||||
OpStore %ref0 %230
|
||||
%231 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%232 = OpLoad %int %231
|
||||
%233 = OpCompositeConstruct %_arr_int_uint_10 %214 %216 %218 %220 %222 %224 %226 %228 %230 %232
|
||||
OpStore %ref0 %233
|
||||
%234 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%235 = OpLoad %int %234
|
||||
%236 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%237 = OpLoad %int %236
|
||||
%238 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%239 = OpLoad %int %238
|
||||
%240 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%241 = OpLoad %int %240
|
||||
%242 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%243 = OpLoad %int %242
|
||||
%244 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_13
|
||||
%245 = OpLoad %int %244
|
||||
%246 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_14
|
||||
%247 = OpLoad %int %246
|
||||
%248 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%249 = OpLoad %int %248
|
||||
%250 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_18
|
||||
%251 = OpLoad %int %250
|
||||
%252 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_19
|
||||
%233 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_12
|
||||
%234 = OpLoad %int %233
|
||||
%235 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%236 = OpLoad %int %235
|
||||
%237 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_5
|
||||
%238 = OpLoad %int %237
|
||||
%239 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_6
|
||||
%240 = OpLoad %int %239
|
||||
%241 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_13
|
||||
%242 = OpLoad %int %241
|
||||
%243 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_14
|
||||
%244 = OpLoad %int %243
|
||||
%245 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_11
|
||||
%246 = OpLoad %int %245
|
||||
%247 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_18
|
||||
%248 = OpLoad %int %247
|
||||
%249 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_19
|
||||
%250 = OpLoad %int %249
|
||||
%251 = OpCompositeConstruct %_arr_int_uint_10 %232 %234 %236 %238 %240 %242 %244 %246 %248 %250
|
||||
OpStore %ref1 %251
|
||||
%252 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%253 = OpLoad %int %252
|
||||
%254 = OpCompositeConstruct %_arr_int_uint_10 %235 %237 %239 %241 %243 %245 %247 %249 %251 %253
|
||||
OpStore %ref1 %254
|
||||
%255 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%256 = OpLoad %int %255
|
||||
%257 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%258 = OpLoad %int %257
|
||||
%259 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%260 = OpLoad %int %259
|
||||
%261 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%262 = OpLoad %int %261
|
||||
%263 = OpConvertSToF %float %256
|
||||
%264 = OpConvertSToF %float %258
|
||||
%265 = OpConvertSToF %float %260
|
||||
%266 = OpConvertSToF %float %262
|
||||
%267 = OpCompositeConstruct %v4float %263 %264 %265 %266
|
||||
OpStore %x_GLF_color %267
|
||||
%268 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%269 = OpLoad %int %268
|
||||
OpStore %i %269
|
||||
%254 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%255 = OpLoad %int %254
|
||||
%256 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%257 = OpLoad %int %256
|
||||
%258 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
|
||||
%259 = OpLoad %int %258
|
||||
%260 = OpConvertSToF %float %253
|
||||
%261 = OpConvertSToF %float %255
|
||||
%262 = OpConvertSToF %float %257
|
||||
%263 = OpConvertSToF %float %259
|
||||
%264 = OpCompositeConstruct %v4float %260 %261 %262 %263
|
||||
OpStore %x_GLF_color %264
|
||||
%265 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%266 = OpLoad %int %265
|
||||
OpStore %i %266
|
||||
OpBranch %267
|
||||
%267 = OpLabel
|
||||
OpLoopMerge %268 %269 None
|
||||
OpBranch %270
|
||||
%270 = OpLabel
|
||||
OpLoopMerge %271 %272 None
|
||||
OpBranch %273
|
||||
%273 = OpLabel
|
||||
%278 = OpLoad %int %i
|
||||
%279 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%280 = OpLoad %int %279
|
||||
%281 = OpSLessThan %bool %278 %280
|
||||
OpSelectionMerge %282 None
|
||||
OpBranchConditional %281 %283 %284
|
||||
%283 = OpLabel
|
||||
OpBranch %282
|
||||
%284 = OpLabel
|
||||
OpBranch %271
|
||||
%282 = OpLabel
|
||||
%275 = OpLoad %int %i
|
||||
%276 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
|
||||
%277 = OpLoad %int %276
|
||||
%278 = OpSLessThan %bool %275 %277
|
||||
OpSelectionMerge %279 None
|
||||
OpBranchConditional %278 %280 %281
|
||||
%280 = OpLabel
|
||||
OpBranch %279
|
||||
%281 = OpLabel
|
||||
OpBranch %268
|
||||
%279 = OpLabel
|
||||
%282 = OpLoad %int %i
|
||||
%283 = OpAccessChain %_ptr_Function_int %arr0 %282
|
||||
%284 = OpLoad %int %283
|
||||
%285 = OpLoad %int %i
|
||||
%286 = OpAccessChain %_ptr_Function_int %arr0 %285
|
||||
%286 = OpAccessChain %_ptr_Function_int %ref0 %285
|
||||
%287 = OpLoad %int %286
|
||||
%288 = OpLoad %int %i
|
||||
%289 = OpAccessChain %_ptr_Function_int %ref0 %288
|
||||
%290 = OpLoad %int %289
|
||||
%291 = OpINotEqual %bool %287 %290
|
||||
OpStore %x_278_phi %291
|
||||
%292 = OpLogicalNot %bool %291
|
||||
OpSelectionMerge %293 None
|
||||
OpBranchConditional %292 %294 %293
|
||||
%294 = OpLabel
|
||||
%288 = OpINotEqual %bool %284 %287
|
||||
OpStore %x_278_phi %288
|
||||
%289 = OpLogicalNot %bool %288
|
||||
OpSelectionMerge %290 None
|
||||
OpBranchConditional %289 %291 %290
|
||||
%291 = OpLabel
|
||||
%292 = OpLoad %int %i
|
||||
%293 = OpAccessChain %_ptr_Function_int %arr1 %292
|
||||
%294 = OpLoad %int %293
|
||||
%295 = OpLoad %int %i
|
||||
%296 = OpAccessChain %_ptr_Function_int %arr1 %295
|
||||
%296 = OpAccessChain %_ptr_Function_int %ref1 %295
|
||||
%297 = OpLoad %int %296
|
||||
%298 = OpLoad %int %i
|
||||
%299 = OpAccessChain %_ptr_Function_int %ref1 %298
|
||||
%300 = OpLoad %int %299
|
||||
%301 = OpINotEqual %bool %297 %300
|
||||
OpStore %x_277 %301
|
||||
%302 = OpLoad %bool %x_277
|
||||
OpStore %x_278_phi %302
|
||||
OpBranch %293
|
||||
%293 = OpLabel
|
||||
%303 = OpLoad %bool %x_278_phi
|
||||
OpSelectionMerge %304 None
|
||||
OpBranchConditional %303 %305 %304
|
||||
%305 = OpLabel
|
||||
%306 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%307 = OpLoad %int %306
|
||||
%308 = OpConvertSToF %float %307
|
||||
%309 = OpCompositeConstruct %v4float %308 %308 %308 %308
|
||||
OpStore %x_GLF_color %309
|
||||
OpBranch %304
|
||||
%304 = OpLabel
|
||||
OpBranch %272
|
||||
%272 = OpLabel
|
||||
%310 = OpLoad %int %i
|
||||
%311 = OpIAdd %int %310 %int_1
|
||||
OpStore %i %311
|
||||
OpBranch %270
|
||||
%271 = OpLabel
|
||||
%298 = OpINotEqual %bool %294 %297
|
||||
OpStore %x_277 %298
|
||||
%299 = OpLoad %bool %x_277
|
||||
OpStore %x_278_phi %299
|
||||
OpBranch %290
|
||||
%290 = OpLabel
|
||||
%300 = OpLoad %bool %x_278_phi
|
||||
OpSelectionMerge %301 None
|
||||
OpBranchConditional %300 %302 %301
|
||||
%302 = OpLabel
|
||||
%303 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
|
||||
%304 = OpLoad %int %303
|
||||
%305 = OpConvertSToF %float %304
|
||||
%306 = OpCompositeConstruct %v4float %305 %305 %305 %305
|
||||
OpStore %x_GLF_color %306
|
||||
OpBranch %301
|
||||
%301 = OpLabel
|
||||
OpBranch %269
|
||||
%269 = OpLabel
|
||||
%307 = OpLoad %int %i
|
||||
%308 = OpIAdd %int %307 %int_1
|
||||
OpStore %i %308
|
||||
OpBranch %267
|
||||
%268 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %312
|
||||
%tint_symbol_2 = OpFunction %void None %309
|
||||
%tint_symbol = OpFunctionParameter %main_out
|
||||
%316 = OpLabel
|
||||
%317 = OpCompositeExtract %v4float %tint_symbol 0
|
||||
OpStore %tint_symbol_1 %317
|
||||
%313 = OpLabel
|
||||
%314 = OpCompositeExtract %v4float %tint_symbol 0
|
||||
OpStore %tint_symbol_1 %314
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %18
|
||||
%319 = OpLabel
|
||||
%320 = OpFunctionCall %void %main_1
|
||||
%322 = OpLoad %v4float %x_GLF_color
|
||||
%323 = OpCompositeConstruct %main_out %322
|
||||
%321 = OpFunctionCall %void %tint_symbol_2 %323
|
||||
%316 = OpLabel
|
||||
%317 = OpFunctionCall %void %main_1
|
||||
%319 = OpLoad %v4float %x_GLF_color
|
||||
%320 = OpCompositeConstruct %main_out %319
|
||||
%318 = OpFunctionCall %void %tint_symbol_2 %320
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
1:1: The continue construct with the continue target 179[%179] is not post dominated by the back-edge block 208[%208]
|
||||
%208 = OpLabel
|
||||
|
||||
|
||||
Reference in New Issue
Block a user