; SPIR-V ; Version: 1.0 ; Generator: rspirv ; Bound: 203 OpCapability Shader OpExtension "SPV_KHR_storage_buffer_storage_class" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %43 "main" %40 OpExecutionMode %43 LocalSize 64 1 1 OpSource GLSL 450 OpName %3 "NUM_PARTICLES" OpName %16 "Particle" OpMemberName %16 0 "pos" OpMemberName %16 1 "vel" OpName %17 "SimParams" OpMemberName %17 0 "deltaT" OpMemberName %17 1 "rule1Distance" OpMemberName %17 2 "rule2Distance" OpMemberName %17 3 "rule3Distance" OpMemberName %17 4 "rule1Scale" OpMemberName %17 5 "rule2Scale" OpMemberName %17 6 "rule3Scale" OpName %19 "Particles" OpMemberName %19 0 "particles" OpName %21 "params" OpName %23 "particlesSrc" OpName %25 "particlesDst" OpName %26 "vPos" OpName %28 "vVel" OpName %29 "cMass" OpName %30 "cVel" OpName %31 "colVel" OpName %32 "cMassCount" OpName %34 "cVelCount" OpName %35 "pos" OpName %36 "vel" OpName %37 "i" OpName %40 "global_invocation_id" OpName %43 "main" OpMemberDecorate %16 0 Offset 0 OpMemberDecorate %16 1 Offset 8 OpDecorate %17 Block OpMemberDecorate %17 0 Offset 0 OpMemberDecorate %17 1 Offset 4 OpMemberDecorate %17 2 Offset 8 OpMemberDecorate %17 3 Offset 12 OpMemberDecorate %17 4 Offset 16 OpMemberDecorate %17 5 Offset 20 OpMemberDecorate %17 6 Offset 24 OpDecorate %18 ArrayStride 16 OpDecorate %19 Block OpMemberDecorate %19 0 Offset 0 OpDecorate %21 DescriptorSet 0 OpDecorate %21 Binding 0 OpDecorate %23 NonWritable OpDecorate %23 DescriptorSet 0 OpDecorate %23 Binding 1 OpDecorate %25 DescriptorSet 0 OpDecorate %25 Binding 2 OpDecorate %40 BuiltIn GlobalInvocationId %2 = OpTypeVoid %4 = OpTypeInt 32 0 %3 = OpConstant %4 1500 %6 = OpTypeFloat 32 %5 = OpConstant %6 0.0 %8 = OpTypeInt 32 1 %7 = OpConstant %8 0 %9 = OpConstant %4 0 %10 = OpConstant %8 1 %11 = OpConstant %4 1 %12 = OpConstant %6 0.1 %13 = OpConstant %6 -1.0 %14 = OpConstant %6 1.0 %15 = OpTypeVector %6 2 %16 = OpTypeStruct %15 %15 %17 = OpTypeStruct %6 %6 %6 %6 %6 %6 %6 %18 = OpTypeRuntimeArray %16 %19 = OpTypeStruct %18 %20 = OpTypeVector %4 3 %22 = OpTypePointer Uniform %17 %21 = OpVariable %22 Uniform %24 = OpTypePointer StorageBuffer %19 %23 = OpVariable %24 StorageBuffer %25 = OpVariable %24 StorageBuffer %27 = OpTypePointer Function %15 %33 = OpTypePointer Function %8 %38 = OpTypePointer Function %4 %41 = OpTypePointer Input %20 %40 = OpVariable %41 Input %44 = OpTypeFunction %2 %47 = OpTypeBool %51 = OpTypePointer StorageBuffer %18 %52 = OpTypePointer StorageBuffer %16 %53 = OpTypePointer StorageBuffer %15 %82 = OpTypePointer Uniform %6 %96 = OpConstant %8 2 %110 = OpConstant %8 3 %145 = OpConstant %8 4 %151 = OpConstant %8 5 %157 = OpConstant %8 6 %179 = OpTypePointer Function %6 %43 = OpFunction %2 None %44 %39 = OpLabel %37 = OpVariable %38 Function %9 %34 = OpVariable %33 Function %7 %30 = OpVariable %27 Function %26 = OpVariable %27 Function %35 = OpVariable %27 Function %31 = OpVariable %27 Function %28 = OpVariable %27 Function %36 = OpVariable %27 Function %32 = OpVariable %33 Function %7 %29 = OpVariable %27 Function %42 = OpLoad %20 %40 OpBranch %45 %45 = OpLabel %46 = OpCompositeExtract %4 %42 0 %48 = OpUGreaterThanEqual %47 %46 %3 OpSelectionMerge %49 None OpBranchConditional %48 %50 %49 %50 = OpLabel OpReturn %49 = OpLabel %54 = OpAccessChain %53 %23 %7 %46 %7 %55 = OpLoad %15 %54 OpStore %26 %55 %56 = OpAccessChain %53 %23 %7 %46 %10 %57 = OpLoad %15 %56 OpStore %28 %57 %58 = OpCompositeConstruct %15 %5 %5 OpStore %29 %58 %59 = OpCompositeConstruct %15 %5 %5 OpStore %30 %59 %60 = OpCompositeConstruct %15 %5 %5 OpStore %31 %60 OpBranch %61 %61 = OpLabel OpLoopMerge %62 %64 None OpBranch %63 %63 = OpLabel %65 = OpLoad %4 %37 %66 = OpUGreaterThanEqual %47 %65 %3 OpSelectionMerge %67 None OpBranchConditional %66 %68 %67 %68 = OpLabel OpBranch %62 %67 = OpLabel %69 = OpLoad %4 %37 %70 = OpIEqual %47 %69 %46 OpSelectionMerge %71 None OpBranchConditional %70 %72 %71 %72 = OpLabel OpBranch %64 %71 = OpLabel %73 = OpLoad %4 %37 %74 = OpAccessChain %53 %23 %7 %73 %7 %75 = OpLoad %15 %74 OpStore %35 %75 %76 = OpLoad %4 %37 %77 = OpAccessChain %53 %23 %7 %76 %10 %78 = OpLoad %15 %77 OpStore %36 %78 %79 = OpLoad %15 %35 %80 = OpLoad %15 %26 %81 = OpExtInst %6 %1 Distance %79 %80 %83 = OpAccessChain %82 %21 %10 %84 = OpLoad %6 %83 %85 = OpFOrdLessThan %47 %81 %84 OpSelectionMerge %86 None OpBranchConditional %85 %87 %86 %87 = OpLabel %88 = OpLoad %15 %29 %89 = OpLoad %15 %35 %90 = OpFAdd %15 %88 %89 OpStore %29 %90 %91 = OpLoad %8 %32 %92 = OpIAdd %8 %91 %10 OpStore %32 %92 OpBranch %86 %86 = OpLabel %93 = OpLoad %15 %35 %94 = OpLoad %15 %26 %95 = OpExtInst %6 %1 Distance %93 %94 %97 = OpAccessChain %82 %21 %96 %98 = OpLoad %6 %97 %99 = OpFOrdLessThan %47 %95 %98 OpSelectionMerge %100 None OpBranchConditional %99 %101 %100 %101 = OpLabel %102 = OpLoad %15 %31 %103 = OpLoad %15 %35 %104 = OpLoad %15 %26 %105 = OpFSub %15 %103 %104 %106 = OpFSub %15 %102 %105 OpStore %31 %106 OpBranch %100 %100 = OpLabel %107 = OpLoad %15 %35 %108 = OpLoad %15 %26 %109 = OpExtInst %6 %1 Distance %107 %108 %111 = OpAccessChain %82 %21 %110 %112 = OpLoad %6 %111 %113 = OpFOrdLessThan %47 %109 %112 OpSelectionMerge %114 None OpBranchConditional %113 %115 %114 %115 = OpLabel %116 = OpLoad %15 %30 %117 = OpLoad %15 %36 %118 = OpFAdd %15 %116 %117 OpStore %30 %118 %119 = OpLoad %8 %34 %120 = OpIAdd %8 %119 %10 OpStore %34 %120 OpBranch %114 %114 = OpLabel OpBranch %64 %64 = OpLabel %121 = OpLoad %4 %37 %122 = OpIAdd %4 %121 %11 OpStore %37 %122 OpBranch %61 %62 = OpLabel %123 = OpLoad %8 %32 %124 = OpSGreaterThan %47 %123 %7 OpSelectionMerge %125 None OpBranchConditional %124 %126 %125 %126 = OpLabel %127 = OpLoad %15 %29 %128 = OpLoad %8 %32 %129 = OpConvertSToF %6 %128 %130 = OpCompositeConstruct %15 %129 %129 %131 = OpFDiv %15 %127 %130 %132 = OpLoad %15 %26 %133 = OpFSub %15 %131 %132 OpStore %29 %133 OpBranch %125 %125 = OpLabel %134 = OpLoad %8 %34 %135 = OpSGreaterThan %47 %134 %7 OpSelectionMerge %136 None OpBranchConditional %135 %137 %136 %137 = OpLabel %138 = OpLoad %15 %30 %139 = OpLoad %8 %34 %140 = OpConvertSToF %6 %139 %141 = OpCompositeConstruct %15 %140 %140 %142 = OpFDiv %15 %138 %141 OpStore %30 %142 OpBranch %136 %136 = OpLabel %143 = OpLoad %15 %28 %144 = OpLoad %15 %29 %146 = OpAccessChain %82 %21 %145 %147 = OpLoad %6 %146 %148 = OpVectorTimesScalar %15 %144 %147 %149 = OpFAdd %15 %143 %148 %150 = OpLoad %15 %31 %152 = OpAccessChain %82 %21 %151 %153 = OpLoad %6 %152 %154 = OpVectorTimesScalar %15 %150 %153 %155 = OpFAdd %15 %149 %154 %156 = OpLoad %15 %30 %158 = OpAccessChain %82 %21 %157 %159 = OpLoad %6 %158 %160 = OpVectorTimesScalar %15 %156 %159 %161 = OpFAdd %15 %155 %160 OpStore %28 %161 %162 = OpLoad %15 %28 %163 = OpExtInst %15 %1 Normalize %162 %164 = OpLoad %15 %28 %165 = OpExtInst %6 %1 Length %164 %166 = OpExtInst %6 %1 FClamp %165 %5 %12 %167 = OpVectorTimesScalar %15 %163 %166 OpStore %28 %167 %168 = OpLoad %15 %26 %169 = OpLoad %15 %28 %170 = OpAccessChain %82 %21 %7 %171 = OpLoad %6 %170 %172 = OpVectorTimesScalar %15 %169 %171 %173 = OpFAdd %15 %168 %172 OpStore %26 %173 %174 = OpLoad %15 %26 %175 = OpCompositeExtract %6 %174 0 %176 = OpFOrdLessThan %47 %175 %13 OpSelectionMerge %177 None OpBranchConditional %176 %178 %177 %178 = OpLabel %180 = OpAccessChain %179 %26 %7 OpStore %180 %14 OpBranch %177 %177 = OpLabel %181 = OpLoad %15 %26 %182 = OpCompositeExtract %6 %181 0 %183 = OpFOrdGreaterThan %47 %182 %14 OpSelectionMerge %184 None OpBranchConditional %183 %185 %184 %185 = OpLabel %186 = OpAccessChain %179 %26 %7 OpStore %186 %13 OpBranch %184 %184 = OpLabel %187 = OpLoad %15 %26 %188 = OpCompositeExtract %6 %187 1 %189 = OpFOrdLessThan %47 %188 %13 OpSelectionMerge %190 None OpBranchConditional %189 %191 %190 %191 = OpLabel %192 = OpAccessChain %179 %26 %10 OpStore %192 %14 OpBranch %190 %190 = OpLabel %193 = OpLoad %15 %26 %194 = OpCompositeExtract %6 %193 1 %195 = OpFOrdGreaterThan %47 %194 %14 OpSelectionMerge %196 None OpBranchConditional %195 %197 %196 %197 = OpLabel %198 = OpAccessChain %179 %26 %10 OpStore %198 %13 OpBranch %196 %196 = OpLabel %199 = OpLoad %15 %26 %200 = OpAccessChain %53 %25 %7 %46 %7 OpStore %200 %199 %201 = OpLoad %15 %28 %202 = OpAccessChain %53 %25 %7 %46 %10 OpStore %202 %201 OpReturn OpFunctionEnd