xref: /aosp_15_r20/external/skia/tests/sksl/shared/ResizeMatrix.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               OpName %_entrypoint_v "_entrypoint_v"
11               OpName %main "main"
12               OpName %result "result"
13               OpName %a "a"
14               OpName %b "b"
15               OpName %c "c"
16               OpName %d "d"
17               OpName %e "e"
18               OpName %f "f"
19               OpDecorate %sk_FragColor RelaxedPrecision
20               OpDecorate %sk_FragColor Location 0
21               OpDecorate %sk_FragColor Index 0
22               OpMemberDecorate %_UniformBuffer 0 Offset 0
23               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
24               OpMemberDecorate %_UniformBuffer 1 Offset 16
25               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
26               OpDecorate %_UniformBuffer Block
27               OpDecorate %7 Binding 0
28               OpDecorate %7 DescriptorSet 0
29               OpDecorate %105 RelaxedPrecision
30               OpDecorate %108 RelaxedPrecision
31               OpDecorate %109 RelaxedPrecision
32      %float = OpTypeFloat 32
33    %v4float = OpTypeVector %float 4
34%_ptr_Output_v4float = OpTypePointer Output %v4float
35%sk_FragColor = OpVariable %_ptr_Output_v4float Output
36%_UniformBuffer = OpTypeStruct %v4float %v4float
37%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
38          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
39       %void = OpTypeVoid
40         %12 = OpTypeFunction %void
41    %float_0 = OpConstant %float 0
42    %v2float = OpTypeVector %float 2
43         %16 = OpConstantComposite %v2float %float_0 %float_0
44%_ptr_Function_v2float = OpTypePointer Function %v2float
45         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
46%_ptr_Function_float = OpTypePointer Function %float
47%mat2v2float = OpTypeMatrix %v2float 2
48%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
49    %float_1 = OpConstant %float 1
50    %v3float = OpTypeVector %float 3
51         %30 = OpConstantComposite %v3float %float_1 %float_0 %float_0
52         %31 = OpConstantComposite %v3float %float_0 %float_1 %float_0
53         %32 = OpConstantComposite %v3float %float_0 %float_0 %float_1
54%mat3v3float = OpTypeMatrix %v3float 3
55         %34 = OpConstantComposite %mat3v3float %30 %31 %32
56        %int = OpTypeInt 32 1
57      %int_0 = OpConstant %int 0
58         %45 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0
59         %46 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_0
60         %47 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_0
61         %48 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
62%mat4v4float = OpTypeMatrix %v4float 4
63         %50 = OpConstantComposite %mat4v4float %45 %46 %47 %48
64%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
65%_ptr_Function_v3float = OpTypePointer Function %v3float
66         %70 = OpConstantComposite %v2float %float_1 %float_0
67         %71 = OpConstantComposite %v2float %float_0 %float_1
68         %72 = OpConstantComposite %mat2v2float %70 %71
69%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
70%_ptr_Function_v4float = OpTypePointer Function %v4float
71    %float_6 = OpConstant %float 6
72       %bool = OpTypeBool
73%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
74      %int_1 = OpConstant %int 1
75%_entrypoint_v = OpFunction %void None %12
76         %13 = OpLabel
77         %17 = OpVariable %_ptr_Function_v2float Function
78               OpStore %17 %16
79         %19 = OpFunctionCall %v4float %main %17
80               OpStore %sk_FragColor %19
81               OpReturn
82               OpFunctionEnd
83       %main = OpFunction %v4float None %20
84         %21 = OpFunctionParameter %_ptr_Function_v2float
85         %22 = OpLabel
86     %result = OpVariable %_ptr_Function_float Function
87          %a = OpVariable %_ptr_Function_mat2v2float Function
88          %b = OpVariable %_ptr_Function_mat2v2float Function
89          %c = OpVariable %_ptr_Function_mat3v3float Function
90          %d = OpVariable %_ptr_Function_mat3v3float Function
91          %e = OpVariable %_ptr_Function_mat4v4float Function
92          %f = OpVariable %_ptr_Function_mat2v2float Function
93         %99 = OpVariable %_ptr_Function_v4float Function
94               OpStore %result %float_0
95         %35 = OpVectorShuffle %v2float %30 %30 0 1
96         %36 = OpVectorShuffle %v2float %31 %31 0 1
97         %37 = OpCompositeConstruct %mat2v2float %35 %36
98               OpStore %a %37
99         %40 = OpAccessChain %_ptr_Function_v2float %a %int_0
100         %41 = OpLoad %v2float %40
101         %42 = OpCompositeExtract %float %41 0
102         %43 = OpFAdd %float %float_0 %42
103               OpStore %result %43
104         %51 = OpVectorShuffle %v2float %45 %45 0 1
105         %52 = OpVectorShuffle %v2float %46 %46 0 1
106         %53 = OpCompositeConstruct %mat2v2float %51 %52
107               OpStore %b %53
108         %54 = OpAccessChain %_ptr_Function_v2float %b %int_0
109         %55 = OpLoad %v2float %54
110         %56 = OpCompositeExtract %float %55 0
111         %57 = OpFAdd %float %43 %56
112               OpStore %result %57
113         %60 = OpVectorShuffle %v3float %45 %45 0 1 2
114         %61 = OpVectorShuffle %v3float %46 %46 0 1 2
115         %62 = OpVectorShuffle %v3float %47 %47 0 1 2
116         %63 = OpCompositeConstruct %mat3v3float %60 %61 %62
117               OpStore %c %63
118         %64 = OpAccessChain %_ptr_Function_v3float %c %int_0
119         %66 = OpLoad %v3float %64
120         %67 = OpCompositeExtract %float %66 0
121         %68 = OpFAdd %float %57 %67
122               OpStore %result %68
123               OpStore %d %34
124         %73 = OpAccessChain %_ptr_Function_v3float %d %int_0
125         %74 = OpLoad %v3float %73
126         %75 = OpCompositeExtract %float %74 0
127         %76 = OpFAdd %float %68 %75
128               OpStore %result %76
129               OpStore %e %50
130         %79 = OpAccessChain %_ptr_Function_v4float %e %int_0
131         %81 = OpLoad %v4float %79
132         %82 = OpCompositeExtract %float %81 0
133         %83 = OpFAdd %float %76 %82
134               OpStore %result %83
135         %85 = OpVectorShuffle %v3float %45 %45 0 1 2
136         %86 = OpVectorShuffle %v3float %46 %46 0 1 2
137         %87 = OpVectorShuffle %v3float %47 %47 0 1 2
138         %88 = OpCompositeConstruct %mat3v3float %85 %86 %87
139         %89 = OpVectorShuffle %v2float %85 %85 0 1
140         %90 = OpVectorShuffle %v2float %86 %86 0 1
141         %91 = OpCompositeConstruct %mat2v2float %89 %90
142               OpStore %f %91
143         %92 = OpAccessChain %_ptr_Function_v2float %f %int_0
144         %93 = OpLoad %v2float %92
145         %94 = OpCompositeExtract %float %93 0
146         %95 = OpFAdd %float %83 %94
147               OpStore %result %95
148         %97 = OpFOrdEqual %bool %95 %float_6
149               OpSelectionMerge %102 None
150               OpBranchConditional %97 %100 %101
151        %100 = OpLabel
152        %103 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
153        %105 = OpLoad %v4float %103
154               OpStore %99 %105
155               OpBranch %102
156        %101 = OpLabel
157        %106 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
158        %108 = OpLoad %v4float %106
159               OpStore %99 %108
160               OpBranch %102
161        %102 = OpLabel
162        %109 = OpLoad %v4float %99
163               OpReturnValue %109
164               OpFunctionEnd
165