#include "compiler/translator/ValidateGlobalInitializer.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
namespace sh
{
namespace
{
const int kMaxAllowedTraversalDepth = …;
class ValidateGlobalInitializerTraverser : public TIntermTraverser
{ … };
void ValidateGlobalInitializerTraverser::visitSymbol(TIntermSymbol *node)
{ … }
void ValidateGlobalInitializerTraverser::visitConstantUnion(TIntermConstantUnion *node)
{ … }
bool ValidateGlobalInitializerTraverser::visitAggregate(Visit visit, TIntermAggregate *node)
{ … }
bool ValidateGlobalInitializerTraverser::visitBinary(Visit visit, TIntermBinary *node)
{ … }
bool ValidateGlobalInitializerTraverser::visitUnary(Visit visit, TIntermUnary *node)
{ … }
ValidateGlobalInitializerTraverser::ValidateGlobalInitializerTraverser(
int shaderVersion,
bool isWebGL,
bool hasExtNonConstGlobalInitializers)
: … { … }
}
bool ValidateGlobalInitializer(TIntermTyped *initializer,
int shaderVersion,
bool isWebGL,
bool hasExtNonConstGlobalInitializers,
bool *warning)
{ … }
}