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