blob: b60b78a63807777b9b5c671ae4fd946fbb807c8f [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 51
; Schema: 0
OpCapability Shader
%26 = 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"
OpMemberName %out_block 0 "inner"
OpName %out_block "out_block"
OpName %main "main"
OpDecorate %_arr_v4uint_uint_8 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 %8 DescriptorSet 0
OpDecorate %8 Binding 1
OpDecorate %8 Coherent
%uint = OpTypeInt 32 0
%v4uint = OpTypeVector %uint 4
%uint_8 = OpConstant %uint 8
%_arr_v4uint_uint_8 = OpTypeArray %v4uint %uint_8
%v_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_8
%_ptr_Uniform_v_block_tint_explicit_layout = OpTypePointer Uniform %v_block_tint_explicit_layout
%1 = OpVariable %_ptr_Uniform_v_block_tint_explicit_layout Uniform
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%out_block = OpTypeStruct %v2float
%_ptr_StorageBuffer_out_block = OpTypePointer StorageBuffer %out_block
%8 = OpVariable %_ptr_StorageBuffer_out_block StorageBuffer
%void = OpTypeVoid
%15 = OpTypeFunction %void
%uint_96 = OpConstant %uint 96
%uint_48 = OpConstant %uint 48
%uint_1 = OpConstant %uint 1
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%uint_32 = OpConstant %uint 32
%uint_16 = OpConstant %uint 16
%_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint
%uint_0 = OpConstant %uint 0
%uint_15 = OpConstant %uint 15
%uint_2 = OpConstant %uint 2
%v2uint = OpTypeVector %uint 2
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%main = OpFunction %void None %15
%16 = OpLabel
%17 = OpUDiv %uint %uint_96 %uint_48
%20 = OpISub %uint %17 %uint_1
%22 = OpBitcast %uint %int_0
%25 = OpExtInst %uint %26 UMin %22 %20
%27 = OpIMul %uint %25 %uint_48
%28 = OpIAdd %uint %uint_32 %27
%30 = OpUDiv %uint %28 %uint_16
%32 = OpAccessChain %_ptr_Uniform_v4uint %1 %uint_0 %30
%35 = OpLoad %v4uint %32 None
%36 = OpBitwiseAnd %uint %28 %uint_15
%38 = OpShiftRightLogical %uint %36 %uint_2
%40 = OpVectorShuffle %v2uint %35 %35 2 3
%42 = OpVectorShuffle %v2uint %35 %35 0 1
%43 = OpIEqual %bool %38 %uint_2
%46 = OpCompositeConstruct %v2bool %43 %43
%47 = OpSelect %v2uint %46 %40 %42
%48 = OpBitcast %v2float %47
%49 = OpAccessChain %_ptr_StorageBuffer_v2float %8 %uint_0
OpStore %49 %48 None
OpReturn
OpFunctionEnd