| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 43 |
| ; Schema: 0 |
| OpCapability Shader |
| %30 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpMemberName %v_block_tint_explicit_layout 0 "inner" |
| OpName %v_block_tint_explicit_layout "v_block_tint_explicit_layout" |
| OpName %foo "foo" |
| OpName %main "main" |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpMemberDecorate %v_block_tint_explicit_layout 0 Offset 0 |
| OpDecorate %v_block_tint_explicit_layout Block |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 Coherent |
| %uint = OpTypeInt 32 0 |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %v_block_tint_explicit_layout = OpTypeStruct %_runtimearr_uint |
| %_ptr_StorageBuffer_v_block_tint_explicit_layout = OpTypePointer StorageBuffer %v_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_StorageBuffer_v_block_tint_explicit_layout StorageBuffer |
| %void = OpTypeVoid |
| %8 = OpTypeFunction %void |
| %_ptr_StorageBuffer__runtimearr_uint = OpTypePointer StorageBuffer %_runtimearr_uint |
| %uint_0 = OpConstant %uint 0 |
| %uint_4 = OpConstant %uint 4 |
| %uint_32 = OpConstant %uint 32 |
| %bool = OpTypeBool |
| %uint_8 = OpConstant %uint 8 |
| %uint_1 = OpConstant %uint 1 |
| %int = OpTypeInt 32 1 |
| %int_0 = OpConstant %int 0 |
| %float = OpTypeFloat 32 |
| %float_3 = OpConstant %float 3 |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %foo = OpFunction %void None %8 |
| %9 = OpLabel |
| %10 = OpAccessChain %_ptr_StorageBuffer__runtimearr_uint %1 %uint_0 |
| %13 = OpArrayLength %uint %1 0 |
| %14 = OpIMul %uint %13 %uint_4 |
| %16 = OpULessThan %bool %14 %uint_32 |
| %19 = OpSelect %uint %16 %uint_0 %uint_0 |
| %20 = OpSelect %uint %16 %uint_8 %uint_32 |
| %22 = OpIMul %uint %19 %uint_1 |
| %24 = OpUDiv %uint %20 %uint_8 |
| %25 = OpISub %uint %24 %uint_1 |
| %26 = OpBitcast %uint %int_0 |
| %29 = OpExtInst %uint %30 UMin %26 %25 |
| %31 = OpIMul %uint %29 %uint_8 |
| %32 = OpIAdd %uint %uint_4 %22 |
| %33 = OpIAdd %uint %32 %31 |
| %34 = OpUDiv %uint %33 %uint_4 |
| %35 = OpBitcast %uint %float_3 |
| %38 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 %34 |
| OpStore %38 %35 None |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %8 |
| %41 = OpLabel |
| %42 = OpFunctionCall %void %foo |
| OpReturn |
| OpFunctionEnd |