chromium/third_party/angle/src/compiler/translator/glsl/OutputGLSLBase.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/glsl/OutputGLSLBase.h"

#include "angle_gl.h"
#include "common/debug.h"
#include "common/mathutil.h"
#include "compiler/translator/Compiler.h"
#include "compiler/translator/util.h"

#include <cfloat>

namespace sh
{

namespace
{

bool isSingleStatement(TIntermNode *node)
{}

class CommaSeparatedListItemPrefixGenerator
{};

template <typename Stream>
Stream &operator<<(Stream &out, CommaSeparatedListItemPrefixGenerator &gen)
{}

}  // namespace

TOutputGLSLBase::TOutputGLSLBase(TCompiler *compiler,
                                 TInfoSinkBase &objSink,
                                 const ShCompileOptions &compileOptions)
    :{}

void TOutputGLSLBase::writeInvariantQualifier(const TType &type)
{}

void TOutputGLSLBase::writePreciseQualifier(const TType &type)
{}

void TOutputGLSLBase::writeFloat(TInfoSinkBase &out, float f)
{}

void TOutputGLSLBase::writeTriplet(Visit visit,
                                   const char *preStr,
                                   const char *inStr,
                                   const char *postStr)
{}

void TOutputGLSLBase::writeFunctionTriplet(Visit visit,
                                           const ImmutableString &functionName,
                                           bool useEmulatedFunction)
{}

// Outputs what goes inside layout(), except for location and binding qualifiers, as they are
// handled differently between GL GLSL and Vulkan GLSL.
std::string TOutputGLSLBase::getCommonLayoutQualifiers(TIntermSymbol *variable)
{}

// Outputs memory qualifiers applied to images, buffers and its fields, as well as image function
// arguments.
std::string TOutputGLSLBase::getMemoryQualifiers(const TType &type)
{}

void TOutputGLSLBase::writeLayoutQualifier(TIntermSymbol *variable)
{}

void TOutputGLSLBase::writeFieldLayoutQualifier(const TField *field)
{}

void TOutputGLSLBase::writeQualifier(TQualifier qualifier, const TType &type, const TSymbol *symbol)
{}

const char *TOutputGLSLBase::mapQualifierToString(TQualifier qualifier)
{}

namespace
{

constexpr char kIndent[]      =;  // 10x2 spaces
constexpr int kIndentWidth    =;
constexpr int kMaxIndentLevel =;

}  // namespace

const char *TOutputGLSLBase::getIndentPrefix(int extraIndentation)
{}

void TOutputGLSLBase::writeVariableType(const TType &type,
                                        const TSymbol *symbol,
                                        bool isFunctionArgument)
{}

void TOutputGLSLBase::writeFunctionParameters(const TFunction *func)
{}

const TConstantUnion *TOutputGLSLBase::writeConstantUnion(const TType &type,
                                                          const TConstantUnion *pConstUnion)
{}

void TOutputGLSLBase::writeConstructorTriplet(Visit visit, const TType &type)
{}

void TOutputGLSLBase::visitSymbol(TIntermSymbol *node)
{}

void TOutputGLSLBase::visitConstantUnion(TIntermConstantUnion *node)
{}

bool TOutputGLSLBase::visitSwizzle(Visit visit, TIntermSwizzle *node)
{}

bool TOutputGLSLBase::visitBinary(Visit visit, TIntermBinary *node)
{}

bool TOutputGLSLBase::visitUnary(Visit visit, TIntermUnary *node)
{}

bool TOutputGLSLBase::visitTernary(Visit visit, TIntermTernary *node)
{}

bool TOutputGLSLBase::visitIfElse(Visit visit, TIntermIfElse *node)
{}

bool TOutputGLSLBase::visitSwitch(Visit visit, TIntermSwitch *node)
{}

bool TOutputGLSLBase::visitCase(Visit visit, TIntermCase *node)
{}

bool TOutputGLSLBase::visitBlock(Visit visit, TIntermBlock *node)
{}

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

bool TOutputGLSLBase::visitGlobalQualifierDeclaration(Visit visit,
                                                      TIntermGlobalQualifierDeclaration *node)
{}

void TOutputGLSLBase::visitFunctionPrototype(TIntermFunctionPrototype *node)
{}

bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node)
{}

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

bool TOutputGLSLBase::visitLoop(Visit visit, TIntermLoop *node)
{}

bool TOutputGLSLBase::visitBranch(Visit visit, TIntermBranch *node)
{}

void TOutputGLSLBase::visitCodeBlock(TIntermBlock *node)
{}

void TOutputGLSLBase::visitPreprocessorDirective(TIntermPreprocessorDirective *node)
{}

ImmutableString TOutputGLSLBase::getTypeName(const TType &type)
{}

ImmutableString TOutputGLSLBase::hashName(const TSymbol *symbol)
{}

ImmutableString TOutputGLSLBase::hashFieldName(const TField *field)
{}

ImmutableString TOutputGLSLBase::hashFunctionNameIfNeeded(const TFunction *func)
{}

void TOutputGLSLBase::declareStruct(const TStructure *structure)
{}

void TOutputGLSLBase::declareInterfaceBlockLayout(const TType &type)
{}

const char *getVariableInterpolation(TQualifier qualifier)
{}

void TOutputGLSLBase::declareInterfaceBlock(const TType &type)
{}

void WritePragma(TInfoSinkBase &out, const ShCompileOptions &compileOptions, const TPragma &pragma)
{}

void WriteGeometryShaderLayoutQualifiers(TInfoSinkBase &out,
                                         sh::TLayoutPrimitiveType inputPrimitive,
                                         int invocations,
                                         sh::TLayoutPrimitiveType outputPrimitive,
                                         int maxVertices)
{}

void WriteTessControlShaderLayoutQualifiers(TInfoSinkBase &out, int inputVertices)
{}

void WriteTessEvaluationShaderLayoutQualifiers(TInfoSinkBase &out,
                                               sh::TLayoutTessEvaluationType inputPrimitive,
                                               sh::TLayoutTessEvaluationType inputVertexSpacing,
                                               sh::TLayoutTessEvaluationType inputOrdering,
                                               sh::TLayoutTessEvaluationType inputPoint)
{}

void WriteFragmentShaderLayoutQualifiers(TInfoSinkBase &out,
                                         const AdvancedBlendEquations &advancedBlendEquations)
{}

// If SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS is enabled, layout qualifiers are spilled whenever
// variables with specified layout qualifiers are copied. Additional checks are needed against the
// type and storage qualifier of the variable to verify that layout qualifiers have to be outputted.
// TODO (mradev): Fix layout qualifier spilling in ScalarizeVecAndMatConstructorArgs and remove
// NeedsToWriteLayoutQualifier.
bool TOutputGLSLBase::needsToWriteLayoutQualifier(const TType &type)
{}

void EmitEarlyFragmentTestsGLSL(const TCompiler &compiler, TInfoSinkBase &sink)
{}

void EmitWorkGroupSizeGLSL(const TCompiler &compiler, TInfoSinkBase &sink)
{}

void EmitMultiviewGLSL(const TCompiler &compiler,
                       const ShCompileOptions &compileOptions,
                       const TExtension extension,
                       const TBehavior behavior,
                       TInfoSinkBase &sink)
{}

}  // namespace sh