blob: 85140c11b3664bc264a3cbfa4ebe4e31bfb5c80f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 92
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %a_block_std140 "a_block_std140"
OpMemberName %a_block_std140 0 "inner"
OpName %mat4x2_f32 "mat4x2_f32"
OpMemberName %mat4x2_f32 0 "col0"
OpMemberName %mat4x2_f32 1 "col1"
OpMemberName %mat4x2_f32 2 "col2"
OpMemberName %mat4x2_f32 3 "col3"
OpName %a "a"
OpName %s_block "s_block"
OpMemberName %s_block 0 "inner"
OpName %s "s"
OpName %conv_mat4x2_f32 "conv_mat4x2_f32"
OpName %val "val"
OpName %conv_arr4_mat4x2_f32 "conv_arr4_mat4x2_f32"
OpName %val_0 "val"
OpName %arr "arr"
OpName %i "i"
OpName %var_for_index "var_for_index"
OpName %f "f"
OpDecorate %a_block_std140 Block
OpMemberDecorate %a_block_std140 0 Offset 0
OpMemberDecorate %mat4x2_f32 0 Offset 0
OpMemberDecorate %mat4x2_f32 1 Offset 8
OpMemberDecorate %mat4x2_f32 2 Offset 16
OpMemberDecorate %mat4x2_f32 3 Offset 24
OpDecorate %_arr_mat4x2_f32_uint_4 ArrayStride 32
OpDecorate %a NonWritable
OpDecorate %a DescriptorSet 0
OpDecorate %a Binding 0
OpDecorate %s_block Block
OpMemberDecorate %s_block 0 Offset 0
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 1
OpDecorate %_arr_mat4v2float_uint_4 ArrayStride 32
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%mat4x2_f32 = OpTypeStruct %v2float %v2float %v2float %v2float
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_mat4x2_f32_uint_4 = OpTypeArray %mat4x2_f32 %uint_4
%a_block_std140 = OpTypeStruct %_arr_mat4x2_f32_uint_4
%_ptr_Uniform_a_block_std140 = OpTypePointer Uniform %a_block_std140
%a = OpVariable %_ptr_Uniform_a_block_std140 Uniform
%s_block = OpTypeStruct %float
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%mat4v2float = OpTypeMatrix %v2float 4
%13 = OpTypeFunction %mat4v2float %mat4x2_f32
%_arr_mat4v2float_uint_4 = OpTypeArray %mat4v2float %uint_4
%23 = OpTypeFunction %_arr_mat4v2float_uint_4 %_arr_mat4x2_f32_uint_4
%_ptr_Function__arr_mat4v2float_uint_4 = OpTypePointer Function %_arr_mat4v2float_uint_4
%30 = OpConstantNull %_arr_mat4v2float_uint_4
%_ptr_Function_uint = OpTypePointer Function %uint
%33 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Function__arr_mat4x2_f32_uint_4 = OpTypePointer Function %_arr_mat4x2_f32_uint_4
%46 = OpConstantNull %_arr_mat4x2_f32_uint_4
%_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float
%_ptr_Function_mat4x2_f32 = OpTypePointer Function %mat4x2_f32
%uint_1 = OpConstant %uint 1
%void = OpTypeVoid
%59 = OpTypeFunction %void
%uint_0 = OpConstant %uint 0
%_ptr_Uniform__arr_mat4x2_f32_uint_4 = OpTypePointer Uniform %_arr_mat4x2_f32_uint_4
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_mat4x2_f32 = OpTypePointer Uniform %mat4x2_f32
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int = OpTypeInt 32 1
%82 = OpConstantNull %int
%conv_mat4x2_f32 = OpFunction %mat4v2float None %13
%val = OpFunctionParameter %mat4x2_f32
%17 = OpLabel
%18 = OpCompositeExtract %v2float %val 0
%19 = OpCompositeExtract %v2float %val 1
%20 = OpCompositeExtract %v2float %val 2
%21 = OpCompositeExtract %v2float %val 3
%22 = OpCompositeConstruct %mat4v2float %18 %19 %20 %21
OpReturnValue %22
OpFunctionEnd
%conv_arr4_mat4x2_f32 = OpFunction %_arr_mat4v2float_uint_4 None %23
%val_0 = OpFunctionParameter %_arr_mat4x2_f32_uint_4
%27 = OpLabel
%arr = OpVariable %_ptr_Function__arr_mat4v2float_uint_4 Function %30
%i = OpVariable %_ptr_Function_uint Function %33
%var_for_index = OpVariable %_ptr_Function__arr_mat4x2_f32_uint_4 Function %46
OpBranch %34
%34 = OpLabel
OpLoopMerge %35 %36 None
OpBranch %37
%37 = OpLabel
%39 = OpLoad %uint %i
%40 = OpULessThan %bool %39 %uint_4
%38 = OpLogicalNot %bool %40
OpSelectionMerge %42 None
OpBranchConditional %38 %43 %42
%43 = OpLabel
OpBranch %35
%42 = OpLabel
OpStore %var_for_index %val_0
%47 = OpLoad %uint %i
%49 = OpAccessChain %_ptr_Function_mat4v2float %arr %47
%51 = OpLoad %uint %i
%53 = OpAccessChain %_ptr_Function_mat4x2_f32 %var_for_index %51
%54 = OpLoad %mat4x2_f32 %53
%50 = OpFunctionCall %mat4v2float %conv_mat4x2_f32 %54
OpStore %49 %50
OpBranch %36
%36 = OpLabel
%55 = OpLoad %uint %i
%57 = OpIAdd %uint %55 %uint_1
OpStore %i %57
OpBranch %34
%35 = OpLabel
%58 = OpLoad %_arr_mat4v2float_uint_4 %arr
OpReturnValue %58
OpFunctionEnd
%f = OpFunction %void None %59
%62 = OpLabel
%66 = OpAccessChain %_ptr_Uniform__arr_mat4x2_f32_uint_4 %a %uint_0
%67 = OpLoad %_arr_mat4x2_f32_uint_4 %66
%63 = OpFunctionCall %_arr_mat4v2float_uint_4 %conv_arr4_mat4x2_f32 %67
%71 = OpAccessChain %_ptr_Uniform_mat4x2_f32 %a %uint_0 %uint_2
%72 = OpLoad %mat4x2_f32 %71
%68 = OpFunctionCall %mat4v2float %conv_mat4x2_f32 %72
%74 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %uint_2 %uint_1
%75 = OpLoad %v2float %74
%77 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0
%79 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %uint_2 %uint_1 %33
%80 = OpLoad %float %79
%83 = OpCompositeExtract %mat4v2float %63 0
%84 = OpCompositeExtract %v2float %83 0
%85 = OpCompositeExtract %float %84 0
%86 = OpFAdd %float %80 %85
%87 = OpCompositeExtract %v2float %68 0
%88 = OpCompositeExtract %float %87 0
%89 = OpFAdd %float %86 %88
%90 = OpCompositeExtract %float %75 0
%91 = OpFAdd %float %89 %90
OpStore %77 %91
OpReturn
OpFunctionEnd