blob: 726683fa26c83e695035073997714b2600950089 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 218
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %a_block "a_block"
OpMemberName %a_block 0 "inner"
OpName %Outer_std140 "Outer_std140"
OpMemberName %Outer_std140 0 "a"
OpName %Inner_std140 "Inner_std140"
OpMemberName %Inner_std140 0 "m_0"
OpMemberName %Inner_std140 1 "m_1"
OpMemberName %Inner_std140 2 "m_2"
OpName %a "a"
OpName %counter "counter"
OpName %i "i"
OpName %Inner "Inner"
OpMemberName %Inner 0 "m"
OpName %conv_Inner "conv_Inner"
OpName %val "val"
OpName %conv_arr_4_Inner "conv_arr_4_Inner"
OpName %val_0 "val"
OpName %arr "arr"
OpName %i_0 "i"
OpName %var_for_index "var_for_index"
OpName %Outer "Outer"
OpMemberName %Outer 0 "a"
OpName %conv_Outer "conv_Outer"
OpName %val_1 "val"
OpName %conv_arr_4_Outer "conv_arr_4_Outer"
OpName %val_2 "val"
OpName %arr_0 "arr"
OpName %i_1 "i"
OpName %var_for_index_1 "var_for_index_1"
OpName %load_a_p0_a_p1_m "load_a_p0_a_p1_m"
OpName %p0 "p0"
OpName %p1 "p1"
OpName %load_a_p0_a_p1_m_p2 "load_a_p0_a_p1_m_p2"
OpName %p0_0 "p0"
OpName %p1_0 "p1"
OpName %p2 "p2"
OpName %load_a_p0_a_p1_m_p2_p3 "load_a_p0_a_p1_m_p2_p3"
OpName %p0_1 "p0"
OpName %p1_1 "p1"
OpName %p2_0 "p2"
OpName %p3 "p3"
OpName %f "f"
OpDecorate %a_block Block
OpMemberDecorate %a_block 0 Offset 0
OpMemberDecorate %Outer_std140 0 Offset 0
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
OpDecorate %_arr_Outer_std140_uint_4 ArrayStride 256
OpDecorate %a NonWritable
OpDecorate %a DescriptorSet 0
OpDecorate %a Binding 0
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 0 ColMajor
OpMemberDecorate %Inner 0 MatrixStride 8
OpDecorate %_arr_Inner_uint_4 ArrayStride 64
OpMemberDecorate %Outer 0 Offset 0
OpDecorate %_arr_Outer_uint_4 ArrayStride 256
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%Inner_std140 = OpTypeStruct %v2float %v2float %v2float
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_Inner_std140_uint_4 = OpTypeArray %Inner_std140 %uint_4
%Outer_std140 = OpTypeStruct %_arr_Inner_std140_uint_4
%_arr_Outer_std140_uint_4 = OpTypeArray %Outer_std140 %uint_4
%a_block = OpTypeStruct %_arr_Outer_std140_uint_4
%_ptr_Uniform_a_block = OpTypePointer Uniform %a_block
%a = OpVariable %_ptr_Uniform_a_block Uniform
%int = OpTypeInt 32 1
%13 = OpConstantNull %int
%_ptr_Private_int = OpTypePointer Private %int
%counter = OpVariable %_ptr_Private_int Private %13
%16 = OpTypeFunction %int
%int_1 = OpConstant %int 1
%mat3v2float = OpTypeMatrix %v2float 3
%Inner = OpTypeStruct %mat3v2float
%23 = OpTypeFunction %Inner %Inner_std140
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%34 = OpTypeFunction %_arr_Inner_uint_4 %_arr_Inner_std140_uint_4
%_ptr_Function__arr_Inner_uint_4 = OpTypePointer Function %_arr_Inner_uint_4
%41 = OpConstantNull %_arr_Inner_uint_4
%_ptr_Function_uint = OpTypePointer Function %uint
%44 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Function__arr_Inner_std140_uint_4 = OpTypePointer Function %_arr_Inner_std140_uint_4
%57 = OpConstantNull %_arr_Inner_std140_uint_4
%_ptr_Function_Inner = OpTypePointer Function %Inner
%_ptr_Function_Inner_std140 = OpTypePointer Function %Inner_std140
%uint_1 = OpConstant %uint 1
%Outer = OpTypeStruct %_arr_Inner_uint_4
%70 = OpTypeFunction %Outer %Outer_std140
%_arr_Outer_uint_4 = OpTypeArray %Outer %uint_4
%78 = OpTypeFunction %_arr_Outer_uint_4 %_arr_Outer_std140_uint_4
%_ptr_Function__arr_Outer_uint_4 = OpTypePointer Function %_arr_Outer_uint_4
%85 = OpConstantNull %_arr_Outer_uint_4
%_ptr_Function__arr_Outer_std140_uint_4 = OpTypePointer Function %_arr_Outer_std140_uint_4
%98 = OpConstantNull %_arr_Outer_std140_uint_4
%_ptr_Function_Outer = OpTypePointer Function %Outer
%_ptr_Function_Outer_std140 = OpTypePointer Function %Outer_std140
%110 = OpTypeFunction %mat3v2float %uint %uint
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%uint_2 = OpConstant %uint 2
%125 = OpTypeFunction %v2float %uint %uint %uint
%142 = OpConstantNull %v2float
%143 = OpTypeFunction %float %uint %uint %uint %uint
%_ptr_Uniform_float = OpTypePointer Uniform %float
%162 = OpConstantNull %float
%void = OpTypeVoid
%163 = OpTypeFunction %void
%_ptr_Uniform__arr_Outer_std140_uint_4 = OpTypePointer Uniform %_arr_Outer_std140_uint_4
%_ptr_Uniform_Outer_std140 = OpTypePointer Uniform %Outer_std140
%_ptr_Uniform__arr_Inner_std140_uint_4 = OpTypePointer Uniform %_arr_Inner_std140_uint_4
%_ptr_Uniform_Inner_std140 = OpTypePointer Uniform %Inner_std140
%i = OpFunction %int None %16
%18 = OpLabel
%19 = OpLoad %int %counter
%21 = OpIAdd %int %19 %int_1
OpStore %counter %21
%22 = OpLoad %int %counter
OpReturnValue %22
OpFunctionEnd
%conv_Inner = OpFunction %Inner None %23
%val = OpFunctionParameter %Inner_std140
%28 = OpLabel
%29 = OpCompositeExtract %v2float %val 0
%30 = OpCompositeExtract %v2float %val 1
%31 = OpCompositeExtract %v2float %val 2
%32 = OpCompositeConstruct %mat3v2float %29 %30 %31
%33 = OpCompositeConstruct %Inner %32
OpReturnValue %33
OpFunctionEnd
%conv_arr_4_Inner = OpFunction %_arr_Inner_uint_4 None %34
%val_0 = OpFunctionParameter %_arr_Inner_std140_uint_4
%38 = OpLabel
%arr = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %41
%i_0 = OpVariable %_ptr_Function_uint Function %44
%var_for_index = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function %57
OpBranch %45
%45 = OpLabel
OpLoopMerge %46 %47 None
OpBranch %48
%48 = OpLabel
%50 = OpLoad %uint %i_0
%51 = OpULessThan %bool %50 %uint_4
%49 = OpLogicalNot %bool %51
OpSelectionMerge %53 None
OpBranchConditional %49 %54 %53
%54 = OpLabel
OpBranch %46
%53 = OpLabel
OpStore %var_for_index %val_0
%58 = OpLoad %uint %i_0
%60 = OpAccessChain %_ptr_Function_Inner %arr %58
%62 = OpLoad %uint %i_0
%64 = OpAccessChain %_ptr_Function_Inner_std140 %var_for_index %62
%65 = OpLoad %Inner_std140 %64
%61 = OpFunctionCall %Inner %conv_Inner %65
OpStore %60 %61
OpBranch %47
%47 = OpLabel
%66 = OpLoad %uint %i_0
%68 = OpIAdd %uint %66 %uint_1
OpStore %i_0 %68
OpBranch %45
%46 = OpLabel
%69 = OpLoad %_arr_Inner_uint_4 %arr
OpReturnValue %69
OpFunctionEnd
%conv_Outer = OpFunction %Outer None %70
%val_1 = OpFunctionParameter %Outer_std140
%74 = OpLabel
%76 = OpCompositeExtract %_arr_Inner_std140_uint_4 %val_1 0
%75 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %76
%77 = OpCompositeConstruct %Outer %75
OpReturnValue %77
OpFunctionEnd
%conv_arr_4_Outer = OpFunction %_arr_Outer_uint_4 None %78
%val_2 = OpFunctionParameter %_arr_Outer_std140_uint_4
%82 = OpLabel
%arr_0 = OpVariable %_ptr_Function__arr_Outer_uint_4 Function %85
%i_1 = OpVariable %_ptr_Function_uint Function %44
%var_for_index_1 = OpVariable %_ptr_Function__arr_Outer_std140_uint_4 Function %98
OpBranch %87
%87 = OpLabel
OpLoopMerge %88 %89 None
OpBranch %90
%90 = OpLabel
%92 = OpLoad %uint %i_1
%93 = OpULessThan %bool %92 %uint_4
%91 = OpLogicalNot %bool %93
OpSelectionMerge %94 None
OpBranchConditional %91 %95 %94
%95 = OpLabel
OpBranch %88
%94 = OpLabel
OpStore %var_for_index_1 %val_2
%99 = OpLoad %uint %i_1
%101 = OpAccessChain %_ptr_Function_Outer %arr_0 %99
%103 = OpLoad %uint %i_1
%105 = OpAccessChain %_ptr_Function_Outer_std140 %var_for_index_1 %103
%106 = OpLoad %Outer_std140 %105
%102 = OpFunctionCall %Outer %conv_Outer %106
OpStore %101 %102
OpBranch %89
%89 = OpLabel
%107 = OpLoad %uint %i_1
%108 = OpIAdd %uint %107 %uint_1
OpStore %i_1 %108
OpBranch %87
%88 = OpLabel
%109 = OpLoad %_arr_Outer_uint_4 %arr_0
OpReturnValue %109
OpFunctionEnd
%load_a_p0_a_p1_m = OpFunction %mat3v2float None %110
%p0 = OpFunctionParameter %uint
%p1 = OpFunctionParameter %uint
%114 = OpLabel
%117 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_0 %p1 %uint_0
%118 = OpLoad %v2float %117
%119 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_0 %p1 %uint_1
%120 = OpLoad %v2float %119
%122 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_0 %p1 %uint_2
%123 = OpLoad %v2float %122
%124 = OpCompositeConstruct %mat3v2float %118 %120 %123
OpReturnValue %124
OpFunctionEnd
%load_a_p0_a_p1_m_p2 = OpFunction %v2float None %125
%p0_0 = OpFunctionParameter %uint
%p1_0 = OpFunctionParameter %uint
%p2 = OpFunctionParameter %uint
%130 = OpLabel
OpSelectionMerge %131 None
OpSwitch %p2 %132 0 %133 1 %134 2 %135
%133 = OpLabel
%136 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_0
%137 = OpLoad %v2float %136
OpReturnValue %137
%134 = OpLabel
%138 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_1
%139 = OpLoad %v2float %138
OpReturnValue %139
%135 = OpLabel
%140 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_2
%141 = OpLoad %v2float %140
OpReturnValue %141
%132 = OpLabel
OpReturnValue %142
%131 = OpLabel
OpReturnValue %142
OpFunctionEnd
%load_a_p0_a_p1_m_p2_p3 = OpFunction %float None %143
%p0_1 = OpFunctionParameter %uint
%p1_1 = OpFunctionParameter %uint
%p2_0 = OpFunctionParameter %uint
%p3 = OpFunctionParameter %uint
%149 = OpLabel
OpSelectionMerge %150 None
OpSwitch %p2_0 %151 0 %152 1 %153 2 %154
%152 = OpLabel
%156 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_0 %p3
%157 = OpLoad %float %156
OpReturnValue %157
%153 = OpLabel
%158 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_1 %p3
%159 = OpLoad %float %158
OpReturnValue %159
%154 = OpLabel
%160 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_2 %p3
%161 = OpLoad %float %160
OpReturnValue %161
%151 = OpLabel
OpReturnValue %162
%150 = OpLabel
OpReturnValue %162
OpFunctionEnd
%f = OpFunction %void None %163
%166 = OpLabel
%169 = OpAccessChain %_ptr_Uniform__arr_Outer_std140_uint_4 %a %uint_0
%170 = OpLoad %_arr_Outer_std140_uint_4 %169
%167 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr_4_Outer %170
%171 = OpFunctionCall %int %i
%174 = OpAccessChain %_ptr_Uniform_Outer_std140 %a %uint_0 %171
%175 = OpLoad %Outer_std140 %174
%172 = OpFunctionCall %Outer %conv_Outer %175
%178 = OpAccessChain %_ptr_Uniform__arr_Inner_std140_uint_4 %a %uint_0 %171 %uint_0
%179 = OpLoad %_arr_Inner_std140_uint_4 %178
%176 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %179
%180 = OpFunctionCall %int %i
%183 = OpAccessChain %_ptr_Uniform_Inner_std140 %a %uint_0 %171 %uint_0 %180
%184 = OpLoad %Inner_std140 %183
%181 = OpFunctionCall %Inner %conv_Inner %184
%186 = OpBitcast %uint %171
%187 = OpBitcast %uint %180
%185 = OpFunctionCall %mat3v2float %load_a_p0_a_p1_m %186 %187
%188 = OpFunctionCall %int %i
%190 = OpBitcast %uint %171
%191 = OpBitcast %uint %180
%192 = OpBitcast %uint %188
%189 = OpFunctionCall %v2float %load_a_p0_a_p1_m_p2 %190 %191 %192
%194 = OpAccessChain %_ptr_Uniform__arr_Outer_std140_uint_4 %a %uint_0
%195 = OpLoad %_arr_Outer_std140_uint_4 %194
%193 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr_4_Outer %195
%197 = OpAccessChain %_ptr_Uniform_Outer_std140 %a %uint_0 %171
%198 = OpLoad %Outer_std140 %197
%196 = OpFunctionCall %Outer %conv_Outer %198
%200 = OpAccessChain %_ptr_Uniform__arr_Inner_std140_uint_4 %a %uint_0 %171 %uint_0
%201 = OpLoad %_arr_Inner_std140_uint_4 %200
%199 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %201
%203 = OpAccessChain %_ptr_Uniform_Inner_std140 %a %uint_0 %171 %uint_0 %180
%204 = OpLoad %Inner_std140 %203
%202 = OpFunctionCall %Inner %conv_Inner %204
%206 = OpBitcast %uint %171
%207 = OpBitcast %uint %180
%205 = OpFunctionCall %mat3v2float %load_a_p0_a_p1_m %206 %207
%209 = OpBitcast %uint %171
%210 = OpBitcast %uint %180
%211 = OpBitcast %uint %188
%208 = OpFunctionCall %v2float %load_a_p0_a_p1_m_p2 %209 %210 %211
%212 = OpFunctionCall %int %i
%214 = OpBitcast %uint %171
%215 = OpBitcast %uint %180
%216 = OpBitcast %uint %188
%217 = OpBitcast %uint %212
%213 = OpFunctionCall %float %load_a_p0_a_p1_m_p2_p3 %214 %215 %216 %217
OpReturn
OpFunctionEnd