blob: 341529207dcc43fc586aef7f0bcb61cf1e0b5bda [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 55
; Schema: 0
OpCapability Shader
%33 = 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 %s_block "s_block"
OpMemberName %s_block 0 "inner"
OpName %s "s"
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
OpDecorate %s_block Block
OpMemberDecorate %s_block 0 Offset 0
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 1
%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
%s_block = OpTypeStruct %float
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%mat2v2float = OpTypeMatrix %v2float 2
%13 = OpTypeFunction %mat2v2float %mat2x2_f32
%void = OpTypeVoid
%21 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_mat2x2_f32 = OpTypePointer Uniform %mat2x2_f32
%34 = OpConstantNull %uint
%uint_1 = OpConstant %uint 1
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%int = OpTypeInt 32 1
%48 = OpConstantNull %int
%conv_mat2x2_f32 = OpFunction %mat2v2float None %13
%val = OpFunctionParameter %mat2x2_f32
%17 = OpLabel
%18 = OpCompositeExtract %v2float %val 0
%19 = OpCompositeExtract %v2float %val 1
%20 = OpCompositeConstruct %mat2v2float %18 %19
OpReturnValue %20
OpFunctionEnd
%f = OpFunction %void None %21
%24 = OpLabel
%30 = OpAccessChain %_ptr_Uniform_mat2x2_f32 %u %uint_0 %uint_2
%31 = OpLoad %mat2x2_f32 %30
%26 = OpFunctionCall %mat2v2float %conv_mat2x2_f32 %31
%25 = OpTranspose %mat2v2float %26
%37 = OpAccessChain %_ptr_Uniform_v2float %u %uint_0 %34 %uint_1
%38 = OpLoad %v2float %37
%39 = OpVectorShuffle %v2float %38 %38 1 0
%32 = OpExtInst %float %33 Length %39
%41 = OpAccessChain %_ptr_Uniform_v2float %u %uint_0 %34 %uint_1
%42 = OpLoad %v2float %41
%43 = OpVectorShuffle %v2float %42 %42 1 0
%44 = OpCompositeExtract %float %43 0
%40 = OpExtInst %float %33 FAbs %44
%46 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0
%49 = OpCompositeExtract %v2float %25 0
%50 = OpCompositeExtract %float %49 0
%52 = OpFAdd %float %50 %32
%54 = OpFAdd %float %52 %40
OpStore %46 %54
OpReturn
OpFunctionEnd