| ; |
| ; vert_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 59 |
| ; Schema: 0 |
| OpCapability Shader |
| %21 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Vertex %vert_main "vert_main" %vert_main_loc0_Input %vert_main_loc1_Input %vert_main_loc2_Input %vert_main_position_Output %vert_main___point_size_Output |
| OpName %vert_main_loc0_Input "vert_main_loc0_Input" |
| OpName %vert_main_loc1_Input "vert_main_loc1_Input" |
| OpName %vert_main_loc2_Input "vert_main_loc2_Input" |
| OpName %vert_main_position_Output "vert_main_position_Output" |
| OpName %vert_main___point_size_Output "vert_main___point_size_Output" |
| OpName %vert_main_inner "vert_main_inner" |
| OpName %a_particlePos "a_particlePos" |
| OpName %a_particleVel "a_particleVel" |
| OpName %a_pos "a_pos" |
| OpName %angle "angle" |
| OpName %pos "pos" |
| OpName %vert_main "vert_main" |
| OpDecorate %vert_main_loc0_Input Location 0 |
| OpDecorate %vert_main_loc1_Input Location 1 |
| OpDecorate %vert_main_loc2_Input Location 2 |
| OpDecorate %vert_main_position_Output BuiltIn Position |
| OpDecorate %vert_main___point_size_Output BuiltIn PointSize |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %_ptr_Input_v2float = OpTypePointer Input %v2float |
| %vert_main_loc0_Input = OpVariable %_ptr_Input_v2float Input |
| %vert_main_loc1_Input = OpVariable %_ptr_Input_v2float Input |
| %vert_main_loc2_Input = OpVariable %_ptr_Input_v2float Input |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %vert_main_position_Output = OpVariable %_ptr_Output_v4float Output |
| %_ptr_Output_float = OpTypePointer Output %float |
| %vert_main___point_size_Output = OpVariable %_ptr_Output_float Output |
| %16 = OpTypeFunction %v4float %v2float %v2float %v2float |
| %_ptr_Function_float = OpTypePointer Function %float |
| %_ptr_Function_v2float = OpTypePointer Function %v2float |
| %float_0 = OpConstant %float 0 |
| %float_1 = OpConstant %float 1 |
| %void = OpTypeVoid |
| %53 = OpTypeFunction %void |
| %vert_main_inner = OpFunction %v4float None %16 |
| %a_particlePos = OpFunctionParameter %v2float |
| %a_particleVel = OpFunctionParameter %v2float |
| %a_pos = OpFunctionParameter %v2float |
| %17 = OpLabel |
| %angle = OpVariable %_ptr_Function_float Function |
| %pos = OpVariable %_ptr_Function_v2float Function |
| %18 = OpCompositeExtract %float %a_particleVel 0 |
| %19 = OpCompositeExtract %float %a_particleVel 1 |
| %20 = OpExtInst %float %21 Atan2 %18 %19 |
| %22 = OpFNegate %float %20 |
| OpStore %angle %22 |
| %25 = OpCompositeExtract %float %a_pos 0 |
| %26 = OpLoad %float %angle None |
| %27 = OpExtInst %float %21 Cos %26 |
| %28 = OpFMul %float %25 %27 |
| %29 = OpCompositeExtract %float %a_pos 1 |
| %30 = OpLoad %float %angle None |
| %31 = OpExtInst %float %21 Sin %30 |
| %32 = OpFMul %float %29 %31 |
| %33 = OpFSub %float %28 %32 |
| %34 = OpCompositeExtract %float %a_pos 0 |
| %35 = OpLoad %float %angle None |
| %36 = OpExtInst %float %21 Sin %35 |
| %37 = OpFMul %float %34 %36 |
| %38 = OpCompositeExtract %float %a_pos 1 |
| %39 = OpLoad %float %angle None |
| %40 = OpExtInst %float %21 Cos %39 |
| %41 = OpFMul %float %38 %40 |
| %42 = OpFAdd %float %37 %41 |
| %43 = OpCompositeConstruct %v2float %33 %42 |
| OpStore %pos %43 |
| %46 = OpLoad %v2float %pos None |
| %47 = OpFAdd %v2float %46 %a_particlePos |
| %48 = OpCompositeConstruct %v4float %47 %float_0 %float_1 |
| OpReturnValue %48 |
| OpFunctionEnd |
| %vert_main = OpFunction %void None %53 |
| %54 = OpLabel |
| %55 = OpLoad %v2float %vert_main_loc0_Input None |
| %56 = OpLoad %v2float %vert_main_loc1_Input None |
| %57 = OpLoad %v2float %vert_main_loc2_Input None |
| %58 = OpFunctionCall %v4float %vert_main_inner %55 %56 %57 |
| OpStore %vert_main_position_Output %58 None |
| OpStore %vert_main___point_size_Output %float_1 None |
| OpReturn |
| OpFunctionEnd |
| ; |
| ; frag_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 15 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %frag_main "frag_main" %frag_main_loc0_Output |
| OpExecutionMode %frag_main OriginUpperLeft |
| OpName %frag_main_loc0_Output "frag_main_loc0_Output" |
| OpName %frag_main_inner "frag_main_inner" |
| OpName %frag_main "frag_main" |
| OpDecorate %frag_main_loc0_Output Location 0 |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %frag_main_loc0_Output = OpVariable %_ptr_Output_v4float Output |
| %6 = OpTypeFunction %v4float |
| %float_1 = OpConstant %float 1 |
| %8 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 |
| %void = OpTypeVoid |
| %12 = OpTypeFunction %void |
| %frag_main_inner = OpFunction %v4float None %6 |
| %7 = OpLabel |
| OpReturnValue %8 |
| OpFunctionEnd |
| %frag_main = OpFunction %void None %12 |
| %13 = OpLabel |
| %14 = OpFunctionCall %v4float %frag_main_inner |
| OpStore %frag_main_loc0_Output %14 None |
| OpReturn |
| OpFunctionEnd |
| ; |
| ; comp_main |
| ; |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 245 |
| ; Schema: 0 |
| OpCapability Shader |
| %38 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %comp_main "comp_main" %comp_main_global_invocation_id_Input |
| OpExecutionMode %comp_main LocalSize 1 1 1 |
| OpMemberName %params_block_tint_explicit_layout 0 "inner" |
| OpName %params_block_tint_explicit_layout "params_block_tint_explicit_layout" |
| OpMemberName %Particle 0 "pos" |
| OpMemberName %Particle 1 "vel" |
| OpName %Particle "Particle" |
| OpMemberName %Particles_tint_explicit_layout 0 "particles" |
| OpName %Particles_tint_explicit_layout "Particles_tint_explicit_layout" |
| OpMemberName %particlesA_block_tint_explicit_layout 0 "inner" |
| OpName %particlesA_block_tint_explicit_layout "particlesA_block_tint_explicit_layout" |
| OpMemberName %particlesB_block_tint_explicit_layout 0 "inner" |
| OpName %particlesB_block_tint_explicit_layout "particlesB_block_tint_explicit_layout" |
| OpName %comp_main_global_invocation_id_Input "comp_main_global_invocation_id_Input" |
| OpName %comp_main_inner "comp_main_inner" |
| OpName %gl_GlobalInvocationID "gl_GlobalInvocationID" |
| OpName %index "index" |
| OpName %vPos "vPos" |
| OpName %vVel "vVel" |
| OpName %cMass "cMass" |
| OpName %cVel "cVel" |
| OpName %colVel "colVel" |
| OpName %cMassCount "cMassCount" |
| OpName %cVelCount "cVelCount" |
| OpName %pos "pos" |
| OpName %vel "vel" |
| OpName %i "i" |
| OpName %comp_main "comp_main" |
| OpDecorate %_arr_v4uint_uint_2 ArrayStride 16 |
| OpMemberDecorate %params_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %params_block_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 NonWritable |
| OpMemberDecorate %Particle 0 Offset 0 |
| OpMemberDecorate %Particle 1 Offset 8 |
| OpDecorate %_arr_Particle_uint_5 ArrayStride 16 |
| OpMemberDecorate %Particles_tint_explicit_layout 0 Offset 0 |
| OpMemberDecorate %particlesA_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %particlesA_block_tint_explicit_layout Block |
| OpDecorate %8 DescriptorSet 0 |
| OpDecorate %8 Binding 1 |
| OpDecorate %8 Coherent |
| OpMemberDecorate %particlesB_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %particlesB_block_tint_explicit_layout Block |
| OpDecorate %17 DescriptorSet 0 |
| OpDecorate %17 Binding 2 |
| OpDecorate %17 Coherent |
| OpDecorate %comp_main_global_invocation_id_Input BuiltIn GlobalInvocationId |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %uint_2 = OpConstant %uint 2 |
| %_arr_v4uint_uint_2 = OpTypeArray %v4uint %uint_2 |
| %params_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_2 |
| %_ptr_Uniform_params_block_tint_explicit_layout = OpTypePointer Uniform %params_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_Uniform_params_block_tint_explicit_layout Uniform |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %Particle = OpTypeStruct %v2float %v2float |
| %uint_5 = OpConstant %uint 5 |
| %_arr_Particle_uint_5 = OpTypeArray %Particle %uint_5 |
| %Particles_tint_explicit_layout = OpTypeStruct %_arr_Particle_uint_5 |
| %particlesA_block_tint_explicit_layout = OpTypeStruct %Particles_tint_explicit_layout |
| %_ptr_StorageBuffer_particlesA_block_tint_explicit_layout = OpTypePointer StorageBuffer %particlesA_block_tint_explicit_layout |
| %8 = OpVariable %_ptr_StorageBuffer_particlesA_block_tint_explicit_layout StorageBuffer |
| %particlesB_block_tint_explicit_layout = OpTypeStruct %Particles_tint_explicit_layout |
| %_ptr_StorageBuffer_particlesB_block_tint_explicit_layout = OpTypePointer StorageBuffer %particlesB_block_tint_explicit_layout |
| %17 = OpVariable %_ptr_StorageBuffer_particlesB_block_tint_explicit_layout StorageBuffer |
| %v3uint = OpTypeVector %uint 3 |
| %_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| %comp_main_global_invocation_id_Input = OpVariable %_ptr_Input_v3uint Input |
| %void = OpTypeVoid |
| %26 = OpTypeFunction %void %v3uint |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %bool = OpTypeBool |
| %uint_4 = OpConstant %uint 4 |
| %_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Function_v2float = OpTypePointer Function %v2float |
| %uint_1 = OpConstant %uint 1 |
| %53 = OpConstantNull %v2float |
| %int = OpTypeInt 32 1 |
| %_ptr_Function_int = OpTypePointer Function %int |
| %int_0 = OpConstant %int 0 |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint |
| %float_0 = OpConstant %float 0 |
| %float_0_100000001 = OpConstant %float 0.100000001 |
| %_ptr_Function_float = OpTypePointer Function %float |
| %float_n1 = OpConstant %float -1 |
| %float_1 = OpConstant %float 1 |
| %int_1 = OpConstant %int 1 |
| %241 = OpTypeFunction %void |
| %comp_main_inner = OpFunction %void None %26 |
| %gl_GlobalInvocationID = OpFunctionParameter %v3uint |
| %27 = OpLabel |
| %index = OpVariable %_ptr_Function_uint Function |
| %vPos = OpVariable %_ptr_Function_v2float Function |
| %vVel = OpVariable %_ptr_Function_v2float Function |
| %cMass = OpVariable %_ptr_Function_v2float Function |
| %cVel = OpVariable %_ptr_Function_v2float Function |
| %colVel = OpVariable %_ptr_Function_v2float Function |
| %cMassCount = OpVariable %_ptr_Function_int Function |
| %cVelCount = OpVariable %_ptr_Function_int Function |
| %pos = OpVariable %_ptr_Function_v2float Function %53 |
| %vel = OpVariable %_ptr_Function_v2float Function %53 |
| %i = OpVariable %_ptr_Function_uint Function |
| %28 = OpCompositeExtract %uint %gl_GlobalInvocationID 0 |
| OpStore %index %28 |
| %31 = OpLoad %uint %index None |
| %32 = OpUGreaterThanEqual %bool %31 %uint_5 |
| OpSelectionMerge %34 None |
| OpBranchConditional %32 %35 %34 |
| %35 = OpLabel |
| OpReturn |
| %34 = OpLabel |
| %36 = OpLoad %uint %index None |
| %37 = OpExtInst %uint %38 UMin %36 %uint_4 |
| %40 = OpAccessChain %_ptr_StorageBuffer_v2float %8 %uint_0 %uint_0 %37 %uint_0 |
| %43 = OpLoad %v2float %40 None |
| OpStore %vPos %43 |
| %46 = OpLoad %uint %index None |
| %47 = OpExtInst %uint %38 UMin %46 %uint_4 |
| %48 = OpAccessChain %_ptr_StorageBuffer_v2float %8 %uint_0 %uint_0 %47 %uint_1 |
| %50 = OpLoad %v2float %48 None |
| OpStore %vVel %50 |
| OpStore %cMass %53 |
| OpStore %cVel %53 |
| OpStore %colVel %53 |
| OpStore %cMassCount %int_0 |
| OpStore %cVelCount %int_0 |
| OpBranch %63 |
| %63 = OpLabel |
| OpStore %i %uint_0 |
| OpBranch %66 |
| %66 = OpLabel |
| OpLoopMerge %67 %65 None |
| OpBranch %64 |
| %64 = OpLabel |
| %147 = OpLoad %uint %i None |
| %148 = OpULessThan %bool %147 %uint_5 |
| OpSelectionMerge %149 None |
| OpBranchConditional %148 %149 %150 |
| %150 = OpLabel |
| OpBranch %67 |
| %149 = OpLabel |
| %151 = OpLoad %uint %i None |
| %152 = OpLoad %uint %index None |
| %153 = OpIEqual %bool %151 %152 |
| OpSelectionMerge %154 None |
| OpBranchConditional %153 %155 %154 |
| %155 = OpLabel |
| OpBranch %65 |
| %154 = OpLabel |
| %156 = OpLoad %uint %i None |
| %157 = OpExtInst %uint %38 UMin %156 %uint_4 |
| %158 = OpAccessChain %_ptr_StorageBuffer_v2float %8 %uint_0 %uint_0 %157 %uint_0 |
| %159 = OpLoad %v2float %158 None |
| %160 = OpVectorShuffle %v2float %159 %159 0 1 |
| OpStore %pos %160 None |
| %161 = OpLoad %uint %i None |
| %162 = OpExtInst %uint %38 UMin %161 %uint_4 |
| %163 = OpAccessChain %_ptr_StorageBuffer_v2float %8 %uint_0 %uint_0 %162 %uint_1 |
| %164 = OpLoad %v2float %163 None |
| %165 = OpVectorShuffle %v2float %164 %164 0 1 |
| OpStore %vel %165 None |
| %166 = OpLoad %v2float %pos None |
| %167 = OpLoad %v2float %vPos None |
| %168 = OpExtInst %float %38 Distance %166 %167 |
| %169 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_0 |
| %170 = OpLoad %v4uint %169 None |
| %171 = OpCompositeExtract %uint %170 1 |
| %172 = OpBitcast %float %171 |
| %173 = OpFOrdLessThan %bool %168 %172 |
| OpSelectionMerge %174 None |
| OpBranchConditional %173 %175 %174 |
| %175 = OpLabel |
| %218 = OpLoad %v2float %cMass None |
| %219 = OpLoad %v2float %pos None |
| %220 = OpFAdd %v2float %218 %219 |
| OpStore %cMass %220 None |
| %221 = OpLoad %int %cMassCount None |
| %222 = OpBitcast %uint %221 |
| %223 = OpBitcast %uint %int_1 |
| %225 = OpIAdd %uint %222 %223 |
| %226 = OpBitcast %int %225 |
| OpStore %cMassCount %226 None |
| OpBranch %174 |
| %174 = OpLabel |
| %176 = OpLoad %v2float %pos None |
| %177 = OpLoad %v2float %vPos None |
| %178 = OpExtInst %float %38 Distance %176 %177 |
| %179 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_0 |
| %180 = OpLoad %v4uint %179 None |
| %181 = OpCompositeExtract %uint %180 2 |
| %182 = OpBitcast %float %181 |
| %183 = OpFOrdLessThan %bool %178 %182 |
| OpSelectionMerge %184 None |
| OpBranchConditional %183 %185 %184 |
| %185 = OpLabel |
| %227 = OpLoad %v2float %colVel None |
| %228 = OpLoad %v2float %pos None |
| %229 = OpLoad %v2float %vPos None |
| %230 = OpFSub %v2float %228 %229 |
| %231 = OpFSub %v2float %227 %230 |
| OpStore %colVel %231 None |
| OpBranch %184 |
| %184 = OpLabel |
| %186 = OpLoad %v2float %pos None |
| %187 = OpLoad %v2float %vPos None |
| %188 = OpExtInst %float %38 Distance %186 %187 |
| %189 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_0 |
| %190 = OpLoad %v4uint %189 None |
| %191 = OpCompositeExtract %uint %190 3 |
| %192 = OpBitcast %float %191 |
| %193 = OpFOrdLessThan %bool %188 %192 |
| OpSelectionMerge %194 None |
| OpBranchConditional %193 %195 %194 |
| %195 = OpLabel |
| %232 = OpLoad %v2float %cVel None |
| %233 = OpLoad %v2float %vel None |
| %234 = OpFAdd %v2float %232 %233 |
| OpStore %cVel %234 None |
| %235 = OpLoad %int %cVelCount None |
| %236 = OpBitcast %uint %235 |
| %237 = OpBitcast %uint %int_1 |
| %238 = OpIAdd %uint %236 %237 |
| %239 = OpBitcast %int %238 |
| OpStore %cVelCount %239 None |
| OpBranch %194 |
| %194 = OpLabel |
| OpBranch %65 |
| %65 = OpLabel |
| %196 = OpLoad %uint %i None |
| %197 = OpIAdd %uint %196 %uint_1 |
| OpStore %i %197 None |
| OpBranch %66 |
| %67 = OpLabel |
| %68 = OpLoad %int %cMassCount None |
| %69 = OpSGreaterThan %bool %68 %int_0 |
| OpSelectionMerge %70 None |
| OpBranchConditional %69 %71 %70 |
| %71 = OpLabel |
| %198 = OpLoad %v2float %cMass None |
| %199 = OpLoad %int %cMassCount None |
| %200 = OpConvertSToF %float %199 |
| %201 = OpLoad %int %cMassCount None |
| %202 = OpConvertSToF %float %201 |
| %203 = OpCompositeConstruct %v2float %200 %202 |
| %204 = OpFDiv %v2float %198 %203 |
| %205 = OpLoad %v2float %vPos None |
| %206 = OpFSub %v2float %204 %205 |
| OpStore %cMass %206 None |
| OpBranch %70 |
| %70 = OpLabel |
| %72 = OpLoad %int %cVelCount None |
| %73 = OpSGreaterThan %bool %72 %int_0 |
| OpSelectionMerge %74 None |
| OpBranchConditional %73 %75 %74 |
| %75 = OpLabel |
| %207 = OpLoad %v2float %cVel None |
| %208 = OpLoad %int %cVelCount None |
| %209 = OpConvertSToF %float %208 |
| %210 = OpLoad %int %cVelCount None |
| %211 = OpConvertSToF %float %210 |
| %212 = OpCompositeConstruct %v2float %209 %211 |
| %213 = OpFDiv %v2float %207 %212 |
| OpStore %cVel %213 None |
| OpBranch %74 |
| %74 = OpLabel |
| %76 = OpLoad %v2float %vVel None |
| %77 = OpLoad %v2float %cMass None |
| %78 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_1 |
| %80 = OpLoad %v4uint %78 None |
| %81 = OpCompositeExtract %uint %80 0 |
| %82 = OpBitcast %float %81 |
| %83 = OpVectorTimesScalar %v2float %77 %82 |
| %84 = OpFAdd %v2float %76 %83 |
| %85 = OpLoad %v2float %colVel None |
| %86 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_1 |
| %87 = OpLoad %v4uint %86 None |
| %88 = OpCompositeExtract %uint %87 1 |
| %89 = OpBitcast %float %88 |
| %90 = OpVectorTimesScalar %v2float %85 %89 |
| %91 = OpFAdd %v2float %84 %90 |
| %92 = OpLoad %v2float %cVel None |
| %93 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_1 |
| %94 = OpLoad %v4uint %93 None |
| %95 = OpCompositeExtract %uint %94 2 |
| %96 = OpBitcast %float %95 |
| %97 = OpVectorTimesScalar %v2float %92 %96 |
| %98 = OpFAdd %v2float %91 %97 |
| OpStore %vVel %98 None |
| %99 = OpLoad %v2float %vVel None |
| %100 = OpExtInst %v2float %38 Normalize %99 |
| %101 = OpLoad %v2float %vVel None |
| %102 = OpExtInst %float %38 Length %101 |
| %103 = OpExtInst %float %38 NClamp %102 %float_0 %float_0_100000001 |
| %106 = OpVectorTimesScalar %v2float %100 %103 |
| OpStore %vVel %106 None |
| %107 = OpLoad %v2float %vPos None |
| %108 = OpLoad %v2float %vVel None |
| %109 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_0 |
| %110 = OpLoad %v4uint %109 None |
| %111 = OpCompositeExtract %uint %110 0 |
| %112 = OpBitcast %float %111 |
| %113 = OpVectorTimesScalar %v2float %108 %112 |
| %114 = OpFAdd %v2float %107 %113 |
| OpStore %vPos %114 None |
| %115 = OpAccessChain %_ptr_Function_float %vPos %uint_0 |
| %117 = OpLoad %float %115 None |
| %118 = OpFOrdLessThan %bool %117 %float_n1 |
| OpSelectionMerge %120 None |
| OpBranchConditional %118 %121 %120 |
| %121 = OpLabel |
| %214 = OpAccessChain %_ptr_Function_float %vPos %uint_0 |
| OpStore %214 %float_1 None |
| OpBranch %120 |
| %120 = OpLabel |
| %122 = OpAccessChain %_ptr_Function_float %vPos %uint_0 |
| %123 = OpLoad %float %122 None |
| %124 = OpFOrdGreaterThan %bool %123 %float_1 |
| OpSelectionMerge %126 None |
| OpBranchConditional %124 %127 %126 |
| %127 = OpLabel |
| %215 = OpAccessChain %_ptr_Function_float %vPos %uint_0 |
| OpStore %215 %float_n1 None |
| OpBranch %126 |
| %126 = OpLabel |
| %128 = OpAccessChain %_ptr_Function_float %vPos %uint_1 |
| %129 = OpLoad %float %128 None |
| %130 = OpFOrdLessThan %bool %129 %float_n1 |
| OpSelectionMerge %131 None |
| OpBranchConditional %130 %132 %131 |
| %132 = OpLabel |
| %216 = OpAccessChain %_ptr_Function_float %vPos %uint_1 |
| OpStore %216 %float_1 None |
| OpBranch %131 |
| %131 = OpLabel |
| %133 = OpAccessChain %_ptr_Function_float %vPos %uint_1 |
| %134 = OpLoad %float %133 None |
| %135 = OpFOrdGreaterThan %bool %134 %float_1 |
| OpSelectionMerge %136 None |
| OpBranchConditional %135 %137 %136 |
| %137 = OpLabel |
| %217 = OpAccessChain %_ptr_Function_float %vPos %uint_1 |
| OpStore %217 %float_n1 None |
| OpBranch %136 |
| %136 = OpLabel |
| %138 = OpLoad %uint %index None |
| %139 = OpExtInst %uint %38 UMin %138 %uint_4 |
| %140 = OpAccessChain %_ptr_StorageBuffer_v2float %17 %uint_0 %uint_0 %139 %uint_0 |
| %141 = OpLoad %v2float %vPos None |
| OpStore %140 %141 None |
| %142 = OpLoad %uint %index None |
| %143 = OpExtInst %uint %38 UMin %142 %uint_4 |
| %144 = OpAccessChain %_ptr_StorageBuffer_v2float %17 %uint_0 %uint_0 %143 %uint_1 |
| %145 = OpLoad %v2float %vVel None |
| OpStore %144 %145 None |
| OpReturn |
| OpFunctionEnd |
| %comp_main = OpFunction %void None %241 |
| %242 = OpLabel |
| %243 = OpLoad %v3uint %comp_main_global_invocation_id_Input None |
| %244 = OpFunctionCall %void %comp_main_inner %243 |
| OpReturn |
| OpFunctionEnd |