Merge branch 'nonuniform-dynindex'

This commit is contained in:
John Kessenich 2018-04-05 13:53:31 -06:00
commit a89f8cf76b
31 changed files with 5887 additions and 4668 deletions

View file

@ -437,6 +437,7 @@ public:
clearInterstage();
clearMemory();
specConstant = false;
nonUniform = false;
clearLayout();
}
@ -478,6 +479,7 @@ public:
{
storage = EvqTemporary;
specConstant = false;
nonUniform = false;
}
const char* semanticName;
@ -502,6 +504,7 @@ public:
bool readonly : 1;
bool writeonly : 1;
bool specConstant : 1; // having a constant_id is not sufficient: expressions have no id, but are still specConstant
bool nonUniform : 1;
bool isMemory() const
{
@ -833,6 +836,10 @@ public:
// true front-end constant.
return specConstant;
}
bool isNonUniform() const
{
return nonUniform;
}
bool isFrontEndConstant() const
{
// True if the front-end knows the final constant value.
@ -1383,8 +1390,9 @@ public:
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
// "Image" is a superset of "Subpass"
virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); }
virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); }
virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); }
// return true if this type contains any subtype which satisfies the given predicate.
template <typename P>
@ -1689,6 +1697,8 @@ public:
appendStr(" writeonly");
if (qualifier.specConstant)
appendStr(" specialization-constant");
if (qualifier.nonUniform)
appendStr(" nonuniform");
appendStr(" ");
appendStr(getStorageQualifierString());
if (isArray()) {

View file

@ -729,6 +729,7 @@ enum TOperator {
EOpConstructF16Mat4x4,
EOpConstructStruct,
EOpConstructTextureSampler,
EOpConstructNonuniform, // expected to be transformed away, not present in final AST
EOpConstructGuardEnd,
//

View file

@ -158,6 +158,11 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
if (specConstantPropagates(*node->getLeft(), *node->getRight()) && isSpecializationOperation(*node))
node->getWritableType().getQualifier().makeSpecConstant();
// If must propagate nonuniform, make a nonuniform.
if ((node->getLeft()->getQualifier().nonUniform || node->getRight()->getQualifier().nonUniform) &&
isNonuniformPropagating(node->getOp()))
node->getWritableType().getQualifier().nonUniform = true;
return node;
}
@ -366,6 +371,10 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo
if (node->getOperand()->getType().getQualifier().isSpecConstant() && isSpecializationOperation(*node))
node->getWritableType().getQualifier().makeSpecConstant();
// If must propagate nonuniform, make a nonuniform.
if (node->getOperand()->getQualifier().nonUniform && isNonuniformPropagating(node->getOp()))
node->getWritableType().getQualifier().nonUniform = true;
return node;
}
@ -1748,6 +1757,9 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
{
TOperator op = EOpNull;
if (type.getQualifier().nonUniform)
return EOpConstructNonuniform;
switch (type.getBasicType()) {
case EbtStruct:
op = EOpConstructStruct;
@ -2800,6 +2812,64 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const
}
}
// Is the operation one that must propagate nonuniform?
bool TIntermediate::isNonuniformPropagating(TOperator op) const
{
// "* All Operators in Section 5.1 (Operators), except for assignment,
// arithmetic assignment, and sequence
// * Component selection in Section 5.5
// * Matrix components in Section 5.6
// * Structure and Array Operations in Section 5.7, except for the length
// method."
switch (op) {
case EOpPostIncrement:
case EOpPostDecrement:
case EOpPreIncrement:
case EOpPreDecrement:
case EOpNegative:
case EOpLogicalNot:
case EOpVectorLogicalNot:
case EOpBitwiseNot:
case EOpAdd:
case EOpSub:
case EOpMul:
case EOpDiv:
case EOpMod:
case EOpRightShift:
case EOpLeftShift:
case EOpAnd:
case EOpInclusiveOr:
case EOpExclusiveOr:
case EOpEqual:
case EOpNotEqual:
case EOpLessThan:
case EOpGreaterThan:
case EOpLessThanEqual:
case EOpGreaterThanEqual:
case EOpVectorTimesScalar:
case EOpVectorTimesMatrix:
case EOpMatrixTimesVector:
case EOpMatrixTimesScalar:
case EOpLogicalOr:
case EOpLogicalXor:
case EOpLogicalAnd:
case EOpIndexDirect:
case EOpIndexIndirect:
case EOpIndexDirectStruct:
case EOpVectorSwizzle:
return true;
default:
break;
}
return false;
}
////////////////////////////////////////////////////////////////
//
// Member functions of the nodes used for building the tree.

View file

