#include "compiler/translator/tree_ops/RewriteStructSamplers.h"
#include "common/hash_containers.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"
namespace sh
{
namespace
{
struct StructureData
{ … };
StructureMap;
StructureUniformMap;
ExtractedSamplerMap;
TIntermTyped *RewriteModifiedStructFieldSelectionExpression(
TCompiler *compiler,
TIntermBinary *node,
const StructureMap &structureMap,
const StructureUniformMap &structureUniformMap,
const ExtractedSamplerMap &extractedSamplers);
TIntermTyped *RewriteExpressionVisitBinaryHelper(TCompiler *compiler,
TIntermBinary *node,
const StructureMap &structureMap,
const StructureUniformMap &structureUniformMap,
const ExtractedSamplerMap &extractedSamplers)
{ … }
class RewriteExpressionTraverser final : public TIntermTraverser
{ … };
void RewriteIndexExpression(TCompiler *compiler,
TIntermTyped *expression,
const StructureMap &structureMap,
const StructureUniformMap &structureUniformMap,
const ExtractedSamplerMap &extractedSamplers)
{ … }
TIntermTyped *RewriteModifiedStructFieldSelectionExpression(
TCompiler *compiler,
TIntermBinary *node,
const StructureMap &structureMap,
const StructureUniformMap &structureUniformMap,
const ExtractedSamplerMap &extractedSamplers)
{ … }
class RewriteStructSamplersTraverser final : public TIntermTraverser
{ … };
}
bool RewriteStructSamplers(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable,
int *removedUniformsCountOut)
{ … }
}