#include "compiler/translator/tree_ops/RemoveInactiveInterfaceVariables.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/util.h"
namespace sh
{
namespace
{
class RemoveInactiveInterfaceVariablesTraverser : public TIntermTraverser
{ … };
RemoveInactiveInterfaceVariablesTraverser::RemoveInactiveInterfaceVariablesTraverser(
TSymbolTable *symbolTable,
const std::vector<sh::ShaderVariable> &attributes,
const std::vector<sh::ShaderVariable> &inputVaryings,
const std::vector<sh::ShaderVariable> &outputVariables,
const std::vector<sh::ShaderVariable> &uniforms,
const std::vector<sh::InterfaceBlock> &interfaceBlocks,
bool removeFragmentOutputs)
: … { … }
template <typename Variable>
bool IsVariableActive(const std::vector<Variable> &mVars, const ImmutableString &name)
{ … }
bool RemoveInactiveInterfaceVariablesTraverser::visitDeclaration(Visit visit,
TIntermDeclaration *node)
{ … }
bool RemoveInactiveInterfaceVariablesTraverser::visitBinary(Visit visit, TIntermBinary *node)
{ … }
}
bool RemoveInactiveInterfaceVariables(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable,
const std::vector<sh::ShaderVariable> &attributes,
const std::vector<sh::ShaderVariable> &inputVaryings,
const std::vector<sh::ShaderVariable> &outputVariables,
const std::vector<sh::ShaderVariable> &uniforms,
const std::vector<sh::InterfaceBlock> &interfaceBlocks,
bool removeFragmentOutputs)
{ … }
}