blob: 9a4f081701e805b0dc4f864bacad456d5241ddfc [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 215
; 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 %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_arr4_Inner "conv_arr4_Inner"
OpName %val_0 "val"
OpName %arr "arr"
OpName %i_0 "i"
OpName %var_for_index_1 "var_for_index_1"
OpName %Outer "Outer"
OpMemberName %Outer 0 "a"
OpName %conv_Outer "conv_Outer"
OpName %val_1 "val"
OpName %conv_arr4_Outer "conv_arr4_Outer"
OpName %val_2 "val"
OpName %arr_0 "arr"
OpName %i_1 "i"
OpName %var_for_index "var_for_index"
OpName %load_a_inner_p0_a_p1_m "load_a_inner_p0_a_p1_m"
OpName %p0 "p0"
OpName %p1 "p1"
OpName %load_a_inner_p0_a_p1_m_p2 "load_a_inner_p0_a_p1_m_p2"
OpName %p0_0 "p0"
OpName %p1_0 "p1"
OpName %p2 "p2"
OpName %load_a_inner_p0_a_p1_m_p2_p3 "load_a_inner_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_std140 Block
OpMemberDecorate %a_block_std140 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_std140 = OpTypeStruct %_arr_Outer_std140_uint_4
%_ptr_Uniform_a_block_std140 = OpTypePointer Uniform %a_block_std140
%a = OpVariable %_ptr_Uniform_a_block_std140 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_Inner_std140 = OpTypePointer Uniform %Inner_std140
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%uint_2 = OpConstant %uint 2
%uint_3 = OpConstant %uint 3
%136 = OpTypeFunction %v2float %uint %uint %uint
%156 = OpConstantNull %v2float
%157 = OpTypeFunction %float %uint %uint %uint %uint
%_ptr_Uniform_float = OpTypePointer Uniform %float
%179 = OpConstantNull %float
%void = OpTypeVoid
%180 = 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
%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_arr4_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_1 = 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_1 %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_1 %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_arr4_Inner %77
%78 = OpCompositeConstruct %Outer %76
OpReturnValue %78
OpFunctionEnd
%conv_arr4_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 = 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 %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 %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_inner_p0_a_p1_m = OpFunction %mat4v2float None %111
%p0 = OpFunctionParameter %uint
%p1 = OpFunctionParameter %uint
%115 = OpLabel
%119 = OpAccessChain %_ptr_Uniform_Inner_std140 %a %uint_0 %p0 %uint_0 %p1
%122 = OpAccessChain %_ptr_Uniform_v2float %119 %uint_0
%123 = OpLoad %v2float %122
%125 = OpAccessChain %_ptr_Uniform_v2float %119 %uint_1
%126 = OpLoad %v2float %125
%129 = OpAccessChain %_ptr_Uniform_v2float %119 %uint_2
%130 = OpLoad %v2float %129
%133 = OpAccessChain %_ptr_Uniform_v2float %119 %uint_3
%134 = OpLoad %v2float %133
%135 = OpCompositeConstruct %mat4v2float %123 %126 %130 %134
OpReturnValue %135
OpFunctionEnd
%load_a_inner_p0_a_p1_m_p2 = OpFunction %v2float None %136
%p0_0 = OpFunctionParameter %uint
%p1_0 = OpFunctionParameter %uint
%p2 = OpFunctionParameter %uint
%141 = OpLabel
OpSelectionMerge %142 None
OpSwitch %p2 %143 0 %144 1 %145 2 %146 3 %147
%144 = OpLabel
%148 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_0
%149 = OpLoad %v2float %148
OpReturnValue %149
%145 = OpLabel
%150 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_1
%151 = OpLoad %v2float %150
OpReturnValue %151
%146 = OpLabel
%152 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_2
%153 = OpLoad %v2float %152
OpReturnValue %153
%147 = OpLabel
%154 = OpAccessChain %_ptr_Uniform_v2float %a %uint_0 %p0_0 %uint_0 %p1_0 %uint_3
%155 = OpLoad %v2float %154
OpReturnValue %155
%143 = OpLabel
OpReturnValue %156
%142 = OpLabel
OpReturnValue %156
OpFunctionEnd
%load_a_inner_p0_a_p1_m_p2_p3 = OpFunction %float None %157
%p0_1 = OpFunctionParameter %uint
%p1_1 = OpFunctionParameter %uint
%p2_0 = OpFunctionParameter %uint
%p3 = OpFunctionParameter %uint
%163 = OpLabel
OpSelectionMerge %164 None
OpSwitch %p2_0 %165 0 %166 1 %167 2 %168 3 %169
%166 = OpLabel
%171 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_0 %p3
%172 = OpLoad %float %171
OpReturnValue %172
%167 = OpLabel
%173 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_1 %p3
%174 = OpLoad %float %173
OpReturnValue %174
%168 = OpLabel
%175 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_2 %p3
%176 = OpLoad %float %175
OpReturnValue %176
%169 = OpLabel
%177 = OpAccessChain %_ptr_Uniform_float %a %uint_0 %p0_1 %uint_0 %p1_1 %uint_3 %p3
%178 = OpLoad %float %177
OpReturnValue %178
%165 = OpLabel
OpReturnValue %179
%164 = OpLabel
OpReturnValue %179
OpFunctionEnd
%f = OpFunction %void None %180
%183 = OpLabel
%184 = OpFunctionCall %int %i
%185 = OpFunctionCall %int %i
%186 = OpFunctionCall %int %i
%189 = OpAccessChain %_ptr_Uniform__arr_Outer_std140_uint_4 %a %uint_0
%190 = OpLoad %_arr_Outer_std140_uint_4 %189
%187 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr4_Outer %190
%193 = OpAccessChain %_ptr_Uniform_Outer_std140 %a %uint_0 %184
%194 = OpLoad %Outer_std140 %193
%191 = OpFunctionCall %Outer %conv_Outer %194
%197 = OpAccessChain %_ptr_Uniform__arr_Inner_std140_uint_4 %a %uint_0 %184 %uint_0
%198 = OpLoad %_arr_Inner_std140_uint_4 %197
%195 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr4_Inner %198
%200 = OpAccessChain %_ptr_Uniform_Inner_std140 %a %uint_0 %184 %uint_0 %185
%201 = OpLoad %Inner_std140 %200
%199 = OpFunctionCall %Inner %conv_Inner %201
%203 = OpBitcast %uint %184
%204 = OpBitcast %uint %185
%202 = OpFunctionCall %mat4v2float %load_a_inner_p0_a_p1_m %203 %204
%206 = OpBitcast %uint %184
%207 = OpBitcast %uint %185
%208 = OpBitcast %uint %186
%205 = OpFunctionCall %v2float %load_a_inner_p0_a_p1_m_p2 %206 %207 %208
%209 = OpFunctionCall %int %i
%211 = OpBitcast %uint %184
%212 = OpBitcast %uint %185
%213 = OpBitcast %uint %186
%214 = OpBitcast %uint %209
%210 = OpFunctionCall %float %load_a_inner_p0_a_p1_m_p2_p3 %211 %212 %213 %214
OpReturn
OpFunctionEnd