chromium/third_party/angle/src/compiler/translator/ValidateLimitations.cpp

//
// Copyright 2002 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.
//

#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)
{}

// Traverses a node to check if it represents a constant index expression.
// Definition:
// constant-index-expressions are a superset of constant-expressions.
// Constant-index-expressions can include loop indices as defined in
// GLSL ES 1.0 spec, Appendix A, section 4.
// The following are constant-index-expressions:
// - Constant expressions
// - Loop indices as defined in section 4
// - Expressions composed of both of the above
class ValidateConstIndexExpr : public TIntermTraverser
{};

// Traverses intermediate tree to ensure that the shader does not exceed the
// minimum functionality mandated in GLSL 1.0 spec, Appendix A.
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)
{}

}  // namespace

bool ValidateLimitations(TIntermNode *root,
                         GLenum shaderType,
                         TSymbolTable *symbolTable,
                         TDiagnostics *diagnostics)
{}

}  // namespace sh