xref: /aosp_15_r20/external/skia/tests/sksl/shared/MatrixConstructorsES2.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
5               OpExecutionMode %_entrypoint_v OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "colorGreen"
9               OpMemberName %_UniformBuffer 1 "colorRed"
10               OpMemberName %_UniformBuffer 2 "testMatrix2x2"
11               OpName %_entrypoint_v "_entrypoint_v"
12               OpName %main "main"
13               OpName %f4 "f4"
14               OpName %ok "ok"
15               OpDecorate %sk_FragColor RelaxedPrecision
16               OpDecorate %sk_FragColor Location 0
17               OpDecorate %sk_FragColor Index 0
18               OpMemberDecorate %_UniformBuffer 0 Offset 0
19               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
20               OpMemberDecorate %_UniformBuffer 1 Offset 16
21               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
22               OpMemberDecorate %_UniformBuffer 2 Offset 32
23               OpMemberDecorate %_UniformBuffer 2 ColMajor
24               OpMemberDecorate %_UniformBuffer 2 MatrixStride 16
25               OpDecorate %_UniformBuffer Block
26               OpDecorate %7 Binding 0
27               OpDecorate %7 DescriptorSet 0
28               OpDecorate %133 RelaxedPrecision
29               OpDecorate %136 RelaxedPrecision
30               OpDecorate %137 RelaxedPrecision
31      %float = OpTypeFloat 32
32    %v4float = OpTypeVector %float 4
33%_ptr_Output_v4float = OpTypePointer Output %v4float
34%sk_FragColor = OpVariable %_ptr_Output_v4float Output
35    %v2float = OpTypeVector %float 2
36%mat2v2float = OpTypeMatrix %v2float 2
37%_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float
38%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
39          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
40       %void = OpTypeVoid
41         %14 = OpTypeFunction %void
42    %float_0 = OpConstant %float 0
43         %17 = OpConstantComposite %v2float %float_0 %float_0
44%_ptr_Function_v2float = OpTypePointer Function %v2float
45         %21 = OpTypeFunction %v4float %_ptr_Function_v2float
46%_ptr_Function_v4float = OpTypePointer Function %v4float
47%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
48        %int = OpTypeInt 32 1
49      %int_2 = OpConstant %int 2
50       %bool = OpTypeBool
51%_ptr_Function_bool = OpTypePointer Function %bool
52    %v3float = OpTypeVector %float 3
53    %float_4 = OpConstant %float 4
54    %float_1 = OpConstant %float 1
55    %float_2 = OpConstant %float 2
56    %float_3 = OpConstant %float 3
57         %51 = OpConstantComposite %v2float %float_1 %float_2
58         %52 = OpConstantComposite %v2float %float_3 %float_4
59         %53 = OpConstantComposite %mat2v2float %51 %52
60     %v2bool = OpTypeVector %bool 2
61      %false = OpConstantFalse %bool
62%mat3v3float = OpTypeMatrix %v3float 3
63         %74 = OpConstantComposite %v3float %float_1 %float_2 %float_3
64         %75 = OpConstantComposite %v3float %float_4 %float_1 %float_2
65         %76 = OpConstantComposite %v3float %float_3 %float_4 %float_1
66         %77 = OpConstantComposite %mat3v3float %74 %75 %76
67     %v3bool = OpTypeVector %bool 3
68%mat4v4float = OpTypeMatrix %v4float 4
69        %111 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
70        %112 = OpConstantComposite %mat4v4float %111 %111 %111 %111
71     %v4bool = OpTypeVector %bool 4
72%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
73      %int_0 = OpConstant %int 0
74      %int_1 = OpConstant %int 1
75%_entrypoint_v = OpFunction %void None %14
76         %15 = OpLabel
77         %18 = OpVariable %_ptr_Function_v2float Function
78               OpStore %18 %17
79         %20 = OpFunctionCall %v4float %main %18
80               OpStore %sk_FragColor %20
81               OpReturn
82               OpFunctionEnd
83       %main = OpFunction %v4float None %21
84         %22 = OpFunctionParameter %_ptr_Function_v2float
85         %23 = OpLabel
86         %f4 = OpVariable %_ptr_Function_v4float Function
87         %ok = OpVariable %_ptr_Function_bool Function
88        %126 = OpVariable %_ptr_Function_v4float Function
89         %26 = OpAccessChain %_ptr_Uniform_mat2v2float %7 %int_2
90         %30 = OpLoad %mat2v2float %26
91         %31 = OpCompositeExtract %float %30 0 0
92         %32 = OpCompositeExtract %float %30 0 1
93         %33 = OpCompositeExtract %float %30 1 0
94         %34 = OpCompositeExtract %float %30 1 1
95         %35 = OpCompositeConstruct %v4float %31 %32 %33 %34
96               OpStore %f4 %35
97         %39 = OpVectorShuffle %v3float %35 %35 0 1 2
98         %42 = OpCompositeExtract %float %39 0
99         %43 = OpCompositeExtract %float %39 1
100         %44 = OpCompositeConstruct %v2float %42 %43
101         %45 = OpCompositeExtract %float %39 2
102         %46 = OpCompositeConstruct %v2float %45 %float_4
103         %47 = OpCompositeConstruct %mat2v2float %44 %46
104         %55 = OpFOrdEqual %v2bool %44 %51
105         %56 = OpAll %bool %55
106         %57 = OpFOrdEqual %v2bool %46 %52
107         %58 = OpAll %bool %57
108         %59 = OpLogicalAnd %bool %56 %58
109               OpStore %ok %59
110               OpSelectionMerge %62 None
111               OpBranchConditional %59 %61 %62
112         %61 = OpLabel
113         %63 = OpVectorShuffle %v2float %35 %35 0 1
114         %64 = OpVectorShuffle %v2float %35 %35 2 3
115         %65 = OpCompositeExtract %float %63 0
116         %66 = OpCompositeExtract %float %63 1
117         %67 = OpCompositeExtract %float %64 0
118         %68 = OpCompositeConstruct %v3float %65 %66 %67
119         %69 = OpCompositeExtract %float %64 1
120         %70 = OpCompositeConstruct %v3float %69 %31 %32
121         %71 = OpCompositeConstruct %v3float %33 %34 %31
122         %73 = OpCompositeConstruct %mat3v3float %68 %70 %71
123         %79 = OpFOrdEqual %v3bool %68 %74
124         %80 = OpAll %bool %79
125         %81 = OpFOrdEqual %v3bool %70 %75
126         %82 = OpAll %bool %81
127         %83 = OpLogicalAnd %bool %80 %82
128         %84 = OpFOrdEqual %v3bool %71 %76
129         %85 = OpAll %bool %84
130         %86 = OpLogicalAnd %bool %83 %85
131               OpBranch %62
132         %62 = OpLabel
133         %87 = OpPhi %bool %false %23 %86 %61
134               OpStore %ok %87
135               OpSelectionMerge %89 None
136               OpBranchConditional %87 %88 %89
137         %88 = OpLabel
138         %90 = OpVectorShuffle %v3float %35 %35 0 1 2
139         %91 = OpVectorShuffle %v3float %35 %35 3 0 1
140         %92 = OpVectorShuffle %v4float %35 %35 2 3 0 1
141         %93 = OpVectorShuffle %v2float %35 %35 2 3
142         %94 = OpCompositeExtract %float %90 0
143         %95 = OpCompositeExtract %float %90 1
144         %96 = OpCompositeExtract %float %90 2
145         %97 = OpCompositeExtract %float %91 0
146         %98 = OpCompositeConstruct %v4float %94 %95 %96 %97
147         %99 = OpCompositeExtract %float %91 1
148        %100 = OpCompositeExtract %float %91 2
149        %101 = OpCompositeExtract %float %92 0
150        %102 = OpCompositeExtract %float %92 1
151        %103 = OpCompositeConstruct %v4float %99 %100 %101 %102
152        %104 = OpCompositeExtract %float %92 2
153        %105 = OpCompositeExtract %float %92 3
154        %106 = OpCompositeExtract %float %93 0
155        %107 = OpCompositeExtract %float %93 1
156        %108 = OpCompositeConstruct %v4float %104 %105 %106 %107
157        %110 = OpCompositeConstruct %mat4v4float %98 %103 %108 %35
158        %114 = OpFOrdEqual %v4bool %98 %111
159        %115 = OpAll %bool %114
160        %116 = OpFOrdEqual %v4bool %103 %111
161        %117 = OpAll %bool %116
162        %118 = OpLogicalAnd %bool %115 %117
163        %119 = OpFOrdEqual %v4bool %108 %111
164        %120 = OpAll %bool %119
165        %121 = OpLogicalAnd %bool %118 %120
166        %122 = OpFOrdEqual %v4bool %35 %111
167        %123 = OpAll %bool %122
168        %124 = OpLogicalAnd %bool %121 %123
169               OpBranch %89
170         %89 = OpLabel
171        %125 = OpPhi %bool %false %62 %124 %88
172               OpStore %ok %125
173               OpSelectionMerge %129 None
174               OpBranchConditional %125 %127 %128
175        %127 = OpLabel
176        %130 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
177        %133 = OpLoad %v4float %130
178               OpStore %126 %133
179               OpBranch %129
180        %128 = OpLabel
181        %134 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
182        %136 = OpLoad %v4float %134
183               OpStore %126 %136
184               OpBranch %129
185        %129 = OpLabel
186        %137 = OpLoad %v4float %126
187               OpReturnValue %137
188               OpFunctionEnd
189