xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/Transpose.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 "testMatrix2x2"
9               OpMemberName %_UniformBuffer 1 "testMatrix3x3"
10               OpMemberName %_UniformBuffer 2 "colorGreen"
11               OpMemberName %_UniformBuffer 3 "colorRed"
12               OpName %_entrypoint_v "_entrypoint_v"
13               OpName %main "main"
14               OpName %testMatrix2x3 "testMatrix2x3"
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 ColMajor
20               OpMemberDecorate %_UniformBuffer 0 MatrixStride 16
21               OpMemberDecorate %_UniformBuffer 1 Offset 32
22               OpMemberDecorate %_UniformBuffer 1 ColMajor
23               OpMemberDecorate %_UniformBuffer 1 MatrixStride 16
24               OpMemberDecorate %_UniformBuffer 2 Offset 80
25               OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
26               OpMemberDecorate %_UniformBuffer 3 Offset 96
27               OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
28               OpDecorate %_UniformBuffer Block
29               OpDecorate %7 Binding 0
30               OpDecorate %7 DescriptorSet 0
31               OpDecorate %112 RelaxedPrecision
32               OpDecorate %115 RelaxedPrecision
33               OpDecorate %116 RelaxedPrecision
34      %float = OpTypeFloat 32
35    %v4float = OpTypeVector %float 4
36%_ptr_Output_v4float = OpTypePointer Output %v4float
37%sk_FragColor = OpVariable %_ptr_Output_v4float Output
38    %v2float = OpTypeVector %float 2
39%mat2v2float = OpTypeMatrix %v2float 2
40    %v3float = OpTypeVector %float 3
41%mat3v3float = OpTypeMatrix %v3float 3
42%_UniformBuffer = OpTypeStruct %mat2v2float %mat3v3float %v4float %v4float
43%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
44          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
45       %void = OpTypeVoid
46         %16 = OpTypeFunction %void
47    %float_0 = OpConstant %float 0
48         %19 = OpConstantComposite %v2float %float_0 %float_0
49%_ptr_Function_v2float = OpTypePointer Function %v2float
50         %23 = OpTypeFunction %v4float %_ptr_Function_v2float
51%mat2v3float = OpTypeMatrix %v3float 2
52%_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float
53    %float_1 = OpConstant %float 1
54    %float_2 = OpConstant %float 2
55    %float_3 = OpConstant %float 3
56    %float_4 = OpConstant %float 4
57    %float_5 = OpConstant %float 5
58    %float_6 = OpConstant %float 6
59         %35 = OpConstantComposite %v3float %float_1 %float_2 %float_3
60         %36 = OpConstantComposite %v3float %float_4 %float_5 %float_6
61         %37 = OpConstantComposite %mat2v3float %35 %36
62       %bool = OpTypeBool
63      %false = OpConstantFalse %bool
64%_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
65        %int = OpTypeInt 32 1
66      %int_0 = OpConstant %int 0
67         %46 = OpConstantComposite %v2float %float_1 %float_3
68         %47 = OpConstantComposite %v2float %float_2 %float_4
69         %48 = OpConstantComposite %mat2v2float %46 %47
70     %v2bool = OpTypeVector %bool 2
71%mat3v2float = OpTypeMatrix %v2float 3
72         %61 = OpConstantComposite %v2float %float_1 %float_4
73         %62 = OpConstantComposite %v2float %float_2 %float_5
74         %63 = OpConstantComposite %v2float %float_3 %float_6
75         %64 = OpConstantComposite %mat3v2float %61 %62 %63
76%_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float
77      %int_1 = OpConstant %int 1
78    %float_7 = OpConstant %float 7
79    %float_8 = OpConstant %float 8
80    %float_9 = OpConstant %float 9
81         %87 = OpConstantComposite %v3float %float_1 %float_4 %float_7
82         %88 = OpConstantComposite %v3float %float_2 %float_5 %float_8
83         %89 = OpConstantComposite %v3float %float_3 %float_6 %float_9
84         %90 = OpConstantComposite %mat3v3float %87 %88 %89
85     %v3bool = OpTypeVector %bool 3
86%_ptr_Function_v4float = OpTypePointer Function %v4float
87%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
88      %int_2 = OpConstant %int 2
89      %int_3 = OpConstant %int 3
90%_entrypoint_v = OpFunction %void None %16
91         %17 = OpLabel
92         %20 = OpVariable %_ptr_Function_v2float Function
93               OpStore %20 %19
94         %22 = OpFunctionCall %v4float %main %20
95               OpStore %sk_FragColor %22
96               OpReturn
97               OpFunctionEnd
98       %main = OpFunction %v4float None %23
99         %24 = OpFunctionParameter %_ptr_Function_v2float
100         %25 = OpLabel
101%testMatrix2x3 = OpVariable %_ptr_Function_mat2v3float Function
102        %104 = OpVariable %_ptr_Function_v4float Function
103               OpStore %testMatrix2x3 %37
104         %41 = OpAccessChain %_ptr_Uniform_mat2v2float %7 %int_0
105         %45 = OpLoad %mat2v2float %41
106         %40 = OpTranspose %mat2v2float %45
107         %50 = OpCompositeExtract %v2float %40 0
108         %51 = OpFOrdEqual %v2bool %50 %46
109         %52 = OpAll %bool %51
110         %53 = OpCompositeExtract %v2float %40 1
111         %54 = OpFOrdEqual %v2bool %53 %47
112         %55 = OpAll %bool %54
113         %56 = OpLogicalAnd %bool %52 %55
114               OpSelectionMerge %58 None
115               OpBranchConditional %56 %57 %58
116         %57 = OpLabel
117         %59 = OpTranspose %mat3v2float %37
118         %65 = OpCompositeExtract %v2float %59 0
119         %66 = OpFOrdEqual %v2bool %65 %61
120         %67 = OpAll %bool %66
121         %68 = OpCompositeExtract %v2float %59 1
122         %69 = OpFOrdEqual %v2bool %68 %62
123         %70 = OpAll %bool %69
124         %71 = OpLogicalAnd %bool %67 %70
125         %72 = OpCompositeExtract %v2float %59 2
126         %73 = OpFOrdEqual %v2bool %72 %63
127         %74 = OpAll %bool %73
128         %75 = OpLogicalAnd %bool %71 %74
129               OpBranch %58
130         %58 = OpLabel
131         %76 = OpPhi %bool %false %25 %75 %57
132               OpSelectionMerge %78 None
133               OpBranchConditional %76 %77 %78
134         %77 = OpLabel
135         %80 = OpAccessChain %_ptr_Uniform_mat3v3float %7 %int_1
136         %83 = OpLoad %mat3v3float %80
137         %79 = OpTranspose %mat3v3float %83
138         %92 = OpCompositeExtract %v3float %79 0
139         %93 = OpFOrdEqual %v3bool %92 %87
140         %94 = OpAll %bool %93
141         %95 = OpCompositeExtract %v3float %79 1
142         %96 = OpFOrdEqual %v3bool %95 %88
143         %97 = OpAll %bool %96
144         %98 = OpLogicalAnd %bool %94 %97
145         %99 = OpCompositeExtract %v3float %79 2
146        %100 = OpFOrdEqual %v3bool %99 %89
147        %101 = OpAll %bool %100
148        %102 = OpLogicalAnd %bool %98 %101
149               OpBranch %78
150         %78 = OpLabel
151        %103 = OpPhi %bool %false %58 %102 %77
152               OpSelectionMerge %108 None
153               OpBranchConditional %103 %106 %107
154        %106 = OpLabel
155        %109 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
156        %112 = OpLoad %v4float %109
157               OpStore %104 %112
158               OpBranch %108
159        %107 = OpLabel
160        %113 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
161        %115 = OpLoad %v4float %113
162               OpStore %104 %115
163               OpBranch %108
164        %108 = OpLabel
165        %116 = OpLoad %v4float %104
166               OpReturnValue %116
167               OpFunctionEnd
168