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

//
// Copyright 2010 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/util.h"

#include <limits>

#include "common/utilities.h"
#include "compiler/preprocessor/numeric_lex.h"
#include "compiler/translator/ImmutableStringBuilder.h"
#include "compiler/translator/SymbolTable.h"

bool atoi_clamp(const char *str, unsigned int *value)
{}

namespace sh
{

namespace
{
// [primarySize-1][secondarySize-1] is the GL type with a basic type of float.
constexpr GLenum kFloatGLType[4][4] =;
// [primarySize-1] is the GL type with a basic type of int.
constexpr GLenum kIntGLType[4] =;
// [primarySize-1] is the GL type with a basic type of uint.
constexpr GLenum kUIntGLType[4] =;
// [primarySize-1] is the GL type with a basic type of bool.
constexpr GLenum kBoolGLType[4] =;

bool IsInterpolationIn(TQualifier qualifier)
{}

bool IsInterpolationOut(TQualifier qualifier)
{}
}  // anonymous namespace

float NumericLexFloat32OutOfRangeToInfinity(const std::string &str)
{}

bool strtof_clamp(const std::string &str, float *value)
{}

GLenum GLVariableType(const TType &type)
{}

GLenum GLVariablePrecision(const TType &type)
{}

ImmutableString ArrayString(const TType &type)
{}

ImmutableString GetTypeName(const TType &type, ShHashFunction64 hashFunction, NameMap *nameMap)
{}

bool IsVaryingOut(TQualifier qualifier)
{}

bool IsVaryingIn(TQualifier qualifier)
{}

bool IsVarying(TQualifier qualifier)
{}

bool IsMatrixGLType(GLenum type)
{}

bool IsGeometryShaderInput(GLenum shaderType, TQualifier qualifier)
{}

bool IsTessellationControlShaderInput(GLenum shaderType, TQualifier qualifier)
{}

bool IsTessellationControlShaderOutput(GLenum shaderType, TQualifier qualifier)
{}

bool IsTessellationEvaluationShaderInput(GLenum shaderType, TQualifier qualifier)
{}

InterpolationType GetInterpolationType(TQualifier qualifier)
{}

// a field may not have qualifer without in or out.
InterpolationType GetFieldInterpolationType(TQualifier qualifier)
{}

TType GetShaderVariableBasicType(const sh::ShaderVariable &var)
{}

void DeclareGlobalVariable(TIntermBlock *root, const TVariable *variable)
{}

// GLSL ES 1.0.17 4.6.1 The Invariant Qualifier
bool CanBeInvariantESSL1(TQualifier qualifier)
{}

// GLSL ES 3.00 Revision 6, 4.6.1 The Invariant Qualifier
// GLSL ES 3.10 Revision 4, 4.8.1 The Invariant Qualifier
bool CanBeInvariantESSL3OrGreater(TQualifier qualifier)
{}

bool IsBuiltinOutputVariable(TQualifier qualifier)
{}

bool IsBuiltinFragmentInputVariable(TQualifier qualifier)
{}

bool IsShaderOutput(TQualifier qualifier)
{}

bool IsFragmentOutput(TQualifier qualifier)
{}

bool IsOutputESSL(ShShaderOutput output)
{}

bool IsOutputGLSL(ShShaderOutput output)
{}
bool IsOutputHLSL(ShShaderOutput output)
{}
bool IsOutputSPIRV(ShShaderOutput output)
{}
bool IsOutputMSL(ShShaderOutput output)
{}
bool IsOutputWGSL(ShShaderOutput output)
{}

bool IsInShaderStorageBlock(TIntermTyped *node)
{}

GLenum GetImageInternalFormatType(TLayoutImageInternalFormat iifq)
{}

bool IsSpecWithFunctionBodyNewScope(ShShaderSpec shaderSpec, int shaderVersion)
{}

ImplicitTypeConversion GetConversion(TBasicType t1, TBasicType t2)
{}

bool IsValidImplicitConversion(sh::ImplicitTypeConversion conversion, TOperator op)
{}

bool IsPrecisionApplicableToType(TBasicType type)
{}

bool IsRedeclarableBuiltIn(const ImmutableString &name)
{}

size_t FindFieldIndex(const TFieldList &fieldList, const char *fieldName)
{}

Declaration ViewDeclaration(TIntermDeclaration &declNode, uint32_t index)
{}

}  // namespace sh