| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 515 |
| ; Schema: 0 |
| OpCapability Shader |
| %145 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %computeMain "computeMain" %global_id_1 |
| OpExecutionMode %computeMain LocalSize 4 4 4 |
| OpName %global_id_1 "global_id_1" |
| OpName %Tables "Tables" |
| OpMemberName %Tables 0 "edges" |
| OpMemberName %Tables 1 "tris" |
| OpName %tables "tables" |
| OpName %IsosurfaceVolume "IsosurfaceVolume" |
| OpMemberName %IsosurfaceVolume 0 "min" |
| OpMemberName %IsosurfaceVolume 1 "max" |
| OpMemberName %IsosurfaceVolume 2 "step" |
| OpMemberName %IsosurfaceVolume 3 "size" |
| OpMemberName %IsosurfaceVolume 4 "threshold" |
| OpMemberName %IsosurfaceVolume 5 "values" |
| OpName %volume "volume" |
| OpName %PositionBuffer "PositionBuffer" |
| OpMemberName %PositionBuffer 0 "values" |
| OpName %positionsOut "positionsOut" |
| OpName %NormalBuffer "NormalBuffer" |
| OpMemberName %NormalBuffer 0 "values" |
| OpName %normalsOut "normalsOut" |
| OpName %IndexBuffer "IndexBuffer" |
| OpMemberName %IndexBuffer 0 "tris" |
| OpName %indicesOut "indicesOut" |
| OpName %DrawIndirectArgs "DrawIndirectArgs" |
| OpMemberName %DrawIndirectArgs 0 "vc" |
| OpMemberName %DrawIndirectArgs 1 "vertexCount" |
| OpMemberName %DrawIndirectArgs 2 "firstVertex" |
| OpMemberName %DrawIndirectArgs 3 "firstInstance" |
| OpMemberName %DrawIndirectArgs 4 "indexCount" |
| OpMemberName %DrawIndirectArgs 5 "indexedInstanceCount" |
| OpMemberName %DrawIndirectArgs 6 "indexedFirstIndex" |
| OpMemberName %DrawIndirectArgs 7 "indexedBaseVertex" |
| OpMemberName %DrawIndirectArgs 8 "indexedFirstInstance" |
| OpName %drawOut "drawOut" |
| OpName %positions "positions" |
| OpName %normals "normals" |
| OpName %indices "indices" |
| OpName %cubeVerts "cubeVerts" |
| OpName %valueAt "valueAt" |
| OpName %index "index" |
| OpName %positionAt "positionAt" |
| OpName %index_0 "index" |
| OpName %normalAt "normalAt" |
| OpName %index_1 "index" |
| OpName %interpX "interpX" |
| OpName %index_2 "index" |
| OpName %i "i" |
| OpName %va "va" |
| OpName %vb "vb" |
| OpName %interpY "interpY" |
| OpName %index_3 "index" |
| OpName %i_0 "i" |
| OpName %va_0 "va" |
| OpName %vb_0 "vb" |
| OpName %interpZ "interpZ" |
| OpName %index_4 "index" |
| OpName %i_1 "i" |
| OpName %va_1 "va" |
| OpName %vb_1 "vb" |
| OpName %computeMain_inner "computeMain_inner" |
| OpName %global_id "global_id" |
| OpName %cubeIndex "cubeIndex" |
| OpName %firstVertex "firstVertex" |
| OpName %i_2 "i" |
| OpName %i_3 "i" |
| OpName %i_4 "i" |
| OpName %computeMain "computeMain" |
| OpDecorate %global_id_1 BuiltIn GlobalInvocationId |
| OpDecorate %Tables Block |
| OpMemberDecorate %Tables 0 Offset 0 |
| OpDecorate %_arr_uint_uint_256 ArrayStride 4 |
| OpMemberDecorate %Tables 1 Offset 1024 |
| OpDecorate %_arr_int_uint_4096 ArrayStride 4 |
| OpDecorate %tables NonWritable |
| OpDecorate %tables DescriptorSet 0 |
| OpDecorate %tables Binding 0 |
| OpDecorate %IsosurfaceVolume Block |
| OpMemberDecorate %IsosurfaceVolume 0 Offset 0 |
| OpMemberDecorate %IsosurfaceVolume 1 Offset 16 |
| OpMemberDecorate %IsosurfaceVolume 2 Offset 32 |
| OpMemberDecorate %IsosurfaceVolume 3 Offset 48 |
| OpMemberDecorate %IsosurfaceVolume 4 Offset 60 |
| OpMemberDecorate %IsosurfaceVolume 5 Offset 64 |
| OpDecorate %_runtimearr_float ArrayStride 4 |
| OpDecorate %volume NonReadable |
| OpDecorate %volume DescriptorSet 0 |
| OpDecorate %volume Binding 1 |
| OpDecorate %PositionBuffer Block |
| OpMemberDecorate %PositionBuffer 0 Offset 0 |
| OpDecorate %positionsOut NonReadable |
| OpDecorate %positionsOut DescriptorSet 0 |
| OpDecorate %positionsOut Binding 2 |
| OpDecorate %NormalBuffer Block |
| OpMemberDecorate %NormalBuffer 0 Offset 0 |
| OpDecorate %normalsOut NonReadable |
| OpDecorate %normalsOut DescriptorSet 0 |
| OpDecorate %normalsOut Binding 3 |
| OpDecorate %IndexBuffer Block |
| OpMemberDecorate %IndexBuffer 0 Offset 0 |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpDecorate %indicesOut NonReadable |
| OpDecorate %indicesOut DescriptorSet 0 |
| OpDecorate %indicesOut Binding 4 |
| OpDecorate %DrawIndirectArgs Block |
| OpMemberDecorate %DrawIndirectArgs 0 Offset 0 |
| OpMemberDecorate %DrawIndirectArgs 1 Offset 4 |
| OpMemberDecorate %DrawIndirectArgs 2 Offset 8 |
| OpMemberDecorate %DrawIndirectArgs 3 Offset 12 |
| OpMemberDecorate %DrawIndirectArgs 4 Offset 16 |
| OpMemberDecorate %DrawIndirectArgs 5 Offset 20 |
| OpMemberDecorate %DrawIndirectArgs 6 Offset 24 |
| OpMemberDecorate %DrawIndirectArgs 7 Offset 28 |
| OpMemberDecorate %DrawIndirectArgs 8 Offset 32 |
| OpDecorate %drawOut DescriptorSet 0 |
| OpDecorate %drawOut Binding 5 |
| OpDecorate %_arr_v3float_uint_12 ArrayStride 16 |
| OpDecorate %_arr_uint_uint_12 ArrayStride 4 |
| %uint = OpTypeInt 32 0 |
| %v3uint = OpTypeVector %uint 3 |
| %_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| %global_id_1 = OpVariable %_ptr_Input_v3uint Input |
| %uint_256 = OpConstant %uint 256 |
| %_arr_uint_uint_256 = OpTypeArray %uint %uint_256 |
| %int = OpTypeInt 32 1 |
| %uint_4096 = OpConstant %uint 4096 |
| %_arr_int_uint_4096 = OpTypeArray %int %uint_4096 |
| %Tables = OpTypeStruct %_arr_uint_uint_256 %_arr_int_uint_4096 |
| %_ptr_StorageBuffer_Tables = OpTypePointer StorageBuffer %Tables |
| %tables = OpVariable %_ptr_StorageBuffer_Tables StorageBuffer |
| %float = OpTypeFloat 32 |
| %v3float = OpTypeVector %float 3 |
| %_runtimearr_float = OpTypeRuntimeArray %float |
| %IsosurfaceVolume = OpTypeStruct %v3float %v3float %v3float %v3uint %float %_runtimearr_float |
| %_ptr_StorageBuffer_IsosurfaceVolume = OpTypePointer StorageBuffer %IsosurfaceVolume |
| %volume = OpVariable %_ptr_StorageBuffer_IsosurfaceVolume StorageBuffer |
| %PositionBuffer = OpTypeStruct %_runtimearr_float |
| %_ptr_StorageBuffer_PositionBuffer = OpTypePointer StorageBuffer %PositionBuffer |
| %positionsOut = OpVariable %_ptr_StorageBuffer_PositionBuffer StorageBuffer |
| %NormalBuffer = OpTypeStruct %_runtimearr_float |
| %_ptr_StorageBuffer_NormalBuffer = OpTypePointer StorageBuffer %NormalBuffer |
| %normalsOut = OpVariable %_ptr_StorageBuffer_NormalBuffer StorageBuffer |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %IndexBuffer = OpTypeStruct %_runtimearr_uint |
| %_ptr_StorageBuffer_IndexBuffer = OpTypePointer StorageBuffer %IndexBuffer |
| %indicesOut = OpVariable %_ptr_StorageBuffer_IndexBuffer StorageBuffer |
| %DrawIndirectArgs = OpTypeStruct %uint %uint %uint %uint %uint %uint %uint %uint %uint |
| %_ptr_StorageBuffer_DrawIndirectArgs = OpTypePointer StorageBuffer %DrawIndirectArgs |
| %drawOut = OpVariable %_ptr_StorageBuffer_DrawIndirectArgs StorageBuffer |
| %uint_12 = OpConstant %uint 12 |
| %_arr_v3float_uint_12 = OpTypeArray %v3float %uint_12 |
| %_ptr_Private__arr_v3float_uint_12 = OpTypePointer Private %_arr_v3float_uint_12 |
| %36 = OpConstantNull %_arr_v3float_uint_12 |
| %positions = OpVariable %_ptr_Private__arr_v3float_uint_12 Private %36 |
| %normals = OpVariable %_ptr_Private__arr_v3float_uint_12 Private %36 |
| %_arr_uint_uint_12 = OpTypeArray %uint %uint_12 |
| %_ptr_Private__arr_uint_uint_12 = OpTypePointer Private %_arr_uint_uint_12 |
| %41 = OpConstantNull %_arr_uint_uint_12 |
| %indices = OpVariable %_ptr_Private__arr_uint_uint_12 Private %41 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Private_uint = OpTypePointer Private %uint |
| %cubeVerts = OpVariable %_ptr_Private_uint Private %uint_0 |
| %45 = OpTypeFunction %float %v3uint |
| %bool = OpTypeBool |
| %uint_3 = OpConstant %uint 3 |
| %_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint |
| %v3bool = OpTypeVector %bool 3 |
| %float_0 = OpConstant %float 0 |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %uint_1 = OpConstant %uint 1 |
| %uint_5 = OpConstant %uint 5 |
| %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| %80 = OpTypeFunction %v3float %v3uint |
| %_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float |
| %uint_2 = OpConstant %uint 2 |
| %98 = OpConstantComposite %v3uint %uint_1 %uint_0 %uint_0 |
| %104 = OpConstantComposite %v3uint %uint_0 %uint_1 %uint_0 |
| %110 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 |
| %void = OpTypeVoid |
| %116 = OpTypeFunction %void %uint %v3uint %float %float |
| %uint_4 = OpConstant %uint 4 |
| %_ptr_Private_v3float = OpTypePointer Private %v3float |
| %211 = OpTypeFunction %void %v3uint |
| %216 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_0 |
| %220 = OpConstantComposite %v3uint %uint_1 %uint_0 %uint_1 |
| %222 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 |
| %224 = OpConstantComposite %v3uint %uint_0 %uint_1 %uint_1 |
| %_ptr_Function_uint = OpTypePointer Function %uint |
| %236 = OpConstantNull %uint |
| %uint_8 = OpConstant %uint 8 |
| %uint_16 = OpConstant %uint 16 |
| %uint_32 = OpConstant %uint 32 |
| %uint_64 = OpConstant %uint 64 |
| %uint_128 = OpConstant %uint 128 |
| %uint_6 = OpConstant %uint 6 |
| %uint_7 = OpConstant %uint 7 |
| %uint_512 = OpConstant %uint 512 |
| %uint_9 = OpConstant %uint 9 |
| %uint_1024 = OpConstant %uint 1024 |
| %uint_10 = OpConstant %uint 10 |
| %uint_2048 = OpConstant %uint 2048 |
| %uint_11 = OpConstant %uint 11 |
| %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int |
| %_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint |
| %uint_15 = OpConstant %uint 15 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %510 = OpTypeFunction %void |
| %valueAt = OpFunction %float None %45 |
| %index = OpFunctionParameter %v3uint |
| %48 = OpLabel |
| %53 = OpAccessChain %_ptr_StorageBuffer_v3uint %volume %uint_3 |
| %54 = OpLoad %v3uint %53 |
| %55 = OpUGreaterThanEqual %v3bool %index %54 |
| %49 = OpAny %bool %55 |
| OpSelectionMerge %57 None |
| OpBranchConditional %49 %58 %57 |
| %58 = OpLabel |
| OpReturnValue %float_0 |
| %57 = OpLabel |
| %60 = OpCompositeExtract %uint %index 0 |
| %61 = OpCompositeExtract %uint %index 1 |
| %63 = OpAccessChain %_ptr_StorageBuffer_uint %volume %uint_3 %uint_0 |
| %64 = OpLoad %uint %63 |
| %65 = OpIMul %uint %61 %64 |
| %66 = OpIAdd %uint %60 %65 |
| %67 = OpCompositeExtract %uint %index 2 |
| %68 = OpAccessChain %_ptr_StorageBuffer_uint %volume %uint_3 %uint_0 |
| %69 = OpLoad %uint %68 |
| %70 = OpIMul %uint %67 %69 |
| %72 = OpAccessChain %_ptr_StorageBuffer_uint %volume %uint_3 %uint_1 |
| %73 = OpLoad %uint %72 |
| %74 = OpIMul %uint %70 %73 |
| %75 = OpIAdd %uint %66 %74 |
| %78 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_5 %75 |
| %79 = OpLoad %float %78 |
| OpReturnValue %79 |
| OpFunctionEnd |
| %positionAt = OpFunction %v3float None %80 |
| %index_0 = OpFunctionParameter %v3uint |
| %83 = OpLabel |
| %85 = OpAccessChain %_ptr_StorageBuffer_v3float %volume %uint_0 |
| %86 = OpLoad %v3float %85 |
| %88 = OpAccessChain %_ptr_StorageBuffer_v3float %volume %uint_2 |
| %89 = OpLoad %v3float %88 |
| %91 = OpVectorShuffle %v3uint %index_0 %index_0 0 1 2 |
| %90 = OpConvertUToF %v3float %91 |
| %92 = OpFMul %v3float %89 %90 |
| %93 = OpFAdd %v3float %86 %92 |
| OpReturnValue %93 |
| OpFunctionEnd |
| %normalAt = OpFunction %v3float None %80 |
| %index_1 = OpFunctionParameter %v3uint |
| %96 = OpLabel |
| %99 = OpISub %v3uint %index_1 %98 |
| %97 = OpFunctionCall %float %valueAt %99 |
| %101 = OpIAdd %v3uint %index_1 %98 |
| %100 = OpFunctionCall %float %valueAt %101 |
| %102 = OpFSub %float %97 %100 |
| %105 = OpISub %v3uint %index_1 %104 |
| %103 = OpFunctionCall %float %valueAt %105 |
| %107 = OpIAdd %v3uint %index_1 %104 |
| %106 = OpFunctionCall %float %valueAt %107 |
| %108 = OpFSub %float %103 %106 |
| %111 = OpISub %v3uint %index_1 %110 |
| %109 = OpFunctionCall %float %valueAt %111 |
| %113 = OpIAdd %v3uint %index_1 %110 |
| %112 = OpFunctionCall %float %valueAt %113 |
| %114 = OpFSub %float %109 %112 |
| %115 = OpCompositeConstruct %v3float %102 %108 %114 |
| OpReturnValue %115 |
| OpFunctionEnd |
| %interpX = OpFunction %void None %116 |
| %index_2 = OpFunctionParameter %uint |
| %i = OpFunctionParameter %v3uint |
| %va = OpFunctionParameter %float |
| %vb = OpFunctionParameter %float |
| %123 = OpLabel |
| %125 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %126 = OpLoad %float %125 |
| %127 = OpFSub %float %126 %va |
| %128 = OpFSub %float %vb %va |
| %129 = OpFDiv %float %127 %128 |
| %130 = OpLoad %uint %cubeVerts |
| %132 = OpAccessChain %_ptr_Private_v3float %positions %130 |
| %133 = OpFunctionCall %v3float %positionAt %i |
| %134 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_2 %uint_0 |
| %135 = OpLoad %float %134 |
| %136 = OpFMul %float %135 %129 |
| %137 = OpCompositeConstruct %v3float %136 %float_0 %float_0 |
| %138 = OpFAdd %v3float %133 %137 |
| OpStore %132 %138 |
| %139 = OpFunctionCall %v3float %normalAt %i |
| %141 = OpIAdd %v3uint %i %98 |
| %140 = OpFunctionCall %v3float %normalAt %141 |
| %142 = OpLoad %uint %cubeVerts |
| %143 = OpAccessChain %_ptr_Private_v3float %normals %142 |
| %146 = OpCompositeConstruct %v3float %129 %129 %129 |
| %144 = OpExtInst %v3float %145 FMix %139 %140 %146 |
| OpStore %143 %144 |
| %147 = OpAccessChain %_ptr_Private_uint %indices %index_2 |
| %148 = OpLoad %uint %cubeVerts |
| OpStore %147 %148 |
| %149 = OpLoad %uint %cubeVerts |
| %150 = OpIAdd %uint %149 %uint_1 |
| OpStore %cubeVerts %150 |
| OpReturn |
| OpFunctionEnd |
| %interpY = OpFunction %void None %116 |
| %index_3 = OpFunctionParameter %uint |
| %i_0 = OpFunctionParameter %v3uint |
| %va_0 = OpFunctionParameter %float |
| %vb_0 = OpFunctionParameter %float |
| %156 = OpLabel |
| %157 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %158 = OpLoad %float %157 |
| %159 = OpFSub %float %158 %va_0 |
| %160 = OpFSub %float %vb_0 %va_0 |
| %161 = OpFDiv %float %159 %160 |
| %162 = OpLoad %uint %cubeVerts |
| %163 = OpAccessChain %_ptr_Private_v3float %positions %162 |
| %164 = OpFunctionCall %v3float %positionAt %i_0 |
| %165 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_2 %uint_1 |
| %166 = OpLoad %float %165 |
| %167 = OpFMul %float %166 %161 |
| %168 = OpCompositeConstruct %v3float %float_0 %167 %float_0 |
| %169 = OpFAdd %v3float %164 %168 |
| OpStore %163 %169 |
| %170 = OpFunctionCall %v3float %normalAt %i_0 |
| %172 = OpIAdd %v3uint %i_0 %104 |
| %171 = OpFunctionCall %v3float %normalAt %172 |
| %173 = OpLoad %uint %cubeVerts |
| %174 = OpAccessChain %_ptr_Private_v3float %normals %173 |
| %176 = OpCompositeConstruct %v3float %161 %161 %161 |
| %175 = OpExtInst %v3float %145 FMix %170 %171 %176 |
| OpStore %174 %175 |
| %177 = OpAccessChain %_ptr_Private_uint %indices %index_3 |
| %178 = OpLoad %uint %cubeVerts |
| OpStore %177 %178 |
| %179 = OpLoad %uint %cubeVerts |
| %180 = OpIAdd %uint %179 %uint_1 |
| OpStore %cubeVerts %180 |
| OpReturn |
| OpFunctionEnd |
| %interpZ = OpFunction %void None %116 |
| %index_4 = OpFunctionParameter %uint |
| %i_1 = OpFunctionParameter %v3uint |
| %va_1 = OpFunctionParameter %float |
| %vb_1 = OpFunctionParameter %float |
| %186 = OpLabel |
| %187 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %188 = OpLoad %float %187 |
| %189 = OpFSub %float %188 %va_1 |
| %190 = OpFSub %float %vb_1 %va_1 |
| %191 = OpFDiv %float %189 %190 |
| %192 = OpLoad %uint %cubeVerts |
| %193 = OpAccessChain %_ptr_Private_v3float %positions %192 |
| %194 = OpFunctionCall %v3float %positionAt %i_1 |
| %195 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_2 %uint_2 |
| %196 = OpLoad %float %195 |
| %197 = OpFMul %float %196 %191 |
| %198 = OpCompositeConstruct %v3float %float_0 %float_0 %197 |
| %199 = OpFAdd %v3float %194 %198 |
| OpStore %193 %199 |
| %200 = OpFunctionCall %v3float %normalAt %i_1 |
| %202 = OpIAdd %v3uint %i_1 %110 |
| %201 = OpFunctionCall %v3float %normalAt %202 |
| %203 = OpLoad %uint %cubeVerts |
| %204 = OpAccessChain %_ptr_Private_v3float %normals %203 |
| %206 = OpCompositeConstruct %v3float %191 %191 %191 |
| %205 = OpExtInst %v3float %145 FMix %200 %201 %206 |
| OpStore %204 %205 |
| %207 = OpAccessChain %_ptr_Private_uint %indices %index_4 |
| %208 = OpLoad %uint %cubeVerts |
| OpStore %207 %208 |
| %209 = OpLoad %uint %cubeVerts |
| %210 = OpIAdd %uint %209 %uint_1 |
| OpStore %cubeVerts %210 |
| OpReturn |
| OpFunctionEnd |
| %computeMain_inner = OpFunction %void None %211 |
| %global_id = OpFunctionParameter %v3uint |
| %214 = OpLabel |
| %cubeIndex = OpVariable %_ptr_Function_uint Function %236 |
| %firstVertex = OpVariable %_ptr_Function_uint Function %236 |
| %i_2 = OpVariable %_ptr_Function_uint Function %236 |
| %i_3 = OpVariable %_ptr_Function_uint Function %236 |
| %i_4 = OpVariable %_ptr_Function_uint Function %236 |
| %215 = OpIAdd %v3uint %global_id %98 |
| %217 = OpIAdd %v3uint %global_id %216 |
| %218 = OpIAdd %v3uint %global_id %104 |
| %219 = OpIAdd %v3uint %global_id %110 |
| %221 = OpIAdd %v3uint %global_id %220 |
| %223 = OpIAdd %v3uint %global_id %222 |
| %225 = OpIAdd %v3uint %global_id %224 |
| %226 = OpFunctionCall %float %valueAt %global_id |
| %227 = OpFunctionCall %float %valueAt %215 |
| %228 = OpFunctionCall %float %valueAt %217 |
| %229 = OpFunctionCall %float %valueAt %218 |
| %230 = OpFunctionCall %float %valueAt %219 |
| %231 = OpFunctionCall %float %valueAt %221 |
| %232 = OpFunctionCall %float %valueAt %223 |
| %233 = OpFunctionCall %float %valueAt %225 |
| OpStore %cubeIndex %uint_0 |
| %237 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %238 = OpLoad %float %237 |
| %239 = OpFOrdLessThan %bool %226 %238 |
| OpSelectionMerge %240 None |
| OpBranchConditional %239 %241 %240 |
| %241 = OpLabel |
| %242 = OpLoad %uint %cubeIndex |
| %243 = OpBitwiseOr %uint %242 %uint_1 |
| OpStore %cubeIndex %243 |
| OpBranch %240 |
| %240 = OpLabel |
| %244 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %245 = OpLoad %float %244 |
| %246 = OpFOrdLessThan %bool %227 %245 |
| OpSelectionMerge %247 None |
| OpBranchConditional %246 %248 %247 |
| %248 = OpLabel |
| %249 = OpLoad %uint %cubeIndex |
| %250 = OpBitwiseOr %uint %249 %uint_2 |
| OpStore %cubeIndex %250 |
| OpBranch %247 |
| %247 = OpLabel |
| %251 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %252 = OpLoad %float %251 |
| %253 = OpFOrdLessThan %bool %228 %252 |
| OpSelectionMerge %254 None |
| OpBranchConditional %253 %255 %254 |
| %255 = OpLabel |
| %256 = OpLoad %uint %cubeIndex |
| %257 = OpBitwiseOr %uint %256 %uint_4 |
| OpStore %cubeIndex %257 |
| OpBranch %254 |
| %254 = OpLabel |
| %258 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %259 = OpLoad %float %258 |
| %260 = OpFOrdLessThan %bool %229 %259 |
| OpSelectionMerge %261 None |
| OpBranchConditional %260 %262 %261 |
| %262 = OpLabel |
| %263 = OpLoad %uint %cubeIndex |
| %265 = OpBitwiseOr %uint %263 %uint_8 |
| OpStore %cubeIndex %265 |
| OpBranch %261 |
| %261 = OpLabel |
| %266 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %267 = OpLoad %float %266 |
| %268 = OpFOrdLessThan %bool %230 %267 |
| OpSelectionMerge %269 None |
| OpBranchConditional %268 %270 %269 |
| %270 = OpLabel |
| %271 = OpLoad %uint %cubeIndex |
| %273 = OpBitwiseOr %uint %271 %uint_16 |
| OpStore %cubeIndex %273 |
| OpBranch %269 |
| %269 = OpLabel |
| %274 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %275 = OpLoad %float %274 |
| %276 = OpFOrdLessThan %bool %231 %275 |
| OpSelectionMerge %277 None |
| OpBranchConditional %276 %278 %277 |
| %278 = OpLabel |
| %279 = OpLoad %uint %cubeIndex |
| %281 = OpBitwiseOr %uint %279 %uint_32 |
| OpStore %cubeIndex %281 |
| OpBranch %277 |
| %277 = OpLabel |
| %282 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %283 = OpLoad %float %282 |
| %284 = OpFOrdLessThan %bool %232 %283 |
| OpSelectionMerge %285 None |
| OpBranchConditional %284 %286 %285 |
| %286 = OpLabel |
| %287 = OpLoad %uint %cubeIndex |
| %289 = OpBitwiseOr %uint %287 %uint_64 |
| OpStore %cubeIndex %289 |
| OpBranch %285 |
| %285 = OpLabel |
| %290 = OpAccessChain %_ptr_StorageBuffer_float %volume %uint_4 |
| %291 = OpLoad %float %290 |
| %292 = OpFOrdLessThan %bool %233 %291 |
| OpSelectionMerge %293 None |
| OpBranchConditional %292 %294 %293 |
| %294 = OpLabel |
| %295 = OpLoad %uint %cubeIndex |
| %297 = OpBitwiseOr %uint %295 %uint_128 |
| OpStore %cubeIndex %297 |
| OpBranch %293 |
| %293 = OpLabel |
| %298 = OpLoad %uint %cubeIndex |
| %299 = OpAccessChain %_ptr_StorageBuffer_uint %tables %uint_0 %298 |
| %300 = OpLoad %uint %299 |
| %301 = OpBitwiseAnd %uint %300 %uint_1 |
| %302 = OpINotEqual %bool %301 %uint_0 |
| OpSelectionMerge %303 None |
| OpBranchConditional %302 %304 %303 |
| %304 = OpLabel |
| %305 = OpFunctionCall %void %interpX %uint_0 %global_id %226 %227 |
| OpBranch %303 |
| %303 = OpLabel |
| %306 = OpBitwiseAnd %uint %300 %uint_2 |
| %307 = OpINotEqual %bool %306 %uint_0 |
| OpSelectionMerge %308 None |
| OpBranchConditional %307 %309 %308 |
| %309 = OpLabel |
| %310 = OpFunctionCall %void %interpY %uint_1 %215 %227 %228 |
| OpBranch %308 |
| %308 = OpLabel |
| %311 = OpBitwiseAnd %uint %300 %uint_4 |
| %312 = OpINotEqual %bool %311 %uint_0 |
| OpSelectionMerge %313 None |
| OpBranchConditional %312 %314 %313 |
| %314 = OpLabel |
| %315 = OpFunctionCall %void %interpX %uint_2 %218 %229 %228 |
| OpBranch %313 |
| %313 = OpLabel |
| %316 = OpBitwiseAnd %uint %300 %uint_8 |
| %317 = OpINotEqual %bool %316 %uint_0 |
| OpSelectionMerge %318 None |
| OpBranchConditional %317 %319 %318 |
| %319 = OpLabel |
| %320 = OpFunctionCall %void %interpY %uint_3 %global_id %226 %229 |
| OpBranch %318 |
| %318 = OpLabel |
| %321 = OpBitwiseAnd %uint %300 %uint_16 |
| %322 = OpINotEqual %bool %321 %uint_0 |
| OpSelectionMerge %323 None |
| OpBranchConditional %322 %324 %323 |
| %324 = OpLabel |
| %325 = OpFunctionCall %void %interpX %uint_4 %219 %230 %231 |
| OpBranch %323 |
| %323 = OpLabel |
| %326 = OpBitwiseAnd %uint %300 %uint_32 |
| %327 = OpINotEqual %bool %326 %uint_0 |
| OpSelectionMerge %328 None |
| OpBranchConditional %327 %329 %328 |
| %329 = OpLabel |
| %330 = OpFunctionCall %void %interpY %uint_5 %221 %231 %232 |
| OpBranch %328 |
| %328 = OpLabel |
| %331 = OpBitwiseAnd %uint %300 %uint_64 |
| %332 = OpINotEqual %bool %331 %uint_0 |
| OpSelectionMerge %333 None |
| OpBranchConditional %332 %334 %333 |
| %334 = OpLabel |
| %335 = OpFunctionCall %void %interpX %uint_6 %225 %233 %232 |
| OpBranch %333 |
| %333 = OpLabel |
| %337 = OpBitwiseAnd %uint %300 %uint_128 |
| %338 = OpINotEqual %bool %337 %uint_0 |
| OpSelectionMerge %339 None |
| OpBranchConditional %338 %340 %339 |
| %340 = OpLabel |
| %341 = OpFunctionCall %void %interpY %uint_7 %219 %230 %233 |
| OpBranch %339 |
| %339 = OpLabel |
| %343 = OpBitwiseAnd %uint %300 %uint_256 |
| %344 = OpINotEqual %bool %343 %uint_0 |
| OpSelectionMerge %345 None |
| OpBranchConditional %344 %346 %345 |
| %346 = OpLabel |
| %347 = OpFunctionCall %void %interpZ %uint_8 %global_id %226 %230 |
| OpBranch %345 |
| %345 = OpLabel |
| %349 = OpBitwiseAnd %uint %300 %uint_512 |
| %350 = OpINotEqual %bool %349 %uint_0 |
| OpSelectionMerge %351 None |
| OpBranchConditional %350 %352 %351 |
| %352 = OpLabel |
| %353 = OpFunctionCall %void %interpZ %uint_9 %215 %227 %231 |
| OpBranch %351 |
| %351 = OpLabel |
| %356 = OpBitwiseAnd %uint %300 %uint_1024 |
| %357 = OpINotEqual %bool %356 %uint_0 |
| OpSelectionMerge %358 None |
| OpBranchConditional %357 %359 %358 |
| %359 = OpLabel |
| %360 = OpFunctionCall %void %interpZ %uint_10 %217 %228 %232 |
| OpBranch %358 |
| %358 = OpLabel |
| %363 = OpBitwiseAnd %uint %300 %uint_2048 |
| %364 = OpINotEqual %bool %363 %uint_0 |
| OpSelectionMerge %365 None |
| OpBranchConditional %364 %366 %365 |
| %366 = OpLabel |
| %367 = OpFunctionCall %void %interpZ %uint_11 %218 %229 %233 |
| OpBranch %365 |
| %365 = OpLabel |
| %369 = OpLoad %uint %cubeIndex |
| %370 = OpShiftLeftLogical %uint %369 %uint_4 |
| %371 = OpIAdd %uint %370 %uint_1 |
| %373 = OpISub %uint %371 %uint_1 |
| %375 = OpAccessChain %_ptr_StorageBuffer_int %tables %uint_1 %373 |
| %376 = OpLoad %int %375 |
| %372 = OpBitcast %uint %376 |
| %380 = OpAccessChain %_ptr_StorageBuffer_uint_0 %drawOut %uint_1 |
| %381 = OpLoad %uint %cubeVerts |
| %377 = OpAtomicIAdd %uint %380 %uint_1 %uint_0 %381 |
| OpStore %firstVertex %377 |
| %383 = OpCompositeExtract %uint %global_id 0 |
| %384 = OpCompositeExtract %uint %global_id 1 |
| %385 = OpAccessChain %_ptr_StorageBuffer_uint %volume %uint_3 %uint_0 |
| %386 = OpLoad %uint %385 |
| %387 = OpIMul %uint %384 %386 |
| %388 = OpIAdd %uint %383 %387 |
| %389 = OpCompositeExtract %uint %global_id 2 |
| %390 = OpAccessChain %_ptr_StorageBuffer_uint %volume %uint_3 %uint_0 |
| %391 = OpLoad %uint %390 |
| %392 = OpIMul %uint %389 %391 |
| %393 = OpAccessChain %_ptr_StorageBuffer_uint %volume %uint_3 %uint_1 |
| %394 = OpLoad %uint %393 |
| %395 = OpIMul %uint %392 %394 |
| %396 = OpIAdd %uint %388 %395 |
| %398 = OpIMul %uint %396 %uint_15 |
| OpStore %i_2 %uint_0 |
| OpBranch %400 |
| %400 = OpLabel |
| OpLoopMerge %401 %402 None |
| OpBranch %403 |
| %403 = OpLabel |
| %405 = OpLoad %uint %i_2 |
| %406 = OpLoad %uint %cubeVerts |
| %407 = OpULessThan %bool %405 %406 |
| %404 = OpLogicalNot %bool %407 |
| OpSelectionMerge %408 None |
| OpBranchConditional %404 %409 %408 |
| %409 = OpLabel |
| OpBranch %401 |
| %408 = OpLabel |
| %410 = OpLoad %uint %firstVertex |
| %411 = OpIMul %uint %410 %uint_3 |
| %412 = OpLoad %uint %i_2 |
| %413 = OpIMul %uint %412 %uint_3 |
| %414 = OpIAdd %uint %411 %413 |
| %415 = OpAccessChain %_ptr_StorageBuffer_float %positionsOut %uint_0 %414 |
| %416 = OpLoad %uint %i_2 |
| %418 = OpAccessChain %_ptr_Private_float %positions %416 %uint_0 |
| %419 = OpLoad %float %418 |
| OpStore %415 %419 |
| %420 = OpLoad %uint %firstVertex |
| %421 = OpIMul %uint %420 %uint_3 |
| %422 = OpLoad %uint %i_2 |
| %423 = OpIMul %uint %422 %uint_3 |
| %424 = OpIAdd %uint %421 %423 |
| %425 = OpIAdd %uint %424 %uint_1 |
| %426 = OpAccessChain %_ptr_StorageBuffer_float %positionsOut %uint_0 %425 |
| %427 = OpLoad %uint %i_2 |
| %428 = OpAccessChain %_ptr_Private_float %positions %427 %uint_1 |
| %429 = OpLoad %float %428 |
| OpStore %426 %429 |
| %430 = OpLoad %uint %firstVertex |
| %431 = OpIMul %uint %430 %uint_3 |
| %432 = OpLoad %uint %i_2 |
| %433 = OpIMul %uint %432 %uint_3 |
| %434 = OpIAdd %uint %431 %433 |
| %435 = OpIAdd %uint %434 %uint_2 |
| %436 = OpAccessChain %_ptr_StorageBuffer_float %positionsOut %uint_0 %435 |
| %437 = OpLoad %uint %i_2 |
| %438 = OpAccessChain %_ptr_Private_float %positions %437 %uint_2 |
| %439 = OpLoad %float %438 |
| OpStore %436 %439 |
| %440 = OpLoad %uint %firstVertex |
| %441 = OpIMul %uint %440 %uint_3 |
| %442 = OpLoad %uint %i_2 |
| %443 = OpIMul %uint %442 %uint_3 |
| %444 = OpIAdd %uint %441 %443 |
| %445 = OpAccessChain %_ptr_StorageBuffer_float %normalsOut %uint_0 %444 |
| %446 = OpLoad %uint %i_2 |
| %447 = OpAccessChain %_ptr_Private_float %normals %446 %uint_0 |
| %448 = OpLoad %float %447 |
| OpStore %445 %448 |
| %449 = OpLoad %uint %firstVertex |
| %450 = OpIMul %uint %449 %uint_3 |
| %451 = OpLoad %uint %i_2 |
| %452 = OpIMul %uint %451 %uint_3 |
| %453 = OpIAdd %uint %450 %452 |
| %454 = OpIAdd %uint %453 %uint_1 |
| %455 = OpAccessChain %_ptr_StorageBuffer_float %normalsOut %uint_0 %454 |
| %456 = OpLoad %uint %i_2 |
| %457 = OpAccessChain %_ptr_Private_float %normals %456 %uint_1 |
| %458 = OpLoad %float %457 |
| OpStore %455 %458 |
| %459 = OpLoad %uint %firstVertex |
| %460 = OpIMul %uint %459 %uint_3 |
| %461 = OpLoad %uint %i_2 |
| %462 = OpIMul %uint %461 %uint_3 |
| %463 = OpIAdd %uint %460 %462 |
| %464 = OpIAdd %uint %463 %uint_2 |
| %465 = OpAccessChain %_ptr_StorageBuffer_float %normalsOut %uint_0 %464 |
| %466 = OpLoad %uint %i_2 |
| %467 = OpAccessChain %_ptr_Private_float %normals %466 %uint_2 |
| %468 = OpLoad %float %467 |
| OpStore %465 %468 |
| OpBranch %402 |
| %402 = OpLabel |
| %469 = OpLoad %uint %i_2 |
| %470 = OpIAdd %uint %469 %uint_1 |
| OpStore %i_2 %470 |
| OpBranch %400 |
| %401 = OpLabel |
| OpStore %i_3 %uint_0 |
| OpBranch %472 |
| %472 = OpLabel |
| OpLoopMerge %473 %474 None |
| OpBranch %475 |
| %475 = OpLabel |
| %477 = OpLoad %uint %i_3 |
| %478 = OpULessThan %bool %477 %372 |
| %476 = OpLogicalNot %bool %478 |
| OpSelectionMerge %479 None |
| OpBranchConditional %476 %480 %479 |
| %480 = OpLabel |
| OpBranch %473 |
| %479 = OpLabel |
| %481 = OpLoad %uint %i_3 |
| %482 = OpIAdd %uint %371 %481 |
| %483 = OpAccessChain %_ptr_StorageBuffer_int %tables %uint_1 %482 |
| %484 = OpLoad %int %483 |
| %485 = OpLoad %uint %i_3 |
| %486 = OpIAdd %uint %398 %485 |
| %487 = OpAccessChain %_ptr_StorageBuffer_uint %indicesOut %uint_0 %486 |
| %488 = OpLoad %uint %firstVertex |
| %489 = OpAccessChain %_ptr_Private_uint %indices %484 |
| %490 = OpLoad %uint %489 |
| %491 = OpIAdd %uint %488 %490 |
| OpStore %487 %491 |
| OpBranch %474 |
| %474 = OpLabel |
| %492 = OpLoad %uint %i_3 |
| %493 = OpIAdd %uint %492 %uint_1 |
| OpStore %i_3 %493 |
| OpBranch %472 |
| %473 = OpLabel |
| OpStore %i_4 %372 |
| OpBranch %495 |
| %495 = OpLabel |
| OpLoopMerge %496 %497 None |
| OpBranch %498 |
| %498 = OpLabel |
| %500 = OpLoad %uint %i_4 |
| %501 = OpULessThan %bool %500 %uint_15 |
| %499 = OpLogicalNot %bool %501 |
| OpSelectionMerge %502 None |
| OpBranchConditional %499 %503 %502 |
| %503 = OpLabel |
| OpBranch %496 |
| %502 = OpLabel |
| %504 = OpLoad %uint %i_4 |
| %505 = OpIAdd %uint %398 %504 |
| %506 = OpAccessChain %_ptr_StorageBuffer_uint %indicesOut %uint_0 %505 |
| %507 = OpLoad %uint %firstVertex |
| OpStore %506 %507 |
| OpBranch %497 |
| %497 = OpLabel |
| %508 = OpLoad %uint %i_4 |
| %509 = OpIAdd %uint %508 %uint_1 |
| OpStore %i_4 %509 |
| OpBranch %495 |
| %496 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %computeMain = OpFunction %void None %510 |
| %512 = OpLabel |
| %514 = OpLoad %v3uint %global_id_1 |
| %513 = OpFunctionCall %void %computeMain_inner %514 |
| OpReturn |
| OpFunctionEnd |