SPV: Prevent issue #415 with better semantic checking.

This commit is contained in:
John Kessenich 2016-07-31 12:39:46 -06:00
parent 11e1a073f3
commit 1176530bf5
9 changed files with 2681 additions and 2937 deletions

View File

@ -2860,7 +2860,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
builder.clearAccessChain(); builder.clearAccessChain();
glslangArgs[a]->traverse(this); glslangArgs[a]->traverse(this);
argTypes.push_back(&paramType); argTypes.push_back(&paramType);
// keep outputs as and opaque objects l-values, evaluate input-only as r-values // keep outputs and opaque objects as l-values, evaluate input-only as r-values
if (qualifiers[a] != glslang::EvqConstReadOnly || paramType.isOpaque()) { if (qualifiers[a] != glslang::EvqConstReadOnly || paramType.isOpaque()) {
// save l-value // save l-value
lValues.push_back(builder.getAccessChain()); lValues.push_back(builder.getAccessChain());

View File

@ -33,7 +33,12 @@ ERROR: 0:67: 'uniform' : no qualifiers allowed for function return
ERROR: 0:69: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan ERROR: 0:69: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
ERROR: 0:73: 'texture' : no matching overloaded function found ERROR: 0:73: 'texture' : no matching overloaded function found
ERROR: 0:74: 'imageStore' : no matching overloaded function found ERROR: 0:74: 'imageStore' : no matching overloaded function found
ERROR: 33 compilation errors. No code generated. ERROR: 0:91: 'call argument' : sampler constructor must appear at point of use
ERROR: 0:92: 'call argument' : sampler constructor must appear at point of use
ERROR: 0:93: ',' : sampler constructor must appear at point of use
ERROR: 0:94: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type 'temp sampler2D' and a right operand of type 'temp sampler2D' (or there is no acceptable conversion)
ERROR: 0:94: 'call argument' : sampler constructor must appear at point of use
ERROR: 38 compilation errors. No code generated.

View File

@ -73,3 +73,23 @@ void fooTex()
texture(t2d, vec2(1.0)); // ERROR, need a sampler, not a pure texture texture(t2d, vec2(1.0)); // ERROR, need a sampler, not a pure texture
imageStore(t2d, ivec2(4, 5), vec4(1.2)); // ERROR, need an image, not a pure texture imageStore(t2d, ivec2(4, 5), vec4(1.2)); // ERROR, need an image, not a pure texture
} }
precision highp float;
layout(location=0) in vec2 vTexCoord;
layout(location=0) out vec4 FragColor;
vec4 userTexture(mediump sampler2D samp, vec2 coord)
{
return texture(samp, coord);
}
bool cond;
void callUserTexture()
{
userTexture(sampler2D(t2d,s), vTexCoord); // ERROR, not point of use
userTexture((sampler2D(t2d,s)), vTexCoord); // ERROR, not point of use
userTexture((sampler2D(t2d,s), sampler2D(t2d,s)), vTexCoord); // ERROR, not point of use
userTexture(cond ? sampler2D(t2d,s) : sampler2D(t2d,s), vTexCoord); // ERROR, no ?:, not point of use
}

View File

@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "SPIRV99.1374" #define GLSLANG_REVISION "SPIRV99.1375"
#define GLSLANG_DATE "30-Jul-2016" #define GLSLANG_DATE "31-Jul-2016"

View File

@ -1181,6 +1181,8 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
if (builtIn) if (builtIn)
nonOpBuiltInCheck(loc, *fnCandidate, *call); nonOpBuiltInCheck(loc, *fnCandidate, *call);
else
userFunctionCallCheck(loc, *call);
} }
// Convert 'out' arguments. If it was a constant folded built-in, it won't be an aggregate anymore. // Convert 'out' arguments. If it was a constant folded built-in, it won't be an aggregate anymore.
@ -1723,6 +1725,26 @@ void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fn
} }
} }
//
// Do any extra checking for a user function call.
//
void TParseContext::userFunctionCallCheck(const TSourceLoc& loc, TIntermAggregate& callNode)
{
TIntermSequence& arguments = callNode.getSequence();
for (int i = 0; i < (int)arguments.size(); ++i)
samplerConstructorLocationCheck(loc, "call argument", arguments[i]);
}
//
// Emit an error if this is a sampler constructor
//
void TParseContext::samplerConstructorLocationCheck(const TSourceLoc& loc, const char* token, TIntermNode* node)
{
if (node->getAsOperator() && node->getAsOperator()->getOp() == EOpConstructTextureSampler)
error(loc, "sampler constructor must appear at point of use", token, "");
}
// //
// Handle seeing a built-in constructor in a grammar production. // Handle seeing a built-in constructor in a grammar production.
// //

