mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-12 08:05:53 +00:00
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>
764 lines
30 KiB
Plaintext
764 lines
30 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 506
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpName %gl_FragCoord "gl_FragCoord"
|
|
OpName %buf0 "buf0"
|
|
OpMemberName %buf0 0 "resolution"
|
|
OpName %x_7 "x_7"
|
|
OpName %map "map"
|
|
OpName %x_GLF_color "x_GLF_color"
|
|
OpName %tint_symbol "tint_symbol"
|
|
OpName %tint_symbol_2 "tint_symbol_2"
|
|
OpName %main_1 "main_1"
|
|
OpName %pos "pos"
|
|
OpName %ipos "ipos"
|
|
OpName %i "i"
|
|
OpName %p "p"
|
|
OpName %canwalk "canwalk"
|
|
OpName %v "v"
|
|
OpName %directions "directions"
|
|
OpName %j "j"
|
|
OpName %d "d"
|
|
OpName %x_102 "x_102"
|
|
OpName %x_122 "x_122"
|
|
OpName %x_142 "x_142"
|
|
OpName %x_162 "x_162"
|
|
OpName %x_103_phi "x_103_phi"
|
|
OpName %x_123_phi "x_123_phi"
|
|
OpName %x_143_phi "x_143_phi"
|
|
OpName %x_163_phi "x_163_phi"
|
|
OpName %x_227 "x_227"
|
|
OpName %x_240 "x_240"
|
|
OpName %x_279 "x_279"
|
|
OpName %x_292 "x_292"
|
|
OpName %x_331 "x_331"
|
|
OpName %x_344 "x_344"
|
|
OpName %x_383 "x_383"
|
|
OpName %x_396 "x_396"
|
|
OpName %x_228_phi "x_228_phi"
|
|
OpName %x_241_phi "x_241_phi"
|
|
OpName %x_280_phi "x_280_phi"
|
|
OpName %x_293_phi "x_293_phi"
|
|
OpName %x_332_phi "x_332_phi"
|
|
OpName %x_345_phi "x_345_phi"
|
|
OpName %x_384_phi "x_384_phi"
|
|
OpName %x_397_phi "x_397_phi"
|
|
OpName %main_out "main_out"
|
|
OpMemberName %main_out 0 "x_GLF_color_1"
|
|
OpName %tint_symbol_3 "tint_symbol_3"
|
|
OpName %tint_symbol_1 "tint_symbol_1"
|
|
OpName %main "main"
|
|
OpDecorate %buf0 Block
|
|
OpMemberDecorate %buf0 0 Offset 0
|
|
OpDecorate %x_7 NonWritable
|
|
OpDecorate %x_7 DescriptorSet 0
|
|
OpDecorate %x_7 Binding 0
|
|
OpDecorate %_arr_int_uint_256 ArrayStride 4
|
|
OpDecorate %tint_symbol BuiltIn FragCoord
|
|
OpDecorate %tint_symbol_2 Location 0
|
|
OpMemberDecorate %main_out 0 Offset 0
|
|
%float = OpTypeFloat 32
|
|
%v4float = OpTypeVector %float 4
|
|
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
|
%5 = OpConstantNull %v4float
|
|
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
|
|
%v2float = OpTypeVector %float 2
|
|
%buf0 = OpTypeStruct %v2float
|
|
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
|
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
|
|
%int = OpTypeInt 32 1
|
|
%uint = OpTypeInt 32 0
|
|
%uint_256 = OpConstant %uint 256
|
|
%_arr_int_uint_256 = OpTypeArray %int %uint_256
|
|
%_ptr_Private__arr_int_uint_256 = OpTypePointer Private %_arr_int_uint_256
|
|
%16 = OpConstantNull %_arr_int_uint_256
|
|
%map = OpVariable %_ptr_Private__arr_int_uint_256 Private %16
|
|
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
|
|
%_ptr_Input_v4float = OpTypePointer Input %v4float
|
|
%tint_symbol = OpVariable %_ptr_Input_v4float Input
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
|
|
%void = OpTypeVoid
|
|
%22 = OpTypeFunction %void
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
%28 = OpConstantNull %v2float
|
|
%v2int = OpTypeVector %int 2
|
|
%_ptr_Function_v2int = OpTypePointer Function %v2int
|
|
%32 = OpConstantNull %v2int
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
%35 = OpConstantNull %int
|
|
%bool = OpTypeBool
|
|
%_ptr_Function_bool = OpTypePointer Function %bool
|
|
%40 = OpConstantNull %bool
|
|
%uint_0 = OpConstant %uint 0
|
|
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
%uint_1 = OpConstant %uint 1
|
|
%float_16 = OpConstant %float 16
|
|
%int_0 = OpConstant %int 0
|
|
%int_256 = OpConstant %int 256
|
|
%_ptr_Private_int = OpTypePointer Private %int
|
|
%int_1 = OpConstant %int 1
|
|
%83 = OpConstantComposite %v2int %int_0 %int_0
|
|
%true = OpConstantTrue %bool
|
|
%int_2 = OpConstant %int 2
|
|
%int_16 = OpConstant %int 16
|
|
%int_14 = OpConstant %int 14
|
|
%false = OpConstantFalse %bool
|
|
%int_8 = OpConstant %int 8
|
|
%float_1 = OpConstant %float 1
|
|
%489 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
|
%float_0 = OpConstant %float 0
|
|
%492 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
|
|
%main_out = OpTypeStruct %v4float
|
|
%493 = OpTypeFunction %void %main_out
|
|
%main_1 = OpFunction %void None %22
|
|
%25 = OpLabel
|
|
%pos = OpVariable %_ptr_Function_v2float Function %28
|
|
%ipos = OpVariable %_ptr_Function_v2int Function %32
|
|
%i = OpVariable %_ptr_Function_int Function %35
|
|
%p = OpVariable %_ptr_Function_v2int Function %32
|
|
%canwalk = OpVariable %_ptr_Function_bool Function %40
|
|
%v = OpVariable %_ptr_Function_int Function %35
|
|
%directions = OpVariable %_ptr_Function_int Function %35
|
|
%j = OpVariable %_ptr_Function_int Function %35
|
|
%d = OpVariable %_ptr_Function_int Function %35
|
|
%x_102 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_122 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_142 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_162 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_103_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_123_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_143_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_163_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_227 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_240 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_279 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_292 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_331 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_344 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_383 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_396 = OpVariable %_ptr_Function_bool Function %40
|
|
%x_228_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_241_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_280_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_293_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_332_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_345_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_384_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%x_397_phi = OpVariable %_ptr_Function_bool Function %40
|
|
%45 = OpLoad %v4float %gl_FragCoord
|
|
%48 = OpAccessChain %_ptr_Uniform_v2float %x_7 %uint_0
|
|
%49 = OpLoad %v2float %48
|
|
%50 = OpCompositeExtract %float %45 0
|
|
%51 = OpCompositeExtract %float %45 1
|
|
%52 = OpCompositeConstruct %v2float %50 %51
|
|
%53 = OpFDiv %v2float %52 %49
|
|
OpStore %pos %53
|
|
%55 = OpAccessChain %_ptr_Function_float %pos %uint_0
|
|
%56 = OpLoad %float %55
|
|
%58 = OpAccessChain %_ptr_Function_float %pos %uint_1
|
|
%59 = OpLoad %float %58
|
|
%62 = OpFMul %float %56 %float_16
|
|
%60 = OpConvertFToS %int %62
|
|
%64 = OpFMul %float %59 %float_16
|
|
%63 = OpConvertFToS %int %64
|
|
%65 = OpCompositeConstruct %v2int %60 %63
|
|
OpStore %ipos %65
|
|
OpStore %i %int_0
|
|
OpBranch %67
|
|
%67 = OpLabel
|
|
OpLoopMerge %68 %69 None
|
|
OpBranch %70
|
|
%70 = OpLabel
|
|
%71 = OpLoad %int %i
|
|
%73 = OpSLessThan %bool %71 %int_256
|
|
OpSelectionMerge %74 None
|
|
OpBranchConditional %73 %75 %76
|
|
%75 = OpLabel
|
|
OpBranch %74
|
|
%76 = OpLabel
|
|
OpBranch %68
|
|
%74 = OpLabel
|
|
%77 = OpLoad %int %i
|
|
%79 = OpAccessChain %_ptr_Private_int %map %77
|
|
OpStore %79 %int_0
|
|
OpBranch %69
|
|
%69 = OpLabel
|
|
%80 = OpLoad %int %i
|
|
%82 = OpIAdd %int %80 %int_1
|
|
OpStore %i %82
|
|
OpBranch %67
|
|
%68 = OpLabel
|
|
OpStore %p %83
|
|
OpStore %canwalk %true
|
|
OpStore %v %int_0
|
|
OpBranch %85
|
|
%85 = OpLabel
|
|
OpLoopMerge %86 %87 None
|
|
OpBranch %88
|
|
%88 = OpLabel
|
|
%97 = OpLoad %int %v
|
|
%98 = OpIAdd %int %97 %int_1
|
|
OpStore %v %98
|
|
OpStore %directions %int_0
|
|
%99 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%100 = OpLoad %int %99
|
|
%101 = OpSGreaterThan %bool %100 %int_0
|
|
OpStore %x_103_phi %101
|
|
OpSelectionMerge %102 None
|
|
OpBranchConditional %101 %103 %102
|
|
%103 = OpLabel
|
|
%104 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%105 = OpLoad %int %104
|
|
%106 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%107 = OpLoad %int %106
|
|
%109 = OpISub %int %105 %int_2
|
|
%111 = OpIMul %int %107 %int_16
|
|
%112 = OpIAdd %int %109 %111
|
|
%113 = OpAccessChain %_ptr_Private_int %map %112
|
|
%114 = OpLoad %int %113
|
|
%115 = OpIEqual %bool %114 %int_0
|
|
OpStore %x_102 %115
|
|
%116 = OpLoad %bool %x_102
|
|
OpStore %x_103_phi %116
|
|
OpBranch %102
|
|
%102 = OpLabel
|
|
%117 = OpLoad %bool %x_103_phi
|
|
OpSelectionMerge %118 None
|
|
OpBranchConditional %117 %119 %118
|
|
%119 = OpLabel
|
|
%120 = OpLoad %int %directions
|
|
%121 = OpIAdd %int %120 %int_1
|
|
OpStore %directions %121
|
|
OpBranch %118
|
|
%118 = OpLabel
|
|
%122 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%123 = OpLoad %int %122
|
|
%124 = OpSGreaterThan %bool %123 %int_0
|
|
OpStore %x_123_phi %124
|
|
OpSelectionMerge %125 None
|
|
OpBranchConditional %124 %126 %125
|
|
%126 = OpLabel
|
|
%127 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%128 = OpLoad %int %127
|
|
%129 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%130 = OpLoad %int %129
|
|
%131 = OpISub %int %130 %int_2
|
|
%132 = OpIMul %int %131 %int_16
|
|
%133 = OpIAdd %int %128 %132
|
|
%134 = OpAccessChain %_ptr_Private_int %map %133
|
|
%135 = OpLoad %int %134
|
|
%136 = OpIEqual %bool %135 %int_0
|
|
OpStore %x_122 %136
|
|
%137 = OpLoad %bool %x_122
|
|
OpStore %x_123_phi %137
|
|
OpBranch %125
|
|
%125 = OpLabel
|
|
%138 = OpLoad %bool %x_123_phi
|
|
OpSelectionMerge %139 None
|
|
OpBranchConditional %138 %140 %139
|
|
%140 = OpLabel
|
|
%141 = OpLoad %int %directions
|
|
%142 = OpIAdd %int %141 %int_1
|
|
OpStore %directions %142
|
|
OpBranch %139
|
|
%139 = OpLabel
|
|
%143 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%144 = OpLoad %int %143
|
|
%146 = OpSLessThan %bool %144 %int_14
|
|
OpStore %x_143_phi %146
|
|
OpSelectionMerge %147 None
|
|
OpBranchConditional %146 %148 %147
|
|
%148 = OpLabel
|
|
%149 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%150 = OpLoad %int %149
|
|
%151 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%152 = OpLoad %int %151
|
|
%153 = OpIAdd %int %150 %int_2
|
|
%154 = OpIMul %int %152 %int_16
|
|
%155 = OpIAdd %int %153 %154
|
|
%156 = OpAccessChain %_ptr_Private_int %map %155
|
|
%157 = OpLoad %int %156
|
|
%158 = OpIEqual %bool %157 %int_0
|
|
OpStore %x_142 %158
|
|
%159 = OpLoad %bool %x_142
|
|
OpStore %x_143_phi %159
|
|
OpBranch %147
|
|
%147 = OpLabel
|
|
%160 = OpLoad %bool %x_143_phi
|
|
OpSelectionMerge %161 None
|
|
OpBranchConditional %160 %162 %161
|
|
%162 = OpLabel
|
|
%163 = OpLoad %int %directions
|
|
%164 = OpIAdd %int %163 %int_1
|
|
OpStore %directions %164
|
|
OpBranch %161
|
|
%161 = OpLabel
|
|
%165 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%166 = OpLoad %int %165
|
|
%167 = OpSLessThan %bool %166 %int_14
|
|
OpStore %x_163_phi %167
|
|
OpSelectionMerge %168 None
|
|
OpBranchConditional %167 %169 %168
|
|
%169 = OpLabel
|
|
%170 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%171 = OpLoad %int %170
|
|
%172 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%173 = OpLoad %int %172
|
|
%174 = OpIAdd %int %173 %int_2
|
|
%175 = OpIMul %int %174 %int_16
|
|
%176 = OpIAdd %int %171 %175
|
|
%177 = OpAccessChain %_ptr_Private_int %map %176
|
|
%178 = OpLoad %int %177
|
|
%179 = OpIEqual %bool %178 %int_0
|
|
OpStore %x_162 %179
|
|
%180 = OpLoad %bool %x_162
|
|
OpStore %x_163_phi %180
|
|
OpBranch %168
|
|
%168 = OpLabel
|
|
%181 = OpLoad %bool %x_163_phi
|
|
OpSelectionMerge %182 None
|
|
OpBranchConditional %181 %183 %182
|
|
%183 = OpLabel
|
|
%184 = OpLoad %int %directions
|
|
%185 = OpIAdd %int %184 %int_1
|
|
OpStore %directions %185
|
|
OpBranch %182
|
|
%182 = OpLabel
|
|
%202 = OpLoad %int %directions
|
|
%203 = OpIEqual %bool %202 %int_0
|
|
OpSelectionMerge %204 None
|
|
OpBranchConditional %203 %205 %206
|
|
%205 = OpLabel
|
|
OpStore %canwalk %false
|
|
OpStore %i %int_0
|
|
OpBranch %208
|
|
%208 = OpLabel
|
|
OpLoopMerge %209 %210 None
|
|
OpBranch %211
|
|
%211 = OpLabel
|
|
%212 = OpLoad %int %i
|
|
%214 = OpSLessThan %bool %212 %int_8
|
|
OpSelectionMerge %215 None
|
|
OpBranchConditional %214 %216 %217
|
|
%216 = OpLabel
|
|
OpBranch %215
|
|
%217 = OpLabel
|
|
OpBranch %209
|
|
%215 = OpLabel
|
|
OpStore %j %int_0
|
|
OpBranch %218
|
|
%218 = OpLabel
|
|
OpLoopMerge %219 %220 None
|
|
OpBranch %221
|
|
%221 = OpLabel
|
|
%222 = OpLoad %int %j
|
|
%223 = OpSLessThan %bool %222 %int_8
|
|
OpSelectionMerge %224 None
|
|
OpBranchConditional %223 %225 %226
|
|
%225 = OpLabel
|
|
OpBranch %224
|
|
%226 = OpLabel
|
|
OpBranch %219
|
|
%224 = OpLabel
|
|
%227 = OpLoad %int %j
|
|
%228 = OpLoad %int %i
|
|
%229 = OpIMul %int %227 %int_2
|
|
%230 = OpIMul %int %228 %int_2
|
|
%231 = OpIMul %int %230 %int_16
|
|
%232 = OpIAdd %int %229 %231
|
|
%233 = OpAccessChain %_ptr_Private_int %map %232
|
|
%234 = OpLoad %int %233
|
|
%235 = OpIEqual %bool %234 %int_0
|
|
OpSelectionMerge %236 None
|
|
OpBranchConditional %235 %237 %236
|
|
%237 = OpLabel
|
|
%238 = OpLoad %int %j
|
|
%239 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%240 = OpIMul %int %238 %int_2
|
|
OpStore %239 %240
|
|
%241 = OpLoad %int %i
|
|
%242 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%243 = OpIMul %int %241 %int_2
|
|
OpStore %242 %243
|
|
OpStore %canwalk %true
|
|
OpBranch %236
|
|
%236 = OpLabel
|
|
OpBranch %220
|
|
%220 = OpLabel
|
|
%244 = OpLoad %int %j
|
|
%245 = OpIAdd %int %244 %int_1
|
|
OpStore %j %245
|
|
OpBranch %218
|
|
%219 = OpLabel
|
|
OpBranch %210
|
|
%210 = OpLabel
|
|
%246 = OpLoad %int %i
|
|
%247 = OpIAdd %int %246 %int_1
|
|
OpStore %i %247
|
|
OpBranch %208
|
|
%209 = OpLabel
|
|
%248 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%249 = OpLoad %int %248
|
|
%250 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%251 = OpLoad %int %250
|
|
%252 = OpIMul %int %251 %int_16
|
|
%253 = OpIAdd %int %249 %252
|
|
%254 = OpAccessChain %_ptr_Private_int %map %253
|
|
OpStore %254 %int_1
|
|
OpBranch %204
|
|
%206 = OpLabel
|
|
%255 = OpLoad %int %v
|
|
%256 = OpLoad %int %directions
|
|
%257 = OpSMod %int %255 %256
|
|
OpStore %d %257
|
|
%258 = OpLoad %int %directions
|
|
%259 = OpLoad %int %v
|
|
%260 = OpIAdd %int %259 %258
|
|
OpStore %v %260
|
|
%261 = OpLoad %int %d
|
|
%262 = OpSGreaterThanEqual %bool %261 %int_0
|
|
OpStore %x_228_phi %262
|
|
OpSelectionMerge %263 None
|
|
OpBranchConditional %262 %264 %263
|
|
%264 = OpLabel
|
|
%265 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%266 = OpLoad %int %265
|
|
%267 = OpSGreaterThan %bool %266 %int_0
|
|
OpStore %x_227 %267
|
|
%268 = OpLoad %bool %x_227
|
|
OpStore %x_228_phi %268
|
|
OpBranch %263
|
|
%263 = OpLabel
|
|
%269 = OpLoad %bool %x_228_phi
|
|
OpStore %x_241_phi %269
|
|
OpSelectionMerge %270 None
|
|
OpBranchConditional %269 %271 %270
|
|
%271 = OpLabel
|
|
%272 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%273 = OpLoad %int %272
|
|
%274 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%275 = OpLoad %int %274
|
|
%276 = OpISub %int %273 %int_2
|
|
%277 = OpIMul %int %275 %int_16
|
|
%278 = OpIAdd %int %276 %277
|
|
%279 = OpAccessChain %_ptr_Private_int %map %278
|
|
%280 = OpLoad %int %279
|
|
%281 = OpIEqual %bool %280 %int_0
|
|
OpStore %x_240 %281
|
|
%282 = OpLoad %bool %x_240
|
|
OpStore %x_241_phi %282
|
|
OpBranch %270
|
|
%270 = OpLabel
|
|
%283 = OpLoad %bool %x_241_phi
|
|
OpSelectionMerge %284 None
|
|
OpBranchConditional %283 %285 %284
|
|
%285 = OpLabel
|
|
%286 = OpLoad %int %d
|
|
%287 = OpISub %int %286 %int_1
|
|
OpStore %d %287
|
|
%288 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%289 = OpLoad %int %288
|
|
%290 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%291 = OpLoad %int %290
|
|
%292 = OpIMul %int %291 %int_16
|
|
%293 = OpIAdd %int %289 %292
|
|
%294 = OpAccessChain %_ptr_Private_int %map %293
|
|
OpStore %294 %int_1
|
|
%295 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%296 = OpLoad %int %295
|
|
%297 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%298 = OpLoad %int %297
|
|
%299 = OpISub %int %296 %int_1
|
|
%300 = OpIMul %int %298 %int_16
|
|
%301 = OpIAdd %int %299 %300
|
|
%302 = OpAccessChain %_ptr_Private_int %map %301
|
|
OpStore %302 %int_1
|
|
%303 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%304 = OpLoad %int %303
|
|
%305 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%306 = OpLoad %int %305
|
|
%307 = OpISub %int %304 %int_2
|
|
%308 = OpIMul %int %306 %int_16
|
|
%309 = OpIAdd %int %307 %308
|
|
%310 = OpAccessChain %_ptr_Private_int %map %309
|
|
OpStore %310 %int_1
|
|
%311 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%312 = OpLoad %int %311
|
|
%313 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%314 = OpISub %int %312 %int_2
|
|
OpStore %313 %314
|
|
OpBranch %284
|
|
%284 = OpLabel
|
|
%315 = OpLoad %int %d
|
|
%316 = OpSGreaterThanEqual %bool %315 %int_0
|
|
OpStore %x_280_phi %316
|
|
OpSelectionMerge %317 None
|
|
OpBranchConditional %316 %318 %317
|
|
%318 = OpLabel
|
|
%319 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%320 = OpLoad %int %319
|
|
%321 = OpSGreaterThan %bool %320 %int_0
|
|
OpStore %x_279 %321
|
|
%322 = OpLoad %bool %x_279
|
|
OpStore %x_280_phi %322
|
|
OpBranch %317
|
|
%317 = OpLabel
|
|
%323 = OpLoad %bool %x_280_phi
|
|
OpStore %x_293_phi %323
|
|
OpSelectionMerge %324 None
|
|
OpBranchConditional %323 %325 %324
|
|
%325 = OpLabel
|
|
%326 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%327 = OpLoad %int %326
|
|
%328 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%329 = OpLoad %int %328
|
|
%330 = OpISub %int %329 %int_2
|
|
%331 = OpIMul %int %330 %int_16
|
|
%332 = OpIAdd %int %327 %331
|
|
%333 = OpAccessChain %_ptr_Private_int %map %332
|
|
%334 = OpLoad %int %333
|
|
%335 = OpIEqual %bool %334 %int_0
|
|
OpStore %x_292 %335
|
|
%336 = OpLoad %bool %x_292
|
|
OpStore %x_293_phi %336
|
|
OpBranch %324
|
|
%324 = OpLabel
|
|
%337 = OpLoad %bool %x_293_phi
|
|
OpSelectionMerge %338 None
|
|
OpBranchConditional %337 %339 %338
|
|
%339 = OpLabel
|
|
%340 = OpLoad %int %d
|
|
%341 = OpISub %int %340 %int_1
|
|
OpStore %d %341
|
|
%342 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%343 = OpLoad %int %342
|
|
%344 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%345 = OpLoad %int %344
|
|
%346 = OpIMul %int %345 %int_16
|
|
%347 = OpIAdd %int %343 %346
|
|
%348 = OpAccessChain %_ptr_Private_int %map %347
|
|
OpStore %348 %int_1
|
|
%349 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%350 = OpLoad %int %349
|
|
%351 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%352 = OpLoad %int %351
|
|
%353 = OpISub %int %352 %int_1
|
|
%354 = OpIMul %int %353 %int_16
|
|
%355 = OpIAdd %int %350 %354
|
|
%356 = OpAccessChain %_ptr_Private_int %map %355
|
|
OpStore %356 %int_1
|
|
%357 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%358 = OpLoad %int %357
|
|
%359 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%360 = OpLoad %int %359
|
|
%361 = OpISub %int %360 %int_2
|
|
%362 = OpIMul %int %361 %int_16
|
|
%363 = OpIAdd %int %358 %362
|
|
%364 = OpAccessChain %_ptr_Private_int %map %363
|
|
OpStore %364 %int_1
|
|
%365 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%366 = OpLoad %int %365
|
|
%367 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%368 = OpISub %int %366 %int_2
|
|
OpStore %367 %368
|
|
OpBranch %338
|
|
%338 = OpLabel
|
|
%369 = OpLoad %int %d
|
|
%370 = OpSGreaterThanEqual %bool %369 %int_0
|
|
OpStore %x_332_phi %370
|
|
OpSelectionMerge %371 None
|
|
OpBranchConditional %370 %372 %371
|
|
%372 = OpLabel
|
|
%373 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%374 = OpLoad %int %373
|
|
%375 = OpSLessThan %bool %374 %int_14
|
|
OpStore %x_331 %375
|
|
%376 = OpLoad %bool %x_331
|
|
OpStore %x_332_phi %376
|
|
OpBranch %371
|
|
%371 = OpLabel
|
|
%377 = OpLoad %bool %x_332_phi
|
|
OpStore %x_345_phi %377
|
|
OpSelectionMerge %378 None
|
|
OpBranchConditional %377 %379 %378
|
|
%379 = OpLabel
|
|
%380 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%381 = OpLoad %int %380
|
|
%382 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%383 = OpLoad %int %382
|
|
%384 = OpIAdd %int %381 %int_2
|
|
%385 = OpIMul %int %383 %int_16
|
|
%386 = OpIAdd %int %384 %385
|
|
%387 = OpAccessChain %_ptr_Private_int %map %386
|
|
%388 = OpLoad %int %387
|
|
%389 = OpIEqual %bool %388 %int_0
|
|
OpStore %x_344 %389
|
|
%390 = OpLoad %bool %x_344
|
|
OpStore %x_345_phi %390
|
|
OpBranch %378
|
|
%378 = OpLabel
|
|
%391 = OpLoad %bool %x_345_phi
|
|
OpSelectionMerge %392 None
|
|
OpBranchConditional %391 %393 %392
|
|
%393 = OpLabel
|
|
%394 = OpLoad %int %d
|
|
%395 = OpISub %int %394 %int_1
|
|
OpStore %d %395
|
|
%396 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%397 = OpLoad %int %396
|
|
%398 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%399 = OpLoad %int %398
|
|
%400 = OpIMul %int %399 %int_16
|
|
%401 = OpIAdd %int %397 %400
|
|
%402 = OpAccessChain %_ptr_Private_int %map %401
|
|
OpStore %402 %int_1
|
|
%403 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%404 = OpLoad %int %403
|
|
%405 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%406 = OpLoad %int %405
|
|
%407 = OpIAdd %int %404 %int_1
|
|
%408 = OpIMul %int %406 %int_16
|
|
%409 = OpIAdd %int %407 %408
|
|
%410 = OpAccessChain %_ptr_Private_int %map %409
|
|
OpStore %410 %int_1
|
|
%411 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%412 = OpLoad %int %411
|
|
%413 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%414 = OpLoad %int %413
|
|
%415 = OpIAdd %int %412 %int_2
|
|
%416 = OpIMul %int %414 %int_16
|
|
%417 = OpIAdd %int %415 %416
|
|
%418 = OpAccessChain %_ptr_Private_int %map %417
|
|
OpStore %418 %int_1
|
|
%419 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%420 = OpLoad %int %419
|
|
%421 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%422 = OpIAdd %int %420 %int_2
|
|
OpStore %421 %422
|
|
OpBranch %392
|
|
%392 = OpLabel
|
|
%423 = OpLoad %int %d
|
|
%424 = OpSGreaterThanEqual %bool %423 %int_0
|
|
OpStore %x_384_phi %424
|
|
OpSelectionMerge %425 None
|
|
OpBranchConditional %424 %426 %425
|
|
%426 = OpLabel
|
|
%427 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%428 = OpLoad %int %427
|
|
%429 = OpSLessThan %bool %428 %int_14
|
|
OpStore %x_383 %429
|
|
%430 = OpLoad %bool %x_383
|
|
OpStore %x_384_phi %430
|
|
OpBranch %425
|
|
%425 = OpLabel
|
|
%431 = OpLoad %bool %x_384_phi
|
|
OpStore %x_397_phi %431
|
|
OpSelectionMerge %432 None
|
|
OpBranchConditional %431 %433 %432
|
|
%433 = OpLabel
|
|
%434 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%435 = OpLoad %int %434
|
|
%436 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%437 = OpLoad %int %436
|
|
%438 = OpIAdd %int %437 %int_2
|
|
%439 = OpIMul %int %438 %int_16
|
|
%440 = OpIAdd %int %435 %439
|
|
%441 = OpAccessChain %_ptr_Private_int %map %440
|
|
%442 = OpLoad %int %441
|
|
%443 = OpIEqual %bool %442 %int_0
|
|
OpStore %x_396 %443
|
|
%444 = OpLoad %bool %x_396
|
|
OpStore %x_397_phi %444
|
|
OpBranch %432
|
|
%432 = OpLabel
|
|
%445 = OpLoad %bool %x_397_phi
|
|
OpSelectionMerge %446 None
|
|
OpBranchConditional %445 %447 %446
|
|
%447 = OpLabel
|
|
%448 = OpLoad %int %d
|
|
%449 = OpISub %int %448 %int_1
|
|
OpStore %d %449
|
|
%450 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%451 = OpLoad %int %450
|
|
%452 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%453 = OpLoad %int %452
|
|
%454 = OpIMul %int %453 %int_16
|
|
%455 = OpIAdd %int %451 %454
|
|
%456 = OpAccessChain %_ptr_Private_int %map %455
|
|
OpStore %456 %int_1
|
|
%457 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%458 = OpLoad %int %457
|
|
%459 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%460 = OpLoad %int %459
|
|
%461 = OpIAdd %int %460 %int_1
|
|
%462 = OpIMul %int %461 %int_16
|
|
%463 = OpIAdd %int %458 %462
|
|
%464 = OpAccessChain %_ptr_Private_int %map %463
|
|
OpStore %464 %int_1
|
|
%465 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%466 = OpLoad %int %465
|
|
%467 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%468 = OpLoad %int %467
|
|
%469 = OpIAdd %int %468 %int_2
|
|
%470 = OpIMul %int %469 %int_16
|
|
%471 = OpIAdd %int %466 %470
|
|
%472 = OpAccessChain %_ptr_Private_int %map %471
|
|
OpStore %472 %int_1
|
|
%473 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%474 = OpLoad %int %473
|
|
%475 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%476 = OpIAdd %int %474 %int_2
|
|
OpStore %475 %476
|
|
OpBranch %446
|
|
%446 = OpLabel
|
|
OpBranch %204
|
|
%204 = OpLabel
|
|
%477 = OpAccessChain %_ptr_Function_int %ipos %uint_1
|
|
%478 = OpLoad %int %477
|
|
%479 = OpAccessChain %_ptr_Function_int %ipos %uint_0
|
|
%480 = OpLoad %int %479
|
|
%481 = OpIMul %int %478 %int_16
|
|
%482 = OpIAdd %int %481 %480
|
|
%483 = OpAccessChain %_ptr_Private_int %map %482
|
|
%484 = OpLoad %int %483
|
|
%485 = OpIEqual %bool %484 %int_1
|
|
OpSelectionMerge %486 None
|
|
OpBranchConditional %485 %487 %486
|
|
%487 = OpLabel
|
|
OpStore %x_GLF_color %489
|
|
OpReturn
|
|
%486 = OpLabel
|
|
OpBranch %87
|
|
%87 = OpLabel
|
|
%490 = OpLoad %bool %canwalk
|
|
OpBranchConditional %490 %85 %86
|
|
%86 = OpLabel
|
|
OpStore %x_GLF_color %492
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%tint_symbol_3 = OpFunction %void None %493
|
|
%tint_symbol_1 = OpFunctionParameter %main_out
|
|
%497 = OpLabel
|
|
%498 = OpCompositeExtract %v4float %tint_symbol_1 0
|
|
OpStore %tint_symbol_2 %498
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %22
|
|
%500 = OpLabel
|
|
%501 = OpLoad %v4float %tint_symbol
|
|
OpStore %gl_FragCoord %501
|
|
%502 = OpFunctionCall %void %main_1
|
|
%504 = OpLoad %v4float %x_GLF_color
|
|
%505 = OpCompositeConstruct %main_out %504
|
|
%503 = OpFunctionCall %void %tint_symbol_3 %505
|
|
OpReturn
|
|
OpFunctionEnd
|