blob: 1862d98fa60107bf636f9f49d6dd179b7d07b1be [file] [log] [blame] [edit]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 310
; Schema: 0
OpCapability Shader
%80 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main_count "main_count" %main_count_global_invocation_id_Input
OpExecutionMode %main_count LocalSize 128 1 1
OpMemberName %Uniforms 0 "numTriangles"
OpMemberName %Uniforms 1 "gridSize"
OpMemberName %Uniforms 2 "puuuuuuuuuuuuuuuuad1"
OpMemberName %Uniforms 3 "pad2"
OpMemberName %Uniforms 4 "bbMin"
OpMemberName %Uniforms 5 "bbMax"
OpName %Uniforms "Uniforms"
OpMemberName %tint_symbol_1 0 "tint_symbol"
OpName %tint_symbol_1 "tint_symbol_1"
OpMemberName %U32s 0 "values"
OpName %U32s "U32s"
OpName %indices "indices"
OpMemberName %F32s 0 "values"
OpName %F32s "F32s"
OpName %positions "positions"
OpMemberName %AU32s 0 "values"
OpName %AU32s "AU32s"
OpName %counters "counters"
OpMemberName %AI32s 0 "values"
OpName %AI32s "AI32s"
OpName %LUT "LUT"
OpMemberName %Dbg 0 "offsetCounter"
OpMemberName %Dbg 1 "pad0"
OpMemberName %Dbg 2 "pad1"
OpMemberName %Dbg 3 "pad2"
OpMemberName %Dbg 4 "value0"
OpMemberName %Dbg 5 "value1"
OpMemberName %Dbg 6 "value2"
OpMemberName %Dbg 7 "value3"
OpMemberName %Dbg 8 "value_f32_0"
OpMemberName %Dbg 9 "value_f32_1"
OpMemberName %Dbg 10 "value_f32_2"
OpMemberName %Dbg 11 "value_f32_3"
OpName %Dbg "Dbg"
OpMemberName %tint_symbol_3 0 "tint_symbol_2"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %main_count_global_invocation_id_Input "main_count_global_invocation_id_Input"
OpName %marg8uintin "marg8uintin"
OpName %toVoxelPos "toVoxelPos"
OpName %position "position"
OpName %bbMin "bbMin"
OpName %bbMax "bbMax"
OpName %bbSize "bbSize"
OpName %cubeSize "cubeSize"
OpName %gridSize "gridSize"
OpName %gx "gx"
OpName %gy "gy"
OpName %gz "gz"
OpName %toIndex1D "toIndex1D"
OpName %gridSize_0 "gridSize"
OpName %voxelPos "voxelPos"
OpName %icoord "icoord"
OpName %toIndex4D "toIndex4D"
OpName %gridSize_1 "gridSize"
OpName %index "index"
OpName %z "z"
OpName %y "y"
OpName %x "x"
OpName %loadPosition "loadPosition"
OpName %vertexIndex "vertexIndex"
OpName %position_0 "position"
OpName %doIgnore "doIgnore"
OpName %g43 "g43"
OpName %kj6 "kj6"
OpName %b53 "b53"
OpName %rwg "rwg"
OpName %rb5 "rb5"
OpName %g55 "g55"
OpName %main_count_inner "main_count_inner"
OpName %GlobalInvocationID "GlobalInvocationID"
OpName %triangleIndex "triangleIndex"
OpName %i0 "i0"
OpName %i1 "i1"
OpName %i2 "i2"
OpName %p0 "p0"
OpName %p1 "p1"
OpName %p2 "p2"
OpName %center "center"
OpName %voxelPos_0 "voxelPos"
OpName %lIndex "lIndex"
OpName %triangleOffset "triangleOffset"
OpName %tint_div_u32 "tint_div_u32"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %tint_mod_u32 "tint_mod_u32"
OpName %lhs_0 "lhs"
OpName %rhs_0 "rhs"
OpName %tint_v3f32_to_v3u32 "tint_v3f32_to_v3u32"
OpName %value "value"
OpName %main_count "main_count"
OpMemberDecorate %Uniforms 0 Offset 0
OpMemberDecorate %Uniforms 1 Offset 4
OpMemberDecorate %Uniforms 2 Offset 8
OpMemberDecorate %Uniforms 3 Offset 12
OpMemberDecorate %Uniforms 4 Offset 16
OpMemberDecorate %Uniforms 5 Offset 32
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 NonWritable
OpDecorate %_runtimearr_uint ArrayStride 4
OpMemberDecorate %U32s 0 Offset 0
OpDecorate %U32s Block
OpDecorate %indices DescriptorSet 0
OpDecorate %indices Binding 10
OpDecorate %indices Coherent
OpDecorate %_runtimearr_float ArrayStride 4
OpMemberDecorate %F32s 0 Offset 0
OpDecorate %F32s Block
OpDecorate %positions DescriptorSet 0
OpDecorate %positions Binding 11
OpDecorate %positions Coherent
OpDecorate %_runtimearr_uint_0 ArrayStride 4
OpMemberDecorate %AU32s 0 Offset 0
OpDecorate %AU32s Block
OpDecorate %counters DescriptorSet 0
OpDecorate %counters Binding 20
OpDecorate %counters Coherent
OpDecorate %_runtimearr_int ArrayStride 4
OpMemberDecorate %AI32s 0 Offset 0
OpDecorate %AI32s Block
OpDecorate %LUT DescriptorSet 0
OpDecorate %LUT Binding 21
OpDecorate %LUT Coherent
OpMemberDecorate %Dbg 0 Offset 0
OpMemberDecorate %Dbg 1 Offset 4
OpMemberDecorate %Dbg 2 Offset 8
OpMemberDecorate %Dbg 3 Offset 12
OpMemberDecorate %Dbg 4 Offset 16
OpMemberDecorate %Dbg 5 Offset 20
OpMemberDecorate %Dbg 6 Offset 24
OpMemberDecorate %Dbg 7 Offset 28
OpMemberDecorate %Dbg 8 Offset 32
OpMemberDecorate %Dbg 9 Offset 36
OpMemberDecorate %Dbg 10 Offset 40
OpMemberDecorate %Dbg 11 Offset 44
OpMemberDecorate %tint_symbol_3 0 Offset 0
OpDecorate %tint_symbol_3 Block
OpDecorate %25 DescriptorSet 0
OpDecorate %25 Binding 50
OpDecorate %25 Coherent
OpDecorate %main_count_global_invocation_id_Input BuiltIn GlobalInvocationId
%uint = OpTypeInt 32 0
%float = OpTypeFloat 32
%v3float = OpTypeVector %float 3
%Uniforms = OpTypeStruct %uint %uint %uint %uint %v3float %v3float
%tint_symbol_1 = OpTypeStruct %Uniforms
%_ptr_Uniform_tint_symbol_1 = OpTypePointer Uniform %tint_symbol_1
%1 = OpVariable %_ptr_Uniform_tint_symbol_1 Uniform
%_runtimearr_uint = OpTypeRuntimeArray %uint
%U32s = OpTypeStruct %_runtimearr_uint
%_ptr_StorageBuffer_U32s = OpTypePointer StorageBuffer %U32s
%indices = OpVariable %_ptr_StorageBuffer_U32s StorageBuffer
%_runtimearr_float = OpTypeRuntimeArray %float
%F32s = OpTypeStruct %_runtimearr_float
%_ptr_StorageBuffer_F32s = OpTypePointer StorageBuffer %F32s
%positions = OpVariable %_ptr_StorageBuffer_F32s StorageBuffer
%_runtimearr_uint_0 = OpTypeRuntimeArray %uint
%AU32s = OpTypeStruct %_runtimearr_uint_0
%_ptr_StorageBuffer_AU32s = OpTypePointer StorageBuffer %AU32s
%counters = OpVariable %_ptr_StorageBuffer_AU32s StorageBuffer
%int = OpTypeInt 32 1
%_runtimearr_int = OpTypeRuntimeArray %int
%AI32s = OpTypeStruct %_runtimearr_int
%_ptr_StorageBuffer_AI32s = OpTypePointer StorageBuffer %AI32s
%LUT = OpVariable %_ptr_StorageBuffer_AI32s StorageBuffer
%Dbg = OpTypeStruct %uint %uint %uint %uint %uint %uint %uint %uint %float %float %float %float
%tint_symbol_3 = OpTypeStruct %Dbg
%_ptr_StorageBuffer_tint_symbol_3 = OpTypePointer StorageBuffer %tint_symbol_3
%25 = OpVariable %_ptr_StorageBuffer_tint_symbol_3 StorageBuffer
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%main_count_global_invocation_id_Input = OpVariable %_ptr_Input_v3uint Input
%void = OpTypeVoid
%34 = OpTypeFunction %void
%38 = OpTypeFunction %v3float %v3float
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
%uint_0 = OpConstant %uint 0
%uint_4 = OpConstant %uint 4
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%_ptr_Function_v3float = OpTypePointer Function %v3float
%uint_5 = OpConstant %uint 5
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%127 = OpTypeFunction %uint %uint %v3float
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
%_ptr_Function_uint = OpTypePointer Function %uint
%148 = OpTypeFunction %v3uint %uint %uint
%169 = OpTypeFunction %v3float %uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint
%int_0 = OpConstant %int 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_Function_int = OpTypePointer Function %int
%215 = OpTypeFunction %void %v3uint
%bool = OpTypeBool
%float_3 = OpConstant %float 3
%int_1 = OpConstant %int 1
%278 = OpTypeFunction %uint %uint %uint
%292 = OpTypeFunction %v3uint %v3float
%296 = OpConstantNull %v3float
%v3bool = OpTypeVector %bool 3
%299 = OpConstantNull %v3uint
%float_4_29496704e_09 = OpConstant %float 4.29496704e+09
%301 = OpConstantComposite %v3float %float_4_29496704e_09 %float_4_29496704e_09 %float_4_29496704e_09
%uint_4294967295 = OpConstant %uint 4294967295
%304 = OpConstantComposite %v3uint %uint_4294967295 %uint_4294967295 %uint_4294967295
%marg8uintin = OpFunction %void None %34
%35 = OpLabel
OpReturn
OpFunctionEnd
%toVoxelPos = OpFunction %v3float None %38
%position = OpFunctionParameter %v3float
%39 = OpLabel
%bbMin = OpVariable %_ptr_Function_v3float Function
%bbMax = OpVariable %_ptr_Function_v3float Function
%bbSize = OpVariable %_ptr_Function_v3float Function
%cubeSize = OpVariable %_ptr_Function_float Function
%gridSize = OpVariable %_ptr_Function_float Function
%gx = OpVariable %_ptr_Function_float Function
%gy = OpVariable %_ptr_Function_float Function
%gz = OpVariable %_ptr_Function_float Function
%40 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_4
%44 = OpAccessChain %_ptr_Uniform_float %40 %uint_0
%46 = OpLoad %float %44 None
%47 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_4
%48 = OpAccessChain %_ptr_Uniform_float %47 %uint_1
%50 = OpLoad %float %48 None
%51 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_4
%52 = OpAccessChain %_ptr_Uniform_float %51 %uint_2
%54 = OpLoad %float %52 None
%55 = OpCompositeConstruct %v3float %46 %50 %54
OpStore %bbMin %55
%58 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_5
%60 = OpAccessChain %_ptr_Uniform_float %58 %uint_0
%61 = OpLoad %float %60 None
%62 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_5
%63 = OpAccessChain %_ptr_Uniform_float %62 %uint_1
%64 = OpLoad %float %63 None
%65 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_5
%66 = OpAccessChain %_ptr_Uniform_float %65 %uint_2
%67 = OpLoad %float %66 None
%68 = OpCompositeConstruct %v3float %61 %64 %67
OpStore %bbMax %68
%70 = OpLoad %v3float %bbMin None
%71 = OpLoad %v3float %bbMin None
%72 = OpFSub %v3float %70 %71
OpStore %bbSize %72
%74 = OpAccessChain %_ptr_Function_float %bbMax %uint_0
%76 = OpLoad %float %74 None
%77 = OpAccessChain %_ptr_Function_float %bbMax %uint_1
%78 = OpLoad %float %77 None
%79 = OpExtInst %float %80 FMax %76 %78
%81 = OpAccessChain %_ptr_Function_float %bbSize %uint_2
%82 = OpLoad %float %81 None
%83 = OpExtInst %float %80 FMax %79 %82
OpStore %cubeSize %83
%85 = OpAccessChain %_ptr_Uniform_uint %1 %uint_0 %uint_1
%87 = OpLoad %uint %85 None
%88 = OpConvertUToF %float %87
OpStore %gridSize %88
%90 = OpLoad %float %cubeSize None
%91 = OpCompositeExtract %float %position 0
%92 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_4
%93 = OpAccessChain %_ptr_Uniform_float %92 %uint_0
%94 = OpLoad %float %93 None
%95 = OpFSub %float %91 %94
%96 = OpFMul %float %90 %95
%97 = OpLoad %float %cubeSize None
%98 = OpFDiv %float %96 %97
OpStore %gx %98
%100 = OpLoad %float %gx None
%101 = OpCompositeExtract %float %position 1
%102 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_4
%103 = OpAccessChain %_ptr_Uniform_float %102 %uint_1
%104 = OpLoad %float %103 None
%105 = OpFSub %float %101 %104
%106 = OpFMul %float %100 %105
%107 = OpLoad %float %gridSize None
%108 = OpFDiv %float %106 %107
OpStore %gy %108
%110 = OpLoad %float %gridSize None
%111 = OpCompositeExtract %float %position 2
%112 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %uint_4
%113 = OpAccessChain %_ptr_Uniform_float %112 %uint_2
%114 = OpLoad %float %113 None
%115 = OpFSub %float %111 %114
%116 = OpFMul %float %110 %115
%117 = OpLoad %float %gridSize None
%118 = OpFDiv %float %116 %117
OpStore %gz %118
%120 = OpLoad %float %gz None
%121 = OpLoad %float %gz None
%122 = OpLoad %float %gz None
%123 = OpCompositeConstruct %v3float %120 %121 %122
OpReturnValue %123
OpFunctionEnd
%toIndex1D = OpFunction %uint None %127
%gridSize_0 = OpFunctionParameter %uint
%voxelPos = OpFunctionParameter %v3float
%128 = OpLabel
%icoord = OpVariable %_ptr_Function_v3uint Function
%129 = OpFunctionCall %v3uint %tint_v3f32_to_v3u32 %voxelPos
OpStore %icoord %129
%133 = OpAccessChain %_ptr_Function_uint %icoord %uint_0
%135 = OpLoad %uint %133 None
%136 = OpAccessChain %_ptr_Function_uint %icoord %uint_1
%137 = OpLoad %uint %136 None
%138 = OpIMul %uint %gridSize_0 %137
%139 = OpIAdd %uint %135 %138
%140 = OpIMul %uint %gridSize_0 %gridSize_0
%141 = OpAccessChain %_ptr_Function_uint %icoord %uint_2
%142 = OpLoad %uint %141 None
%143 = OpIMul %uint %140 %142
%144 = OpIAdd %uint %139 %143
OpReturnValue %144
OpFunctionEnd
%toIndex4D = OpFunction %v3uint None %148
%gridSize_1 = OpFunctionParameter %uint
%index = OpFunctionParameter %uint
%149 = OpLabel
%z = OpVariable %_ptr_Function_uint Function
%y = OpVariable %_ptr_Function_uint Function
%x = OpVariable %_ptr_Function_uint Function
%150 = OpIMul %uint %index %index
%151 = OpFunctionCall %uint %tint_div_u32 %gridSize_1 %150
OpStore %z %151
%154 = OpIMul %uint %gridSize_1 %gridSize_1
%155 = OpLoad %uint %z None
%156 = OpIMul %uint %154 %155
%157 = OpISub %uint %gridSize_1 %156
%158 = OpFunctionCall %uint %tint_div_u32 %157 %gridSize_1
OpStore %y %158
%160 = OpFunctionCall %uint %tint_mod_u32 %index %gridSize_1
OpStore %x %160
%163 = OpLoad %uint %z None
%164 = OpLoad %uint %y None
%165 = OpLoad %uint %y None
%166 = OpCompositeConstruct %v3uint %163 %164 %165
OpReturnValue %166
OpFunctionEnd
%loadPosition = OpFunction %v3float None %169
%vertexIndex = OpFunctionParameter %uint
%170 = OpLabel
%position_0 = OpVariable %_ptr_Function_v3float Function
%171 = OpIMul %uint %uint_3 %vertexIndex
%173 = OpIAdd %uint %171 %uint_0
%174 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %173
%176 = OpLoad %float %174 None
%177 = OpIMul %uint %uint_3 %vertexIndex
%178 = OpIAdd %uint %177 %uint_1
%179 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %178
%180 = OpLoad %float %179 None
%181 = OpIMul %uint %uint_3 %vertexIndex
%182 = OpIAdd %uint %181 %uint_2
%183 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %182
%184 = OpLoad %float %183 None
%185 = OpCompositeConstruct %v3float %176 %180 %184
OpStore %position_0 %185
%187 = OpLoad %v3float %position_0 None
OpReturnValue %187
OpFunctionEnd
%doIgnore = OpFunction %void None %34
%189 = OpLabel
%g43 = OpVariable %_ptr_Function_uint Function
%kj6 = OpVariable %_ptr_Function_uint Function
%b53 = OpVariable %_ptr_Function_uint Function
%rwg = OpVariable %_ptr_Function_uint Function
%rb5 = OpVariable %_ptr_Function_float Function
%g55 = OpVariable %_ptr_Function_int Function
%190 = OpAccessChain %_ptr_Uniform_uint %1 %uint_0 %uint_0
%191 = OpLoad %uint %190 None
OpStore %g43 %191
%193 = OpAccessChain %_ptr_StorageBuffer_uint %25 %uint_0 %uint_5
%195 = OpLoad %uint %193 None
OpStore %kj6 %195
%197 = OpAccessChain %_ptr_StorageBuffer_uint_0 %counters %uint_0 %int_0
%200 = OpAtomicLoad %uint %197 %uint_1 %uint_0
OpStore %b53 %200
%202 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %int_0
%203 = OpLoad %uint %202 None
OpStore %rwg %203
%205 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %int_0
%206 = OpLoad %float %205 None
OpStore %rb5 %206
%208 = OpAccessChain %_ptr_StorageBuffer_int %LUT %uint_0 %int_0
%210 = OpAtomicLoad %int %208 %uint_1 %uint_0
OpStore %g55 %210
OpReturn
OpFunctionEnd
%main_count_inner = OpFunction %void None %215
%GlobalInvocationID = OpFunctionParameter %v3uint
%216 = OpLabel
%triangleIndex = OpVariable %_ptr_Function_uint Function
%i0 = OpVariable %_ptr_Function_uint Function
%i1 = OpVariable %_ptr_Function_uint Function
%i2 = OpVariable %_ptr_Function_uint Function
%p0 = OpVariable %_ptr_Function_v3float Function
%p1 = OpVariable %_ptr_Function_v3float Function
%p2 = OpVariable %_ptr_Function_v3float Function
%center = OpVariable %_ptr_Function_v3float Function
%voxelPos_0 = OpVariable %_ptr_Function_v3float Function
%lIndex = OpVariable %_ptr_Function_uint Function
%triangleOffset = OpVariable %_ptr_Function_int Function
%217 = OpCompositeExtract %uint %GlobalInvocationID 0
OpStore %triangleIndex %217
%219 = OpLoad %uint %triangleIndex None
%220 = OpAccessChain %_ptr_Uniform_uint %1 %uint_0 %uint_0
%221 = OpLoad %uint %220 None
%222 = OpUGreaterThanEqual %bool %219 %221
OpSelectionMerge %224 None
OpBranchConditional %222 %225 %224
%225 = OpLabel
OpReturn
%224 = OpLabel
%226 = OpFunctionCall %void %doIgnore
%227 = OpLoad %uint %triangleIndex None
%228 = OpIMul %uint %uint_3 %227
%229 = OpIAdd %uint %228 %uint_0
%230 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %229
%231 = OpLoad %uint %230 None
OpStore %i0 %231
%233 = OpLoad %uint %i0 None
%234 = OpIMul %uint %uint_3 %233
%235 = OpIAdd %uint %234 %uint_1
%236 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %235
%237 = OpLoad %uint %236 None
OpStore %i1 %237
%239 = OpLoad %uint %i0 None
%240 = OpIMul %uint %uint_3 %239
%241 = OpIAdd %uint %240 %uint_2
%242 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %241
%243 = OpLoad %uint %242 None
OpStore %i2 %243
%245 = OpLoad %uint %i0 None
%246 = OpFunctionCall %v3float %loadPosition %245
OpStore %p0 %246
%248 = OpLoad %uint %i0 None
%249 = OpFunctionCall %v3float %loadPosition %248
OpStore %p1 %249
%251 = OpLoad %uint %i2 None
%252 = OpFunctionCall %v3float %loadPosition %251
OpStore %p2 %252
%254 = OpLoad %v3float %p0 None
%255 = OpLoad %v3float %p2 None
%256 = OpFAdd %v3float %254 %255
%257 = OpLoad %v3float %p1 None
%258 = OpFAdd %v3float %256 %257
%259 = OpCompositeConstruct %v3float %float_3 %float_3 %float_3
%261 = OpFDiv %v3float %258 %259
OpStore %center %261
%263 = OpLoad %v3float %p1 None
%264 = OpFunctionCall %v3float %toVoxelPos %263
OpStore %voxelPos_0 %264
%266 = OpAccessChain %_ptr_Uniform_uint %1 %uint_0 %uint_1
%267 = OpLoad %uint %266 None
%268 = OpLoad %v3float %p0 None
%269 = OpFunctionCall %uint %toIndex1D %267 %268
OpStore %lIndex %269
%271 = OpLoad %uint %i1 None
%272 = OpAccessChain %_ptr_StorageBuffer_int %LUT %uint_0 %271
%273 = OpAtomicIAdd %int %272 %uint_1 %uint_0 %int_1
OpStore %triangleOffset %273
OpReturn
OpFunctionEnd
%tint_div_u32 = OpFunction %uint None %278
%lhs = OpFunctionParameter %uint
%rhs = OpFunctionParameter %uint
%279 = OpLabel
%280 = OpIEqual %bool %rhs %uint_0
%281 = OpSelect %uint %280 %uint_1 %rhs
%282 = OpUDiv %uint %lhs %281
OpReturnValue %282
OpFunctionEnd
%tint_mod_u32 = OpFunction %uint None %278
%lhs_0 = OpFunctionParameter %uint
%rhs_0 = OpFunctionParameter %uint
%285 = OpLabel
%286 = OpIEqual %bool %rhs_0 %uint_0
%287 = OpSelect %uint %286 %uint_1 %rhs_0
%288 = OpUDiv %uint %lhs_0 %287
%289 = OpIMul %uint %288 %287
%290 = OpISub %uint %lhs_0 %289
OpReturnValue %290
OpFunctionEnd
%tint_v3f32_to_v3u32 = OpFunction %v3uint None %292
%value = OpFunctionParameter %v3float
%293 = OpLabel
%294 = OpConvertFToU %v3uint %value
%295 = OpFOrdGreaterThanEqual %v3bool %value %296
%298 = OpSelect %v3uint %295 %294 %299
%300 = OpFOrdLessThanEqual %v3bool %value %301
%303 = OpSelect %v3uint %300 %298 %304
OpReturnValue %303
OpFunctionEnd
%main_count = OpFunction %void None %34
%307 = OpLabel
%308 = OpLoad %v3uint %main_count_global_invocation_id_Input None
%309 = OpFunctionCall %void %main_count_inner %308
OpReturn
OpFunctionEnd