From f3c22c5b9d2cf3c2142515b8e3804a70481e8bc5 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Tue, 19 Mar 2013 23:34:17 -0700 Subject: [PATCH] Updated glsl-optimizer. --- .../glsl-optimizer/src/glsl/ast_function.cpp | 2 +- .../glsl-optimizer/src/glsl/glcpp/glcpp.h | 2 +- 3rdparty/glsl-optimizer/src/glsl/glcpp/pp.c | 2 +- .../glsl-optimizer/src/glsl/glsl_lexer.cpp | 445 ++++++------- .../glsl-optimizer/src/glsl/glsl_lexer.ll | 5 + .../glsl-optimizer/src/glsl/glsl_parser.cpp | 587 +++++++++--------- .../glsl-optimizer/src/glsl/glsl_parser.h | 2 +- .../glsl-optimizer/src/glsl/glsl_parser.yy | 5 + .../glsl-optimizer/src/glsl/glsl_types.cpp | 2 +- .../glsl-optimizer/src/glsl/ir_reader.cpp | 2 +- 3rdparty/glsl-optimizer/src/glsl/ralloc.c | 6 +- 3rdparty/glsl-optimizer/src/glsl/ralloc.h | 6 +- .../src/mesa/program/hash_table.c | 2 +- premake/shaderc.lua | 10 +- 14 files changed, 553 insertions(+), 525 deletions(-) diff --git a/3rdparty/glsl-optimizer/src/glsl/ast_function.cpp b/3rdparty/glsl-optimizer/src/glsl/ast_function.cpp index 1c13a1176..82caddb21 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ast_function.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ast_function.cpp @@ -1484,7 +1484,7 @@ ast_function_expression::hir(exec_list *instructions, var->constant_value = matrix->constant_expression_value(); /* Replace the matrix with dereferences of its columns. */ - for (int i = 0; i < matrix->type->matrix_columns; i++) { + for (int i = 0; i < (int)matrix->type->matrix_columns; i++) { matrix->insert_before(new (ctx) ir_dereference_array(var, new(ctx) ir_constant(i))); } diff --git a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp.h b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp.h index a459289b2..b696b4377 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp.h +++ b/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp.h @@ -50,7 +50,7 @@ typedef struct token_list token_list_t; typedef union YYSTYPE { - intmax_t ival; + int64_t ival; char *str; string_list_t *string_list; token_t *token; diff --git a/3rdparty/glsl-optimizer/src/glsl/glcpp/pp.c b/3rdparty/glsl-optimizer/src/glsl/glcpp/pp.c index 11b29417b..7e5b99649 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glcpp/pp.c +++ b/3rdparty/glsl-optimizer/src/glsl/glcpp/pp.c @@ -107,7 +107,7 @@ remove_line_continuations(glcpp_parser_t *ctx, const char *shader) const char *backslash = NULL; /* # of characters preceding the newline. */ - int n = newline - shader; + size_t n = newline - shader; /* Find the preceding '\', if it exists */ if (n >= 1 && newline[-1] == '\\') diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.cpp b/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.cpp index 2f0c6865d..062b339ed 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.cpp @@ -1045,6 +1045,11 @@ static yyconst flex_int16_t yy_chk[1317] = #include "glsl_parser_extras.h" #include "glsl_parser.h" +#if defined(_MSC_VER) +# pragma warning(disable: 4065) // warning C4065: switch statement contains 'default' but no 'case' labels +# pragma warning(disable: 4244) // warning C4244: '=' : conversion from 'double' to 'float', possible loss of data +#endif // defined(_MSC_VER) + static int classify_identifier(struct _mesa_glsl_parse_state *, const char *); #ifdef _MSC_VER @@ -1143,7 +1148,7 @@ literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state, literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base) -#line 1147 "src/glsl/glsl_lexer.cpp" +#line 1152 "src/glsl/glsl_lexer.cpp" #define INITIAL 0 #define PP 1 @@ -1382,10 +1387,10 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 145 "src/glsl/glsl_lexer.ll" +#line 150 "src/glsl/glsl_lexer.ll" -#line 1389 "src/glsl/glsl_lexer.cpp" +#line 1394 "src/glsl/glsl_lexer.cpp" yylval = yylval_param; @@ -1471,7 +1476,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 147 "src/glsl/glsl_lexer.ll" +#line 152 "src/glsl/glsl_lexer.ll" ; YY_BREAK /* Preprocessor tokens. */ @@ -1480,17 +1485,17 @@ case 2: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 150 "src/glsl/glsl_lexer.ll" +#line 155 "src/glsl/glsl_lexer.ll" ; YY_BREAK case 3: YY_RULE_SETUP -#line 151 "src/glsl/glsl_lexer.ll" +#line 156 "src/glsl/glsl_lexer.ll" { BEGIN PP; return VERSION_TOK; } YY_BREAK case 4: YY_RULE_SETUP -#line 152 "src/glsl/glsl_lexer.ll" +#line 157 "src/glsl/glsl_lexer.ll" { BEGIN PP; return EXTENSION; } YY_BREAK case 5: @@ -1498,7 +1503,7 @@ case 5: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 153 "src/glsl/glsl_lexer.ll" +#line 158 "src/glsl/glsl_lexer.ll" { /* Eat characters until the first digit is * encountered @@ -1520,7 +1525,7 @@ case 6: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 168 "src/glsl/glsl_lexer.ll" +#line 173 "src/glsl/glsl_lexer.ll" { /* Eat characters until the first digit is * encountered @@ -1538,7 +1543,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 182 "src/glsl/glsl_lexer.ll" +#line 187 "src/glsl/glsl_lexer.ll" { BEGIN PP; return PRAGMA_DEBUG_ON; @@ -1546,7 +1551,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 186 "src/glsl/glsl_lexer.ll" +#line 191 "src/glsl/glsl_lexer.ll" { BEGIN PP; return PRAGMA_DEBUG_OFF; @@ -1554,7 +1559,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 190 "src/glsl/glsl_lexer.ll" +#line 195 "src/glsl/glsl_lexer.ll" { BEGIN PP; return PRAGMA_OPTIMIZE_ON; @@ -1562,7 +1567,7 @@ YY_RULE_SETUP YY_BREAK case 10: YY_RULE_SETUP -#line 194 "src/glsl/glsl_lexer.ll" +#line 199 "src/glsl/glsl_lexer.ll" { BEGIN PP; return PRAGMA_OPTIMIZE_OFF; @@ -1570,7 +1575,7 @@ YY_RULE_SETUP YY_BREAK case 11: YY_RULE_SETUP -#line 198 "src/glsl/glsl_lexer.ll" +#line 203 "src/glsl/glsl_lexer.ll" { BEGIN PP; return PRAGMA_INVARIANT_ALL; @@ -1578,38 +1583,38 @@ YY_RULE_SETUP YY_BREAK case 12: YY_RULE_SETUP -#line 202 "src/glsl/glsl_lexer.ll" +#line 207 "src/glsl/glsl_lexer.ll" { BEGIN PRAGMA; } YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 204 "src/glsl/glsl_lexer.ll" +#line 209 "src/glsl/glsl_lexer.ll" { BEGIN 0; yylineno++; yycolumn = 0; } YY_BREAK case 14: YY_RULE_SETUP -#line 205 "src/glsl/glsl_lexer.ll" +#line 210 "src/glsl/glsl_lexer.ll" { } YY_BREAK case 15: YY_RULE_SETUP -#line 207 "src/glsl/glsl_lexer.ll" +#line 212 "src/glsl/glsl_lexer.ll" { } YY_BREAK case 16: YY_RULE_SETUP -#line 208 "src/glsl/glsl_lexer.ll" +#line 213 "src/glsl/glsl_lexer.ll" { } YY_BREAK case 17: YY_RULE_SETUP -#line 209 "src/glsl/glsl_lexer.ll" +#line 214 "src/glsl/glsl_lexer.ll" return COLON; YY_BREAK case 18: YY_RULE_SETUP -#line 210 "src/glsl/glsl_lexer.ll" +#line 215 "src/glsl/glsl_lexer.ll" { yylval->identifier = strdup(yytext); return IDENTIFIER; @@ -1617,7 +1622,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 214 "src/glsl/glsl_lexer.ll" +#line 219 "src/glsl/glsl_lexer.ll" { yylval->n = strtol(yytext, NULL, 10); return INTCONSTANT; @@ -1626,378 +1631,378 @@ YY_RULE_SETUP case 20: /* rule 20 can match eol */ YY_RULE_SETUP -#line 218 "src/glsl/glsl_lexer.ll" +#line 223 "src/glsl/glsl_lexer.ll" { BEGIN 0; yylineno++; yycolumn = 0; return EOL; } YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP -#line 220 "src/glsl/glsl_lexer.ll" +#line 225 "src/glsl/glsl_lexer.ll" { yylineno++; yycolumn = 0; } YY_BREAK case 22: YY_RULE_SETUP -#line 222 "src/glsl/glsl_lexer.ll" +#line 227 "src/glsl/glsl_lexer.ll" return ATTRIBUTE; YY_BREAK case 23: YY_RULE_SETUP -#line 223 "src/glsl/glsl_lexer.ll" +#line 228 "src/glsl/glsl_lexer.ll" return CONST_TOK; YY_BREAK case 24: YY_RULE_SETUP -#line 224 "src/glsl/glsl_lexer.ll" +#line 229 "src/glsl/glsl_lexer.ll" return BOOL_TOK; YY_BREAK case 25: YY_RULE_SETUP -#line 225 "src/glsl/glsl_lexer.ll" +#line 230 "src/glsl/glsl_lexer.ll" return FLOAT_TOK; YY_BREAK case 26: YY_RULE_SETUP -#line 226 "src/glsl/glsl_lexer.ll" +#line 231 "src/glsl/glsl_lexer.ll" return INT_TOK; YY_BREAK case 27: YY_RULE_SETUP -#line 227 "src/glsl/glsl_lexer.ll" +#line 232 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, UINT_TOK); YY_BREAK case 28: YY_RULE_SETUP -#line 229 "src/glsl/glsl_lexer.ll" +#line 234 "src/glsl/glsl_lexer.ll" return BREAK; YY_BREAK case 29: YY_RULE_SETUP -#line 230 "src/glsl/glsl_lexer.ll" +#line 235 "src/glsl/glsl_lexer.ll" return CONTINUE; YY_BREAK case 30: YY_RULE_SETUP -#line 231 "src/glsl/glsl_lexer.ll" +#line 236 "src/glsl/glsl_lexer.ll" return DO; YY_BREAK case 31: YY_RULE_SETUP -#line 232 "src/glsl/glsl_lexer.ll" +#line 237 "src/glsl/glsl_lexer.ll" return WHILE; YY_BREAK case 32: YY_RULE_SETUP -#line 233 "src/glsl/glsl_lexer.ll" +#line 238 "src/glsl/glsl_lexer.ll" return ELSE; YY_BREAK case 33: YY_RULE_SETUP -#line 234 "src/glsl/glsl_lexer.ll" +#line 239 "src/glsl/glsl_lexer.ll" return FOR; YY_BREAK case 34: YY_RULE_SETUP -#line 235 "src/glsl/glsl_lexer.ll" +#line 240 "src/glsl/glsl_lexer.ll" return IF; YY_BREAK case 35: YY_RULE_SETUP -#line 236 "src/glsl/glsl_lexer.ll" +#line 241 "src/glsl/glsl_lexer.ll" return DISCARD; YY_BREAK case 36: YY_RULE_SETUP -#line 237 "src/glsl/glsl_lexer.ll" +#line 242 "src/glsl/glsl_lexer.ll" return RETURN; YY_BREAK case 37: YY_RULE_SETUP -#line 239 "src/glsl/glsl_lexer.ll" +#line 244 "src/glsl/glsl_lexer.ll" return BVEC2; YY_BREAK case 38: YY_RULE_SETUP -#line 240 "src/glsl/glsl_lexer.ll" +#line 245 "src/glsl/glsl_lexer.ll" return BVEC3; YY_BREAK case 39: YY_RULE_SETUP -#line 241 "src/glsl/glsl_lexer.ll" +#line 246 "src/glsl/glsl_lexer.ll" return BVEC4; YY_BREAK case 40: YY_RULE_SETUP -#line 242 "src/glsl/glsl_lexer.ll" +#line 247 "src/glsl/glsl_lexer.ll" return IVEC2; YY_BREAK case 41: YY_RULE_SETUP -#line 243 "src/glsl/glsl_lexer.ll" +#line 248 "src/glsl/glsl_lexer.ll" return IVEC3; YY_BREAK case 42: YY_RULE_SETUP -#line 244 "src/glsl/glsl_lexer.ll" +#line 249 "src/glsl/glsl_lexer.ll" return IVEC4; YY_BREAK case 43: YY_RULE_SETUP -#line 245 "src/glsl/glsl_lexer.ll" +#line 250 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, UVEC2); YY_BREAK case 44: YY_RULE_SETUP -#line 246 "src/glsl/glsl_lexer.ll" +#line 251 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, UVEC3); YY_BREAK case 45: YY_RULE_SETUP -#line 247 "src/glsl/glsl_lexer.ll" +#line 252 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, UVEC4); YY_BREAK case 46: YY_RULE_SETUP -#line 248 "src/glsl/glsl_lexer.ll" +#line 253 "src/glsl/glsl_lexer.ll" return VEC2; YY_BREAK case 47: YY_RULE_SETUP -#line 249 "src/glsl/glsl_lexer.ll" +#line 254 "src/glsl/glsl_lexer.ll" return VEC3; YY_BREAK case 48: YY_RULE_SETUP -#line 250 "src/glsl/glsl_lexer.ll" +#line 255 "src/glsl/glsl_lexer.ll" return VEC4; YY_BREAK case 49: YY_RULE_SETUP -#line 251 "src/glsl/glsl_lexer.ll" +#line 256 "src/glsl/glsl_lexer.ll" return MAT2X2; YY_BREAK case 50: YY_RULE_SETUP -#line 252 "src/glsl/glsl_lexer.ll" +#line 257 "src/glsl/glsl_lexer.ll" return MAT3X3; YY_BREAK case 51: YY_RULE_SETUP -#line 253 "src/glsl/glsl_lexer.ll" +#line 258 "src/glsl/glsl_lexer.ll" return MAT4X4; YY_BREAK case 52: YY_RULE_SETUP -#line 254 "src/glsl/glsl_lexer.ll" +#line 259 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT2X2); YY_BREAK case 53: YY_RULE_SETUP -#line 255 "src/glsl/glsl_lexer.ll" +#line 260 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT2X3); YY_BREAK case 54: YY_RULE_SETUP -#line 256 "src/glsl/glsl_lexer.ll" +#line 261 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT2X4); YY_BREAK case 55: YY_RULE_SETUP -#line 257 "src/glsl/glsl_lexer.ll" +#line 262 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT3X2); YY_BREAK case 56: YY_RULE_SETUP -#line 258 "src/glsl/glsl_lexer.ll" +#line 263 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT3X3); YY_BREAK case 57: YY_RULE_SETUP -#line 259 "src/glsl/glsl_lexer.ll" +#line 264 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT3X4); YY_BREAK case 58: YY_RULE_SETUP -#line 260 "src/glsl/glsl_lexer.ll" +#line 265 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT4X2); YY_BREAK case 59: YY_RULE_SETUP -#line 261 "src/glsl/glsl_lexer.ll" +#line 266 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT4X3); YY_BREAK case 60: YY_RULE_SETUP -#line 262 "src/glsl/glsl_lexer.ll" +#line 267 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, MAT4X4); YY_BREAK case 61: YY_RULE_SETUP -#line 264 "src/glsl/glsl_lexer.ll" +#line 269 "src/glsl/glsl_lexer.ll" return IN_TOK; YY_BREAK case 62: YY_RULE_SETUP -#line 265 "src/glsl/glsl_lexer.ll" +#line 270 "src/glsl/glsl_lexer.ll" return OUT_TOK; YY_BREAK case 63: YY_RULE_SETUP -#line 266 "src/glsl/glsl_lexer.ll" +#line 271 "src/glsl/glsl_lexer.ll" return INOUT_TOK; YY_BREAK case 64: YY_RULE_SETUP -#line 267 "src/glsl/glsl_lexer.ll" +#line 272 "src/glsl/glsl_lexer.ll" return UNIFORM; YY_BREAK case 65: YY_RULE_SETUP -#line 268 "src/glsl/glsl_lexer.ll" +#line 273 "src/glsl/glsl_lexer.ll" return VARYING; YY_BREAK case 66: YY_RULE_SETUP -#line 269 "src/glsl/glsl_lexer.ll" +#line 274 "src/glsl/glsl_lexer.ll" KEYWORD(120, 120, CENTROID); YY_BREAK case 67: YY_RULE_SETUP -#line 270 "src/glsl/glsl_lexer.ll" +#line 275 "src/glsl/glsl_lexer.ll" KEYWORD(120 || ES, 120 || ES, INVARIANT); YY_BREAK case 68: YY_RULE_SETUP -#line 271 "src/glsl/glsl_lexer.ll" +#line 276 "src/glsl/glsl_lexer.ll" KEYWORD(130 || ES, 130, FLAT); YY_BREAK case 69: YY_RULE_SETUP -#line 272 "src/glsl/glsl_lexer.ll" +#line 277 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, SMOOTH); YY_BREAK case 70: YY_RULE_SETUP -#line 273 "src/glsl/glsl_lexer.ll" +#line 278 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, NOPERSPECTIVE); YY_BREAK case 71: YY_RULE_SETUP -#line 275 "src/glsl/glsl_lexer.ll" +#line 280 "src/glsl/glsl_lexer.ll" return SAMPLER1D; YY_BREAK case 72: YY_RULE_SETUP -#line 276 "src/glsl/glsl_lexer.ll" +#line 281 "src/glsl/glsl_lexer.ll" return SAMPLER2D; YY_BREAK case 73: YY_RULE_SETUP -#line 277 "src/glsl/glsl_lexer.ll" +#line 282 "src/glsl/glsl_lexer.ll" return SAMPLER3D; YY_BREAK case 74: YY_RULE_SETUP -#line 278 "src/glsl/glsl_lexer.ll" +#line 283 "src/glsl/glsl_lexer.ll" return SAMPLERCUBE; YY_BREAK case 75: YY_RULE_SETUP -#line 279 "src/glsl/glsl_lexer.ll" +#line 284 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, SAMPLER1DARRAY); YY_BREAK case 76: YY_RULE_SETUP -#line 280 "src/glsl/glsl_lexer.ll" +#line 285 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, SAMPLER2DARRAY); YY_BREAK case 77: YY_RULE_SETUP -#line 281 "src/glsl/glsl_lexer.ll" +#line 286 "src/glsl/glsl_lexer.ll" return SAMPLER1DSHADOW; YY_BREAK case 78: YY_RULE_SETUP -#line 282 "src/glsl/glsl_lexer.ll" +#line 287 "src/glsl/glsl_lexer.ll" return SAMPLER2DSHADOW; YY_BREAK case 79: YY_RULE_SETUP -#line 283 "src/glsl/glsl_lexer.ll" +#line 288 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, SAMPLERCUBESHADOW); YY_BREAK case 80: YY_RULE_SETUP -#line 284 "src/glsl/glsl_lexer.ll" +#line 289 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, SAMPLER1DARRAYSHADOW); YY_BREAK case 81: YY_RULE_SETUP -#line 285 "src/glsl/glsl_lexer.ll" +#line 290 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, SAMPLER2DARRAYSHADOW); YY_BREAK case 82: YY_RULE_SETUP -#line 286 "src/glsl/glsl_lexer.ll" +#line 291 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, ISAMPLER1D); YY_BREAK case 83: YY_RULE_SETUP -#line 287 "src/glsl/glsl_lexer.ll" +#line 292 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, ISAMPLER2D); YY_BREAK case 84: YY_RULE_SETUP -#line 288 "src/glsl/glsl_lexer.ll" +#line 293 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, ISAMPLER3D); YY_BREAK case 85: YY_RULE_SETUP -#line 289 "src/glsl/glsl_lexer.ll" +#line 294 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, ISAMPLERCUBE); YY_BREAK case 86: YY_RULE_SETUP -#line 290 "src/glsl/glsl_lexer.ll" +#line 295 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, ISAMPLER1DARRAY); YY_BREAK case 87: YY_RULE_SETUP -#line 291 "src/glsl/glsl_lexer.ll" +#line 296 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, ISAMPLER2DARRAY); YY_BREAK case 88: YY_RULE_SETUP -#line 292 "src/glsl/glsl_lexer.ll" +#line 297 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, USAMPLER1D); YY_BREAK case 89: YY_RULE_SETUP -#line 293 "src/glsl/glsl_lexer.ll" +#line 298 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, USAMPLER2D); YY_BREAK case 90: YY_RULE_SETUP -#line 294 "src/glsl/glsl_lexer.ll" +#line 299 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, USAMPLER3D); YY_BREAK case 91: YY_RULE_SETUP -#line 295 "src/glsl/glsl_lexer.ll" +#line 300 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, USAMPLERCUBE); YY_BREAK case 92: YY_RULE_SETUP -#line 296 "src/glsl/glsl_lexer.ll" +#line 301 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, USAMPLER1DARRAY); YY_BREAK case 93: YY_RULE_SETUP -#line 297 "src/glsl/glsl_lexer.ll" +#line 302 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, USAMPLER2DARRAY); YY_BREAK case 94: YY_RULE_SETUP -#line 299 "src/glsl/glsl_lexer.ll" +#line 304 "src/glsl/glsl_lexer.ll" { if (yyextra->OES_EGL_image_external_enable) return SAMPLEREXTERNALOES; @@ -2007,17 +2012,17 @@ YY_RULE_SETUP YY_BREAK case 95: YY_RULE_SETUP -#line 307 "src/glsl/glsl_lexer.ll" +#line 312 "src/glsl/glsl_lexer.ll" return STRUCT; YY_BREAK case 96: YY_RULE_SETUP -#line 308 "src/glsl/glsl_lexer.ll" +#line 313 "src/glsl/glsl_lexer.ll" return VOID_TOK; YY_BREAK case 97: YY_RULE_SETUP -#line 310 "src/glsl/glsl_lexer.ll" +#line 315 "src/glsl/glsl_lexer.ll" { if ((yyextra->language_version >= 140) || yyextra->AMD_conservative_depth_enable @@ -2034,133 +2039,133 @@ YY_RULE_SETUP YY_BREAK case 98: YY_RULE_SETUP -#line 324 "src/glsl/glsl_lexer.ll" +#line 329 "src/glsl/glsl_lexer.ll" return INC_OP; YY_BREAK case 99: YY_RULE_SETUP -#line 325 "src/glsl/glsl_lexer.ll" +#line 330 "src/glsl/glsl_lexer.ll" return DEC_OP; YY_BREAK case 100: YY_RULE_SETUP -#line 326 "src/glsl/glsl_lexer.ll" +#line 331 "src/glsl/glsl_lexer.ll" return LE_OP; YY_BREAK case 101: YY_RULE_SETUP -#line 327 "src/glsl/glsl_lexer.ll" +#line 332 "src/glsl/glsl_lexer.ll" return GE_OP; YY_BREAK case 102: YY_RULE_SETUP -#line 328 "src/glsl/glsl_lexer.ll" +#line 333 "src/glsl/glsl_lexer.ll" return EQ_OP; YY_BREAK case 103: YY_RULE_SETUP -#line 329 "src/glsl/glsl_lexer.ll" +#line 334 "src/glsl/glsl_lexer.ll" return NE_OP; YY_BREAK case 104: YY_RULE_SETUP -#line 330 "src/glsl/glsl_lexer.ll" +#line 335 "src/glsl/glsl_lexer.ll" return AND_OP; YY_BREAK case 105: YY_RULE_SETUP -#line 331 "src/glsl/glsl_lexer.ll" +#line 336 "src/glsl/glsl_lexer.ll" return OR_OP; YY_BREAK case 106: YY_RULE_SETUP -#line 332 "src/glsl/glsl_lexer.ll" +#line 337 "src/glsl/glsl_lexer.ll" return XOR_OP; YY_BREAK case 107: YY_RULE_SETUP -#line 333 "src/glsl/glsl_lexer.ll" +#line 338 "src/glsl/glsl_lexer.ll" return LEFT_OP; YY_BREAK case 108: YY_RULE_SETUP -#line 334 "src/glsl/glsl_lexer.ll" +#line 339 "src/glsl/glsl_lexer.ll" return RIGHT_OP; YY_BREAK case 109: YY_RULE_SETUP -#line 336 "src/glsl/glsl_lexer.ll" +#line 341 "src/glsl/glsl_lexer.ll" return MUL_ASSIGN; YY_BREAK case 110: YY_RULE_SETUP -#line 337 "src/glsl/glsl_lexer.ll" +#line 342 "src/glsl/glsl_lexer.ll" return DIV_ASSIGN; YY_BREAK case 111: YY_RULE_SETUP -#line 338 "src/glsl/glsl_lexer.ll" +#line 343 "src/glsl/glsl_lexer.ll" return ADD_ASSIGN; YY_BREAK case 112: YY_RULE_SETUP -#line 339 "src/glsl/glsl_lexer.ll" +#line 344 "src/glsl/glsl_lexer.ll" return MOD_ASSIGN; YY_BREAK case 113: YY_RULE_SETUP -#line 340 "src/glsl/glsl_lexer.ll" +#line 345 "src/glsl/glsl_lexer.ll" return LEFT_ASSIGN; YY_BREAK case 114: YY_RULE_SETUP -#line 341 "src/glsl/glsl_lexer.ll" +#line 346 "src/glsl/glsl_lexer.ll" return RIGHT_ASSIGN; YY_BREAK case 115: YY_RULE_SETUP -#line 342 "src/glsl/glsl_lexer.ll" +#line 347 "src/glsl/glsl_lexer.ll" return AND_ASSIGN; YY_BREAK case 116: YY_RULE_SETUP -#line 343 "src/glsl/glsl_lexer.ll" +#line 348 "src/glsl/glsl_lexer.ll" return XOR_ASSIGN; YY_BREAK case 117: YY_RULE_SETUP -#line 344 "src/glsl/glsl_lexer.ll" +#line 349 "src/glsl/glsl_lexer.ll" return OR_ASSIGN; YY_BREAK case 118: YY_RULE_SETUP -#line 345 "src/glsl/glsl_lexer.ll" +#line 350 "src/glsl/glsl_lexer.ll" return SUB_ASSIGN; YY_BREAK case 119: YY_RULE_SETUP -#line 347 "src/glsl/glsl_lexer.ll" +#line 352 "src/glsl/glsl_lexer.ll" { return LITERAL_INTEGER(10); } YY_BREAK case 120: YY_RULE_SETUP -#line 350 "src/glsl/glsl_lexer.ll" +#line 355 "src/glsl/glsl_lexer.ll" { return LITERAL_INTEGER(16); } YY_BREAK case 121: YY_RULE_SETUP -#line 353 "src/glsl/glsl_lexer.ll" +#line 358 "src/glsl/glsl_lexer.ll" { return LITERAL_INTEGER(8); } YY_BREAK case 122: YY_RULE_SETUP -#line 357 "src/glsl/glsl_lexer.ll" +#line 362 "src/glsl/glsl_lexer.ll" { yylval->real = glsl_strtod(yytext, NULL); return FLOATCONSTANT; @@ -2168,7 +2173,7 @@ YY_RULE_SETUP YY_BREAK case 123: YY_RULE_SETUP -#line 361 "src/glsl/glsl_lexer.ll" +#line 366 "src/glsl/glsl_lexer.ll" { yylval->real = glsl_strtod(yytext, NULL); return FLOATCONSTANT; @@ -2176,7 +2181,7 @@ YY_RULE_SETUP YY_BREAK case 124: YY_RULE_SETUP -#line 365 "src/glsl/glsl_lexer.ll" +#line 370 "src/glsl/glsl_lexer.ll" { yylval->real = glsl_strtod(yytext, NULL); return FLOATCONSTANT; @@ -2184,7 +2189,7 @@ YY_RULE_SETUP YY_BREAK case 125: YY_RULE_SETUP -#line 369 "src/glsl/glsl_lexer.ll" +#line 374 "src/glsl/glsl_lexer.ll" { yylval->real = glsl_strtod(yytext, NULL); return FLOATCONSTANT; @@ -2192,7 +2197,7 @@ YY_RULE_SETUP YY_BREAK case 126: YY_RULE_SETUP -#line 373 "src/glsl/glsl_lexer.ll" +#line 378 "src/glsl/glsl_lexer.ll" { yylval->real = glsl_strtod(yytext, NULL); return FLOATCONSTANT; @@ -2200,7 +2205,7 @@ YY_RULE_SETUP YY_BREAK case 127: YY_RULE_SETUP -#line 378 "src/glsl/glsl_lexer.ll" +#line 383 "src/glsl/glsl_lexer.ll" { yylval->n = 1; return BOOLCONSTANT; @@ -2208,7 +2213,7 @@ YY_RULE_SETUP YY_BREAK case 128: YY_RULE_SETUP -#line 382 "src/glsl/glsl_lexer.ll" +#line 387 "src/glsl/glsl_lexer.ll" { yylval->n = 0; return BOOLCONSTANT; @@ -2217,430 +2222,430 @@ YY_RULE_SETUP /* Reserved words in GLSL 1.10. */ case 129: YY_RULE_SETUP -#line 389 "src/glsl/glsl_lexer.ll" +#line 394 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, ASM); YY_BREAK case 130: YY_RULE_SETUP -#line 390 "src/glsl/glsl_lexer.ll" +#line 395 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, CLASS); YY_BREAK case 131: YY_RULE_SETUP -#line 391 "src/glsl/glsl_lexer.ll" +#line 396 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, UNION); YY_BREAK case 132: YY_RULE_SETUP -#line 392 "src/glsl/glsl_lexer.ll" +#line 397 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, ENUM); YY_BREAK case 133: YY_RULE_SETUP -#line 393 "src/glsl/glsl_lexer.ll" +#line 398 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, TYPEDEF); YY_BREAK case 134: YY_RULE_SETUP -#line 394 "src/glsl/glsl_lexer.ll" +#line 399 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, TEMPLATE); YY_BREAK case 135: YY_RULE_SETUP -#line 395 "src/glsl/glsl_lexer.ll" +#line 400 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, THIS); YY_BREAK case 136: YY_RULE_SETUP -#line 396 "src/glsl/glsl_lexer.ll" +#line 401 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 140 || yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK); YY_BREAK case 137: YY_RULE_SETUP -#line 397 "src/glsl/glsl_lexer.ll" +#line 402 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, GOTO); YY_BREAK case 138: YY_RULE_SETUP -#line 398 "src/glsl/glsl_lexer.ll" +#line 403 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 130, SWITCH); YY_BREAK case 139: YY_RULE_SETUP -#line 399 "src/glsl/glsl_lexer.ll" +#line 404 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 130, DEFAULT); YY_BREAK case 140: YY_RULE_SETUP -#line 400 "src/glsl/glsl_lexer.ll" +#line 405 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, INLINE_TOK); YY_BREAK case 141: YY_RULE_SETUP -#line 401 "src/glsl/glsl_lexer.ll" +#line 406 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, NOINLINE); YY_BREAK case 142: YY_RULE_SETUP -#line 402 "src/glsl/glsl_lexer.ll" +#line 407 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, VOLATILE); YY_BREAK case 143: YY_RULE_SETUP -#line 403 "src/glsl/glsl_lexer.ll" +#line 408 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, PUBLIC_TOK); YY_BREAK case 144: YY_RULE_SETUP -#line 404 "src/glsl/glsl_lexer.ll" +#line 409 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, STATIC); YY_BREAK case 145: YY_RULE_SETUP -#line 405 "src/glsl/glsl_lexer.ll" +#line 410 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, EXTERN); YY_BREAK case 146: YY_RULE_SETUP -#line 406 "src/glsl/glsl_lexer.ll" +#line 411 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, EXTERNAL); YY_BREAK case 147: YY_RULE_SETUP -#line 407 "src/glsl/glsl_lexer.ll" +#line 412 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, INTERFACE); YY_BREAK case 148: YY_RULE_SETUP -#line 408 "src/glsl/glsl_lexer.ll" +#line 413 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, LONG_TOK); YY_BREAK case 149: YY_RULE_SETUP -#line 409 "src/glsl/glsl_lexer.ll" +#line 414 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, SHORT_TOK); YY_BREAK case 150: YY_RULE_SETUP -#line 410 "src/glsl/glsl_lexer.ll" +#line 415 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 400, DOUBLE_TOK); YY_BREAK case 151: YY_RULE_SETUP -#line 411 "src/glsl/glsl_lexer.ll" +#line 416 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, HALF); YY_BREAK case 152: YY_RULE_SETUP -#line 412 "src/glsl/glsl_lexer.ll" +#line 417 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, FIXED_TOK); YY_BREAK case 153: YY_RULE_SETUP -#line 413 "src/glsl/glsl_lexer.ll" +#line 418 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, UNSIGNED); YY_BREAK case 154: YY_RULE_SETUP -#line 414 "src/glsl/glsl_lexer.ll" +#line 419 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, INPUT_TOK); YY_BREAK case 155: YY_RULE_SETUP -#line 415 "src/glsl/glsl_lexer.ll" +#line 420 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, OUTPUT); YY_BREAK case 156: YY_RULE_SETUP -#line 416 "src/glsl/glsl_lexer.ll" +#line 421 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, HVEC2); YY_BREAK case 157: YY_RULE_SETUP -#line 417 "src/glsl/glsl_lexer.ll" +#line 422 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, HVEC3); YY_BREAK case 158: YY_RULE_SETUP -#line 418 "src/glsl/glsl_lexer.ll" +#line 423 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, HVEC4); YY_BREAK case 159: YY_RULE_SETUP -#line 419 "src/glsl/glsl_lexer.ll" +#line 424 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 400, DVEC2); YY_BREAK case 160: YY_RULE_SETUP -#line 420 "src/glsl/glsl_lexer.ll" +#line 425 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 400, DVEC3); YY_BREAK case 161: YY_RULE_SETUP -#line 421 "src/glsl/glsl_lexer.ll" +#line 426 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 400, DVEC4); YY_BREAK case 162: YY_RULE_SETUP -#line 422 "src/glsl/glsl_lexer.ll" +#line 427 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, FVEC2); YY_BREAK case 163: YY_RULE_SETUP -#line 423 "src/glsl/glsl_lexer.ll" +#line 428 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, FVEC3); YY_BREAK case 164: YY_RULE_SETUP -#line 424 "src/glsl/glsl_lexer.ll" +#line 429 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, FVEC4); YY_BREAK case 165: YY_RULE_SETUP -#line 425 "src/glsl/glsl_lexer.ll" +#line 430 "src/glsl/glsl_lexer.ll" return SAMPLER2DRECT; YY_BREAK case 166: YY_RULE_SETUP -#line 426 "src/glsl/glsl_lexer.ll" +#line 431 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, SAMPLER3DRECT); YY_BREAK case 167: YY_RULE_SETUP -#line 427 "src/glsl/glsl_lexer.ll" +#line 432 "src/glsl/glsl_lexer.ll" return SAMPLER2DRECTSHADOW; YY_BREAK case 168: YY_RULE_SETUP -#line 428 "src/glsl/glsl_lexer.ll" +#line 433 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, SIZEOF); YY_BREAK case 169: YY_RULE_SETUP -#line 429 "src/glsl/glsl_lexer.ll" +#line 434 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, CAST); YY_BREAK case 170: YY_RULE_SETUP -#line 430 "src/glsl/glsl_lexer.ll" +#line 435 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, NAMESPACE); YY_BREAK case 171: YY_RULE_SETUP -#line 431 "src/glsl/glsl_lexer.ll" +#line 436 "src/glsl/glsl_lexer.ll" KEYWORD(110 || ES, 999, USING); YY_BREAK /* Additional reserved words in GLSL 1.20. */ case 172: YY_RULE_SETUP -#line 434 "src/glsl/glsl_lexer.ll" +#line 439 "src/glsl/glsl_lexer.ll" KEYWORD(120, 130 || ES, LOWP); YY_BREAK case 173: YY_RULE_SETUP -#line 435 "src/glsl/glsl_lexer.ll" +#line 440 "src/glsl/glsl_lexer.ll" KEYWORD(120, 130 || ES, MEDIUMP); YY_BREAK case 174: YY_RULE_SETUP -#line 436 "src/glsl/glsl_lexer.ll" +#line 441 "src/glsl/glsl_lexer.ll" KEYWORD(120, 130 || ES, HIGHP); YY_BREAK case 175: YY_RULE_SETUP -#line 437 "src/glsl/glsl_lexer.ll" +#line 442 "src/glsl/glsl_lexer.ll" KEYWORD(120, 130 || ES, PRECISION); YY_BREAK /* Additional reserved words in GLSL 1.30. */ case 176: YY_RULE_SETUP -#line 440 "src/glsl/glsl_lexer.ll" +#line 445 "src/glsl/glsl_lexer.ll" KEYWORD(130, 130, CASE); YY_BREAK case 177: YY_RULE_SETUP -#line 441 "src/glsl/glsl_lexer.ll" +#line 446 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, COMMON); YY_BREAK case 178: YY_RULE_SETUP -#line 442 "src/glsl/glsl_lexer.ll" +#line 447 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, PARTITION); YY_BREAK case 179: YY_RULE_SETUP -#line 443 "src/glsl/glsl_lexer.ll" +#line 448 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, ACTIVE); YY_BREAK case 180: YY_RULE_SETUP -#line 444 "src/glsl/glsl_lexer.ll" +#line 449 "src/glsl/glsl_lexer.ll" KEYWORD(130 || ES, 999, SUPERP); YY_BREAK case 181: YY_RULE_SETUP -#line 445 "src/glsl/glsl_lexer.ll" +#line 450 "src/glsl/glsl_lexer.ll" KEYWORD(130, 140, SAMPLERBUFFER); YY_BREAK case 182: YY_RULE_SETUP -#line 446 "src/glsl/glsl_lexer.ll" +#line 451 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, FILTER); YY_BREAK case 183: YY_RULE_SETUP -#line 447 "src/glsl/glsl_lexer.ll" +#line 452 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE1D); YY_BREAK case 184: YY_RULE_SETUP -#line 448 "src/glsl/glsl_lexer.ll" +#line 453 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE2D); YY_BREAK case 185: YY_RULE_SETUP -#line 449 "src/glsl/glsl_lexer.ll" +#line 454 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE3D); YY_BREAK case 186: YY_RULE_SETUP -#line 450 "src/glsl/glsl_lexer.ll" +#line 455 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGECUBE); YY_BREAK case 187: YY_RULE_SETUP -#line 451 "src/glsl/glsl_lexer.ll" +#line 456 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IIMAGE1D); YY_BREAK case 188: YY_RULE_SETUP -#line 452 "src/glsl/glsl_lexer.ll" +#line 457 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IIMAGE2D); YY_BREAK case 189: YY_RULE_SETUP -#line 453 "src/glsl/glsl_lexer.ll" +#line 458 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IIMAGE3D); YY_BREAK case 190: YY_RULE_SETUP -#line 454 "src/glsl/glsl_lexer.ll" +#line 459 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IIMAGECUBE); YY_BREAK case 191: YY_RULE_SETUP -#line 455 "src/glsl/glsl_lexer.ll" +#line 460 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, UIMAGE1D); YY_BREAK case 192: YY_RULE_SETUP -#line 456 "src/glsl/glsl_lexer.ll" +#line 461 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, UIMAGE2D); YY_BREAK case 193: YY_RULE_SETUP -#line 457 "src/glsl/glsl_lexer.ll" +#line 462 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, UIMAGE3D); YY_BREAK case 194: YY_RULE_SETUP -#line 458 "src/glsl/glsl_lexer.ll" +#line 463 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, UIMAGECUBE); YY_BREAK case 195: YY_RULE_SETUP -#line 459 "src/glsl/glsl_lexer.ll" +#line 464 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE1DARRAY); YY_BREAK case 196: YY_RULE_SETUP -#line 460 "src/glsl/glsl_lexer.ll" +#line 465 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE2DARRAY); YY_BREAK case 197: YY_RULE_SETUP -#line 461 "src/glsl/glsl_lexer.ll" +#line 466 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IIMAGE1DARRAY); YY_BREAK case 198: YY_RULE_SETUP -#line 462 "src/glsl/glsl_lexer.ll" +#line 467 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IIMAGE2DARRAY); YY_BREAK case 199: YY_RULE_SETUP -#line 463 "src/glsl/glsl_lexer.ll" +#line 468 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, UIMAGE1DARRAY); YY_BREAK case 200: YY_RULE_SETUP -#line 464 "src/glsl/glsl_lexer.ll" +#line 469 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, UIMAGE2DARRAY); YY_BREAK case 201: YY_RULE_SETUP -#line 465 "src/glsl/glsl_lexer.ll" +#line 470 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE1DSHADOW); YY_BREAK case 202: YY_RULE_SETUP -#line 466 "src/glsl/glsl_lexer.ll" +#line 471 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE2DSHADOW); YY_BREAK case 203: YY_RULE_SETUP -#line 467 "src/glsl/glsl_lexer.ll" +#line 472 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE1DARRAYSHADOW); YY_BREAK case 204: YY_RULE_SETUP -#line 468 "src/glsl/glsl_lexer.ll" +#line 473 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGE2DARRAYSHADOW); YY_BREAK case 205: YY_RULE_SETUP -#line 469 "src/glsl/glsl_lexer.ll" +#line 474 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IMAGEBUFFER); YY_BREAK case 206: YY_RULE_SETUP -#line 470 "src/glsl/glsl_lexer.ll" +#line 475 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, IIMAGEBUFFER); YY_BREAK case 207: YY_RULE_SETUP -#line 471 "src/glsl/glsl_lexer.ll" +#line 476 "src/glsl/glsl_lexer.ll" KEYWORD(130, 999, UIMAGEBUFFER); YY_BREAK case 208: YY_RULE_SETUP -#line 472 "src/glsl/glsl_lexer.ll" +#line 477 "src/glsl/glsl_lexer.ll" KEYWORD(130, 140 || yyextra->ARB_uniform_buffer_object_enable, ROW_MAJOR); YY_BREAK /* Additional reserved words in GLSL 1.40 */ case 209: YY_RULE_SETUP -#line 475 "src/glsl/glsl_lexer.ll" +#line 480 "src/glsl/glsl_lexer.ll" KEYWORD(140, 140, ISAMPLER2DRECT); YY_BREAK case 210: YY_RULE_SETUP -#line 476 "src/glsl/glsl_lexer.ll" +#line 481 "src/glsl/glsl_lexer.ll" KEYWORD(140, 140, USAMPLER2DRECT); YY_BREAK case 211: YY_RULE_SETUP -#line 477 "src/glsl/glsl_lexer.ll" +#line 482 "src/glsl/glsl_lexer.ll" KEYWORD(140, 140, ISAMPLERBUFFER); YY_BREAK case 212: YY_RULE_SETUP -#line 478 "src/glsl/glsl_lexer.ll" +#line 483 "src/glsl/glsl_lexer.ll" KEYWORD(140, 140, USAMPLERBUFFER); YY_BREAK case 213: YY_RULE_SETUP -#line 480 "src/glsl/glsl_lexer.ll" +#line 485 "src/glsl/glsl_lexer.ll" { struct _mesa_glsl_parse_state *state = yyextra; void *ctx = state; @@ -2650,15 +2655,15 @@ YY_RULE_SETUP YY_BREAK case 214: YY_RULE_SETUP -#line 487 "src/glsl/glsl_lexer.ll" +#line 492 "src/glsl/glsl_lexer.ll" { return yytext[0]; } YY_BREAK case 215: YY_RULE_SETUP -#line 489 "src/glsl/glsl_lexer.ll" +#line 494 "src/glsl/glsl_lexer.ll" ECHO; YY_BREAK -#line 2662 "src/glsl/glsl_lexer.cpp" +#line 2667 "src/glsl/glsl_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PP): case YY_STATE_EOF(PRAGMA): @@ -3801,7 +3806,7 @@ void _mesa_glsl_free (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 489 "src/glsl/glsl_lexer.ll" +#line 494 "src/glsl/glsl_lexer.ll" diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.ll b/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.ll index d98384aae..5bab3118d 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.ll +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_lexer.ll @@ -28,6 +28,11 @@ #include "glsl_parser_extras.h" #include "glsl_parser.h" +#if defined(_MSC_VER) +# pragma warning(disable: 4065) // warning C4065: switch statement contains 'default' but no 'case' labels +# pragma warning(disable: 4244) // warning C4244: '=' : conversion from 'double' to 'float', possible loss of data +#endif // defined(_MSC_VER) + static int classify_identifier(struct _mesa_glsl_parse_state *, const char *); #ifdef _MSC_VER diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.cpp b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.cpp index a4f108382..1618b38d8 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.cpp @@ -108,6 +108,11 @@ #include "glsl_types.h" #include "main/context.h" +#if defined(_MSC_VER) +# pragma warning(disable: 4065) // warning C4065: switch statement contains 'default' but no 'case' labels +# pragma warning(disable: 4244) // warning C4244: '=' : conversion from 'double' to 'float', possible loss of data +#endif // defined(_MSC_VER) + #define YYLEX_PARAM state->scanner #undef yyerror @@ -119,7 +124,7 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg) /* Line 268 of yacc.c */ -#line 123 "src/glsl/glsl_parser.cpp" +#line 128 "src/glsl/glsl_parser.cpp" /* Enabling traces. */ #ifndef YYDEBUG @@ -354,7 +359,7 @@ typedef union YYSTYPE { /* Line 293 of yacc.c */ -#line 59 "src/glsl/glsl_parser.yy" +#line 64 "src/glsl/glsl_parser.yy" int n; float real; @@ -392,7 +397,7 @@ typedef union YYSTYPE /* Line 293 of yacc.c */ -#line 396 "src/glsl/glsl_parser.cpp" +#line 401 "src/glsl/glsl_parser.cpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -417,7 +422,7 @@ typedef struct YYLTYPE /* Line 343 of yacc.c */ -#line 421 "src/glsl/glsl_parser.cpp" +#line 426 "src/glsl/glsl_parser.cpp" #ifdef short # undef short @@ -845,38 +850,38 @@ static const yytype_int16 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 243, 243, 242, 254, 256, 309, 310, 311, 312, - 313, 325, 327, 331, 332, 333, 337, 346, 354, 365, - 366, 370, 377, 384, 391, 398, 405, 412, 413, 419, - 423, 430, 436, 445, 449, 453, 454, 463, 464, 468, - 469, 473, 479, 491, 495, 501, 508, 518, 519, 523, - 524, 528, 534, 546, 557, 558, 564, 570, 580, 581, - 582, 583, 587, 588, 594, 600, 609, 610, 616, 625, - 626, 632, 641, 642, 648, 654, 660, 669, 670, 676, - 685, 686, 695, 696, 705, 706, 715, 716, 725, 726, - 735, 736, 745, 746, 755, 756, 765, 766, 767, 768, - 769, 770, 771, 772, 773, 774, 775, 779, 783, 799, - 803, 808, 812, 818, 825, 829, 830, 834, 839, 847, - 861, 871, 886, 893, 898, 909, 922, 925, 930, 935, - 944, 948, 949, 959, 969, 979, 989, 999, 1013, 1020, - 1029, 1038, 1047, 1056, 1065, 1074, 1088, 1095, 1106, 1113, - 1114, 1124, 1192, 1238, 1260, 1265, 1273, 1278, 1283, 1291, - 1299, 1300, 1301, 1306, 1307, 1312, 1317, 1323, 1331, 1336, - 1341, 1346, 1352, 1357, 1362, 1367, 1372, 1380, 1384, 1392, - 1393, 1399, 1408, 1414, 1420, 1429, 1430, 1431, 1432, 1433, - 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, - 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, - 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, - 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, - 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, - 1484, 1485, 1489, 1499, 1509, 1522, 1529, 1538, 1543, 1551, - 1566, 1571, 1579, 1586, 1595, 1599, 1605, 1606, 1610, 1611, - 1612, 1613, 1614, 1615, 1619, 1626, 1625, 1639, 1640, 1644, - 1650, 1659, 1669, 1681, 1687, 1696, 1705, 1710, 1718, 1722, - 1740, 1748, 1753, 1761, 1766, 1774, 1782, 1790, 1798, 1806, - 1814, 1822, 1829, 1836, 1846, 1847, 1851, 1853, 1859, 1864, - 1873, 1879, 1885, 1891, 1897, 1906, 1907, 1908, 1909, 1913, - 1927, 1943, 1966, 1971, 1979, 1981, 1985, 2000, 2017 + 0, 248, 248, 247, 259, 261, 314, 315, 316, 317, + 318, 330, 332, 336, 337, 338, 342, 351, 359, 370, + 371, 375, 382, 389, 396, 403, 410, 417, 418, 424, + 428, 435, 441, 450, 454, 458, 459, 468, 469, 473, + 474, 478, 484, 496, 500, 506, 513, 523, 524, 528, + 529, 533, 539, 551, 562, 563, 569, 575, 585, 586, + 587, 588, 592, 593, 599, 605, 614, 615, 621, 630, + 631, 637, 646, 647, 653, 659, 665, 674, 675, 681, + 690, 691, 700, 701, 710, 711, 720, 721, 730, 731, + 740, 741, 750, 751, 760, 761, 770, 771, 772, 773, + 774, 775, 776, 777, 778, 779, 780, 784, 788, 804, + 808, 813, 817, 823, 830, 834, 835, 839, 844, 852, + 866, 876, 891, 898, 903, 914, 927, 930, 935, 940, + 949, 953, 954, 964, 974, 984, 994, 1004, 1018, 1025, + 1034, 1043, 1052, 1061, 1070, 1079, 1093, 1100, 1111, 1118, + 1119, 1129, 1197, 1243, 1265, 1270, 1278, 1283, 1288, 1296, + 1304, 1305, 1306, 1311, 1312, 1317, 1322, 1328, 1336, 1341, + 1346, 1351, 1357, 1362, 1367, 1372, 1377, 1385, 1389, 1397, + 1398, 1404, 1413, 1419, 1425, 1434, 1435, 1436, 1437, 1438, + 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, + 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, + 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, + 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, + 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, + 1489, 1490, 1494, 1504, 1514, 1527, 1534, 1543, 1548, 1556, + 1571, 1576, 1584, 1591, 1600, 1604, 1610, 1611, 1615, 1616, + 1617, 1618, 1619, 1620, 1624, 1631, 1630, 1644, 1645, 1649, + 1655, 1664, 1674, 1686, 1692, 1701, 1710, 1715, 1723, 1727, + 1745, 1753, 1758, 1766, 1771, 1779, 1787, 1795, 1803, 1811, + 1819, 1827, 1834, 1841, 1851, 1852, 1856, 1858, 1864, 1869, + 1878, 1884, 1890, 1896, 1902, 1911, 1912, 1913, 1914, 1918, + 1932, 1948, 1971, 1976, 1984, 1986, 1990, 2005, 2022 }; #endif @@ -2611,7 +2616,7 @@ YYLTYPE yylloc; /* User initialization code. */ /* Line 1590 of yacc.c */ -#line 48 "src/glsl/glsl_parser.yy" +#line 53 "src/glsl/glsl_parser.yy" { yylloc.first_line = 1; yylloc.first_column = 1; @@ -2621,7 +2626,7 @@ YYLTYPE yylloc; } /* Line 1590 of yacc.c */ -#line 2625 "src/glsl/glsl_parser.cpp" +#line 2630 "src/glsl/glsl_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2809,7 +2814,7 @@ yyreduce: case 2: /* Line 1806 of yacc.c */ -#line 243 "src/glsl/glsl_parser.yy" +#line 248 "src/glsl/glsl_parser.yy" { _mesa_glsl_initialize_types(state); } @@ -2818,7 +2823,7 @@ yyreduce: case 3: /* Line 1806 of yacc.c */ -#line 247 "src/glsl/glsl_parser.yy" +#line 252 "src/glsl/glsl_parser.yy" { delete state->symbols; state->symbols = new(ralloc_parent(state)) glsl_symbol_table; @@ -2829,7 +2834,7 @@ yyreduce: case 5: /* Line 1806 of yacc.c */ -#line 257 "src/glsl/glsl_parser.yy" +#line 262 "src/glsl/glsl_parser.yy" { bool supported = false; @@ -2884,7 +2889,7 @@ yyreduce: case 10: /* Line 1806 of yacc.c */ -#line 314 "src/glsl/glsl_parser.yy" +#line 319 "src/glsl/glsl_parser.yy" { if (state->language_version == 110) { _mesa_glsl_warning(& (yylsp[(1) - (2)]), state, @@ -2899,7 +2904,7 @@ yyreduce: case 16: /* Line 1806 of yacc.c */ -#line 338 "src/glsl/glsl_parser.yy" +#line 343 "src/glsl/glsl_parser.yy" { if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) { YYERROR; @@ -2910,7 +2915,7 @@ yyreduce: case 17: /* Line 1806 of yacc.c */ -#line 347 "src/glsl/glsl_parser.yy" +#line 352 "src/glsl/glsl_parser.yy" { /* FINISHME: The NULL test is required because pragmas are set to * FINISHME: NULL. (See production rule for external_declaration.) @@ -2923,7 +2928,7 @@ yyreduce: case 18: /* Line 1806 of yacc.c */ -#line 355 "src/glsl/glsl_parser.yy" +#line 360 "src/glsl/glsl_parser.yy" { /* FINISHME: The NULL test is required because pragmas are set to * FINISHME: NULL. (See production rule for external_declaration.) @@ -2936,7 +2941,7 @@ yyreduce: case 21: /* Line 1806 of yacc.c */ -#line 371 "src/glsl/glsl_parser.yy" +#line 376 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL); @@ -2948,7 +2953,7 @@ yyreduce: case 22: /* Line 1806 of yacc.c */ -#line 378 "src/glsl/glsl_parser.yy" +#line 383 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL); @@ -2960,7 +2965,7 @@ yyreduce: case 23: /* Line 1806 of yacc.c */ -#line 385 "src/glsl/glsl_parser.yy" +#line 390 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL); @@ -2972,7 +2977,7 @@ yyreduce: case 24: /* Line 1806 of yacc.c */ -#line 392 "src/glsl/glsl_parser.yy" +#line 397 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL); @@ -2984,7 +2989,7 @@ yyreduce: case 25: /* Line 1806 of yacc.c */ -#line 399 "src/glsl/glsl_parser.yy" +#line 404 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL); @@ -2996,7 +3001,7 @@ yyreduce: case 26: /* Line 1806 of yacc.c */ -#line 406 "src/glsl/glsl_parser.yy" +#line 411 "src/glsl/glsl_parser.yy" { (yyval.expression) = (yyvsp[(2) - (3)].expression); } @@ -3005,7 +3010,7 @@ yyreduce: case 28: /* Line 1806 of yacc.c */ -#line 414 "src/glsl/glsl_parser.yy" +#line 419 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[(1) - (4)].expression), (yyvsp[(3) - (4)].expression), NULL); @@ -3016,7 +3021,7 @@ yyreduce: case 29: /* Line 1806 of yacc.c */ -#line 420 "src/glsl/glsl_parser.yy" +#line 425 "src/glsl/glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (1)].expression); } @@ -3025,7 +3030,7 @@ yyreduce: case 30: /* Line 1806 of yacc.c */ -#line 424 "src/glsl/glsl_parser.yy" +#line 429 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), NULL, NULL); @@ -3037,7 +3042,7 @@ yyreduce: case 31: /* Line 1806 of yacc.c */ -#line 431 "src/glsl/glsl_parser.yy" +#line 436 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL); @@ -3048,7 +3053,7 @@ yyreduce: case 32: /* Line 1806 of yacc.c */ -#line 437 "src/glsl/glsl_parser.yy" +#line 442 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL); @@ -3059,7 +3064,7 @@ yyreduce: case 36: /* Line 1806 of yacc.c */ -#line 455 "src/glsl/glsl_parser.yy" +#line 460 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL); @@ -3070,7 +3075,7 @@ yyreduce: case 41: /* Line 1806 of yacc.c */ -#line 474 "src/glsl/glsl_parser.yy" +#line 479 "src/glsl/glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (2)].expression); (yyval.expression)->set_location(yylloc); @@ -3081,7 +3086,7 @@ yyreduce: case 42: /* Line 1806 of yacc.c */ -#line 480 "src/glsl/glsl_parser.yy" +#line 485 "src/glsl/glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (3)].expression); (yyval.expression)->set_location(yylloc); @@ -3092,7 +3097,7 @@ yyreduce: case 44: /* Line 1806 of yacc.c */ -#line 496 "src/glsl/glsl_parser.yy" +#line 501 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1)].type_specifier)); @@ -3103,7 +3108,7 @@ yyreduce: case 45: /* Line 1806 of yacc.c */ -#line 502 "src/glsl/glsl_parser.yy" +#line 507 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier)); @@ -3115,7 +3120,7 @@ yyreduce: case 46: /* Line 1806 of yacc.c */ -#line 509 "src/glsl/glsl_parser.yy" +#line 514 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier)); @@ -3127,7 +3132,7 @@ yyreduce: case 51: /* Line 1806 of yacc.c */ -#line 529 "src/glsl/glsl_parser.yy" +#line 534 "src/glsl/glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (2)].expression); (yyval.expression)->set_location(yylloc); @@ -3138,7 +3143,7 @@ yyreduce: case 52: /* Line 1806 of yacc.c */ -#line 535 "src/glsl/glsl_parser.yy" +#line 540 "src/glsl/glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (3)].expression); (yyval.expression)->set_location(yylloc); @@ -3149,7 +3154,7 @@ yyreduce: case 53: /* Line 1806 of yacc.c */ -#line 547 "src/glsl/glsl_parser.yy" +#line 552 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (2)].identifier)); @@ -3161,7 +3166,7 @@ yyreduce: case 55: /* Line 1806 of yacc.c */ -#line 559 "src/glsl/glsl_parser.yy" +#line 564 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL); @@ -3172,7 +3177,7 @@ yyreduce: case 56: /* Line 1806 of yacc.c */ -#line 565 "src/glsl/glsl_parser.yy" +#line 570 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL); @@ -3183,7 +3188,7 @@ yyreduce: case 57: /* Line 1806 of yacc.c */ -#line 571 "src/glsl/glsl_parser.yy" +#line 576 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].expression), NULL, NULL); @@ -3194,35 +3199,35 @@ yyreduce: case 58: /* Line 1806 of yacc.c */ -#line 580 "src/glsl/glsl_parser.yy" +#line 585 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_plus; } break; case 59: /* Line 1806 of yacc.c */ -#line 581 "src/glsl/glsl_parser.yy" +#line 586 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_neg; } break; case 60: /* Line 1806 of yacc.c */ -#line 582 "src/glsl/glsl_parser.yy" +#line 587 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_logic_not; } break; case 61: /* Line 1806 of yacc.c */ -#line 583 "src/glsl/glsl_parser.yy" +#line 588 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_bit_not; } break; case 63: /* Line 1806 of yacc.c */ -#line 589 "src/glsl/glsl_parser.yy" +#line 594 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3233,7 +3238,7 @@ yyreduce: case 64: /* Line 1806 of yacc.c */ -#line 595 "src/glsl/glsl_parser.yy" +#line 600 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3244,7 +3249,7 @@ yyreduce: case 65: /* Line 1806 of yacc.c */ -#line 601 "src/glsl/glsl_parser.yy" +#line 606 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3255,7 +3260,7 @@ yyreduce: case 67: /* Line 1806 of yacc.c */ -#line 611 "src/glsl/glsl_parser.yy" +#line 616 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3266,7 +3271,7 @@ yyreduce: case 68: /* Line 1806 of yacc.c */ -#line 617 "src/glsl/glsl_parser.yy" +#line 622 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3277,7 +3282,7 @@ yyreduce: case 70: /* Line 1806 of yacc.c */ -#line 627 "src/glsl/glsl_parser.yy" +#line 632 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3288,7 +3293,7 @@ yyreduce: case 71: /* Line 1806 of yacc.c */ -#line 633 "src/glsl/glsl_parser.yy" +#line 638 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3299,7 +3304,7 @@ yyreduce: case 73: /* Line 1806 of yacc.c */ -#line 643 "src/glsl/glsl_parser.yy" +#line 648 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3310,7 +3315,7 @@ yyreduce: case 74: /* Line 1806 of yacc.c */ -#line 649 "src/glsl/glsl_parser.yy" +#line 654 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3321,7 +3326,7 @@ yyreduce: case 75: /* Line 1806 of yacc.c */ -#line 655 "src/glsl/glsl_parser.yy" +#line 660 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3332,7 +3337,7 @@ yyreduce: case 76: /* Line 1806 of yacc.c */ -#line 661 "src/glsl/glsl_parser.yy" +#line 666 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3343,7 +3348,7 @@ yyreduce: case 78: /* Line 1806 of yacc.c */ -#line 671 "src/glsl/glsl_parser.yy" +#line 676 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3354,7 +3359,7 @@ yyreduce: case 79: /* Line 1806 of yacc.c */ -#line 677 "src/glsl/glsl_parser.yy" +#line 682 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3365,7 +3370,7 @@ yyreduce: case 81: /* Line 1806 of yacc.c */ -#line 687 "src/glsl/glsl_parser.yy" +#line 692 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3376,7 +3381,7 @@ yyreduce: case 83: /* Line 1806 of yacc.c */ -#line 697 "src/glsl/glsl_parser.yy" +#line 702 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3387,7 +3392,7 @@ yyreduce: case 85: /* Line 1806 of yacc.c */ -#line 707 "src/glsl/glsl_parser.yy" +#line 712 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3398,7 +3403,7 @@ yyreduce: case 87: /* Line 1806 of yacc.c */ -#line 717 "src/glsl/glsl_parser.yy" +#line 722 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3409,7 +3414,7 @@ yyreduce: case 89: /* Line 1806 of yacc.c */ -#line 727 "src/glsl/glsl_parser.yy" +#line 732 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3420,7 +3425,7 @@ yyreduce: case 91: /* Line 1806 of yacc.c */ -#line 737 "src/glsl/glsl_parser.yy" +#line 742 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); @@ -3431,7 +3436,7 @@ yyreduce: case 93: /* Line 1806 of yacc.c */ -#line 747 "src/glsl/glsl_parser.yy" +#line 752 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[(1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].expression)); @@ -3442,7 +3447,7 @@ yyreduce: case 95: /* Line 1806 of yacc.c */ -#line 757 "src/glsl/glsl_parser.yy" +#line 762 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.expression) = new(ctx) ast_expression((yyvsp[(2) - (3)].n), (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL); @@ -3453,84 +3458,84 @@ yyreduce: case 96: /* Line 1806 of yacc.c */ -#line 765 "src/glsl/glsl_parser.yy" +#line 770 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_assign; } break; case 97: /* Line 1806 of yacc.c */ -#line 766 "src/glsl/glsl_parser.yy" +#line 771 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_mul_assign; } break; case 98: /* Line 1806 of yacc.c */ -#line 767 "src/glsl/glsl_parser.yy" +#line 772 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_div_assign; } break; case 99: /* Line 1806 of yacc.c */ -#line 768 "src/glsl/glsl_parser.yy" +#line 773 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_mod_assign; } break; case 100: /* Line 1806 of yacc.c */ -#line 769 "src/glsl/glsl_parser.yy" +#line 774 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_add_assign; } break; case 101: /* Line 1806 of yacc.c */ -#line 770 "src/glsl/glsl_parser.yy" +#line 775 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_sub_assign; } break; case 102: /* Line 1806 of yacc.c */ -#line 771 "src/glsl/glsl_parser.yy" +#line 776 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_ls_assign; } break; case 103: /* Line 1806 of yacc.c */ -#line 772 "src/glsl/glsl_parser.yy" +#line 777 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_rs_assign; } break; case 104: /* Line 1806 of yacc.c */ -#line 773 "src/glsl/glsl_parser.yy" +#line 778 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_and_assign; } break; case 105: /* Line 1806 of yacc.c */ -#line 774 "src/glsl/glsl_parser.yy" +#line 779 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_xor_assign; } break; case 106: /* Line 1806 of yacc.c */ -#line 775 "src/glsl/glsl_parser.yy" +#line 780 "src/glsl/glsl_parser.yy" { (yyval.n) = ast_or_assign; } break; case 107: /* Line 1806 of yacc.c */ -#line 780 "src/glsl/glsl_parser.yy" +#line 785 "src/glsl/glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (1)].expression); } @@ -3539,7 +3544,7 @@ yyreduce: case 108: /* Line 1806 of yacc.c */ -#line 784 "src/glsl/glsl_parser.yy" +#line 789 "src/glsl/glsl_parser.yy" { void *ctx = state; if ((yyvsp[(1) - (3)].expression)->oper != ast_sequence) { @@ -3557,7 +3562,7 @@ yyreduce: case 110: /* Line 1806 of yacc.c */ -#line 804 "src/glsl/glsl_parser.yy" +#line 809 "src/glsl/glsl_parser.yy" { state->symbols->pop_scope(); (yyval.node) = (yyvsp[(1) - (2)].function); @@ -3567,7 +3572,7 @@ yyreduce: case 111: /* Line 1806 of yacc.c */ -#line 809 "src/glsl/glsl_parser.yy" +#line 814 "src/glsl/glsl_parser.yy" { (yyval.node) = (yyvsp[(1) - (2)].declarator_list); } @@ -3576,7 +3581,7 @@ yyreduce: case 112: /* Line 1806 of yacc.c */ -#line 813 "src/glsl/glsl_parser.yy" +#line 818 "src/glsl/glsl_parser.yy" { (yyvsp[(3) - (4)].type_specifier)->precision = (yyvsp[(2) - (4)].n); (yyvsp[(3) - (4)].type_specifier)->is_precision_statement = true; @@ -3587,7 +3592,7 @@ yyreduce: case 113: /* Line 1806 of yacc.c */ -#line 819 "src/glsl/glsl_parser.yy" +#line 824 "src/glsl/glsl_parser.yy" { (yyval.node) = (yyvsp[(1) - (1)].node); } @@ -3596,7 +3601,7 @@ yyreduce: case 117: /* Line 1806 of yacc.c */ -#line 835 "src/glsl/glsl_parser.yy" +#line 840 "src/glsl/glsl_parser.yy" { (yyval.function) = (yyvsp[(1) - (2)].function); (yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_declarator)->link); @@ -3606,7 +3611,7 @@ yyreduce: case 118: /* Line 1806 of yacc.c */ -#line 840 "src/glsl/glsl_parser.yy" +#line 845 "src/glsl/glsl_parser.yy" { (yyval.function) = (yyvsp[(1) - (3)].function); (yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_declarator)->link); @@ -3616,7 +3621,7 @@ yyreduce: case 119: /* Line 1806 of yacc.c */ -#line 848 "src/glsl/glsl_parser.yy" +#line 853 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.function) = new(ctx) ast_function(); @@ -3632,7 +3637,7 @@ yyreduce: case 120: /* Line 1806 of yacc.c */ -#line 862 "src/glsl/glsl_parser.yy" +#line 867 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); @@ -3647,7 +3652,7 @@ yyreduce: case 121: /* Line 1806 of yacc.c */ -#line 872 "src/glsl/glsl_parser.yy" +#line 877 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); @@ -3664,7 +3669,7 @@ yyreduce: case 122: /* Line 1806 of yacc.c */ -#line 887 "src/glsl/glsl_parser.yy" +#line 892 "src/glsl/glsl_parser.yy" { (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i; @@ -3676,7 +3681,7 @@ yyreduce: case 123: /* Line 1806 of yacc.c */ -#line 894 "src/glsl/glsl_parser.yy" +#line 899 "src/glsl/glsl_parser.yy" { (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator); (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier); @@ -3686,7 +3691,7 @@ yyreduce: case 124: /* Line 1806 of yacc.c */ -#line 899 "src/glsl/glsl_parser.yy" +#line 904 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i; @@ -3702,7 +3707,7 @@ yyreduce: case 125: /* Line 1806 of yacc.c */ -#line 910 "src/glsl/glsl_parser.yy" +#line 915 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); @@ -3716,7 +3721,7 @@ yyreduce: case 126: /* Line 1806 of yacc.c */ -#line 922 "src/glsl/glsl_parser.yy" +#line 927 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); } @@ -3725,7 +3730,7 @@ yyreduce: case 127: /* Line 1806 of yacc.c */ -#line 926 "src/glsl/glsl_parser.yy" +#line 931 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.in = 1; @@ -3735,7 +3740,7 @@ yyreduce: case 128: /* Line 1806 of yacc.c */ -#line 931 "src/glsl/glsl_parser.yy" +#line 936 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.out = 1; @@ -3745,7 +3750,7 @@ yyreduce: case 129: /* Line 1806 of yacc.c */ -#line 936 "src/glsl/glsl_parser.yy" +#line 941 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.in = 1; @@ -3756,7 +3761,7 @@ yyreduce: case 132: /* Line 1806 of yacc.c */ -#line 950 "src/glsl/glsl_parser.yy" +#line 955 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (3)].identifier), false, NULL, NULL); @@ -3771,7 +3776,7 @@ yyreduce: case 133: /* Line 1806 of yacc.c */ -#line 960 "src/glsl/glsl_parser.yy" +#line 965 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), true, NULL, NULL); @@ -3786,7 +3791,7 @@ yyreduce: case 134: /* Line 1806 of yacc.c */ -#line 970 "src/glsl/glsl_parser.yy" +#line 975 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (6)].identifier), true, (yyvsp[(5) - (6)].expression), NULL); @@ -3801,7 +3806,7 @@ yyreduce: case 135: /* Line 1806 of yacc.c */ -#line 980 "src/glsl/glsl_parser.yy" +#line 985 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (7)].identifier), true, NULL, (yyvsp[(7) - (7)].expression)); @@ -3816,7 +3821,7 @@ yyreduce: case 136: /* Line 1806 of yacc.c */ -#line 990 "src/glsl/glsl_parser.yy" +#line 995 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (8)].identifier), true, (yyvsp[(5) - (8)].expression), (yyvsp[(8) - (8)].expression)); @@ -3831,7 +3836,7 @@ yyreduce: case 137: /* Line 1806 of yacc.c */ -#line 1000 "src/glsl/glsl_parser.yy" +#line 1005 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), false, NULL, (yyvsp[(5) - (5)].expression)); @@ -3846,7 +3851,7 @@ yyreduce: case 138: /* Line 1806 of yacc.c */ -#line 1014 "src/glsl/glsl_parser.yy" +#line 1019 "src/glsl/glsl_parser.yy" { void *ctx = state; /* Empty declaration list is valid. */ @@ -3858,7 +3863,7 @@ yyreduce: case 139: /* Line 1806 of yacc.c */ -#line 1021 "src/glsl/glsl_parser.yy" +#line 1026 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL); @@ -3872,7 +3877,7 @@ yyreduce: case 140: /* Line 1806 of yacc.c */ -#line 1030 "src/glsl/glsl_parser.yy" +#line 1035 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), true, NULL, NULL); @@ -3886,7 +3891,7 @@ yyreduce: case 141: /* Line 1806 of yacc.c */ -#line 1039 "src/glsl/glsl_parser.yy" +#line 1044 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (5)].identifier), true, (yyvsp[(4) - (5)].expression), NULL); @@ -3900,7 +3905,7 @@ yyreduce: case 142: /* Line 1806 of yacc.c */ -#line 1048 "src/glsl/glsl_parser.yy" +#line 1053 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (6)].identifier), true, NULL, (yyvsp[(6) - (6)].expression)); @@ -3914,7 +3919,7 @@ yyreduce: case 143: /* Line 1806 of yacc.c */ -#line 1057 "src/glsl/glsl_parser.yy" +#line 1062 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (7)].identifier), true, (yyvsp[(4) - (7)].expression), (yyvsp[(7) - (7)].expression)); @@ -3928,7 +3933,7 @@ yyreduce: case 144: /* Line 1806 of yacc.c */ -#line 1066 "src/glsl/glsl_parser.yy" +#line 1071 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression)); @@ -3942,7 +3947,7 @@ yyreduce: case 145: /* Line 1806 of yacc.c */ -#line 1075 "src/glsl/glsl_parser.yy" +#line 1080 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL); @@ -3958,7 +3963,7 @@ yyreduce: case 146: /* Line 1806 of yacc.c */ -#line 1089 "src/glsl/glsl_parser.yy" +#line 1094 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type(); @@ -3970,7 +3975,7 @@ yyreduce: case 147: /* Line 1806 of yacc.c */ -#line 1096 "src/glsl/glsl_parser.yy" +#line 1101 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type(); @@ -3983,7 +3988,7 @@ yyreduce: case 148: /* Line 1806 of yacc.c */ -#line 1107 "src/glsl/glsl_parser.yy" +#line 1112 "src/glsl/glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier); } @@ -3992,7 +3997,7 @@ yyreduce: case 150: /* Line 1806 of yacc.c */ -#line 1115 "src/glsl/glsl_parser.yy" +#line 1120 "src/glsl/glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(1) - (3)].type_qualifier); if (!(yyval.type_qualifier).merge_qualifier(& (yylsp[(3) - (3)]), state, (yyvsp[(3) - (3)].type_qualifier))) { @@ -4004,7 +4009,7 @@ yyreduce: case 151: /* Line 1806 of yacc.c */ -#line 1125 "src/glsl/glsl_parser.yy" +#line 1130 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4077,7 +4082,7 @@ yyreduce: case 152: /* Line 1806 of yacc.c */ -#line 1193 "src/glsl/glsl_parser.yy" +#line 1198 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4128,7 +4133,7 @@ yyreduce: case 153: /* Line 1806 of yacc.c */ -#line 1239 "src/glsl/glsl_parser.yy" +#line 1244 "src/glsl/glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(1) - (1)].type_qualifier); /* Layout qualifiers for ARB_uniform_buffer_object. */ @@ -4147,7 +4152,7 @@ yyreduce: case 154: /* Line 1806 of yacc.c */ -#line 1261 "src/glsl/glsl_parser.yy" +#line 1266 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.row_major = 1; @@ -4157,7 +4162,7 @@ yyreduce: case 155: /* Line 1806 of yacc.c */ -#line 1266 "src/glsl/glsl_parser.yy" +#line 1271 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.packed = 1; @@ -4167,7 +4172,7 @@ yyreduce: case 156: /* Line 1806 of yacc.c */ -#line 1274 "src/glsl/glsl_parser.yy" +#line 1279 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.smooth = 1; @@ -4177,7 +4182,7 @@ yyreduce: case 157: /* Line 1806 of yacc.c */ -#line 1279 "src/glsl/glsl_parser.yy" +#line 1284 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.flat = 1; @@ -4187,7 +4192,7 @@ yyreduce: case 158: /* Line 1806 of yacc.c */ -#line 1284 "src/glsl/glsl_parser.yy" +#line 1289 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.noperspective = 1; @@ -4197,7 +4202,7 @@ yyreduce: case 159: /* Line 1806 of yacc.c */ -#line 1292 "src/glsl/glsl_parser.yy" +#line 1297 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.constant = 1; @@ -4207,7 +4212,7 @@ yyreduce: case 162: /* Line 1806 of yacc.c */ -#line 1302 "src/glsl/glsl_parser.yy" +#line 1307 "src/glsl/glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier); (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i; @@ -4217,7 +4222,7 @@ yyreduce: case 164: /* Line 1806 of yacc.c */ -#line 1308 "src/glsl/glsl_parser.yy" +#line 1313 "src/glsl/glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier); (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i; @@ -4227,7 +4232,7 @@ yyreduce: case 165: /* Line 1806 of yacc.c */ -#line 1313 "src/glsl/glsl_parser.yy" +#line 1318 "src/glsl/glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier); (yyval.type_qualifier).flags.q.invariant = 1; @@ -4237,7 +4242,7 @@ yyreduce: case 166: /* Line 1806 of yacc.c */ -#line 1318 "src/glsl/glsl_parser.yy" +#line 1323 "src/glsl/glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(2) - (3)].type_qualifier); (yyval.type_qualifier).flags.i |= (yyvsp[(3) - (3)].type_qualifier).flags.i; @@ -4248,7 +4253,7 @@ yyreduce: case 167: /* Line 1806 of yacc.c */ -#line 1324 "src/glsl/glsl_parser.yy" +#line 1329 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.invariant = 1; @@ -4258,7 +4263,7 @@ yyreduce: case 168: /* Line 1806 of yacc.c */ -#line 1332 "src/glsl/glsl_parser.yy" +#line 1337 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.constant = 1; @@ -4268,7 +4273,7 @@ yyreduce: case 169: /* Line 1806 of yacc.c */ -#line 1337 "src/glsl/glsl_parser.yy" +#line 1342 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.attribute = 1; @@ -4278,7 +4283,7 @@ yyreduce: case 170: /* Line 1806 of yacc.c */ -#line 1342 "src/glsl/glsl_parser.yy" +#line 1347 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.varying = 1; @@ -4288,7 +4293,7 @@ yyreduce: case 171: /* Line 1806 of yacc.c */ -#line 1347 "src/glsl/glsl_parser.yy" +#line 1352 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.centroid = 1; @@ -4299,7 +4304,7 @@ yyreduce: case 172: /* Line 1806 of yacc.c */ -#line 1353 "src/glsl/glsl_parser.yy" +#line 1358 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.in = 1; @@ -4309,7 +4314,7 @@ yyreduce: case 173: /* Line 1806 of yacc.c */ -#line 1358 "src/glsl/glsl_parser.yy" +#line 1363 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.out = 1; @@ -4319,7 +4324,7 @@ yyreduce: case 174: /* Line 1806 of yacc.c */ -#line 1363 "src/glsl/glsl_parser.yy" +#line 1368 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.in = 1; @@ -4329,7 +4334,7 @@ yyreduce: case 175: /* Line 1806 of yacc.c */ -#line 1368 "src/glsl/glsl_parser.yy" +#line 1373 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.out = 1; @@ -4339,7 +4344,7 @@ yyreduce: case 176: /* Line 1806 of yacc.c */ -#line 1373 "src/glsl/glsl_parser.yy" +#line 1378 "src/glsl/glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); (yyval.type_qualifier).flags.q.uniform = 1; @@ -4349,7 +4354,7 @@ yyreduce: case 177: /* Line 1806 of yacc.c */ -#line 1381 "src/glsl/glsl_parser.yy" +#line 1386 "src/glsl/glsl_parser.yy" { (yyval.type_specifier) = (yyvsp[(1) - (1)].type_specifier); } @@ -4358,7 +4363,7 @@ yyreduce: case 178: /* Line 1806 of yacc.c */ -#line 1385 "src/glsl/glsl_parser.yy" +#line 1390 "src/glsl/glsl_parser.yy" { (yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier); (yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n); @@ -4368,7 +4373,7 @@ yyreduce: case 180: /* Line 1806 of yacc.c */ -#line 1394 "src/glsl/glsl_parser.yy" +#line 1399 "src/glsl/glsl_parser.yy" { (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier); (yyval.type_specifier)->is_array = true; @@ -4379,7 +4384,7 @@ yyreduce: case 181: /* Line 1806 of yacc.c */ -#line 1400 "src/glsl/glsl_parser.yy" +#line 1405 "src/glsl/glsl_parser.yy" { (yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier); (yyval.type_specifier)->is_array = true; @@ -4390,7 +4395,7 @@ yyreduce: case 182: /* Line 1806 of yacc.c */ -#line 1409 "src/glsl/glsl_parser.yy" +#line 1414 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier)); @@ -4401,7 +4406,7 @@ yyreduce: case 183: /* Line 1806 of yacc.c */ -#line 1415 "src/glsl/glsl_parser.yy" +#line 1420 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].struct_specifier)); @@ -4412,7 +4417,7 @@ yyreduce: case 184: /* Line 1806 of yacc.c */ -#line 1421 "src/glsl/glsl_parser.yy" +#line 1426 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier)); @@ -4423,406 +4428,406 @@ yyreduce: case 185: /* Line 1806 of yacc.c */ -#line 1429 "src/glsl/glsl_parser.yy" +#line 1434 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "void"; } break; case 186: /* Line 1806 of yacc.c */ -#line 1430 "src/glsl/glsl_parser.yy" +#line 1435 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "float"; } break; case 187: /* Line 1806 of yacc.c */ -#line 1431 "src/glsl/glsl_parser.yy" +#line 1436 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "int"; } break; case 188: /* Line 1806 of yacc.c */ -#line 1432 "src/glsl/glsl_parser.yy" +#line 1437 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "uint"; } break; case 189: /* Line 1806 of yacc.c */ -#line 1433 "src/glsl/glsl_parser.yy" +#line 1438 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "bool"; } break; case 190: /* Line 1806 of yacc.c */ -#line 1434 "src/glsl/glsl_parser.yy" +#line 1439 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "vec2"; } break; case 191: /* Line 1806 of yacc.c */ -#line 1435 "src/glsl/glsl_parser.yy" +#line 1440 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "vec3"; } break; case 192: /* Line 1806 of yacc.c */ -#line 1436 "src/glsl/glsl_parser.yy" +#line 1441 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "vec4"; } break; case 193: /* Line 1806 of yacc.c */ -#line 1437 "src/glsl/glsl_parser.yy" +#line 1442 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "bvec2"; } break; case 194: /* Line 1806 of yacc.c */ -#line 1438 "src/glsl/glsl_parser.yy" +#line 1443 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "bvec3"; } break; case 195: /* Line 1806 of yacc.c */ -#line 1439 "src/glsl/glsl_parser.yy" +#line 1444 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "bvec4"; } break; case 196: /* Line 1806 of yacc.c */ -#line 1440 "src/glsl/glsl_parser.yy" +#line 1445 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "ivec2"; } break; case 197: /* Line 1806 of yacc.c */ -#line 1441 "src/glsl/glsl_parser.yy" +#line 1446 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "ivec3"; } break; case 198: /* Line 1806 of yacc.c */ -#line 1442 "src/glsl/glsl_parser.yy" +#line 1447 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "ivec4"; } break; case 199: /* Line 1806 of yacc.c */ -#line 1443 "src/glsl/glsl_parser.yy" +#line 1448 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "uvec2"; } break; case 200: /* Line 1806 of yacc.c */ -#line 1444 "src/glsl/glsl_parser.yy" +#line 1449 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "uvec3"; } break; case 201: /* Line 1806 of yacc.c */ -#line 1445 "src/glsl/glsl_parser.yy" +#line 1450 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "uvec4"; } break; case 202: /* Line 1806 of yacc.c */ -#line 1446 "src/glsl/glsl_parser.yy" +#line 1451 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat2"; } break; case 203: /* Line 1806 of yacc.c */ -#line 1447 "src/glsl/glsl_parser.yy" +#line 1452 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat2x3"; } break; case 204: /* Line 1806 of yacc.c */ -#line 1448 "src/glsl/glsl_parser.yy" +#line 1453 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat2x4"; } break; case 205: /* Line 1806 of yacc.c */ -#line 1449 "src/glsl/glsl_parser.yy" +#line 1454 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat3x2"; } break; case 206: /* Line 1806 of yacc.c */ -#line 1450 "src/glsl/glsl_parser.yy" +#line 1455 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat3"; } break; case 207: /* Line 1806 of yacc.c */ -#line 1451 "src/glsl/glsl_parser.yy" +#line 1456 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat3x4"; } break; case 208: /* Line 1806 of yacc.c */ -#line 1452 "src/glsl/glsl_parser.yy" +#line 1457 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat4x2"; } break; case 209: /* Line 1806 of yacc.c */ -#line 1453 "src/glsl/glsl_parser.yy" +#line 1458 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat4x3"; } break; case 210: /* Line 1806 of yacc.c */ -#line 1454 "src/glsl/glsl_parser.yy" +#line 1459 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "mat4"; } break; case 211: /* Line 1806 of yacc.c */ -#line 1455 "src/glsl/glsl_parser.yy" +#line 1460 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler1D"; } break; case 212: /* Line 1806 of yacc.c */ -#line 1456 "src/glsl/glsl_parser.yy" +#line 1461 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler2D"; } break; case 213: /* Line 1806 of yacc.c */ -#line 1457 "src/glsl/glsl_parser.yy" +#line 1462 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler2DRect"; } break; case 214: /* Line 1806 of yacc.c */ -#line 1458 "src/glsl/glsl_parser.yy" +#line 1463 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler3D"; } break; case 215: /* Line 1806 of yacc.c */ -#line 1459 "src/glsl/glsl_parser.yy" +#line 1464 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "samplerCube"; } break; case 216: /* Line 1806 of yacc.c */ -#line 1460 "src/glsl/glsl_parser.yy" +#line 1465 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "samplerExternalOES"; } break; case 217: /* Line 1806 of yacc.c */ -#line 1461 "src/glsl/glsl_parser.yy" +#line 1466 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler1DShadow"; } break; case 218: /* Line 1806 of yacc.c */ -#line 1462 "src/glsl/glsl_parser.yy" +#line 1467 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler2DShadow"; } break; case 219: /* Line 1806 of yacc.c */ -#line 1463 "src/glsl/glsl_parser.yy" +#line 1468 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler2DRectShadow"; } break; case 220: /* Line 1806 of yacc.c */ -#line 1464 "src/glsl/glsl_parser.yy" +#line 1469 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "samplerCubeShadow"; } break; case 221: /* Line 1806 of yacc.c */ -#line 1465 "src/glsl/glsl_parser.yy" +#line 1470 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler1DArray"; } break; case 222: /* Line 1806 of yacc.c */ -#line 1466 "src/glsl/glsl_parser.yy" +#line 1471 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler2DArray"; } break; case 223: /* Line 1806 of yacc.c */ -#line 1467 "src/glsl/glsl_parser.yy" +#line 1472 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler1DArrayShadow"; } break; case 224: /* Line 1806 of yacc.c */ -#line 1468 "src/glsl/glsl_parser.yy" +#line 1473 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "sampler2DArrayShadow"; } break; case 225: /* Line 1806 of yacc.c */ -#line 1469 "src/glsl/glsl_parser.yy" +#line 1474 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "samplerBuffer"; } break; case 226: /* Line 1806 of yacc.c */ -#line 1470 "src/glsl/glsl_parser.yy" +#line 1475 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "isampler1D"; } break; case 227: /* Line 1806 of yacc.c */ -#line 1471 "src/glsl/glsl_parser.yy" +#line 1476 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "isampler2D"; } break; case 228: /* Line 1806 of yacc.c */ -#line 1472 "src/glsl/glsl_parser.yy" +#line 1477 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "isampler2DRect"; } break; case 229: /* Line 1806 of yacc.c */ -#line 1473 "src/glsl/glsl_parser.yy" +#line 1478 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "isampler3D"; } break; case 230: /* Line 1806 of yacc.c */ -#line 1474 "src/glsl/glsl_parser.yy" +#line 1479 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "isamplerCube"; } break; case 231: /* Line 1806 of yacc.c */ -#line 1475 "src/glsl/glsl_parser.yy" +#line 1480 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "isampler1DArray"; } break; case 232: /* Line 1806 of yacc.c */ -#line 1476 "src/glsl/glsl_parser.yy" +#line 1481 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "isampler2DArray"; } break; case 233: /* Line 1806 of yacc.c */ -#line 1477 "src/glsl/glsl_parser.yy" +#line 1482 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "isamplerBuffer"; } break; case 234: /* Line 1806 of yacc.c */ -#line 1478 "src/glsl/glsl_parser.yy" +#line 1483 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "usampler1D"; } break; case 235: /* Line 1806 of yacc.c */ -#line 1479 "src/glsl/glsl_parser.yy" +#line 1484 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "usampler2D"; } break; case 236: /* Line 1806 of yacc.c */ -#line 1480 "src/glsl/glsl_parser.yy" +#line 1485 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "usampler2DRect"; } break; case 237: /* Line 1806 of yacc.c */ -#line 1481 "src/glsl/glsl_parser.yy" +#line 1486 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "usampler3D"; } break; case 238: /* Line 1806 of yacc.c */ -#line 1482 "src/glsl/glsl_parser.yy" +#line 1487 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "usamplerCube"; } break; case 239: /* Line 1806 of yacc.c */ -#line 1483 "src/glsl/glsl_parser.yy" +#line 1488 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "usampler1DArray"; } break; case 240: /* Line 1806 of yacc.c */ -#line 1484 "src/glsl/glsl_parser.yy" +#line 1489 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "usampler2DArray"; } break; case 241: /* Line 1806 of yacc.c */ -#line 1485 "src/glsl/glsl_parser.yy" +#line 1490 "src/glsl/glsl_parser.yy" { (yyval.identifier) = "usamplerBuffer"; } break; case 242: /* Line 1806 of yacc.c */ -#line 1489 "src/glsl/glsl_parser.yy" +#line 1494 "src/glsl/glsl_parser.yy" { if (!state->es_shader && state->language_version < 130) _mesa_glsl_error(& (yylsp[(1) - (1)]), state, @@ -4838,7 +4843,7 @@ yyreduce: case 243: /* Line 1806 of yacc.c */ -#line 1499 "src/glsl/glsl_parser.yy" +#line 1504 "src/glsl/glsl_parser.yy" { if (!state->es_shader && state->language_version < 130) _mesa_glsl_error(& (yylsp[(1) - (1)]), state, @@ -4854,7 +4859,7 @@ yyreduce: case 244: /* Line 1806 of yacc.c */ -#line 1509 "src/glsl/glsl_parser.yy" +#line 1514 "src/glsl/glsl_parser.yy" { if (!state->es_shader && state->language_version < 130) _mesa_glsl_error(& (yylsp[(1) - (1)]), state, @@ -4870,7 +4875,7 @@ yyreduce: case 245: /* Line 1806 of yacc.c */ -#line 1523 "src/glsl/glsl_parser.yy" +#line 1528 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].declarator_list)); @@ -4882,7 +4887,7 @@ yyreduce: case 246: /* Line 1806 of yacc.c */ -#line 1530 "src/glsl/glsl_parser.yy" +#line 1535 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[(3) - (4)].declarator_list)); @@ -4893,7 +4898,7 @@ yyreduce: case 247: /* Line 1806 of yacc.c */ -#line 1539 "src/glsl/glsl_parser.yy" +#line 1544 "src/glsl/glsl_parser.yy" { (yyval.declarator_list) = (yyvsp[(1) - (1)].declarator_list); (yyvsp[(1) - (1)].declarator_list)->link.self_link(); @@ -4903,7 +4908,7 @@ yyreduce: case 248: /* Line 1806 of yacc.c */ -#line 1544 "src/glsl/glsl_parser.yy" +#line 1549 "src/glsl/glsl_parser.yy" { (yyval.declarator_list) = (yyvsp[(1) - (2)].declarator_list); (yyval.declarator_list)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link); @@ -4913,7 +4918,7 @@ yyreduce: case 249: /* Line 1806 of yacc.c */ -#line 1552 "src/glsl/glsl_parser.yy" +#line 1557 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_fully_specified_type *type = new(ctx) ast_fully_specified_type(); @@ -4930,7 +4935,7 @@ yyreduce: case 250: /* Line 1806 of yacc.c */ -#line 1567 "src/glsl/glsl_parser.yy" +#line 1572 "src/glsl/glsl_parser.yy" { (yyval.declaration) = (yyvsp[(1) - (1)].declaration); (yyvsp[(1) - (1)].declaration)->link.self_link(); @@ -4940,7 +4945,7 @@ yyreduce: case 251: /* Line 1806 of yacc.c */ -#line 1572 "src/glsl/glsl_parser.yy" +#line 1577 "src/glsl/glsl_parser.yy" { (yyval.declaration) = (yyvsp[(1) - (3)].declaration); (yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declaration)->link); @@ -4950,7 +4955,7 @@ yyreduce: case 252: /* Line 1806 of yacc.c */ -#line 1580 "src/glsl/glsl_parser.yy" +#line 1585 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].identifier), false, NULL, NULL); @@ -4962,7 +4967,7 @@ yyreduce: case 253: /* Line 1806 of yacc.c */ -#line 1587 "src/glsl/glsl_parser.yy" +#line 1592 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].identifier), true, (yyvsp[(3) - (4)].expression), NULL); @@ -4973,14 +4978,14 @@ yyreduce: case 256: /* Line 1806 of yacc.c */ -#line 1605 "src/glsl/glsl_parser.yy" +#line 1610 "src/glsl/glsl_parser.yy" { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); } break; case 264: /* Line 1806 of yacc.c */ -#line 1620 "src/glsl/glsl_parser.yy" +#line 1625 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL); @@ -4991,7 +4996,7 @@ yyreduce: case 265: /* Line 1806 of yacc.c */ -#line 1626 "src/glsl/glsl_parser.yy" +#line 1631 "src/glsl/glsl_parser.yy" { state->symbols->push_scope(); } @@ -5000,7 +5005,7 @@ yyreduce: case 266: /* Line 1806 of yacc.c */ -#line 1630 "src/glsl/glsl_parser.yy" +#line 1635 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(3) - (4)].node)); @@ -5012,14 +5017,14 @@ yyreduce: case 267: /* Line 1806 of yacc.c */ -#line 1639 "src/glsl/glsl_parser.yy" +#line 1644 "src/glsl/glsl_parser.yy" { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); } break; case 269: /* Line 1806 of yacc.c */ -#line 1645 "src/glsl/glsl_parser.yy" +#line 1650 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL); @@ -5030,7 +5035,7 @@ yyreduce: case 270: /* Line 1806 of yacc.c */ -#line 1651 "src/glsl/glsl_parser.yy" +#line 1656 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[(2) - (3)].node)); @@ -5041,7 +5046,7 @@ yyreduce: case 271: /* Line 1806 of yacc.c */ -#line 1660 "src/glsl/glsl_parser.yy" +#line 1665 "src/glsl/glsl_parser.yy" { if ((yyvsp[(1) - (1)].node) == NULL) { _mesa_glsl_error(& (yylsp[(1) - (1)]), state, " statement\n"); @@ -5056,7 +5061,7 @@ yyreduce: case 272: /* Line 1806 of yacc.c */ -#line 1670 "src/glsl/glsl_parser.yy" +#line 1675 "src/glsl/glsl_parser.yy" { if ((yyvsp[(2) - (2)].node) == NULL) { _mesa_glsl_error(& (yylsp[(2) - (2)]), state, " statement\n"); @@ -5070,7 +5075,7 @@ yyreduce: case 273: /* Line 1806 of yacc.c */ -#line 1682 "src/glsl/glsl_parser.yy" +#line 1687 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_expression_statement(NULL); @@ -5081,7 +5086,7 @@ yyreduce: case 274: /* Line 1806 of yacc.c */ -#line 1688 "src/glsl/glsl_parser.yy" +#line 1693 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].expression)); @@ -5092,7 +5097,7 @@ yyreduce: case 275: /* Line 1806 of yacc.c */ -#line 1697 "src/glsl/glsl_parser.yy" +#line 1702 "src/glsl/glsl_parser.yy" { (yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement, (yyvsp[(5) - (5)].selection_rest_statement).else_statement); @@ -5103,7 +5108,7 @@ yyreduce: case 276: /* Line 1806 of yacc.c */ -#line 1706 "src/glsl/glsl_parser.yy" +#line 1711 "src/glsl/glsl_parser.yy" { (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node); (yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].node); @@ -5113,7 +5118,7 @@ yyreduce: case 277: /* Line 1806 of yacc.c */ -#line 1711 "src/glsl/glsl_parser.yy" +#line 1716 "src/glsl/glsl_parser.yy" { (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node); (yyval.selection_rest_statement).else_statement = NULL; @@ -5123,7 +5128,7 @@ yyreduce: case 278: /* Line 1806 of yacc.c */ -#line 1719 "src/glsl/glsl_parser.yy" +#line 1724 "src/glsl/glsl_parser.yy" { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression); } @@ -5132,7 +5137,7 @@ yyreduce: case 279: /* Line 1806 of yacc.c */ -#line 1723 "src/glsl/glsl_parser.yy" +#line 1728 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression)); @@ -5148,7 +5153,7 @@ yyreduce: case 280: /* Line 1806 of yacc.c */ -#line 1741 "src/glsl/glsl_parser.yy" +#line 1746 "src/glsl/glsl_parser.yy" { (yyval.node) = new(state) ast_switch_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].switch_body)); (yyval.node)->set_location(yylloc); @@ -5158,7 +5163,7 @@ yyreduce: case 281: /* Line 1806 of yacc.c */ -#line 1749 "src/glsl/glsl_parser.yy" +#line 1754 "src/glsl/glsl_parser.yy" { (yyval.switch_body) = new(state) ast_switch_body(NULL); (yyval.switch_body)->set_location(yylloc); @@ -5168,7 +5173,7 @@ yyreduce: case 282: /* Line 1806 of yacc.c */ -#line 1754 "src/glsl/glsl_parser.yy" +#line 1759 "src/glsl/glsl_parser.yy" { (yyval.switch_body) = new(state) ast_switch_body((yyvsp[(2) - (3)].case_statement_list)); (yyval.switch_body)->set_location(yylloc); @@ -5178,7 +5183,7 @@ yyreduce: case 283: /* Line 1806 of yacc.c */ -#line 1762 "src/glsl/glsl_parser.yy" +#line 1767 "src/glsl/glsl_parser.yy" { (yyval.case_label) = new(state) ast_case_label((yyvsp[(2) - (3)].expression)); (yyval.case_label)->set_location(yylloc); @@ -5188,7 +5193,7 @@ yyreduce: case 284: /* Line 1806 of yacc.c */ -#line 1767 "src/glsl/glsl_parser.yy" +#line 1772 "src/glsl/glsl_parser.yy" { (yyval.case_label) = new(state) ast_case_label(NULL); (yyval.case_label)->set_location(yylloc); @@ -5198,7 +5203,7 @@ yyreduce: case 285: /* Line 1806 of yacc.c */ -#line 1775 "src/glsl/glsl_parser.yy" +#line 1780 "src/glsl/glsl_parser.yy" { ast_case_label_list *labels = new(state) ast_case_label_list(); @@ -5211,7 +5216,7 @@ yyreduce: case 286: /* Line 1806 of yacc.c */ -#line 1783 "src/glsl/glsl_parser.yy" +#line 1788 "src/glsl/glsl_parser.yy" { (yyval.case_label_list) = (yyvsp[(1) - (2)].case_label_list); (yyval.case_label_list)->labels.push_tail(& (yyvsp[(2) - (2)].case_label)->link); @@ -5221,7 +5226,7 @@ yyreduce: case 287: /* Line 1806 of yacc.c */ -#line 1791 "src/glsl/glsl_parser.yy" +#line 1796 "src/glsl/glsl_parser.yy" { ast_case_statement *stmts = new(state) ast_case_statement((yyvsp[(1) - (2)].case_label_list)); stmts->set_location(yylloc); @@ -5234,7 +5239,7 @@ yyreduce: case 288: /* Line 1806 of yacc.c */ -#line 1799 "src/glsl/glsl_parser.yy" +#line 1804 "src/glsl/glsl_parser.yy" { (yyval.case_statement) = (yyvsp[(1) - (2)].case_statement); (yyval.case_statement)->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link); @@ -5244,7 +5249,7 @@ yyreduce: case 289: /* Line 1806 of yacc.c */ -#line 1807 "src/glsl/glsl_parser.yy" +#line 1812 "src/glsl/glsl_parser.yy" { ast_case_statement_list *cases= new(state) ast_case_statement_list(); cases->set_location(yylloc); @@ -5257,7 +5262,7 @@ yyreduce: case 290: /* Line 1806 of yacc.c */ -#line 1815 "src/glsl/glsl_parser.yy" +#line 1820 "src/glsl/glsl_parser.yy" { (yyval.case_statement_list) = (yyvsp[(1) - (2)].case_statement_list); (yyval.case_statement_list)->cases.push_tail(& (yyvsp[(2) - (2)].case_statement)->link); @@ -5267,7 +5272,7 @@ yyreduce: case 291: /* Line 1806 of yacc.c */ -#line 1823 "src/glsl/glsl_parser.yy" +#line 1828 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while, @@ -5279,7 +5284,7 @@ yyreduce: case 292: /* Line 1806 of yacc.c */ -#line 1830 "src/glsl/glsl_parser.yy" +#line 1835 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while, @@ -5291,7 +5296,7 @@ yyreduce: case 293: /* Line 1806 of yacc.c */ -#line 1837 "src/glsl/glsl_parser.yy" +#line 1842 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for, @@ -5303,7 +5308,7 @@ yyreduce: case 297: /* Line 1806 of yacc.c */ -#line 1853 "src/glsl/glsl_parser.yy" +#line 1858 "src/glsl/glsl_parser.yy" { (yyval.node) = NULL; } @@ -5312,7 +5317,7 @@ yyreduce: case 298: /* Line 1806 of yacc.c */ -#line 1860 "src/glsl/glsl_parser.yy" +#line 1865 "src/glsl/glsl_parser.yy" { (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node); (yyval.for_rest_statement).rest = NULL; @@ -5322,7 +5327,7 @@ yyreduce: case 299: /* Line 1806 of yacc.c */ -#line 1865 "src/glsl/glsl_parser.yy" +#line 1870 "src/glsl/glsl_parser.yy" { (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node); (yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression); @@ -5332,7 +5337,7 @@ yyreduce: case 300: /* Line 1806 of yacc.c */ -#line 1874 "src/glsl/glsl_parser.yy" +#line 1879 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL); @@ -5343,7 +5348,7 @@ yyreduce: case 301: /* Line 1806 of yacc.c */ -#line 1880 "src/glsl/glsl_parser.yy" +#line 1885 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL); @@ -5354,7 +5359,7 @@ yyreduce: case 302: /* Line 1806 of yacc.c */ -#line 1886 "src/glsl/glsl_parser.yy" +#line 1891 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL); @@ -5365,7 +5370,7 @@ yyreduce: case 303: /* Line 1806 of yacc.c */ -#line 1892 "src/glsl/glsl_parser.yy" +#line 1897 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, (yyvsp[(2) - (3)].expression)); @@ -5376,7 +5381,7 @@ yyreduce: case 304: /* Line 1806 of yacc.c */ -#line 1898 "src/glsl/glsl_parser.yy" +#line 1903 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL); @@ -5387,35 +5392,35 @@ yyreduce: case 305: /* Line 1806 of yacc.c */ -#line 1906 "src/glsl/glsl_parser.yy" +#line 1911 "src/glsl/glsl_parser.yy" { (yyval.node) = (yyvsp[(1) - (1)].function_definition); } break; case 306: /* Line 1806 of yacc.c */ -#line 1907 "src/glsl/glsl_parser.yy" +#line 1912 "src/glsl/glsl_parser.yy" { (yyval.node) = (yyvsp[(1) - (1)].node); } break; case 307: /* Line 1806 of yacc.c */ -#line 1908 "src/glsl/glsl_parser.yy" +#line 1913 "src/glsl/glsl_parser.yy" { (yyval.node) = NULL; } break; case 308: /* Line 1806 of yacc.c */ -#line 1909 "src/glsl/glsl_parser.yy" +#line 1914 "src/glsl/glsl_parser.yy" { (yyval.node) = NULL; } break; case 309: /* Line 1806 of yacc.c */ -#line 1914 "src/glsl/glsl_parser.yy" +#line 1919 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.function_definition) = new(ctx) ast_function_definition(); @@ -5430,7 +5435,7 @@ yyreduce: case 310: /* Line 1806 of yacc.c */ -#line 1928 "src/glsl/glsl_parser.yy" +#line 1933 "src/glsl/glsl_parser.yy" { void *ctx = state; (yyval.node) = new(ctx) ast_uniform_block(*state->default_uniform_qualifier, @@ -5451,7 +5456,7 @@ yyreduce: case 311: /* Line 1806 of yacc.c */ -#line 1944 "src/glsl/glsl_parser.yy" +#line 1949 "src/glsl/glsl_parser.yy" { void *ctx = state; @@ -5476,7 +5481,7 @@ yyreduce: case 312: /* Line 1806 of yacc.c */ -#line 1967 "src/glsl/glsl_parser.yy" +#line 1972 "src/glsl/glsl_parser.yy" { (yyval.declarator_list) = (yyvsp[(1) - (1)].declarator_list); (yyvsp[(1) - (1)].declarator_list)->link.self_link(); @@ -5486,7 +5491,7 @@ yyreduce: case 313: /* Line 1806 of yacc.c */ -#line 1972 "src/glsl/glsl_parser.yy" +#line 1977 "src/glsl/glsl_parser.yy" { (yyval.declarator_list) = (yyvsp[(1) - (2)].declarator_list); (yyvsp[(2) - (2)].declarator_list)->link.insert_before(& (yyval.declarator_list)->link); @@ -5496,7 +5501,7 @@ yyreduce: case 316: /* Line 1806 of yacc.c */ -#line 1986 "src/glsl/glsl_parser.yy" +#line 1991 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_fully_specified_type *type = new(ctx) ast_fully_specified_type(); @@ -5516,7 +5521,7 @@ yyreduce: case 317: /* Line 1806 of yacc.c */ -#line 2001 "src/glsl/glsl_parser.yy" +#line 2006 "src/glsl/glsl_parser.yy" { void *ctx = state; ast_fully_specified_type *type = new(ctx) ast_fully_specified_type(); @@ -5535,7 +5540,7 @@ yyreduce: case 318: /* Line 1806 of yacc.c */ -#line 2018 "src/glsl/glsl_parser.yy" +#line 2023 "src/glsl/glsl_parser.yy" { if (!state->default_uniform_qualifier->merge_qualifier(& (yylsp[(1) - (3)]), state, (yyvsp[(1) - (3)].type_qualifier))) { @@ -5547,7 +5552,7 @@ yyreduce: /* Line 1806 of yacc.c */ -#line 5551 "src/glsl/glsl_parser.cpp" +#line 5556 "src/glsl/glsl_parser.cpp" default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.h b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.h index 4c9d316b4..e3047d5ab 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.h +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.h @@ -245,7 +245,7 @@ typedef union YYSTYPE { /* Line 2068 of yacc.c */ -#line 59 "src/glsl/glsl_parser.yy" +#line 64 "src/glsl/glsl_parser.yy" int n; float real; diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.yy b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.yy index 68773b041..54a94a163 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_parser.yy +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_parser.yy @@ -31,6 +31,11 @@ #include "glsl_types.h" #include "main/context.h" +#if defined(_MSC_VER) +# pragma warning(disable: 4065) // warning C4065: switch statement contains 'default' but no 'case' labels +# pragma warning(disable: 4244) // warning C4244: '=' : conversion from 'double' to 'float', possible loss of data +#endif // defined(_MSC_VER) + #define YYLEX_PARAM state->scanner #undef yyerror diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_types.cpp b/3rdparty/glsl-optimizer/src/glsl/glsl_types.cpp index c67235f34..b15d2b079 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_types.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_types.cpp @@ -394,7 +394,7 @@ glsl_type::glsl_type(const glsl_type *array, unsigned length) : * for 32-bits of ~0. The extra 3 are for the '[', ']', and terminating * NUL. */ - const unsigned name_length = strlen(array->name) + 10 + 3; + const unsigned name_length = (unsigned)strlen(array->name) + 10 + 3; char *const n = (char *) ralloc_size(this->mem_ctx, name_length); if (length == 0) diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_reader.cpp b/3rdparty/glsl-optimizer/src/glsl/ir_reader.cpp index 83dcc8319..ebce15694 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_reader.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ir_reader.cpp @@ -567,7 +567,7 @@ ir_reader::read_assignment(s_expression *expr) s_pattern mask_pat[] = { mask_symbol }; if (MATCH(mask_list, mask_pat)) { const char *mask_str = mask_symbol->value(); - unsigned mask_length = strlen(mask_str); + unsigned mask_length = (unsigned)strlen(mask_str); if (mask_length > 4) { ir_read_error(expr, "invalid write mask: %s", mask_str); return NULL; diff --git a/3rdparty/glsl-optimizer/src/glsl/ralloc.c b/3rdparty/glsl-optimizer/src/glsl/ralloc.c index 3da09b559..9d0149670 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ralloc.c +++ b/3rdparty/glsl-optimizer/src/glsl/ralloc.c @@ -177,7 +177,7 @@ reralloc_size(const void *ctx, void *ptr, size_t size) } void * -ralloc_array_size(const void *ctx, size_t size, unsigned count) +ralloc_array_size(const void *ctx, size_t size, size_t count) { if (count > SIZE_MAX/size) return NULL; @@ -186,7 +186,7 @@ ralloc_array_size(const void *ctx, size_t size, unsigned count) } void * -rzalloc_array_size(const void *ctx, size_t size, unsigned count) +rzalloc_array_size(const void *ctx, size_t size, size_t count) { if (count > SIZE_MAX/size) return NULL; @@ -195,7 +195,7 @@ rzalloc_array_size(const void *ctx, size_t size, unsigned count) } void * -reralloc_array_size(const void *ctx, void *ptr, size_t size, unsigned count) +reralloc_array_size(const void *ctx, void *ptr, size_t size, size_t count) { if (count > SIZE_MAX/size) return NULL; diff --git a/3rdparty/glsl-optimizer/src/glsl/ralloc.h b/3rdparty/glsl-optimizer/src/glsl/ralloc.h index 86306b1f5..bcaaa8493 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ralloc.h +++ b/3rdparty/glsl-optimizer/src/glsl/ralloc.h @@ -184,7 +184,7 @@ void *reralloc_size(const void *ctx, void *ptr, size_t size); * More than a convenience function, this also checks for integer overflow when * multiplying \p size and \p count. This is necessary for security. */ -void *ralloc_array_size(const void *ctx, size_t size, unsigned count); +void *ralloc_array_size(const void *ctx, size_t size, size_t count); /** * Allocate a zero-initialized array chained off the given context. @@ -194,7 +194,7 @@ void *ralloc_array_size(const void *ctx, size_t size, unsigned count); * More than a convenience function, this also checks for integer overflow when * multiplying \p size and \p count. This is necessary for security. */ -void *rzalloc_array_size(const void *ctx, size_t size, unsigned count); +void *rzalloc_array_size(const void *ctx, size_t size, size_t count); /** * Resize a ralloc-managed array, preserving data. @@ -215,7 +215,7 @@ void *rzalloc_array_size(const void *ctx, size_t size, unsigned count); * \return True unless allocation failed. */ void *reralloc_array_size(const void *ctx, void *ptr, size_t size, - unsigned count); + size_t count); /// @} /** diff --git a/3rdparty/glsl-optimizer/src/mesa/program/hash_table.c b/3rdparty/glsl-optimizer/src/mesa/program/hash_table.c index 7dabadc50..92fc802ac 100644 --- a/3rdparty/glsl-optimizer/src/mesa/program/hash_table.c +++ b/3rdparty/glsl-optimizer/src/mesa/program/hash_table.c @@ -195,7 +195,7 @@ hash_table_call_foreach(struct hash_table *ht, { int bucket; - for (bucket = 0; bucket < ht->num_buckets; bucket++) { + for (bucket = 0; bucket < (int)ht->num_buckets; bucket++) { struct node *node, *temp; foreach_s(node, temp, &ht->buckets[bucket]) { struct hash_node *hn = (struct hash_node *) node; diff --git a/premake/shaderc.lua b/premake/shaderc.lua index 82efd255b..9e6ea12bf 100644 --- a/premake/shaderc.lua +++ b/premake/shaderc.lua @@ -10,6 +10,10 @@ project "shaderc" GLSL_OPTIMIZER .. "src/glsl/msvc", } + buildoptions { + "/wd4996" -- warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. + } + configuration { "windows", "vs*" } includedirs { GLSL_OPTIMIZER .. "include/c99", @@ -28,10 +32,14 @@ project "shaderc" configuration {} - defines { -- fcpp + defines { + -- fcpp "NINCLUDE=64", "NWORK=65536", "NBUFF=65536", + + -- glsl-optimizer + "__STDC_VERSION__=199901L", } includedirs {