@ -381,6 +381,8 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
if (index->getQualifier().isFrontEndConstant()) {
if (base->getType().isUnsizedArray())
base->getWritableType().updateImplicitArraySize(indexValue + 1);
else
checkIndex(loc, base->getType(), indexValue);
result = intermediate.addIndex(EOpIndexDirect, base, index, loc);
} else {
if (base->getType().isUnsizedArray()) {
@ -390,8 +392,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
error(loc, "", "[", "array must be sized by a redeclaration or layout qualifier before being indexed with a variable");
else {
// it is okay for a run-time sized array
if (!isRuntimeSizable(*base))
error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable");
checkRuntimeSizable(loc, *base);
}
base->getWritableType().setArrayVariablyIndexed();
}
@ -434,6 +435,10 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
}
result->setType(newType);
// Propagate nonuniform
if (base->getQualifier().isNonUniform() || index->getQualifier().isNonUniform())
result->getWritableType().getQualifier().nonUniform = true;
if (anyIndexLimits)
handleIndexLimits(loc, base, index);
}
@ -742,6 +747,10 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
if (base->getQualifier().noContraction)
result->getWritableType().getQualifier().noContraction = true;
// Propagate nonuniform
if (base->getQualifier().isNonUniform())
result->getWritableType().getQualifier().nonUniform = true;
return result;
}
@ -2622,6 +2631,10 @@ void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType)
{
globalQualifierFixCheck(publicType.loc, publicType.qualifier);
checkNoShaderLayouts(publicType.loc, publicType.shaderQualifiers);
if (publicType.qualifier.isNonUniform()) {
error(publicType.loc, "not allowed on block or structure members", "nonuniformEXT", "");
publicType.qualifier.nonUniform = false;
}
}
//
@ -2629,12 +2642,15 @@ void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType)
//
void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier)
{
bool nonuniformOkay = false;
// move from parameter/unknown qualifiers to pipeline in/out qualifiers
switch (qualifier.storage) {
case EvqIn:
profileRequires(loc, ENoProfile, 130, nullptr, "in for stage inputs");
profileRequires(loc, EEsProfile, 300, nullptr, "in for stage inputs");
qualifier.storage = EvqVaryingIn;
nonuniformOkay = true;
break;
case EvqOut:
profileRequires(loc, ENoProfile, 130, nullptr, "out for stage outputs");
@ -2645,10 +2661,17 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
qualifier.storage = EvqVaryingIn;
error(loc, "cannot use 'inout' at global scope", "", "");
break;
case EvqGlobal:
case EvqTemporary:
nonuniformOkay = true;
break;
default:
break;
}
if (!nonuniformOkay && qualifier.nonUniform)
error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", "");
invariantCheck(loc, qualifier);
}
@ -2897,6 +2920,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
MERGE_SINGLETON(readonly);
MERGE_SINGLETON(writeonly);
MERGE_SINGLETON(specConstant);
MERGE_SINGLETON(nonUniform);
if (repeated)
error(loc, "replicated qualifiers", "", "");
@ -3268,11 +3292,25 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie
checkIoArraysConsistency(loc);
}
// Policy decision for whether a node could potentially be sized at runtime.
bool TParseContext::isRuntimeSizable(const TIntermTyped& base) const
// Policy and error check for needing a runtime sized array.
void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermTyped& base)
{
const TType& type = base.getType();
if (type.getQualifier().storage == EvqBuffer) {
// runtime length implies runtime sizeable, so no problem
if (isRuntimeLength(base))
return;
// check for additional things allowed by GL_EXT_nonuniform_qualifier
if (base.getBasicType() == EbtSampler ||
(base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
else
error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable");
}
// Policy decision for whether a run-time .length() is allowed.
bool TParseContext::isRuntimeLength(const TIntermTyped& base) const
{
if (base.getType().getQualifier().storage == EvqBuffer) {
// in a buffer block
const TIntermBinary* binary = base.getAsBinaryNode();
if (binary != nullptr && binary->getOp() == EOpIndexDirectStruct) {
@ -3287,12 +3325,6 @@ bool TParseContext::isRuntimeSizable(const TIntermTyped& base) const
return false;
}
// Policy decision for whether a run-time .length() is allowed.
bool TParseContext::isRuntimeLength(const TIntermTyped& base) const
{
return isRuntimeSizable(base);
}
// Returns true if the first argument to the #line directive is the line number for the next line.
//
// Desktop, pre-version 3.30: "After processing this directive
@ -3703,6 +3735,8 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali
else
warn(loc, "qualifier has no effect on non-output parameters", "precise", "");
}
if (qualifier.isNonUniform())
type.getQualifier().nonUniform = qualifier.nonUniform;
paramCheckFixStorage(loc, qualifier.storage, type);
}
@ -4680,11 +4714,16 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
if (type.getBasicType() == EbtSampler) {
int lastBinding = qualifier.layoutBinding;
if (type.isArray()) {
if (type.isSizedArray())
lastBinding += type.getCumulativeArraySize();
else {
if (spvVersion.vulkan > 0)
lastBinding += 1;
warn(loc, "assuming array size of one for compile-time checking of binding numbers for unsized array", "[]", "");
else {
if (type.isSizedArray())
lastBinding += type.getCumulativeArraySize();
else {
lastBinding += 1;
if (spvVersion.vulkan == 0)
warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", "");
}
}
}
if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits)
@ -5852,6 +5891,11 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
basicOp = EOpConstructBool;
break;
case EOpConstructNonuniform:
node->getWritableType().getQualifier().nonUniform = true;
return node;
break;
default:
error(loc, "unsupported construction", "", "");

View file

@ -427,7 +427,7 @@ protected:
TVariable* makeInternalVariable(const char* name, const TType&) const;
TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&);
void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&);
bool isRuntimeSizable(const TIntermTyped&) const;
void checkRuntimeSizable(const TSourceLoc&, const TIntermTyped&);
bool isRuntimeLength(const TIntermTyped&) const;
TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable);
TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer);

