blob: 3890b7a6391d2ecd0324ce514909472e4fd7539a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 42
; Schema: 0
OpCapability Shader
%30 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %u_block_std140 "u_block_std140"
OpMemberName %u_block_std140 0 "inner"
OpName %mat2x2_f32 "mat2x2_f32"
OpMemberName %mat2x2_f32 0 "col0"
OpMemberName %mat2x2_f32 1 "col1"
OpName %u "u"
OpName %conv_mat2x2_f32 "conv_mat2x2_f32"
OpName %val "val"
OpName %f "f"
OpDecorate %u_block_std140 Block
OpMemberDecorate %u_block_std140 0 Offset 0
OpMemberDecorate %mat2x2_f32 0 Offset 0
OpMemberDecorate %mat2x2_f32 1 Offset 8
OpDecorate %_arr_mat2x2_f32_uint_4 ArrayStride 16
OpDecorate %u NonWritable
OpDecorate %u DescriptorSet 0
OpDecorate %u Binding 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%mat2x2_f32 = OpTypeStruct %v2float %v2float
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_mat2x2_f32_uint_4 = OpTypeArray %mat2x2_f32 %uint_4
%u_block_std140 = OpTypeStruct %_arr_mat2x2_f32_uint_4
%_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140
%u = OpVariable %_ptr_Uniform_u_block_std140 Uniform
%mat2v2float = OpTypeMatrix %v2float 2
%10 = OpTypeFunction %mat2v2float %mat2x2_f32
%void = OpTypeVoid
%18 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_mat2x2_f32 = OpTypePointer Uniform %mat2x2_f32
%31 = OpConstantNull %uint
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%conv_mat2x2_f32 = OpFunction %mat2v2float None %10
%val = OpFunctionParameter %mat2x2_f32
%14 = OpLabel
%15 = OpCompositeExtract %v2float %val 0
%16 = OpCompositeExtract %v2float %val 1
%17 = OpCompositeConstruct %mat2v2float %15 %16
OpReturnValue %17
OpFunctionEnd
%f = OpFunction %void None %18
%21 = OpLabel
%27 = OpAccessChain %_ptr_Uniform_mat2x2_f32 %u %uint_0 %uint_2
%28 = OpLoad %mat2x2_f32 %27
%23 = OpFunctionCall %mat2v2float %conv_mat2x2_f32 %28
%22 = OpTranspose %mat2v2float %23
%34 = OpAccessChain %_ptr_Uniform_v2float %u %uint_0 %31 %uint_1
%35 = OpLoad %v2float %34
%36 = OpVectorShuffle %v2float %35 %35 1 0
%29 = OpExtInst %float %30 Length %36
%38 = OpAccessChain %_ptr_Uniform_v2float %u %uint_0 %31 %uint_1
%39 = OpLoad %v2float %38
%40 = OpVectorShuffle %v2float %39 %39 1 0
%41 = OpCompositeExtract %float %40 0
%37 = OpExtInst %float %30 FAbs %41
OpReturn
OpFunctionEnd