mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-13 00:26:00 +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>
789 lines
32 KiB
Plaintext
789 lines
32 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 527
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpName %BST "BST"
|
|
OpMemberName %BST 0 "data"
|
|
OpMemberName %BST 1 "leftIndex"
|
|
OpMemberName %BST 2 "rightIndex"
|
|
OpName %tree_1 "tree_1"
|
|
OpName %buf0 "buf0"
|
|
OpMemberName %buf0 0 "injectionSwitch"
|
|
OpName %x_27 "x_27"
|
|
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 %makeTreeNode_struct_BST_i1_i1_i11_i1_ "makeTreeNode_struct_BST_i1_i1_i11_i1_"
|
|
OpName %tree "tree"
|
|
OpName %data "data"
|
|
OpName %insert_i1_i1_ "insert_i1_i1_"
|
|
OpName %treeIndex "treeIndex"
|
|
OpName %data_1 "data_1"
|
|
OpName %baseIndex "baseIndex"
|
|
OpName %param "param"
|
|
OpName %param_1 "param_1"
|
|
OpName %param_2 "param_2"
|
|
OpName %param_3 "param_3"
|
|
OpName %GLF_live8i "GLF_live8i"
|
|
OpName %GLF_live8A "GLF_live8A"
|
|
OpName %search_i1_ "search_i1_"
|
|
OpName %target "target"
|
|
OpName %index "index"
|
|
OpName %currentNode "currentNode"
|
|
OpName %x_387 "x_387"
|
|
OpName %makeFrame_f1_ "makeFrame_f1_"
|
|
OpName %v "v"
|
|
OpName %param_5 "param_5"
|
|
OpName %param_6 "param_6"
|
|
OpName %param_7 "param_7"
|
|
OpName %hueColor_f1_ "hueColor_f1_"
|
|
OpName %angle "angle"
|
|
OpName %nodeData "nodeData"
|
|
OpName %param_4 "param_4"
|
|
OpName %main_1 "main_1"
|
|
OpName %treeIndex_1 "treeIndex_1"
|
|
OpName %param_8 "param_8"
|
|
OpName %param_9 "param_9"
|
|
OpName %param_10 "param_10"
|
|
OpName %param_11 "param_11"
|
|
OpName %GLF_live1_looplimiter2 "GLF_live1_looplimiter2"
|
|
OpName %GLF_live1i "GLF_live1i"
|
|
OpName %param_12 "param_12"
|
|
OpName %param_13 "param_13"
|
|
OpName %param_14 "param_14"
|
|
OpName %param_15 "param_15"
|
|
OpName %param_16 "param_16"
|
|
OpName %param_17 "param_17"
|
|
OpName %param_18 "param_18"
|
|
OpName %param_19 "param_19"
|
|
OpName %param_20 "param_20"
|
|
OpName %param_21 "param_21"
|
|
OpName %param_22 "param_22"
|
|
OpName %param_23 "param_23"
|
|
OpName %GLF_live4_looplimiter3 "GLF_live4_looplimiter3"
|
|
OpName %GLF_live4i "GLF_live4i"
|
|
OpName %GLF_live4index "GLF_live4index"
|
|
OpName %Obj "Obj"
|
|
OpMemberName %Obj 0 "odd_numbers"
|
|
OpMemberName %Obj 1 "even_numbers"
|
|
OpName %GLF_live4obj "GLF_live4obj"
|
|
OpName %param_24 "param_24"
|
|
OpName %param_25 "param_25"
|
|
OpName %param_26 "param_26"
|
|
OpName %param_27 "param_27"
|
|
OpName %z "z"
|
|
OpName %x "x"
|
|
OpName %param_28 "param_28"
|
|
OpName %y "y"
|
|
OpName %param_29 "param_29"
|
|
OpName %sum "sum"
|
|
OpName %target_1 "target_1"
|
|
OpName %result "result"
|
|
OpName %param_30 "param_30"
|
|
OpName %a "a"
|
|
OpName %x_235 "x_235"
|
|
OpName %param_31 "param_31"
|
|
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"
|
|
OpMemberDecorate %BST 0 Offset 0
|
|
OpMemberDecorate %BST 1 Offset 4
|
|
OpMemberDecorate %BST 2 Offset 8
|
|
OpDecorate %_arr_BST_uint_10 ArrayStride 12
|
|
OpDecorate %buf0 Block
|
|
OpMemberDecorate %buf0 0 Offset 0
|
|
OpDecorate %x_27 NonWritable
|
|
OpDecorate %x_27 DescriptorSet 0
|
|
OpDecorate %x_27 Binding 0
|
|
OpDecorate %tint_symbol BuiltIn FragCoord
|
|
OpDecorate %tint_symbol_2 Location 0
|
|
OpDecorate %_arr_float_uint_50 ArrayStride 4
|
|
OpMemberDecorate %Obj 0 Offset 0
|
|
OpDecorate %_arr_float_uint_10 ArrayStride 4
|
|
OpMemberDecorate %Obj 1 Offset 40
|
|
OpMemberDecorate %main_out 0 Offset 0
|
|
%int = OpTypeInt 32 1
|
|
%BST = OpTypeStruct %int %int %int
|
|
%uint = OpTypeInt 32 0
|
|
%uint_10 = OpConstant %uint 10
|
|
%_arr_BST_uint_10 = OpTypeArray %BST %uint_10
|
|
%_ptr_Private__arr_BST_uint_10 = OpTypePointer Private %_arr_BST_uint_10
|
|
%8 = OpConstantNull %_arr_BST_uint_10
|
|
%tree_1 = OpVariable %_ptr_Private__arr_BST_uint_10 Private %8
|
|
%float = OpTypeFloat 32
|
|
%v2float = OpTypeVector %float 2
|
|
%buf0 = OpTypeStruct %v2float
|
|
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
|
%x_27 = 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_BST = OpTypePointer Function %BST
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
%23 = OpTypeFunction %void %_ptr_Function_BST %_ptr_Function_int
|
|
%uint_0 = OpConstant %uint 0
|
|
%uint_1 = OpConstant %uint 1
|
|
%int_n1 = OpConstant %int -1
|
|
%uint_2 = OpConstant %uint 2
|
|
%43 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int
|
|
%49 = OpConstantNull %int
|
|
%51 = OpConstantNull %BST
|
|
%uint_50 = OpConstant %uint 50
|
|
%_arr_float_uint_50 = OpTypeArray %float %uint_50
|
|
%_ptr_Function__arr_float_uint_50 = OpTypePointer Function %_arr_float_uint_50
|
|
%60 = OpConstantNull %_arr_float_uint_50
|
|
%int_0 = OpConstant %int 0
|
|
%bool = OpTypeBool
|
|
%_ptr_Private_int = OpTypePointer Private %int
|
|
%_ptr_Private_BST = OpTypePointer Private %BST
|
|
%int_1 = OpConstant %int 1
|
|
%int_50 = OpConstant %int 50
|
|
%_ptr_Function_float = OpTypePointer Function %float
|
|
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
|
%161 = OpTypeFunction %int %_ptr_Function_int
|
|
%202 = OpTypeFunction %float %_ptr_Function_float
|
|
%float_6_5 = OpConstant %float 6.5
|
|
%float_1_5 = OpConstant %float 1.5
|
|
%int_100 = OpConstant %int 100
|
|
%float_4 = OpConstant %float 4
|
|
%float_0 = OpConstant %float 0
|
|
%int_6 = OpConstant %int 6
|
|
%float_1 = OpConstant %float 1
|
|
%int_30 = OpConstant %int 30
|
|
%float_10 = OpConstant %float 10
|
|
%v3float = OpTypeVector %float 3
|
|
%247 = OpTypeFunction %v3float %_ptr_Function_float
|
|
%253 = OpConstantNull %float
|
|
%int_15 = OpConstant %int 15
|
|
%float_30 = OpConstant %float 30
|
|
%263 = OpConstantComposite %v3float %float_30 %float_30 %float_30
|
|
%float_5 = OpConstant %float 5
|
|
%float_50 = OpConstant %float 50
|
|
%269 = OpConstantComposite %v3float %float_50 %float_50 %float_50
|
|
%271 = OpTypeFunction %void
|
|
%_arr_float_uint_10 = OpTypeArray %float %uint_10
|
|
%Obj = OpTypeStruct %_arr_float_uint_10 %_arr_float_uint_10
|
|
%_ptr_Function_Obj = OpTypePointer Function %Obj
|
|
%300 = OpConstantNull %Obj
|
|
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
|
%307 = OpConstantNull %v2float
|
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
|
%319 = OpConstantNull %v3float
|
|
%int_9 = OpConstant %int 9
|
|
%int_5 = OpConstant %int 5
|
|
%true = OpConstantTrue %bool
|
|
%int_7 = OpConstant %int 7
|
|
%int_12 = OpConstant %int 12
|
|
%int_8 = OpConstant %int 8
|
|
%int_2 = OpConstant %int 2
|
|
%int_3 = OpConstant %int 3
|
|
%int_10 = OpConstant %int 10
|
|
%int_17 = OpConstant %int 17
|
|
%int_13 = OpConstant %int 13
|
|
%float_256 = OpConstant %float 256
|
|
%453 = OpConstantComposite %v2float %float_256 %float_256
|
|
%int_n100 = OpConstant %int -100
|
|
%int_20 = OpConstant %int 20
|
|
%505 = OpConstantComposite %v3float %float_1 %float_0 %float_0
|
|
%main_out = OpTypeStruct %v4float
|
|
%514 = OpTypeFunction %void %main_out
|
|
%makeTreeNode_struct_BST_i1_i1_i11_i1_ = OpFunction %void None %23
|
|
%tree = OpFunctionParameter %_ptr_Function_BST
|
|
%data = OpFunctionParameter %_ptr_Function_int
|
|
%30 = OpLabel
|
|
%32 = OpLoad %int %data
|
|
%35 = OpAccessChain %_ptr_Function_int %tree %uint_0
|
|
OpStore %35 %32
|
|
%38 = OpAccessChain %_ptr_Function_int %tree %uint_1
|
|
OpStore %38 %int_n1
|
|
%42 = OpAccessChain %_ptr_Function_int %tree %uint_2
|
|
OpStore %42 %int_n1
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%insert_i1_i1_ = OpFunction %void None %43
|
|
%treeIndex = OpFunctionParameter %_ptr_Function_int
|
|
%data_1 = OpFunctionParameter %_ptr_Function_int
|
|
%47 = OpLabel
|
|
%baseIndex = OpVariable %_ptr_Function_int Function %49
|
|
%param = OpVariable %_ptr_Function_BST Function %51
|
|
%param_1 = OpVariable %_ptr_Function_int Function %49
|
|
%param_2 = OpVariable %_ptr_Function_BST Function %51
|
|
%param_3 = OpVariable %_ptr_Function_int Function %49
|
|
%GLF_live8i = OpVariable %_ptr_Function_int Function %49
|
|
%GLF_live8A = OpVariable %_ptr_Function__arr_float_uint_50 Function %60
|
|
OpStore %baseIndex %int_0
|
|
OpBranch %62
|
|
%62 = OpLabel
|
|
OpLoopMerge %63 %64 None
|
|
OpBranch %65
|
|
%65 = OpLabel
|
|
%66 = OpLoad %int %baseIndex
|
|
%68 = OpLoad %int %treeIndex
|
|
%69 = OpSLessThanEqual %bool %66 %68
|
|
OpSelectionMerge %71 None
|
|
OpBranchConditional %69 %72 %73
|
|
%72 = OpLabel
|
|
OpBranch %71
|
|
%73 = OpLabel
|
|
OpBranch %63
|
|
%71 = OpLabel
|
|
%75 = OpLoad %int %data_1
|
|
%76 = OpLoad %int %baseIndex
|
|
%78 = OpAccessChain %_ptr_Private_int %tree_1 %76 %uint_0
|
|
%79 = OpLoad %int %78
|
|
%80 = OpSLessThanEqual %bool %75 %79
|
|
OpSelectionMerge %81 None
|
|
OpBranchConditional %80 %82 %83
|
|
%82 = OpLabel
|
|
%84 = OpLoad %int %baseIndex
|
|
%85 = OpAccessChain %_ptr_Private_int %tree_1 %84 %uint_1
|
|
%86 = OpLoad %int %85
|
|
%87 = OpIEqual %bool %86 %int_n1
|
|
OpSelectionMerge %88 None
|
|
OpBranchConditional %87 %89 %90
|
|
%89 = OpLabel
|
|
%91 = OpLoad %int %baseIndex
|
|
%93 = OpLoad %int %treeIndex
|
|
%94 = OpAccessChain %_ptr_Private_int %tree_1 %91 %uint_1
|
|
OpStore %94 %93
|
|
%96 = OpLoad %int %treeIndex
|
|
%98 = OpAccessChain %_ptr_Private_BST %tree_1 %96
|
|
%99 = OpLoad %BST %98
|
|
OpStore %param %99
|
|
%101 = OpLoad %int %data_1
|
|
OpStore %param_1 %101
|
|
%102 = OpFunctionCall %void %makeTreeNode_struct_BST_i1_i1_i11_i1_ %param %param_1
|
|
%105 = OpLoad %BST %param
|
|
%106 = OpAccessChain %_ptr_Private_BST %tree_1 %96
|
|
OpStore %106 %105
|
|
OpReturn
|
|
%90 = OpLabel
|
|
%107 = OpLoad %int %baseIndex
|
|
%108 = OpAccessChain %_ptr_Private_int %tree_1 %107 %uint_1
|
|
%109 = OpLoad %int %108
|
|
OpStore %baseIndex %109
|
|
OpBranch %64
|
|
%88 = OpLabel
|
|
OpBranch %81
|
|
%83 = OpLabel
|
|
%110 = OpLoad %int %baseIndex
|
|
%111 = OpAccessChain %_ptr_Private_int %tree_1 %110 %uint_2
|
|
%112 = OpLoad %int %111
|
|
%113 = OpIEqual %bool %112 %int_n1
|
|
OpSelectionMerge %114 None
|
|
OpBranchConditional %113 %115 %116
|
|
%115 = OpLabel
|
|
%117 = OpLoad %int %baseIndex
|
|
%119 = OpLoad %int %treeIndex
|
|
%120 = OpAccessChain %_ptr_Private_int %tree_1 %117 %uint_2
|
|
OpStore %120 %119
|
|
%122 = OpLoad %int %treeIndex
|
|
%123 = OpAccessChain %_ptr_Private_BST %tree_1 %122
|
|
%124 = OpLoad %BST %123
|
|
OpStore %param_2 %124
|
|
%126 = OpLoad %int %data_1
|
|
OpStore %param_3 %126
|
|
%127 = OpFunctionCall %void %makeTreeNode_struct_BST_i1_i1_i11_i1_ %param_2 %param_3
|
|
%130 = OpLoad %BST %param_2
|
|
%131 = OpAccessChain %_ptr_Private_BST %tree_1 %122
|
|
OpStore %131 %130
|
|
OpReturn
|
|
%116 = OpLabel
|
|
OpStore %GLF_live8i %int_1
|
|
%133 = OpLoad %int %GLF_live8i
|
|
%134 = OpLoad %int %GLF_live8i
|
|
%135 = OpLoad %int %GLF_live8i
|
|
%137 = OpSGreaterThanEqual %bool %133 %int_0
|
|
%139 = OpSLessThan %bool %134 %int_50
|
|
%140 = OpLogicalAnd %bool %137 %139
|
|
%136 = OpSelect %int %140 %135 %int_0
|
|
%142 = OpAccessChain %_ptr_Function_float %GLF_live8A %int_0
|
|
%143 = OpLoad %float %142
|
|
%144 = OpAccessChain %_ptr_Function_float %GLF_live8A %136
|
|
%145 = OpLoad %float %144
|
|
%146 = OpAccessChain %_ptr_Function_float %GLF_live8A %136
|
|
%147 = OpFAdd %float %145 %143
|
|
OpStore %146 %147
|
|
OpBranch %148
|
|
%148 = OpLabel
|
|
OpLoopMerge %149 %150 None
|
|
OpBranch %151
|
|
%151 = OpLabel
|
|
%152 = OpLoad %int %baseIndex
|
|
%153 = OpAccessChain %_ptr_Private_int %tree_1 %152 %uint_2
|
|
%154 = OpLoad %int %153
|
|
OpStore %baseIndex %154
|
|
OpBranch %150
|
|
%150 = OpLabel
|
|
%156 = OpAccessChain %_ptr_Uniform_float %x_27 %uint_0 %uint_0
|
|
%157 = OpLoad %float %156
|
|
%158 = OpAccessChain %_ptr_Uniform_float %x_27 %uint_0 %uint_1
|
|
%159 = OpLoad %float %158
|
|
%160 = OpFOrdGreaterThan %bool %157 %159
|
|
OpBranchConditional %160 %148 %149
|
|
%149 = OpLabel
|
|
OpBranch %64
|
|
%114 = OpLabel
|
|
OpBranch %81
|
|
%81 = OpLabel
|
|
OpBranch %64
|
|
%64 = OpLabel
|
|
OpBranch %62
|
|
%63 = OpLabel
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%search_i1_ = OpFunction %int None %161
|
|
%target = OpFunctionParameter %_ptr_Function_int
|
|
%164 = OpLabel
|
|
%index = OpVariable %_ptr_Function_int Function %49
|
|
%currentNode = OpVariable %_ptr_Function_BST Function %51
|
|
%x_387 = OpVariable %_ptr_Function_int Function %49
|
|
OpStore %index %int_0
|
|
OpBranch %168
|
|
%168 = OpLabel
|
|
OpLoopMerge %169 %170 None
|
|
OpBranch %171
|
|
%171 = OpLabel
|
|
%172 = OpLoad %int %index
|
|
%173 = OpINotEqual %bool %172 %int_n1
|
|
OpSelectionMerge %174 None
|
|
OpBranchConditional %173 %175 %176
|
|
%175 = OpLabel
|
|
OpBranch %174
|
|
%176 = OpLabel
|
|
OpBranch %169
|
|
%174 = OpLabel
|
|
%177 = OpLoad %int %index
|
|
%178 = OpAccessChain %_ptr_Private_BST %tree_1 %177
|
|
%179 = OpLoad %BST %178
|
|
OpStore %currentNode %179
|
|
%180 = OpAccessChain %_ptr_Function_int %currentNode %uint_0
|
|
%181 = OpLoad %int %180
|
|
%183 = OpLoad %int %target
|
|
%184 = OpIEqual %bool %181 %183
|
|
OpSelectionMerge %185 None
|
|
OpBranchConditional %184 %186 %185
|
|
%186 = OpLabel
|
|
%188 = OpLoad %int %target
|
|
OpReturnValue %188
|
|
%185 = OpLabel
|
|
%190 = OpLoad %int %target
|
|
%191 = OpAccessChain %_ptr_Function_int %currentNode %uint_0
|
|
%192 = OpLoad %int %191
|
|
%193 = OpSGreaterThan %bool %190 %192
|
|
OpSelectionMerge %194 None
|
|
OpBranchConditional %193 %195 %196
|
|
%195 = OpLabel
|
|
%197 = OpAccessChain %_ptr_Function_int %currentNode %uint_2
|
|
%198 = OpLoad %int %197
|
|
OpStore %x_387 %198
|
|
OpBranch %194
|
|
%196 = OpLabel
|
|
%199 = OpAccessChain %_ptr_Function_int %currentNode %uint_1
|
|
%200 = OpLoad %int %199
|
|
OpStore %x_387 %200
|
|
OpBranch %194
|
|
%194 = OpLabel
|
|
%201 = OpLoad %int %x_387
|
|
OpStore %index %201
|
|
OpBranch %170
|
|
%170 = OpLabel
|
|
OpBranch %168
|
|
%169 = OpLabel
|
|
OpReturnValue %int_n1
|
|
OpFunctionEnd
|
|
%makeFrame_f1_ = OpFunction %float None %202
|
|
%v = OpFunctionParameter %_ptr_Function_float
|
|
%205 = OpLabel
|
|
%param_5 = OpVariable %_ptr_Function_int Function %49
|
|
%param_6 = OpVariable %_ptr_Function_int Function %49
|
|
%param_7 = OpVariable %_ptr_Function_int Function %49
|
|
%210 = OpLoad %float %v
|
|
%213 = OpFMul %float %210 %float_6_5
|
|
OpStore %v %213
|
|
%215 = OpLoad %float %v
|
|
%217 = OpFOrdLessThan %bool %215 %float_1_5
|
|
OpSelectionMerge %218 None
|
|
OpBranchConditional %217 %219 %218
|
|
%219 = OpLabel
|
|
OpStore %param_5 %int_100
|
|
%221 = OpFunctionCall %int %search_i1_ %param_5
|
|
%223 = OpConvertSToF %float %221
|
|
OpReturnValue %223
|
|
%218 = OpLabel
|
|
%225 = OpLoad %float %v
|
|
%227 = OpFOrdLessThan %bool %225 %float_4
|
|
OpSelectionMerge %228 None
|
|
OpBranchConditional %227 %229 %228
|
|
%229 = OpLabel
|
|
OpReturnValue %float_0
|
|
%228 = OpLabel
|
|
%232 = OpLoad %float %v
|
|
OpStore %param_6 %int_6
|
|
%234 = OpFunctionCall %int %search_i1_ %param_6
|
|
%236 = OpConvertSToF %float %234
|
|
%237 = OpFOrdLessThan %bool %232 %236
|
|
OpSelectionMerge %238 None
|
|
OpBranchConditional %237 %239 %238
|
|
%239 = OpLabel
|
|
OpReturnValue %float_1
|
|
%238 = OpLabel
|
|
OpStore %param_7 %int_30
|
|
%242 = OpFunctionCall %int %search_i1_ %param_7
|
|
%245 = OpConvertSToF %float %242
|
|
%246 = OpFAdd %float %float_10 %245
|
|
OpReturnValue %246
|
|
OpFunctionEnd
|
|
%hueColor_f1_ = OpFunction %v3float None %247
|
|
%angle = OpFunctionParameter %_ptr_Function_float
|
|
%251 = OpLabel
|
|
%nodeData = OpVariable %_ptr_Function_float Function %253
|
|
%param_4 = OpVariable %_ptr_Function_int Function %49
|
|
OpStore %param_4 %int_15
|
|
%256 = OpFunctionCall %int %search_i1_ %param_4
|
|
%258 = OpConvertSToF %float %256
|
|
OpStore %nodeData %258
|
|
%260 = OpLoad %float %angle
|
|
%261 = OpLoad %float %nodeData
|
|
%265 = OpCompositeConstruct %v3float %float_1 %float_5 %261
|
|
%266 = OpVectorTimesScalar %v3float %265 %260
|
|
%267 = OpFAdd %v3float %263 %266
|
|
%270 = OpFDiv %v3float %267 %269
|
|
OpReturnValue %270
|
|
OpFunctionEnd
|
|
%main_1 = OpFunction %void None %271
|
|
%273 = OpLabel
|
|
%treeIndex_1 = OpVariable %_ptr_Function_int Function %49
|
|
%param_8 = OpVariable %_ptr_Function_BST Function %51
|
|
%param_9 = OpVariable %_ptr_Function_int Function %49
|
|
%param_10 = OpVariable %_ptr_Function_int Function %49
|
|
%param_11 = OpVariable %_ptr_Function_int Function %49
|
|
%GLF_live1_looplimiter2 = OpVariable %_ptr_Function_int Function %49
|
|
%GLF_live1i = OpVariable %_ptr_Function_int Function %49
|
|
%param_12 = OpVariable %_ptr_Function_int Function %49
|
|
%param_13 = OpVariable %_ptr_Function_int Function %49
|
|
%param_14 = OpVariable %_ptr_Function_int Function %49
|
|
%param_15 = OpVariable %_ptr_Function_int Function %49
|
|
%param_16 = OpVariable %_ptr_Function_int Function %49
|
|
%param_17 = OpVariable %_ptr_Function_int Function %49
|
|
%param_18 = OpVariable %_ptr_Function_int Function %49
|
|
%param_19 = OpVariable %_ptr_Function_int Function %49
|
|
%param_20 = OpVariable %_ptr_Function_int Function %49
|
|
%param_21 = OpVariable %_ptr_Function_int Function %49
|
|
%param_22 = OpVariable %_ptr_Function_int Function %49
|
|
%param_23 = OpVariable %_ptr_Function_int Function %49
|
|
%GLF_live4_looplimiter3 = OpVariable %_ptr_Function_int Function %49
|
|
%GLF_live4i = OpVariable %_ptr_Function_int Function %49
|
|
%GLF_live4index = OpVariable %_ptr_Function_int Function %49
|
|
%GLF_live4obj = OpVariable %_ptr_Function_Obj Function %300
|
|
%param_24 = OpVariable %_ptr_Function_int Function %49
|
|
%param_25 = OpVariable %_ptr_Function_int Function %49
|
|
%param_26 = OpVariable %_ptr_Function_int Function %49
|
|
%param_27 = OpVariable %_ptr_Function_int Function %49
|
|
%z = OpVariable %_ptr_Function_v2float Function %307
|
|
%x = OpVariable %_ptr_Function_float Function %253
|
|
%param_28 = OpVariable %_ptr_Function_float Function %253
|
|
%y = OpVariable %_ptr_Function_float Function %253
|
|
%param_29 = OpVariable %_ptr_Function_float Function %253
|
|
%sum = OpVariable %_ptr_Function_int Function %49
|
|
%target_1 = OpVariable %_ptr_Function_int Function %49
|
|
%result = OpVariable %_ptr_Function_int Function %49
|
|
%param_30 = OpVariable %_ptr_Function_int Function %49
|
|
%a = OpVariable %_ptr_Function_float Function %253
|
|
%x_235 = OpVariable %_ptr_Function_v3float Function %319
|
|
%param_31 = OpVariable %_ptr_Function_float Function %253
|
|
OpStore %treeIndex_1 %int_0
|
|
%321 = OpAccessChain %_ptr_Private_BST %tree_1 %int_0
|
|
%322 = OpLoad %BST %321
|
|
OpStore %param_8 %322
|
|
OpStore %param_9 %int_9
|
|
%324 = OpFunctionCall %void %makeTreeNode_struct_BST_i1_i1_i11_i1_ %param_8 %param_9
|
|
%327 = OpLoad %BST %param_8
|
|
%328 = OpAccessChain %_ptr_Private_BST %tree_1 %int_0
|
|
OpStore %328 %327
|
|
%329 = OpLoad %int %treeIndex_1
|
|
%330 = OpIAdd %int %329 %int_1
|
|
OpStore %treeIndex_1 %330
|
|
%331 = OpLoad %int %treeIndex_1
|
|
OpStore %param_10 %331
|
|
OpStore %param_11 %int_5
|
|
%333 = OpFunctionCall %void %insert_i1_i1_ %param_10 %param_11
|
|
%336 = OpLoad %int %treeIndex_1
|
|
%337 = OpIAdd %int %336 %int_1
|
|
OpStore %treeIndex_1 %337
|
|
OpStore %GLF_live1_looplimiter2 %int_0
|
|
OpStore %GLF_live1i %int_0
|
|
OpBranch %338
|
|
%338 = OpLabel
|
|
OpLoopMerge %339 %340 None
|
|
OpBranch %341
|
|
%341 = OpLabel
|
|
OpSelectionMerge %343 None
|
|
OpBranchConditional %true %344 %345
|
|
%344 = OpLabel
|
|
OpBranch %343
|
|
%345 = OpLabel
|
|
OpBranch %339
|
|
%343 = OpLabel
|
|
%346 = OpLoad %int %GLF_live1_looplimiter2
|
|
%348 = OpSGreaterThanEqual %bool %346 %int_7
|
|
OpSelectionMerge %349 None
|
|
OpBranchConditional %348 %350 %349
|
|
%350 = OpLabel
|
|
OpBranch %339
|
|
%349 = OpLabel
|
|
%351 = OpLoad %int %GLF_live1_looplimiter2
|
|
%352 = OpIAdd %int %351 %int_1
|
|
OpStore %GLF_live1_looplimiter2 %352
|
|
OpBranch %340
|
|
%340 = OpLabel
|
|
%353 = OpLoad %int %GLF_live1i
|
|
%354 = OpIAdd %int %353 %int_1
|
|
OpStore %GLF_live1i %354
|
|
OpBranch %338
|
|
%339 = OpLabel
|
|
%355 = OpLoad %int %treeIndex_1
|
|
OpStore %param_12 %355
|
|
OpStore %param_13 %int_12
|
|
%357 = OpFunctionCall %void %insert_i1_i1_ %param_12 %param_13
|
|
%360 = OpLoad %int %treeIndex_1
|
|
%361 = OpIAdd %int %360 %int_1
|
|
OpStore %treeIndex_1 %361
|
|
%362 = OpLoad %int %treeIndex_1
|
|
OpStore %param_14 %362
|
|
OpStore %param_15 %int_15
|
|
%363 = OpFunctionCall %void %insert_i1_i1_ %param_14 %param_15
|
|
%366 = OpLoad %int %treeIndex_1
|
|
%367 = OpIAdd %int %366 %int_1
|
|
OpStore %treeIndex_1 %367
|
|
%368 = OpLoad %int %treeIndex_1
|
|
OpStore %param_16 %368
|
|
OpStore %param_17 %int_7
|
|
%369 = OpFunctionCall %void %insert_i1_i1_ %param_16 %param_17
|
|
%372 = OpLoad %int %treeIndex_1
|
|
%373 = OpIAdd %int %372 %int_1
|
|
OpStore %treeIndex_1 %373
|
|
%374 = OpLoad %int %treeIndex_1
|
|
OpStore %param_18 %374
|
|
OpStore %param_19 %int_8
|
|
%376 = OpFunctionCall %void %insert_i1_i1_ %param_18 %param_19
|
|
%379 = OpLoad %int %treeIndex_1
|
|
%380 = OpIAdd %int %379 %int_1
|
|
OpStore %treeIndex_1 %380
|
|
%381 = OpLoad %int %treeIndex_1
|
|
OpStore %param_20 %381
|
|
OpStore %param_21 %int_2
|
|
%383 = OpFunctionCall %void %insert_i1_i1_ %param_20 %param_21
|
|
%386 = OpLoad %int %treeIndex_1
|
|
%387 = OpIAdd %int %386 %int_1
|
|
OpStore %treeIndex_1 %387
|
|
%388 = OpLoad %int %treeIndex_1
|
|
OpStore %param_22 %388
|
|
OpStore %param_23 %int_6
|
|
%389 = OpFunctionCall %void %insert_i1_i1_ %param_22 %param_23
|
|
%392 = OpLoad %int %treeIndex_1
|
|
%393 = OpIAdd %int %392 %int_1
|
|
OpStore %treeIndex_1 %393
|
|
OpStore %GLF_live4_looplimiter3 %int_0
|
|
OpStore %GLF_live4i %int_0
|
|
OpBranch %394
|
|
%394 = OpLabel
|
|
OpLoopMerge %395 %396 None
|
|
OpBranch %397
|
|
%397 = OpLabel
|
|
OpSelectionMerge %398 None
|
|
OpBranchConditional %true %399 %400
|
|
%399 = OpLabel
|
|
OpBranch %398
|
|
%400 = OpLabel
|
|
OpBranch %395
|
|
%398 = OpLabel
|
|
%401 = OpLoad %int %GLF_live4_looplimiter3
|
|
%403 = OpSGreaterThanEqual %bool %401 %int_3
|
|
OpSelectionMerge %404 None
|
|
OpBranchConditional %403 %405 %404
|
|
%405 = OpLabel
|
|
OpBranch %395
|
|
%404 = OpLabel
|
|
%406 = OpLoad %int %GLF_live4_looplimiter3
|
|
%407 = OpIAdd %int %406 %int_1
|
|
OpStore %GLF_live4_looplimiter3 %407
|
|
OpStore %GLF_live4index %int_1
|
|
%408 = OpLoad %int %GLF_live4index
|
|
%409 = OpLoad %int %GLF_live4index
|
|
%410 = OpLoad %int %GLF_live4index
|
|
%411 = OpAccessChain %_ptr_Function_float %GLF_live4obj %uint_1 %int_1
|
|
%412 = OpLoad %float %411
|
|
%414 = OpSGreaterThanEqual %bool %408 %int_0
|
|
%416 = OpSLessThan %bool %409 %int_10
|
|
%417 = OpLogicalAnd %bool %414 %416
|
|
%413 = OpSelect %int %417 %410 %int_0
|
|
%418 = OpAccessChain %_ptr_Function_float %GLF_live4obj %uint_1 %413
|
|
OpStore %418 %412
|
|
%419 = OpLoad %int %GLF_live4i
|
|
%420 = OpLoad %int %GLF_live4i
|
|
%421 = OpLoad %int %GLF_live4i
|
|
%423 = OpSGreaterThanEqual %bool %419 %int_0
|
|
%424 = OpSLessThan %bool %420 %int_10
|
|
%425 = OpLogicalAnd %bool %423 %424
|
|
%422 = OpSelect %int %425 %421 %int_0
|
|
%426 = OpAccessChain %_ptr_Function_float %GLF_live4obj %uint_1 %422
|
|
OpStore %426 %float_1
|
|
OpBranch %396
|
|
%396 = OpLabel
|
|
%427 = OpLoad %int %GLF_live4i
|
|
%428 = OpIAdd %int %427 %int_1
|
|
OpStore %GLF_live4i %428
|
|
OpBranch %394
|
|
%395 = OpLabel
|
|
%429 = OpLoad %int %treeIndex_1
|
|
OpStore %param_24 %429
|
|
OpStore %param_25 %int_17
|
|
%431 = OpFunctionCall %void %insert_i1_i1_ %param_24 %param_25
|
|
%434 = OpAccessChain %_ptr_Uniform_float %x_27 %uint_0 %uint_0
|
|
%435 = OpLoad %float %434
|
|
%436 = OpAccessChain %_ptr_Uniform_float %x_27 %uint_0 %uint_1
|
|
%437 = OpLoad %float %436
|
|
%438 = OpFOrdGreaterThan %bool %435 %437
|
|
OpSelectionMerge %439 None
|
|
OpBranchConditional %438 %440 %439
|
|
%440 = OpLabel
|
|
OpReturn
|
|
%439 = OpLabel
|
|
%441 = OpLoad %int %treeIndex_1
|
|
%442 = OpIAdd %int %441 %int_1
|
|
OpStore %treeIndex_1 %442
|
|
%443 = OpLoad %int %treeIndex_1
|
|
OpStore %param_26 %443
|
|
OpStore %param_27 %int_13
|
|
%445 = OpFunctionCall %void %insert_i1_i1_ %param_26 %param_27
|
|
%448 = OpLoad %v4float %gl_FragCoord
|
|
%449 = OpCompositeExtract %float %448 1
|
|
%450 = OpCompositeExtract %float %448 0
|
|
%451 = OpCompositeConstruct %v2float %449 %450
|
|
%454 = OpFDiv %v2float %451 %453
|
|
OpStore %z %454
|
|
%455 = OpAccessChain %_ptr_Function_float %z %uint_0
|
|
%456 = OpLoad %float %455
|
|
OpStore %param_28 %456
|
|
%457 = OpFunctionCall %float %makeFrame_f1_ %param_28
|
|
OpStore %x %457
|
|
%459 = OpAccessChain %_ptr_Function_float %z %uint_1
|
|
%460 = OpLoad %float %459
|
|
OpStore %param_29 %460
|
|
%461 = OpFunctionCall %float %makeFrame_f1_ %param_29
|
|
OpStore %y %461
|
|
OpStore %sum %int_n100
|
|
OpStore %target_1 %int_0
|
|
OpBranch %464
|
|
%464 = OpLabel
|
|
OpLoopMerge %465 %466 None
|
|
OpBranch %467
|
|
%467 = OpLabel
|
|
%468 = OpLoad %int %target_1
|
|
%470 = OpSLessThan %bool %468 %int_20
|
|
OpSelectionMerge %471 None
|
|
OpBranchConditional %470 %472 %473
|
|
%472 = OpLabel
|
|
OpBranch %471
|
|
%473 = OpLabel
|
|
OpBranch %465
|
|
%471 = OpLabel
|
|
%474 = OpLoad %int %target_1
|
|
OpStore %param_30 %474
|
|
%475 = OpFunctionCall %int %search_i1_ %param_30
|
|
OpStore %result %475
|
|
%477 = OpLoad %int %result
|
|
%478 = OpSGreaterThan %bool %477 %int_0
|
|
OpSelectionMerge %479 None
|
|
OpBranchConditional %478 %480 %481
|
|
%480 = OpLabel
|
|
OpBranch %479
|
|
%481 = OpLabel
|
|
%482 = OpLoad %int %result
|
|
OpSelectionMerge %483 None
|
|
OpSwitch %482 %484 0 %485 -1 %486
|
|
%485 = OpLabel
|
|
OpReturn
|
|
%486 = OpLabel
|
|
%487 = OpLoad %int %sum
|
|
%488 = OpIAdd %int %487 %int_1
|
|
OpStore %sum %488
|
|
OpBranch %483
|
|
%484 = OpLabel
|
|
OpBranch %483
|
|
%483 = OpLabel
|
|
OpBranch %479
|
|
%479 = OpLabel
|
|
OpBranch %466
|
|
%466 = OpLabel
|
|
%489 = OpLoad %int %target_1
|
|
%490 = OpIAdd %int %489 %int_1
|
|
OpStore %target_1 %490
|
|
OpBranch %464
|
|
%465 = OpLabel
|
|
%491 = OpLoad %float %x
|
|
%492 = OpLoad %float %y
|
|
%493 = OpLoad %int %sum
|
|
%494 = OpConvertSToF %float %493
|
|
%495 = OpFMul %float %492 %494
|
|
%496 = OpFAdd %float %491 %495
|
|
OpStore %a %496
|
|
%497 = OpAccessChain %_ptr_Uniform_float %x_27 %uint_0 %uint_0
|
|
%498 = OpLoad %float %497
|
|
%499 = OpAccessChain %_ptr_Uniform_float %x_27 %uint_0 %uint_1
|
|
%500 = OpLoad %float %499
|
|
%501 = OpFOrdLessThan %bool %498 %500
|
|
OpSelectionMerge %502 None
|
|
OpBranchConditional %501 %503 %504
|
|
%503 = OpLabel
|
|
OpStore %x_235 %505
|
|
OpBranch %502
|
|
%504 = OpLabel
|
|
%506 = OpLoad %float %a
|
|
OpStore %param_31 %506
|
|
%507 = OpFunctionCall %v3float %hueColor_f1_ %param_31
|
|
OpStore %x_235 %507
|
|
OpBranch %502
|
|
%502 = OpLabel
|
|
%509 = OpLoad %v3float %x_235
|
|
%510 = OpCompositeExtract %float %509 0
|
|
%511 = OpCompositeExtract %float %509 1
|
|
%512 = OpCompositeExtract %float %509 2
|
|
%513 = OpCompositeConstruct %v4float %510 %511 %512 %float_1
|
|
OpStore %x_GLF_color %513
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%tint_symbol_3 = OpFunction %void None %514
|
|
%tint_symbol_1 = OpFunctionParameter %main_out
|
|
%518 = OpLabel
|
|
%519 = OpCompositeExtract %v4float %tint_symbol_1 0
|
|
OpStore %tint_symbol_2 %519
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %271
|
|
%521 = OpLabel
|
|
%522 = OpLoad %v4float %tint_symbol
|
|
OpStore %gl_FragCoord %522
|
|
%523 = OpFunctionCall %void %main_1
|
|
%525 = OpLoad %v4float %x_GLF_color
|
|
%526 = OpCompositeConstruct %main_out %525
|
|
%524 = OpFunctionCall %void %tint_symbol_3 %526
|
|
OpReturn
|
|
OpFunctionEnd
|