View file

@ -341,6 +341,7 @@ void TScanContext::fillInKeywordMap()
(*KeywordMap)["const"] = CONST;
(*KeywordMap)["uniform"] = UNIFORM;
(*KeywordMap)["nonuniformEXT"] = NONUNIFORM;
(*KeywordMap)["in"] = IN;
(*KeywordMap)["out"] = OUT;
(*KeywordMap)["inout"] = INOUT;
@ -873,6 +874,12 @@ int TScanContext::tokenizeIdentifier()
case CASE:
return keyword;
case NONUNIFORM:
if (parseContext.extensionTurnedOn(E_GL_EXT_nonuniform_qualifier))
return keyword;
else
return identifierOrType();
case SWITCH:
case DEFAULT:
if ((parseContext.profile == EEsProfile && parseContext.version < 300) ||

View file

@ -199,6 +199,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_shader_image_load_formatted] = EBhDisable;
extensionBehavior[E_GL_EXT_post_depth_coverage] = EBhDisable;
extensionBehavior[E_GL_EXT_control_flow_attributes] = EBhDisable;
extensionBehavior[E_GL_EXT_nonuniform_qualifier] = EBhDisable;
// #line and #include
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
@ -360,6 +361,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_shader_image_load_formatted 1\n"
"#define GL_EXT_post_depth_coverage 1\n"
"#define GL_EXT_control_flow_attributes 1\n"
"#define GL_EXT_nonuniform_qualifier 1\n"
// GL_KHR_shader_subgroup
"#define GL_KHR_shader_subgroup_basic 1\n"

View file

@ -157,6 +157,7 @@ const char* const E_GL_EXT_device_group = "GL_EXT_device_group";
const char* const E_GL_EXT_multiview = "GL_EXT_multiview";
const char* const E_GL_EXT_post_depth_coverage = "GL_EXT_post_depth_coverage";
const char* const E_GL_EXT_control_flow_attributes = "GL_EXT_control_flow_attributes";
const char* const E_GL_EXT_nonuniform_qualifier = "GL_EXT_nonuniform_qualifier";
// Arrays of extensions for the above viewportEXTs duplications

View file

