| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 44 |
| ; Schema: 0 |
| OpCapability Shader |
| %35 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" |
| OpExecutionMode %main OriginUpperLeft |
| OpMemberName %v_block_tint_explicit_layout 0 "inner" |
| OpName %v_block_tint_explicit_layout "v_block_tint_explicit_layout" |
| OpMemberName %out_block 0 "inner" |
| OpName %out_block "out_block" |
| OpName %main "main" |
| OpName %offset "offset" |
| OpDecorate %_runtimearr_v4uint ArrayStride 16 |
| 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 NonWritable |
| OpMemberDecorate %out_block 0 Offset 0 |
| OpDecorate %out_block Block |
| OpDecorate %7 DescriptorSet 0 |
| OpDecorate %7 Binding 1 |
| OpDecorate %7 Coherent |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %_runtimearr_v4uint = OpTypeRuntimeArray %v4uint |
| %v_block_tint_explicit_layout = OpTypeStruct %_runtimearr_v4uint |
| %_ptr_StorageBuffer_v_block_tint_explicit_layout = OpTypePointer StorageBuffer %v_block_tint_explicit_layout |
| %1 = OpVariable %_ptr_StorageBuffer_v_block_tint_explicit_layout StorageBuffer |
| %out_block = OpTypeStruct %v4uint |
| %_ptr_StorageBuffer_out_block = OpTypePointer StorageBuffer %out_block |
| %7 = OpVariable %_ptr_StorageBuffer_out_block StorageBuffer |
| %void = OpTypeVoid |
| %12 = OpTypeFunction %void |
| %offset = OpConstant %uint 16 |
| %_ptr_StorageBuffer__runtimearr_v4uint = OpTypePointer StorageBuffer %_runtimearr_v4uint |
| %uint_0 = OpConstant %uint 0 |
| %uint_4294967280 = OpConstant %uint 4294967280 |
| %bool = OpTypeBool |
| %uint_1 = OpConstant %uint 1 |
| %int = OpTypeInt 32 1 |
| %int_0 = OpConstant %int 0 |
| %_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint |
| %_ptr_StorageBuffer_v4uint_0 = OpTypePointer StorageBuffer %v4uint |
| %main = OpFunction %void None %12 |
| %13 = OpLabel |
| %15 = OpAccessChain %_ptr_StorageBuffer__runtimearr_v4uint %1 %uint_0 |
| %18 = OpArrayLength %uint %1 0 |
| %19 = OpIMul %uint %18 %offset |
| %20 = OpBitwiseAnd %uint %offset %uint_4294967280 |
| %22 = OpIAdd %uint %offset %20 |
| %23 = OpULessThan %bool %19 %22 |
| %25 = OpSelect %uint %23 %uint_0 %20 |
| %26 = OpSelect %uint %23 %offset %offset |
| %27 = OpIMul %uint %25 %uint_1 |
| %29 = OpUDiv %uint %26 %offset |
| %30 = OpISub %uint %29 %uint_1 |
| %31 = OpBitcast %uint %int_0 |
| %34 = OpExtInst %uint %35 UMin %31 %30 |
| %36 = OpIMul %uint %34 %offset |
| %37 = OpIAdd %uint %27 %36 |
| %38 = OpUDiv %uint %37 %offset |
| %39 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0 %38 |
| %41 = OpLoad %v4uint %39 None |
| %42 = OpAccessChain %_ptr_StorageBuffer_v4uint_0 %7 %uint_0 |
| OpStore %42 %41 None |
| OpReturn |
| OpFunctionEnd |