mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-06 12:15:43 +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>
780 lines
30 KiB
Plaintext
780 lines
30 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 517
|
|
; 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 %x_60 "x_60"
|
|
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_110 "x_110"
|
|
OpName %x_130 "x_130"
|
|
OpName %x_150 "x_150"
|
|
OpName %x_171 "x_171"
|
|
OpName %x_111_phi "x_111_phi"
|
|
OpName %x_131_phi "x_131_phi"
|
|
OpName %x_151_phi "x_151_phi"
|
|
OpName %x_172_phi "x_172_phi"
|
|
OpName %x_237 "x_237"
|
|
OpName %x_250 "x_250"
|
|
OpName %x_289 "x_289"
|
|
OpName %x_302 "x_302"
|
|
OpName %x_341 "x_341"
|
|
OpName %x_354 "x_354"
|
|
OpName %x_393 "x_393"
|
|
OpName %x_406 "x_406"
|
|
OpName %x_238_phi "x_238_phi"
|
|
OpName %x_251_phi "x_251_phi"
|
|
OpName %x_290_phi "x_290_phi"
|
|
OpName %x_303_phi "x_303_phi"
|
|
OpName %x_342_phi "x_342_phi"
|
|
OpName %x_355_phi "x_355_phi"
|
|
OpName %x_394_phi "x_394_phi"
|
|
OpName %x_407_phi "x_407_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
|
|
%mat2v4float = OpTypeMatrix %v4float 2
|
|
%float_0 = OpConstant %float 0
|
|
%20 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
|
%21 = OpConstantComposite %mat2v4float %20 %20
|
|
%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float
|
|
%x_60 = OpVariable %_ptr_Private_mat2v4float Private %21
|
|
%_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
|
|
%28 = OpTypeFunction %void
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
%34 = OpConstantNull %v2float
|
|
%v2int = OpTypeVector %int 2
|
|
%_ptr_Function_v2int = OpTypePointer Function %v2int
|
|
%38 = OpConstantNull %v2int
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
%41 = OpConstantNull %int
|
|
%bool = OpTypeBool
|
|
%_ptr_Function_bool = OpTypePointer Function %bool
|
|
%46 = OpConstantNull %bool
|
|
%uint_0 = OpConstant %uint 0
|
|
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
|
|
%int_256 = OpConstant %int 256
|
|
%int_14 = OpConstant %int 14
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
%uint_1 = OpConstant %uint 1
|
|
%float_16 = OpConstant %float 16
|
|
%int_0 = OpConstant %int 0
|
|
%_ptr_Private_int = OpTypePointer Private %int
|
|
%int_1 = OpConstant %int 1
|
|
%92 = OpConstantComposite %v2int %int_0 %int_0
|
|
%true = OpConstantTrue %bool
|
|
%int_2 = OpConstant %int 2
|
|
%int_16 = OpConstant %int 16
|
|
%false = OpConstantFalse %bool
|
|
%int_8 = OpConstant %int 8
|
|
%float_1 = OpConstant %float 1
|
|
%501 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
|
%503 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
|
|
%main_out = OpTypeStruct %v4float
|
|
%504 = OpTypeFunction %void %main_out
|
|
%main_1 = OpFunction %void None %28
|
|
%31 = OpLabel
|
|
%pos = OpVariable %_ptr_Function_v2float Function %34
|
|
%ipos = OpVariable %_ptr_Function_v2int Function %38
|
|
%i = OpVariable %_ptr_Function_int Function %41
|
|
%p = OpVariable %_ptr_Function_v2int Function %38
|
|
%canwalk = OpVariable %_ptr_Function_bool Function %46
|
|
%v = OpVariable %_ptr_Function_int Function %41
|
|
%directions = OpVariable %_ptr_Function_int Function %41
|
|
%j = OpVariable %_ptr_Function_int Function %41
|
|
%d = OpVariable %_ptr_Function_int Function %41
|
|
%x_110 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_130 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_150 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_171 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_111_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_131_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_151_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_172_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_237 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_250 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_289 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_302 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_341 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_354 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_393 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_406 = OpVariable %_ptr_Function_bool Function %46
|
|
%x_238_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_251_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_290_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_303_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_342_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_355_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_394_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%x_407_phi = OpVariable %_ptr_Function_bool Function %46
|
|
%51 = OpLoad %v4float %gl_FragCoord
|
|
%54 = OpAccessChain %_ptr_Uniform_v2float %x_7 %uint_0
|
|
%55 = OpLoad %v2float %54
|
|
%59 = OpISub %int %int_256 %int_14
|
|
%56 = OpSNegate %int %59
|
|
%60 = OpCompositeExtract %float %51 0
|
|
%61 = OpCompositeExtract %float %51 1
|
|
%62 = OpCompositeConstruct %v2float %60 %61
|
|
%63 = OpFDiv %v2float %62 %55
|
|
OpStore %pos %63
|
|
%65 = OpAccessChain %_ptr_Function_float %pos %uint_0
|
|
%66 = OpLoad %float %65
|
|
%68 = OpAccessChain %_ptr_Function_float %pos %uint_1
|
|
%69 = OpLoad %float %68
|
|
%72 = OpFMul %float %66 %float_16
|
|
%70 = OpConvertFToS %int %72
|
|
%74 = OpFMul %float %69 %float_16
|
|
%73 = OpConvertFToS %int %74
|
|
%75 = OpCompositeConstruct %v2int %70 %73
|
|
OpStore %ipos %75
|
|
OpStore %i %int_0
|
|
OpBranch %77
|
|
%77 = OpLabel
|
|
OpLoopMerge %78 %79 None
|
|
OpBranch %80
|
|
%80 = OpLabel
|
|
%81 = OpLoad %int %i
|
|
%82 = OpSLessThan %bool %81 %int_256
|
|
OpSelectionMerge %83 None
|
|
OpBranchConditional %82 %84 %85
|
|
%84 = OpLabel
|
|
OpBranch %83
|
|
%85 = OpLabel
|
|
OpBranch %78
|
|
%83 = OpLabel
|
|
%86 = OpLoad %int %i
|
|
%88 = OpAccessChain %_ptr_Private_int %map %86
|
|
OpStore %88 %int_0
|
|
OpBranch %79
|
|
%79 = OpLabel
|
|
%89 = OpLoad %int %i
|
|
%91 = OpIAdd %int %89 %int_1
|
|
OpStore %i %91
|
|
OpBranch %77
|
|
%78 = OpLabel
|
|
OpStore %p %92
|
|
OpStore %canwalk %true
|
|
OpStore %v %int_0
|
|
OpBranch %94
|
|
%94 = OpLabel
|
|
OpLoopMerge %95 %96 None
|
|
OpBranch %97
|
|
%97 = OpLabel
|
|
%106 = OpLoad %int %v
|
|
%107 = OpIAdd %int %106 %int_1
|
|
OpStore %v %107
|
|
OpStore %directions %int_0
|
|
%108 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%109 = OpLoad %int %108
|
|
%110 = OpSGreaterThan %bool %109 %int_0
|
|
OpStore %x_111_phi %110
|
|
OpSelectionMerge %111 None
|
|
OpBranchConditional %110 %112 %111
|
|
%112 = OpLabel
|
|
%113 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%114 = OpLoad %int %113
|
|
%115 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%116 = OpLoad %int %115
|
|
%118 = OpISub %int %114 %int_2
|
|
%120 = OpIMul %int %116 %int_16
|
|
%121 = OpIAdd %int %118 %120
|
|
%122 = OpAccessChain %_ptr_Private_int %map %121
|
|
%123 = OpLoad %int %122
|
|
%124 = OpIEqual %bool %123 %int_0
|
|
OpStore %x_110 %124
|
|
%125 = OpLoad %bool %x_110
|
|
OpStore %x_111_phi %125
|
|
OpBranch %111
|
|
%111 = OpLabel
|
|
%126 = OpLoad %bool %x_111_phi
|
|
OpSelectionMerge %127 None
|
|
OpBranchConditional %126 %128 %127
|
|
%128 = OpLabel
|
|
%129 = OpLoad %int %directions
|
|
%130 = OpIAdd %int %129 %int_1
|
|
OpStore %directions %130
|
|
OpBranch %127
|
|
%127 = OpLabel
|
|
%131 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%132 = OpLoad %int %131
|
|
%133 = OpSGreaterThan %bool %132 %int_0
|
|
OpStore %x_131_phi %133
|
|
OpSelectionMerge %134 None
|
|
OpBranchConditional %133 %135 %134
|
|
%135 = OpLabel
|
|
%136 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%137 = OpLoad %int %136
|
|
%138 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%139 = OpLoad %int %138
|
|
%140 = OpISub %int %139 %int_2
|
|
%141 = OpIMul %int %140 %int_16
|
|
%142 = OpIAdd %int %137 %141
|
|
%143 = OpAccessChain %_ptr_Private_int %map %142
|
|
%144 = OpLoad %int %143
|
|
%145 = OpIEqual %bool %144 %int_0
|
|
OpStore %x_130 %145
|
|
%146 = OpLoad %bool %x_130
|
|
OpStore %x_131_phi %146
|
|
OpBranch %134
|
|
%134 = OpLabel
|
|
%147 = OpLoad %bool %x_131_phi
|
|
OpSelectionMerge %148 None
|
|
OpBranchConditional %147 %149 %148
|
|
%149 = OpLabel
|
|
%150 = OpLoad %int %directions
|
|
%151 = OpIAdd %int %150 %int_1
|
|
OpStore %directions %151
|
|
OpBranch %148
|
|
%148 = OpLabel
|
|
%152 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%153 = OpLoad %int %152
|
|
%154 = OpSLessThan %bool %153 %int_14
|
|
OpStore %x_151_phi %154
|
|
OpSelectionMerge %155 None
|
|
OpBranchConditional %154 %156 %155
|
|
%156 = OpLabel
|
|
%157 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%158 = OpLoad %int %157
|
|
%159 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%160 = OpLoad %int %159
|
|
%161 = OpIAdd %int %158 %int_2
|
|
%162 = OpIMul %int %160 %int_16
|
|
%163 = OpIAdd %int %161 %162
|
|
%164 = OpAccessChain %_ptr_Private_int %map %163
|
|
%165 = OpLoad %int %164
|
|
%166 = OpIEqual %bool %165 %int_0
|
|
OpStore %x_150 %166
|
|
%167 = OpLoad %bool %x_150
|
|
OpStore %x_151_phi %167
|
|
OpBranch %155
|
|
%155 = OpLabel
|
|
%168 = OpLoad %bool %x_151_phi
|
|
OpSelectionMerge %169 None
|
|
OpBranchConditional %168 %170 %169
|
|
%170 = OpLabel
|
|
%171 = OpLoad %int %directions
|
|
%172 = OpIAdd %int %171 %int_1
|
|
OpStore %directions %172
|
|
OpBranch %169
|
|
%169 = OpLabel
|
|
%173 = OpISub %int %int_256 %56
|
|
%174 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%175 = OpLoad %int %174
|
|
%176 = OpSLessThan %bool %175 %int_14
|
|
OpStore %x_172_phi %176
|
|
OpSelectionMerge %177 None
|
|
OpBranchConditional %176 %178 %177
|
|
%178 = OpLabel
|
|
%179 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%180 = OpLoad %int %179
|
|
%181 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%182 = OpLoad %int %181
|
|
%183 = OpIAdd %int %182 %int_2
|
|
%184 = OpIMul %int %183 %int_16
|
|
%185 = OpIAdd %int %180 %184
|
|
%186 = OpAccessChain %_ptr_Private_int %map %185
|
|
%187 = OpLoad %int %186
|
|
%188 = OpIEqual %bool %187 %int_0
|
|
OpStore %x_171 %188
|
|
%189 = OpLoad %bool %x_171
|
|
OpStore %x_172_phi %189
|
|
OpBranch %177
|
|
%177 = OpLabel
|
|
%190 = OpLoad %bool %x_172_phi
|
|
OpSelectionMerge %191 None
|
|
OpBranchConditional %190 %192 %191
|
|
%192 = OpLabel
|
|
%193 = OpLoad %int %directions
|
|
%194 = OpIAdd %int %193 %int_1
|
|
OpStore %directions %194
|
|
OpBranch %191
|
|
%191 = OpLabel
|
|
%211 = OpLoad %int %directions
|
|
%212 = OpIEqual %bool %211 %int_0
|
|
OpSelectionMerge %213 None
|
|
OpBranchConditional %212 %214 %215
|
|
%214 = OpLabel
|
|
OpStore %canwalk %false
|
|
OpStore %i %int_0
|
|
OpBranch %217
|
|
%217 = OpLabel
|
|
OpLoopMerge %218 %219 None
|
|
OpBranch %220
|
|
%220 = OpLabel
|
|
%221 = OpLoad %int %i
|
|
%223 = OpSLessThan %bool %221 %int_8
|
|
OpSelectionMerge %224 None
|
|
OpBranchConditional %223 %225 %226
|
|
%225 = OpLabel
|
|
OpBranch %224
|
|
%226 = OpLabel
|
|
OpBranch %218
|
|
%224 = OpLabel
|
|
OpStore %j %int_0
|
|
%227 = OpISub %int %173 %221
|
|
OpStore %x_60 %21
|
|
OpSelectionMerge %228 None
|
|
OpBranchConditional %false %229 %228
|
|
%229 = OpLabel
|
|
OpBranch %219
|
|
%228 = OpLabel
|
|
OpBranch %230
|
|
%230 = OpLabel
|
|
OpLoopMerge %231 %232 None
|
|
OpBranch %233
|
|
%233 = OpLabel
|
|
%234 = OpLoad %int %j
|
|
%235 = OpSLessThan %bool %234 %int_8
|
|
OpSelectionMerge %236 None
|
|
OpBranchConditional %235 %237 %238
|
|
%237 = OpLabel
|
|
OpBranch %236
|
|
%238 = OpLabel
|
|
OpBranch %231
|
|
%236 = OpLabel
|
|
%239 = OpLoad %int %j
|
|
%240 = OpLoad %int %i
|
|
%241 = OpIMul %int %239 %int_2
|
|
%242 = OpIMul %int %240 %int_2
|
|
%243 = OpIMul %int %242 %int_16
|
|
%244 = OpIAdd %int %241 %243
|
|
%245 = OpAccessChain %_ptr_Private_int %map %244
|
|
%246 = OpLoad %int %245
|
|
%247 = OpIEqual %bool %246 %int_0
|
|
OpSelectionMerge %248 None
|
|
OpBranchConditional %247 %249 %248
|
|
%249 = OpLabel
|
|
%250 = OpLoad %int %j
|
|
%251 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%252 = OpIMul %int %250 %int_2
|
|
OpStore %251 %252
|
|
%253 = OpLoad %int %i
|
|
%254 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%255 = OpIMul %int %253 %int_2
|
|
OpStore %254 %255
|
|
OpStore %canwalk %true
|
|
OpBranch %248
|
|
%248 = OpLabel
|
|
OpBranch %232
|
|
%232 = OpLabel
|
|
%256 = OpLoad %int %j
|
|
%257 = OpIAdd %int %256 %int_1
|
|
OpStore %j %257
|
|
OpBranch %230
|
|
%231 = OpLabel
|
|
OpBranch %219
|
|
%219 = OpLabel
|
|
%258 = OpLoad %int %i
|
|
%259 = OpIAdd %int %258 %int_1
|
|
OpStore %i %259
|
|
OpBranch %217
|
|
%218 = OpLabel
|
|
%260 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%261 = OpLoad %int %260
|
|
%262 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%263 = OpLoad %int %262
|
|
%264 = OpIMul %int %263 %int_16
|
|
%265 = OpIAdd %int %261 %264
|
|
%266 = OpAccessChain %_ptr_Private_int %map %265
|
|
OpStore %266 %int_1
|
|
OpBranch %213
|
|
%215 = OpLabel
|
|
%267 = OpLoad %int %v
|
|
%268 = OpLoad %int %directions
|
|
%269 = OpSMod %int %267 %268
|
|
OpStore %d %269
|
|
%270 = OpLoad %int %directions
|
|
%271 = OpLoad %int %v
|
|
%272 = OpIAdd %int %271 %270
|
|
OpStore %v %272
|
|
%273 = OpLoad %int %d
|
|
%274 = OpSGreaterThanEqual %bool %273 %int_0
|
|
OpStore %x_238_phi %274
|
|
OpSelectionMerge %275 None
|
|
OpBranchConditional %274 %276 %275
|
|
%276 = OpLabel
|
|
%277 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%278 = OpLoad %int %277
|
|
%279 = OpSGreaterThan %bool %278 %int_0
|
|
OpStore %x_237 %279
|
|
%280 = OpLoad %bool %x_237
|
|
OpStore %x_238_phi %280
|
|
OpBranch %275
|
|
%275 = OpLabel
|
|
%281 = OpLoad %bool %x_238_phi
|
|
OpStore %x_251_phi %281
|
|
OpSelectionMerge %282 None
|
|
OpBranchConditional %281 %283 %282
|
|
%283 = OpLabel
|
|
%284 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%285 = OpLoad %int %284
|
|
%286 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%287 = OpLoad %int %286
|
|
%288 = OpISub %int %285 %int_2
|
|
%289 = OpIMul %int %287 %int_16
|
|
%290 = OpIAdd %int %288 %289
|
|
%291 = OpAccessChain %_ptr_Private_int %map %290
|
|
%292 = OpLoad %int %291
|
|
%293 = OpIEqual %bool %292 %int_0
|
|
OpStore %x_250 %293
|
|
%294 = OpLoad %bool %x_250
|
|
OpStore %x_251_phi %294
|
|
OpBranch %282
|
|
%282 = OpLabel
|
|
%295 = OpLoad %bool %x_251_phi
|
|
OpSelectionMerge %296 None
|
|
OpBranchConditional %295 %297 %296
|
|
%297 = OpLabel
|
|
%298 = OpLoad %int %d
|
|
%299 = OpISub %int %298 %int_1
|
|
OpStore %d %299
|
|
%300 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%301 = OpLoad %int %300
|
|
%302 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%303 = OpLoad %int %302
|
|
%304 = OpIMul %int %303 %int_16
|
|
%305 = OpIAdd %int %301 %304
|
|
%306 = OpAccessChain %_ptr_Private_int %map %305
|
|
OpStore %306 %int_1
|
|
%307 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%308 = OpLoad %int %307
|
|
%309 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%310 = OpLoad %int %309
|
|
%311 = OpISub %int %308 %int_1
|
|
%312 = OpIMul %int %310 %int_16
|
|
%313 = OpIAdd %int %311 %312
|
|
%314 = OpAccessChain %_ptr_Private_int %map %313
|
|
OpStore %314 %int_1
|
|
%315 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%316 = OpLoad %int %315
|
|
%317 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%318 = OpLoad %int %317
|
|
%319 = OpISub %int %316 %int_2
|
|
%320 = OpIMul %int %318 %int_16
|
|
%321 = OpIAdd %int %319 %320
|
|
%322 = OpAccessChain %_ptr_Private_int %map %321
|
|
OpStore %322 %int_1
|
|
%323 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%324 = OpLoad %int %323
|
|
%325 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%326 = OpISub %int %324 %int_2
|
|
OpStore %325 %326
|
|
OpBranch %296
|
|
%296 = OpLabel
|
|
%327 = OpLoad %int %d
|
|
%328 = OpSGreaterThanEqual %bool %327 %int_0
|
|
OpStore %x_290_phi %328
|
|
OpSelectionMerge %329 None
|
|
OpBranchConditional %328 %330 %329
|
|
%330 = OpLabel
|
|
%331 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%332 = OpLoad %int %331
|
|
%333 = OpSGreaterThan %bool %332 %int_0
|
|
OpStore %x_289 %333
|
|
%334 = OpLoad %bool %x_289
|
|
OpStore %x_290_phi %334
|
|
OpBranch %329
|
|
%329 = OpLabel
|
|
%335 = OpLoad %bool %x_290_phi
|
|
OpStore %x_303_phi %335
|
|
OpSelectionMerge %336 None
|
|
OpBranchConditional %335 %337 %336
|
|
%337 = OpLabel
|
|
%338 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%339 = OpLoad %int %338
|
|
%340 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%341 = OpLoad %int %340
|
|
%342 = OpISub %int %341 %int_2
|
|
%343 = OpIMul %int %342 %int_16
|
|
%344 = OpIAdd %int %339 %343
|
|
%345 = OpAccessChain %_ptr_Private_int %map %344
|
|
%346 = OpLoad %int %345
|
|
%347 = OpIEqual %bool %346 %int_0
|
|
OpStore %x_302 %347
|
|
%348 = OpLoad %bool %x_302
|
|
OpStore %x_303_phi %348
|
|
OpBranch %336
|
|
%336 = OpLabel
|
|
%349 = OpLoad %bool %x_303_phi
|
|
OpSelectionMerge %350 None
|
|
OpBranchConditional %349 %351 %350
|
|
%351 = OpLabel
|
|
%352 = OpLoad %int %d
|
|
%353 = OpISub %int %352 %int_1
|
|
OpStore %d %353
|
|
%354 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%355 = OpLoad %int %354
|
|
%356 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%357 = OpLoad %int %356
|
|
%358 = OpIMul %int %357 %int_16
|
|
%359 = OpIAdd %int %355 %358
|
|
%360 = OpAccessChain %_ptr_Private_int %map %359
|
|
OpStore %360 %int_1
|
|
%361 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%362 = OpLoad %int %361
|
|
%363 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%364 = OpLoad %int %363
|
|
%365 = OpISub %int %364 %int_1
|
|
%366 = OpIMul %int %365 %int_16
|
|
%367 = OpIAdd %int %362 %366
|
|
%368 = OpAccessChain %_ptr_Private_int %map %367
|
|
OpStore %368 %int_1
|
|
%369 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%370 = OpLoad %int %369
|
|
%371 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%372 = OpLoad %int %371
|
|
%373 = OpISub %int %372 %int_2
|
|
%374 = OpIMul %int %373 %int_16
|
|
%375 = OpIAdd %int %370 %374
|
|
%376 = OpAccessChain %_ptr_Private_int %map %375
|
|
OpStore %376 %int_1
|
|
%377 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%378 = OpLoad %int %377
|
|
%379 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%380 = OpISub %int %378 %int_2
|
|
OpStore %379 %380
|
|
OpBranch %350
|
|
%350 = OpLabel
|
|
%381 = OpLoad %int %d
|
|
%382 = OpSGreaterThanEqual %bool %381 %int_0
|
|
OpStore %x_342_phi %382
|
|
OpSelectionMerge %383 None
|
|
OpBranchConditional %382 %384 %383
|
|
%384 = OpLabel
|
|
%385 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%386 = OpLoad %int %385
|
|
%387 = OpSLessThan %bool %386 %int_14
|
|
OpStore %x_341 %387
|
|
%388 = OpLoad %bool %x_341
|
|
OpStore %x_342_phi %388
|
|
OpBranch %383
|
|
%383 = OpLabel
|
|
%389 = OpLoad %bool %x_342_phi
|
|
OpStore %x_355_phi %389
|
|
OpSelectionMerge %390 None
|
|
OpBranchConditional %389 %391 %390
|
|
%391 = OpLabel
|
|
%392 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%393 = OpLoad %int %392
|
|
%394 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%395 = OpLoad %int %394
|
|
%396 = OpIAdd %int %393 %int_2
|
|
%397 = OpIMul %int %395 %int_16
|
|
%398 = OpIAdd %int %396 %397
|
|
%399 = OpAccessChain %_ptr_Private_int %map %398
|
|
%400 = OpLoad %int %399
|
|
%401 = OpIEqual %bool %400 %int_0
|
|
OpStore %x_354 %401
|
|
%402 = OpLoad %bool %x_354
|
|
OpStore %x_355_phi %402
|
|
OpBranch %390
|
|
%390 = OpLabel
|
|
%403 = OpLoad %bool %x_355_phi
|
|
OpSelectionMerge %404 None
|
|
OpBranchConditional %403 %405 %404
|
|
%405 = OpLabel
|
|
%406 = OpLoad %int %d
|
|
%407 = OpISub %int %406 %int_1
|
|
OpStore %d %407
|
|
%408 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%409 = OpLoad %int %408
|
|
%410 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%411 = OpLoad %int %410
|
|
%412 = OpIMul %int %411 %int_16
|
|
%413 = OpIAdd %int %409 %412
|
|
%414 = OpAccessChain %_ptr_Private_int %map %413
|
|
OpStore %414 %int_1
|
|
%415 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%416 = OpLoad %int %415
|
|
%417 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%418 = OpLoad %int %417
|
|
%419 = OpIAdd %int %416 %int_1
|
|
%420 = OpIMul %int %418 %int_16
|
|
%421 = OpIAdd %int %419 %420
|
|
%422 = OpAccessChain %_ptr_Private_int %map %421
|
|
OpStore %422 %int_1
|
|
%423 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%424 = OpLoad %int %423
|
|
%425 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%426 = OpLoad %int %425
|
|
%427 = OpIAdd %int %424 %int_2
|
|
%428 = OpIMul %int %426 %int_16
|
|
%429 = OpIAdd %int %427 %428
|
|
%430 = OpAccessChain %_ptr_Private_int %map %429
|
|
OpStore %430 %int_1
|
|
%431 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%432 = OpLoad %int %431
|
|
%433 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%434 = OpIAdd %int %432 %int_2
|
|
OpStore %433 %434
|
|
OpBranch %404
|
|
%404 = OpLabel
|
|
%435 = OpLoad %int %d
|
|
%436 = OpSGreaterThanEqual %bool %435 %int_0
|
|
OpStore %x_394_phi %436
|
|
OpSelectionMerge %437 None
|
|
OpBranchConditional %436 %438 %437
|
|
%438 = OpLabel
|
|
%439 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%440 = OpLoad %int %439
|
|
%441 = OpSLessThan %bool %440 %int_14
|
|
OpStore %x_393 %441
|
|
%442 = OpLoad %bool %x_393
|
|
OpStore %x_394_phi %442
|
|
OpBranch %437
|
|
%437 = OpLabel
|
|
%443 = OpLoad %bool %x_394_phi
|
|
OpStore %x_407_phi %443
|
|
OpSelectionMerge %444 None
|
|
OpBranchConditional %443 %445 %444
|
|
%445 = OpLabel
|
|
%446 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%447 = OpLoad %int %446
|
|
%448 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%449 = OpLoad %int %448
|
|
%450 = OpIAdd %int %449 %int_2
|
|
%451 = OpIMul %int %450 %int_16
|
|
%452 = OpIAdd %int %447 %451
|
|
%453 = OpAccessChain %_ptr_Private_int %map %452
|
|
%454 = OpLoad %int %453
|
|
%455 = OpIEqual %bool %454 %int_0
|
|
OpStore %x_406 %455
|
|
%456 = OpLoad %bool %x_406
|
|
OpStore %x_407_phi %456
|
|
OpBranch %444
|
|
%444 = OpLabel
|
|
%457 = OpLoad %bool %x_407_phi
|
|
OpSelectionMerge %458 None
|
|
OpBranchConditional %457 %459 %458
|
|
%459 = OpLabel
|
|
%460 = OpLoad %int %d
|
|
%461 = OpISub %int %460 %int_1
|
|
OpStore %d %461
|
|
%462 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%463 = OpLoad %int %462
|
|
%464 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%465 = OpLoad %int %464
|
|
%466 = OpIMul %int %465 %int_16
|
|
%467 = OpIAdd %int %463 %466
|
|
%468 = OpAccessChain %_ptr_Private_int %map %467
|
|
OpStore %468 %int_1
|
|
%469 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%470 = OpLoad %int %469
|
|
%471 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%472 = OpLoad %int %471
|
|
%473 = OpIAdd %int %472 %int_1
|
|
%474 = OpIMul %int %473 %int_16
|
|
%475 = OpIAdd %int %470 %474
|
|
%476 = OpAccessChain %_ptr_Private_int %map %475
|
|
OpStore %476 %int_1
|
|
%477 = OpAccessChain %_ptr_Function_int %p %uint_0
|
|
%478 = OpLoad %int %477
|
|
%479 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%480 = OpLoad %int %479
|
|
%481 = OpIAdd %int %480 %int_2
|
|
%482 = OpIMul %int %481 %int_16
|
|
%483 = OpIAdd %int %478 %482
|
|
%484 = OpAccessChain %_ptr_Private_int %map %483
|
|
OpStore %484 %int_1
|
|
%485 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%486 = OpLoad %int %485
|
|
%487 = OpAccessChain %_ptr_Function_int %p %uint_1
|
|
%488 = OpIAdd %int %486 %int_2
|
|
OpStore %487 %488
|
|
OpBranch %458
|
|
%458 = OpLabel
|
|
OpBranch %213
|
|
%213 = OpLabel
|
|
%489 = OpAccessChain %_ptr_Function_int %ipos %uint_1
|
|
%490 = OpLoad %int %489
|
|
%491 = OpAccessChain %_ptr_Function_int %ipos %uint_0
|
|
%492 = OpLoad %int %491
|
|
%493 = OpIMul %int %490 %int_16
|
|
%494 = OpIAdd %int %493 %492
|
|
%495 = OpAccessChain %_ptr_Private_int %map %494
|
|
%496 = OpLoad %int %495
|
|
%497 = OpIEqual %bool %496 %int_1
|
|
OpSelectionMerge %498 None
|
|
OpBranchConditional %497 %499 %498
|
|
%499 = OpLabel
|
|
OpStore %x_GLF_color %501
|
|
OpReturn
|
|
%498 = OpLabel
|
|
OpBranch %96
|
|
%96 = OpLabel
|
|
%502 = OpLoad %bool %canwalk
|
|
OpBranchConditional %502 %94 %95
|
|
%95 = OpLabel
|
|
OpStore %x_GLF_color %503
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%tint_symbol_3 = OpFunction %void None %504
|
|
%tint_symbol_1 = OpFunctionParameter %main_out
|
|
%508 = OpLabel
|
|
%509 = OpCompositeExtract %v4float %tint_symbol_1 0
|
|
OpStore %tint_symbol_2 %509
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %28
|
|
%511 = OpLabel
|
|
%512 = OpLoad %v4float %tint_symbol
|
|
OpStore %gl_FragCoord %512
|
|
%513 = OpFunctionCall %void %main_1
|
|
%515 = OpLoad %v4float %x_GLF_color
|
|
%516 = OpCompositeConstruct %main_out %515
|
|
%514 = OpFunctionCall %void %tint_symbol_3 %516
|
|
OpReturn
|
|
OpFunctionEnd
|