mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-10 15:15:58 +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>
649 lines
24 KiB
Plaintext
649 lines
24 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 418
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
%183 = 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 %buf1 "buf1"
|
|
OpMemberName %buf1 0 "resolution"
|
|
OpName %x_32 "x_32"
|
|
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 %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 %buf1 Block
|
|
OpMemberDecorate %buf1 0 Offset 0
|
|
OpDecorate %x_32 NonWritable
|
|
OpDecorate %x_32 DescriptorSet 0
|
|
OpDecorate %x_32 Binding 1
|
|
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
|
|
%buf1 = OpTypeStruct %v2float
|
|
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
|
%x_32 = OpVariable %_ptr_Uniform_buf1 Uniform
|
|
%_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
|
|
%26 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int %_ptr_Function_int
|
|
%35 = OpConstantNull %int
|
|
%int_1 = OpConstant %int 1
|
|
%bool = OpTypeBool
|
|
%_ptr_Private_int = OpTypePointer Private %int
|
|
%float_256 = OpConstant %float 256
|
|
%float_1 = OpConstant %float 1
|
|
%int_10 = OpConstant %int 10
|
|
%138 = OpTypeFunction %void
|
|
%int_0 = OpConstant %int 0
|
|
%int_9 = OpConstant %int 9
|
|
%int_2 = OpConstant %int 2
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
%207 = 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
|
|
%main_out = OpTypeStruct %v4float
|
|
%405 = OpTypeFunction %void %main_out
|
|
%merge_i1_i1_i1_ = OpFunction %void None %26
|
|
%from = OpFunctionParameter %_ptr_Function_int
|
|
%mid = OpFunctionParameter %_ptr_Function_int
|
|
%to = OpFunctionParameter %_ptr_Function_int
|
|
%33 = OpLabel
|
|
%k = OpVariable %_ptr_Function_int Function %35
|
|
%i = OpVariable %_ptr_Function_int Function %35
|
|
%j = OpVariable %_ptr_Function_int Function %35
|
|
%i_1 = OpVariable %_ptr_Function_int Function %35
|
|
%40 = OpLoad %int %from
|
|
OpStore %k %40
|
|
%42 = OpLoad %int %from
|
|
OpStore %i %42
|
|
%44 = OpLoad %int %mid
|
|
%46 = OpIAdd %int %44 %int_1
|
|
OpStore %j %46
|
|
OpBranch %47
|
|
%47 = OpLabel
|
|
OpLoopMerge %48 %49 None
|
|
OpBranch %50
|
|
%50 = OpLabel
|
|
%51 = OpLoad %int %i
|
|
%53 = OpLoad %int %mid
|
|
%54 = OpLoad %int %j
|
|
%56 = OpLoad %int %to
|
|
%57 = OpSLessThanEqual %bool %51 %53
|
|
%59 = OpSLessThanEqual %bool %54 %56
|
|
%60 = OpLogicalAnd %bool %57 %59
|
|
OpSelectionMerge %61 None
|
|
OpBranchConditional %60 %62 %63
|
|
%62 = OpLabel
|
|
OpBranch %61
|
|
%63 = OpLabel
|
|
OpBranch %48
|
|
%61 = OpLabel
|
|
%64 = OpLoad %int %i
|
|
%66 = OpAccessChain %_ptr_Private_int %data %64
|
|
%67 = OpLoad %int %66
|
|
%68 = OpLoad %int %j
|
|
%69 = OpAccessChain %_ptr_Private_int %data %68
|
|
%70 = OpLoad %int %69
|
|
%71 = OpSLessThan %bool %67 %70
|
|
OpSelectionMerge %72 None
|
|
OpBranchConditional %71 %73 %74
|
|
%73 = OpLabel
|
|
%75 = OpLoad %int %k
|
|
%76 = OpIAdd %int %75 %int_1
|
|
OpStore %k %76
|
|
%77 = OpLoad %int %i
|
|
%78 = OpIAdd %int %77 %int_1
|
|
OpStore %i %78
|
|
%79 = OpAccessChain %_ptr_Private_int %data %77
|
|
%80 = OpLoad %int %79
|
|
%81 = OpAccessChain %_ptr_Private_int %temp %75
|
|
OpStore %81 %80
|
|
OpBranch %72
|
|
%74 = OpLabel
|
|
%82 = OpLoad %int %k
|
|
%83 = OpIAdd %int %82 %int_1
|
|
OpStore %k %83
|
|
%84 = OpLoad %int %j
|
|
%85 = OpIAdd %int %84 %int_1
|
|
OpStore %j %85
|
|
%86 = OpAccessChain %_ptr_Private_int %data %84
|
|
%87 = OpLoad %int %86
|
|
%88 = OpAccessChain %_ptr_Private_int %temp %82
|
|
OpStore %88 %87
|
|
OpBranch %72
|
|
%72 = OpLabel
|
|
OpBranch %49
|
|
%49 = OpLabel
|
|
OpBranch %47
|
|
%48 = OpLabel
|
|
OpBranch %89
|
|
%89 = OpLabel
|
|
OpLoopMerge %90 %91 None
|
|
OpBranch %92
|
|
%92 = OpLabel
|
|
%96 = OpFOrdLessThan %bool %float_256 %float_1
|
|
%93 = OpLogicalNot %bool %96
|
|
OpSelectionMerge %97 None
|
|
OpBranchConditional %93 %98 %99
|
|
%98 = OpLabel
|
|
OpBranch %97
|
|
%99 = OpLabel
|
|
OpBranch %91
|
|
%97 = OpLabel
|
|
%100 = OpLoad %int %i
|
|
%101 = OpLoad %int %i
|
|
%103 = OpLoad %int %mid
|
|
%105 = OpSLessThan %bool %100 %int_10
|
|
%106 = OpSLessThanEqual %bool %101 %103
|
|
%107 = OpLogicalAnd %bool %105 %106
|
|
OpSelectionMerge %108 None
|
|
OpBranchConditional %107 %109 %110
|
|
%109 = OpLabel
|
|
OpBranch %108
|
|
%110 = OpLabel
|
|
OpBranch %90
|
|
%108 = OpLabel
|
|
%111 = OpLoad %int %k
|
|
%112 = OpIAdd %int %111 %int_1
|
|
OpStore %k %112
|
|
%113 = OpLoad %int %i
|
|
%114 = OpIAdd %int %113 %int_1
|
|
OpStore %i %114
|
|
%115 = OpAccessChain %_ptr_Private_int %data %113
|
|
%116 = OpLoad %int %115
|
|
%117 = OpAccessChain %_ptr_Private_int %temp %111
|
|
OpStore %117 %116
|
|
OpBranch %91
|
|
%91 = OpLabel
|
|
OpBranch %89
|
|
%90 = OpLabel
|
|
%119 = OpLoad %int %from
|
|
OpStore %i_1 %119
|
|
OpBranch %120
|
|
%120 = OpLabel
|
|
OpLoopMerge %121 %122 None
|
|
OpBranch %123
|
|
%123 = OpLabel
|
|
%124 = OpLoad %int %i_1
|
|
%126 = OpLoad %int %to
|
|
%127 = OpSLessThanEqual %bool %124 %126
|
|
OpSelectionMerge %128 None
|
|
OpBranchConditional %127 %129 %130
|
|
%129 = OpLabel
|
|
OpBranch %128
|
|
%130 = OpLabel
|
|
OpBranch %121
|
|
%128 = OpLabel
|
|
%131 = OpLoad %int %i_1
|
|
%132 = OpLoad %int %i_1
|
|
%133 = OpAccessChain %_ptr_Private_int %temp %132
|
|
%134 = OpLoad %int %133
|
|
%135 = OpAccessChain %_ptr_Private_int %data %131
|
|
OpStore %135 %134
|
|
OpBranch %122
|
|
%122 = OpLabel
|
|
%136 = OpLoad %int %i_1
|
|
%137 = OpIAdd %int %136 %int_1
|
|
OpStore %i_1 %137
|
|
OpBranch %120
|
|
%121 = OpLabel
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%mergeSort_ = OpFunction %void None %138
|
|
%140 = OpLabel
|
|
%low = OpVariable %_ptr_Function_int Function %35
|
|
%high = OpVariable %_ptr_Function_int Function %35
|
|
%m = OpVariable %_ptr_Function_int Function %35
|
|
%i_2 = OpVariable %_ptr_Function_int Function %35
|
|
%from_1 = OpVariable %_ptr_Function_int Function %35
|
|
%mid_1 = OpVariable %_ptr_Function_int Function %35
|
|
%to_1 = OpVariable %_ptr_Function_int Function %35
|
|
%param = OpVariable %_ptr_Function_int Function %35
|
|
%param_1 = OpVariable %_ptr_Function_int Function %35
|
|
%param_2 = OpVariable %_ptr_Function_int Function %35
|
|
OpStore %low %int_0
|
|
OpStore %high %int_9
|
|
OpStore %m %int_1
|
|
OpBranch %153
|
|
%153 = OpLabel
|
|
OpLoopMerge %154 %155 None
|
|
OpBranch %156
|
|
%156 = OpLabel
|
|
%157 = OpLoad %int %m
|
|
%158 = OpLoad %int %high
|
|
%159 = OpSLessThanEqual %bool %157 %158
|
|
OpSelectionMerge %160 None
|
|
OpBranchConditional %159 %161 %162
|
|
%161 = OpLabel
|
|
OpBranch %160
|
|
%162 = OpLabel
|
|
OpBranch %154
|
|
%160 = OpLabel
|
|
%163 = OpLoad %int %low
|
|
OpStore %i_2 %163
|
|
OpBranch %164
|
|
%164 = OpLabel
|
|
OpLoopMerge %165 %166 None
|
|
OpBranch %167
|
|
%167 = OpLabel
|
|
%168 = OpLoad %int %i_2
|
|
%169 = OpLoad %int %high
|
|
%170 = OpSLessThan %bool %168 %169
|
|
OpSelectionMerge %171 None
|
|
OpBranchConditional %170 %172 %173
|
|
%172 = OpLabel
|
|
OpBranch %171
|
|
%173 = OpLabel
|
|
OpBranch %165
|
|
%171 = OpLabel
|
|
%174 = OpLoad %int %i_2
|
|
OpStore %from_1 %174
|
|
%175 = OpLoad %int %i_2
|
|
%176 = OpLoad %int %m
|
|
%177 = OpIAdd %int %175 %176
|
|
%178 = OpISub %int %177 %int_1
|
|
OpStore %mid_1 %178
|
|
%179 = OpLoad %int %i_2
|
|
%180 = OpLoad %int %m
|
|
%181 = OpLoad %int %high
|
|
%185 = OpIMul %int %int_2 %180
|
|
%186 = OpIAdd %int %179 %185
|
|
%187 = OpISub %int %186 %int_1
|
|
%182 = OpExtInst %int %183 SMin %187 %181
|
|
OpStore %to_1 %182
|
|
%188 = OpLoad %int %from_1
|
|
OpStore %param %188
|
|
%189 = OpLoad %int %mid_1
|
|
OpStore %param_1 %189
|
|
%190 = OpLoad %int %to_1
|
|
OpStore %param_2 %190
|
|
%191 = OpFunctionCall %void %merge_i1_i1_i1_ %param %param_1 %param_2
|
|
OpBranch %166
|
|
%166 = OpLabel
|
|
%195 = OpLoad %int %m
|
|
%196 = OpLoad %int %i_2
|
|
%197 = OpIMul %int %int_2 %195
|
|
%198 = OpIAdd %int %196 %197
|
|
OpStore %i_2 %198
|
|
OpBranch %164
|
|
%165 = OpLabel
|
|
OpBranch %155
|
|
%155 = OpLabel
|
|
%199 = OpLoad %int %m
|
|
%200 = OpIMul %int %int_2 %199
|
|
OpStore %m %200
|
|
OpBranch %153
|
|
%154 = OpLabel
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main_1 = OpFunction %void None %138
|
|
%202 = OpLabel
|
|
%i_3 = OpVariable %_ptr_Function_int Function %35
|
|
%j_1 = OpVariable %_ptr_Function_int Function %35
|
|
%grey = OpVariable %_ptr_Function_float Function %207
|
|
%210 = OpAccessChain %_ptr_Uniform_float %x_28 %uint_0 %uint_0
|
|
%211 = OpLoad %float %210
|
|
%212 = OpConvertFToS %int %211
|
|
OpStore %i_3 %212
|
|
OpBranch %213
|
|
%213 = OpLabel
|
|
OpLoopMerge %214 %215 None
|
|
OpBranch %216
|
|
%216 = OpLabel
|
|
%217 = OpLoad %int %i_3
|
|
OpSelectionMerge %218 None
|
|
OpSwitch %217 %219 9 %220 8 %221 7 %222 6 %223 5 %224 4 %225 3 %226 2 %227 1 %228 0 %229
|
|
%220 = OpLabel
|
|
%230 = OpLoad %int %i_3
|
|
%231 = OpAccessChain %_ptr_Private_int %data %230
|
|
OpStore %231 %int_n5
|
|
OpBranch %218
|
|
%221 = OpLabel
|
|
%233 = OpLoad %int %i_3
|
|
%234 = OpAccessChain %_ptr_Private_int %data %233
|
|
OpStore %234 %int_n4
|
|
OpBranch %218
|
|
%222 = OpLabel
|
|
%236 = OpLoad %int %i_3
|
|
%237 = OpAccessChain %_ptr_Private_int %data %236
|
|
OpStore %237 %int_n3
|
|
OpBranch %218
|
|
%223 = OpLabel
|
|
%239 = OpLoad %int %i_3
|
|
%240 = OpAccessChain %_ptr_Private_int %data %239
|
|
OpStore %240 %int_n2
|
|
OpBranch %218
|
|
%224 = OpLabel
|
|
%242 = OpLoad %int %i_3
|
|
%243 = OpAccessChain %_ptr_Private_int %data %242
|
|
OpStore %243 %int_n1
|
|
OpBranch %218
|
|
%225 = OpLabel
|
|
%245 = OpLoad %int %i_3
|
|
%246 = OpAccessChain %_ptr_Private_int %data %245
|
|
OpStore %246 %int_0
|
|
OpBranch %218
|
|
%226 = OpLabel
|
|
%247 = OpLoad %int %i_3
|
|
%248 = OpAccessChain %_ptr_Private_int %data %247
|
|
OpStore %248 %int_1
|
|
OpBranch %218
|
|
%227 = OpLabel
|
|
%249 = OpLoad %int %i_3
|
|
%250 = OpAccessChain %_ptr_Private_int %data %249
|
|
OpStore %250 %int_2
|
|
OpBranch %218
|
|
%228 = OpLabel
|
|
%251 = OpLoad %int %i_3
|
|
%252 = OpAccessChain %_ptr_Private_int %data %251
|
|
OpStore %252 %int_3
|
|
OpBranch %218
|
|
%229 = OpLabel
|
|
%254 = OpLoad %int %i_3
|
|
%255 = OpAccessChain %_ptr_Private_int %data %254
|
|
OpStore %255 %int_4
|
|
OpBranch %218
|
|
%219 = OpLabel
|
|
OpBranch %218
|
|
%218 = OpLabel
|
|
%257 = OpLoad %int %i_3
|
|
%258 = OpIAdd %int %257 %int_1
|
|
OpStore %i_3 %258
|
|
OpBranch %215
|
|
%215 = OpLabel
|
|
%259 = OpLoad %int %i_3
|
|
%260 = OpSLessThan %bool %259 %int_10
|
|
OpBranchConditional %260 %213 %214
|
|
%214 = OpLabel
|
|
OpStore %j_1 %int_0
|
|
OpBranch %261
|
|
%261 = OpLabel
|
|
OpLoopMerge %262 %263 None
|
|
OpBranch %264
|
|
%264 = OpLabel
|
|
%265 = OpLoad %int %j_1
|
|
%266 = OpSLessThan %bool %265 %int_10
|
|
OpSelectionMerge %267 None
|
|
OpBranchConditional %266 %268 %269
|
|
%268 = OpLabel
|
|
OpBranch %267
|
|
%269 = OpLabel
|
|
OpBranch %262
|
|
%267 = OpLabel
|
|
%270 = OpLoad %int %j_1
|
|
%271 = OpLoad %int %j_1
|
|
%272 = OpAccessChain %_ptr_Private_int %data %271
|
|
%273 = OpLoad %int %272
|
|
%274 = OpAccessChain %_ptr_Private_int %temp %270
|
|
OpStore %274 %273
|
|
OpBranch %263
|
|
%263 = OpLabel
|
|
%275 = OpLoad %int %j_1
|
|
%276 = OpIAdd %int %275 %int_1
|
|
OpStore %j_1 %276
|
|
OpBranch %261
|
|
%262 = OpLabel
|
|
%277 = OpFunctionCall %void %mergeSort_
|
|
%280 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%281 = OpLoad %float %280
|
|
%282 = OpConvertFToS %int %281
|
|
%284 = OpSLessThan %bool %282 %int_30
|
|
OpSelectionMerge %285 None
|
|
OpBranchConditional %284 %286 %287
|
|
%286 = OpLabel
|
|
%288 = OpAccessChain %_ptr_Private_int %data %int_0
|
|
%289 = OpLoad %int %288
|
|
%291 = OpConvertSToF %float %289
|
|
%293 = OpFDiv %float %291 %float_10
|
|
%294 = OpFAdd %float %float_0_5 %293
|
|
OpStore %grey %294
|
|
OpBranch %285
|
|
%287 = OpLabel
|
|
%295 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%296 = OpLoad %float %295
|
|
%297 = OpConvertFToS %int %296
|
|
%299 = OpSLessThan %bool %297 %int_60
|
|
OpSelectionMerge %300 None
|
|
OpBranchConditional %299 %301 %302
|
|
%301 = OpLabel
|
|
%303 = OpAccessChain %_ptr_Private_int %data %int_1
|
|
%304 = OpLoad %int %303
|
|
%305 = OpConvertSToF %float %304
|
|
%306 = OpFDiv %float %305 %float_10
|
|
%307 = OpFAdd %float %float_0_5 %306
|
|
OpStore %grey %307
|
|
OpBranch %300
|
|
%302 = OpLabel
|
|
%308 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%309 = OpLoad %float %308
|
|
%310 = OpConvertFToS %int %309
|
|
%312 = OpSLessThan %bool %310 %int_90
|
|
OpSelectionMerge %313 None
|
|
OpBranchConditional %312 %314 %315
|
|
%314 = OpLabel
|
|
%316 = OpAccessChain %_ptr_Private_int %data %int_2
|
|
%317 = OpLoad %int %316
|
|
%318 = OpConvertSToF %float %317
|
|
%319 = OpFDiv %float %318 %float_10
|
|
%320 = OpFAdd %float %float_0_5 %319
|
|
OpStore %grey %320
|
|
OpBranch %313
|
|
%315 = OpLabel
|
|
%321 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%322 = OpLoad %float %321
|
|
%323 = OpConvertFToS %int %322
|
|
%325 = OpSLessThan %bool %323 %int_120
|
|
OpSelectionMerge %326 None
|
|
OpBranchConditional %325 %327 %328
|
|
%327 = OpLabel
|
|
%329 = OpAccessChain %_ptr_Private_int %data %int_3
|
|
%330 = OpLoad %int %329
|
|
%331 = OpConvertSToF %float %330
|
|
%332 = OpFDiv %float %331 %float_10
|
|
%333 = OpFAdd %float %float_0_5 %332
|
|
OpStore %grey %333
|
|
OpBranch %326
|
|
%328 = OpLabel
|
|
%334 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%335 = OpLoad %float %334
|
|
%336 = OpConvertFToS %int %335
|
|
%338 = OpSLessThan %bool %336 %int_150
|
|
OpSelectionMerge %339 None
|
|
OpBranchConditional %338 %340 %341
|
|
%340 = OpLabel
|
|
OpKill
|
|
%341 = OpLabel
|
|
%342 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%343 = OpLoad %float %342
|
|
%344 = OpConvertFToS %int %343
|
|
%346 = OpSLessThan %bool %344 %int_180
|
|
OpSelectionMerge %347 None
|
|
OpBranchConditional %346 %348 %349
|
|
%348 = OpLabel
|
|
%351 = OpAccessChain %_ptr_Private_int %data %int_5
|
|
%352 = OpLoad %int %351
|
|
%353 = OpConvertSToF %float %352
|
|
%354 = OpFDiv %float %353 %float_10
|
|
%355 = OpFAdd %float %float_0_5 %354
|
|
OpStore %grey %355
|
|
OpBranch %347
|
|
%349 = OpLabel
|
|
%356 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%357 = OpLoad %float %356
|
|
%358 = OpConvertFToS %int %357
|
|
%360 = OpSLessThan %bool %358 %int_210
|
|
OpSelectionMerge %361 None
|
|
OpBranchConditional %360 %362 %363
|
|
%362 = OpLabel
|
|
%365 = OpAccessChain %_ptr_Private_int %data %int_6
|
|
%366 = OpLoad %int %365
|
|
%367 = OpConvertSToF %float %366
|
|
%368 = OpFDiv %float %367 %float_10
|
|
%369 = OpFAdd %float %float_0_5 %368
|
|
OpStore %grey %369
|
|
OpBranch %361
|
|
%363 = OpLabel
|
|
%370 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%371 = OpLoad %float %370
|
|
%372 = OpConvertFToS %int %371
|
|
%374 = OpSLessThan %bool %372 %int_240
|
|
OpSelectionMerge %375 None
|
|
OpBranchConditional %374 %376 %377
|
|
%376 = OpLabel
|
|
%379 = OpAccessChain %_ptr_Private_int %data %int_7
|
|
%380 = OpLoad %int %379
|
|
%381 = OpConvertSToF %float %380
|
|
%382 = OpFDiv %float %381 %float_10
|
|
%383 = OpFAdd %float %float_0_5 %382
|
|
OpStore %grey %383
|
|
OpBranch %375
|
|
%377 = OpLabel
|
|
%384 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
|
|
%385 = OpLoad %float %384
|
|
%386 = OpConvertFToS %int %385
|
|
%388 = OpSLessThan %bool %386 %int_270
|
|
OpSelectionMerge %389 None
|
|
OpBranchConditional %388 %390 %391
|
|
%390 = OpLabel
|
|
%393 = OpAccessChain %_ptr_Private_int %data %int_8
|
|
%394 = OpLoad %int %393
|
|
%395 = OpConvertSToF %float %394
|
|
%396 = OpFDiv %float %395 %float_10
|
|
%397 = OpFAdd %float %float_0_5 %396
|
|
OpStore %grey %397
|
|
OpBranch %389
|
|
%391 = OpLabel
|
|
OpKill
|
|
%389 = OpLabel
|
|
OpBranch %375
|
|
%375 = OpLabel
|
|
OpBranch %361
|
|
%361 = OpLabel
|
|
OpBranch %347
|
|
%347 = OpLabel
|
|
OpBranch %339
|
|
%339 = OpLabel
|
|
OpBranch %326
|
|
%326 = OpLabel
|
|
OpBranch %313
|
|
%313 = OpLabel
|
|
OpBranch %300
|
|
%300 = OpLabel
|
|
OpBranch %285
|
|
%285 = OpLabel
|
|
%398 = OpLoad %float %grey
|
|
%400 = OpCompositeConstruct %v3float %398 %398 %398
|
|
%401 = OpCompositeExtract %float %400 0
|
|
%402 = OpCompositeExtract %float %400 1
|
|
%403 = OpCompositeExtract %float %400 2
|
|
%404 = OpCompositeConstruct %v4float %401 %402 %403 %float_1
|
|
OpStore %x_GLF_color %404
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%tint_symbol_3 = OpFunction %void None %405
|
|
%tint_symbol_1 = OpFunctionParameter %main_out
|
|
%409 = OpLabel
|
|
%410 = OpCompositeExtract %v4float %tint_symbol_1 0
|
|
OpStore %tint_symbol_2 %410
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %138
|
|
%412 = OpLabel
|
|
%413 = OpLoad %v4float %tint_symbol
|
|
OpStore %gl_FragCoord %413
|
|
%414 = OpFunctionCall %void %main_1
|
|
%416 = OpLoad %v4float %x_GLF_color
|
|
%417 = OpCompositeConstruct %main_out %416
|
|
%415 = OpFunctionCall %void %tint_symbol_3 %417
|
|
OpReturn
|
|
OpFunctionEnd
|