chromium/third_party/angle/src/compiler/translator/ValidateVaryingLocations.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.
//
// The ValidateVaryingLocations function checks if there exists location conflicts on shader
// varyings.
//

#include "ValidateVaryingLocations.h"

#include "compiler/translator/Diagnostics.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/util.h"

namespace sh
{

namespace
{

void error(const TIntermSymbol &symbol, const char *reason, TDiagnostics *diagnostics)
{}

int GetStructLocationCount(const TStructure *structure);

int GetFieldLocationCount(const TField *field)
{}

int GetStructLocationCount(const TStructure *structure)
{}

int GetInterfaceBlockLocationCount(const TType &varyingType, bool ignoreVaryingArraySize)
{}

int GetLocationCount(const TType &varyingType, bool ignoreVaryingArraySize)
{}

bool ShouldIgnoreVaryingArraySize(TQualifier qualifier, GLenum shaderType)
{}

struct SymbolAndField
{};
LocationMap;

void MarkVaryingLocations(TDiagnostics *diagnostics,
                          const TIntermSymbol *varying,
                          const TField *field,
                          int location,
                          int elementCount,
                          LocationMap *locationMap)
{}

VaryingVector;

void ValidateShaderInterfaceAndAssignLocations(TDiagnostics *diagnostics,
                                               const VaryingVector &varyingVector,
                                               GLenum shaderType)
{}

class ValidateVaryingLocationsTraverser : public TIntermTraverser
{};

ValidateVaryingLocationsTraverser::ValidateVaryingLocationsTraverser(GLenum shaderType)
    :{}

bool ValidateVaryingLocationsTraverser::visitDeclaration(Visit visit, TIntermDeclaration *node)
{}

bool ValidateVaryingLocationsTraverser::visitFunctionDefinition(Visit visit,
                                                                TIntermFunctionDefinition *node)
{}

void ValidateVaryingLocationsTraverser::validate(TDiagnostics *diagnostics)
{}

}  // anonymous namespace

unsigned int CalculateVaryingLocationCount(const TType &varyingType, GLenum shaderType)
{}

bool ValidateVaryingLocations(TIntermBlock *root, TDiagnostics *diagnostics, GLenum shaderType)
{}

}  // namespace sh