xref: /aosp_15_r20/external/skia/tests/sksl/blend/BlendOverlay.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %main "main" %sk_FragColor
5               OpExecutionMode %main OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "src"
9               OpMemberName %_UniformBuffer 1 "dst"
10               OpName %blend_overlay_component_Qhh2h2 "blend_overlay_component_Qhh2h2"
11               OpName %main "main"
12               OpName %_0_result "_0_result"
13               OpDecorate %sk_FragColor RelaxedPrecision
14               OpDecorate %sk_FragColor Location 0
15               OpDecorate %sk_FragColor Index 0
16               OpMemberDecorate %_UniformBuffer 0 Offset 0
17               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
18               OpMemberDecorate %_UniformBuffer 1 Offset 16
19               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
20               OpDecorate %_UniformBuffer Block
21               OpDecorate %8 Binding 0
22               OpDecorate %8 DescriptorSet 0
23               OpDecorate %18 RelaxedPrecision
24               OpDecorate %19 RelaxedPrecision
25               OpDecorate %20 RelaxedPrecision
26               OpDecorate %21 RelaxedPrecision
27               OpDecorate %22 RelaxedPrecision
28               OpDecorate %30 RelaxedPrecision
29               OpDecorate %31 RelaxedPrecision
30               OpDecorate %32 RelaxedPrecision
31               OpDecorate %33 RelaxedPrecision
32               OpDecorate %34 RelaxedPrecision
33               OpDecorate %35 RelaxedPrecision
34               OpDecorate %36 RelaxedPrecision
35               OpDecorate %37 RelaxedPrecision
36               OpDecorate %38 RelaxedPrecision
37               OpDecorate %39 RelaxedPrecision
38               OpDecorate %40 RelaxedPrecision
39               OpDecorate %41 RelaxedPrecision
40               OpDecorate %42 RelaxedPrecision
41               OpDecorate %43 RelaxedPrecision
42               OpDecorate %44 RelaxedPrecision
43               OpDecorate %45 RelaxedPrecision
44               OpDecorate %46 RelaxedPrecision
45               OpDecorate %47 RelaxedPrecision
46               OpDecorate %48 RelaxedPrecision
47               OpDecorate %49 RelaxedPrecision
48               OpDecorate %50 RelaxedPrecision
49               OpDecorate %51 RelaxedPrecision
50               OpDecorate %52 RelaxedPrecision
51               OpDecorate %53 RelaxedPrecision
52               OpDecorate %54 RelaxedPrecision
53               OpDecorate %_0_result RelaxedPrecision
54               OpDecorate %64 RelaxedPrecision
55               OpDecorate %65 RelaxedPrecision
56               OpDecorate %69 RelaxedPrecision
57               OpDecorate %70 RelaxedPrecision
58               OpDecorate %74 RelaxedPrecision
59               OpDecorate %75 RelaxedPrecision
60               OpDecorate %78 RelaxedPrecision
61               OpDecorate %79 RelaxedPrecision
62               OpDecorate %83 RelaxedPrecision
63               OpDecorate %84 RelaxedPrecision
64               OpDecorate %87 RelaxedPrecision
65               OpDecorate %88 RelaxedPrecision
66               OpDecorate %92 RelaxedPrecision
67               OpDecorate %93 RelaxedPrecision
68               OpDecorate %96 RelaxedPrecision
69               OpDecorate %97 RelaxedPrecision
70               OpDecorate %98 RelaxedPrecision
71               OpDecorate %100 RelaxedPrecision
72               OpDecorate %101 RelaxedPrecision
73               OpDecorate %102 RelaxedPrecision
74               OpDecorate %103 RelaxedPrecision
75               OpDecorate %104 RelaxedPrecision
76               OpDecorate %105 RelaxedPrecision
77               OpDecorate %106 RelaxedPrecision
78               OpDecorate %109 RelaxedPrecision
79               OpDecorate %110 RelaxedPrecision
80               OpDecorate %112 RelaxedPrecision
81               OpDecorate %113 RelaxedPrecision
82               OpDecorate %114 RelaxedPrecision
83               OpDecorate %115 RelaxedPrecision
84               OpDecorate %117 RelaxedPrecision
85               OpDecorate %118 RelaxedPrecision
86               OpDecorate %120 RelaxedPrecision
87               OpDecorate %121 RelaxedPrecision
88               OpDecorate %122 RelaxedPrecision
89               OpDecorate %123 RelaxedPrecision
90               OpDecorate %124 RelaxedPrecision
91               OpDecorate %125 RelaxedPrecision
92               OpDecorate %126 RelaxedPrecision
93               OpDecorate %127 RelaxedPrecision
94      %float = OpTypeFloat 32
95    %v4float = OpTypeVector %float 4
96%_ptr_Output_v4float = OpTypePointer Output %v4float
97%sk_FragColor = OpVariable %_ptr_Output_v4float Output
98%_UniformBuffer = OpTypeStruct %v4float %v4float
99%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
100          %8 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
101    %v2float = OpTypeVector %float 2
102%_ptr_Function_v2float = OpTypePointer Function %v2float
103         %13 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float
104    %float_2 = OpConstant %float 2
105       %bool = OpTypeBool
106%_ptr_Function_float = OpTypePointer Function %float
107       %void = OpTypeVoid
108         %56 = OpTypeFunction %void
109%_ptr_Function_v4float = OpTypePointer Function %v4float
110%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
111        %int = OpTypeInt 32 1
112      %int_0 = OpConstant %int 0
113      %int_1 = OpConstant %int 1
114    %float_1 = OpConstant %float 1
115    %v3float = OpTypeVector %float 3
116%blend_overlay_component_Qhh2h2 = OpFunction %float None %13
117         %14 = OpFunctionParameter %_ptr_Function_v2float
118         %15 = OpFunctionParameter %_ptr_Function_v2float
119         %16 = OpLabel
120         %25 = OpVariable %_ptr_Function_float Function
121         %18 = OpLoad %v2float %15
122         %19 = OpCompositeExtract %float %18 0
123         %20 = OpFMul %float %float_2 %19
124         %21 = OpLoad %v2float %15
125         %22 = OpCompositeExtract %float %21 1
126         %23 = OpFOrdLessThanEqual %bool %20 %22
127               OpSelectionMerge %29 None
128               OpBranchConditional %23 %27 %28
129         %27 = OpLabel
130         %30 = OpLoad %v2float %14
131         %31 = OpCompositeExtract %float %30 0
132         %32 = OpFMul %float %float_2 %31
133         %33 = OpLoad %v2float %15
134         %34 = OpCompositeExtract %float %33 0
135         %35 = OpFMul %float %32 %34
136               OpStore %25 %35
137               OpBranch %29
138         %28 = OpLabel
139         %36 = OpLoad %v2float %14
140         %37 = OpCompositeExtract %float %36 1
141         %38 = OpLoad %v2float %15
142         %39 = OpCompositeExtract %float %38 1
143         %40 = OpFMul %float %37 %39
144         %41 = OpLoad %v2float %15
145         %42 = OpCompositeExtract %float %41 1
146         %43 = OpLoad %v2float %15
147         %44 = OpCompositeExtract %float %43 0
148         %45 = OpFSub %float %42 %44
149         %46 = OpFMul %float %float_2 %45
150         %47 = OpLoad %v2float %14
151         %48 = OpCompositeExtract %float %47 1
152         %49 = OpLoad %v2float %14
153         %50 = OpCompositeExtract %float %49 0
154         %51 = OpFSub %float %48 %50
155         %52 = OpFMul %float %46 %51
156         %53 = OpFSub %float %40 %52
157               OpStore %25 %53
158               OpBranch %29
159         %29 = OpLabel
160         %54 = OpLoad %float %25
161               OpReturnValue %54
162               OpFunctionEnd
163       %main = OpFunction %void None %56
164         %57 = OpLabel
165  %_0_result = OpVariable %_ptr_Function_v4float Function
166         %66 = OpVariable %_ptr_Function_v2float Function
167         %71 = OpVariable %_ptr_Function_v2float Function
168         %76 = OpVariable %_ptr_Function_v2float Function
169         %80 = OpVariable %_ptr_Function_v2float Function
170         %85 = OpVariable %_ptr_Function_v2float Function
171         %89 = OpVariable %_ptr_Function_v2float Function
172         %60 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
173         %64 = OpLoad %v4float %60
174         %65 = OpVectorShuffle %v2float %64 %64 0 3
175               OpStore %66 %65
176         %67 = OpAccessChain %_ptr_Uniform_v4float %8 %int_1
177         %69 = OpLoad %v4float %67
178         %70 = OpVectorShuffle %v2float %69 %69 0 3
179               OpStore %71 %70
180         %72 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %66 %71
181         %73 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
182         %74 = OpLoad %v4float %73
183         %75 = OpVectorShuffle %v2float %74 %74 1 3
184               OpStore %76 %75
185         %77 = OpAccessChain %_ptr_Uniform_v4float %8 %int_1
186         %78 = OpLoad %v4float %77
187         %79 = OpVectorShuffle %v2float %78 %78 1 3
188               OpStore %80 %79
189         %81 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %76 %80
190         %82 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
191         %83 = OpLoad %v4float %82
192         %84 = OpVectorShuffle %v2float %83 %83 2 3
193               OpStore %85 %84
194         %86 = OpAccessChain %_ptr_Uniform_v4float %8 %int_1
195         %87 = OpLoad %v4float %86
196         %88 = OpVectorShuffle %v2float %87 %87 2 3
197               OpStore %89 %88
198         %90 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %85 %89
199         %91 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
200         %92 = OpLoad %v4float %91
201         %93 = OpCompositeExtract %float %92 3
202         %95 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
203         %96 = OpLoad %v4float %95
204         %97 = OpCompositeExtract %float %96 3
205         %98 = OpFSub %float %float_1 %97
206         %99 = OpAccessChain %_ptr_Uniform_v4float %8 %int_1
207        %100 = OpLoad %v4float %99
208        %101 = OpCompositeExtract %float %100 3
209        %102 = OpFMul %float %98 %101
210        %103 = OpFAdd %float %93 %102
211        %104 = OpCompositeConstruct %v4float %72 %81 %90 %103
212               OpStore %_0_result %104
213        %105 = OpLoad %v4float %_0_result
214        %106 = OpVectorShuffle %v3float %105 %105 0 1 2
215        %108 = OpAccessChain %_ptr_Uniform_v4float %8 %int_1
216        %109 = OpLoad %v4float %108
217        %110 = OpVectorShuffle %v3float %109 %109 0 1 2
218        %111 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
219        %112 = OpLoad %v4float %111
220        %113 = OpCompositeExtract %float %112 3
221        %114 = OpFSub %float %float_1 %113
222        %115 = OpVectorTimesScalar %v3float %110 %114
223        %116 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
224        %117 = OpLoad %v4float %116
225        %118 = OpVectorShuffle %v3float %117 %117 0 1 2
226        %119 = OpAccessChain %_ptr_Uniform_v4float %8 %int_1
227        %120 = OpLoad %v4float %119
228        %121 = OpCompositeExtract %float %120 3
229        %122 = OpFSub %float %float_1 %121
230        %123 = OpVectorTimesScalar %v3float %118 %122
231        %124 = OpFAdd %v3float %115 %123
232        %125 = OpFAdd %v3float %106 %124
233        %126 = OpLoad %v4float %_0_result
234        %127 = OpVectorShuffle %v4float %126 %125 4 5 6 3
235               OpStore %_0_result %127
236               OpStore %sk_FragColor %127
237               OpReturn
238               OpFunctionEnd
239