mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-02 02:05:45 +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>
738 lines
28 KiB
Plaintext
738 lines
28 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 428
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
%132 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpName %buf0 "buf0"
|
|
OpMemberName %buf0 0 "injectionSwitch"
|
|
OpName %x_8 "x_8"
|
|
OpName %gl_FragCoord "gl_FragCoord"
|
|
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 %temp "temp"
|
|
OpName %data "data"
|
|
OpName %x_180 "x_180"
|
|
OpName %x_279 "x_279"
|
|
OpName %x_65_phi "x_65_phi"
|
|
OpName %x_93_phi "x_93_phi"
|
|
OpName %x_102_phi "x_102_phi"
|
|
OpName %x_280_phi "x_280_phi"
|
|
OpName %x_94 "x_94"
|
|
OpName %x_103 "x_103"
|
|
OpName %x_109_phi "x_109_phi"
|
|
OpName %x_121 "x_121"
|
|
OpName %x_126 "x_126"
|
|
OpName %x_121_phi "x_121_phi"
|
|
OpName %x_124_phi "x_124_phi"
|
|
OpName %x_126_phi "x_126_phi"
|
|
OpName %x_148_phi "x_148_phi"
|
|
OpName %x_151_phi "x_151_phi"
|
|
OpName %x_161_phi "x_161_phi"
|
|
OpName %x_141 "x_141"
|
|
OpName %x_144 "x_144"
|
|
OpName %x_125_phi "x_125_phi"
|
|
OpName %x_127_phi "x_127_phi"
|
|
OpName %x_149 "x_149"
|
|
OpName %x_152 "x_152"
|
|
OpName %x_162 "x_162"
|
|
OpName %x_171 "x_171"
|
|
OpName %x_189 "x_189"
|
|
OpName %x_278 "x_278"
|
|
OpName %x_279_phi "x_279_phi"
|
|
OpName %x_198 "x_198"
|
|
OpName %x_277 "x_277"
|
|
OpName %x_278_phi "x_278_phi"
|
|
OpName %x_207 "x_207"
|
|
OpName %x_249 "x_249"
|
|
OpName %x_277_phi "x_277_phi"
|
|
OpName %x_220 "x_220"
|
|
OpName %x_248 "x_248"
|
|
OpName %x_249_phi "x_249_phi"
|
|
OpName %x_256_phi "x_256_phi"
|
|
OpName %x_259_phi "x_259_phi"
|
|
OpName %x_229 "x_229"
|
|
OpName %x_247 "x_247"
|
|
OpName %x_248_phi "x_248_phi"
|
|
OpName %x_238 "x_238"
|
|
OpName %x_246 "x_246"
|
|
OpName %x_247_phi "x_247_phi"
|
|
OpName %x_272 "x_272"
|
|
OpName %x_260 "x_260"
|
|
OpName %x_273_phi "x_273_phi"
|
|
OpName %x_257_1 "x_257_1"
|
|
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_8 NonWritable
|
|
OpDecorate %x_8 DescriptorSet 0
|
|
OpDecorate %x_8 Binding 0
|
|
OpDecorate %tint_symbol BuiltIn FragCoord
|
|
OpDecorate %tint_symbol_2 Location 0
|
|
OpDecorate %_arr_int_uint_10 ArrayStride 4
|
|
OpMemberDecorate %main_out 0 Offset 0
|
|
%float = OpTypeFloat 32
|
|
%v2float = OpTypeVector %float 2
|
|
%buf0 = OpTypeStruct %v2float
|
|
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
|
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
|
|
%v4float = OpTypeVector %float 4
|
|
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
|
%9 = OpConstantNull %v4float
|
|
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %9
|
|
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
|
|
%_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 %9
|
|
%void = OpTypeVoid
|
|
%15 = OpTypeFunction %void
|
|
%int = OpTypeInt 32 1
|
|
%uint = OpTypeInt 32 0
|
|
%uint_10 = OpConstant %uint 10
|
|
%_arr_int_uint_10 = OpTypeArray %int %uint_10
|
|
%_ptr_Function__arr_int_uint_10 = OpTypePointer Function %_arr_int_uint_10
|
|
%25 = OpConstantNull %_arr_int_uint_10
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
%29 = OpConstantNull %float
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
%33 = OpConstantNull %int
|
|
%uint_0 = OpConstant %uint 0
|
|
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
|
%int_n5 = OpConstant %int -5
|
|
%int_n4 = OpConstant %int -4
|
|
%int_n3 = OpConstant %int -3
|
|
%int_n2 = OpConstant %int -2
|
|
%int_n1 = OpConstant %int -1
|
|
%int_0 = OpConstant %int 0
|
|
%int_1 = OpConstant %int 1
|
|
%int_2 = OpConstant %int 2
|
|
%int_3 = OpConstant %int 3
|
|
%int_4 = OpConstant %int 4
|
|
%int_10 = OpConstant %int 10
|
|
%bool = OpTypeBool
|
|
%int_9 = OpConstant %int 9
|
|
%uint_1 = OpConstant %uint 1
|
|
%_ptr_Private_float = OpTypePointer Private %float
|
|
%int_30 = OpConstant %int 30
|
|
%float_0_5 = OpConstant %float 0.5
|
|
%float_0_100000001 = OpConstant %float 0.100000001
|
|
%int_60 = OpConstant %int 60
|
|
%int_90 = OpConstant %int 90
|
|
%int_120 = OpConstant %int 120
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
%293 = OpConstantNull %v2float
|
|
%int_150 = OpConstant %int 150
|
|
%int_180 = OpConstant %int 180
|
|
%int_5 = OpConstant %int 5
|
|
%int_210 = OpConstant %int 210
|
|
%int_6 = OpConstant %int 6
|
|
%int_240 = OpConstant %int 240
|
|
%int_7 = OpConstant %int 7
|
|
%int_270 = OpConstant %int 270
|
|
%int_8 = OpConstant %int 8
|
|
%float_1 = OpConstant %float 1
|
|
%370 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
|
%371 = OpConstantComposite %v2float %float_1 %float_1
|
|
%int_32 = OpConstant %int 32
|
|
%float_0 = OpConstant %float 0
|
|
%main_out = OpTypeStruct %v4float
|
|
%415 = OpTypeFunction %void %main_out
|
|
%main_1 = OpFunction %void None %15
|
|
%18 = OpLabel
|
|
%temp = OpVariable %_ptr_Function__arr_int_uint_10 Function %25
|
|
%data = OpVariable %_ptr_Function__arr_int_uint_10 Function %25
|
|
%x_180 = OpVariable %_ptr_Function_float Function %29
|
|
%x_279 = OpVariable %_ptr_Function_float Function %29
|
|
%x_65_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_93_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_102_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_280_phi = OpVariable %_ptr_Function_float Function %29
|
|
%x_94 = OpVariable %_ptr_Function_int Function %33
|
|
%x_103 = OpVariable %_ptr_Function_int Function %33
|
|
%x_109_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_121 = OpVariable %_ptr_Function_int Function %33
|
|
%x_126 = OpVariable %_ptr_Function_int Function %33
|
|
%x_121_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_124_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_126_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_148_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_151_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_161_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_141 = OpVariable %_ptr_Function_int Function %33
|
|
%x_144 = OpVariable %_ptr_Function_int Function %33
|
|
%x_125_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_127_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_149 = OpVariable %_ptr_Function_int Function %33
|
|
%x_152 = OpVariable %_ptr_Function_int Function %33
|
|
%x_162 = OpVariable %_ptr_Function_int Function %33
|
|
%x_171 = OpVariable %_ptr_Function_int Function %33
|
|
%x_189 = OpVariable %_ptr_Function_float Function %29
|
|
%x_278 = OpVariable %_ptr_Function_float Function %29
|
|
%x_279_phi = OpVariable %_ptr_Function_float Function %29
|
|
%x_198 = OpVariable %_ptr_Function_float Function %29
|
|
%x_277 = OpVariable %_ptr_Function_float Function %29
|
|
%x_278_phi = OpVariable %_ptr_Function_float Function %29
|
|
%x_207 = OpVariable %_ptr_Function_float Function %29
|
|
%x_249 = OpVariable %_ptr_Function_float Function %29
|
|
%x_277_phi = OpVariable %_ptr_Function_float Function %29
|
|
%x_220 = OpVariable %_ptr_Function_float Function %29
|
|
%x_248 = OpVariable %_ptr_Function_float Function %29
|
|
%x_249_phi = OpVariable %_ptr_Function_float Function %29
|
|
%x_256_phi = OpVariable %_ptr_Function_v2float Function %293
|
|
%x_259_phi = OpVariable %_ptr_Function_int Function %33
|
|
%x_229 = OpVariable %_ptr_Function_float Function %29
|
|
%x_247 = OpVariable %_ptr_Function_float Function %29
|
|
%x_248_phi = OpVariable %_ptr_Function_float Function %29
|
|
%x_238 = OpVariable %_ptr_Function_float Function %29
|
|
%x_246 = OpVariable %_ptr_Function_float Function %29
|
|
%x_247_phi = OpVariable %_ptr_Function_float Function %29
|
|
%x_272 = OpVariable %_ptr_Function_v2float Function %293
|
|
%x_260 = OpVariable %_ptr_Function_int Function %33
|
|
%x_273_phi = OpVariable %_ptr_Function_v2float Function %293
|
|
%x_257_1 = OpVariable %_ptr_Function_v2float Function %293
|
|
%39 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
|
|
%40 = OpLoad %float %39
|
|
%41 = OpConvertFToS %int %40
|
|
OpStore %x_65_phi %41
|
|
OpBranch %42
|
|
%42 = OpLabel
|
|
OpLoopMerge %43 %44 None
|
|
OpBranch %45
|
|
%45 = OpLabel
|
|
%46 = OpLoad %int %x_65_phi
|
|
OpSelectionMerge %47 None
|
|
OpSwitch %46 %48 9 %49 8 %50 7 %51 6 %52 5 %53 4 %54 3 %55 2 %56 1 %57 0 %58
|
|
%49 = OpLabel
|
|
%59 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %59 %int_n5
|
|
OpBranch %47
|
|
%50 = OpLabel
|
|
%61 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %61 %int_n4
|
|
OpBranch %47
|
|
%51 = OpLabel
|
|
%63 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %63 %int_n3
|
|
OpBranch %47
|
|
%52 = OpLabel
|
|
%65 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %65 %int_n2
|
|
OpBranch %47
|
|
%53 = OpLabel
|
|
%67 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %67 %int_n1
|
|
OpBranch %47
|
|
%54 = OpLabel
|
|
%69 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %69 %int_0
|
|
OpBranch %47
|
|
%55 = OpLabel
|
|
%71 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %71 %int_1
|
|
OpBranch %47
|
|
%56 = OpLabel
|
|
%73 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %73 %int_2
|
|
OpBranch %47
|
|
%57 = OpLabel
|
|
%75 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %75 %int_3
|
|
OpBranch %47
|
|
%58 = OpLabel
|
|
%77 = OpAccessChain %_ptr_Function_int %data %46
|
|
OpStore %77 %int_4
|
|
OpBranch %47
|
|
%48 = OpLabel
|
|
OpBranch %47
|
|
%47 = OpLabel
|
|
%79 = OpIAdd %int %46 %int_1
|
|
OpBranch %44
|
|
%44 = OpLabel
|
|
OpStore %x_65_phi %79
|
|
%81 = OpSLessThan %bool %79 %int_10
|
|
OpBranchConditional %81 %42 %43
|
|
%43 = OpLabel
|
|
OpStore %x_93_phi %int_0
|
|
OpBranch %83
|
|
%83 = OpLabel
|
|
OpLoopMerge %84 %85 None
|
|
OpBranch %86
|
|
%86 = OpLabel
|
|
%88 = OpLoad %int %x_93_phi
|
|
%89 = OpSLessThan %bool %88 %int_10
|
|
OpSelectionMerge %90 None
|
|
OpBranchConditional %89 %91 %92
|
|
%91 = OpLabel
|
|
OpBranch %90
|
|
%92 = OpLabel
|
|
OpBranch %84
|
|
%90 = OpLabel
|
|
OpBranch %85
|
|
%85 = OpLabel
|
|
%93 = OpAccessChain %_ptr_Function_int %data %88
|
|
%94 = OpLoad %int %93
|
|
%95 = OpAccessChain %_ptr_Function_int %temp %88
|
|
OpStore %95 %94
|
|
%96 = OpIAdd %int %88 %int_1
|
|
OpStore %x_94 %96
|
|
%97 = OpLoad %int %x_94
|
|
OpStore %x_93_phi %97
|
|
OpBranch %83
|
|
%84 = OpLabel
|
|
OpStore %x_102_phi %int_1
|
|
OpBranch %98
|
|
%98 = OpLabel
|
|
OpLoopMerge %99 %100 None
|
|
OpBranch %101
|
|
%101 = OpLabel
|
|
%104 = OpLoad %int %x_102_phi
|
|
%106 = OpSLessThanEqual %bool %104 %int_9
|
|
OpSelectionMerge %107 None
|
|
OpBranchConditional %106 %108 %109
|
|
%108 = OpLabel
|
|
OpBranch %107
|
|
%109 = OpLabel
|
|
OpBranch %99
|
|
%107 = OpLabel
|
|
OpStore %x_109_phi %int_0
|
|
OpBranch %110
|
|
%110 = OpLabel
|
|
OpLoopMerge %111 %112 None
|
|
OpBranch %113
|
|
%113 = OpLabel
|
|
%122 = OpLoad %int %x_109_phi
|
|
%123 = OpSLessThan %bool %122 %int_9
|
|
OpSelectionMerge %124 None
|
|
OpBranchConditional %123 %125 %126
|
|
%125 = OpLabel
|
|
OpBranch %124
|
|
%126 = OpLabel
|
|
OpBranch %111
|
|
%124 = OpLabel
|
|
%127 = OpIAdd %int %122 %104
|
|
%128 = OpISub %int %127 %int_1
|
|
%129 = OpIMul %int %int_2 %104
|
|
%130 = OpIAdd %int %122 %129
|
|
%133 = OpISub %int %130 %int_1
|
|
%131 = OpExtInst %int %132 SMin %133 %int_9
|
|
OpStore %x_121_phi %122
|
|
OpStore %x_124_phi %127
|
|
OpStore %x_126_phi %122
|
|
OpBranch %134
|
|
%134 = OpLabel
|
|
OpLoopMerge %135 %136 None
|
|
OpBranch %137
|
|
%137 = OpLabel
|
|
%142 = OpLoad %int %x_121_phi
|
|
OpStore %x_121 %142
|
|
%143 = OpLoad %int %x_124_phi
|
|
%144 = OpLoad %int %x_126_phi
|
|
OpStore %x_126 %144
|
|
%145 = OpLoad %int %x_126
|
|
%146 = OpSLessThanEqual %bool %145 %128
|
|
%147 = OpSLessThanEqual %bool %143 %131
|
|
%148 = OpLogicalAnd %bool %146 %147
|
|
OpSelectionMerge %149 None
|
|
OpBranchConditional %148 %150 %151
|
|
%150 = OpLabel
|
|
OpBranch %149
|
|
%151 = OpLabel
|
|
OpBranch %135
|
|
%149 = OpLabel
|
|
%152 = OpLoad %int %x_126
|
|
%153 = OpAccessChain %_ptr_Function_int %data %152
|
|
%154 = OpLoad %int %153
|
|
%155 = OpAccessChain %_ptr_Function_int %data %143
|
|
%156 = OpLoad %int %155
|
|
%158 = OpLoad %int %x_121
|
|
%159 = OpCopyObject %int %int_1
|
|
%160 = OpIAdd %int %158 %159
|
|
%157 = OpCopyObject %int %160
|
|
%161 = OpSLessThan %bool %154 %156
|
|
OpSelectionMerge %162 None
|
|
OpBranchConditional %161 %163 %164
|
|
%163 = OpLabel
|
|
%166 = OpLoad %int %x_126
|
|
%167 = OpCopyObject %int %int_1
|
|
%168 = OpIAdd %int %166 %167
|
|
%165 = OpCopyObject %int %168
|
|
OpStore %x_141 %165
|
|
%169 = OpAccessChain %_ptr_Function_int %data %152
|
|
%170 = OpLoad %int %169
|
|
%171 = OpLoad %int %x_121
|
|
%172 = OpAccessChain %_ptr_Function_int %temp %171
|
|
OpStore %172 %170
|
|
OpStore %x_125_phi %143
|
|
%173 = OpLoad %int %x_141
|
|
OpStore %x_127_phi %173
|
|
OpBranch %162
|
|
%164 = OpLabel
|
|
%174 = OpIAdd %int %143 %int_1
|
|
OpStore %x_144 %174
|
|
%175 = OpAccessChain %_ptr_Function_int %data %143
|
|
%176 = OpLoad %int %175
|
|
%177 = OpLoad %int %x_121
|
|
%178 = OpAccessChain %_ptr_Function_int %temp %177
|
|
OpStore %178 %176
|
|
%179 = OpLoad %int %x_144
|
|
OpStore %x_125_phi %179
|
|
%180 = OpLoad %int %x_126
|
|
OpStore %x_127_phi %180
|
|
OpBranch %162
|
|
%162 = OpLabel
|
|
%181 = OpLoad %int %x_125_phi
|
|
%182 = OpLoad %int %x_127_phi
|
|
OpBranch %136
|
|
%136 = OpLabel
|
|
OpStore %x_121_phi %157
|
|
OpStore %x_124_phi %181
|
|
OpStore %x_126_phi %182
|
|
OpBranch %134
|
|
%135 = OpLabel
|
|
%183 = OpLoad %int %x_121
|
|
OpStore %x_148_phi %183
|
|
%184 = OpLoad %int %x_126
|
|
OpStore %x_151_phi %184
|
|
OpBranch %185
|
|
%185 = OpLabel
|
|
OpLoopMerge %186 %187 None
|
|
OpBranch %188
|
|
%188 = OpLabel
|
|
%191 = OpLoad %int %x_148_phi
|
|
%192 = OpLoad %int %x_151_phi
|
|
%193 = OpSLessThan %bool %192 %int_10
|
|
%194 = OpSLessThanEqual %bool %192 %128
|
|
%195 = OpLogicalAnd %bool %193 %194
|
|
OpSelectionMerge %196 None
|
|
OpBranchConditional %195 %197 %198
|
|
%197 = OpLabel
|
|
OpBranch %196
|
|
%198 = OpLabel
|
|
OpBranch %186
|
|
%196 = OpLabel
|
|
OpBranch %187
|
|
%187 = OpLabel
|
|
%199 = OpIAdd %int %191 %int_1
|
|
OpStore %x_149 %199
|
|
%200 = OpIAdd %int %192 %int_1
|
|
OpStore %x_152 %200
|
|
%201 = OpAccessChain %_ptr_Function_int %data %192
|
|
%202 = OpLoad %int %201
|
|
%203 = OpAccessChain %_ptr_Function_int %temp %191
|
|
OpStore %203 %202
|
|
%204 = OpLoad %int %x_149
|
|
OpStore %x_148_phi %204
|
|
%205 = OpLoad %int %x_152
|
|
OpStore %x_151_phi %205
|
|
OpBranch %185
|
|
%186 = OpLabel
|
|
OpStore %x_161_phi %122
|
|
OpBranch %206
|
|
%206 = OpLabel
|
|
OpLoopMerge %207 %208 None
|
|
OpBranch %209
|
|
%209 = OpLabel
|
|
%211 = OpLoad %int %x_161_phi
|
|
%212 = OpSLessThanEqual %bool %211 %131
|
|
OpSelectionMerge %213 None
|
|
OpBranchConditional %212 %214 %215
|
|
%214 = OpLabel
|
|
OpBranch %213
|
|
%215 = OpLabel
|
|
OpBranch %207
|
|
%213 = OpLabel
|
|
OpBranch %208
|
|
%208 = OpLabel
|
|
%216 = OpAccessChain %_ptr_Function_int %temp %211
|
|
%217 = OpLoad %int %216
|
|
%218 = OpAccessChain %_ptr_Function_int %data %211
|
|
OpStore %218 %217
|
|
%219 = OpIAdd %int %211 %int_1
|
|
OpStore %x_162 %219
|
|
%220 = OpLoad %int %x_162
|
|
OpStore %x_161_phi %220
|
|
OpBranch %206
|
|
%207 = OpLabel
|
|
OpBranch %112
|
|
%112 = OpLabel
|
|
OpStore %x_109_phi %130
|
|
OpBranch %110
|
|
%111 = OpLabel
|
|
OpBranch %100
|
|
%100 = OpLabel
|
|
%221 = OpIMul %int %int_2 %104
|
|
OpStore %x_103 %221
|
|
%222 = OpLoad %int %x_103
|
|
OpStore %x_102_phi %222
|
|
OpBranch %98
|
|
%99 = OpLabel
|
|
%229 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%230 = OpLoad %float %229
|
|
%231 = OpConvertFToS %int %230
|
|
OpStore %x_171 %231
|
|
%232 = OpLoad %int %x_171
|
|
%234 = OpSLessThan %bool %232 %int_30
|
|
OpSelectionMerge %235 None
|
|
OpBranchConditional %234 %236 %237
|
|
%236 = OpLabel
|
|
%238 = OpAccessChain %_ptr_Function_int %data %int_0
|
|
%239 = OpLoad %int %238
|
|
%241 = OpConvertSToF %float %239
|
|
%243 = OpFMul %float %241 %float_0_100000001
|
|
%244 = OpFAdd %float %float_0_5 %243
|
|
OpStore %x_180 %244
|
|
%245 = OpLoad %float %x_180
|
|
OpStore %x_280_phi %245
|
|
OpBranch %235
|
|
%237 = OpLabel
|
|
%249 = OpLoad %int %x_171
|
|
%251 = OpSLessThan %bool %249 %int_60
|
|
OpSelectionMerge %252 None
|
|
OpBranchConditional %251 %253 %254
|
|
%253 = OpLabel
|
|
%255 = OpAccessChain %_ptr_Function_int %data %int_1
|
|
%256 = OpLoad %int %255
|
|
%257 = OpConvertSToF %float %256
|
|
%258 = OpFMul %float %257 %float_0_100000001
|
|
%259 = OpFAdd %float %float_0_5 %258
|
|
OpStore %x_189 %259
|
|
%260 = OpLoad %float %x_189
|
|
OpStore %x_279_phi %260
|
|
OpBranch %252
|
|
%254 = OpLabel
|
|
%264 = OpLoad %int %x_171
|
|
%266 = OpSLessThan %bool %264 %int_90
|
|
OpSelectionMerge %267 None
|
|
OpBranchConditional %266 %268 %269
|
|
%268 = OpLabel
|
|
%270 = OpAccessChain %_ptr_Function_int %data %int_2
|
|
%271 = OpLoad %int %270
|
|
%272 = OpConvertSToF %float %271
|
|
%273 = OpFMul %float %272 %float_0_100000001
|
|
%274 = OpFAdd %float %float_0_5 %273
|
|
OpStore %x_198 %274
|
|
%275 = OpLoad %float %x_198
|
|
OpStore %x_278_phi %275
|
|
OpBranch %267
|
|
%269 = OpLabel
|
|
%276 = OpLoad %int %x_171
|
|
%278 = OpSLessThan %bool %276 %int_120
|
|
OpSelectionMerge %279 None
|
|
OpBranchConditional %278 %280 %281
|
|
%280 = OpLabel
|
|
%282 = OpAccessChain %_ptr_Function_int %data %int_3
|
|
%283 = OpLoad %int %282
|
|
%284 = OpConvertSToF %float %283
|
|
%285 = OpFMul %float %284 %float_0_100000001
|
|
%286 = OpFAdd %float %float_0_5 %285
|
|
OpStore %x_207 %286
|
|
%287 = OpLoad %float %x_207
|
|
OpStore %x_277_phi %287
|
|
OpBranch %279
|
|
%281 = OpLabel
|
|
%295 = OpLoad %int %x_171
|
|
%297 = OpSLessThan %bool %295 %int_150
|
|
OpSelectionMerge %298 None
|
|
OpBranchConditional %297 %299 %300
|
|
%299 = OpLabel
|
|
OpKill
|
|
%300 = OpLabel
|
|
%304 = OpLoad %int %x_171
|
|
%306 = OpSLessThan %bool %304 %int_180
|
|
OpSelectionMerge %307 None
|
|
OpBranchConditional %306 %308 %309
|
|
%308 = OpLabel
|
|
%311 = OpAccessChain %_ptr_Function_int %data %int_5
|
|
%312 = OpLoad %int %311
|
|
%313 = OpConvertSToF %float %312
|
|
%314 = OpFMul %float %313 %float_0_100000001
|
|
%315 = OpFAdd %float %float_0_5 %314
|
|
OpStore %x_220 %315
|
|
%316 = OpLoad %float %x_220
|
|
OpStore %x_249_phi %316
|
|
OpBranch %307
|
|
%309 = OpLabel
|
|
%320 = OpLoad %int %x_171
|
|
%322 = OpSLessThan %bool %320 %int_210
|
|
OpSelectionMerge %323 None
|
|
OpBranchConditional %322 %324 %325
|
|
%324 = OpLabel
|
|
%327 = OpAccessChain %_ptr_Function_int %data %int_6
|
|
%328 = OpLoad %int %327
|
|
%329 = OpConvertSToF %float %328
|
|
%330 = OpFMul %float %329 %float_0_100000001
|
|
%331 = OpFAdd %float %float_0_5 %330
|
|
OpStore %x_229 %331
|
|
%332 = OpLoad %float %x_229
|
|
OpStore %x_248_phi %332
|
|
OpBranch %323
|
|
%325 = OpLabel
|
|
%333 = OpLoad %int %x_171
|
|
%335 = OpSLessThan %bool %333 %int_240
|
|
OpSelectionMerge %336 None
|
|
OpBranchConditional %335 %337 %338
|
|
%337 = OpLabel
|
|
%340 = OpAccessChain %_ptr_Function_int %data %int_7
|
|
%341 = OpLoad %int %340
|
|
%342 = OpConvertSToF %float %341
|
|
%343 = OpFMul %float %342 %float_0_100000001
|
|
%344 = OpFAdd %float %float_0_5 %343
|
|
OpStore %x_238 %344
|
|
%345 = OpLoad %float %x_238
|
|
OpStore %x_247_phi %345
|
|
OpBranch %336
|
|
%338 = OpLabel
|
|
%346 = OpLoad %int %x_171
|
|
%348 = OpSLessThan %bool %346 %int_270
|
|
OpSelectionMerge %349 None
|
|
OpBranchConditional %348 %350 %351
|
|
%350 = OpLabel
|
|
OpBranch %349
|
|
%351 = OpLabel
|
|
OpKill
|
|
%349 = OpLabel
|
|
%353 = OpAccessChain %_ptr_Function_int %data %int_8
|
|
%354 = OpLoad %int %353
|
|
%355 = OpConvertSToF %float %354
|
|
%356 = OpFMul %float %355 %float_0_100000001
|
|
%357 = OpFAdd %float %float_0_5 %356
|
|
OpStore %x_246 %357
|
|
%358 = OpLoad %float %x_246
|
|
OpStore %x_247_phi %358
|
|
OpBranch %336
|
|
%336 = OpLabel
|
|
%359 = OpLoad %float %x_247_phi
|
|
OpStore %x_247 %359
|
|
%360 = OpLoad %float %x_247
|
|
OpStore %x_248_phi %360
|
|
OpBranch %323
|
|
%323 = OpLabel
|
|
%361 = OpLoad %float %x_248_phi
|
|
OpStore %x_248 %361
|
|
%362 = OpLoad %float %x_248
|
|
OpStore %x_249_phi %362
|
|
OpBranch %307
|
|
%307 = OpLabel
|
|
%363 = OpLoad %float %x_249_phi
|
|
OpStore %x_249 %363
|
|
%364 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_1
|
|
%365 = OpLoad %float %364
|
|
%366 = OpFOrdGreaterThan %bool %40 %365
|
|
OpSelectionMerge %367 None
|
|
OpBranchConditional %366 %368 %367
|
|
%368 = OpLabel
|
|
OpStore %x_GLF_color %370
|
|
OpBranch %367
|
|
%367 = OpLabel
|
|
OpStore %x_256_phi %371
|
|
OpStore %x_259_phi %int_0
|
|
OpBranch %372
|
|
%372 = OpLabel
|
|
OpLoopMerge %373 %374 None
|
|
OpBranch %375
|
|
%375 = OpLabel
|
|
%379 = OpLoad %v2float %x_256_phi
|
|
%380 = OpLoad %int %x_259_phi
|
|
%382 = OpSLessThanEqual %bool %380 %int_32
|
|
OpSelectionMerge %383 None
|
|
OpBranchConditional %382 %384 %385
|
|
%384 = OpLabel
|
|
OpBranch %383
|
|
%385 = OpLabel
|
|
OpBranch %373
|
|
%383 = OpLabel
|
|
OpStore %x_273_phi %379
|
|
%386 = OpCompositeExtract %float %379 0
|
|
%388 = OpFOrdLessThan %bool %386 %float_0
|
|
OpSelectionMerge %389 None
|
|
OpBranchConditional %388 %390 %389
|
|
%390 = OpLabel
|
|
OpSelectionMerge %391 None
|
|
OpBranchConditional %366 %392 %391
|
|
%392 = OpLabel
|
|
OpKill
|
|
%391 = OpLabel
|
|
OpStore %x_272 %379
|
|
%393 = OpAccessChain %_ptr_Function_float %x_272 %uint_1
|
|
%394 = OpCompositeExtract %float %379 1
|
|
%395 = OpFAdd %float %394 %float_1
|
|
OpStore %393 %395
|
|
%396 = OpLoad %v2float %x_272
|
|
OpStore %x_273_phi %396
|
|
OpBranch %389
|
|
%389 = OpLabel
|
|
%397 = OpLoad %v2float %x_273_phi
|
|
OpStore %x_257_1 %397
|
|
%399 = OpAccessChain %_ptr_Function_float %x_257_1 %uint_0
|
|
%400 = OpCompositeExtract %float %397 0
|
|
%401 = OpCompositeExtract %float %397 1
|
|
%402 = OpFAdd %float %400 %401
|
|
OpStore %399 %402
|
|
%403 = OpLoad %v2float %x_257_1
|
|
OpBranch %374
|
|
%374 = OpLabel
|
|
%404 = OpIAdd %int %380 %int_1
|
|
OpStore %x_260 %404
|
|
OpStore %x_256_phi %403
|
|
%405 = OpLoad %int %x_260
|
|
OpStore %x_259_phi %405
|
|
OpBranch %372
|
|
%373 = OpLabel
|
|
OpBranch %298
|
|
%298 = OpLabel
|
|
%406 = OpLoad %float %x_249
|
|
OpStore %x_277_phi %406
|
|
OpBranch %279
|
|
%279 = OpLabel
|
|
%407 = OpLoad %float %x_277_phi
|
|
OpStore %x_277 %407
|
|
%408 = OpLoad %float %x_277
|
|
OpStore %x_278_phi %408
|
|
OpBranch %267
|
|
%267 = OpLabel
|
|
%409 = OpLoad %float %x_278_phi
|
|
OpStore %x_278 %409
|
|
%410 = OpLoad %float %x_278
|
|
OpStore %x_279_phi %410
|
|
OpBranch %252
|
|
%252 = OpLabel
|
|
%411 = OpLoad %float %x_279_phi
|
|
OpStore %x_279 %411
|
|
%412 = OpLoad %float %x_279
|
|
OpStore %x_280_phi %412
|
|
OpBranch %235
|
|
%235 = OpLabel
|
|
%413 = OpLoad %float %x_280_phi
|
|
%414 = OpCompositeConstruct %v4float %413 %413 %413 %float_1
|
|
OpStore %x_GLF_color %414
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%tint_symbol_3 = OpFunction %void None %415
|
|
%tint_symbol_1 = OpFunctionParameter %main_out
|
|
%419 = OpLabel
|
|
%420 = OpCompositeExtract %v4float %tint_symbol_1 0
|
|
OpStore %tint_symbol_2 %420
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %15
|
|
%422 = OpLabel
|
|
%423 = OpLoad %v4float %tint_symbol
|
|
OpStore %gl_FragCoord %423
|
|
%424 = OpFunctionCall %void %main_1
|
|
%426 = OpLoad %v4float %x_GLF_color
|
|
%427 = OpCompositeConstruct %main_out %426
|
|
%425 = OpFunctionCall %void %tint_symbol_3 %427
|
|
OpReturn
|
|
OpFunctionEnd
|