diff options
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/lex.yy.c | 405 | ||||
-rw-r--r-- | src/mesa/shader/prog_execute.c | 5 | ||||
-rw-r--r-- | src/mesa/shader/program_lexer.l | 5 | ||||
-rw-r--r-- | src/mesa/shader/program_parse.tab.c | 417 | ||||
-rw-r--r-- | src/mesa/shader/program_parse.tab.h | 6 | ||||
-rw-r--r-- | src/mesa/shader/program_parse.y | 17 |
6 files changed, 423 insertions, 432 deletions
diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c index 6d661bd187..709426f3a6 100644 --- a/src/mesa/shader/lex.yy.c +++ b/src/mesa/shader/lex.yy.c @@ -53,6 +53,7 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -83,8 +84,6 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -158,15 +157,7 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -910,6 +901,7 @@ static yyconst flex_int16_t yy_chk[1023] = */ #include "main/glheader.h" #include "prog_instruction.h" +#include "prog_statevars.h" #include "program_parser.h" #include "program_parse.tab.h" @@ -1011,7 +1003,7 @@ swiz_from_char(char c) } while(0); #define YY_EXTRA_TYPE struct asm_parser_state * -#line 1015 "lex.yy.c" +#line 1007 "lex.yy.c" #define INITIAL 0 @@ -1148,12 +1140,7 @@ static int input (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1161,7 +1148,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1172,7 +1159,7 @@ static int input (yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1257,10 +1244,10 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 135 "program_lexer.l" +#line 136 "program_lexer.l" -#line 1264 "lex.yy.c" +#line 1251 "lex.yy.c" yylval = yylval_param; @@ -1349,17 +1336,17 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 137 "program_lexer.l" +#line 138 "program_lexer.l" { return ARBvp_10; } YY_BREAK case 2: YY_RULE_SETUP -#line 138 "program_lexer.l" +#line 139 "program_lexer.l" { return ARBfp_10; } YY_BREAK case 3: YY_RULE_SETUP -#line 139 "program_lexer.l" +#line 140 "program_lexer.l" { yylval->integer = at_address; return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS); @@ -1367,747 +1354,747 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 143 "program_lexer.l" +#line 144 "program_lexer.l" { return ALIAS; } YY_BREAK case 5: YY_RULE_SETUP -#line 144 "program_lexer.l" +#line 145 "program_lexer.l" { return ATTRIB; } YY_BREAK case 6: YY_RULE_SETUP -#line 145 "program_lexer.l" +#line 146 "program_lexer.l" { return END; } YY_BREAK case 7: YY_RULE_SETUP -#line 146 "program_lexer.l" +#line 147 "program_lexer.l" { return OPTION; } YY_BREAK case 8: YY_RULE_SETUP -#line 147 "program_lexer.l" +#line 148 "program_lexer.l" { return OUTPUT; } YY_BREAK case 9: YY_RULE_SETUP -#line 148 "program_lexer.l" +#line 149 "program_lexer.l" { return PARAM; } YY_BREAK case 10: YY_RULE_SETUP -#line 149 "program_lexer.l" +#line 150 "program_lexer.l" { yylval->integer = at_temp; return TEMP; } YY_BREAK case 11: YY_RULE_SETUP -#line 151 "program_lexer.l" +#line 152 "program_lexer.l" { return_opcode( 1, VECTOR_OP, ABS, OFF); } YY_BREAK case 12: YY_RULE_SETUP -#line 152 "program_lexer.l" +#line 153 "program_lexer.l" { return_opcode(require_ARB_fp, VECTOR_OP, ABS, ZERO_ONE); } YY_BREAK case 13: YY_RULE_SETUP -#line 153 "program_lexer.l" +#line 154 "program_lexer.l" { return_opcode( 1, BIN_OP, ADD, OFF); } YY_BREAK case 14: YY_RULE_SETUP -#line 154 "program_lexer.l" +#line 155 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, ADD, ZERO_ONE); } YY_BREAK case 15: YY_RULE_SETUP -#line 155 "program_lexer.l" +#line 156 "program_lexer.l" { return_opcode(require_ARB_vp, ARL, ARL, OFF); } YY_BREAK case 16: YY_RULE_SETUP -#line 157 "program_lexer.l" +#line 158 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, CMP, OFF); } YY_BREAK case 17: YY_RULE_SETUP -#line 158 "program_lexer.l" +#line 159 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, CMP, ZERO_ONE); } YY_BREAK case 18: YY_RULE_SETUP -#line 159 "program_lexer.l" +#line 160 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, COS, OFF); } YY_BREAK case 19: YY_RULE_SETUP -#line 160 "program_lexer.l" +#line 161 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, COS, ZERO_ONE); } YY_BREAK case 20: YY_RULE_SETUP -#line 162 "program_lexer.l" +#line 163 "program_lexer.l" { return_opcode( 1, BIN_OP, DP3, OFF); } YY_BREAK case 21: YY_RULE_SETUP -#line 163 "program_lexer.l" +#line 164 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, DP3, ZERO_ONE); } YY_BREAK case 22: YY_RULE_SETUP -#line 164 "program_lexer.l" +#line 165 "program_lexer.l" { return_opcode( 1, BIN_OP, DP4, OFF); } YY_BREAK case 23: YY_RULE_SETUP -#line 165 "program_lexer.l" +#line 166 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, DP4, ZERO_ONE); } YY_BREAK case 24: YY_RULE_SETUP -#line 166 "program_lexer.l" +#line 167 "program_lexer.l" { return_opcode( 1, BIN_OP, DPH, OFF); } YY_BREAK case 25: YY_RULE_SETUP -#line 167 "program_lexer.l" +#line 168 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, DPH, ZERO_ONE); } YY_BREAK case 26: YY_RULE_SETUP -#line 168 "program_lexer.l" +#line 169 "program_lexer.l" { return_opcode( 1, BIN_OP, DST, OFF); } YY_BREAK case 27: YY_RULE_SETUP -#line 169 "program_lexer.l" +#line 170 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, DST, ZERO_ONE); } YY_BREAK case 28: YY_RULE_SETUP -#line 171 "program_lexer.l" +#line 172 "program_lexer.l" { return_opcode( 1, SCALAR_OP, EX2, OFF); } YY_BREAK case 29: YY_RULE_SETUP -#line 172 "program_lexer.l" +#line 173 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, EX2, ZERO_ONE); } YY_BREAK case 30: YY_RULE_SETUP -#line 173 "program_lexer.l" +#line 174 "program_lexer.l" { return_opcode(require_ARB_vp, SCALAR_OP, EXP, OFF); } YY_BREAK case 31: YY_RULE_SETUP -#line 175 "program_lexer.l" +#line 176 "program_lexer.l" { return_opcode( 1, VECTOR_OP, FLR, OFF); } YY_BREAK case 32: YY_RULE_SETUP -#line 176 "program_lexer.l" +#line 177 "program_lexer.l" { return_opcode(require_ARB_fp, VECTOR_OP, FLR, ZERO_ONE); } YY_BREAK case 33: YY_RULE_SETUP -#line 177 "program_lexer.l" +#line 178 "program_lexer.l" { return_opcode( 1, VECTOR_OP, FRC, OFF); } YY_BREAK case 34: YY_RULE_SETUP -#line 178 "program_lexer.l" +#line 179 "program_lexer.l" { return_opcode(require_ARB_fp, VECTOR_OP, FRC, ZERO_ONE); } YY_BREAK case 35: YY_RULE_SETUP -#line 180 "program_lexer.l" +#line 181 "program_lexer.l" { return_opcode(require_ARB_fp, KIL, KIL, OFF); } YY_BREAK case 36: YY_RULE_SETUP -#line 182 "program_lexer.l" +#line 183 "program_lexer.l" { return_opcode( 1, VECTOR_OP, LIT, OFF); } YY_BREAK case 37: YY_RULE_SETUP -#line 183 "program_lexer.l" +#line 184 "program_lexer.l" { return_opcode(require_ARB_fp, VECTOR_OP, LIT, ZERO_ONE); } YY_BREAK case 38: YY_RULE_SETUP -#line 184 "program_lexer.l" +#line 185 "program_lexer.l" { return_opcode( 1, SCALAR_OP, LG2, OFF); } YY_BREAK case 39: YY_RULE_SETUP -#line 185 "program_lexer.l" +#line 186 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, LG2, ZERO_ONE); } YY_BREAK case 40: YY_RULE_SETUP -#line 186 "program_lexer.l" +#line 187 "program_lexer.l" { return_opcode(require_ARB_vp, SCALAR_OP, LOG, OFF); } YY_BREAK case 41: YY_RULE_SETUP -#line 187 "program_lexer.l" +#line 188 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, LRP, OFF); } YY_BREAK case 42: YY_RULE_SETUP -#line 188 "program_lexer.l" +#line 189 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, LRP, ZERO_ONE); } YY_BREAK case 43: YY_RULE_SETUP -#line 190 "program_lexer.l" +#line 191 "program_lexer.l" { return_opcode( 1, TRI_OP, MAD, OFF); } YY_BREAK case 44: YY_RULE_SETUP -#line 191 "program_lexer.l" +#line 192 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, MAD, ZERO_ONE); } YY_BREAK case 45: YY_RULE_SETUP -#line 192 "program_lexer.l" +#line 193 "program_lexer.l" { return_opcode( 1, BIN_OP, MAX, OFF); } YY_BREAK case 46: YY_RULE_SETUP -#line 193 "program_lexer.l" +#line 194 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, MAX, ZERO_ONE); } YY_BREAK case 47: YY_RULE_SETUP -#line 194 "program_lexer.l" +#line 195 "program_lexer.l" { return_opcode( 1, BIN_OP, MIN, OFF); } YY_BREAK case 48: YY_RULE_SETUP -#line 195 "program_lexer.l" +#line 196 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, MIN, ZERO_ONE); } YY_BREAK case 49: YY_RULE_SETUP -#line 196 "program_lexer.l" +#line 197 "program_lexer.l" { return_opcode( 1, VECTOR_OP, MOV, OFF); } YY_BREAK case 50: YY_RULE_SETUP -#line 197 "program_lexer.l" +#line 198 "program_lexer.l" { return_opcode(require_ARB_fp, VECTOR_OP, MOV, ZERO_ONE); } YY_BREAK case 51: YY_RULE_SETUP -#line 198 "program_lexer.l" +#line 199 "program_lexer.l" { return_opcode( 1, BIN_OP, MUL, OFF); } YY_BREAK case 52: YY_RULE_SETUP -#line 199 "program_lexer.l" +#line 200 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, MUL, ZERO_ONE); } YY_BREAK case 53: YY_RULE_SETUP -#line 201 "program_lexer.l" +#line 202 "program_lexer.l" { return_opcode( 1, BINSC_OP, POW, OFF); } YY_BREAK case 54: YY_RULE_SETUP -#line 202 "program_lexer.l" +#line 203 "program_lexer.l" { return_opcode(require_ARB_fp, BINSC_OP, POW, ZERO_ONE); } YY_BREAK case 55: YY_RULE_SETUP -#line 204 "program_lexer.l" +#line 205 "program_lexer.l" { return_opcode( 1, SCALAR_OP, RCP, OFF); } YY_BREAK case 56: YY_RULE_SETUP -#line 205 "program_lexer.l" +#line 206 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, RCP, ZERO_ONE); } YY_BREAK case 57: YY_RULE_SETUP -#line 206 "program_lexer.l" +#line 207 "program_lexer.l" { return_opcode( 1, SCALAR_OP, RSQ, OFF); } YY_BREAK case 58: YY_RULE_SETUP -#line 207 "program_lexer.l" +#line 208 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, RSQ, ZERO_ONE); } YY_BREAK case 59: YY_RULE_SETUP -#line 209 "program_lexer.l" +#line 210 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SCS, OFF); } YY_BREAK case 60: YY_RULE_SETUP -#line 210 "program_lexer.l" +#line 211 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SCS, ZERO_ONE); } YY_BREAK case 61: YY_RULE_SETUP -#line 211 "program_lexer.l" +#line 212 "program_lexer.l" { return_opcode( 1, BIN_OP, SGE, OFF); } YY_BREAK case 62: YY_RULE_SETUP -#line 212 "program_lexer.l" +#line 213 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, SGE, ZERO_ONE); } YY_BREAK case 63: YY_RULE_SETUP -#line 213 "program_lexer.l" +#line 214 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SIN, OFF); } YY_BREAK case 64: YY_RULE_SETUP -#line 214 "program_lexer.l" +#line 215 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SIN, ZERO_ONE); } YY_BREAK case 65: YY_RULE_SETUP -#line 215 "program_lexer.l" +#line 216 "program_lexer.l" { return_opcode( 1, BIN_OP, SLT, OFF); } YY_BREAK case 66: YY_RULE_SETUP -#line 216 "program_lexer.l" +#line 217 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, SLT, ZERO_ONE); } YY_BREAK case 67: YY_RULE_SETUP -#line 217 "program_lexer.l" +#line 218 "program_lexer.l" { return_opcode( 1, BIN_OP, SUB, OFF); } YY_BREAK case 68: YY_RULE_SETUP -#line 218 "program_lexer.l" +#line 219 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, SUB, ZERO_ONE); } YY_BREAK case 69: YY_RULE_SETUP -#line 219 "program_lexer.l" +#line 220 "program_lexer.l" { return_opcode( 1, SWZ, SWZ, OFF); } YY_BREAK case 70: YY_RULE_SETUP -#line 220 "program_lexer.l" +#line 221 "program_lexer.l" { return_opcode(require_ARB_fp, SWZ, SWZ, ZERO_ONE); } YY_BREAK case 71: YY_RULE_SETUP -#line 222 "program_lexer.l" +#line 223 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, OFF); } YY_BREAK case 72: YY_RULE_SETUP -#line 223 "program_lexer.l" +#line 224 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, ZERO_ONE); } YY_BREAK case 73: YY_RULE_SETUP -#line 224 "program_lexer.l" +#line 225 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, OFF); } YY_BREAK case 74: YY_RULE_SETUP -#line 225 "program_lexer.l" +#line 226 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, ZERO_ONE); } YY_BREAK case 75: YY_RULE_SETUP -#line 226 "program_lexer.l" +#line 227 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, OFF); } YY_BREAK case 76: YY_RULE_SETUP -#line 227 "program_lexer.l" +#line 228 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, ZERO_ONE); } YY_BREAK case 77: YY_RULE_SETUP -#line 229 "program_lexer.l" +#line 230 "program_lexer.l" { return_opcode( 1, BIN_OP, XPD, OFF); } YY_BREAK case 78: YY_RULE_SETUP -#line 230 "program_lexer.l" +#line 231 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, XPD, ZERO_ONE); } YY_BREAK case 79: YY_RULE_SETUP -#line 232 "program_lexer.l" +#line 233 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } YY_BREAK case 80: YY_RULE_SETUP -#line 233 "program_lexer.l" +#line 234 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } YY_BREAK case 81: YY_RULE_SETUP -#line 234 "program_lexer.l" +#line 235 "program_lexer.l" { return PROGRAM; } YY_BREAK case 82: YY_RULE_SETUP -#line 235 "program_lexer.l" +#line 236 "program_lexer.l" { return STATE; } YY_BREAK case 83: YY_RULE_SETUP -#line 236 "program_lexer.l" +#line 237 "program_lexer.l" { return RESULT; } YY_BREAK case 84: YY_RULE_SETUP -#line 238 "program_lexer.l" +#line 239 "program_lexer.l" { return AMBIENT; } YY_BREAK case 85: YY_RULE_SETUP -#line 239 "program_lexer.l" +#line 240 "program_lexer.l" { return ATTENUATION; } YY_BREAK case 86: YY_RULE_SETUP -#line 240 "program_lexer.l" +#line 241 "program_lexer.l" { return BACK; } YY_BREAK case 87: YY_RULE_SETUP -#line 241 "program_lexer.l" +#line 242 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, CLIP); } YY_BREAK case 88: YY_RULE_SETUP -#line 242 "program_lexer.l" +#line 243 "program_lexer.l" { return COLOR; } YY_BREAK case 89: YY_RULE_SETUP -#line 243 "program_lexer.l" +#line 244 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, DEPTH); } YY_BREAK case 90: YY_RULE_SETUP -#line 244 "program_lexer.l" +#line 245 "program_lexer.l" { return DIFFUSE; } YY_BREAK case 91: YY_RULE_SETUP -#line 245 "program_lexer.l" +#line 246 "program_lexer.l" { return DIRECTION; } YY_BREAK case 92: YY_RULE_SETUP -#line 246 "program_lexer.l" +#line 247 "program_lexer.l" { return EMISSION; } YY_BREAK case 93: YY_RULE_SETUP -#line 247 "program_lexer.l" +#line 248 "program_lexer.l" { return ENV; } YY_BREAK case 94: YY_RULE_SETUP -#line 248 "program_lexer.l" +#line 249 "program_lexer.l" { return EYE; } YY_BREAK case 95: YY_RULE_SETUP -#line 249 "program_lexer.l" +#line 250 "program_lexer.l" { return FOGCOORD; } YY_BREAK case 96: YY_RULE_SETUP -#line 250 "program_lexer.l" +#line 251 "program_lexer.l" { return FOG; } YY_BREAK case 97: YY_RULE_SETUP -#line 251 "program_lexer.l" +#line 252 "program_lexer.l" { return FRONT; } YY_BREAK case 98: YY_RULE_SETUP -#line 252 "program_lexer.l" +#line 253 "program_lexer.l" { return HALF; } YY_BREAK case 99: YY_RULE_SETUP -#line 253 "program_lexer.l" +#line 254 "program_lexer.l" { return INVERSE; } YY_BREAK case 100: YY_RULE_SETUP -#line 254 "program_lexer.l" +#line 255 "program_lexer.l" { return INVTRANS; } YY_BREAK case 101: YY_RULE_SETUP -#line 255 "program_lexer.l" +#line 256 "program_lexer.l" { return LIGHT; } YY_BREAK case 102: YY_RULE_SETUP -#line 256 "program_lexer.l" +#line 257 "program_lexer.l" { return LIGHTMODEL; } YY_BREAK case 103: YY_RULE_SETUP -#line 257 "program_lexer.l" +#line 258 "program_lexer.l" { return LIGHTPROD; } YY_BREAK case 104: YY_RULE_SETUP -#line 258 "program_lexer.l" +#line 259 "program_lexer.l" { return LOCAL; } YY_BREAK case 105: YY_RULE_SETUP -#line 259 "program_lexer.l" +#line 260 "program_lexer.l" { return MATERIAL; } YY_BREAK case 106: YY_RULE_SETUP -#line 260 "program_lexer.l" +#line 261 "program_lexer.l" { return MAT_PROGRAM; } YY_BREAK case 107: YY_RULE_SETUP -#line 261 "program_lexer.l" +#line 262 "program_lexer.l" { return MATRIX; } YY_BREAK case 108: YY_RULE_SETUP -#line 262 "program_lexer.l" +#line 263 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } YY_BREAK case 109: YY_RULE_SETUP -#line 263 "program_lexer.l" +#line 264 "program_lexer.l" { return MODELVIEW; } YY_BREAK case 110: YY_RULE_SETUP -#line 264 "program_lexer.l" +#line 265 "program_lexer.l" { return MVP; } YY_BREAK case 111: YY_RULE_SETUP -#line 265 "program_lexer.l" +#line 266 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, NORMAL); } YY_BREAK case 112: YY_RULE_SETUP -#line 266 "program_lexer.l" +#line 267 "program_lexer.l" { return OBJECT; } YY_BREAK case 113: YY_RULE_SETUP -#line 267 "program_lexer.l" +#line 268 "program_lexer.l" { return PALETTE; } YY_BREAK case 114: YY_RULE_SETUP -#line 268 "program_lexer.l" +#line 269 "program_lexer.l" { return PARAMS; } YY_BREAK case 115: YY_RULE_SETUP -#line 269 "program_lexer.l" +#line 270 "program_lexer.l" { return PLANE; } YY_BREAK case 116: YY_RULE_SETUP -#line 270 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINT); } +#line 271 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, POINT_TOK); } YY_BREAK case 117: YY_RULE_SETUP -#line 271 "program_lexer.l" +#line 272 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, POINTSIZE); } YY_BREAK case 118: YY_RULE_SETUP -#line 272 "program_lexer.l" +#line 273 "program_lexer.l" { return POSITION; } YY_BREAK case 119: YY_RULE_SETUP -#line 273 "program_lexer.l" +#line 274 "program_lexer.l" { return PRIMARY; } YY_BREAK case 120: YY_RULE_SETUP -#line 274 "program_lexer.l" +#line 275 "program_lexer.l" { return PROJECTION; } YY_BREAK case 121: YY_RULE_SETUP -#line 275 "program_lexer.l" +#line 276 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, RANGE); } YY_BREAK case 122: YY_RULE_SETUP -#line 276 "program_lexer.l" +#line 277 "program_lexer.l" { return ROW; } YY_BREAK case 123: YY_RULE_SETUP -#line 277 "program_lexer.l" +#line 278 "program_lexer.l" { return SCENECOLOR; } YY_BREAK case 124: YY_RULE_SETUP -#line 278 "program_lexer.l" +#line 279 "program_lexer.l" { return SECONDARY; } YY_BREAK case 125: YY_RULE_SETUP -#line 279 "program_lexer.l" +#line 280 "program_lexer.l" { return SHININESS; } YY_BREAK case 126: YY_RULE_SETUP -#line 280 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, SIZE); } +#line 281 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); } YY_BREAK case 127: YY_RULE_SETUP -#line 281 "program_lexer.l" +#line 282 "program_lexer.l" { return SPECULAR; } YY_BREAK case 128: YY_RULE_SETUP -#line 282 "program_lexer.l" +#line 283 "program_lexer.l" { return SPOT; } YY_BREAK case 129: YY_RULE_SETUP -#line 283 "program_lexer.l" +#line 284 "program_lexer.l" { return TEXCOORD; } YY_BREAK case 130: YY_RULE_SETUP -#line 284 "program_lexer.l" +#line 285 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, TEXENV); } YY_BREAK case 131: YY_RULE_SETUP -#line 285 "program_lexer.l" +#line 286 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN); } YY_BREAK case 132: YY_RULE_SETUP -#line 286 "program_lexer.l" +#line 287 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } YY_BREAK case 133: YY_RULE_SETUP -#line 287 "program_lexer.l" +#line 288 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_S); } YY_BREAK case 134: YY_RULE_SETUP -#line 288 "program_lexer.l" +#line 289 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_T); } YY_BREAK case 135: YY_RULE_SETUP -#line 289 "program_lexer.l" +#line 290 "program_lexer.l" { return TEXTURE; } YY_BREAK case 136: YY_RULE_SETUP -#line 290 "program_lexer.l" +#line 291 "program_lexer.l" { return TRANSPOSE; } YY_BREAK case 137: YY_RULE_SETUP -#line 291 "program_lexer.l" +#line 292 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, VTXATTRIB); } YY_BREAK case 138: YY_RULE_SETUP -#line 292 "program_lexer.l" +#line 293 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, WEIGHT); } YY_BREAK case 139: YY_RULE_SETUP -#line 294 "program_lexer.l" +#line 295 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } YY_BREAK case 140: YY_RULE_SETUP -#line 295 "program_lexer.l" +#line 296 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } YY_BREAK case 141: YY_RULE_SETUP -#line 296 "program_lexer.l" +#line 297 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } YY_BREAK case 142: YY_RULE_SETUP -#line 297 "program_lexer.l" +#line 298 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } YY_BREAK case 143: YY_RULE_SETUP -#line 298 "program_lexer.l" +#line 299 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } YY_BREAK case 144: YY_RULE_SETUP -#line 299 "program_lexer.l" +#line 300 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } YY_BREAK case 145: YY_RULE_SETUP -#line 300 "program_lexer.l" +#line 301 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } YY_BREAK case 146: YY_RULE_SETUP -#line 301 "program_lexer.l" +#line 302 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } YY_BREAK case 147: YY_RULE_SETUP -#line 302 "program_lexer.l" +#line 303 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } YY_BREAK case 148: YY_RULE_SETUP -#line 303 "program_lexer.l" +#line 304 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } YY_BREAK case 149: YY_RULE_SETUP -#line 304 "program_lexer.l" +#line 305 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } YY_BREAK case 150: YY_RULE_SETUP -#line 305 "program_lexer.l" +#line 306 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } YY_BREAK case 151: YY_RULE_SETUP -#line 306 "program_lexer.l" +#line 307 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } YY_BREAK case 152: YY_RULE_SETUP -#line 308 "program_lexer.l" +#line 309 "program_lexer.l" { yylval->string = strdup(yytext); return IDENTIFIER; @@ -2115,12 +2102,12 @@ YY_RULE_SETUP YY_BREAK case 153: YY_RULE_SETUP -#line 313 "program_lexer.l" +#line 314 "program_lexer.l" { return DOT_DOT; } YY_BREAK case 154: YY_RULE_SETUP -#line 315 "program_lexer.l" +#line 316 "program_lexer.l" { yylval->integer = strtol(yytext, NULL, 10); return INTEGER; @@ -2128,7 +2115,7 @@ YY_RULE_SETUP YY_BREAK case 155: YY_RULE_SETUP -#line 319 "program_lexer.l" +#line 320 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2140,7 +2127,7 @@ case 156: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 323 "program_lexer.l" +#line 324 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2148,7 +2135,7 @@ YY_RULE_SETUP YY_BREAK case 157: YY_RULE_SETUP -#line 327 "program_lexer.l" +#line 328 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2156,7 +2143,7 @@ YY_RULE_SETUP YY_BREAK case 158: YY_RULE_SETUP -#line 331 "program_lexer.l" +#line 332 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2164,7 +2151,7 @@ YY_RULE_SETUP YY_BREAK case 159: YY_RULE_SETUP -#line 336 "program_lexer.l" +#line 337 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; @@ -2173,7 +2160,7 @@ YY_RULE_SETUP YY_BREAK case 160: YY_RULE_SETUP -#line 342 "program_lexer.l" +#line 343 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2183,7 +2170,7 @@ YY_RULE_SETUP YY_BREAK case 161: YY_RULE_SETUP -#line 348 "program_lexer.l" +#line 349 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; @@ -2192,7 +2179,7 @@ YY_RULE_SETUP YY_BREAK case 162: YY_RULE_SETUP -#line 353 "program_lexer.l" +#line 354 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; @@ -2201,7 +2188,7 @@ YY_RULE_SETUP YY_BREAK case 163: YY_RULE_SETUP -#line 359 "program_lexer.l" +#line 360 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2211,7 +2198,7 @@ YY_RULE_SETUP YY_BREAK case 164: YY_RULE_SETUP -#line 365 "program_lexer.l" +#line 366 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2221,7 +2208,7 @@ YY_RULE_SETUP YY_BREAK case 165: YY_RULE_SETUP -#line 371 "program_lexer.l" +#line 372 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; @@ -2230,7 +2217,7 @@ YY_RULE_SETUP YY_BREAK case 166: YY_RULE_SETUP -#line 377 "program_lexer.l" +#line 378 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2240,7 +2227,7 @@ YY_RULE_SETUP YY_BREAK case 167: YY_RULE_SETUP -#line 384 "program_lexer.l" +#line 385 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2252,7 +2239,7 @@ YY_RULE_SETUP YY_BREAK case 168: YY_RULE_SETUP -#line 393 "program_lexer.l" +#line 394 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; @@ -2261,7 +2248,7 @@ YY_RULE_SETUP YY_BREAK case 169: YY_RULE_SETUP -#line 399 "program_lexer.l" +#line 400 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2271,7 +2258,7 @@ YY_RULE_SETUP YY_BREAK case 170: YY_RULE_SETUP -#line 405 "program_lexer.l" +#line 406 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; @@ -2280,7 +2267,7 @@ YY_RULE_SETUP YY_BREAK case 171: YY_RULE_SETUP -#line 410 "program_lexer.l" +#line 411 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; @@ -2289,7 +2276,7 @@ YY_RULE_SETUP YY_BREAK case 172: YY_RULE_SETUP -#line 416 "program_lexer.l" +#line 417 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2299,7 +2286,7 @@ YY_RULE_SETUP YY_BREAK case 173: YY_RULE_SETUP -#line 422 "program_lexer.l" +#line 423 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2309,7 +2296,7 @@ YY_RULE_SETUP YY_BREAK case 174: YY_RULE_SETUP -#line 428 "program_lexer.l" +#line 429 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; @@ -2318,7 +2305,7 @@ YY_RULE_SETUP YY_BREAK case 175: YY_RULE_SETUP -#line 434 "program_lexer.l" +#line 435 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2328,7 +2315,7 @@ YY_RULE_SETUP YY_BREAK case 176: YY_RULE_SETUP -#line 442 "program_lexer.l" +#line 443 "program_lexer.l" { if (require_ARB_vp) { return TEXGEN_R; @@ -2342,7 +2329,7 @@ YY_RULE_SETUP YY_BREAK case 177: YY_RULE_SETUP -#line 453 "program_lexer.l" +#line 454 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2354,13 +2341,13 @@ YY_RULE_SETUP YY_BREAK case 178: YY_RULE_SETUP -#line 462 "program_lexer.l" +#line 463 "program_lexer.l" { return DOT; } YY_BREAK case 179: /* rule 179 can match eol */ YY_RULE_SETUP -#line 464 "program_lexer.l" +#line 465 "program_lexer.l" { yylloc->first_line++; yylloc->first_column = 1; @@ -2371,7 +2358,7 @@ YY_RULE_SETUP YY_BREAK case 180: YY_RULE_SETUP -#line 471 "program_lexer.l" +#line 472 "program_lexer.l" /* eat whitespace */ ; YY_BREAK case 181: @@ -2379,20 +2366,20 @@ case 181: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 472 "program_lexer.l" +#line 473 "program_lexer.l" /* eat comments */ ; YY_BREAK case 182: YY_RULE_SETUP -#line 473 "program_lexer.l" +#line 474 "program_lexer.l" { return yytext[0]; } YY_BREAK case 183: YY_RULE_SETUP -#line 474 "program_lexer.l" +#line 475 "program_lexer.l" ECHO; YY_BREAK -#line 2396 "lex.yy.c" +#line 2383 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3160,8 +3147,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ @@ -3567,7 +3554,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 474 "program_lexer.l" +#line 475 "program_lexer.l" diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index f4beb9a78b..c8a762f8ff 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -922,6 +922,11 @@ _mesa_execute_program(GLcontext * ctx, { GLfloat a[4]; fetch_vector4(&inst->SrcReg[0], machine, a); + if (DEBUG_PROG) { + printf("KIL if (%g %g %g %g) <= 0.0\n", + a[0], a[1], a[2], a[3]); + } + if (a[0] < 0.0F || a[1] < 0.0F || a[2] < 0.0F || a[3] < 0.0F) { return GL_FALSE; } diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l index c50c7c5739..d240217481 100644 --- a/src/mesa/shader/program_lexer.l +++ b/src/mesa/shader/program_lexer.l @@ -23,6 +23,7 @@ */ #include "main/glheader.h" #include "prog_instruction.h" +#include "prog_statevars.h" #include "program_parser.h" #include "program_parse.tab.h" @@ -267,7 +268,7 @@ result { return RESULT; } {dot}palette { return PALETTE; } {dot}params { return PARAMS; } {dot}plane { return PLANE; } -{dot}point { return_token_or_DOT(require_ARB_vp, POINT); } +{dot}point { return_token_or_DOT(require_ARB_vp, POINT_TOK); } {dot}pointsize { return_token_or_DOT(require_ARB_vp, POINTSIZE); } {dot}position { return POSITION; } {dot}primary { return PRIMARY; } @@ -277,7 +278,7 @@ result { return RESULT; } {dot}scenecolor { return SCENECOLOR; } {dot}secondary { return SECONDARY; } {dot}shininess { return SHININESS; } -{dot}size { return_token_or_DOT(require_ARB_vp, SIZE); } +{dot}size { return_token_or_DOT(require_ARB_vp, SIZE_TOK); } {dot}specular { return SPECULAR; } {dot}spot { return SPOT; } {dot}texcoord { return TEXCOORD; } diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index 5c604c2fd1..9f2d4de90f 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -251,7 +251,7 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, PALETTE = 309, PARAMS = 310, PLANE = 311, - POINT = 312, + POINT_TOK = 312, POINTSIZE = 313, POSITION = 314, PRIMARY = 315, @@ -263,7 +263,7 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, SCENECOLOR = 321, SECONDARY = 322, SHININESS = 323, - SIZE = 324, + SIZE_TOK = 324, SPECULAR = 325, SPOT = 326, STATE = 327, @@ -324,7 +324,7 @@ typedef union YYSTYPE unsigned attrib; int integer; float real; - unsigned state[5]; + gl_state_index state[STATE_LENGTH]; int negate; struct asm_vector vector; gl_inst_opcode opcode; @@ -587,7 +587,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 340 +#define YYLAST 342 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 115 @@ -596,7 +596,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 264 /* YYNRULES -- Number of states. */ -#define YYNSTATES 434 +#define YYNSTATES 436 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -671,14 +671,14 @@ static const yytype_uint16 yyprhs[] = 440, 442, 447, 449, 451, 453, 455, 457, 459, 462, 464, 466, 472, 474, 477, 479, 481, 487, 490, 491, 498, 502, 503, 505, 507, 509, 511, 513, 516, 518, - 520, 523, 528, 533, 534, 536, 538, 540, 542, 545, - 547, 549, 551, 553, 559, 561, 565, 571, 577, 579, - 583, 589, 591, 593, 595, 597, 599, 601, 603, 605, - 607, 611, 617, 625, 635, 638, 641, 643, 645, 646, - 647, 651, 652, 656, 660, 662, 667, 670, 673, 676, - 679, 683, 686, 690, 691, 693, 695, 696, 698, 700, - 701, 703, 705, 706, 708, 710, 711, 715, 716, 720, - 721, 725, 727, 729, 731 + 520, 523, 528, 533, 534, 538, 540, 542, 544, 547, + 549, 551, 553, 555, 561, 563, 567, 573, 579, 581, + 585, 591, 593, 595, 597, 599, 601, 603, 605, 607, + 609, 613, 619, 627, 637, 640, 643, 645, 647, 648, + 649, 653, 654, 658, 662, 664, 669, 672, 675, 678, + 681, 685, 688, 692, 693, 695, 697, 698, 700, 702, + 703, 705, 707, 708, 710, 712, 713, 717, 718, 722, + 723, 727, 729, 731, 733 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -737,27 +737,27 @@ static const yytype_int16 yyrhs[] = 204, -1, -1, 205, -1, 40, -1, 81, -1, 41, -1, 22, -1, 50, 208, -1, 62, -1, 51, -1, 80, 242, -1, 54, 108, 210, 109, -1, 47, 108, - 211, 109, -1, -1, 209, -1, 22, -1, 22, -1, - 22, -1, 29, 63, -1, 217, -1, 220, -1, 215, - -1, 218, -1, 61, 33, 108, 216, 109, -1, 221, - -1, 221, 104, 221, -1, 61, 33, 108, 221, 109, - -1, 61, 45, 108, 219, 109, -1, 222, -1, 222, - 104, 222, -1, 61, 45, 108, 222, 109, -1, 22, - -1, 22, -1, 225, -1, 227, -1, 226, -1, 227, - -1, 228, -1, 23, -1, 22, -1, 113, 228, 114, - -1, 113, 228, 107, 228, 114, -1, 113, 228, 107, - 228, 107, 228, 114, -1, 113, 228, 107, 228, 107, - 228, 107, 228, 114, -1, 229, 23, -1, 229, 22, - -1, 110, -1, 111, -1, -1, -1, 11, 231, 234, - -1, -1, 5, 233, 234, -1, 234, 107, 98, -1, - 98, -1, 9, 98, 112, 236, -1, 64, 59, -1, - 64, 36, -1, 64, 237, -1, 64, 58, -1, 64, - 73, 242, -1, 64, 29, -1, 28, 238, 239, -1, - -1, 38, -1, 26, -1, -1, 60, -1, 67, -1, - -1, 38, -1, 26, -1, -1, 60, -1, 67, -1, - -1, 108, 245, 109, -1, -1, 108, 246, 109, -1, - -1, 108, 247, 109, -1, 22, -1, 22, -1, 22, - -1, 6, 98, 112, 98, -1 + 211, 109, -1, -1, 108, 209, 109, -1, 22, -1, + 22, -1, 22, -1, 29, 63, -1, 217, -1, 220, + -1, 215, -1, 218, -1, 61, 33, 108, 216, 109, + -1, 221, -1, 221, 104, 221, -1, 61, 33, 108, + 221, 109, -1, 61, 45, 108, 219, 109, -1, 222, + -1, 222, 104, 222, -1, 61, 45, 108, 222, 109, + -1, 22, -1, 22, -1, 225, -1, 227, -1, 226, + -1, 227, -1, 228, -1, 23, -1, 22, -1, 113, + 228, 114, -1, 113, 228, 107, 228, 114, -1, 113, + 228, 107, 228, 107, 228, 114, -1, 113, 228, 107, + 228, 107, 228, 107, 228, 114, -1, 229, 23, -1, + 229, 22, -1, 110, -1, 111, -1, -1, -1, 11, + 231, 234, -1, -1, 5, 233, 234, -1, 234, 107, + 98, -1, 98, -1, 9, 98, 112, 236, -1, 64, + 59, -1, 64, 36, -1, 64, 237, -1, 64, 58, + -1, 64, 73, 242, -1, 64, 29, -1, 28, 238, + 239, -1, -1, 38, -1, 26, -1, -1, 60, -1, + 67, -1, -1, 38, -1, 26, -1, -1, 60, -1, + 67, -1, -1, 108, 245, 109, -1, -1, 108, 246, + 109, -1, -1, 108, 247, 109, -1, 22, -1, 22, + -1, 22, -1, 6, 98, 112, 98, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -806,9 +806,9 @@ static const char *const yytname[] = "EYE", "FOG", "FOGCOORD", "FRAGMENT", "FRONT", "HALF", "INVERSE", "INVTRANS", "LIGHT", "LIGHTMODEL", "LIGHTPROD", "LOCAL", "MATERIAL", "MAT_PROGRAM", "MATRIX", "MATRIXINDEX", "MODELVIEW", "MVP", "NORMAL", - "OBJECT", "PALETTE", "PARAMS", "PLANE", "POINT", "POINTSIZE", "POSITION", - "PRIMARY", "PROGRAM", "PROJECTION", "RANGE", "RESULT", "ROW", - "SCENECOLOR", "SECONDARY", "SHININESS", "SIZE", "SPECULAR", "SPOT", + "OBJECT", "PALETTE", "PARAMS", "PLANE", "POINT_TOK", "POINTSIZE", + "POSITION", "PRIMARY", "PROGRAM", "PROJECTION", "RANGE", "RESULT", "ROW", + "SCENECOLOR", "SECONDARY", "SHININESS", "SIZE_TOK", "SPECULAR", "SPOT", "STATE", "TEXCOORD", "TEXENV", "TEXGEN", "TEXGEN_Q", "TEXGEN_R", "TEXGEN_S", "TEXGEN_T", "TEXTURE", "TRANSPOSE", "TEXTURE_UNIT", "TEX_1D", "TEX_2D", "TEX_3D", "TEX_CUBE", "TEX_RECT", "TEX_SHADOW1D", @@ -934,7 +934,7 @@ static const yytype_uint8 yyr2[] = 1, 4, 1, 1, 1, 1, 1, 1, 2, 1, 1, 5, 1, 2, 1, 1, 5, 2, 0, 6, 3, 0, 1, 1, 1, 1, 1, 2, 1, 1, - 2, 4, 4, 0, 1, 1, 1, 1, 2, 1, + 2, 4, 4, 0, 3, 1, 1, 1, 2, 1, 1, 1, 1, 5, 1, 3, 5, 5, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 7, 9, 2, 2, 1, 1, 0, 0, @@ -977,111 +977,111 @@ static const yytype_uint16 yydefact[] = 0, 92, 228, 220, 62, 0, 60, 61, 0, 228, 0, 110, 256, 27, 26, 72, 45, 257, 0, 0, 211, 0, 212, 0, 172, 0, 160, 0, 152, 0, - 157, 158, 141, 142, 159, 139, 140, 0, 195, 187, - 194, 0, 190, 183, 185, 184, 180, 182, 263, 0, - 156, 155, 162, 163, 0, 0, 102, 0, 99, 0, - 0, 0, 55, 70, 64, 44, 0, 0, 228, 0, - 31, 0, 228, 206, 210, 0, 0, 249, 197, 0, - 196, 0, 260, 167, 166, 164, 165, 161, 186, 0, - 97, 98, 101, 228, 221, 0, 0, 63, 228, 51, - 52, 50, 0, 0, 0, 115, 123, 126, 124, 201, - 202, 125, 262, 0, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 29, 28, 171, 146, - 148, 145, 0, 143, 144, 0, 192, 191, 176, 0, - 67, 65, 68, 66, 0, 0, 0, 127, 178, 228, - 114, 258, 149, 147, 153, 154, 228, 222, 228, 0, - 0, 0, 177, 116, 0, 0, 0, 204, 0, 208, - 0, 223, 228, 203, 0, 207, 0, 0, 49, 205, - 209, 0, 0, 179 + 157, 158, 141, 142, 159, 139, 140, 0, 0, 187, + 0, 190, 183, 185, 184, 180, 182, 263, 0, 156, + 155, 162, 163, 0, 0, 102, 0, 99, 0, 0, + 0, 55, 70, 64, 44, 0, 0, 228, 0, 31, + 0, 228, 206, 210, 0, 0, 249, 197, 0, 195, + 0, 196, 0, 260, 167, 166, 164, 165, 161, 186, + 0, 97, 98, 101, 228, 221, 0, 0, 63, 228, + 51, 52, 50, 0, 0, 0, 115, 123, 126, 124, + 201, 202, 125, 262, 0, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 29, 28, 171, + 146, 148, 145, 0, 143, 144, 0, 192, 194, 191, + 176, 0, 67, 65, 68, 66, 0, 0, 0, 127, + 178, 228, 114, 258, 149, 147, 153, 154, 228, 222, + 228, 0, 0, 0, 177, 116, 0, 0, 0, 204, + 0, 208, 0, 223, 228, 203, 0, 207, 0, 0, + 49, 205, 209, 0, 0, 179 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 3, 4, 6, 8, 9, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 268, 376, - 39, 146, 71, 58, 67, 315, 316, 351, 114, 59, - 115, 255, 256, 257, 347, 391, 393, 68, 314, 105, - 266, 196, 97, 40, 41, 116, 191, 309, 251, 307, - 157, 42, 43, 44, 131, 83, 261, 354, 132, 117, - 355, 356, 118, 171, 285, 172, 383, 403, 173, 228, - 174, 404, 175, 301, 286, 277, 176, 304, 337, 177, - 223, 178, 275, 179, 241, 180, 397, 412, 181, 296, - 297, 339, 238, 289, 290, 331, 329, 182, 119, 358, - 359, 416, 120, 360, 418, 121, 271, 273, 361, 122, + 31, 32, 33, 34, 35, 36, 37, 38, 268, 377, + 39, 146, 71, 58, 67, 314, 315, 352, 114, 59, + 115, 255, 256, 257, 348, 393, 395, 68, 313, 105, + 266, 196, 97, 40, 41, 116, 191, 308, 251, 306, + 157, 42, 43, 44, 131, 83, 261, 355, 132, 117, + 356, 357, 118, 171, 285, 172, 384, 405, 173, 228, + 174, 406, 175, 300, 286, 277, 176, 303, 338, 177, + 223, 178, 275, 179, 241, 180, 399, 414, 181, 295, + 296, 340, 238, 289, 330, 332, 328, 182, 119, 359, + 360, 418, 120, 361, 420, 121, 271, 273, 362, 122, 136, 123, 124, 138, 72, 45, 55, 46, 50, 77, - 47, 60, 91, 142, 205, 229, 215, 144, 320, 243, - 207, 363, 299, 48 + 47, 60, 91, 142, 205, 229, 215, 144, 319, 243, + 207, 364, 298, 48 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -334 +#define YYPACT_NINF -369 static const yytype_int16 yypact[] = { - 134, -334, -334, 41, -334, -334, 47, -49, -334, 169, - 20, -334, 34, 61, 75, 115, -334, -334, -19, -19, - -19, -19, -19, -19, 116, 44, -19, -334, 109, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - 110, -334, -334, -334, -334, -334, -334, -334, -334, -334, - 119, 106, 107, 111, -22, 119, 4, -334, 5, 104, - -334, 113, 114, 117, 118, 120, -334, 121, 124, -334, - -334, -334, -15, 122, -334, -334, -334, 123, 133, -14, - 158, 210, -11, -334, 123, 21, -334, -334, -334, -334, - 127, -334, 44, -334, -334, -334, -334, -334, 44, 44, - 44, 44, 44, 44, -334, -334, -334, -334, 1, 68, - 87, -1, 132, 44, 65, 135, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -15, 141, -334, -334, -334, - -334, 136, -334, -334, -334, -334, -334, -334, -334, 149, - -334, -334, 58, 219, -334, 137, 139, -15, 140, -334, - 142, -334, -334, 74, -334, -334, 127, -334, 143, 144, - 145, 179, 15, 146, 81, 147, 83, 89, 0, 148, - 127, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, 183, -334, 74, -334, 150, -334, -334, 127, 151, - 152, -334, 43, -334, -334, -334, -334, -10, 155, -334, - 138, -334, -334, -334, -334, -334, -334, 154, 44, 44, - 162, 175, 44, -334, -334, -334, -334, 243, 245, 246, - -334, -334, -334, -334, 247, -334, -334, -334, -334, 204, - 247, -4, 163, 250, -334, 165, -334, 127, 27, -334, - -334, -334, 252, 248, 18, 167, -334, 255, -334, 256, - 255, -334, 44, -334, -334, 170, -334, -334, 178, 44, - 168, -334, -334, -334, -334, -334, -334, 174, 176, 177, - -334, 180, -334, 181, -334, 182, -334, 184, -334, 185, - -334, -334, -334, -334, -334, -334, -334, 263, -334, -334, - -334, 264, -334, -334, -334, -334, -334, -334, -334, 186, - -334, -334, -334, -334, 131, 265, -334, 188, -334, 189, - 190, 46, -334, -334, 101, -334, 193, -5, -7, 266, - -334, 108, 44, -334, -334, 236, 14, 83, -334, 192, - -334, 194, -334, -334, -334, -334, -334, -334, -334, 195, - -334, -334, -334, 44, -334, 280, 283, -334, 44, -334, - -334, -334, 78, 87, 49, -334, -334, -334, -334, -334, - -334, -334, -334, 197, -334, -334, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, -334, 276, -334, -334, 6, -334, -334, -334, 51, - -334, -334, -334, -334, 201, 202, 203, -334, 244, -7, - -334, -334, -334, -334, -334, -334, 44, -334, 44, 243, - 245, 205, -334, -334, 198, 207, 206, 212, 211, 217, - 265, -334, 44, -334, 243, -334, 245, -17, -334, -334, - -334, 265, 213, -334 + 143, -369, -369, 36, -369, -369, 45, -39, -369, 169, + -33, -369, -19, -6, -4, 12, -369, -369, -34, -34, + -34, -34, -34, -34, 15, 62, -34, -369, 26, -369, + -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, + 60, -369, -369, -369, -369, -369, -369, -369, -369, -369, + 20, 56, 107, 110, 37, 20, -3, -369, 111, 109, + -369, 113, 114, 116, 117, 118, -369, 119, 125, -369, + -369, -369, -15, 121, -369, -369, -369, 122, 132, -18, + 167, 210, -11, -369, 122, 63, -369, -369, -369, -369, + 130, -369, 62, -369, -369, -369, -369, -369, 62, 62, + 62, 62, 62, 62, -369, -369, -369, -369, 9, 72, + 87, -1, 131, 62, 104, 134, -369, -369, -369, -369, + -369, -369, -369, -369, -369, -15, 142, -369, -369, -369, + -369, 135, -369, -369, -369, -369, -369, -369, -369, 182, + -369, -369, 52, 219, -369, 138, 139, -15, 140, -369, + 141, -369, -369, 61, -369, -369, 130, -369, 144, 145, + 146, 180, 11, 147, 85, 148, 99, 89, -2, 149, + 130, -369, -369, -369, -369, -369, -369, -369, -369, -369, + -369, 184, -369, 61, -369, 150, -369, -369, 130, 151, + 152, -369, 27, -369, -369, -369, -369, -10, 154, -369, + 153, -369, -369, -369, -369, -369, -369, 155, 62, 62, + 161, 168, 62, -369, -369, -369, -369, 229, 244, 246, + -369, -369, -369, -369, 247, -369, -369, -369, -369, 204, + 247, 17, 163, 164, -369, 165, -369, 130, 67, -369, + -369, -369, 252, 248, 18, 170, -369, 253, -369, 255, + 253, -369, 62, -369, -369, 171, -369, -369, 177, 62, + 172, -369, -369, -369, -369, -369, -369, 173, 175, 176, + -369, 178, -369, 179, -369, 181, -369, 183, -369, 185, + -369, -369, -369, -369, -369, -369, -369, 262, 264, -369, + 267, -369, -369, -369, -369, -369, -369, -369, 186, -369, + -369, -369, -369, 136, 269, -369, 187, -369, 188, 190, + 43, -369, -369, 106, -369, 193, -5, -7, 271, -369, + 108, 62, -369, -369, 245, 4, 99, -369, 194, -369, + 195, -369, 196, -369, -369, -369, -369, -369, -369, -369, + 197, -369, -369, -369, 62, -369, 280, 285, -369, 62, + -369, -369, -369, 93, 87, 53, -369, -369, -369, -369, + -369, -369, -369, -369, 199, -369, -369, -369, -369, -369, + -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, + -369, -369, -369, 278, -369, -369, 8, -369, -369, -369, + -369, 57, -369, -369, -369, -369, 203, 205, 206, -369, + 250, -7, -369, -369, -369, -369, -369, -369, 62, -369, + 62, 229, 244, 208, -369, -369, 198, 211, 202, 213, + 214, 218, 269, -369, 62, -369, 229, -369, 244, 54, + -369, -369, -369, 269, 215, -369 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, -94, -88, 126, -334, -334, -333, -334, -91, -334, - -334, -334, -334, -334, -334, -334, -334, 128, -334, -334, - -334, -334, -334, -334, -334, 249, -334, -334, -334, 73, - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -72, -334, -81, -334, -334, -334, -334, -334, -334, -334, - -334, -334, -334, -334, -307, 99, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -23, -334, - -334, -303, -334, -334, -334, -334, -334, -334, 251, -334, - -334, -334, -334, -334, -334, -334, -327, -316, 253, -334, - -334, -334, -80, -110, -82, -334, -334, -334, -334, 277, - -334, 254, -334, -334, -334, -161, 153, -146, -334, -334, - -334, -334, -334, -334 + -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, + -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, + -369, -94, -88, 133, -369, -369, -334, -369, -85, -369, + -369, -369, -369, -369, -369, -369, -369, 128, -369, -369, + -369, -369, -369, -369, -369, 251, -369, -369, -369, 77, + -369, -369, -369, -369, -369, -369, -369, -369, -369, -369, + -72, -369, -81, -369, -369, -369, -369, -369, -369, -369, + -369, -369, -369, -369, -305, 101, -369, -369, -369, -369, + -369, -369, -369, -369, -369, -369, -369, -369, -22, -369, + -369, -336, -369, -369, -369, -369, -369, -369, 254, -369, + -369, -369, -369, -369, -369, -369, -342, -368, 256, -369, + -369, -369, -80, -110, -82, -369, -369, -369, -369, 279, + -369, 257, -369, -369, -369, -161, 156, -146, -369, -369, + -369, -369, -369, -369 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1092,79 +1092,79 @@ static const yytype_int16 yypgoto[] = static const yytype_int16 yytable[] = { 139, 133, 137, 192, 145, 231, 149, 106, 107, 152, - 216, 148, 254, 150, 151, 394, 147, 349, 147, 384, - 280, 147, 108, 108, 244, 239, 281, 183, 282, 153, - 280, 139, 85, 86, 198, 184, 281, 154, 280, 379, - 87, 5, 248, 221, 281, 56, 109, 140, 185, 10, - 109, 186, 302, 380, 352, 7, 210, 110, 187, 141, - 155, 110, 88, 89, 283, 353, 284, 293, 294, 240, - 222, 303, 188, 381, 156, 415, 284, 90, 405, 57, - 111, 111, 417, 112, 284, 382, 81, 431, 66, 428, - 82, 292, 388, 350, 419, 189, 190, 429, 113, 69, - 70, 158, 113, 69, 70, 225, 113, 226, 295, 226, - 430, 395, 92, 159, 160, 264, 161, 427, 203, 227, - 263, 227, 162, 396, 269, 204, 49, 147, 432, 163, - 164, 165, 51, 166, 213, 167, 232, 1, 2, 233, - 234, 214, 311, 235, 168, 61, 62, 63, 64, 65, - 252, 236, 73, 343, 69, 70, 399, 253, 406, 52, - 344, 169, 170, 400, 193, 407, 385, 194, 195, 237, - 139, 201, 202, 53, 11, 12, 13, 317, 14, 15, + 216, 148, 254, 150, 151, 396, 147, 350, 147, 108, + 385, 147, 108, 239, 244, 85, 86, 183, 280, 380, + 56, 139, 280, 87, 281, 184, 5, 153, 281, 221, + 198, 280, 248, 381, 421, 154, 109, 281, 185, 282, + 109, 186, 301, 7, 353, 88, 89, 110, 187, 10, + 432, 110, 210, 382, 57, 354, 222, 240, 155, 419, + 90, 302, 188, 49, 284, 383, 417, 111, 284, 51, + 111, 407, 156, 112, 431, 283, 429, 284, 66, 140, + 430, 291, 52, 351, 53, 189, 190, 434, 113, 69, + 70, 141, 113, 69, 70, 158, 113, 292, 293, 225, + 54, 226, 203, 66, 160, 264, 161, 159, 76, 204, + 263, 213, 162, 227, 269, 226, 397, 147, 214, 163, + 164, 165, 74, 166, 252, 167, 232, 227, 398, 233, + 234, 253, 310, 235, 168, 81, 1, 2, 294, 82, + 344, 236, 61, 62, 63, 64, 65, 345, 433, 73, + 401, 169, 170, 390, 408, 386, 75, 402, 78, 237, + 139, 409, 69, 70, 11, 12, 13, 316, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 93, 94, 95, 96, 333, 334, 335, - 336, 345, 346, 54, 66, 74, 75, 76, 78, 79, - 98, 99, 56, 80, 100, 101, 104, 102, 103, 125, - 126, 127, 130, 389, 377, 143, 139, 357, 137, 199, - -59, 206, 220, 197, 208, 200, 209, 211, 245, 212, - 260, 217, 218, 219, 224, 230, 242, 267, 247, 249, - 250, 139, 259, 262, 265, 270, 317, 272, 274, 276, - 278, 287, 288, 291, 298, 305, 300, 306, 308, 312, - 313, 318, 319, 321, 322, 328, 330, 338, 362, 323, - 324, 325, 378, 326, 327, 332, 414, 340, 341, 342, - 348, 386, 390, 387, 388, 392, 401, 402, 408, 411, - 409, 410, 421, 420, 422, 423, 424, 139, 357, 137, - 425, 426, 433, 310, 139, 258, 317, 413, 128, 279, - 398, 0, 84, 134, 129, 135, 246, 0, 0, 0, - 317 + 26, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 193, 201, 202, 194, 195, 93, 94, + 95, 96, 334, 335, 336, 337, 346, 347, 92, 79, + 98, 99, 80, 100, 101, 102, 103, 104, 125, 126, + 127, 56, 130, 378, 391, 139, 358, 137, 143, -59, + 199, 206, 197, 220, 200, 208, 209, 211, 212, 245, + 267, 270, 217, 218, 219, 224, 230, 242, 247, 249, + 250, 259, 139, 265, 262, 260, 272, 316, 274, 276, + 278, 287, 288, 290, 297, 305, 299, 307, 304, 312, + 311, 318, 320, 321, 327, 317, 329, 322, 323, 331, + 324, 339, 325, 363, 326, 333, 341, 342, 416, 343, + 349, 379, 392, 387, 388, 389, 390, 394, 403, 404, + 410, 425, 423, 411, 412, 413, 422, 426, 424, 139, + 358, 137, 428, 427, 435, 258, 139, 309, 316, 415, + 128, 279, 400, 0, 84, 0, 134, 129, 135, 246, + 0, 0, 316 }; static const yytype_int16 yycheck[] = { 82, 82, 82, 113, 92, 166, 100, 22, 23, 103, - 156, 99, 22, 101, 102, 348, 98, 22, 100, 326, - 24, 103, 37, 37, 170, 25, 30, 28, 32, 28, - 24, 113, 28, 29, 125, 36, 30, 36, 24, 25, - 36, 0, 188, 28, 30, 64, 61, 26, 49, 98, - 61, 52, 34, 39, 61, 8, 147, 72, 59, 38, - 59, 72, 58, 59, 68, 72, 70, 40, 41, 69, - 55, 53, 73, 59, 73, 408, 70, 73, 385, 98, - 95, 95, 409, 98, 70, 71, 108, 104, 98, 422, - 112, 237, 109, 98, 410, 96, 97, 424, 113, 110, - 111, 33, 113, 110, 111, 24, 113, 26, 81, 26, - 426, 33, 107, 45, 27, 209, 29, 420, 60, 38, - 208, 38, 35, 45, 212, 67, 106, 209, 431, 42, - 43, 44, 98, 46, 60, 48, 47, 3, 4, 50, - 51, 67, 252, 54, 57, 19, 20, 21, 22, 23, - 107, 62, 26, 107, 110, 111, 107, 114, 107, 98, - 114, 74, 75, 114, 99, 114, 327, 102, 103, 80, - 252, 22, 23, 98, 5, 6, 7, 259, 9, 10, + 156, 99, 22, 101, 102, 349, 98, 22, 100, 37, + 325, 103, 37, 25, 170, 28, 29, 28, 24, 25, + 64, 113, 24, 36, 30, 36, 0, 28, 30, 28, + 125, 24, 188, 39, 412, 36, 61, 30, 49, 32, + 61, 52, 34, 8, 61, 58, 59, 72, 59, 98, + 428, 72, 147, 59, 98, 72, 55, 69, 59, 411, + 73, 53, 73, 106, 70, 71, 410, 95, 70, 98, + 95, 386, 73, 98, 426, 68, 422, 70, 98, 26, + 424, 237, 98, 98, 98, 96, 97, 433, 113, 110, + 111, 38, 113, 110, 111, 33, 113, 40, 41, 24, + 98, 26, 60, 98, 27, 209, 29, 45, 98, 67, + 208, 60, 35, 38, 212, 26, 33, 209, 67, 42, + 43, 44, 106, 46, 107, 48, 47, 38, 45, 50, + 51, 114, 252, 54, 57, 108, 3, 4, 81, 112, + 107, 62, 19, 20, 21, 22, 23, 114, 104, 26, + 107, 74, 75, 109, 107, 326, 106, 114, 112, 80, + 252, 114, 110, 111, 5, 6, 7, 259, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 99, 100, 101, 102, 76, 77, 78, - 79, 110, 111, 98, 98, 106, 106, 98, 112, 112, - 107, 107, 64, 112, 107, 107, 102, 107, 107, 107, - 107, 98, 22, 343, 322, 108, 318, 318, 318, 98, - 108, 22, 63, 108, 107, 109, 107, 107, 65, 107, - 112, 108, 108, 108, 108, 108, 108, 82, 108, 108, - 108, 343, 107, 109, 102, 22, 348, 22, 22, 22, - 66, 108, 22, 108, 22, 108, 28, 22, 22, 109, - 102, 113, 108, 107, 107, 22, 22, 22, 22, 109, - 109, 109, 56, 109, 109, 109, 406, 109, 109, 109, - 107, 109, 22, 109, 109, 22, 109, 31, 107, 65, - 108, 108, 114, 108, 107, 109, 104, 399, 399, 399, - 109, 104, 109, 250, 406, 197, 408, 399, 79, 230, - 353, -1, 55, 82, 80, 82, 183, -1, -1, -1, - 422 + 92, 93, 94, 99, 22, 23, 102, 103, 99, 100, + 101, 102, 76, 77, 78, 79, 110, 111, 107, 112, + 107, 107, 112, 107, 107, 107, 107, 102, 107, 107, + 98, 64, 22, 321, 344, 317, 317, 317, 108, 108, + 98, 22, 108, 63, 109, 107, 107, 107, 107, 65, + 82, 22, 108, 108, 108, 108, 108, 108, 108, 108, + 108, 107, 344, 102, 109, 112, 22, 349, 22, 22, + 66, 108, 108, 108, 22, 22, 28, 22, 108, 102, + 109, 108, 107, 107, 22, 113, 22, 109, 109, 22, + 109, 22, 109, 22, 109, 109, 109, 109, 408, 109, + 107, 56, 22, 109, 109, 109, 109, 22, 109, 31, + 107, 109, 114, 108, 108, 65, 108, 104, 107, 401, + 401, 401, 104, 109, 109, 197, 408, 250, 410, 401, + 79, 230, 354, -1, 55, -1, 82, 80, 82, 183, + -1, -1, 424 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1199,22 +1199,22 @@ static const yytype_uint8 yystos[] = 108, 163, 107, 114, 22, 146, 147, 148, 152, 107, 112, 171, 109, 137, 136, 102, 155, 82, 133, 137, 22, 221, 22, 222, 22, 197, 22, 190, 66, 190, - 24, 30, 32, 68, 70, 179, 189, 108, 22, 208, - 209, 108, 242, 40, 41, 81, 204, 205, 22, 247, - 28, 188, 34, 53, 192, 108, 22, 164, 22, 162, - 164, 228, 109, 102, 153, 140, 141, 229, 113, 108, - 243, 107, 107, 109, 109, 109, 109, 109, 22, 211, - 22, 210, 109, 76, 77, 78, 79, 193, 22, 206, - 109, 109, 109, 107, 114, 110, 111, 149, 107, 22, - 98, 142, 61, 72, 172, 175, 176, 177, 214, 215, - 218, 223, 22, 246, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 134, 137, 56, 25, - 39, 59, 71, 181, 189, 240, 109, 109, 109, 228, - 22, 150, 22, 151, 141, 33, 45, 201, 203, 107, - 114, 109, 31, 182, 186, 189, 107, 114, 107, 108, - 108, 65, 202, 175, 228, 141, 216, 221, 219, 222, - 108, 114, 107, 109, 104, 109, 104, 206, 141, 221, - 222, 104, 206, 109 + 24, 30, 32, 68, 70, 179, 189, 108, 108, 208, + 108, 242, 40, 41, 81, 204, 205, 22, 247, 28, + 188, 34, 53, 192, 108, 22, 164, 22, 162, 164, + 228, 109, 102, 153, 140, 141, 229, 113, 108, 243, + 107, 107, 109, 109, 109, 109, 109, 22, 211, 22, + 209, 22, 210, 109, 76, 77, 78, 79, 193, 22, + 206, 109, 109, 109, 107, 114, 110, 111, 149, 107, + 22, 98, 142, 61, 72, 172, 175, 176, 177, 214, + 215, 218, 223, 22, 246, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 134, 137, 56, + 25, 39, 59, 71, 181, 189, 240, 109, 109, 109, + 109, 228, 22, 150, 22, 151, 141, 33, 45, 201, + 203, 107, 114, 109, 31, 182, 186, 189, 107, 114, + 107, 108, 108, 65, 202, 175, 228, 141, 216, 221, + 219, 222, 108, 114, 107, 109, 104, 109, 104, 206, + 141, 221, 222, 104, 206, 109 }; #define yyerrok (yyerrstatus = 0) @@ -3899,7 +3899,7 @@ yyreduce: /* Line 1455 of yacc.c */ #line 1496 "program_parse.y" { - (yyval.integer) = (yyvsp[(1) - (1)].integer); + (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; @@ -4946,8 +4946,7 @@ int add_state_reference(struct gl_program_parameter_list *param_list, name = _mesa_program_state_string(tokens); index = _mesa_add_parameter(param_list, PROGRAM_STATE_VAR, name, - size, GL_NONE, - NULL, (gl_state_index *) tokens, 0x0); + size, GL_NONE, NULL, tokens, 0x0); param_list->StateFlags |= _mesa_program_state_flags(tokens); /* free name string here since we duplicated it in add_parameter() */ diff --git a/src/mesa/shader/program_parse.tab.h b/src/mesa/shader/program_parse.tab.h index de08fb747f..dabb3bf1a3 100644 --- a/src/mesa/shader/program_parse.tab.h +++ b/src/mesa/shader/program_parse.tab.h @@ -93,7 +93,7 @@ PALETTE = 309, PARAMS = 310, PLANE = 311, - POINT = 312, + POINT_TOK = 312, POINTSIZE = 313, POSITION = 314, PRIMARY = 315, @@ -105,7 +105,7 @@ SCENECOLOR = 321, SECONDARY = 322, SHININESS = 323, - SIZE = 324, + SIZE_TOK = 324, SPECULAR = 325, SPOT = 326, STATE = 327, @@ -166,7 +166,7 @@ typedef union YYSTYPE unsigned attrib; int integer; float real; - unsigned state[5]; + gl_state_index state[STATE_LENGTH]; int negate; struct asm_vector vector; gl_inst_opcode opcode; diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index e2e83e484f..06c1915fbe 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -117,7 +117,7 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, unsigned attrib; int integer; float real; - unsigned state[5]; + gl_state_index state[STATE_LENGTH]; int negate; struct asm_vector vector; gl_inst_opcode opcode; @@ -159,9 +159,9 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, %token MATERIAL MAT_PROGRAM MATRIX MATRIXINDEX MODELVIEW MVP %token NORMAL %token OBJECT -%token PALETTE PARAMS PLANE POINT POINTSIZE POSITION PRIMARY PROGRAM PROJECTION +%token PALETTE PARAMS PLANE POINT_TOK POINTSIZE POSITION PRIMARY PROGRAM PROJECTION %token RANGE RESULT ROW -%token SCENECOLOR SECONDARY SHININESS SIZE SPECULAR SPOT STATE +%token SCENECOLOR SECONDARY SHININESS SIZE_TOK SPECULAR SPOT STATE %token TEXCOORD TEXENV TEXGEN TEXGEN_Q TEXGEN_R TEXGEN_S TEXGEN_T TEXTURE TRANSPOSE %token TEXTURE_UNIT TEX_1D TEX_2D TEX_3D TEX_CUBE TEX_RECT %token TEX_SHADOW1D TEX_SHADOW2D TEX_SHADOWRECT @@ -1353,14 +1353,14 @@ stateClipPlaneNum: INTEGER } ; -statePointItem: POINT statePointProperty +statePointItem: POINT_TOK statePointProperty { memset($$, 0, sizeof($$)); $$[0] = $2; } ; -statePointProperty: SIZE +statePointProperty: SIZE_TOK { $$ = STATE_POINT_SIZE; } @@ -1492,9 +1492,9 @@ stateOptModMatNum: { $$ = 0; } - | stateModMatNum + | '[' stateModMatNum ']' { - $$ = $1; + $$ = $2; } ; stateModMatNum: INTEGER @@ -2077,8 +2077,7 @@ int add_state_reference(struct gl_program_parameter_list *param_list, name = _mesa_program_state_string(tokens); index = _mesa_add_parameter(param_list, PROGRAM_STATE_VAR, name, - size, GL_NONE, - NULL, (gl_state_index *) tokens, 0x0); + size, GL_NONE, NULL, tokens, 0x0); param_list->StateFlags |= _mesa_program_state_flags(tokens); /* free name string here since we duplicated it in add_parameter() */ |