#include "compiler/translator/ParseContext.h"
#include <stdarg.h>
#include <stdio.h>
#include "common/mathutil.h"
#include "common/utilities.h"
#include "compiler/preprocessor/SourceLocation.h"
#include "compiler/translator/Declarator.h"
#include "compiler/translator/StaticType.h"
#include "compiler/translator/ValidateGlobalInitializer.h"
#include "compiler/translator/ValidateSwitch.h"
#include "compiler/translator/glslang.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/util.h"
namespace sh
{
namespace
{
const int kWebGLMaxStructNesting = …;
struct IsSamplerFunc
{ … };
struct IsOpaqueFunc
{ … };
template <typename OpaqueFunc>
bool ContainsOpaque(const TStructure *structType);
template <typename OpaqueFunc>
bool ContainsOpaque(const TType &type)
{ … }
template <typename OpaqueFunc>
bool ContainsOpaque(const TStructure *structType)
{ … }
const char *GetImageArgumentToken(TIntermTyped *imageNode)
{ … }
bool CanSetDefaultPrecisionOnType(const TPublicType &type)
{ … }
GLuint GetGeometryShaderInputArraySize(TLayoutPrimitiveType primitiveType)
{ … }
bool IsBufferOrSharedVariable(TIntermTyped *var)
{ … }
TIntermTyped *FindLValueBase(TIntermTyped *node)
{ … }
void AddAdvancedBlendEquation(gl::BlendEquationType eq, TLayoutQualifier *qualifier)
{ … }
constexpr bool IsValidWithPixelLocalStorage(TLayoutImageInternalFormat internalFormat)
{ … }
bool UsesDerivatives(TIntermAggregate *functionCall)
{ … }
}
class TParseContext::AtomicCounterBindingState
{ … };
TParseContext::TParseContext(TSymbolTable &symt,
TExtensionBehavior &ext,
sh::GLenum type,
ShShaderSpec spec,
const ShCompileOptions &options,
bool checksPrecErrors,
TDiagnostics *diagnostics,
const ShBuiltInResources &resources,
ShShaderOutput outputType)
: … { … }
TParseContext::~TParseContext() { … }
bool TParseContext::anyMultiviewExtensionAvailable()
{ … }
bool TParseContext::parseVectorFields(const TSourceLoc &line,
const ImmutableString &compString,
int vecSize,
TVector<int> *fieldOffsets)
{ … }
void TParseContext::error(const TSourceLoc &loc, const char *reason, const char *token)
{ … }
void TParseContext::error(const TSourceLoc &loc, const char *reason, const ImmutableString &token)
{ … }
void TParseContext::warning(const TSourceLoc &loc, const char *reason, const char *token)
{ … }
void TParseContext::errorIfPLSDeclared(const TSourceLoc &loc, PLSIllegalOperations op)
{ … }
void TParseContext::outOfRangeError(bool isError,
const TSourceLoc &loc,
const char *reason,
const char *token)
{ … }
void TParseContext::setTreeRoot(TIntermBlock *treeRoot)
{ … }
void TParseContext::assignError(const TSourceLoc &line,
const char *op,
const TType &left,
const TType &right)
{ … }
void TParseContext::unaryOpError(const TSourceLoc &line, const char *op, const TType &operand)
{ … }
void TParseContext::binaryOpError(const TSourceLoc &line,
const char *op,
const TType &left,
const TType &right)
{ … }
void TParseContext::checkPrecisionSpecified(const TSourceLoc &line,
TPrecision precision,
TBasicType type)
{ … }
void TParseContext::markStaticReadIfSymbol(TIntermNode *node)
{ … }
bool TParseContext::checkCanBeLValue(const TSourceLoc &line, const char *op, TIntermTyped *node)
{ … }
void TParseContext::checkIsConst(TIntermTyped *node)
{ … }
void TParseContext::checkIsScalarInteger(TIntermTyped *node, const char *token)
{ … }
bool TParseContext::checkIsAtGlobalLevel(const TSourceLoc &line, const char *token)
{ … }
bool TParseContext::checkIsNotReserved(const TSourceLoc &line, const ImmutableString &identifier)
{ … }
bool TParseContext::checkConstructorArguments(const TSourceLoc &line,
const TIntermSequence &arguments,
const TType &type)
{ … }
bool TParseContext::checkIsNonVoid(const TSourceLoc &line,
const ImmutableString &identifier,
const TBasicType &type)
{ … }
bool TParseContext::checkIsScalarBool(const TSourceLoc &line, const TIntermTyped *type)
{ … }
void TParseContext::checkIsScalarBool(const TSourceLoc &line, const TPublicType &pType)
{ … }
bool TParseContext::checkIsNotOpaqueType(const TSourceLoc &line,
const TTypeSpecifierNonArray &pType,
const char *reason)
{ … }
void TParseContext::checkDeclaratorLocationIsNotSpecified(const TSourceLoc &line,
const TPublicType &pType)
{ … }
void TParseContext::checkLocationIsNotSpecified(const TSourceLoc &location,
const TLayoutQualifier &layoutQualifier)
{ … }
void TParseContext::checkStd430IsForShaderStorageBlock(const TSourceLoc &location,
const TLayoutBlockStorage &blockStorage,
const TQualifier &qualifier)
{ … }
void TParseContext::checkOutParameterIsNotOpaqueType(const TSourceLoc &line,
TQualifier qualifier,
const TType &type)
{ … }
unsigned int TParseContext::checkIsValidArraySize(const TSourceLoc &line, TIntermTyped *expr)
{ … }
bool TParseContext::checkIsValidArrayDimension(const TSourceLoc &line,
TVector<unsigned int> *arraySizes)
{ … }
bool TParseContext::checkIsValidQualifierForArray(const TSourceLoc &line,
const TPublicType &elementQualifier)
{ … }
bool TParseContext::checkArrayElementIsNotArray(const TSourceLoc &line,
const TPublicType &elementType)
{ … }
bool TParseContext::checkArrayOfArraysInOut(const TSourceLoc &line,
const TPublicType &elementType,
const TType &arrayType)
{ … }
bool TParseContext::checkIsValidTypeAndQualifierForArray(const TSourceLoc &indexLocation,
const TPublicType &elementType)
{ … }
void TParseContext::checkNestingLevel(const TSourceLoc &line)
{ … }
void TParseContext::checkCanBeDeclaredWithoutInitializer(const TSourceLoc &line,
const ImmutableString &identifier,
TType *type)
{ … }
bool TParseContext::declareVariable(const TSourceLoc &line,
const ImmutableString &identifier,
const TType *type,
TVariable **variable)
{ … }
void TParseContext::checkIsParameterQualifierValid(
const TSourceLoc &line,
const TTypeQualifierBuilder &typeQualifierBuilder,
TType *type)
{ … }
template <size_t size>
bool TParseContext::checkCanUseOneOfExtensions(const TSourceLoc &line,
const std::array<TExtension, size> &extensions)
{ … }
template bool TParseContext::checkCanUseOneOfExtensions(
const TSourceLoc &line,
const std::array<TExtension, 1> &extensions);
template bool TParseContext::checkCanUseOneOfExtensions(
const TSourceLoc &line,
const std::array<TExtension, 2> &extensions);
template bool TParseContext::checkCanUseOneOfExtensions(
const TSourceLoc &line,
const std::array<TExtension, 3> &extensions);
bool TParseContext::checkCanUseExtension(const TSourceLoc &line, TExtension extension)
{ … }
void TParseContext::declarationQualifierErrorCheck(const sh::TQualifier qualifier,
const sh::TLayoutQualifier &layoutQualifier,
const TSourceLoc &location)
{ … }
void TParseContext::atomicCounterQualifierErrorCheck(const TPublicType &publicType,
const TSourceLoc &location)
{ … }
void TParseContext::emptyDeclarationErrorCheck(const TType &type, const TSourceLoc &location)
{ … }
void TParseContext::nonEmptyDeclarationErrorCheck(const TPublicType &publicType,
const TSourceLoc &identifierLocation)
{ … }
void TParseContext::checkBindingIsValid(const TSourceLoc &identifierLocation, const TType &type)
{ … }
void TParseContext::checkCanUseLayoutQualifier(const TSourceLoc &location)
{ … }
bool TParseContext::checkLayoutQualifierSupported(const TSourceLoc &location,
const ImmutableString &layoutQualifierName,
int versionRequired)
{ … }
bool TParseContext::checkWorkGroupSizeIsNotSpecified(const TSourceLoc &location,
const TLayoutQualifier &layoutQualifier)
{ … }
void TParseContext::checkInternalFormatIsNotSpecified(const TSourceLoc &location,
TLayoutImageInternalFormat internalFormat)
{ … }
void TParseContext::checkIndexIsNotSpecified(const TSourceLoc &location, int index)
{ … }
void TParseContext::checkBindingIsNotSpecified(const TSourceLoc &location, int binding)
{ … }
void TParseContext::checkOffsetIsNotSpecified(const TSourceLoc &location, int offset)
{ … }
void TParseContext::checkImageBindingIsValid(const TSourceLoc &location,
int binding,
int arrayTotalElementCount)
{ … }
void TParseContext::checkSamplerBindingIsValid(const TSourceLoc &location,
int binding,
int arrayTotalElementCount)
{ … }
void TParseContext::checkBlockBindingIsValid(const TSourceLoc &location,
const TQualifier &qualifier,
int binding,
int arraySize)
{ … }
void TParseContext::checkAtomicCounterBindingIsValid(const TSourceLoc &location, int binding)
{ … }
void TParseContext::checkPixelLocalStorageBindingIsValid(const TSourceLoc &location,
const TType &type)
{ … }
void TParseContext::checkUniformLocationInRange(const TSourceLoc &location,
int objectLocationCount,
const TLayoutQualifier &layoutQualifier)
{ … }
void TParseContext::checkAttributeLocationInRange(const TSourceLoc &location,
int objectLocationCount,
const TLayoutQualifier &layoutQualifier)
{ … }
void TParseContext::checkDepthIsNotSpecified(const TSourceLoc &location, TLayoutDepth depth)
{ … }
void TParseContext::checkYuvIsNotSpecified(const TSourceLoc &location, bool yuv)
{ … }
void TParseContext::checkEarlyFragmentTestsIsNotSpecified(const TSourceLoc &location,
bool earlyFragmentTests)
{ … }
void TParseContext::checkNoncoherentIsSpecified(const TSourceLoc &location, bool noncoherent)
{ … }
void TParseContext::checkNoncoherentIsNotSpecified(const TSourceLoc &location, bool noncoherent)
{ … }
void TParseContext::checkTCSOutVarIndexIsValid(TIntermBinary *binaryExpression,
const TSourceLoc &location)
{ … }
void TParseContext::functionCallRValueLValueErrorCheck(const TFunction *fnCandidate,
TIntermAggregate *fnCall)
{ … }
void TParseContext::checkInvariantVariableQualifier(bool invariant,
const TQualifier qualifier,
const TSourceLoc &invariantLocation)
{ … }
void TParseContext::checkAdvancedBlendEquationsNotSpecified(
const TSourceLoc &location,
const AdvancedBlendEquations &advancedBlendEquations,
const TQualifier &qualifier)
{ … }
bool TParseContext::isExtensionEnabled(TExtension extension) const
{ … }
void TParseContext::handleExtensionDirective(const TSourceLoc &loc,
const char *extName,
const char *behavior)
{ … }
void TParseContext::handlePragmaDirective(const TSourceLoc &loc,
const char *name,
const char *value,
bool stdgl)
{ … }
sh::WorkGroupSize TParseContext::getComputeShaderLocalSize() const
{ … }
TIntermConstantUnion *TParseContext::addScalarLiteral(const TConstantUnion *constantUnion,
const TSourceLoc &line)
{ … }
const TVariable *TParseContext::getNamedVariable(const TSourceLoc &location,
const ImmutableString &name,
const TSymbol *symbol)
{ … }
TIntermTyped *TParseContext::parseVariableIdentifier(const TSourceLoc &location,
const ImmutableString &name,
const TSymbol *symbol)
{ … }
void TParseContext::adjustRedeclaredBuiltInType(const TSourceLoc &line,
const ImmutableString &identifier,
TType *type)
{ … }
bool TParseContext::executeInitializer(const TSourceLoc &line,
const ImmutableString &identifier,
TType *type,
TIntermTyped *initializer,
TIntermBinary **initNode)
{ … }
TIntermNode *TParseContext::addConditionInitializer(const TPublicType &pType,
const ImmutableString &identifier,
TIntermTyped *initializer,
const TSourceLoc &loc)
{ … }
TIntermNode *TParseContext::addLoop(TLoopType type,
TIntermNode *init,
TIntermNode *cond,
TIntermTyped *expr,
TIntermNode *body,
const TSourceLoc &line)
{ … }
TIntermNode *TParseContext::addIfElse(TIntermTyped *cond,
TIntermNodePair code,
const TSourceLoc &loc)
{ … }
void TParseContext::addFullySpecifiedType(TPublicType *typeSpecifier)
{ … }
TPublicType TParseContext::addFullySpecifiedType(const TTypeQualifierBuilder &typeQualifierBuilder,
const TPublicType &typeSpecifier)
{ … }
void TParseContext::checkInputOutputTypeIsValidES3(const TQualifier qualifier,
const TPublicType &type,
const TSourceLoc &qualifierLocation)
{ … }
void TParseContext::checkLocalVariableConstStorageQualifier(const TQualifierWrapperBase &qualifier)
{ … }
void TParseContext::checkMemoryQualifierIsNotSpecified(const TMemoryQualifier &memoryQualifier,
const TSourceLoc &location)
{ … }
void TParseContext::checkAtomicCounterOffsetDoesNotOverlap(bool forceAppend,
const TSourceLoc &loc,
TType *type)
{ … }
void TParseContext::checkAtomicCounterOffsetAlignment(const TSourceLoc &location, const TType &type)
{ … }
void TParseContext::checkGeometryShaderInputAndSetArraySize(const TSourceLoc &location,
const ImmutableString &token,
TType *type)
{ … }
void TParseContext::checkTessellationShaderUnsizedArraysAndSetSize(const TSourceLoc &location,
const ImmutableString &token,
TType *type)
{ … }
TIntermDeclaration *TParseContext::parseSingleDeclaration(
TPublicType &publicType,
const TSourceLoc &identifierOrTypeLocation,
const ImmutableString &identifier)
{ … }
TIntermDeclaration *TParseContext::parseSingleArrayDeclaration(
TPublicType &elementType,
const TSourceLoc &identifierLocation,
const ImmutableString &identifier,
const TSourceLoc &indexLocation,
const TVector<unsigned int> &arraySizes)
{ … }
TIntermDeclaration *TParseContext::parseSingleInitDeclaration(const TPublicType &publicType,
const TSourceLoc &identifierLocation,
const ImmutableString &identifier,
const TSourceLoc &initLocation,
TIntermTyped *initializer)
{ … }
TIntermDeclaration *TParseContext::parseSingleArrayInitDeclaration(
TPublicType &elementType,
const TSourceLoc &identifierLocation,
const ImmutableString &identifier,
const TSourceLoc &indexLocation,
const TVector<unsigned int> &arraySizes,
const TSourceLoc &initLocation,
TIntermTyped *initializer)
{ … }
TIntermGlobalQualifierDeclaration *TParseContext::parseGlobalQualifierDeclaration(
const TTypeQualifierBuilder &typeQualifierBuilder,
const TSourceLoc &identifierLoc,
const ImmutableString &identifier,
const TSymbol *symbol)
{ … }
void TParseContext::parseDeclarator(TPublicType &publicType,
const TSourceLoc &identifierLocation,
const ImmutableString &identifier,
TIntermDeclaration *declarationOut)
{ … }
void TParseContext::parseArrayDeclarator(TPublicType &elementType,
const TSourceLoc &identifierLocation,
const ImmutableString &identifier,
const TSourceLoc &arrayLocation,
const TVector<unsigned int> &arraySizes,
TIntermDeclaration *declarationOut)
{ … }
void TParseContext::parseInitDeclarator(const TPublicType &publicType,
const TSourceLoc &identifierLocation,
const ImmutableString &identifier,
const TSourceLoc &initLocation,
TIntermTyped *initializer,
TIntermDeclaration *declarationOut)
{ … }
void TParseContext::parseArrayInitDeclarator(const TPublicType &elementType,
const TSourceLoc &identifierLocation,
const ImmutableString &identifier,
const TSourceLoc &indexLocation,
const TVector<unsigned int> &arraySizes,
const TSourceLoc &initLocation,
TIntermTyped *initializer,
TIntermDeclaration *declarationOut)
{ … }
TIntermNode *TParseContext::addEmptyStatement(const TSourceLoc &location)
{ … }
void TParseContext::setAtomicCounterBindingDefaultOffset(const TPublicType &publicType,
const TSourceLoc &location)
{ … }
void TParseContext::parseDefaultPrecisionQualifier(const TPrecision precision,
const TPublicType &type,
const TSourceLoc &loc)
{ … }
bool TParseContext::checkPrimitiveTypeMatchesTypeQualifier(const TTypeQualifier &typeQualifier)
{ … }
void TParseContext::setGeometryShaderInputArraySize(unsigned int inputArraySize,
const TSourceLoc &line)
{ … }
bool TParseContext::parseGeometryShaderInputLayoutQualifier(const TTypeQualifier &typeQualifier)
{ … }
bool TParseContext::parseGeometryShaderOutputLayoutQualifier(const TTypeQualifier &typeQualifier)
{ … }
bool TParseContext::parseTessControlShaderOutputLayoutQualifier(const TTypeQualifier &typeQualifier)
{ … }
bool TParseContext::parseTessEvaluationShaderInputLayoutQualifier(
const TTypeQualifier &typeQualifier)
{ … }
void TParseContext::parseGlobalLayoutQualifier(const TTypeQualifierBuilder &typeQualifierBuilder)
{ … }
TIntermFunctionPrototype *TParseContext::createPrototypeNodeFromFunction(
const TFunction &function,
const TSourceLoc &location,
bool insertParametersToSymbolTable)
{ … }
TIntermFunctionPrototype *TParseContext::addFunctionPrototypeDeclaration(
const TFunction &parsedFunction,
const TSourceLoc &location)
{ … }
TIntermFunctionDefinition *TParseContext::addFunctionDefinition(
TIntermFunctionPrototype *functionPrototype,
TIntermBlock *functionBody,
const TSourceLoc &location)
{ … }
void TParseContext::parseFunctionDefinitionHeader(const TSourceLoc &location,
const TFunction *function,
TIntermFunctionPrototype **prototypeOut)
{ … }
TFunction *TParseContext::parseFunctionDeclarator(const TSourceLoc &location, TFunction *function)
{ … }
TFunction *TParseContext::parseFunctionHeader(const TPublicType &type,
const ImmutableString &name,
const TSourceLoc &location)
{ … }
TFunctionLookup *TParseContext::addNonConstructorFunc(const ImmutableString &name,
const TSymbol *symbol)
{ … }
TFunctionLookup *TParseContext::addConstructorFunc(const TPublicType &publicType)
{ … }
void TParseContext::checkIsNotUnsizedArray(const TSourceLoc &line,
const char *errorMessage,
const ImmutableString &token,
TType *arrayType)
{ … }
TParameter TParseContext::parseParameterDeclarator(TType *type,
const ImmutableString &name,
const TSourceLoc &nameLoc)
{ … }
TParameter TParseContext::parseParameterDeclarator(const TPublicType &publicType,
const ImmutableString &name,
const TSourceLoc &nameLoc)
{ … }
TParameter TParseContext::parseParameterArrayDeclarator(const ImmutableString &name,
const TSourceLoc &nameLoc,
const TVector<unsigned int> &arraySizes,
const TSourceLoc &arrayLoc,
TPublicType *elementType)
{ … }
bool TParseContext::checkUnsizedArrayConstructorArgumentDimensionality(
const TIntermSequence &arguments,
TType type,
const TSourceLoc &line)
{ … }
TIntermTyped *TParseContext::addConstructor(TFunctionLookup *fnCall, const TSourceLoc &line)
{ … }
TIntermDeclaration *TParseContext::addInterfaceBlock(
const TTypeQualifierBuilder &typeQualifierBuilder,
const TSourceLoc &nameLine,
const ImmutableString &blockName,
TFieldList *fieldList,
const ImmutableString &instanceName,
const TSourceLoc &instanceLine,
const TVector<unsigned int> *arraySizes,
const TSourceLoc &arraySizesLine)
{ … }
void TParseContext::enterStructDeclaration(const TSourceLoc &line,
const ImmutableString &identifier)
{ … }
void TParseContext::exitStructDeclaration()
{ … }
void TParseContext::checkIsBelowStructNestingLimit(const TSourceLoc &line, const TField &field)
{ … }
TIntermTyped *TParseContext::addIndexExpression(TIntermTyped *baseExpression,
const TSourceLoc &location,
TIntermTyped *indexExpression)
{ … }
int TParseContext::checkIndexLessThan(bool outOfRangeIndexIsError,
const TSourceLoc &location,
int index,
unsigned int arraySize,
const char *reason)
{ … }
TIntermTyped *TParseContext::addFieldSelectionExpression(TIntermTyped *baseExpression,
const TSourceLoc &dotLocation,
const ImmutableString &fieldString,
const TSourceLoc &fieldLocation)
{ … }
TLayoutQualifier TParseContext::parseLayoutQualifier(const ImmutableString &qualifierType,
const TSourceLoc &qualifierTypeLine)
{ … }
void TParseContext::parseLocalSize(const ImmutableString &qualifierType,
const TSourceLoc &qualifierTypeLine,
int intValue,
const TSourceLoc &intValueLine,
const std::string &intValueString,
size_t index,
sh::WorkGroupSize *localSize)
{ … }
void TParseContext::parseNumViews(int intValue,
const TSourceLoc &intValueLine,
const std::string &intValueString,
int *numViews)
{ … }
void TParseContext::parseInvocations(int intValue,
const TSourceLoc &intValueLine,
const std::string &intValueString,
int *numInvocations)
{ … }
void TParseContext::parseMaxVertices(int intValue,
const TSourceLoc &intValueLine,
const std::string &intValueString,
int *maxVertices)
{ … }
void TParseContext::parseVertices(int intValue,
const TSourceLoc &intValueLine,
const std::string &intValueString,
int *vertices)
{ … }
void TParseContext::parseIndexLayoutQualifier(int intValue,
const TSourceLoc &intValueLine,
const std::string &intValueString,
int *index)
{ … }
TLayoutQualifier TParseContext::parseLayoutQualifier(const ImmutableString &qualifierType,
const TSourceLoc &qualifierTypeLine,
int intValue,
const TSourceLoc &intValueLine)
{ … }
TTypeQualifierBuilder *TParseContext::createTypeQualifierBuilder(const TSourceLoc &loc)
{ … }
TStorageQualifierWrapper *TParseContext::parseGlobalStorageQualifier(TQualifier qualifier,
const TSourceLoc &loc)
{ … }
TStorageQualifierWrapper *TParseContext::parseVaryingQualifier(const TSourceLoc &loc)
{ … }
TStorageQualifierWrapper *TParseContext::parseInQualifier(const TSourceLoc &loc)
{ … }
TStorageQualifierWrapper *TParseContext::parseOutQualifier(const TSourceLoc &loc)
{ … }
TStorageQualifierWrapper *TParseContext::parseInOutQualifier(const TSourceLoc &loc)
{ … }
TLayoutQualifier TParseContext::joinLayoutQualifiers(TLayoutQualifier leftQualifier,
TLayoutQualifier rightQualifier,
const TSourceLoc &rightQualifierLocation)
{ … }
TDeclarator *TParseContext::parseStructDeclarator(const ImmutableString &identifier,
const TSourceLoc &loc)
{ … }
TDeclarator *TParseContext::parseStructArrayDeclarator(const ImmutableString &identifier,
const TSourceLoc &loc,
const TVector<unsigned int> *arraySizes)
{ … }
void TParseContext::checkDoesNotHaveDuplicateFieldNames(const TFieldList *fields,
const TSourceLoc &location)
{ … }
void TParseContext::checkDoesNotHaveTooManyFields(const ImmutableString &name,
const TFieldList *fields,
const TSourceLoc &location)
{ … }
TFieldList *TParseContext::addStructFieldList(TFieldList *fields, const TSourceLoc &location)
{ … }
TFieldList *TParseContext::combineStructFieldLists(TFieldList *processedFields,
const TFieldList *newlyAddedFields,
const TSourceLoc &location)
{ … }
TFieldList *TParseContext::addStructDeclaratorListWithQualifiers(
const TTypeQualifierBuilder &typeQualifierBuilder,
TPublicType *typeSpecifier,
const TDeclaratorList *declaratorList)
{ … }
TFieldList *TParseContext::addStructDeclaratorList(const TPublicType &typeSpecifier,
const TDeclaratorList *declaratorList)
{ … }
TTypeSpecifierNonArray TParseContext::addStructure(const TSourceLoc &structLine,
const TSourceLoc &nameLine,
const ImmutableString &structName,
TFieldList *fieldList)
{ … }
TIntermSwitch *TParseContext::addSwitch(TIntermTyped *init,
TIntermBlock *statementList,
const TSourceLoc &loc)
{ … }
TIntermCase *TParseContext::addCase(TIntermTyped *condition, const TSourceLoc &loc)
{ … }
TIntermCase *TParseContext::addDefault(const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::createUnaryMath(TOperator op,
TIntermTyped *child,
const TSourceLoc &loc,
const TFunction *func)
{ … }
TIntermTyped *TParseContext::addUnaryMath(TOperator op, TIntermTyped *child, const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addUnaryMathLValue(TOperator op,
TIntermTyped *child,
const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::expressionOrFoldedResult(TIntermTyped *expression)
{ … }
bool TParseContext::binaryOpCommonCheck(TOperator op,
TIntermTyped *left,
TIntermTyped *right,
const TSourceLoc &loc)
{ … }
bool TParseContext::isMultiplicationTypeCombinationValid(TOperator op,
const TType &left,
const TType &right)
{ … }
TIntermTyped *TParseContext::addBinaryMathInternal(TOperator op,
TIntermTyped *left,
TIntermTyped *right,
const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addBinaryMath(TOperator op,
TIntermTyped *left,
TIntermTyped *right,
const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addBinaryMathBooleanResult(TOperator op,
TIntermTyped *left,
TIntermTyped *right,
const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addAssign(TOperator op,
TIntermTyped *left,
TIntermTyped *right,
const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addComma(TIntermTyped *left,
TIntermTyped *right,
const TSourceLoc &loc)
{ … }
TIntermBranch *TParseContext::addBranch(TOperator op, const TSourceLoc &loc)
{ … }
TIntermBranch *TParseContext::addBranch(TOperator op,
TIntermTyped *expression,
const TSourceLoc &loc)
{ … }
void TParseContext::appendStatement(TIntermBlock *block, TIntermNode *statement)
{ … }
void TParseContext::checkTextureGather(TIntermAggregate *functionCall)
{ … }
void TParseContext::checkTextureOffset(TIntermAggregate *functionCall)
{ … }
void TParseContext::checkSingleTextureOffset(const TSourceLoc &line,
const TConstantUnion *values,
size_t size,
int minOffsetValue,
int maxOffsetValue)
{ … }
void TParseContext::checkInterpolationFS(TIntermAggregate *functionCall)
{ … }
void TParseContext::checkAtomicMemoryBuiltinFunctions(TIntermAggregate *functionCall)
{ … }
void TParseContext::checkImageMemoryAccessForBuiltinFunctions(TIntermAggregate *functionCall)
{ … }
void TParseContext::checkImageMemoryAccessForUserDefinedFunctions(
const TFunction *functionDefinition,
const TIntermAggregate *functionCall)
{ … }
TIntermTyped *TParseContext::addFunctionCallOrMethod(TFunctionLookup *fnCall, const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addMethod(TFunctionLookup *fnCall, const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addNonConstructorFunctionCallImpl(TFunctionLookup *fnCall,
const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addNonConstructorFunctionCall(TFunctionLookup *fnCall,
const TSourceLoc &loc)
{ … }
TIntermTyped *TParseContext::addTernarySelection(TIntermTyped *cond,
TIntermTyped *trueExpression,
TIntermTyped *falseExpression,
const TSourceLoc &loc)
{ … }
int PaParseStrings(size_t count,
const char *const string[],
const int length[],
TParseContext *context)
{ … }
}