blob: c327733bff541ffe0882b371a532a7e6cd04fe8e [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 68
; Schema: 0
OpCapability Shader
%28 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpMemberName %tint_symbol_tint_explicit_layout 0 "inner"
OpName %tint_symbol_tint_explicit_layout "tint_symbol_tint_explicit_layout"
OpMemberName %out_block 0 "inner"
OpName %out_block "out_block"
OpMemberName %idx_block_tint_explicit_layout 0 "inner"
OpName %idx_block_tint_explicit_layout "idx_block_tint_explicit_layout"
OpName %main "main"
OpName %start_byte_offset "start_byte_offset"
OpDecorate %_arr_uint_uint_4 ArrayStride 4
OpMemberDecorate %tint_symbol_tint_explicit_layout 0 Offset 0
OpDecorate %tint_symbol_tint_explicit_layout Block
OpMemberDecorate %out_block 0 Offset 0
OpDecorate %out_block Block
OpDecorate %7 DescriptorSet 0
OpDecorate %7 Binding 0
OpDecorate %7 Coherent
OpDecorate %_arr_v4uint_uint_1 ArrayStride 16
OpMemberDecorate %idx_block_tint_explicit_layout 0 Offset 0
OpDecorate %idx_block_tint_explicit_layout Block
OpDecorate %12 DescriptorSet 0
OpDecorate %12 Binding 1
OpDecorate %12 NonWritable
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_uint_uint_4 = OpTypeArray %uint %uint_4
%tint_symbol_tint_explicit_layout = OpTypeStruct %_arr_uint_uint_4
%_ptr_PushConstant_tint_symbol_tint_explicit_layout = OpTypePointer PushConstant %tint_symbol_tint_explicit_layout
%1 = OpVariable %_ptr_PushConstant_tint_symbol_tint_explicit_layout PushConstant
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%out_block = OpTypeStruct %v2float
%_ptr_StorageBuffer_out_block = OpTypePointer StorageBuffer %out_block
%7 = OpVariable %_ptr_StorageBuffer_out_block StorageBuffer
%v4uint = OpTypeVector %uint 4
%uint_1 = OpConstant %uint 1
%_arr_v4uint_uint_1 = OpTypeArray %v4uint %uint_1
%idx_block_tint_explicit_layout = OpTypeStruct %_arr_v4uint_uint_1
%_ptr_Uniform_idx_block_tint_explicit_layout = OpTypePointer Uniform %idx_block_tint_explicit_layout
%12 = OpVariable %_ptr_Uniform_idx_block_tint_explicit_layout Uniform
%void = OpTypeVoid
%20 = OpTypeFunction %void
%_ptr_Uniform_v4uint = OpTypePointer Uniform %v4uint
%uint_0 = OpConstant %uint 0
%mat2v2float = OpTypeMatrix %v2float 2
%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
%_ptr_Function_v2float = OpTypePointer Function %v2float
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%40 = OpTypeFunction %mat2v2float %uint
%_ptr_PushConstant__arr_uint_uint_4 = OpTypePointer PushConstant %_arr_uint_uint_4
%_ptr_PushConstant_uint = OpTypePointer PushConstant %uint
%v2uint = OpTypeVector %uint 2
%uint_8 = OpConstant %uint 8
%main = OpFunction %void None %20
%21 = OpLabel
%32 = OpVariable %_ptr_Function_mat2v2float Function
%22 = OpAccessChain %_ptr_Uniform_v4uint %12 %uint_0 %uint_0
%25 = OpLoad %v4uint %22 None
%26 = OpCompositeExtract %uint %25 0
%27 = OpExtInst %uint %28 UMin %26 %uint_1
%29 = OpFunctionCall %mat2v2float %31 %uint_0
OpStore %32 %29
%34 = OpAccessChain %_ptr_Function_v2float %32 %27
%36 = OpLoad %v2float %34 None
%37 = OpAccessChain %_ptr_StorageBuffer_v2float %7 %uint_0
OpStore %37 %36 None
OpReturn
OpFunctionEnd
%31 = OpFunction %mat2v2float None %40
%start_byte_offset = OpFunctionParameter %uint
%41 = OpLabel
%42 = OpUDiv %uint %start_byte_offset %uint_4
%43 = OpAccessChain %_ptr_PushConstant__arr_uint_uint_4 %1 %uint_0
%45 = OpAccessChain %_ptr_PushConstant_uint %43 %42
%47 = OpLoad %uint %45 Aligned 8
%48 = OpIAdd %uint %42 %uint_1
%49 = OpAccessChain %_ptr_PushConstant__arr_uint_uint_4 %1 %uint_0
%50 = OpAccessChain %_ptr_PushConstant_uint %49 %48
%51 = OpLoad %uint %50 None
%53 = OpCompositeConstruct %v2uint %47 %51
%54 = OpBitcast %v2float %53
%55 = OpIAdd %uint %uint_8 %start_byte_offset
%57 = OpUDiv %uint %55 %uint_4
%58 = OpAccessChain %_ptr_PushConstant__arr_uint_uint_4 %1 %uint_0
%59 = OpAccessChain %_ptr_PushConstant_uint %58 %57
%60 = OpLoad %uint %59 Aligned 8
%61 = OpIAdd %uint %57 %uint_1
%62 = OpAccessChain %_ptr_PushConstant__arr_uint_uint_4 %1 %uint_0
%63 = OpAccessChain %_ptr_PushConstant_uint %62 %61
%64 = OpLoad %uint %63 None
%65 = OpCompositeConstruct %v2uint %60 %64
%66 = OpBitcast %v2float %65
%67 = OpCompositeConstruct %mat2v2float %54 %66
OpReturnValue %67
OpFunctionEnd