blob: 9c73f46e4d194133d87fae59236e82582fccf3db [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 39
; Schema: 0
OpCapability Shader
%32 = 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 %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_64 = OpConstant %uint 64
%bool = OpTypeBool
%uint_20 = OpConstant %uint 20
%uint_1 = OpConstant %uint 1
%uint_16 = OpConstant %uint 16
%int = OpTypeInt 32 1
%int_4 = OpConstant %int 4
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%main = 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_64
%19 = OpSelect %uint %16 %uint_0 %uint_0
%20 = OpSelect %uint %16 %uint_20 %uint_64
%22 = OpIMul %uint %19 %uint_1
%24 = OpISub %uint %20 %uint_16
%26 = OpUDiv %uint %24 %uint_4
%27 = OpISub %uint %26 %uint_1
%28 = OpBitcast %uint %int_4
%31 = OpExtInst %uint %32 UMin %28 %27
%33 = OpIMul %uint %31 %uint_4
%34 = OpIAdd %uint %uint_16 %22
%35 = OpIAdd %uint %34 %33
%36 = OpUDiv %uint %35 %uint_4
%37 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 %36
OpStore %37 %uint_4 None
OpReturn
OpFunctionEnd