blob: 5de20f52f6599dc542498f1cdbb9d85c7f53b541 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 228
; 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"
OpMemberName %Inner_std140 3 "m_3"
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
OpMemberDecorate %Inner_std140 3 Offset 24
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 32
OpDecorate %_arr_Outer_std140_uint_4 ArrayStride 128
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 32
OpMemberDecorate %Outer 0 Offset 0
OpDecorate %_arr_Outer_uint_4 ArrayStride 128
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%Inner_std140 = OpTypeStruct %v2float %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
%mat4v2float = OpTypeMatrix %v2float 4
%Inner = OpTypeStruct %mat4v2float
%23 = OpTypeFunction %Inner %Inner_std140
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%35 = OpTypeFunction %_arr_Inner_uint_4 %_arr_Inner_std140_uint_4
%_ptr_Function__arr_Inner_uint_4 = OpTypePointer Function %_arr_Inner_uint_4
%42 = OpConstantNull %_arr_Inner_uint_4
%_ptr_Function_uint = OpTypePointer Function %uint
%45 = OpConstantNull %uint
%bool = OpTypeBool
%_ptr_Function__arr_Inner_std140_uint_4 = OpTypePointer Function %_arr_Inner_std140_uint_4
%58 = 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
%71 = OpTypeFunction %Outer %Outer_std140
%_arr_Outer_uint_4 = OpTypeArray %Outer %uint_4
%79 = OpTypeFunction %_arr_Outer_uint_4 %_arr_Outer_std140_uint_4
%_ptr_Function__arr_Outer_uint_4 = OpTypePointer Function %_arr_Outer_uint_4
%86 = OpConstantNull %_arr_Outer_uint_4
%_ptr_Function__arr_Outer_std140_uint_4 = OpTypePointer Function %_arr_Outer_std140_uint_4
%99 = OpConstantNull %_arr_Outer_std140_uint_4
%_ptr_Function_Outer = OpTypePointer Function %Outer
%_ptr_Function_Outer_std140 = OpTypePointer Function %Outer_std140
%111 = OpTypeFunction %mat4v2float %uint %uint
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%uint_2 = OpConstant %uint 2
%uint_3 = OpConstant %uint 3
%129 = OpTypeFunction %v2float %uint %uint %uint
%149 = OpConstantNull %v2float
%150 = OpTypeFunction %float %uint %uint %uint %uint
%_ptr_Uniform_float = OpTypePointer Uniform %float
%172 = OpConstantNull %float
%void = OpTypeVoid
%173 = 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 = OpCompositeExtract %v2float %val 3
%33 = OpCompositeConstruct %mat4v2float %29 %30 %31 %32
%34 = OpCompositeConstruct %Inner %33
OpReturnValue %34
OpFunctionEnd
%conv_arr_4_Inner = OpFunction %_arr_Inner_uint_4 None %35
%val_0 = OpFunctionParameter %_arr_Inner_std140_uint_4
%39 = OpLabel
%arr = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %42
%i_0 = OpVariable %_ptr_Function_uint Function %45
%var_for_index = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function %58
OpBranch %46
%46 = OpLabel
OpLoopMerge %47 %48 None
OpBranch %49
%49 = OpLabel
%51 = OpLoad %uint %i_0
%52 = OpULessThan %bool %51 %uint_4
%50 = OpLogicalNot %bool %52
OpSelectionMerge %54 None
OpBranchConditional %50 %55 %54
%55 = OpLabel
OpBranch %47
%54 = OpLabel
OpStore %var_for_index %val_0
%59 = OpLoad %uint %i_0
%61 = OpAccessChain %_ptr_Function_Inner %arr %59
%63 = OpLoad %uint %i_0
%65 = OpAccessChain %_ptr_Function_Inner_std140 %var_for_index %63
%66 = OpLoad %Inner_std140 %65
%62 = OpFunctionCall %Inner %conv_Inner %66
OpStore %61 %62
OpBranch %48
%48 = OpLabel
%67 = OpLoad %uint %i_0
%69 = OpIAdd %uint %67 %uint_1
OpStore %i_0 %69
OpBranch %46
%47 = OpLabel
%70 = OpLoad %_arr_Inner_uint_4 %arr
OpReturnValue %70
OpFunctionEnd
%conv_Outer = OpFunction %Outer None %71
%val_1 = OpFunctionParameter %Outer_std140
%75 = OpLabel
%77 = OpCompositeExtract %_arr_Inner_std140_uint_4 %val_1 0
%76 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %77
%78 = OpCompositeConstruct %Outer %76
OpReturnValue %78
OpFunctionEnd
%conv_arr_4_Outer = OpFunction %_arr_Outer_uint_4 None %79
%val_2 = OpFunctionParameter %_arr_Outer_std140_uint_4
%83 = OpLabel
%arr_0 = OpVariable %_ptr_Function__arr_Outer_uint_4 Function %86
%i_1 = OpVariable %_ptr_Function_uint Function %45
%var_for_index_1 = OpVariable %_ptr_Function__arr_Outer_std140_uint_4 Function %99
OpBranch %88
%88 = OpLabel
OpLoopMerge %89 %90 None
OpBranch %91
%91 = OpLabel
%93 = OpLoad %uint %i_1
%94 = OpULessThan %bool %93 %uint_4
%92 = OpLogicalNot %bool %94
OpSelectionMerge %95 None
OpBranchConditional %92 %96 %95
%96 = OpLabel
OpBranch %89
%95 = OpLabel
OpStore %var_for_index_1 %val_2
%100 = OpLoad %uint %i_1
%102 = OpAccessChain %_ptr_Function_Outer %arr_0 %100
%104 = OpLoad %uint %i_1
%106 = OpAccessChain %_ptr_Function_Outer_std140 %var_for_index_1 %104
%107 = OpLoad %Outer_std140 %106
%103 = OpFunctionCall %Outer %conv_Outer %107
OpStore %102 %103
OpBranch %90
%90 = OpLabel
%108 = OpLoad %uint %i_1
%109 = OpIAdd %uint %108 %uint_1
OpStore %i_1 %109
OpBranch %88
%89 = OpLabel
%110 = OpLoad %_arr_Outer_uint_4 %arr_0
OpReturnValue %110
OpFunctionEnd
%load_a_p0_a_p1_m = OpFunction %mat4v2float None %111
%p0 = OpFunctionParameter %uint
%p1 = OpFunctionParameter %uint
%115 = OpLabel
%118 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_0 %p1 %uint_0
%119 = OpLoad %v2float %118
%120 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_0 %p1 %uint_1
%121 = OpLoad %v2float %120
%123 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_0 %p1 %uint_2
%124 = OpLoad %v2float %123
%126 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0 %uint_0 %p1 %uint_3
%127 = OpLoad %v2float %126
%128 = OpCompositeConstruct %mat4v2float %119 %121 %124 %127
OpReturnValue %128
OpFunctionEnd
%load_a_p0_a_p1_m_p2 = OpFunction %v2float None %129
%p0_0 = OpFunctionParameter %uint
%p1_0 = OpFunctionParameter %uint
%p2 = OpFunctionParameter %uint
%134 = OpLabel
OpSelectionMerge %135 None
OpSwitch %p2 %136 0 %137 1 %138 2 %139 3 %140
%137 = OpLabel
%141 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_0
%142 = OpLoad %v2float %141
OpReturnValue %142
%138 = OpLabel
%143 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_1
%144 = OpLoad %v2float %143
OpReturnValue %144
%139 = OpLabel
%145 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_2
%146 = OpLoad %v2float %145
OpReturnValue %146
%140 = OpLabel
%147 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_3
%148 = OpLoad %v2float %147
OpReturnValue %148
%136 = OpLabel
OpReturnValue %149
%135 = OpLabel
OpReturnValue %149
OpFunctionEnd
%load_a_p0_a_p1_m_p2_p3 = OpFunction %float None %150
%p0_1 = OpFunctionParameter %uint
%p1_1 = OpFunctionParameter %uint
%p2_0 = OpFunctionParameter %uint
%p3 = OpFunctionParameter %uint
%156 = OpLabel
OpSelectionMerge %157 None
OpSwitch %p2_0 %158 0 %159 1 %160 2 %161 3 %162
%159 = OpLabel
%164 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_0 %p3
%165 = OpLoad %float %164
OpReturnValue %165
%160 = OpLabel
%166 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_1 %p3
%167 = OpLoad %float %166
OpReturnValue %167
%161 = OpLabel
%168 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_2 %p3
%169 = OpLoad %float %168
OpReturnValue %169
%162 = OpLabel
%170 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_3 %p3
%171 = OpLoad %float %170
OpReturnValue %171
%158 = OpLabel
OpReturnValue %172
%157 = OpLabel
OpReturnValue %172
OpFunctionEnd
%f = OpFunction %void None %173
%176 = OpLabel
%179 = OpAccessChain %_ptr_Uniform__arr_Outer_std140_uint_4 %a %uint_0
%180 = OpLoad %_arr_Outer_std140_uint_4 %179
%177 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr_4_Outer %180
%181 = OpFunctionCall %int %i
%184 = OpAccessChain %_ptr_Uniform_Outer_std140 %a %uint_0 %181
%185 = OpLoad %Outer_std140 %184
%182 = OpFunctionCall %Outer %conv_Outer %185
%188 = OpAccessChain %_ptr_Uniform__arr_Inner_std140_uint_4 %a %uint_0 %181 %uint_0
%189 = OpLoad %_arr_Inner_std140_uint_4 %188
%186 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %189
%190 = OpFunctionCall %int %i
%193 = OpAccessChain %_ptr_Uniform_Inner_std140 %a %uint_0 %181 %uint_0 %190
%194 = OpLoad %Inner_std140 %193
%191 = OpFunctionCall %Inner %conv_Inner %194
%196 = OpBitcast %uint %181
%197 = OpBitcast %uint %190
%195 = OpFunctionCall %mat4v2float %load_a_p0_a_p1_m %196 %197
%198 = OpFunctionCall %int %i
%200 = OpBitcast %uint %181
%201 = OpBitcast %uint %190
%202 = OpBitcast %uint %198
%199 = OpFunctionCall %v2float %load_a_p0_a_p1_m_p2 %200 %201 %202
%204 = OpAccessChain %_ptr_Uniform__arr_Outer_std140_uint_4 %a %uint_0
%205 = OpLoad %_arr_Outer_std140_uint_4 %204
%203 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr_4_Outer %205
%207 = OpAccessChain %_ptr_Uniform_Outer_std140 %a %uint_0 %181
%208 = OpLoad %Outer_std140 %207
%206 = OpFunctionCall %Outer %conv_Outer %208
%210 = OpAccessChain %_ptr_Uniform__arr_Inner_std140_uint_4 %a %uint_0 %181 %uint_0
%211 = OpLoad %_arr_Inner_std140_uint_4 %210
%209 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %211
%213 = OpAccessChain %_ptr_Uniform_Inner_std140 %a %uint_0 %181 %uint_0 %190
%214 = OpLoad %Inner_std140 %213
%212 = OpFunctionCall %Inner %conv_Inner %214
%216 = OpBitcast %uint %181
%217 = OpBitcast %uint %190
%215 = OpFunctionCall %mat4v2float %load_a_p0_a_p1_m %216 %217
%219 = OpBitcast %uint %181
%220 = OpBitcast %uint %190
%221 = OpBitcast %uint %198
%218 = OpFunctionCall %v2float %load_a_p0_a_p1_m_p2 %219 %220 %221
%222 = OpFunctionCall %int %i
%224 = OpBitcast %uint %181
%225 = OpBitcast %uint %190
%226 = OpBitcast %uint %198
%227 = OpBitcast %uint %222
%223 = OpFunctionCall %float %load_a_p0_a_p1_m_p2_p3 %224 %225 %226 %227
OpReturn
OpFunctionEnd