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