@ -140,7 +140,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
%token <lex> U8VEC2 U8VEC3 U8VEC4
%token <lex> VEC2 VEC3 VEC4
%token <lex> MAT2 MAT3 MAT4 CENTROID IN OUT INOUT
%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED
%token <lex> UNIFORM PATCH SAMPLE BUFFER SHARED NONUNIFORM
%token <lex> COHERENT VOLATILE RESTRICT READONLY WRITEONLY
%token <lex> DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4
%token <lex> F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4
@ -268,6 +268,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
%type <interm> array_specifier
%type <interm.type> precise_qualifier invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier
%type <interm.type> layout_qualifier layout_qualifier_id_list layout_qualifier_id
%type <interm.type> non_uniform_qualifier
%type <interm.type> type_qualifier fully_specified_type type_specifier
%type <interm.type> single_type_qualifier
@ -473,6 +474,11 @@ function_identifier
$$.function = new TFunction(&empty, TType(EbtVoid), EOpNull);
}
}
| non_uniform_qualifier {
// Constructor
$$.intermNode = 0;
$$.function = parseContext.handleConstructorCall($1.loc, $1);
}
;
unary_expression
@ -1217,6 +1223,9 @@ single_type_qualifier
// allow inheritance of storage qualifier from block declaration
$$ = $1;
}
| non_uniform_qualifier {
$$ = $1;
}
;
storage_qualifier
@ -1337,6 +1346,13 @@ storage_qualifier
}
;
non_uniform_qualifier
: NONUNIFORM {
$$.init($1.loc);
$$.qualifier.nonUniform = true;
}
;
type_name_list
: IDENTIFIER {
// TODO

File diff suppressed because it is too large Load diff

View file

@ -124,314 +124,315 @@ extern int yydebug;
SAMPLE = 334,
BUFFER = 335,
SHARED = 336,
COHERENT = 337,
VOLATILE = 338,
RESTRICT = 339,
READONLY = 340,
WRITEONLY = 341,
DVEC2 = 342,
DVEC3 = 343,
DVEC4 = 344,
DMAT2 = 345,
DMAT3 = 346,
DMAT4 = 347,
F16VEC2 = 348,
F16VEC3 = 349,
F16VEC4 = 350,
F16MAT2 = 351,
F16MAT3 = 352,
F16MAT4 = 353,
F32VEC2 = 354,
F32VEC3 = 355,
F32VEC4 = 356,
F32MAT2 = 357,
F32MAT3 = 358,
F32MAT4 = 359,
F64VEC2 = 360,
F64VEC3 = 361,
F64VEC4 = 362,
F64MAT2 = 363,
F64MAT3 = 364,
F64MAT4 = 365,
NOPERSPECTIVE = 366,
FLAT = 367,
SMOOTH = 368,
LAYOUT = 369,
__EXPLICITINTERPAMD = 370,
MAT2X2 = 371,
MAT2X3 = 372,
MAT2X4 = 373,
MAT3X2 = 374,
MAT3X3 = 375,
MAT3X4 = 376,
MAT4X2 = 377,
MAT4X3 = 378,
MAT4X4 = 379,
DMAT2X2 = 380,
DMAT2X3 = 381,
DMAT2X4 = 382,
DMAT3X2 = 383,
DMAT3X3 = 384,
DMAT3X4 = 385,
DMAT4X2 = 386,
DMAT4X3 = 387,
DMAT4X4 = 388,
F16MAT2X2 = 389,
F16MAT2X3 = 390,
F16MAT2X4 = 391,
F16MAT3X2 = 392,
F16MAT3X3 = 393,
F16MAT3X4 = 394,
F16MAT4X2 = 395,
F16MAT4X3 = 396,
F16MAT4X4 = 397,
F32MAT2X2 = 398,
F32MAT2X3 = 399,
F32MAT2X4 = 400,
F32MAT3X2 = 401,
F32MAT3X3 = 402,
F32MAT3X4 = 403,
F32MAT4X2 = 404,
F32MAT4X3 = 405,
F32MAT4X4 = 406,
F64MAT2X2 = 407,
F64MAT2X3 = 408,
F64MAT2X4 = 409,
F64MAT3X2 = 410,
F64MAT3X3 = 411,
F64MAT3X4 = 412,
F64MAT4X2 = 413,
F64MAT4X3 = 414,
F64MAT4X4 = 415,
ATOMIC_UINT = 416,
SAMPLER1D = 417,
SAMPLER2D = 418,
SAMPLER3D = 419,
SAMPLERCUBE = 420,
SAMPLER1DSHADOW = 421,
SAMPLER2DSHADOW = 422,
SAMPLERCUBESHADOW = 423,
SAMPLER1DARRAY = 424,
SAMPLER2DARRAY = 425,
SAMPLER1DARRAYSHADOW = 426,
SAMPLER2DARRAYSHADOW = 427,
ISAMPLER1D = 428,
ISAMPLER2D = 429,
ISAMPLER3D = 430,
ISAMPLERCUBE = 431,
ISAMPLER1DARRAY = 432,
ISAMPLER2DARRAY = 433,
USAMPLER1D = 434,
USAMPLER2D = 435,
USAMPLER3D = 436,
USAMPLERCUBE = 437,
USAMPLER1DARRAY = 438,
USAMPLER2DARRAY = 439,
SAMPLER2DRECT = 440,
SAMPLER2DRECTSHADOW = 441,
ISAMPLER2DRECT = 442,
USAMPLER2DRECT = 443,
SAMPLERBUFFER = 444,
ISAMPLERBUFFER = 445,
USAMPLERBUFFER = 446,
SAMPLERCUBEARRAY = 447,
SAMPLERCUBEARRAYSHADOW = 448,
ISAMPLERCUBEARRAY = 449,
USAMPLERCUBEARRAY = 450,
SAMPLER2DMS = 451,
ISAMPLER2DMS = 452,
USAMPLER2DMS = 453,
SAMPLER2DMSARRAY = 454,
ISAMPLER2DMSARRAY = 455,
USAMPLER2DMSARRAY = 456,
SAMPLEREXTERNALOES = 457,
F16SAMPLER1D = 458,
F16SAMPLER2D = 459,
F16SAMPLER3D = 460,
F16SAMPLER2DRECT = 461,
F16SAMPLERCUBE = 462,
F16SAMPLER1DARRAY = 463,
F16SAMPLER2DARRAY = 464,
F16SAMPLERCUBEARRAY = 465,
F16SAMPLERBUFFER = 466,
F16SAMPLER2DMS = 467,
F16SAMPLER2DMSARRAY = 468,
F16SAMPLER1DSHADOW = 469,
F16SAMPLER2DSHADOW = 470,
F16SAMPLER1DARRAYSHADOW = 471,
F16SAMPLER2DARRAYSHADOW = 472,
F16SAMPLER2DRECTSHADOW = 473,
F16SAMPLERCUBESHADOW = 474,
F16SAMPLERCUBEARRAYSHADOW = 475,
SAMPLER = 476,
SAMPLERSHADOW = 477,
TEXTURE1D = 478,
TEXTURE2D = 479,
TEXTURE3D = 480,
TEXTURECUBE = 481,
TEXTURE1DARRAY = 482,
TEXTURE2DARRAY = 483,
ITEXTURE1D = 484,
ITEXTURE2D = 485,
ITEXTURE3D = 486,
ITEXTURECUBE = 487,
ITEXTURE1DARRAY = 488,
ITEXTURE2DARRAY = 489,
UTEXTURE1D = 490,
UTEXTURE2D = 491,
UTEXTURE3D = 492,
UTEXTURECUBE = 493,
UTEXTURE1DARRAY = 494,
UTEXTURE2DARRAY = 495,
TEXTURE2DRECT = 496,
ITEXTURE2DRECT = 497,
UTEXTURE2DRECT = 498,
TEXTUREBUFFER = 499,
ITEXTUREBUFFER = 500,
UTEXTUREBUFFER = 501,
TEXTURECUBEARRAY = 502,
ITEXTURECUBEARRAY = 503,
UTEXTURECUBEARRAY = 504,
TEXTURE2DMS = 505,
ITEXTURE2DMS = 506,
UTEXTURE2DMS = 507,
TEXTURE2DMSARRAY = 508,
ITEXTURE2DMSARRAY = 509,
UTEXTURE2DMSARRAY = 510,
F16TEXTURE1D = 511,
F16TEXTURE2D = 512,
F16TEXTURE3D = 513,
F16TEXTURE2DRECT = 514,
F16TEXTURECUBE = 515,
F16TEXTURE1DARRAY = 516,
F16TEXTURE2DARRAY = 517,
F16TEXTURECUBEARRAY = 518,
F16TEXTUREBUFFER = 519,
F16TEXTURE2DMS = 520,
F16TEXTURE2DMSARRAY = 521,
SUBPASSINPUT = 522,
SUBPASSINPUTMS = 523,
ISUBPASSINPUT = 524,
ISUBPASSINPUTMS = 525,
USUBPASSINPUT = 526,
USUBPASSINPUTMS = 527,
F16SUBPASSINPUT = 528,
F16SUBPASSINPUTMS = 529,
IMAGE1D = 530,
IIMAGE1D = 531,
UIMAGE1D = 532,
IMAGE2D = 533,
IIMAGE2D = 534,
UIMAGE2D = 535,
IMAGE3D = 536,
IIMAGE3D = 537,
UIMAGE3D = 538,
IMAGE2DRECT = 539,
IIMAGE2DRECT = 540,
UIMAGE2DRECT = 541,
IMAGECUBE = 542,
IIMAGECUBE = 543,
UIMAGECUBE = 544,
IMAGEBUFFER = 545,
IIMAGEBUFFER = 546,
UIMAGEBUFFER = 547,
IMAGE1DARRAY = 548,
IIMAGE1DARRAY = 549,
UIMAGE1DARRAY = 550,
IMAGE2DARRAY = 551,
IIMAGE2DARRAY = 552,
UIMAGE2DARRAY = 553,
IMAGECUBEARRAY = 554,
IIMAGECUBEARRAY = 555,
UIMAGECUBEARRAY = 556,
IMAGE2DMS = 557,
IIMAGE2DMS = 558,
UIMAGE2DMS = 559,
IMAGE2DMSARRAY = 560,
IIMAGE2DMSARRAY = 561,
UIMAGE2DMSARRAY = 562,
F16IMAGE1D = 563,
F16IMAGE2D = 564,
F16IMAGE3D = 565,
F16IMAGE2DRECT = 566,
F16IMAGECUBE = 567,
F16IMAGE1DARRAY = 568,
F16IMAGE2DARRAY = 569,
F16IMAGECUBEARRAY = 570,
F16IMAGEBUFFER = 571,
F16IMAGE2DMS = 572,
F16IMAGE2DMSARRAY = 573,
STRUCT = 574,
VOID = 575,
WHILE = 576,
IDENTIFIER = 577,
TYPE_NAME = 578,
FLOATCONSTANT = 579,
DOUBLECONSTANT = 580,
INT16CONSTANT = 581,
UINT16CONSTANT = 582,
INT32CONSTANT = 583,
UINT32CONSTANT = 584,
INTCONSTANT = 585,
UINTCONSTANT = 586,
INT64CONSTANT = 587,
UINT64CONSTANT = 588,
BOOLCONSTANT = 589,
FLOAT16CONSTANT = 590,
LEFT_OP = 591,
RIGHT_OP = 592,
INC_OP = 593,
DEC_OP = 594,
LE_OP = 595,
GE_OP = 596,
EQ_OP = 597,
NE_OP = 598,
AND_OP = 599,
OR_OP = 600,
XOR_OP = 601,
MUL_ASSIGN = 602,
DIV_ASSIGN = 603,
ADD_ASSIGN = 604,
MOD_ASSIGN = 605,
LEFT_ASSIGN = 606,
RIGHT_ASSIGN = 607,
AND_ASSIGN = 608,
XOR_ASSIGN = 609,
OR_ASSIGN = 610,
SUB_ASSIGN = 611,
LEFT_PAREN = 612,
RIGHT_PAREN = 613,
LEFT_BRACKET = 614,
RIGHT_BRACKET = 615,
LEFT_BRACE = 616,
RIGHT_BRACE = 617,
DOT = 618,
COMMA = 619,
COLON = 620,
EQUAL = 621,
SEMICOLON = 622,
BANG = 623,
DASH = 624,
TILDE = 625,
PLUS = 626,
STAR = 627,
SLASH = 628,
PERCENT = 629,
LEFT_ANGLE = 630,
RIGHT_ANGLE = 631,
VERTICAL_BAR = 632,
CARET = 633,
AMPERSAND = 634,
QUESTION = 635,
INVARIANT = 636,
PRECISE = 637,
HIGH_PRECISION = 638,
MEDIUM_PRECISION = 639,
LOW_PRECISION = 640,
PRECISION = 641,
PACKED = 642,
RESOURCE = 643,
SUPERP = 644
NONUNIFORM = 337,
COHERENT = 338,
VOLATILE = 339,
RESTRICT = 340,
READONLY = 341,
WRITEONLY = 342,
DVEC2 = 343,
DVEC3 = 344,
DVEC4 = 345,
DMAT2 = 346,
DMAT3 = 347,
DMAT4 = 348,
F16VEC2 = 349,
F16VEC3 = 350,
F16VEC4 = 351,
F16MAT2 = 352,
F16MAT3 = 353,
F16MAT4 = 354,
F32VEC2 = 355,
F32VEC3 = 356,
F32VEC4 = 357,
F32MAT2 = 358,
F32MAT3 = 359,
F32MAT4 = 360,
F64VEC2 = 361,
F64VEC3 = 362,
F64VEC4 = 363,
F64MAT2 = 364,
F64MAT3 = 365,
F64MAT4 = 366,
NOPERSPECTIVE = 367,
FLAT = 368,
SMOOTH = 369,
LAYOUT = 370,
__EXPLICITINTERPAMD = 371,
MAT2X2 = 372,
MAT2X3 = 373,
MAT2X4 = 374,
MAT3X2 = 375,
MAT3X3 = 376,
MAT3X4 = 377,
MAT4X2 = 378,
MAT4X3 = 379,
MAT4X4 = 380,
DMAT2X2 = 381,
DMAT2X3 = 382,
DMAT2X4 = 383,
DMAT3X2 = 384,
DMAT3X3 = 385,
DMAT3X4 = 386,
DMAT4X2 = 387,
DMAT4X3 = 388,
DMAT4X4 = 389,
F16MAT2X2 = 390,
F16MAT2X3 = 391,
F16MAT2X4 = 392,
F16MAT3X2 = 393,
F16MAT3X3 = 394,
F16MAT3X4 = 395,
F16MAT4X2 = 396,
F16MAT4X3 = 397,
F16MAT4X4 = 398,
F32MAT2X2 = 399,
F32MAT2X3 = 400,
F32MAT2X4 = 401,
F32MAT3X2 = 402,
F32MAT3X3 = 403,
F32MAT3X4 = 404,
F32MAT4X2 = 405,
F32MAT4X3 = 406,
F32MAT4X4 = 407,
F64MAT2X2 = 408,
F64MAT2X3 = 409,
F64MAT2X4 = 410,
F64MAT3X2 = 411,
F64MAT3X3 = 412,
F64MAT3X4 = 413,
F64MAT4X2 = 414,
F64MAT4X3 = 415,
F64MAT4X4 = 416,
ATOMIC_UINT = 417,
SAMPLER1D = 418,
SAMPLER2D = 419,
SAMPLER3D = 420,
SAMPLERCUBE = 421,
SAMPLER1DSHADOW = 422,
SAMPLER2DSHADOW = 423,
SAMPLERCUBESHADOW = 424,
SAMPLER1DARRAY = 425,
SAMPLER2DARRAY = 426,
SAMPLER1DARRAYSHADOW = 427,
SAMPLER2DARRAYSHADOW = 428,
ISAMPLER1D = 429,
ISAMPLER2D = 430,
ISAMPLER3D = 431,
ISAMPLERCUBE = 432,
ISAMPLER1DARRAY = 433,
ISAMPLER2DARRAY = 434,
USAMPLER1D = 435,
USAMPLER2D = 436,
USAMPLER3D = 437,
USAMPLERCUBE = 438,
USAMPLER1DARRAY = 439,
USAMPLER2DARRAY = 440,
SAMPLER2DRECT = 441,
SAMPLER2DRECTSHADOW = 442,
ISAMPLER2DRECT = 443,
USAMPLER2DRECT = 444,
SAMPLERBUFFER = 445,
ISAMPLERBUFFER = 446,
USAMPLERBUFFER = 447,
SAMPLERCUBEARRAY = 448,
SAMPLERCUBEARRAYSHADOW = 449,
ISAMPLERCUBEARRAY = 450,
USAMPLERCUBEARRAY = 451,
SAMPLER2DMS = 452,
ISAMPLER2DMS = 453,
USAMPLER2DMS = 454,
SAMPLER2DMSARRAY = 455,
ISAMPLER2DMSARRAY = 456,
USAMPLER2DMSARRAY = 457,
SAMPLEREXTERNALOES = 458,
F16SAMPLER1D = 459,
F16SAMPLER2D = 460,
F16SAMPLER3D = 461,
F16SAMPLER2DRECT = 462,
F16SAMPLERCUBE = 463,
F16SAMPLER1DARRAY = 464,
F16SAMPLER2DARRAY = 465,
F16SAMPLERCUBEARRAY = 466,
F16SAMPLERBUFFER = 467,
F16SAMPLER2DMS = 468,
F16SAMPLER2DMSARRAY = 469,
F16SAMPLER1DSHADOW = 470,
F16SAMPLER2DSHADOW = 471,
F16SAMPLER1DARRAYSHADOW = 472,
F16SAMPLER2DARRAYSHADOW = 473,
F16SAMPLER2DRECTSHADOW = 474,
F16SAMPLERCUBESHADOW = 475,
F16SAMPLERCUBEARRAYSHADOW = 476,
SAMPLER = 477,
SAMPLERSHADOW = 478,
TEXTURE1D = 479,
TEXTURE2D = 480,
TEXTURE3D = 481,
TEXTURECUBE = 482,
TEXTURE1DARRAY = 483,
TEXTURE2DARRAY = 484,
ITEXTURE1D = 485,
ITEXTURE2D = 486,
ITEXTURE3D = 487,
ITEXTURECUBE = 488,
ITEXTURE1DARRAY = 489,
ITEXTURE2DARRAY = 490,
UTEXTURE1D = 491,
UTEXTURE2D = 492,
UTEXTURE3D = 493,
UTEXTURECUBE = 494,
UTEXTURE1DARRAY = 495,
UTEXTURE2DARRAY = 496,
TEXTURE2DRECT = 497,
ITEXTURE2DRECT = 498,
UTEXTURE2DRECT = 499,
TEXTUREBUFFER = 500,
ITEXTUREBUFFER = 501,
UTEXTUREBUFFER = 502,
TEXTURECUBEARRAY = 503,
ITEXTURECUBEARRAY = 504,
UTEXTURECUBEARRAY = 505,
TEXTURE2DMS = 506,
ITEXTURE2DMS = 507,
UTEXTURE2DMS = 508,
TEXTURE2DMSARRAY = 509,
ITEXTURE2DMSARRAY = 510,
UTEXTURE2DMSARRAY = 511,
F16TEXTURE1D = 512,
F16TEXTURE2D = 513,
F16TEXTURE3D = 514,
F16TEXTURE2DRECT = 515,
F16TEXTURECUBE = 516,
F16TEXTURE1DARRAY = 517,
F16TEXTURE2DARRAY = 518,
F16TEXTURECUBEARRAY = 519,
F16TEXTUREBUFFER = 520,
F16TEXTURE2DMS = 521,
F16TEXTURE2DMSARRAY = 522,
SUBPASSINPUT = 523,
SUBPASSINPUTMS = 524,
ISUBPASSINPUT = 525,
ISUBPASSINPUTMS = 526,
USUBPASSINPUT = 527,
USUBPASSINPUTMS = 528,
F16SUBPASSINPUT = 529,
F16SUBPASSINPUTMS = 530,
IMAGE1D = 531,
IIMAGE1D = 532,
UIMAGE1D = 533,
IMAGE2D = 534,
IIMAGE2D = 535,
UIMAGE2D = 536,
IMAGE3D = 537,
IIMAGE3D = 538,
UIMAGE3D = 539,
IMAGE2DRECT = 540,
IIMAGE2DRECT = 541,
UIMAGE2DRECT = 542,
IMAGECUBE = 543,
IIMAGECUBE = 544,
UIMAGECUBE = 545,
IMAGEBUFFER = 546,
IIMAGEBUFFER = 547,
UIMAGEBUFFER = 548,
IMAGE1DARRAY = 549,
IIMAGE1DARRAY = 550,
UIMAGE1DARRAY = 551,
IMAGE2DARRAY = 552,
IIMAGE2DARRAY = 553,
UIMAGE2DARRAY = 554,
IMAGECUBEARRAY = 555,
IIMAGECUBEARRAY = 556,
UIMAGECUBEARRAY = 557,
IMAGE2DMS = 558,
IIMAGE2DMS = 559,
UIMAGE2DMS = 560,
IMAGE2DMSARRAY = 561,
IIMAGE2DMSARRAY = 562,
UIMAGE2DMSARRAY = 563,
F16IMAGE1D = 564,
F16IMAGE2D = 565,
F16IMAGE3D = 566,
F16IMAGE2DRECT = 567,
F16IMAGECUBE = 568,
F16IMAGE1DARRAY = 569,
F16IMAGE2DARRAY = 570,
F16IMAGECUBEARRAY = 571,
F16IMAGEBUFFER = 572,
F16IMAGE2DMS = 573,
F16IMAGE2DMSARRAY = 574,
STRUCT = 575,
VOID = 576,
WHILE = 577,
IDENTIFIER = 578,
TYPE_NAME = 579,
FLOATCONSTANT = 580,
DOUBLECONSTANT = 581,
INT16CONSTANT = 582,
UINT16CONSTANT = 583,
INT32CONSTANT = 584,
UINT32CONSTANT = 585,
INTCONSTANT = 586,
UINTCONSTANT = 587,
INT64CONSTANT = 588,
UINT64CONSTANT = 589,
BOOLCONSTANT = 590,
FLOAT16CONSTANT = 591,
LEFT_OP = 592,
RIGHT_OP = 593,
INC_OP = 594,
DEC_OP = 595,
LE_OP = 596,
GE_OP = 597,
EQ_OP = 598,
NE_OP = 599,
AND_OP = 600,
OR_OP = 601,
XOR_OP = 602,
MUL_ASSIGN = 603,
DIV_ASSIGN = 604,
ADD_ASSIGN = 605,
MOD_ASSIGN = 606,
LEFT_ASSIGN = 607,
RIGHT_ASSIGN = 608,
AND_ASSIGN = 609,
XOR_ASSIGN = 610,
OR_ASSIGN = 611,
SUB_ASSIGN = 612,
LEFT_PAREN = 613,
RIGHT_PAREN = 614,
LEFT_BRACKET = 615,
RIGHT_BRACKET = 616,
LEFT_BRACE = 617,
RIGHT_BRACE = 618,
DOT = 619,
COMMA = 620,
COLON = 621,
EQUAL = 622,
SEMICOLON = 623,
BANG = 624,
DASH = 625,
TILDE = 626,
PLUS = 627,
STAR = 628,
SLASH = 629,
PERCENT = 630,
LEFT_ANGLE = 631,
RIGHT_ANGLE = 632,
VERTICAL_BAR = 633,
CARET = 634,
AMPERSAND = 635,
QUESTION = 636,
INVARIANT = 637,
PRECISE = 638,
HIGH_PRECISION = 639,
MEDIUM_PRECISION = 640,
LOW_PRECISION = 641,
PRECISION = 642,
PACKED = 643,
RESOURCE = 644,
SUPERP = 645
};
#endif
@ -475,7 +476,7 @@ union YYSTYPE
};
} interm;
#line 479 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
#line 480 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1

View file

@ -651,6 +651,7 @@ protected:
TIntermSequence& findLinkerObjects() const;
bool userOutputUsed() const;
bool isSpecializationOperation(const TIntermOperator&) const;
bool isNonuniformPropagating(TOperator) const;
bool promoteUnary(TIntermUnary&);
bool promoteBinary(TIntermBinary&);
void addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTable&, const TString&);