xref: /aosp_15_r20/external/skia/tests/sksl/blend/BlendDifference.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               OpDecorate %sk_FragColor RelaxedPrecision
12               OpDecorate %sk_FragColor Location 0
13               OpDecorate %sk_FragColor Index 0
14               OpMemberDecorate %_UniformBuffer 0 Offset 0
15               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
16               OpMemberDecorate %_UniformBuffer 1 Offset 16
17               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
18               OpDecorate %_UniformBuffer Block
19               OpDecorate %7 Binding 0
20               OpDecorate %7 DescriptorSet 0
21               OpDecorate %17 RelaxedPrecision
22               OpDecorate %18 RelaxedPrecision
23               OpDecorate %22 RelaxedPrecision
24               OpDecorate %23 RelaxedPrecision
25               OpDecorate %24 RelaxedPrecision
26               OpDecorate %28 RelaxedPrecision
27               OpDecorate %29 RelaxedPrecision
28               OpDecorate %31 RelaxedPrecision
29               OpDecorate %32 RelaxedPrecision
30               OpDecorate %33 RelaxedPrecision
31               OpDecorate %35 RelaxedPrecision
32               OpDecorate %36 RelaxedPrecision
33               OpDecorate %38 RelaxedPrecision
34               OpDecorate %39 RelaxedPrecision
35               OpDecorate %40 RelaxedPrecision
36               OpDecorate %41 RelaxedPrecision
37               OpDecorate %42 RelaxedPrecision
38               OpDecorate %43 RelaxedPrecision
39               OpDecorate %44 RelaxedPrecision
40               OpDecorate %45 RelaxedPrecision
41               OpDecorate %47 RelaxedPrecision
42               OpDecorate %48 RelaxedPrecision
43               OpDecorate %51 RelaxedPrecision
44               OpDecorate %52 RelaxedPrecision
45               OpDecorate %53 RelaxedPrecision
46               OpDecorate %55 RelaxedPrecision
47               OpDecorate %56 RelaxedPrecision
48               OpDecorate %57 RelaxedPrecision
49               OpDecorate %58 RelaxedPrecision
50               OpDecorate %59 RelaxedPrecision
51      %float = OpTypeFloat 32
52    %v4float = OpTypeVector %float 4
53%_ptr_Output_v4float = OpTypePointer Output %v4float
54%sk_FragColor = OpVariable %_ptr_Output_v4float Output
55%_UniformBuffer = OpTypeStruct %v4float %v4float
56%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
57          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
58       %void = OpTypeVoid
59         %11 = OpTypeFunction %void
60%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
61        %int = OpTypeInt 32 1
62      %int_0 = OpConstant %int 0
63    %v3float = OpTypeVector %float 3
64      %int_1 = OpConstant %int 1
65    %float_2 = OpConstant %float 2
66    %float_1 = OpConstant %float 1
67       %main = OpFunction %void None %11
68         %12 = OpLabel
69         %13 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
70         %17 = OpLoad %v4float %13
71         %18 = OpVectorShuffle %v3float %17 %17 0 1 2
72         %20 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
73         %22 = OpLoad %v4float %20
74         %23 = OpVectorShuffle %v3float %22 %22 0 1 2
75         %24 = OpFAdd %v3float %18 %23
76         %27 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
77         %28 = OpLoad %v4float %27
78         %29 = OpVectorShuffle %v3float %28 %28 0 1 2
79         %30 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
80         %31 = OpLoad %v4float %30
81         %32 = OpCompositeExtract %float %31 3
82         %33 = OpVectorTimesScalar %v3float %29 %32
83         %34 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
84         %35 = OpLoad %v4float %34
85         %36 = OpVectorShuffle %v3float %35 %35 0 1 2
86         %37 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
87         %38 = OpLoad %v4float %37
88         %39 = OpCompositeExtract %float %38 3
89         %40 = OpVectorTimesScalar %v3float %36 %39
90         %26 = OpExtInst %v3float %1 FMin %33 %40
91         %41 = OpVectorTimesScalar %v3float %26 %float_2
92         %42 = OpFSub %v3float %24 %41
93         %43 = OpCompositeExtract %float %42 0
94         %44 = OpCompositeExtract %float %42 1
95         %45 = OpCompositeExtract %float %42 2
96         %46 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
97         %47 = OpLoad %v4float %46
98         %48 = OpCompositeExtract %float %47 3
99         %50 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
100         %51 = OpLoad %v4float %50
101         %52 = OpCompositeExtract %float %51 3
102         %53 = OpFSub %float %float_1 %52
103         %54 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
104         %55 = OpLoad %v4float %54
105         %56 = OpCompositeExtract %float %55 3
106         %57 = OpFMul %float %53 %56
107         %58 = OpFAdd %float %48 %57
108         %59 = OpCompositeConstruct %v4float %43 %44 %45 %58
109               OpStore %sk_FragColor %59
110               OpReturn
111               OpFunctionEnd
112