chromium/third_party/angle/src/compiler/translator/tree_ops/MonomorphizeUnsupportedFunctions.cpp

//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// MonomorphizeUnsupportedFunctions: Monomorphize functions that are called with
// parameters that are incompatible with both Vulkan GLSL and Metal.
//

#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;

// Traverse the function definitions and initialize the map.  Allows visitAggregate to have access
// to TIntermFunctionDefinition even when the function is only forward declared at that point.
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)
{}
}  // anonymous namespace

bool MonomorphizeUnsupportedFunctions(TCompiler *compiler,
                                      TIntermBlock *root,
                                      TSymbolTable *symbolTable,
                                      UnsupportedFunctionArgsBitSet unsupportedFunctionArgs)
{}
}  // namespace sh