#include "compiler/translator/tree_ops/spirv/EmulateAdvancedBlendEquations.h"
#include <map>
#include "GLSLANG/ShaderVars.h"
#include "common/PackedEnums.h"
#include "compiler/translator/Compiler.h"
#include "compiler/translator/StaticType.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/DriverUniform.h"
#include "compiler/translator/tree_util/FindMain.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/tree_util/RunAtTheEndOfShader.h"
namespace sh
{
namespace
{
class Builder
{ … };
bool Builder::build(TIntermBlock *root)
{ … }
void Builder::findColorOutput(TIntermBlock *root)
{ … }
TIntermSymbol *MakeVariable(TSymbolTable *symbolTable, const char *name, const TType *type)
{ … }
void Builder::createSubpassInputVar(TIntermBlock *root)
{ … }
TIntermTyped *Float(float f)
{ … }
TFunction *MakeFunction(TSymbolTable *symbolTable,
const char *name,
const TType *returnType,
const TVector<const TVariable *> &args)
{ … }
TIntermFunctionDefinition *MakeFunctionDefinition(const TFunction *function, TIntermBlock *body)
{ … }
TIntermFunctionDefinition *MakeSimpleFunctionDefinition(TSymbolTable *symbolTable,
const char *name,
TIntermTyped *returnExpression,
const TVector<TIntermSymbol *> &args)
{ … }
void Builder::generateHslHelperFunctions()
{ … }
void Builder::generateBlendFunctions()
{ … }
void Builder::insertGeneratedFunctions(TIntermBlock *root)
{ … }
TIntermTyped *Builder::divideFloatNode(TIntermTyped *dividend, TIntermTyped *divisor)
{ … }
TIntermSymbol *Builder::premultiplyAlpha(TIntermBlock *blendBlock,
TIntermTyped *var,
const char *name)
{ … }
TIntermTyped *GetFirstElementIfArray(TIntermTyped *var)
{ … }
void Builder::generatePreamble(TIntermBlock *blendBlock)
{ … }
void Builder::generateEquationSwitch(TIntermBlock *blendBlock)
{ … }
}
bool EmulateAdvancedBlendEquations(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable,
const AdvancedBlendEquations &advancedBlendEquations,
const DriverUniform *driverUniforms,
InputAttachmentMap *inputAttachmentMapOut)
{ … }
}