xref: /aosp_15_r20/external/skia/tests/sksl/blend/BlendDarken.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 %main "main"
11               OpName %_0_a "_0_a"
12               OpName %_1_b "_1_b"
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 %7 Binding 0
22               OpDecorate %7 DescriptorSet 0
23               OpDecorate %_0_a RelaxedPrecision
24               OpDecorate %19 RelaxedPrecision
25               OpDecorate %22 RelaxedPrecision
26               OpDecorate %23 RelaxedPrecision
27               OpDecorate %24 RelaxedPrecision
28               OpDecorate %27 RelaxedPrecision
29               OpDecorate %28 RelaxedPrecision
30               OpDecorate %29 RelaxedPrecision
31               OpDecorate %_1_b RelaxedPrecision
32               OpDecorate %34 RelaxedPrecision
33               OpDecorate %35 RelaxedPrecision
34               OpDecorate %36 RelaxedPrecision
35               OpDecorate %38 RelaxedPrecision
36               OpDecorate %39 RelaxedPrecision
37               OpDecorate %40 RelaxedPrecision
38               OpDecorate %42 RelaxedPrecision
39               OpDecorate %43 RelaxedPrecision
40               OpDecorate %44 RelaxedPrecision
41               OpDecorate %46 RelaxedPrecision
42               OpDecorate %47 RelaxedPrecision
43               OpDecorate %48 RelaxedPrecision
44      %float = OpTypeFloat 32
45    %v4float = OpTypeVector %float 4
46%_ptr_Output_v4float = OpTypePointer Output %v4float
47%sk_FragColor = OpVariable %_ptr_Output_v4float Output
48%_UniformBuffer = OpTypeStruct %v4float %v4float
49%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
50          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
51       %void = OpTypeVoid
52         %11 = OpTypeFunction %void
53%_ptr_Function_v4float = OpTypePointer Function %v4float
54%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
55        %int = OpTypeInt 32 1
56      %int_0 = OpConstant %int 0
57    %float_1 = OpConstant %float 1
58      %int_1 = OpConstant %int 1
59    %v3float = OpTypeVector %float 3
60%_ptr_Function_v3float = OpTypePointer Function %v3float
61       %main = OpFunction %void None %11
62         %12 = OpLabel
63       %_0_a = OpVariable %_ptr_Function_v4float Function
64       %_1_b = OpVariable %_ptr_Function_v3float Function
65         %15 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
66         %19 = OpLoad %v4float %15
67         %21 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
68         %22 = OpLoad %v4float %21
69         %23 = OpCompositeExtract %float %22 3
70         %24 = OpFSub %float %float_1 %23
71         %25 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
72         %27 = OpLoad %v4float %25
73         %28 = OpVectorTimesScalar %v4float %27 %24
74         %29 = OpFAdd %v4float %19 %28
75               OpStore %_0_a %29
76         %33 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
77         %34 = OpLoad %v4float %33
78         %35 = OpCompositeExtract %float %34 3
79         %36 = OpFSub %float %float_1 %35
80         %37 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
81         %38 = OpLoad %v4float %37
82         %39 = OpVectorShuffle %v3float %38 %38 0 1 2
83         %40 = OpVectorTimesScalar %v3float %39 %36
84         %41 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
85         %42 = OpLoad %v4float %41
86         %43 = OpVectorShuffle %v3float %42 %42 0 1 2
87         %44 = OpFAdd %v3float %40 %43
88               OpStore %_1_b %44
89         %46 = OpVectorShuffle %v3float %29 %29 0 1 2
90         %45 = OpExtInst %v3float %1 FMin %46 %44
91         %47 = OpLoad %v4float %_0_a
92         %48 = OpVectorShuffle %v4float %47 %45 4 5 6 3
93               OpStore %_0_a %48
94               OpStore %sk_FragColor %48
95               OpReturn
96               OpFunctionEnd
97