• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2022 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // EmulateAdvancedBlendEquations.h: Emulate advanced blend equations by implicitly reading back from
7 // the color attachment (as an input attachment) and apply the equation function based on a uniform.
8 //
9 
10 #ifndef COMPILER_TRANSLATOR_TREEOPS_VULKAN_EMULATEADVANCEDBLENDEQUATIONS_H_
11 #define COMPILER_TRANSLATOR_TREEOPS_VULKAN_EMULATEADVANCEDBLENDEQUATIONS_H_
12 
13 #include "common/angleutils.h"
14 
15 namespace sh
16 {
17 
18 class TCompiler;
19 class TIntermBlock;
20 class TSymbolTable;
21 class DriverUniform;
22 struct ShaderVariable;
23 class AdvancedBlendEquations;
24 
25 // Declares the necessary input attachment (if not already for framebuffer fetch), loads from it and
26 // implements the specified advanced blend equation functions.  A driver uniform is used to select
27 // which function to use at runtime.
28 ANGLE_NO_DISCARD bool EmulateAdvancedBlendEquations(
29     TCompiler *compiler,
30     TIntermBlock *root,
31     TSymbolTable *symbolTable,
32     const DriverUniform *driverUniforms,
33     std::vector<ShaderVariable> *uniforms,
34     const AdvancedBlendEquations &advancedBlendEquations);
35 
36 }  // namespace sh
37 
38 #endif  // COMPILER_TRANSLATOR_TREEOPS_VULKAN_EMULATEADVANCEDBLENDEQUATIONS_H_
39