#include "compiler/translator/ValidateLimitations.h"
#include "angle_gl.h"
#include "compiler/translator/Diagnostics.h"
#include "compiler/translator/ParseContext.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
namespace sh
{
namespace
{
int GetLoopSymbolId(TIntermLoop *loop)
{ … }
class ValidateConstIndexExpr : public TIntermTraverser
{ … };
class ValidateLimitationsTraverser : public TLValueTrackingTraverser
{ … };
ValidateLimitationsTraverser::ValidateLimitationsTraverser(sh::GLenum shaderType,
TSymbolTable *symbolTable,
TDiagnostics *diagnostics)
: … { … }
void ValidateLimitationsTraverser::visitSymbol(TIntermSymbol *node)
{ … }
bool ValidateLimitationsTraverser::visitBinary(Visit, TIntermBinary *node)
{ … }
bool ValidateLimitationsTraverser::visitLoop(Visit, TIntermLoop *node)
{ … }
void ValidateLimitationsTraverser::error(TSourceLoc loc, const char *reason, const char *token)
{ … }
void ValidateLimitationsTraverser::error(TSourceLoc loc,
const char *reason,
const ImmutableString &token)
{ … }
bool ValidateLimitationsTraverser::isLoopIndex(TIntermSymbol *symbol)
{ … }
bool ValidateLimitationsTraverser::validateLoopType(TIntermLoop *node)
{ … }
bool ValidateLimitationsTraverser::validateForLoopHeader(TIntermLoop *node)
{ … }
int ValidateLimitationsTraverser::validateForLoopInit(TIntermLoop *node)
{ … }
bool ValidateLimitationsTraverser::validateForLoopCond(TIntermLoop *node, int indexSymbolId)
{ … }
bool ValidateLimitationsTraverser::validateForLoopExpr(TIntermLoop *node, int indexSymbolId)
{ … }
bool ValidateLimitationsTraverser::isConstExpr(TIntermNode *node)
{ … }
bool ValidateLimitationsTraverser::isConstIndexExpr(TIntermNode *node)
{ … }
bool ValidateLimitationsTraverser::validateIndexing(TIntermBinary *node)
{ … }
}
bool ValidateLimitations(TIntermNode *root,
GLenum shaderType,
TSymbolTable *symbolTable,
TDiagnostics *diagnostics)
{ … }
}