mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 05:01:27 +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>
652 lines
24 KiB
Plaintext
652 lines
24 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 422
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
%173 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpName %data "data"
|
|
OpName %temp "temp"
|
|
OpName %buf0 "buf0"
|
|
OpMemberName %buf0 0 "injectionSwitch"
|
|
OpName %x_28 "x_28"
|
|
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 %merge_i1_i1_i1_ "merge_i1_i1_i1_"
|
|
OpName %from "from"
|
|
OpName %mid "mid"
|
|
OpName %to "to"
|
|
OpName %k "k"
|
|
OpName %i "i"
|
|
OpName %j "j"
|
|
OpName %i_1 "i_1"
|
|
OpName %mergeSort_ "mergeSort_"
|
|
OpName %low "low"
|
|
OpName %high "high"
|
|
OpName %m "m"
|
|
OpName %i_2 "i_2"
|
|
OpName %from_1 "from_1"
|
|
OpName %mid_1 "mid_1"
|
|
OpName %to_1 "to_1"
|
|
OpName %param "param"
|
|
OpName %param_1 "param_1"
|
|
OpName %param_2 "param_2"
|
|
OpName %main_1 "main_1"
|
|
OpName %i_3 "i_3"
|
|
OpName %j_1 "j_1"
|
|
OpName %grey "grey"
|
|
OpName %int_i "int_i"
|
|
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 %_arr_int_uint_10 ArrayStride 4
|
|
OpDecorate %buf0 Block
|
|
OpMemberDecorate %buf0 0 Offset 0
|
|
OpDecorate %x_28 NonWritable
|
|
OpDecorate %x_28 DescriptorSet 0
|
|
OpDecorate %x_28 Binding 0
|
|
OpDecorate %tint_symbol BuiltIn FragCoord
|
|
OpDecorate %tint_symbol_2 Location 0
|
|
OpMemberDecorate %main_out 0 Offset 0
|
|
%int = OpTypeInt 32 1
|
|
%uint = OpTypeInt 32 0
|
|
%uint_10 = OpConstant %uint 10
|
|
%_arr_int_uint_10 = OpTypeArray %int %uint_10
|
|
%_ptr_Private__arr_int_uint_10 = OpTypePointer Private %_arr_int_uint_10
|
|
%7 = OpConstantNull %_arr_int_uint_10
|
|
%data = OpVariable %_ptr_Private__arr_int_uint_10 Private %7
|
|
%temp = OpVariable %_ptr_Private__arr_int_uint_10 Private %7
|
|
%float = OpTypeFloat 32
|
|
%v2float = OpTypeVector %float 2
|
|
%buf0 = OpTypeStruct %v2float
|
|
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
|
%x_28 = OpVariable %_ptr_Uniform_buf0 Uniform
|
|
%v4float = OpTypeVector %float 4
|
|
%_ptr_Private_v4float = OpTypePointer Private %v4float
|
|
%17 = OpConstantNull %v4float
|
|
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %17
|
|
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
|
|
%_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 %17
|
|
%void = OpTypeVoid
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
%23 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int %_ptr_Function_int
|
|
%32 = OpConstantNull %int
|
|
%int_1 = OpConstant %int 1
|
|
%bool = OpTypeBool
|
|
%_ptr_Private_int = OpTypePointer Private %int
|
|
%int_10 = OpConstant %int 10
|
|
%128 = OpTypeFunction %void
|
|
%int_0 = OpConstant %int 0
|
|
%int_9 = OpConstant %int 9
|
|
%int_2 = OpConstant %int 2
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
%197 = OpConstantNull %float
|
|
%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_3 = OpConstant %int 3
|
|
%int_4 = OpConstant %int 4
|
|
%uint_1 = OpConstant %uint 1
|
|
%_ptr_Private_float = OpTypePointer Private %float
|
|
%int_30 = OpConstant %int 30
|
|
%float_0_5 = OpConstant %float 0.5
|
|
%float_10 = OpConstant %float 10
|
|
%int_60 = OpConstant %int 60
|
|
%int_90 = OpConstant %int 90
|
|
%int_120 = OpConstant %int 120
|
|
%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
|
|
%v3float = OpTypeVector %float 3
|
|
%float_1 = OpConstant %float 1
|
|
%main_out = OpTypeStruct %v4float
|
|
%409 = OpTypeFunction %void %main_out
|
|
%merge_i1_i1_i1_ = OpFunction %void None %23
|
|
%from = OpFunctionParameter %_ptr_Function_int
|
|
%mid = OpFunctionParameter %_ptr_Function_int
|
|
%to = OpFunctionParameter %_ptr_Function_int
|
|
%30 = OpLabel
|
|
%k = OpVariable %_ptr_Function_int Function %32
|
|
%i = OpVariable %_ptr_Function_int Function %32
|
|
%j = OpVariable %_ptr_Function_int Function %32
|
|
%i_1 = OpVariable %_ptr_Function_int Function %32
|
|
%37 = OpLoad %int %from
|
|
OpStore %k %37
|
|
%39 = OpLoad %int %from
|
|
OpStore %i %39
|
|
%41 = OpLoad %int %mid
|
|
%43 = OpIAdd %int %41 %int_1
|
|
OpStore %j %43
|
|
OpBranch %44
|
|
%44 = OpLabel
|
|
OpLoopMerge %45 %46 None
|
|
OpBranch %47
|
|
%47 = OpLabel
|
|
%48 = OpLoad %int %i
|
|
%50 = OpLoad %int %mid
|
|
%51 = OpLoad %int %j
|
|
%53 = OpLoad %int %to
|
|
%54 = OpSLessThanEqual %bool %48 %50
|
|
%56 = OpSLessThanEqual %bool %51 %53
|
|
%57 = OpLogicalAnd %bool %54 %56
|
|
OpSelectionMerge %58 None
|
|
OpBranchConditional %57 %59 %60
|
|
%59 = OpLabel
|
|
OpBranch %58
|
|
%60 = OpLabel
|
|
OpBranch %45
|
|
%58 = OpLabel
|
|
%61 = OpLoad %int %i
|
|
%63 = OpAccessChain %_ptr_Private_int %data %61
|
|
%64 = OpLoad %int %63
|
|
%65 = OpLoad %int %j
|
|
%66 = OpAccessChain %_ptr_Private_int %data %65
|
|
%67 = OpLoad %int %66
|
|
%68 = OpSLessThan %bool %64 %67
|
|
OpSelectionMerge %69 None
|
|
OpBranchConditional %68 %70 %71
|
|
%70 = OpLabel
|
|
%72 = OpLoad %int %k
|
|
%73 = OpIAdd %int %72 %int_1
|
|
OpStore %k %73
|
|
%74 = OpLoad %int %i
|
|
%75 = OpIAdd %int %74 %int_1
|
|
OpStore %i %75
|
|
%76 = OpAccessChain %_ptr_Private_int %data %74
|
|
%77 = OpLoad %int %76
|
|
%78 = OpAccessChain %_ptr_Private_int %temp %72
|
|
OpStore %78 %77
|
|
OpBranch %69
|
|
%71 = OpLabel
|
|
%79 = OpLoad %int %k
|
|
%80 = OpIAdd %int %79 %int_1
|
|
OpStore %k %80
|
|
%81 = OpLoad %int %j
|
|
%82 = OpIAdd %int %81 %int_1
|
|
OpStore %j %82
|
|
%83 = OpAccessChain %_ptr_Private_int %data %81
|
|
%84 = OpLoad %int %83
|
|
%85 = OpAccessChain %_ptr_Private_int %temp %79
|
|
OpStore %85 %84
|
|
OpBranch %69
|
|
%69 = OpLabel
|
|
OpBranch %46
|
|
%46 = OpLabel
|
|
OpBranch %44
|
|
%45 = OpLabel
|
|
OpBranch %86
|
|
%86 = OpLabel
|
|
OpLoopMerge %87 %88 None
|
|
OpBranch %89
|
|
%89 = OpLabel
|
|
%90 = OpLoad %int %i
|
|
%91 = OpLoad %int %i
|
|
%93 = OpLoad %int %mid
|
|
%95 = OpSLessThan %bool %90 %int_10
|
|
%96 = OpSLessThanEqual %bool %91 %93
|
|
%97 = OpLogicalAnd %bool %95 %96
|
|
OpSelectionMerge %98 None
|
|
OpBranchConditional %97 %99 %100
|
|
%99 = OpLabel
|
|
OpBranch %98
|
|
%100 = OpLabel
|
|
OpBranch %87
|
|
%98 = OpLabel
|
|
%101 = OpLoad %int %k
|
|
%102 = OpIAdd %int %101 %int_1
|
|
OpStore %k %102
|
|
%103 = OpLoad %int %i
|
|
%104 = OpIAdd %int %103 %int_1
|
|
OpStore %i %104
|
|
%105 = OpAccessChain %_ptr_Private_int %data %103
|
|
%106 = OpLoad %int %105
|
|
%107 = OpAccessChain %_ptr_Private_int %temp %101
|
|
OpStore %107 %106
|
|
OpBranch %88
|
|
%88 = OpLabel
|
|
OpBranch %86
|
|
%87 = OpLabel
|
|
%109 = OpLoad %int %from
|
|
OpStore %i_1 %109
|
|
OpBranch %110
|
|
%110 = OpLabel
|
|
OpLoopMerge %111 %112 None
|
|
OpBranch %113
|
|
%113 = OpLabel
|
|
%114 = OpLoad %int %i_1
|
|
%116 = OpLoad %int %to
|
|
%117 = OpSLessThanEqual %bool %114 %116
|
|
OpSelectionMerge %118 None
|
|
OpBranchConditional %117 %119 %120
|
|
%119 = OpLabel
|
|
OpBranch %118
|
|
%120 = OpLabel
|
|
OpBranch %111
|
|
%118 = OpLabel
|
|
%121 = OpLoad %int %i_1
|
|
%122 = OpLoad %int %i_1
|
|
%123 = OpAccessChain %_ptr_Private_int %temp %122
|
|
%124 = OpLoad %int %123
|
|
%125 = OpAccessChain %_ptr_Private_int %data %121
|
|
OpStore %125 %124
|
|
OpBranch %112
|
|
%112 = OpLabel
|
|
%126 = OpLoad %int %i_1
|
|
%127 = OpIAdd %int %126 %int_1
|
|
OpStore %i_1 %127
|
|
OpBranch %110
|
|
%111 = OpLabel
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%mergeSort_ = OpFunction %void None %128
|
|
%130 = OpLabel
|
|
%low = OpVariable %_ptr_Function_int Function %32
|
|
%high = OpVariable %_ptr_Function_int Function %32
|
|
%m = OpVariable %_ptr_Function_int Function %32
|
|
%i_2 = OpVariable %_ptr_Function_int Function %32
|
|
%from_1 = OpVariable %_ptr_Function_int Function %32
|
|
%mid_1 = OpVariable %_ptr_Function_int Function %32
|
|
%to_1 = OpVariable %_ptr_Function_int Function %32
|
|
%param = OpVariable %_ptr_Function_int Function %32
|
|
%param_1 = OpVariable %_ptr_Function_int Function %32
|
|
%param_2 = OpVariable %_ptr_Function_int Function %32
|
|
OpStore %low %int_0
|
|
OpStore %high %int_9
|
|
OpStore %m %int_1
|
|
OpBranch %143
|
|
%143 = OpLabel
|
|
OpLoopMerge %144 %145 None
|
|
OpBranch %146
|
|
%146 = OpLabel
|
|
%147 = OpLoad %int %m
|
|
%148 = OpLoad %int %high
|
|
%149 = OpSLessThanEqual %bool %147 %148
|
|
OpSelectionMerge %150 None
|
|
OpBranchConditional %149 %151 %152
|
|
%151 = OpLabel
|
|
OpBranch %150
|
|
%152 = OpLabel
|
|
OpBranch %144
|
|
%150 = OpLabel
|
|
%153 = OpLoad %int %low
|
|
OpStore %i_2 %153
|
|
OpBranch %154
|
|
%154 = OpLabel
|
|
OpLoopMerge %155 %156 None
|
|
OpBranch %157
|
|
%157 = OpLabel
|
|
%158 = OpLoad %int %i_2
|
|
%159 = OpLoad %int %high
|
|
%160 = OpSLessThan %bool %158 %159
|
|
OpSelectionMerge %161 None
|
|
OpBranchConditional %160 %162 %163
|
|
%162 = OpLabel
|
|
OpBranch %161
|
|
%163 = OpLabel
|
|
OpBranch %155
|
|
%161 = OpLabel
|
|
%164 = OpLoad %int %i_2
|
|
OpStore %from_1 %164
|
|
%165 = OpLoad %int %i_2
|
|
%166 = OpLoad %int %m
|
|
%167 = OpIAdd %int %165 %166
|
|
%168 = OpISub %int %167 %int_1
|
|
OpStore %mid_1 %168
|
|
%169 = OpLoad %int %i_2
|
|
%170 = OpLoad %int %m
|
|
%171 = OpLoad %int %high
|
|
%175 = OpIMul %int %int_2 %170
|
|
%176 = OpIAdd %int %169 %175
|
|
%177 = OpISub %int %176 %int_1
|
|
%172 = OpExtInst %int %173 SMin %177 %171
|
|
OpStore %to_1 %172
|
|
%178 = OpLoad %int %from_1
|
|
OpStore %param %178
|
|
%179 = OpLoad %int %mid_1
|
|
OpStore %param_1 %179
|
|
%180 = OpLoad %int %to_1
|
|
OpStore %param_2 %180
|
|
%181 = OpFunctionCall %void %merge_i1_i1_i1_ %param %param_1 %param_2
|
|
OpBranch %156
|
|
%156 = OpLabel
|
|
%185 = OpLoad %int %m
|
|
%186 = OpLoad %int %i_2
|
|
%187 = OpIMul %int %int_2 %185
|
|
%188 = OpIAdd %int %186 %187
|
|
OpStore %i_2 %188
|
|
OpBranch %154
|
|
%155 = OpLabel
|
|
OpBranch %145
|
|
%145 = OpLabel
|
|
%189 = OpLoad %int %m
|
|
%190 = OpIMul %int %int_2 %189
|
|
OpStore %m %190
|
|
OpBranch %143
|
|
%144 = OpLabel
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main_1 = OpFunction %void None %128
|
|
%192 = OpLabel
|
|
%i_3 = OpVariable %_ptr_Function_int Function %32
|
|
%j_1 = OpVariable %_ptr_Function_int Function %32
|
|
%grey = OpVariable %_ptr_Function_float Function %197
|
|
%int_i = OpVariable %_ptr_Function_int Function %32
|
|
%201 = OpAccessChain %_ptr_Uniform_float %x_28 %uint_0 %uint_0
|
|
%202 = OpLoad %float %201
|
|
%203 = OpConvertFToS %int %202
|
|
OpStore %i_3 %203
|
|
OpBranch %204
|
|
%204 = OpLabel
|
|
OpLoopMerge %205 %206 None
|
|
OpBranch %207
|
|
%207 = OpLabel
|
|
%208 = OpLoad %int %i_3
|
|
OpSelectionMerge %209 None
|
|
OpSwitch %208 %210 9 %211 8 %212 7 %213 6 %214 5 %215 4 %216 3 %217 2 %218 1 %219 0 %220
|
|
%211 = OpLabel
|
|
%221 = OpLoad %int %i_3
|
|
%222 = OpAccessChain %_ptr_Private_int %data %221
|
|
OpStore %222 %int_n5
|
|
OpBranch %209
|
|
%212 = OpLabel
|
|
%224 = OpLoad %int %i_3
|
|
%225 = OpAccessChain %_ptr_Private_int %data %224
|
|
OpStore %225 %int_n4
|
|
OpBranch %209
|
|
%213 = OpLabel
|
|
%227 = OpLoad %int %i_3
|
|
%228 = OpAccessChain %_ptr_Private_int %data %227
|
|
OpStore %228 %int_n3
|
|
OpBranch %209
|
|
%214 = OpLabel
|
|
%230 = OpLoad %int %i_3
|
|
%231 = OpAccessChain %_ptr_Private_int %data %230
|
|
OpStore %231 %int_n2
|
|
OpBranch %209
|
|
%215 = OpLabel
|
|
%233 = OpLoad %int %i_3
|
|
%234 = OpAccessChain %_ptr_Private_int %data %233
|
|
OpStore %234 %int_n1
|
|
OpBranch %209
|
|
%216 = OpLabel
|
|
%236 = OpLoad %int %i_3
|
|
%237 = OpAccessChain %_ptr_Private_int %data %236
|
|
OpStore %237 %int_0
|
|
OpBranch %209
|
|
%217 = OpLabel
|
|
%238 = OpLoad %int %i_3
|
|
%239 = OpAccessChain %_ptr_Private_int %data %238
|
|
OpStore %239 %int_1
|
|
OpBranch %209
|
|
%218 = OpLabel
|
|
%240 = OpLoad %int %i_3
|
|
%241 = OpAccessChain %_ptr_Private_int %data %240
|
|
OpStore %241 %int_2
|
|
OpBranch %209
|
|
%219 = OpLabel
|
|
%242 = OpLoad %int %i_3
|
|
%243 = OpAccessChain %_ptr_Private_int %data %242
|
|
OpStore %243 %int_3
|
|
OpBranch %209
|
|
%220 = OpLabel
|
|
%245 = OpLoad %int %i_3
|
|
%246 = OpAccessChain %_ptr_Private_int %data %245
|
|
OpStore %246 %int_4
|
|
OpBranch %209
|
|
%210 = OpLabel
|
|
OpBranch %209
|
|
%209 = OpLabel
|
|
%248 = OpLoad %int %i_3
|
|
%249 = OpIAdd %int %248 %int_1
|
|
OpStore %i_3 %249
|
|
OpBranch %206
|
|
%206 = OpLabel
|
|
%250 = OpLoad %int %i_3
|
|
%251 = OpSLessThan %bool %250 %int_10
|
|
OpBranchConditional %251 %204 %205
|
|
%205 = OpLabel
|
|
OpStore %j_1 %int_0
|
|
OpBranch %252
|
|
%252 = OpLabel
|
|
OpLoopMerge %253 %254 None
|
|
OpBranch %255
|
|
%255 = OpLabel
|
|
%256 = OpLoad %int %j_1
|
|
%257 = OpSLessThan %bool %256 %int_10
|
|
OpSelectionMerge %258 None
|
|
OpBranchConditional %257 %259 %260
|
|
%259 = OpLabel
|
|
OpBranch %258
|
|
%260 = OpLabel
|
|
OpBranch %253
|
|
%258 = OpLabel
|
|
%261 = OpLoad %int %j_1
|
|
%262 = OpLoad %int %j_1
|
|
%263 = OpAccessChain %_ptr_Private_int %data %262
|
|
%264 = OpLoad %int %263
|
|
%265 = OpAccessChain %_ptr_Private_int %temp %261
|
|
OpStore %265 %264
|
|
OpBranch %254
|
|
%254 = OpLabel
|
|
%266 = OpLoad %int %j_1
|
|
%267 = OpIAdd %int %266 %int_1
|
|
OpStore %j_1 %267
|
|
OpBranch %252
|
|
%253 = OpLabel
|
|
%268 = OpFunctionCall %void %mergeSort_
|
|
%271 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%272 = OpLoad %float %271
|
|
%273 = OpConvertFToS %int %272
|
|
%275 = OpSLessThan %bool %273 %int_30
|
|
OpSelectionMerge %276 None
|
|
OpBranchConditional %275 %277 %278
|
|
%277 = OpLabel
|
|
%279 = OpAccessChain %_ptr_Private_int %data %int_0
|
|
%280 = OpLoad %int %279
|
|
%282 = OpConvertSToF %float %280
|
|
%284 = OpFDiv %float %282 %float_10
|
|
%285 = OpFAdd %float %float_0_5 %284
|
|
OpStore %grey %285
|
|
OpBranch %276
|
|
%278 = OpLabel
|
|
%286 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%287 = OpLoad %float %286
|
|
%288 = OpConvertFToS %int %287
|
|
%290 = OpSLessThan %bool %288 %int_60
|
|
OpSelectionMerge %291 None
|
|
OpBranchConditional %290 %292 %293
|
|
%292 = OpLabel
|
|
%294 = OpAccessChain %_ptr_Private_int %data %int_1
|
|
%295 = OpLoad %int %294
|
|
%296 = OpConvertSToF %float %295
|
|
%297 = OpFDiv %float %296 %float_10
|
|
%298 = OpFAdd %float %float_0_5 %297
|
|
OpStore %grey %298
|
|
OpBranch %291
|
|
%293 = OpLabel
|
|
%299 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%300 = OpLoad %float %299
|
|
%301 = OpConvertFToS %int %300
|
|
%303 = OpSLessThan %bool %301 %int_90
|
|
OpSelectionMerge %304 None
|
|
OpBranchConditional %303 %305 %306
|
|
%305 = OpLabel
|
|
%307 = OpAccessChain %_ptr_Private_int %data %int_2
|
|
%308 = OpLoad %int %307
|
|
%309 = OpConvertSToF %float %308
|
|
%310 = OpFDiv %float %309 %float_10
|
|
%311 = OpFAdd %float %float_0_5 %310
|
|
OpStore %grey %311
|
|
OpBranch %304
|
|
%306 = OpLabel
|
|
%312 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%313 = OpLoad %float %312
|
|
%314 = OpConvertFToS %int %313
|
|
%316 = OpSLessThan %bool %314 %int_120
|
|
OpSelectionMerge %317 None
|
|
OpBranchConditional %316 %318 %319
|
|
%318 = OpLabel
|
|
%320 = OpAccessChain %_ptr_Private_int %data %int_3
|
|
%321 = OpLoad %int %320
|
|
%322 = OpConvertSToF %float %321
|
|
%323 = OpFDiv %float %322 %float_10
|
|
%324 = OpFAdd %float %float_0_5 %323
|
|
OpStore %grey %324
|
|
OpBranch %317
|
|
%319 = OpLabel
|
|
%325 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%326 = OpLoad %float %325
|
|
%327 = OpConvertFToS %int %326
|
|
%329 = OpSLessThan %bool %327 %int_150
|
|
OpSelectionMerge %330 None
|
|
OpBranchConditional %329 %331 %332
|
|
%331 = OpLabel
|
|
OpStore %int_i %int_1
|
|
OpBranch %333
|
|
%333 = OpLabel
|
|
OpLoopMerge %334 %335 None
|
|
OpBranch %336
|
|
%336 = OpLabel
|
|
%337 = OpLoad %int %int_i
|
|
%338 = OpAccessChain %_ptr_Uniform_float %x_28 %uint_0 %uint_0
|
|
%339 = OpLoad %float %338
|
|
%340 = OpConvertFToS %int %339
|
|
%341 = OpSGreaterThan %bool %337 %340
|
|
OpSelectionMerge %342 None
|
|
OpBranchConditional %341 %343 %344
|
|
%343 = OpLabel
|
|
OpBranch %342
|
|
%344 = OpLabel
|
|
OpBranch %334
|
|
%342 = OpLabel
|
|
OpKill
|
|
%335 = OpLabel
|
|
OpBranch %333
|
|
%334 = OpLabel
|
|
OpBranch %330
|
|
%332 = OpLabel
|
|
%345 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%346 = OpLoad %float %345
|
|
%347 = OpConvertFToS %int %346
|
|
%349 = OpSLessThan %bool %347 %int_180
|
|
OpSelectionMerge %350 None
|
|
OpBranchConditional %349 %351 %352
|
|
%351 = OpLabel
|
|
%354 = OpAccessChain %_ptr_Private_int %data %int_5
|
|
%355 = OpLoad %int %354
|
|
%356 = OpConvertSToF %float %355
|
|
%357 = OpFDiv %float %356 %float_10
|
|
%358 = OpFAdd %float %float_0_5 %357
|
|
OpStore %grey %358
|
|
OpBranch %350
|
|
%352 = OpLabel
|
|
%359 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%360 = OpLoad %float %359
|
|
%361 = OpConvertFToS %int %360
|
|
%363 = OpSLessThan %bool %361 %int_210
|
|
OpSelectionMerge %364 None
|
|
OpBranchConditional %363 %365 %366
|
|
%365 = OpLabel
|
|
%368 = OpAccessChain %_ptr_Private_int %data %int_6
|
|
%369 = OpLoad %int %368
|
|
%370 = OpConvertSToF %float %369
|
|
%371 = OpFDiv %float %370 %float_10
|
|
%372 = OpFAdd %float %float_0_5 %371
|
|
OpStore %grey %372
|
|
OpBranch %364
|
|
%366 = OpLabel
|
|
%373 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%374 = OpLoad %float %373
|
|
%375 = OpConvertFToS %int %374
|
|
%377 = OpSLessThan %bool %375 %int_240
|
|
OpSelectionMerge %378 None
|
|
OpBranchConditional %377 %379 %380
|
|
%379 = OpLabel
|
|
%382 = OpAccessChain %_ptr_Private_int %data %int_7
|
|
%383 = OpLoad %int %382
|
|
%384 = OpConvertSToF %float %383
|
|
%385 = OpFDiv %float %384 %float_10
|
|
%386 = OpFAdd %float %float_0_5 %385
|
|
OpStore %grey %386
|
|
OpBranch %378
|
|
%380 = OpLabel
|
|
%387 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%388 = OpLoad %float %387
|
|
%389 = OpConvertFToS %int %388
|
|
%391 = OpSLessThan %bool %389 %int_270
|
|
OpSelectionMerge %392 None
|
|
OpBranchConditional %391 %393 %394
|
|
%393 = OpLabel
|
|
%396 = OpAccessChain %_ptr_Private_int %data %int_8
|
|
%397 = OpLoad %int %396
|
|
%398 = OpConvertSToF %float %397
|
|
%399 = OpFDiv %float %398 %float_10
|
|
%400 = OpFAdd %float %float_0_5 %399
|
|
OpStore %grey %400
|
|
OpBranch %392
|
|
%394 = OpLabel
|
|
OpKill
|
|
%392 = OpLabel
|
|
OpBranch %378
|
|
%378 = OpLabel
|
|
OpBranch %364
|
|
%364 = OpLabel
|
|
OpBranch %350
|
|
%350 = OpLabel
|
|
OpBranch %330
|
|
%330 = OpLabel
|
|
OpBranch %317
|
|
%317 = OpLabel
|
|
OpBranch %304
|
|
%304 = OpLabel
|
|
OpBranch %291
|
|
%291 = OpLabel
|
|
OpBranch %276
|
|
%276 = OpLabel
|
|
%401 = OpLoad %float %grey
|
|
%403 = OpCompositeConstruct %v3float %401 %401 %401
|
|
%404 = OpCompositeExtract %float %403 0
|
|
%405 = OpCompositeExtract %float %403 1
|
|
%406 = OpCompositeExtract %float %403 2
|
|
%408 = OpCompositeConstruct %v4float %404 %405 %406 %float_1
|
|
OpStore %x_GLF_color %408
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%tint_symbol_3 = OpFunction %void None %409
|
|
%tint_symbol_1 = OpFunctionParameter %main_out
|
|
%413 = OpLabel
|
|
%414 = OpCompositeExtract %v4float %tint_symbol_1 0
|
|
OpStore %tint_symbol_2 %414
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %128
|
|
%416 = OpLabel
|
|
%417 = OpLoad %v4float %tint_symbol
|
|
OpStore %gl_FragCoord %417
|
|
%418 = OpFunctionCall %void %main_1
|
|
%420 = OpLoad %v4float %x_GLF_color
|
|
%421 = OpCompositeConstruct %main_out %420
|
|
%419 = OpFunctionCall %void %tint_symbol_3 %421
|
|
OpReturn
|
|
OpFunctionEnd
|