#include "compiler/translator/tree_ops/MonomorphizeUnsupportedFunctions.h"
#include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/tree_util/ReplaceVariable.h"
namespace sh
{
namespace
{
struct Argument
{ … };
struct FunctionData
{ … };
FunctionMap;
void InitializeFunctionMap(TIntermBlock *root, FunctionMap *functionMapOut)
{ … }
const TVariable *GetBaseUniform(TIntermTyped *node, bool *isSamplerInStructOut)
{ … }
TIntermTyped *ExtractSideEffects(TSymbolTable *symbolTable,
TIntermTyped *node,
TIntermSequence *replacementIndices)
{ … }
void CreateMonomorphizedFunctionCallArgs(const TIntermSequence &originalCallArguments,
const TVector<Argument> &replacedArguments,
TIntermSequence *substituteArgsOut)
{ … }
const TFunction *MonomorphizeFunction(TSymbolTable *symbolTable,
const TFunction *original,
TVector<Argument> *replacedArguments,
VariableReplacementMap *argumentMapOut)
{ … }
class MonomorphizeTraverser final : public TIntermTraverser
{ … };
class UpdateFunctionsDefinitionsTraverser final : public TIntermTraverser
{ … };
void SortDeclarations(TIntermBlock *root)
{ … }
bool MonomorphizeUnsupportedFunctionsImpl(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable,
UnsupportedFunctionArgsBitSet unsupportedFunctionArgs)
{ … }
}
bool MonomorphizeUnsupportedFunctions(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable,
UnsupportedFunctionArgsBitSet unsupportedFunctionArgs)
{ … }
}