View File

@ -204,6 +204,8 @@ public:
TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermAggregate&) const; TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermAggregate&) const;
void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&); void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&);
void nonOpBuiltInCheck(const TSourceLoc&, const TFunction&, TIntermAggregate&); void nonOpBuiltInCheck(const TSourceLoc&, const TFunction&, TIntermAggregate&);
void userFunctionCallCheck(const TSourceLoc&, TIntermAggregate&);
void samplerConstructorLocationCheck(const TSourceLoc&, const char* token, TIntermNode*);
TFunction* handleConstructorCall(const TSourceLoc&, const TPublicType&); TFunction* handleConstructorCall(const TSourceLoc&, const TPublicType&);
bool parseVectorFields(const TSourceLoc&, const TString&, int vecSize, TVectorFields&); bool parseVectorFields(const TSourceLoc&, const TString&, int vecSize, TVectorFields&);

View File

@ -691,6 +691,7 @@ expression
$$ = $1; $$ = $1;
} }
| expression COMMA assignment_expression { | expression COMMA assignment_expression {
parseContext.samplerConstructorLocationCheck($2.loc, ",", $3);
$$ = parseContext.intermediate.addComma($1, $3, $2.loc); $$ = parseContext.intermediate.addComma($1, $3, $2.loc);
if ($$ == 0) { if ($$ == 0) {
parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(), $3->getCompleteString()); parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(), $3->getCompleteString());

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.7. */ /* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -30,9 +30,9 @@
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
#ifndef YY_YY_GLSLANG_TAB_CPP_H_INCLUDED #ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
# define YY_YY_GLSLANG_TAB_CPP_H_INCLUDED # define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED
/* Enabling traces. */ /* Debug traces. */
#ifndef YYDEBUG #ifndef YYDEBUG
# define YYDEBUG 1 # define YYDEBUG 1
#endif #endif
@ -40,289 +40,288 @@
extern int yydebug; extern int yydebug;
#endif #endif
/* Tokens. */ /* Token type. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers enum yytokentype
know about them. */ {
enum yytokentype { ATTRIBUTE = 258,
ATTRIBUTE = 258, VARYING = 259,
VARYING = 259, CONST = 260,
CONST = 260, BOOL = 261,
BOOL = 261, FLOAT = 262,
FLOAT = 262, DOUBLE = 263,
DOUBLE = 263, INT = 264,
INT = 264, UINT = 265,
UINT = 265, INT64_T = 266,
INT64_T = 266, UINT64_T = 267,
UINT64_T = 267, BREAK = 268,
BREAK = 268, CONTINUE = 269,
CONTINUE = 269, DO = 270,
DO = 270, ELSE = 271,
ELSE = 271, FOR = 272,
FOR = 272, IF = 273,
IF = 273, DISCARD = 274,
DISCARD = 274, RETURN = 275,
RETURN = 275, SWITCH = 276,
SWITCH = 276, CASE = 277,
CASE = 277, DEFAULT = 278,
DEFAULT = 278, SUBROUTINE = 279,
SUBROUTINE = 279, BVEC2 = 280,
BVEC2 = 280, BVEC3 = 281,
BVEC3 = 281, BVEC4 = 282,
BVEC4 = 282, IVEC2 = 283,
IVEC2 = 283, IVEC3 = 284,
IVEC3 = 284, IVEC4 = 285,
IVEC4 = 285, I64VEC2 = 286,
I64VEC2 = 286, I64VEC3 = 287,
I64VEC3 = 287, I64VEC4 = 288,
I64VEC4 = 288, UVEC2 = 289,
UVEC2 = 289, UVEC3 = 290,
UVEC3 = 290, UVEC4 = 291,
UVEC4 = 291, U64VEC2 = 292,
U64VEC2 = 292, U64VEC3 = 293,
U64VEC3 = 293, U64VEC4 = 294,
U64VEC4 = 294, VEC2 = 295,
VEC2 = 295, VEC3 = 296,
VEC3 = 296, VEC4 = 297,
VEC4 = 297, MAT2 = 298,
MAT2 = 298, MAT3 = 299,
MAT3 = 299, MAT4 = 300,
MAT4 = 300, CENTROID = 301,
CENTROID = 301, IN = 302,
IN = 302, OUT = 303,
OUT = 303, INOUT = 304,
INOUT = 304, UNIFORM = 305,
UNIFORM = 305, PATCH = 306,
PATCH = 306, SAMPLE = 307,
SAMPLE = 307, BUFFER = 308,
BUFFER = 308, SHARED = 309,
SHARED = 309, COHERENT = 310,
COHERENT = 310, VOLATILE = 311,
VOLATILE = 311, RESTRICT = 312,
RESTRICT = 312, READONLY = 313,
READONLY = 313, WRITEONLY = 314,
WRITEONLY = 314, DVEC2 = 315,
DVEC2 = 315, DVEC3 = 316,
DVEC3 = 316, DVEC4 = 317,
DVEC4 = 317, DMAT2 = 318,
DMAT2 = 318, DMAT3 = 319,
DMAT3 = 319, DMAT4 = 320,
DMAT4 = 320, NOPERSPECTIVE = 321,
NOPERSPECTIVE = 321, FLAT = 322,
FLAT = 322, SMOOTH = 323,
SMOOTH = 323, LAYOUT = 324,
LAYOUT = 324, __EXPLICITINTERPAMD = 325,
__EXPLICITINTERPAMD = 325, MAT2X2 = 326,
MAT2X2 = 326, MAT2X3 = 327,
MAT2X3 = 327, MAT2X4 = 328,
MAT2X4 = 328, MAT3X2 = 329,
MAT3X2 = 329, MAT3X3 = 330,
MAT3X3 = 330, MAT3X4 = 331,
MAT3X4 = 331, MAT4X2 = 332,
MAT4X2 = 332, MAT4X3 = 333,
MAT4X3 = 333, MAT4X4 = 334,
MAT4X4 = 334, DMAT2X2 = 335,
DMAT2X2 = 335, DMAT2X3 = 336,
DMAT2X3 = 336, DMAT2X4 = 337,
DMAT2X4 = 337, DMAT3X2 = 338,
DMAT3X2 = 338, DMAT3X3 = 339,
DMAT3X3 = 339, DMAT3X4 = 340,
DMAT3X4 = 340, DMAT4X2 = 341,
DMAT4X2 = 341, DMAT4X3 = 342,
DMAT4X3 = 342, DMAT4X4 = 343,
DMAT4X4 = 343, ATOMIC_UINT = 344,
ATOMIC_UINT = 344, SAMPLER1D = 345,
SAMPLER1D = 345, SAMPLER2D = 346,
SAMPLER2D = 346, SAMPLER3D = 347,
SAMPLER3D = 347, SAMPLERCUBE = 348,
SAMPLERCUBE = 348, SAMPLER1DSHADOW = 349,
SAMPLER1DSHADOW = 349, SAMPLER2DSHADOW = 350,
SAMPLER2DSHADOW = 350, SAMPLERCUBESHADOW = 351,
SAMPLERCUBESHADOW = 351, SAMPLER1DARRAY = 352,
SAMPLER1DARRAY = 352, SAMPLER2DARRAY = 353,
SAMPLER2DARRAY = 353, SAMPLER1DARRAYSHADOW = 354,
SAMPLER1DARRAYSHADOW = 354, SAMPLER2DARRAYSHADOW = 355,
SAMPLER2DARRAYSHADOW = 355, ISAMPLER1D = 356,
ISAMPLER1D = 356, ISAMPLER2D = 357,
ISAMPLER2D = 357, ISAMPLER3D = 358,
ISAMPLER3D = 358, ISAMPLERCUBE = 359,
ISAMPLERCUBE = 359, ISAMPLER1DARRAY = 360,
ISAMPLER1DARRAY = 360, ISAMPLER2DARRAY = 361,
ISAMPLER2DARRAY = 361, USAMPLER1D = 362,
USAMPLER1D = 362, USAMPLER2D = 363,
USAMPLER2D = 363, USAMPLER3D = 364,
USAMPLER3D = 364, USAMPLERCUBE = 365,
USAMPLERCUBE = 365, USAMPLER1DARRAY = 366,
USAMPLER1DARRAY = 366, USAMPLER2DARRAY = 367,
USAMPLER2DARRAY = 367, SAMPLER2DRECT = 368,
SAMPLER2DRECT = 368, SAMPLER2DRECTSHADOW = 369,
SAMPLER2DRECTSHADOW = 369, ISAMPLER2DRECT = 370,
ISAMPLER2DRECT = 370, USAMPLER2DRECT = 371,
USAMPLER2DRECT = 371, SAMPLERBUFFER = 372,
SAMPLERBUFFER = 372, ISAMPLERBUFFER = 373,
ISAMPLERBUFFER = 373, USAMPLERBUFFER = 374,
USAMPLERBUFFER = 374, SAMPLERCUBEARRAY = 375,
SAMPLERCUBEARRAY = 375, SAMPLERCUBEARRAYSHADOW = 376,
SAMPLERCUBEARRAYSHADOW = 376, ISAMPLERCUBEARRAY = 377,
ISAMPLERCUBEARRAY = 377, USAMPLERCUBEARRAY = 378,
USAMPLERCUBEARRAY = 378, SAMPLER2DMS = 379,
SAMPLER2DMS = 379, ISAMPLER2DMS = 380,
ISAMPLER2DMS = 380, USAMPLER2DMS = 381,
USAMPLER2DMS = 381, SAMPLER2DMSARRAY = 382,
SAMPLER2DMSARRAY = 382, ISAMPLER2DMSARRAY = 383,
ISAMPLER2DMSARRAY = 383, USAMPLER2DMSARRAY = 384,
USAMPLER2DMSARRAY = 384, SAMPLEREXTERNALOES = 385,
SAMPLEREXTERNALOES = 385, SAMPLER = 386,
SAMPLER = 386, SAMPLERSHADOW = 387,
SAMPLERSHADOW = 387, TEXTURE1D = 388,
TEXTURE1D = 388, TEXTURE2D = 389,
TEXTURE2D = 389, TEXTURE3D = 390,
TEXTURE3D = 390, TEXTURECUBE = 391,
TEXTURECUBE = 391, TEXTURE1DARRAY = 392,
TEXTURE1DARRAY = 392, TEXTURE2DARRAY = 393,
TEXTURE2DARRAY = 393, ITEXTURE1D = 394,
ITEXTURE1D = 394, ITEXTURE2D = 395,
ITEXTURE2D = 395, ITEXTURE3D = 396,
ITEXTURE3D = 396, ITEXTURECUBE = 397,
ITEXTURECUBE = 397, ITEXTURE1DARRAY = 398,
ITEXTURE1DARRAY = 398, ITEXTURE2DARRAY = 399,
ITEXTURE2DARRAY = 399, UTEXTURE1D = 400,
UTEXTURE1D = 400, UTEXTURE2D = 401,
UTEXTURE2D = 401, UTEXTURE3D = 402,
UTEXTURE3D = 402, UTEXTURECUBE = 403,
UTEXTURECUBE = 403, UTEXTURE1DARRAY = 404,
UTEXTURE1DARRAY = 404, UTEXTURE2DARRAY = 405,
UTEXTURE2DARRAY = 405, TEXTURE2DRECT = 406,
TEXTURE2DRECT = 406, ITEXTURE2DRECT = 407,
ITEXTURE2DRECT = 407, UTEXTURE2DRECT = 408,
UTEXTURE2DRECT = 408, TEXTUREBUFFER = 409,
TEXTUREBUFFER = 409, ITEXTUREBUFFER = 410,
ITEXTUREBUFFER = 410, UTEXTUREBUFFER = 411,
UTEXTUREBUFFER = 411, TEXTURECUBEARRAY = 412,
TEXTURECUBEARRAY = 412, ITEXTURECUBEARRAY = 413,
ITEXTURECUBEARRAY = 413, UTEXTURECUBEARRAY = 414,
UTEXTURECUBEARRAY = 414, TEXTURE2DMS = 415,
TEXTURE2DMS = 415, ITEXTURE2DMS = 416,
ITEXTURE2DMS = 416, UTEXTURE2DMS = 417,
UTEXTURE2DMS = 417, TEXTURE2DMSARRAY = 418,
TEXTURE2DMSARRAY = 418, ITEXTURE2DMSARRAY = 419,
ITEXTURE2DMSARRAY = 419, UTEXTURE2DMSARRAY = 420,
UTEXTURE2DMSARRAY = 420, SUBPASSINPUT = 421,
SUBPASSINPUT = 421, SUBPASSINPUTMS = 422,
SUBPASSINPUTMS = 422, ISUBPASSINPUT = 423,
ISUBPASSINPUT = 423, ISUBPASSINPUTMS = 424,
ISUBPASSINPUTMS = 424, USUBPASSINPUT = 425,
USUBPASSINPUT = 425, USUBPASSINPUTMS = 426,
USUBPASSINPUTMS = 426, IMAGE1D = 427,
IMAGE1D = 427, IIMAGE1D = 428,
IIMAGE1D = 428, UIMAGE1D = 429,
UIMAGE1D = 429, IMAGE2D = 430,
IMAGE2D = 430, IIMAGE2D = 431,
IIMAGE2D = 431, UIMAGE2D = 432,
UIMAGE2D = 432, IMAGE3D = 433,
IMAGE3D = 433, IIMAGE3D = 434,
IIMAGE3D = 434, UIMAGE3D = 435,
UIMAGE3D = 435, IMAGE2DRECT = 436,
IMAGE2DRECT = 436, IIMAGE2DRECT = 437,
IIMAGE2DRECT = 437, UIMAGE2DRECT = 438,
UIMAGE2DRECT = 438, IMAGECUBE = 439,
IMAGECUBE = 439, IIMAGECUBE = 440,
IIMAGECUBE = 440, UIMAGECUBE = 441,
UIMAGECUBE = 441, IMAGEBUFFER = 442,
IMAGEBUFFER = 442, IIMAGEBUFFER = 443,
IIMAGEBUFFER = 443, UIMAGEBUFFER = 444,
UIMAGEBUFFER = 444, IMAGE1DARRAY = 445,
IMAGE1DARRAY = 445, IIMAGE1DARRAY = 446,
IIMAGE1DARRAY = 446, UIMAGE1DARRAY = 447,
UIMAGE1DARRAY = 447, IMAGE2DARRAY = 448,
IMAGE2DARRAY = 448, IIMAGE2DARRAY = 449,
IIMAGE2DARRAY = 449, UIMAGE2DARRAY = 450,
UIMAGE2DARRAY = 450, IMAGECUBEARRAY = 451,
IMAGECUBEARRAY = 451, IIMAGECUBEARRAY = 452,
IIMAGECUBEARRAY = 452, UIMAGECUBEARRAY = 453,
UIMAGECUBEARRAY = 453, IMAGE2DMS = 454,
IMAGE2DMS = 454, IIMAGE2DMS = 455,
IIMAGE2DMS = 455, UIMAGE2DMS = 456,
UIMAGE2DMS = 456, IMAGE2DMSARRAY = 457,
IMAGE2DMSARRAY = 457, IIMAGE2DMSARRAY = 458,
IIMAGE2DMSARRAY = 458, UIMAGE2DMSARRAY = 459,
UIMAGE2DMSARRAY = 459, STRUCT = 460,
STRUCT = 460, VOID = 461,
VOID = 461, WHILE = 462,
WHILE = 462, IDENTIFIER = 463,
IDENTIFIER = 463, TYPE_NAME = 464,
TYPE_NAME = 464, FLOATCONSTANT = 465,
FLOATCONSTANT = 465, DOUBLECONSTANT = 466,
DOUBLECONSTANT = 466, INTCONSTANT = 467,
INTCONSTANT = 467, UINTCONSTANT = 468,
UINTCONSTANT = 468, INT64CONSTANT = 469,
INT64CONSTANT = 469, UINT64CONSTANT = 470,
UINT64CONSTANT = 470, BOOLCONSTANT = 471,
BOOLCONSTANT = 471, LEFT_OP = 472,
LEFT_OP = 472, RIGHT_OP = 473,
RIGHT_OP = 473, INC_OP = 474,
INC_OP = 474, DEC_OP = 475,
DEC_OP = 475, LE_OP = 476,
LE_OP = 476, GE_OP = 477,
GE_OP = 477, EQ_OP = 478,
EQ_OP = 478, NE_OP = 479,
NE_OP = 479, AND_OP = 480,
AND_OP = 480, OR_OP = 481,
OR_OP = 481, XOR_OP = 482,
XOR_OP = 482, MUL_ASSIGN = 483,
MUL_ASSIGN = 483, DIV_ASSIGN = 484,
DIV_ASSIGN = 484, ADD_ASSIGN = 485,
ADD_ASSIGN = 485, MOD_ASSIGN = 486,
MOD_ASSIGN = 486, LEFT_ASSIGN = 487,
LEFT_ASSIGN = 487, RIGHT_ASSIGN = 488,
RIGHT_ASSIGN = 488, AND_ASSIGN = 489,
AND_ASSIGN = 489, XOR_ASSIGN = 490,
XOR_ASSIGN = 490, OR_ASSIGN = 491,
OR_ASSIGN = 491, SUB_ASSIGN = 492,
SUB_ASSIGN = 492, LEFT_PAREN = 493,
LEFT_PAREN = 493, RIGHT_PAREN = 494,
RIGHT_PAREN = 494, LEFT_BRACKET = 495,
LEFT_BRACKET = 495, RIGHT_BRACKET = 496,
RIGHT_BRACKET = 496, LEFT_BRACE = 497,
LEFT_BRACE = 497, RIGHT_BRACE = 498,
RIGHT_BRACE = 498, DOT = 499,
DOT = 499, COMMA = 500,
COMMA = 500, COLON = 501,
COLON = 501, EQUAL = 502,
EQUAL = 502, SEMICOLON = 503,
SEMICOLON = 503, BANG = 504,
BANG = 504, DASH = 505,
DASH = 505, TILDE = 506,
TILDE = 506, PLUS = 507,
PLUS = 507, STAR = 508,
STAR = 508, SLASH = 509,
SLASH = 509, PERCENT = 510,
PERCENT = 510, LEFT_ANGLE = 511,
LEFT_ANGLE = 511, RIGHT_ANGLE = 512,
RIGHT_ANGLE = 512, VERTICAL_BAR = 513,
VERTICAL_BAR = 513, CARET = 514,
CARET = 514, AMPERSAND = 515,
AMPERSAND = 515, QUESTION = 516,
QUESTION = 516, INVARIANT = 517,
INVARIANT = 517, PRECISE = 518,
PRECISE = 518, HIGH_PRECISION = 519,
HIGH_PRECISION = 519, MEDIUM_PRECISION = 520,
MEDIUM_PRECISION = 520, LOW_PRECISION = 521,
LOW_PRECISION = 521, PRECISION = 522,
PRECISION = 522, PACKED = 523,
PACKED = 523, RESOURCE = 524,
RESOURCE = 524, SUPERP = 525
SUPERP = 525 };
};
#endif #endif
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
union YYSTYPE
{ {
/* Line 2058 of yacc.c */ #line 66 "MachineIndependent/glslang.y" /* yacc.c:1909 */
#line 66 "glslang.y"
struct { struct {
glslang::TSourceLoc loc; glslang::TSourceLoc loc;
@ -356,28 +355,16 @@ typedef union YYSTYPE
}; };
} interm; } interm;
#line 359 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */
};
/* Line 2058 of yacc.c */ typedef union YYSTYPE YYSTYPE;
#line 362 "glslang_tab.cpp.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #endif
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (glslang::TParseContext* pParseContext);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_YY_GLSLANG_TAB_CPP_H_INCLUDED */ int yyparse (glslang::TParseContext* pParseContext);
#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */