blob: 383350647fdbc2549f5ffec6c5665fdcef14b94b [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 118
; Schema: 0
OpCapability Shader
%37 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpMemberName %mat3x3_f32_std140 0 "col0"
OpMemberName %mat3x3_f32_std140 1 "col1"
OpMemberName %mat3x3_f32_std140 2 "col2"
OpName %mat3x3_f32_std140 "mat3x3_f32_std140"
OpMemberName %a_block_std140_tint_explicit_layout 0 "inner"
OpName %a_block_std140_tint_explicit_layout "a_block_std140_tint_explicit_layout"
OpMemberName %s_block 0 "inner"
OpName %s_block "s_block"
OpName %counter "counter"
OpName %i "i"
OpName %f "f"
OpName %l_a "l_a"
OpName %l_a_i "l_a_i"
OpName %l_a_i_i "l_a_i_i"
OpName %tint_convert_explicit_layout "tint_convert_explicit_layout"
OpName %tint_source "tint_source"
OpMemberDecorate %mat3x3_f32_std140 0 Offset 0
OpMemberDecorate %mat3x3_f32_std140 1 Offset 16
OpMemberDecorate %mat3x3_f32_std140 2 Offset 32
OpDecorate %_arr_mat3x3_f32_std140_uint_4 ArrayStride 48
OpMemberDecorate %a_block_std140_tint_explicit_layout 0 Offset 0
OpDecorate %a_block_std140_tint_explicit_layout Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 NonWritable
OpMemberDecorate %s_block 0 Offset 0
OpDecorate %s_block Block
OpDecorate %10 DescriptorSet 0
OpDecorate %10 Binding 1
OpDecorate %10 Coherent
%float = OpTypeFloat 32
%v3float = OpTypeVector %float 3
%mat3x3_f32_std140 = OpTypeStruct %v3float %v3float %v3float
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_mat3x3_f32_std140_uint_4 = OpTypeArray %mat3x3_f32_std140 %uint_4
%a_block_std140_tint_explicit_layout = OpTypeStruct %_arr_mat3x3_f32_std140_uint_4
%_ptr_Uniform_a_block_std140_tint_explicit_layout = OpTypePointer Uniform %a_block_std140_tint_explicit_layout
%1 = OpVariable %_ptr_Uniform_a_block_std140_tint_explicit_layout Uniform
%s_block = OpTypeStruct %float
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%10 = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%int_0 = OpConstant %int 0
%counter = OpVariable %_ptr_Private_int Private %int_0
%18 = OpTypeFunction %int
%int_1 = OpConstant %int 1
%void = OpTypeVoid
%29 = OpTypeFunction %void
%_ptr_Uniform__arr_mat3x3_f32_std140_uint_4 = OpTypePointer Uniform %_arr_mat3x3_f32_std140_uint_4
%uint_0 = OpConstant %uint 0
%uint_3 = OpConstant %uint 3
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%mat3v3float = OpTypeMatrix %v3float 3
%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
%_ptr_Function_v3float = OpTypePointer Function %v3float
%_arr_mat3x3_f32_std140_uint_4_0 = OpTypeArray %mat3x3_f32_std140 %uint_4
%_ptr_Function__arr_mat3x3_f32_std140_uint_4_0 = OpTypePointer Function %_arr_mat3x3_f32_std140_uint_4_0
%_arr_mat3v3float_uint_4 = OpTypeArray %mat3v3float %uint_4
%_ptr_Function__arr_mat3v3float_uint_4 = OpTypePointer Function %_arr_mat3v3float_uint_4
%67 = OpConstantNull %_arr_mat3v3float_uint_4
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%bool = OpTypeBool
%_ptr_Function_mat3x3_f32_std140 = OpTypePointer Function %mat3x3_f32_std140
%98 = OpTypeFunction %_arr_mat3x3_f32_std140_uint_4_0 %_arr_mat3x3_f32_std140_uint_4
%_ptr_Function__arr_mat3x3_f32_std140_uint_4 = OpTypePointer Function %_arr_mat3x3_f32_std140_uint_4
%103 = OpConstantNull %_arr_mat3x3_f32_std140_uint_4_0
%i = OpFunction %int None %18
%19 = OpLabel
%20 = OpLoad %int %counter None
%21 = OpBitcast %uint %20
%22 = OpBitcast %uint %int_1
%24 = OpIAdd %uint %21 %22
%25 = OpBitcast %int %24
OpStore %counter %25 None
%26 = OpLoad %int %counter None
OpReturnValue %26
OpFunctionEnd
%f = OpFunction %void None %29
%30 = OpLabel
%50 = OpVariable %_ptr_Function_mat3v3float Function
%62 = OpVariable %_ptr_Function__arr_mat3x3_f32_std140_uint_4_0 Function
%64 = OpVariable %_ptr_Function__arr_mat3v3float_uint_4 Function %67
%31 = OpAccessChain %_ptr_Uniform__arr_mat3x3_f32_std140_uint_4 %1 %uint_0
%34 = OpFunctionCall %int %i
%35 = OpBitcast %uint %34
%36 = OpExtInst %uint %37 UMin %35 %uint_3
%39 = OpAccessChain %_ptr_Uniform_v3float %31 %36 %uint_0
%41 = OpLoad %v3float %39 None
%42 = OpAccessChain %_ptr_Uniform_v3float %31 %36 %uint_1
%44 = OpLoad %v3float %42 None
%45 = OpAccessChain %_ptr_Uniform_v3float %31 %36 %uint_2
%47 = OpLoad %v3float %45 None
%l_a_i = OpCompositeConstruct %mat3v3float %41 %44 %47
OpStore %50 %l_a_i
%52 = OpFunctionCall %int %i
%53 = OpBitcast %uint %52
%54 = OpExtInst %uint %37 UMin %53 %uint_2
%55 = OpAccessChain %_ptr_Function_v3float %50 %54
%l_a_i_i = OpLoad %v3float %55 None
%58 = OpLoad %_arr_mat3x3_f32_std140_uint_4 %31 None
%59 = OpFunctionCall %_arr_mat3x3_f32_std140_uint_4_0 %tint_convert_explicit_layout %58
OpStore %62 %59
OpBranch %68
%68 = OpLabel
OpBranch %71
%71 = OpLabel
%73 = OpPhi %uint %uint_0 %68 %74 %70
OpLoopMerge %72 %70 None
OpBranch %69
%69 = OpLabel
%85 = OpUGreaterThanEqual %bool %73 %uint_4
OpSelectionMerge %87 None
OpBranchConditional %85 %88 %87
%88 = OpLabel
OpBranch %72
%87 = OpLabel
%89 = OpAccessChain %_ptr_Function_mat3v3float %64 %73
%90 = OpAccessChain %_ptr_Function_mat3x3_f32_std140 %62 %73
%92 = OpLoad %mat3x3_f32_std140 %90 None
%93 = OpCompositeExtract %v3float %92 0
%94 = OpCompositeExtract %v3float %92 1
%95 = OpCompositeExtract %v3float %92 2
%96 = OpCompositeConstruct %mat3v3float %93 %94 %95
OpStore %89 %96 None
OpBranch %70
%70 = OpLabel
%74 = OpIAdd %uint %73 %uint_1
OpBranch %71
%72 = OpLabel
%l_a = OpLoad %_arr_mat3v3float_uint_4 %64 None
%76 = OpCompositeExtract %float %l_a_i_i 0
%77 = OpCompositeExtract %float %l_a 0 0 0
%78 = OpFAdd %float %76 %77
%79 = OpCompositeExtract %float %l_a_i 0 0
%80 = OpFAdd %float %78 %79
%81 = OpCompositeExtract %float %l_a_i_i 0
%82 = OpFAdd %float %80 %81
%83 = OpAccessChain %_ptr_StorageBuffer_float %10 %uint_0
OpStore %83 %82 None
OpReturn
OpFunctionEnd
%tint_convert_explicit_layout = OpFunction %_arr_mat3x3_f32_std140_uint_4_0 None %98
%tint_source = OpFunctionParameter %_arr_mat3x3_f32_std140_uint_4
%99 = OpLabel
%100 = OpVariable %_ptr_Function__arr_mat3x3_f32_std140_uint_4 Function
%102 = OpVariable %_ptr_Function__arr_mat3x3_f32_std140_uint_4_0 Function %103
OpStore %100 %tint_source
OpBranch %104
%104 = OpLabel
OpBranch %107
%107 = OpLabel
%109 = OpPhi %uint %uint_0 %104 %110 %106
OpLoopMerge %108 %106 None
OpBranch %105
%105 = OpLabel
%112 = OpUGreaterThanEqual %bool %109 %uint_4
OpSelectionMerge %113 None
OpBranchConditional %112 %114 %113
%114 = OpLabel
OpBranch %108
%113 = OpLabel
%115 = OpAccessChain %_ptr_Function_mat3x3_f32_std140 %100 %109
%116 = OpLoad %mat3x3_f32_std140 %115 None
%117 = OpAccessChain %_ptr_Function_mat3x3_f32_std140 %102 %109
OpStore %117 %116 None
OpBranch %106
%106 = OpLabel
%110 = OpIAdd %uint %109 %uint_1
OpBranch %107
%108 = OpLabel
%111 = OpLoad %_arr_mat3x3_f32_std140_uint_4_0 %102 None
OpReturnValue %111
OpFunctionEnd