| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 41 |
| ; Schema: 0 |
| OpCapability Shader |
| %28 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %f "f" |
| OpExecutionMode %f LocalSize 1 1 1 |
| OpMemberName %ubo_block_tint_explicit_layout 0 "inner" |
| OpName %ubo_block_tint_explicit_layout "ubo_block_tint_explicit_layout" |
| OpMemberName %Result 0 "out" |
| OpName %Result "Result" |
| OpMemberName %result_block 0 "inner" |
| OpName %result_block "result_block" |
| OpName %f "f" |
| OpDecorate %_arr_v4uint_uint_5 ArrayStride 16 |
| OpMemberDecorate %ubo_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %ubo_block_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 NonWritable |
| OpMemberDecorate %Result 0 Offset 0 |
| OpMemberDecorate %result_block 0 Offset 0 |
| OpDecorate %result_block Block |
| OpDecorate %8 DescriptorSet 0 |
| OpDecorate %8 Binding 2 |
| OpDecorate %8 Coherent |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %uint_5 = OpConstant %uint 5 |
| %_arr_v4uint_uint_5 = OpTypeArray %v4uint %uint_5 |
| %ubo_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_5 |
| %_ptr_Uniform_ubo_block_tint_explicit_layout = OpTypePointer Uniform %ubo_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_Uniform_ubo_block_tint_explicit_layout Uniform |
| %int = OpTypeInt 32 1 |
| %Result = OpTypeStruct %int |
| %result_block = OpTypeStruct %Result |
| %_ptr_StorageBuffer_result_block = OpTypePointer StorageBuffer %result_block |
| %8 = OpVariable %_ptr_StorageBuffer_result_block StorageBuffer |
| %void = OpTypeVoid |
| %15 = OpTypeFunction %void |
| %_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint |
| %uint_4 = OpConstant %uint 4 |
| %uint_3 = OpConstant %uint 3 |
| %uint_16 = OpConstant %uint 16 |
| %uint_15 = OpConstant %uint 15 |
| %uint_2 = OpConstant %uint 2 |
| %f = OpFunction %void None %15 |
| %16 = OpLabel |
| %17 = OpAccessChain %_ptr_StorageBuffer_int %8 %uint_0 %uint_0 |
| %20 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %uint_4 |
| %23 = OpLoad %v4uint %20 None |
| %24 = OpCompositeExtract %uint %23 0 |
| %25 = OpBitcast %int %24 |
| %26 = OpBitcast %uint %25 |
| %27 = OpExtInst %uint %28 UMin %26 %uint_3 |
| %30 = OpIMul %uint %27 %uint_16 |
| %32 = OpUDiv %uint %30 %uint_16 |
| %33 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %32 |
| %34 = OpBitwiseAnd %uint %30 %uint_15 |
| %36 = OpShiftRightLogical %uint %34 %uint_2 |
| %38 = OpLoad %v4uint %33 None |
| %39 = OpVectorExtractDynamic %uint %38 %36 |
| %40 = OpBitcast %int %39 |
| OpStore %17 %40 None |
| OpReturn |
| OpFunctionEnd |