chromium/third_party/angle/src/compiler/translator/tree_ops/DeclarePerVertexBlocks.cpp

//
// Copyright 2021 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.
//
// DeclarePerVertexBlocks: Declare gl_PerVertex blocks if not already.
//

#include "compiler/translator/tree_ops/DeclarePerVertexBlocks.h"

#include "compiler/translator/Compiler.h"
#include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/StaticType.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/tree_util/ReplaceVariable.h"

namespace sh
{
namespace
{
PerVertexMemberFlags;

int GetPerVertexFieldIndex(const TQualifier qualifier, const ImmutableString &name)
{}

// Traverser that:
//
// Inspects global qualifier declarations and extracts whether any of the gl_PerVertex built-ins
// are invariant or precise. These declarations are then dropped.
class InspectPerVertexBuiltInsTraverser : public TIntermTraverser
{};

// Traverser that:
//
// 1. Declares the input and output gl_PerVertex types and variables if not already (based on shader
//    type).
// 2. Turns built-in references into indexes into these variables.
class DeclarePerVertexBlocksTraverser : public TIntermTraverser
{};

void AddPerVertexDecl(TIntermBlock *root, const TVariable *variable)
{}
}  // anonymous namespace

bool DeclarePerVertexBlocks(TCompiler *compiler,
                            TIntermBlock *root,
                            TSymbolTable *symbolTable,
                            const TVariable **inputPerVertexOut,
                            const TVariable **outputPerVertexOut)
{}
}  // namespace sh