return 0;
}
- lval->string = return_string(state, text);
+static int
+handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval)
+{
++ lval->string = strdup(text);
+
+ return (_mesa_symbol_table_find_symbol(state->st, 0, text) == NULL)
+ ? IDENTIFIER : USED_IDENTIFIER;
+}
+
#define YY_USER_ACTION \
do { \
yylloc->first_column = yylloc->last_column; \
} while(0);
#define YY_EXTRA_TYPE struct asm_parser_state *
- #line 1204 "lex.yy.c"
-#line 1008 "lex.yy.c"
++#line 1165 "lex.yy.c"
#define INITIAL 0
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- #line 196 "program_lexer.l"
-#line 137 "program_lexer.l"
++#line 157 "program_lexer.l"
- #line 1453 "lex.yy.c"
-#line 1252 "lex.yy.c"
++#line 1414 "lex.yy.c"
yylval = yylval_param;
case 1:
YY_RULE_SETUP
- #line 198 "program_lexer.l"
-#line 139 "program_lexer.l"
++#line 159 "program_lexer.l"
{ return ARBvp_10; }
YY_BREAK
case 2:
YY_RULE_SETUP
- #line 199 "program_lexer.l"
-#line 140 "program_lexer.l"
++#line 160 "program_lexer.l"
{ return ARBfp_10; }
YY_BREAK
case 3:
YY_RULE_SETUP
- #line 200 "program_lexer.l"
-#line 141 "program_lexer.l"
++#line 161 "program_lexer.l"
{
yylval->integer = at_address;
return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS);
YY_BREAK
case 4:
YY_RULE_SETUP
- #line 204 "program_lexer.l"
-#line 145 "program_lexer.l"
++#line 165 "program_lexer.l"
{ return ALIAS; }
YY_BREAK
case 5:
YY_RULE_SETUP
- #line 205 "program_lexer.l"
-#line 146 "program_lexer.l"
++#line 166 "program_lexer.l"
{ return ATTRIB; }
YY_BREAK
case 6:
YY_RULE_SETUP
- #line 206 "program_lexer.l"
-#line 147 "program_lexer.l"
++#line 167 "program_lexer.l"
{ return END; }
YY_BREAK
case 7:
YY_RULE_SETUP
- #line 207 "program_lexer.l"
-#line 148 "program_lexer.l"
++#line 168 "program_lexer.l"
{ return OPTION; }
YY_BREAK
case 8:
YY_RULE_SETUP
- #line 208 "program_lexer.l"
-#line 149 "program_lexer.l"
++#line 169 "program_lexer.l"
{ return OUTPUT; }
YY_BREAK
case 9:
YY_RULE_SETUP
- #line 209 "program_lexer.l"
-#line 150 "program_lexer.l"
++#line 170 "program_lexer.l"
{ return PARAM; }
YY_BREAK
case 10:
YY_RULE_SETUP
- #line 210 "program_lexer.l"
-#line 151 "program_lexer.l"
++#line 171 "program_lexer.l"
{ yylval->integer = at_temp; return TEMP; }
YY_BREAK
case 11:
YY_RULE_SETUP
- #line 212 "program_lexer.l"
-#line 153 "program_lexer.l"
-{ return_opcode( 1, VECTOR_OP, ABS, OFF); }
++#line 173 "program_lexer.l"
+{ return_opcode( 1, VECTOR_OP, ABS, 3); }
YY_BREAK
case 12:
YY_RULE_SETUP
- #line 213 "program_lexer.l"
-#line 154 "program_lexer.l"
-{ return_opcode(require_ARB_fp, VECTOR_OP, ABS, ZERO_ONE); }
++#line 174 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, ADD, 3); }
YY_BREAK
case 13:
YY_RULE_SETUP
- #line 214 "program_lexer.l"
-#line 155 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, ADD, OFF); }
++#line 175 "program_lexer.l"
+{ return_opcode(require_ARB_vp, ARL, ARL, 3); }
YY_BREAK
case 14:
YY_RULE_SETUP
- #line 216 "program_lexer.l"
-#line 156 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, ADD, ZERO_ONE); }
++#line 177 "program_lexer.l"
+{ return_opcode(require_ARB_fp, TRI_OP, CMP, 3); }
YY_BREAK
case 15:
YY_RULE_SETUP
- #line 217 "program_lexer.l"
-#line 157 "program_lexer.l"
-{ return_opcode(require_ARB_vp, ARL, ARL, OFF); }
++#line 178 "program_lexer.l"
+{ return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); }
YY_BREAK
case 16:
YY_RULE_SETUP
- #line 219 "program_lexer.l"
-#line 159 "program_lexer.l"
-{ return_opcode(require_ARB_fp, TRI_OP, CMP, OFF); }
++#line 180 "program_lexer.l"
+{ return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); }
YY_BREAK
case 17:
YY_RULE_SETUP
- #line 220 "program_lexer.l"
-#line 160 "program_lexer.l"
-{ return_opcode(require_ARB_fp, TRI_OP, CMP, ZERO_ONE); }
++#line 181 "program_lexer.l"
+{ return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); }
YY_BREAK
case 18:
YY_RULE_SETUP
- #line 221 "program_lexer.l"
-#line 161 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, COS, OFF); }
++#line 182 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, DP3, 3); }
YY_BREAK
case 19:
YY_RULE_SETUP
- #line 222 "program_lexer.l"
-#line 162 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, COS, ZERO_ONE); }
++#line 183 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, DP4, 3); }
YY_BREAK
case 20:
YY_RULE_SETUP
- #line 223 "program_lexer.l"
-#line 164 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, DP3, OFF); }
++#line 184 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, DPH, 3); }
YY_BREAK
case 21:
YY_RULE_SETUP
- #line 224 "program_lexer.l"
-#line 165 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, DP3, ZERO_ONE); }
++#line 185 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, DST, 3); }
YY_BREAK
case 22:
YY_RULE_SETUP
- #line 226 "program_lexer.l"
-#line 166 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, DP4, OFF); }
++#line 187 "program_lexer.l"
+{ return_opcode( 1, SCALAR_OP, EX2, 3); }
YY_BREAK
case 23:
YY_RULE_SETUP
- #line 227 "program_lexer.l"
-#line 167 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, DP4, ZERO_ONE); }
++#line 188 "program_lexer.l"
+{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); }
YY_BREAK
case 24:
YY_RULE_SETUP
- #line 229 "program_lexer.l"
-#line 168 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, DPH, OFF); }
++#line 190 "program_lexer.l"
+{ return_opcode( 1, VECTOR_OP, FLR, 3); }
YY_BREAK
case 25:
YY_RULE_SETUP
- #line 230 "program_lexer.l"
-#line 169 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, DPH, ZERO_ONE); }
++#line 191 "program_lexer.l"
+{ return_opcode( 1, VECTOR_OP, FRC, 3); }
YY_BREAK
case 26:
YY_RULE_SETUP
- #line 232 "program_lexer.l"
-#line 170 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, DST, OFF); }
++#line 193 "program_lexer.l"
+{ return_opcode(require_ARB_fp, KIL, KIL, 3); }
YY_BREAK
case 27:
YY_RULE_SETUP
- #line 234 "program_lexer.l"
-#line 171 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, DST, ZERO_ONE); }
++#line 195 "program_lexer.l"
+{ return_opcode( 1, VECTOR_OP, LIT, 3); }
YY_BREAK
case 28:
YY_RULE_SETUP
- #line 235 "program_lexer.l"
-#line 173 "program_lexer.l"
-{ return_opcode( 1, SCALAR_OP, EX2, OFF); }
++#line 196 "program_lexer.l"
+{ return_opcode( 1, SCALAR_OP, LG2, 3); }
YY_BREAK
case 29:
YY_RULE_SETUP
- #line 236 "program_lexer.l"
-#line 174 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, EX2, ZERO_ONE); }
++#line 197 "program_lexer.l"
+{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); }
YY_BREAK
case 30:
YY_RULE_SETUP
- #line 237 "program_lexer.l"
-#line 175 "program_lexer.l"
-{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, OFF); }
++#line 198 "program_lexer.l"
+{ return_opcode(require_ARB_fp, TRI_OP, LRP, 3); }
YY_BREAK
case 31:
YY_RULE_SETUP
- #line 239 "program_lexer.l"
-#line 177 "program_lexer.l"
-{ return_opcode( 1, VECTOR_OP, FLR, OFF); }
++#line 200 "program_lexer.l"
+{ return_opcode( 1, TRI_OP, MAD, 3); }
YY_BREAK
case 32:
YY_RULE_SETUP
- #line 240 "program_lexer.l"
-#line 178 "program_lexer.l"
-{ return_opcode(require_ARB_fp, VECTOR_OP, FLR, ZERO_ONE); }
++#line 201 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, MAX, 3); }
YY_BREAK
case 33:
YY_RULE_SETUP
- #line 241 "program_lexer.l"
-#line 179 "program_lexer.l"
-{ return_opcode( 1, VECTOR_OP, FRC, OFF); }
++#line 202 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, MIN, 3); }
YY_BREAK
case 34:
YY_RULE_SETUP
- #line 242 "program_lexer.l"
-#line 180 "program_lexer.l"
-{ return_opcode(require_ARB_fp, VECTOR_OP, FRC, ZERO_ONE); }
++#line 203 "program_lexer.l"
+{ return_opcode( 1, VECTOR_OP, MOV, 3); }
YY_BREAK
case 35:
YY_RULE_SETUP
- #line 243 "program_lexer.l"
-#line 182 "program_lexer.l"
-{ return_opcode(require_ARB_fp, KIL, KIL, OFF); }
++#line 204 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, MUL, 3); }
YY_BREAK
case 36:
YY_RULE_SETUP
- #line 245 "program_lexer.l"
-#line 184 "program_lexer.l"
-{ return_opcode( 1, VECTOR_OP, LIT, OFF); }
++#line 206 "program_lexer.l"
+{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); }
YY_BREAK
case 37:
YY_RULE_SETUP
- #line 246 "program_lexer.l"
-#line 185 "program_lexer.l"
-{ return_opcode(require_ARB_fp, VECTOR_OP, LIT, ZERO_ONE); }
++#line 207 "program_lexer.l"
+{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); }
YY_BREAK
case 38:
YY_RULE_SETUP
- #line 247 "program_lexer.l"
-#line 186 "program_lexer.l"
-{ return_opcode( 1, SCALAR_OP, LG2, OFF); }
++#line 208 "program_lexer.l"
+{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); }
YY_BREAK
case 39:
YY_RULE_SETUP
- #line 248 "program_lexer.l"
-#line 187 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, LG2, ZERO_ONE); }
++#line 209 "program_lexer.l"
+{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); }
YY_BREAK
case 40:
YY_RULE_SETUP
- #line 249 "program_lexer.l"
-#line 188 "program_lexer.l"
-{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, OFF); }
++#line 210 "program_lexer.l"
+{ return_opcode( 1, BINSC_OP, POW, 3); }
YY_BREAK
case 41:
YY_RULE_SETUP
- #line 251 "program_lexer.l"
-#line 189 "program_lexer.l"
-{ return_opcode(require_ARB_fp, TRI_OP, LRP, OFF); }
++#line 212 "program_lexer.l"
+{ return_opcode( 1, SCALAR_OP, RCP, 3); }
YY_BREAK
case 42:
YY_RULE_SETUP
- #line 252 "program_lexer.l"
-#line 190 "program_lexer.l"
-{ return_opcode(require_ARB_fp, TRI_OP, LRP, ZERO_ONE); }
++#line 213 "program_lexer.l"
+{ return_opcode(require_NV_fp, BIN_OP, RFL, 3); }
YY_BREAK
case 43:
YY_RULE_SETUP
- #line 253 "program_lexer.l"
-#line 192 "program_lexer.l"
-{ return_opcode( 1, TRI_OP, MAD, OFF); }
++#line 214 "program_lexer.l"
+{ return_opcode( 1, SCALAR_OP, RSQ, 3); }
YY_BREAK
case 44:
YY_RULE_SETUP
- #line 255 "program_lexer.l"
-#line 193 "program_lexer.l"
-{ return_opcode(require_ARB_fp, TRI_OP, MAD, ZERO_ONE); }
++#line 216 "program_lexer.l"
+{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); }
YY_BREAK
case 45:
YY_RULE_SETUP
- #line 256 "program_lexer.l"
-#line 194 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, MAX, OFF); }
++#line 217 "program_lexer.l"
+{ return_opcode(require_NV_fp, BIN_OP, SEQ, 3); }
YY_BREAK
case 46:
YY_RULE_SETUP
- #line 257 "program_lexer.l"
-#line 195 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, MAX, ZERO_ONE); }
++#line 218 "program_lexer.l"
+{ return_opcode(require_NV_fp, BIN_OP, SFL, 3); }
YY_BREAK
case 47:
YY_RULE_SETUP
- #line 258 "program_lexer.l"
-#line 196 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, MIN, OFF); }
++#line 219 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, SGE, 3); }
YY_BREAK
case 48:
YY_RULE_SETUP
- #line 259 "program_lexer.l"
-#line 197 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, MIN, ZERO_ONE); }
++#line 220 "program_lexer.l"
+{ return_opcode(require_NV_fp, BIN_OP, SGT, 3); }
YY_BREAK
case 49:
YY_RULE_SETUP
- #line 260 "program_lexer.l"
-#line 198 "program_lexer.l"
-{ return_opcode( 1, VECTOR_OP, MOV, OFF); }
++#line 221 "program_lexer.l"
+{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); }
YY_BREAK
case 50:
YY_RULE_SETUP
- #line 261 "program_lexer.l"
-#line 199 "program_lexer.l"
-{ return_opcode(require_ARB_fp, VECTOR_OP, MOV, ZERO_ONE); }
++#line 222 "program_lexer.l"
+{ return_opcode(require_NV_fp, BIN_OP, SLE, 3); }
YY_BREAK
case 51:
YY_RULE_SETUP
- #line 262 "program_lexer.l"
-#line 200 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, MUL, OFF); }
++#line 223 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, SLT, 3); }
YY_BREAK
case 52:
YY_RULE_SETUP
- #line 263 "program_lexer.l"
-#line 201 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, MUL, ZERO_ONE); }
++#line 224 "program_lexer.l"
+{ return_opcode(require_NV_fp, BIN_OP, SNE, 3); }
YY_BREAK
case 53:
YY_RULE_SETUP
- #line 264 "program_lexer.l"
-#line 203 "program_lexer.l"
-{ return_opcode( 1, BINSC_OP, POW, OFF); }
++#line 225 "program_lexer.l"
+{ return_opcode(require_NV_fp, BIN_OP, STR, 3); }
YY_BREAK
case 54:
YY_RULE_SETUP
- #line 265 "program_lexer.l"
-#line 204 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BINSC_OP, POW, ZERO_ONE); }
++#line 226 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, SUB, 3); }
YY_BREAK
case 55:
YY_RULE_SETUP
- #line 266 "program_lexer.l"
-#line 206 "program_lexer.l"
-{ return_opcode( 1, SCALAR_OP, RCP, OFF); }
++#line 227 "program_lexer.l"
+{ return_opcode( 1, SWZ, SWZ, 3); }
YY_BREAK
case 56:
YY_RULE_SETUP
- #line 268 "program_lexer.l"
-#line 207 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, RCP, ZERO_ONE); }
++#line 229 "program_lexer.l"
+{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); }
YY_BREAK
case 57:
YY_RULE_SETUP
- #line 269 "program_lexer.l"
-#line 208 "program_lexer.l"
-{ return_opcode( 1, SCALAR_OP, RSQ, OFF); }
++#line 230 "program_lexer.l"
+{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); }
YY_BREAK
case 58:
YY_RULE_SETUP
- #line 270 "program_lexer.l"
-#line 209 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, RSQ, ZERO_ONE); }
++#line 231 "program_lexer.l"
+{ return_opcode(require_NV_fp, TXD_OP, TXD, 3); }
YY_BREAK
case 59:
YY_RULE_SETUP
- #line 271 "program_lexer.l"
-#line 211 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, OFF); }
++#line 232 "program_lexer.l"
+{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); }
YY_BREAK
case 60:
YY_RULE_SETUP
- #line 273 "program_lexer.l"
-#line 212 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, ZERO_ONE); }
++#line 234 "program_lexer.l"
+{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); }
YY_BREAK
case 61:
YY_RULE_SETUP
- #line 274 "program_lexer.l"
-#line 213 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, SGE, OFF); }
++#line 235 "program_lexer.l"
+{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); }
YY_BREAK
case 62:
YY_RULE_SETUP
- #line 275 "program_lexer.l"
-#line 214 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, SGE, ZERO_ONE); }
++#line 236 "program_lexer.l"
+{ return_opcode(require_NV_fp, SCALAR_OP, UP4B, 4); }
YY_BREAK
case 63:
YY_RULE_SETUP
- #line 276 "program_lexer.l"
-#line 215 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, OFF); }
++#line 237 "program_lexer.l"
+{ return_opcode(require_NV_fp, SCALAR_OP, UP4UB, 5); }
YY_BREAK
case 64:
YY_RULE_SETUP
- #line 278 "program_lexer.l"
-#line 216 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, ZERO_ONE); }
++#line 239 "program_lexer.l"
+{ return_opcode(require_NV_fp, TRI_OP, X2D, 3); }
YY_BREAK
case 65:
YY_RULE_SETUP
- #line 279 "program_lexer.l"
-#line 217 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, SLT, OFF); }
++#line 240 "program_lexer.l"
+{ return_opcode( 1, BIN_OP, XPD, 3); }
YY_BREAK
case 66:
YY_RULE_SETUP
- #line 281 "program_lexer.l"
-#line 218 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, SLT, ZERO_ONE); }
++#line 242 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); }
YY_BREAK
case 67:
YY_RULE_SETUP
- #line 282 "program_lexer.l"
-#line 219 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, SUB, OFF); }
++#line 243 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); }
YY_BREAK
case 68:
YY_RULE_SETUP
- #line 283 "program_lexer.l"
-#line 220 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, SUB, ZERO_ONE); }
++#line 244 "program_lexer.l"
+{ return PROGRAM; }
YY_BREAK
case 69:
YY_RULE_SETUP
- #line 284 "program_lexer.l"
-#line 221 "program_lexer.l"
-{ return_opcode( 1, SWZ, SWZ, OFF); }
++#line 245 "program_lexer.l"
+{ return STATE; }
YY_BREAK
case 70:
YY_RULE_SETUP
- #line 285 "program_lexer.l"
-#line 222 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SWZ, SWZ, ZERO_ONE); }
++#line 246 "program_lexer.l"
+{ return RESULT; }
YY_BREAK
case 71:
YY_RULE_SETUP
- #line 287 "program_lexer.l"
-#line 224 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, OFF); }
++#line 248 "program_lexer.l"
+{ return AMBIENT; }
YY_BREAK
case 72:
YY_RULE_SETUP
- #line 288 "program_lexer.l"
-#line 225 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, ZERO_ONE); }
++#line 249 "program_lexer.l"
+{ return ATTENUATION; }
YY_BREAK
case 73:
YY_RULE_SETUP
- #line 289 "program_lexer.l"
-#line 226 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, OFF); }
++#line 250 "program_lexer.l"
+{ return BACK; }
YY_BREAK
case 74:
YY_RULE_SETUP
- #line 290 "program_lexer.l"
-#line 227 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, ZERO_ONE); }
++#line 251 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, CLIP); }
YY_BREAK
case 75:
YY_RULE_SETUP
- #line 291 "program_lexer.l"
-#line 228 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, OFF); }
++#line 252 "program_lexer.l"
+{ return COLOR; }
YY_BREAK
case 76:
YY_RULE_SETUP
- #line 292 "program_lexer.l"
-#line 229 "program_lexer.l"
-{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, ZERO_ONE); }
++#line 253 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_fp, DEPTH); }
YY_BREAK
case 77:
YY_RULE_SETUP
- #line 293 "program_lexer.l"
-#line 231 "program_lexer.l"
-{ return_opcode( 1, BIN_OP, XPD, OFF); }
++#line 254 "program_lexer.l"
+{ return DIFFUSE; }
YY_BREAK
case 78:
YY_RULE_SETUP
- #line 294 "program_lexer.l"
-#line 232 "program_lexer.l"
-{ return_opcode(require_ARB_fp, BIN_OP, XPD, ZERO_ONE); }
++#line 255 "program_lexer.l"
+{ return DIRECTION; }
YY_BREAK
case 79:
YY_RULE_SETUP
- #line 295 "program_lexer.l"
-#line 234 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); }
++#line 256 "program_lexer.l"
+{ return EMISSION; }
YY_BREAK
case 80:
YY_RULE_SETUP
- #line 296 "program_lexer.l"
-#line 235 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); }
++#line 257 "program_lexer.l"
+{ return ENV; }
YY_BREAK
case 81:
YY_RULE_SETUP
- #line 297 "program_lexer.l"
-#line 236 "program_lexer.l"
-{ return PROGRAM; }
++#line 258 "program_lexer.l"
+{ return EYE; }
YY_BREAK
case 82:
YY_RULE_SETUP
- #line 298 "program_lexer.l"
-#line 237 "program_lexer.l"
-{ return STATE; }
++#line 259 "program_lexer.l"
+{ return FOGCOORD; }
YY_BREAK
case 83:
YY_RULE_SETUP
- #line 299 "program_lexer.l"
-#line 238 "program_lexer.l"
-{ return RESULT; }
++#line 260 "program_lexer.l"
+{ return FOG; }
YY_BREAK
case 84:
YY_RULE_SETUP
- #line 300 "program_lexer.l"
-#line 240 "program_lexer.l"
-{ return AMBIENT; }
++#line 261 "program_lexer.l"
+{ return FRONT; }
YY_BREAK
case 85:
YY_RULE_SETUP
- #line 301 "program_lexer.l"
-#line 241 "program_lexer.l"
-{ return ATTENUATION; }
++#line 262 "program_lexer.l"
+{ return HALF; }
YY_BREAK
case 86:
YY_RULE_SETUP
- #line 302 "program_lexer.l"
-#line 242 "program_lexer.l"
-{ return BACK; }
++#line 263 "program_lexer.l"
+{ return INVERSE; }
YY_BREAK
case 87:
YY_RULE_SETUP
- #line 303 "program_lexer.l"
-#line 243 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, CLIP); }
++#line 264 "program_lexer.l"
+{ return INVTRANS; }
YY_BREAK
case 88:
YY_RULE_SETUP
- #line 304 "program_lexer.l"
-#line 244 "program_lexer.l"
-{ return COLOR; }
++#line 265 "program_lexer.l"
+{ return LIGHT; }
YY_BREAK
case 89:
YY_RULE_SETUP
- #line 305 "program_lexer.l"
-#line 245 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_fp, DEPTH); }
++#line 266 "program_lexer.l"
+{ return LIGHTMODEL; }
YY_BREAK
case 90:
YY_RULE_SETUP
- #line 306 "program_lexer.l"
-#line 246 "program_lexer.l"
-{ return DIFFUSE; }
++#line 267 "program_lexer.l"
+{ return LIGHTPROD; }
YY_BREAK
case 91:
YY_RULE_SETUP
- #line 307 "program_lexer.l"
-#line 247 "program_lexer.l"
-{ return DIRECTION; }
++#line 268 "program_lexer.l"
+{ return LOCAL; }
YY_BREAK
case 92:
YY_RULE_SETUP
- #line 308 "program_lexer.l"
-#line 248 "program_lexer.l"
-{ return EMISSION; }
++#line 269 "program_lexer.l"
+{ return MATERIAL; }
YY_BREAK
case 93:
YY_RULE_SETUP
- #line 309 "program_lexer.l"
-#line 249 "program_lexer.l"
-{ return ENV; }
++#line 270 "program_lexer.l"
+{ return MAT_PROGRAM; }
YY_BREAK
case 94:
YY_RULE_SETUP
- #line 310 "program_lexer.l"
-#line 250 "program_lexer.l"
-{ return EYE; }
++#line 271 "program_lexer.l"
+{ return MATRIX; }
YY_BREAK
case 95:
YY_RULE_SETUP
- #line 311 "program_lexer.l"
-#line 251 "program_lexer.l"
-{ return FOGCOORD; }
++#line 272 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); }
YY_BREAK
case 96:
YY_RULE_SETUP
- #line 312 "program_lexer.l"
-#line 252 "program_lexer.l"
-{ return FOG; }
++#line 273 "program_lexer.l"
+{ return MODELVIEW; }
YY_BREAK
case 97:
YY_RULE_SETUP
- #line 313 "program_lexer.l"
-#line 253 "program_lexer.l"
-{ return FRONT; }
++#line 274 "program_lexer.l"
+{ return MVP; }
YY_BREAK
case 98:
YY_RULE_SETUP
- #line 314 "program_lexer.l"
-#line 254 "program_lexer.l"
-{ return HALF; }
++#line 275 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, NORMAL); }
YY_BREAK
case 99:
YY_RULE_SETUP
- #line 315 "program_lexer.l"
-#line 255 "program_lexer.l"
-{ return INVERSE; }
++#line 276 "program_lexer.l"
+{ return OBJECT; }
YY_BREAK
case 100:
YY_RULE_SETUP
- #line 316 "program_lexer.l"
-#line 256 "program_lexer.l"
-{ return INVTRANS; }
++#line 277 "program_lexer.l"
+{ return PALETTE; }
YY_BREAK
case 101:
YY_RULE_SETUP
- #line 317 "program_lexer.l"
-#line 257 "program_lexer.l"
-{ return LIGHT; }
++#line 278 "program_lexer.l"
+{ return PARAMS; }
YY_BREAK
case 102:
YY_RULE_SETUP
- #line 318 "program_lexer.l"
-#line 258 "program_lexer.l"
-{ return LIGHTMODEL; }
++#line 279 "program_lexer.l"
+{ return PLANE; }
YY_BREAK
case 103:
YY_RULE_SETUP
- #line 319 "program_lexer.l"
-#line 259 "program_lexer.l"
-{ return LIGHTPROD; }
++#line 280 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, POINT_TOK); }
YY_BREAK
case 104:
YY_RULE_SETUP
- #line 320 "program_lexer.l"
-#line 260 "program_lexer.l"
-{ return LOCAL; }
++#line 281 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, POINTSIZE); }
YY_BREAK
case 105:
YY_RULE_SETUP
- #line 321 "program_lexer.l"
-#line 261 "program_lexer.l"
-{ return MATERIAL; }
++#line 282 "program_lexer.l"
+{ return POSITION; }
YY_BREAK
case 106:
YY_RULE_SETUP
- #line 322 "program_lexer.l"
-#line 262 "program_lexer.l"
-{ return MAT_PROGRAM; }
++#line 283 "program_lexer.l"
+{ return PRIMARY; }
YY_BREAK
case 107:
YY_RULE_SETUP
- #line 323 "program_lexer.l"
-#line 263 "program_lexer.l"
-{ return MATRIX; }
++#line 284 "program_lexer.l"
+{ return PROJECTION; }
YY_BREAK
case 108:
YY_RULE_SETUP
- #line 324 "program_lexer.l"
-#line 264 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); }
++#line 285 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_fp, RANGE); }
YY_BREAK
case 109:
YY_RULE_SETUP
- #line 325 "program_lexer.l"
-#line 265 "program_lexer.l"
-{ return MODELVIEW; }
++#line 286 "program_lexer.l"
+{ return ROW; }
YY_BREAK
case 110:
YY_RULE_SETUP
- #line 326 "program_lexer.l"
-#line 266 "program_lexer.l"
-{ return MVP; }
++#line 287 "program_lexer.l"
+{ return SCENECOLOR; }
YY_BREAK
case 111:
YY_RULE_SETUP
- #line 327 "program_lexer.l"
-#line 267 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, NORMAL); }
++#line 288 "program_lexer.l"
+{ return SECONDARY; }
YY_BREAK
case 112:
YY_RULE_SETUP
- #line 328 "program_lexer.l"
-#line 268 "program_lexer.l"
-{ return OBJECT; }
++#line 289 "program_lexer.l"
+{ return SHININESS; }
YY_BREAK
case 113:
YY_RULE_SETUP
- #line 329 "program_lexer.l"
-#line 269 "program_lexer.l"
-{ return PALETTE; }
++#line 290 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); }
YY_BREAK
case 114:
YY_RULE_SETUP
- #line 330 "program_lexer.l"
-#line 270 "program_lexer.l"
-{ return PARAMS; }
++#line 291 "program_lexer.l"
+{ return SPECULAR; }
YY_BREAK
case 115:
YY_RULE_SETUP
- #line 331 "program_lexer.l"
-#line 271 "program_lexer.l"
-{ return PLANE; }
++#line 292 "program_lexer.l"
+{ return SPOT; }
YY_BREAK
case 116:
YY_RULE_SETUP
- #line 332 "program_lexer.l"
-#line 272 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, POINT_TOK); }
++#line 293 "program_lexer.l"
+{ return TEXCOORD; }
YY_BREAK
case 117:
YY_RULE_SETUP
- #line 333 "program_lexer.l"
-#line 273 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, POINTSIZE); }
++#line 294 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_fp, TEXENV); }
YY_BREAK
case 118:
YY_RULE_SETUP
- #line 334 "program_lexer.l"
-#line 274 "program_lexer.l"
-{ return POSITION; }
++#line 295 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, TEXGEN); }
YY_BREAK
case 119:
YY_RULE_SETUP
- #line 335 "program_lexer.l"
-#line 275 "program_lexer.l"
-{ return PRIMARY; }
++#line 296 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); }
YY_BREAK
case 120:
YY_RULE_SETUP
- #line 336 "program_lexer.l"
-#line 276 "program_lexer.l"
-{ return PROJECTION; }
++#line 297 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); }
YY_BREAK
case 121:
YY_RULE_SETUP
- #line 337 "program_lexer.l"
-#line 277 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_fp, RANGE); }
++#line 298 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); }
YY_BREAK
case 122:
YY_RULE_SETUP
- #line 338 "program_lexer.l"
-#line 278 "program_lexer.l"
-{ return ROW; }
++#line 299 "program_lexer.l"
+{ return TEXTURE; }
YY_BREAK
case 123:
YY_RULE_SETUP
- #line 339 "program_lexer.l"
-#line 279 "program_lexer.l"
-{ return SCENECOLOR; }
++#line 300 "program_lexer.l"
+{ return TRANSPOSE; }
YY_BREAK
case 124:
YY_RULE_SETUP
- #line 340 "program_lexer.l"
-#line 280 "program_lexer.l"
-{ return SECONDARY; }
++#line 301 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); }
YY_BREAK
case 125:
YY_RULE_SETUP
- #line 341 "program_lexer.l"
-#line 281 "program_lexer.l"
-{ return SHININESS; }
++#line 302 "program_lexer.l"
+{ return_token_or_DOT(require_ARB_vp, WEIGHT); }
YY_BREAK
case 126:
YY_RULE_SETUP
- #line 343 "program_lexer.l"
-#line 282 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); }
++#line 304 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); }
YY_BREAK
case 127:
YY_RULE_SETUP
- #line 344 "program_lexer.l"
-#line 283 "program_lexer.l"
-{ return SPECULAR; }
++#line 305 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); }
YY_BREAK
case 128:
YY_RULE_SETUP
- #line 345 "program_lexer.l"
-#line 284 "program_lexer.l"
-{ return SPOT; }
++#line 306 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); }
YY_BREAK
case 129:
YY_RULE_SETUP
- #line 346 "program_lexer.l"
-#line 285 "program_lexer.l"
-{ return TEXCOORD; }
++#line 307 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); }
YY_BREAK
case 130:
YY_RULE_SETUP
- #line 347 "program_lexer.l"
-#line 286 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_fp, TEXENV); }
++#line 308 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); }
YY_BREAK
case 131:
YY_RULE_SETUP
- #line 348 "program_lexer.l"
-#line 287 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, TEXGEN); }
++#line 309 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); }
YY_BREAK
case 132:
YY_RULE_SETUP
- #line 349 "program_lexer.l"
-#line 288 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); }
++#line 310 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); }
YY_BREAK
case 133:
YY_RULE_SETUP
- #line 350 "program_lexer.l"
-#line 289 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); }
++#line 311 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); }
YY_BREAK
case 134:
YY_RULE_SETUP
- #line 351 "program_lexer.l"
-#line 290 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); }
++#line 312 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); }
YY_BREAK
case 135:
YY_RULE_SETUP
- #line 352 "program_lexer.l"
-#line 291 "program_lexer.l"
-{ return TEXTURE; }
++#line 313 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); }
YY_BREAK
case 136:
YY_RULE_SETUP
- #line 353 "program_lexer.l"
-#line 292 "program_lexer.l"
-{ return TRANSPOSE; }
++#line 314 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); }
YY_BREAK
case 137:
YY_RULE_SETUP
- #line 354 "program_lexer.l"
-#line 293 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); }
++#line 315 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); }
YY_BREAK
case 138:
YY_RULE_SETUP
- #line 355 "program_lexer.l"
-#line 294 "program_lexer.l"
-{ return_token_or_DOT(require_ARB_vp, WEIGHT); }
++#line 316 "program_lexer.l"
+{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); }
YY_BREAK
case 139:
YY_RULE_SETUP
- #line 357 "program_lexer.l"
-#line 296 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); }
++#line 318 "program_lexer.l"
+{ return handle_ident(yyextra, yytext, yylval); }
YY_BREAK
case 140:
YY_RULE_SETUP
- #line 359 "program_lexer.l"
-#line 297 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); }
- YY_BREAK
-case 141:
-YY_RULE_SETUP
-#line 298 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); }
- YY_BREAK
-case 142:
-YY_RULE_SETUP
-#line 299 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); }
- YY_BREAK
-case 143:
-YY_RULE_SETUP
-#line 300 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); }
- YY_BREAK
-case 144:
-YY_RULE_SETUP
-#line 301 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); }
- YY_BREAK
-case 145:
-YY_RULE_SETUP
-#line 302 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); }
- YY_BREAK
-case 146:
-YY_RULE_SETUP
-#line 303 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); }
- YY_BREAK
-case 147:
-YY_RULE_SETUP
-#line 304 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); }
- YY_BREAK
-case 148:
-YY_RULE_SETUP
-#line 305 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); }
- YY_BREAK
-case 149:
-YY_RULE_SETUP
-#line 306 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); }
- YY_BREAK
-case 150:
-YY_RULE_SETUP
-#line 307 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); }
- YY_BREAK
-case 151:
-YY_RULE_SETUP
-#line 308 "program_lexer.l"
-{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); }
- YY_BREAK
-case 152:
-YY_RULE_SETUP
-#line 310 "program_lexer.l"
-{
- yylval->string = strdup(yytext);
- return IDENTIFIER;
-}
- YY_BREAK
-case 153:
-YY_RULE_SETUP
-#line 315 "program_lexer.l"
++#line 320 "program_lexer.l"
{ return DOT_DOT; }
YY_BREAK
-case 154:
+case 141:
YY_RULE_SETUP
- #line 361 "program_lexer.l"
-#line 317 "program_lexer.l"
++#line 322 "program_lexer.l"
{
yylval->integer = strtol(yytext, NULL, 10);
return INTEGER;
}
YY_BREAK
-case 155:
+case 142:
YY_RULE_SETUP
- #line 365 "program_lexer.l"
-#line 321 "program_lexer.l"
++#line 326 "program_lexer.l"
{
yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
- #line 369 "program_lexer.l"
-#line 325 "program_lexer.l"
++#line 330 "program_lexer.l"
{
yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
YY_BREAK
-case 157:
+case 144:
YY_RULE_SETUP
- #line 373 "program_lexer.l"
-#line 329 "program_lexer.l"
++#line 334 "program_lexer.l"
{
yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
YY_BREAK
-case 158:
+case 145:
YY_RULE_SETUP
- #line 377 "program_lexer.l"
-#line 333 "program_lexer.l"
++#line 338 "program_lexer.l"
{
yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
}
YY_BREAK
-case 159:
+case 146:
YY_RULE_SETUP
- #line 382 "program_lexer.l"
-#line 338 "program_lexer.l"
++#line 343 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
yylval->swiz_mask.mask = WRITEMASK_XYZW;
return MASK4;
}
YY_BREAK
-case 160:
+case 147:
YY_RULE_SETUP
- #line 388 "program_lexer.l"
-#line 344 "program_lexer.l"
++#line 349 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XY
return MASK3;
}
YY_BREAK
-case 161:
+case 148:
YY_RULE_SETUP
- #line 394 "program_lexer.l"
-#line 350 "program_lexer.l"
++#line 355 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XZW;
return MASK3;
}
YY_BREAK
-case 162:
+case 149:
YY_RULE_SETUP
- #line 399 "program_lexer.l"
-#line 355 "program_lexer.l"
++#line 360 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_YZW;
return MASK3;
}
YY_BREAK
-case 163:
+case 150:
YY_RULE_SETUP
- #line 405 "program_lexer.l"
-#line 361 "program_lexer.l"
++#line 366 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_X
return MASK2;
}
YY_BREAK
-case 164:
+case 151:
YY_RULE_SETUP
- #line 411 "program_lexer.l"
-#line 367 "program_lexer.l"
++#line 372 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_Y
return MASK2;
}
YY_BREAK
-case 165:
+case 152:
YY_RULE_SETUP
- #line 417 "program_lexer.l"
-#line 373 "program_lexer.l"
++#line 378 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_ZW;
return MASK2;
}
YY_BREAK
-case 166:
+case 153:
YY_RULE_SETUP
- #line 423 "program_lexer.l"
-#line 379 "program_lexer.l"
++#line 384 "program_lexer.l"
{
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
return MASK1;
}
YY_BREAK
-case 167:
+case 154:
YY_RULE_SETUP
- #line 430 "program_lexer.l"
-#line 386 "program_lexer.l"
++#line 391 "program_lexer.l"
{
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
swiz_from_char(yytext[2]),
return SWIZZLE;
}
YY_BREAK
-case 168:
+case 155:
YY_RULE_SETUP
- #line 439 "program_lexer.l"
-#line 395 "program_lexer.l"
++#line 400 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
yylval->swiz_mask.mask = WRITEMASK_XYZW;
return_token_or_DOT(require_ARB_fp, MASK4);
}
YY_BREAK
-case 169:
+case 156:
YY_RULE_SETUP
- #line 445 "program_lexer.l"
-#line 401 "program_lexer.l"
++#line 406 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XY
return_token_or_DOT(require_ARB_fp, MASK3);
}
YY_BREAK
-case 170:
+case 157:
YY_RULE_SETUP
- #line 451 "program_lexer.l"
-#line 407 "program_lexer.l"
++#line 412 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XZW;
return_token_or_DOT(require_ARB_fp, MASK3);
}
YY_BREAK
-case 171:
+case 158:
YY_RULE_SETUP
- #line 456 "program_lexer.l"
-#line 412 "program_lexer.l"
++#line 417 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_YZW;
return_token_or_DOT(require_ARB_fp, MASK3);
}
YY_BREAK
-case 172:
+case 159:
YY_RULE_SETUP
- #line 462 "program_lexer.l"
-#line 418 "program_lexer.l"
++#line 423 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_X
return_token_or_DOT(require_ARB_fp, MASK2);
}
YY_BREAK
-case 173:
+case 160:
YY_RULE_SETUP
- #line 468 "program_lexer.l"
-#line 424 "program_lexer.l"
++#line 429 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_Y
return_token_or_DOT(require_ARB_fp, MASK2);
}
YY_BREAK
-case 174:
+case 161:
YY_RULE_SETUP
- #line 474 "program_lexer.l"
-#line 430 "program_lexer.l"
++#line 435 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_ZW;
return_token_or_DOT(require_ARB_fp, MASK2);
}
YY_BREAK
-case 175:
+case 162:
YY_RULE_SETUP
- #line 480 "program_lexer.l"
-#line 436 "program_lexer.l"
++#line 441 "program_lexer.l"
{
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
return_token_or_DOT(require_ARB_fp, MASK1);
}
YY_BREAK
-case 176:
+case 163:
YY_RULE_SETUP
- #line 488 "program_lexer.l"
-#line 444 "program_lexer.l"
++#line 449 "program_lexer.l"
{
if (require_ARB_vp) {
return TEXGEN_R;
}
}
YY_BREAK
-case 177:
+case 164:
YY_RULE_SETUP
- #line 499 "program_lexer.l"
-#line 455 "program_lexer.l"
++#line 460 "program_lexer.l"
{
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
swiz_from_char(yytext[2]),
return_token_or_DOT(require_ARB_fp, SWIZZLE);
}
YY_BREAK
-case 178:
+case 165:
YY_RULE_SETUP
- #line 508 "program_lexer.l"
-#line 464 "program_lexer.l"
++#line 469 "program_lexer.l"
{ return DOT; }
YY_BREAK
-case 179:
-/* rule 179 can match eol */
+case 166:
+/* rule 166 can match eol */
YY_RULE_SETUP
- #line 510 "program_lexer.l"
-#line 466 "program_lexer.l"
++#line 471 "program_lexer.l"
{
yylloc->first_line++;
yylloc->first_column = 1;
yylloc->position++;
}
YY_BREAK
-case 180:
+case 167:
YY_RULE_SETUP
- #line 517 "program_lexer.l"
-#line 473 "program_lexer.l"
++#line 478 "program_lexer.l"
/* eat whitespace */ ;
YY_BREAK
-case 181:
+case 168:
*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
- #line 518 "program_lexer.l"
-#line 474 "program_lexer.l"
++#line 479 "program_lexer.l"
/* eat comments */ ;
YY_BREAK
-case 182:
+case 169:
YY_RULE_SETUP
- #line 519 "program_lexer.l"
-#line 475 "program_lexer.l"
++#line 480 "program_lexer.l"
{ return yytext[0]; }
YY_BREAK
-case 183:
+case 170:
YY_RULE_SETUP
- #line 520 "program_lexer.l"
-#line 476 "program_lexer.l"
++#line 481 "program_lexer.l"
ECHO;
YY_BREAK
- #line 2517 "lex.yy.c"
-#line 2384 "lex.yy.c"
++#line 2478 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
#define YYTABLES_NAME "yytables"
- #line 520 "program_lexer.l"
-#line 476 "program_lexer.l"
++#line 481 "program_lexer.l"
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 274, 274, 277, 285, 297, 298, 301, 323, 324,
- 327, 342, 345, 350, 357, 358, 359, 360, 361, 362,
- 363, 366, 367, 368, 371, 377, 383, 389, 396, 402,
- 409, 453, 458, 468, 512, 518, 519, 520, 521, 522,
- 523, 524, 525, 526, 527, 528, 529, 532, 544, 552,
- 569, 576, 593, 604, 624, 649, 656, 689, 696, 711,
- 761, 800, 809, 830, 839, 843, 870, 887, 887, 889,
- 896, 908, 909, 910, 913, 927, 941, 959, 970, 982,
- 984, 985, 986, 987, 990, 990, 990, 990, 991, 994,
- 998, 1003, 1010, 1017, 1024, 1047, 1070, 1071, 1072, 1073,
- 1074, 1075, 1078, 1096, 1100, 1106, 1110, 1114, 1118, 1127,
- 1136, 1140, 1145, 1151, 1162, 1162, 1163, 1165, 1169, 1173,
- 1177, 1183, 1183, 1185, 1201, 1224, 1227, 1238, 1244, 1250,
- 1251, 1258, 1264, 1270, 1278, 1284, 1290, 1298, 1304, 1310,
- 1318, 1319, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329,
- 1330, 1331, 1332, 1335, 1344, 1348, 1352, 1358, 1367, 1371,
- 1375, 1384, 1388, 1394, 1400, 1407, 1412, 1420, 1430, 1432,
- 1440, 1446, 1450, 1454, 1460, 1471, 1480, 1484, 1489, 1493,
- 1497, 1501, 1507, 1514, 1518, 1524, 1532, 1543, 1550, 1554,
- 1560, 1570, 1581, 1585, 1603, 1612, 1615, 1621, 1625, 1629,
- 1635, 1646, 1651, 1656, 1661, 1666, 1671, 1679, 1682, 1687,
- 1700, 1708, 1719, 1727, 1727, 1729, 1729, 1731, 1741, 1746,
- 1753, 1763, 1772, 1777, 1784, 1794, 1804, 1816, 1816, 1817,
- 1817, 1819, 1829, 1837, 1847, 1855, 1863, 1872, 1883, 1887,
- 1893, 1894, 1895, 1898, 1898, 1901, 1936, 1940, 1940, 1943,
- 1949, 1957, 1970, 1979, 1988, 1992, 2001, 2010, 2021, 2028,
- 2033, 2042, 2054, 2057, 2066, 2077, 2078, 2079, 2082, 2083,
- 2084, 2087, 2088, 2091, 2092, 2095, 2096, 2099, 2110, 2121,
- 2132, 2154, 2155
- 0, 256, 256, 259, 267, 279, 280, 283, 307, 308,
- 311, 326, 329, 334, 341, 342, 343, 344, 345, 346,
- 347, 350, 351, 354, 360, 367, 374, 382, 389, 397,
- 442, 449, 455, 456, 457, 458, 459, 460, 461, 462,
- 463, 464, 465, 466, 469, 482, 495, 508, 530, 539,
- 572, 579, 594, 649, 693, 704, 725, 735, 741, 774,
- 793, 793, 795, 802, 814, 815, 816, 819, 831, 843,
- 863, 874, 886, 888, 889, 890, 891, 894, 894, 894,
- 894, 895, 898, 899, 900, 901, 902, 903, 906, 925,
- 929, 935, 939, 943, 947, 956, 965, 969, 974, 980,
- 991, 991, 992, 994, 998, 1002, 1006, 1012, 1012, 1014,
- 1031, 1056, 1059, 1070, 1076, 1082, 1083, 1090, 1096, 1102,
- 1110, 1116, 1122, 1130, 1136, 1142, 1150, 1151, 1154, 1155,
- 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1167,
- 1176, 1180, 1184, 1190, 1199, 1203, 1207, 1216, 1220, 1226,
- 1232, 1239, 1244, 1252, 1262, 1264, 1272, 1278, 1282, 1286,
- 1292, 1303, 1312, 1316, 1321, 1325, 1329, 1333, 1339, 1346,
- 1350, 1356, 1364, 1375, 1382, 1386, 1392, 1402, 1413, 1417,
- 1435, 1444, 1447, 1453, 1457, 1461, 1467, 1478, 1483, 1488,
- 1493, 1498, 1503, 1511, 1514, 1519, 1532, 1540, 1551, 1559,
- 1559, 1561, 1561, 1563, 1573, 1578, 1585, 1595, 1604, 1609,
- 1616, 1626, 1636, 1648, 1648, 1649, 1649, 1651, 1661, 1669,
- 1679, 1687, 1695, 1704, 1715, 1719, 1725, 1726, 1727, 1730,
- 1730, 1733, 1733, 1736, 1743, 1752, 1766, 1775, 1784, 1788,
- 1797, 1806, 1817, 1824, 1829, 1838, 1850, 1853, 1862, 1873,
- 1874, 1875, 1878, 1879, 1880, 1883, 1884, 1887, 1888, 1891,
- 1892, 1895, 1906, 1917, 1928
++ 0, 274, 274, 277, 285, 297, 298, 301, 325, 326,
++ 329, 344, 347, 352, 359, 360, 361, 362, 363, 364,
++ 365, 368, 369, 370, 373, 379, 385, 391, 398, 404,
++ 411, 455, 460, 470, 514, 520, 521, 522, 523, 524,
++ 525, 526, 527, 528, 529, 530, 531, 534, 546, 554,
++ 571, 578, 595, 606, 626, 651, 658, 691, 698, 713,
++ 768, 809, 818, 839, 848, 852, 881, 900, 900, 902,
++ 909, 921, 922, 923, 926, 940, 954, 974, 985, 997,
++ 999, 1000, 1001, 1002, 1005, 1005, 1005, 1005, 1006, 1009,
++ 1013, 1018, 1025, 1032, 1039, 1062, 1085, 1086, 1087, 1088,
++ 1089, 1090, 1093, 1112, 1116, 1122, 1126, 1130, 1134, 1143,
++ 1152, 1156, 1161, 1167, 1178, 1178, 1179, 1181, 1185, 1189,
++ 1193, 1199, 1199, 1201, 1218, 1243, 1246, 1257, 1263, 1269,
++ 1270, 1277, 1283, 1289, 1297, 1303, 1309, 1317, 1323, 1329,
++ 1337, 1338, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348,
++ 1349, 1350, 1351, 1354, 1363, 1367, 1371, 1377, 1386, 1390,
++ 1394, 1403, 1407, 1413, 1419, 1426, 1431, 1439, 1449, 1451,
++ 1459, 1465, 1469, 1473, 1479, 1490, 1499, 1503, 1508, 1512,
++ 1516, 1520, 1526, 1533, 1537, 1543, 1551, 1562, 1569, 1573,
++ 1579, 1589, 1600, 1604, 1622, 1631, 1634, 1640, 1644, 1648,
++ 1654, 1665, 1670, 1675, 1680, 1685, 1690, 1698, 1701, 1706,
++ 1719, 1727, 1738, 1746, 1746, 1748, 1748, 1750, 1760, 1765,
++ 1772, 1782, 1791, 1796, 1803, 1813, 1823, 1835, 1835, 1836,
++ 1836, 1838, 1848, 1856, 1866, 1874, 1882, 1891, 1902, 1906,
++ 1912, 1913, 1914, 1917, 1917, 1920, 1955, 1959, 1959, 1962,
++ 1969, 1978, 1992, 2001, 2010, 2014, 2023, 2032, 2043, 2050,
++ 2055, 2064, 2076, 2079, 2088, 2099, 2100, 2101, 2104, 2105,
++ 2106, 2109, 2110, 2113, 2114, 2117, 2118, 2121, 2132, 2143,
++ 2154, 2180, 2181
};
#endif
case 10:
/* Line 1455 of yacc.c */
- #line 328 "program_parse.y"
-#line 312 "program_parse.y"
++#line 330 "program_parse.y"
{
if ((yyvsp[(1) - (2)].inst) != NULL) {
if (state->inst_tail == NULL) {
case 12:
/* Line 1455 of yacc.c */
- #line 346 "program_parse.y"
-#line 330 "program_parse.y"
++#line 348 "program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumAluInstructions++;
case 13:
/* Line 1455 of yacc.c */
- #line 351 "program_parse.y"
-#line 335 "program_parse.y"
++#line 353 "program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumTexInstructions++;
;}
break;
- case 23:
+ case 24:
/* Line 1455 of yacc.c */
- #line 372 "program_parse.y"
-#line 355 "program_parse.y"
++#line 374 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
- case 24:
+ case 25:
/* Line 1455 of yacc.c */
- #line 378 "program_parse.y"
-#line 361 "program_parse.y"
++#line 380 "program_parse.y"
{
- (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (4)].temp_inst).Opcode, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
- (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (4)].temp_inst).SaturateMode;
+ (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
- case 25:
+ case 26:
/* Line 1455 of yacc.c */
- #line 384 "program_parse.y"
-#line 368 "program_parse.y"
++#line 386 "program_parse.y"
{
- (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (4)].temp_inst).Opcode, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
- (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (4)].temp_inst).SaturateMode;
+ (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
- case 26:
+ case 27:
/* Line 1455 of yacc.c */
- #line 390 "program_parse.y"
-#line 375 "program_parse.y"
++#line 392 "program_parse.y"
{
- (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (6)].temp_inst).Opcode, & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL);
- (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (6)].temp_inst).SaturateMode;
+ (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL);
;}
break;
- case 27:
+ case 28:
/* Line 1455 of yacc.c */
- #line 397 "program_parse.y"
-#line 383 "program_parse.y"
++#line 399 "program_parse.y"
{
- (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (6)].temp_inst).Opcode, & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL);
- (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (6)].temp_inst).SaturateMode;
+ (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL);
;}
break;
- case 28:
+ case 29:
/* Line 1455 of yacc.c */
- #line 404 "program_parse.y"
-#line 391 "program_parse.y"
++#line 406 "program_parse.y"
{
- (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (8)].temp_inst).Opcode, & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg));
- (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (8)].temp_inst).SaturateMode;
+ (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg));
;}
break;
- case 29:
+ case 30:
/* Line 1455 of yacc.c */
- #line 410 "program_parse.y"
-#line 398 "program_parse.y"
++#line 412 "program_parse.y"
{
- (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (8)].temp_inst).Opcode, & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL);
+ (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL);
if ((yyval.inst) != NULL) {
const GLbitfield tex_mask = (1U << (yyvsp[(6) - (8)].integer));
GLbitfield shadow_tex = 0;
;}
break;
- case 30:
+ case 31:
/* Line 1455 of yacc.c */
- #line 454 "program_parse.y"
-#line 443 "program_parse.y"
++#line 456 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL);
state->fragment.UsesKill = 1;
;}
break;
- case 31:
+ case 32:
+
+/* Line 1455 of yacc.c */
- #line 459 "program_parse.y"
++#line 461 "program_parse.y"
+ {
+ (yyval.inst) = asm_instruction_ctor(OPCODE_KIL_NV, NULL, NULL, NULL, NULL);
+ (yyval.inst)->Base.DstReg.CondMask = (yyvsp[(2) - (2)].dst_reg).CondMask;
+ (yyval.inst)->Base.DstReg.CondSwizzle = (yyvsp[(2) - (2)].dst_reg).CondSwizzle;
+ (yyval.inst)->Base.DstReg.CondSrc = (yyvsp[(2) - (2)].dst_reg).CondSrc;
+ state->fragment.UsesKill = 1;
+ ;}
+ break;
+
+ case 33:
+
+/* Line 1455 of yacc.c */
- #line 469 "program_parse.y"
++#line 471 "program_parse.y"
+ {
+ (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg));
+ if ((yyval.inst) != NULL) {
+ const GLbitfield tex_mask = (1U << (yyvsp[(10) - (12)].integer));
+ GLbitfield shadow_tex = 0;
+ GLbitfield target_mask = 0;
+
+
+ (yyval.inst)->Base.TexSrcUnit = (yyvsp[(10) - (12)].integer);
+
+ if ((yyvsp[(12) - (12)].integer) < 0) {
+ shadow_tex = tex_mask;
+
+ (yyval.inst)->Base.TexSrcTarget = -(yyvsp[(12) - (12)].integer);
+ (yyval.inst)->Base.TexShadow = 1;
+ } else {
+ (yyval.inst)->Base.TexSrcTarget = (yyvsp[(12) - (12)].integer);
+ }
+
+ target_mask = (1U << (yyval.inst)->Base.TexSrcTarget);
+
+ /* If this texture unit was previously accessed and that access
+ * had a different texture target, generate an error.
+ *
+ * If this texture unit was previously accessed and that access
+ * had a different shadow mode, generate an error.
+ */
+ if ((state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] != 0)
+ && ((state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] != target_mask)
+ || ((state->prog->ShadowSamplers & tex_mask)
+ != shadow_tex))) {
+ yyerror(& (yylsp[(12) - (12)]), state,
+ "multiple targets used on one texture image unit");
+ YYERROR;
+ }
+
+
+ state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] |= target_mask;
+ state->prog->ShadowSamplers |= shadow_tex;
+ }
+ ;}
+ break;
+
+ case 34:
/* Line 1455 of yacc.c */
- #line 513 "program_parse.y"
-#line 450 "program_parse.y"
++#line 515 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
break;
- case 32:
+ case 35:
/* Line 1455 of yacc.c */
- #line 518 "program_parse.y"
-#line 455 "program_parse.y"
++#line 520 "program_parse.y"
{ (yyval.integer) = TEXTURE_1D_INDEX; ;}
break;
- case 33:
+ case 36:
/* Line 1455 of yacc.c */
- #line 519 "program_parse.y"
-#line 456 "program_parse.y"
++#line 521 "program_parse.y"
{ (yyval.integer) = TEXTURE_2D_INDEX; ;}
break;
- case 34:
+ case 37:
/* Line 1455 of yacc.c */
- #line 520 "program_parse.y"
-#line 457 "program_parse.y"
++#line 522 "program_parse.y"
{ (yyval.integer) = TEXTURE_3D_INDEX; ;}
break;
- case 35:
+ case 38:
/* Line 1455 of yacc.c */
- #line 521 "program_parse.y"
-#line 458 "program_parse.y"
++#line 523 "program_parse.y"
{ (yyval.integer) = TEXTURE_CUBE_INDEX; ;}
break;
- case 36:
+ case 39:
/* Line 1455 of yacc.c */
- #line 522 "program_parse.y"
-#line 459 "program_parse.y"
++#line 524 "program_parse.y"
{ (yyval.integer) = TEXTURE_RECT_INDEX; ;}
break;
- case 37:
+ case 40:
/* Line 1455 of yacc.c */
- #line 523 "program_parse.y"
-#line 460 "program_parse.y"
++#line 525 "program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_INDEX; ;}
break;
- case 38:
+ case 41:
/* Line 1455 of yacc.c */
- #line 524 "program_parse.y"
-#line 461 "program_parse.y"
++#line 526 "program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_INDEX; ;}
break;
- case 39:
+ case 42:
/* Line 1455 of yacc.c */
- #line 525 "program_parse.y"
-#line 462 "program_parse.y"
++#line 527 "program_parse.y"
{ (yyval.integer) = -TEXTURE_RECT_INDEX; ;}
break;
- case 40:
+ case 43:
/* Line 1455 of yacc.c */
- #line 526 "program_parse.y"
-#line 463 "program_parse.y"
++#line 528 "program_parse.y"
{ (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;}
break;
- case 41:
+ case 44:
/* Line 1455 of yacc.c */
- #line 527 "program_parse.y"
-#line 464 "program_parse.y"
++#line 529 "program_parse.y"
{ (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;}
break;
- case 42:
+ case 45:
/* Line 1455 of yacc.c */
- #line 528 "program_parse.y"
-#line 465 "program_parse.y"
++#line 530 "program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;}
break;
- case 43:
+ case 46:
/* Line 1455 of yacc.c */
- #line 529 "program_parse.y"
-#line 466 "program_parse.y"
++#line 531 "program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;}
break;
- case 44:
+ case 47:
/* Line 1455 of yacc.c */
- #line 533 "program_parse.y"
-#line 470 "program_parse.y"
++#line 535 "program_parse.y"
{
/* FIXME: Is this correct? Should the extenedSwizzle be applied
* FIXME: to the existing swizzle?
;}
break;
- case 45:
+ case 48:
/* Line 1455 of yacc.c */
- #line 545 "program_parse.y"
-#line 483 "program_parse.y"
++#line 547 "program_parse.y"
{
- (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg);
+ (yyval.src_reg) = (yyvsp[(2) - (2)].src_reg);
- if ((yyvsp[(1) - (3)].negate)) {
+ if ((yyvsp[(1) - (2)].negate)) {
+ (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate;
+ }
+ ;}
+ break;
+
+ case 49:
+
+/* Line 1455 of yacc.c */
- #line 553 "program_parse.y"
++#line 555 "program_parse.y"
+ {
+ (yyval.src_reg) = (yyvsp[(3) - (4)].src_reg);
+
+ if (!state->option.NV_fragment) {
+ yyerror(& (yylsp[(2) - (4)]), state, "unexpected character '|'");
+ YYERROR;
+ }
+
+ if ((yyvsp[(1) - (4)].negate)) {
(yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate;
}
- #line 570 "program_parse.y"
+ (yyval.src_reg).Base.Abs = 1;
+ ;}
+ break;
+
+ case 50:
+
+/* Line 1455 of yacc.c */
++#line 572 "program_parse.y"
+ {
+ (yyval.src_reg) = (yyvsp[(1) - (2)].src_reg);
+
(yyval.src_reg).Base.Swizzle = _mesa_combine_swizzles((yyval.src_reg).Base.Swizzle,
- (yyvsp[(3) - (3)].swiz_mask).swizzle);
+ (yyvsp[(2) - (2)].swiz_mask).swizzle);
;}
break;
- case 46:
+ case 51:
+
+/* Line 1455 of yacc.c */
- #line 577 "program_parse.y"
++#line 579 "program_parse.y"
+ {
+ struct asm_symbol temp_sym;
+
+ if (!state->option.NV_fragment) {
+ yyerror(& (yylsp[(1) - (1)]), state, "expected scalar suffix");
+ YYERROR;
+ }
+
+ memset(& temp_sym, 0, sizeof(temp_sym));
+ temp_sym.param_binding_begin = ~0;
+ initialize_symbol_from_const(state->prog, & temp_sym, & (yyvsp[(1) - (1)].vector));
+
+ set_src_reg(& (yyval.src_reg), PROGRAM_CONSTANT, temp_sym.param_binding_begin);
+ ;}
+ break;
+
+ case 52:
/* Line 1455 of yacc.c */
- #line 594 "program_parse.y"
-#line 496 "program_parse.y"
++#line 596 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (3)].src_reg);
;}
break;
- case 47:
+ case 53:
/* Line 1455 of yacc.c */
- #line 605 "program_parse.y"
-#line 509 "program_parse.y"
++#line 607 "program_parse.y"
{
- (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
- (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask;
+ (yyval.src_reg) = (yyvsp[(3) - (5)].src_reg);
+
+ if (!state->option.NV_fragment) {
+ yyerror(& (yylsp[(2) - (5)]), state, "unexpected character '|'");
+ YYERROR;
+ }
+
+ if ((yyvsp[(1) - (5)].negate)) {
+ (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate;
+ }
+
+ (yyval.src_reg).Base.Abs = 1;
+ (yyval.src_reg).Base.Swizzle = _mesa_combine_swizzles((yyval.src_reg).Base.Swizzle,
+ (yyvsp[(4) - (5)].swiz_mask).swizzle);
+ ;}
+ break;
+
+ case 54:
+
+/* Line 1455 of yacc.c */
- #line 625 "program_parse.y"
++#line 627 "program_parse.y"
+ {
+ (yyval.dst_reg) = (yyvsp[(1) - (3)].dst_reg);
+ (yyval.dst_reg).WriteMask = (yyvsp[(2) - (3)].swiz_mask).mask;
+ (yyval.dst_reg).CondMask = (yyvsp[(3) - (3)].dst_reg).CondMask;
+ (yyval.dst_reg).CondSwizzle = (yyvsp[(3) - (3)].dst_reg).CondSwizzle;
+ (yyval.dst_reg).CondSrc = (yyvsp[(3) - (3)].dst_reg).CondSrc;
if ((yyval.dst_reg).File == PROGRAM_OUTPUT) {
/* Technically speaking, this should check that it is in
;}
break;
- case 48:
+ case 55:
/* Line 1455 of yacc.c */
- #line 650 "program_parse.y"
-#line 531 "program_parse.y"
++#line 652 "program_parse.y"
{
- init_dst_reg(& (yyval.dst_reg));
- (yyval.dst_reg).File = PROGRAM_ADDRESS;
- (yyval.dst_reg).Index = 0;
+ set_dst_reg(& (yyval.dst_reg), PROGRAM_ADDRESS, 0);
(yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask;
;}
break;
- case 49:
+ case 56:
/* Line 1455 of yacc.c */
- #line 657 "program_parse.y"
-#line 540 "program_parse.y"
++#line 659 "program_parse.y"
{
const unsigned xyzw_valid =
((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0)
;}
break;
- case 50:
+ case 57:
/* Line 1455 of yacc.c */
- #line 690 "program_parse.y"
-#line 573 "program_parse.y"
++#line 692 "program_parse.y"
{
(yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle);
(yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0;
;}
break;
- case 51:
+ case 58:
/* Line 1455 of yacc.c */
- #line 697 "program_parse.y"
-#line 580 "program_parse.y"
++#line 699 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector");
;}
break;
- case 52:
+ case 59:
/* Line 1455 of yacc.c */
- #line 712 "program_parse.y"
-#line 595 "program_parse.y"
++#line 714 "program_parse.y"
{
+ char s;
+
if (strlen((yyvsp[(1) - (1)].string)) > 1) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector");
YYERROR;
;}
break;
- case 53:
+ case 60:
/* Line 1455 of yacc.c */
- #line 762 "program_parse.y"
-#line 650 "program_parse.y"
++#line 769 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
;}
break;
- case 54:
+ case 61:
/* Line 1455 of yacc.c */
- #line 801 "program_parse.y"
-#line 694 "program_parse.y"
++#line 810 "program_parse.y"
{
- init_src_reg(& (yyval.src_reg));
- (yyval.src_reg).Base.File = PROGRAM_INPUT;
- (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].attrib);
+ set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, (yyvsp[(1) - (1)].attrib));
state->prog->InputsRead |= (1U << (yyval.src_reg).Base.Index);
if (!validate_inputs(& (yylsp[(1) - (1)]), state)) {
;}
break;
- case 55:
+ case 62:
/* Line 1455 of yacc.c */
- #line 810 "program_parse.y"
-#line 705 "program_parse.y"
++#line 819 "program_parse.y"
{
if (! (yyvsp[(3) - (4)].src_reg).Base.RelAddr
&& ((unsigned) (yyvsp[(3) - (4)].src_reg).Base.Index >= (yyvsp[(1) - (4)].sym)->param_binding_length)) {
;}
break;
- case 56:
+ case 63:
/* Line 1455 of yacc.c */
- #line 831 "program_parse.y"
-#line 726 "program_parse.y"
++#line 840 "program_parse.y"
{
- init_src_reg(& (yyval.src_reg));
- (yyval.src_reg).Base.File = ((yyvsp[(1) - (1)].temp_sym).name != NULL)
+ gl_register_file file = ((yyvsp[(1) - (1)].temp_sym).name != NULL)
? (yyvsp[(1) - (1)].temp_sym).param_binding_type
: PROGRAM_CONSTANT;
- (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].temp_sym).param_binding_begin;
+ set_src_reg(& (yyval.src_reg), file, (yyvsp[(1) - (1)].temp_sym).param_binding_begin);
;}
break;
- case 57:
+ case 64:
/* Line 1455 of yacc.c */
- #line 840 "program_parse.y"
-#line 736 "program_parse.y"
++#line 849 "program_parse.y"
{
- init_dst_reg(& (yyval.dst_reg));
- (yyval.dst_reg).File = PROGRAM_OUTPUT;
- (yyval.dst_reg).Index = (yyvsp[(1) - (1)].result);
+ set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, (yyvsp[(1) - (1)].result));
;}
break;
- case 58:
+ case 65:
/* Line 1455 of yacc.c */
- #line 844 "program_parse.y"
-#line 742 "program_parse.y"
++#line 853 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
;}
break;
- case 59:
+ case 66:
/* Line 1455 of yacc.c */
- #line 871 "program_parse.y"
-#line 775 "program_parse.y"
++#line 882 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
;}
break;
- case 62:
+ case 69:
/* Line 1455 of yacc.c */
- #line 890 "program_parse.y"
-#line 796 "program_parse.y"
++#line 903 "program_parse.y"
{
init_src_reg(& (yyval.src_reg));
(yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer);
;}
break;
- case 63:
+ case 70:
/* Line 1455 of yacc.c */
- #line 897 "program_parse.y"
-#line 803 "program_parse.y"
++#line 910 "program_parse.y"
{
/* FINISHME: Add support for multiple address registers.
*/
;}
break;
- case 64:
+ case 71:
/* Line 1455 of yacc.c */
- #line 908 "program_parse.y"
-#line 814 "program_parse.y"
++#line 921 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
- case 65:
+ case 72:
/* Line 1455 of yacc.c */
- #line 909 "program_parse.y"
-#line 815 "program_parse.y"
++#line 922 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
- case 66:
+ case 73:
/* Line 1455 of yacc.c */
- #line 910 "program_parse.y"
-#line 816 "program_parse.y"
++#line 923 "program_parse.y"
{ (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}
break;
- case 67:
+ case 74:
/* Line 1455 of yacc.c */
- #line 914 "program_parse.y"
-#line 820 "program_parse.y"
++#line 927 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) {
- yyerror(& (yylsp[(1) - (1)]), state,
- "relative address offset too large (positive)");
+ char s[100];
+ _mesa_snprintf(s, sizeof(s),
+ "relative address offset too large (%d)", (yyvsp[(1) - (1)].integer));
+ yyerror(& (yylsp[(1) - (1)]), state, s);
YYERROR;
} else {
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
- case 68:
+ case 75:
/* Line 1455 of yacc.c */
- #line 928 "program_parse.y"
-#line 832 "program_parse.y"
++#line 941 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) {
- yyerror(& (yylsp[(1) - (1)]), state,
- "relative address offset too large (negative)");
+ char s[100];
+ _mesa_snprintf(s, sizeof(s),
+ "relative address offset too large (%d)", (yyvsp[(1) - (1)].integer));
+ yyerror(& (yylsp[(1) - (1)]), state, s);
YYERROR;
} else {
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
- case 69:
+ case 76:
/* Line 1455 of yacc.c */
- #line 942 "program_parse.y"
-#line 844 "program_parse.y"
++#line 955 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
;}
break;
- case 70:
+ case 77:
/* Line 1455 of yacc.c */
- #line 960 "program_parse.y"
-#line 864 "program_parse.y"
++#line 975 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector");
;}
break;
- case 71:
+ case 78:
/* Line 1455 of yacc.c */
- #line 971 "program_parse.y"
-#line 875 "program_parse.y"
++#line 986 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state,
;}
break;
- case 76:
-
-/* Line 1455 of yacc.c */
-#line 891 "program_parse.y"
- { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
- break;
-
- case 81:
+ case 83:
/* Line 1455 of yacc.c */
- #line 987 "program_parse.y"
-#line 895 "program_parse.y"
++#line 1002 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 88:
/* Line 1455 of yacc.c */
- #line 991 "program_parse.y"
-#line 907 "program_parse.y"
- {
- struct asm_symbol *const s =
- declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)]));
-
- if (s == NULL) {
- free((yyvsp[(2) - (4)].string));
- YYERROR;
- } else {
- s->attrib_binding = (yyvsp[(4) - (4)].attrib);
- state->InputsBound |= (1U << s->attrib_binding);
-
- if (!validate_inputs(& (yylsp[(4) - (4)]), state)) {
- YYERROR;
- }
- }
- ;}
++#line 1006 "program_parse.y"
+ { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 89:
/* Line 1455 of yacc.c */
- #line 995 "program_parse.y"
-#line 926 "program_parse.y"
++#line 1010 "program_parse.y"
{
- (yyval.attrib) = (yyvsp[(2) - (2)].attrib);
+ (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg);
;}
break;
case 90:
/* Line 1455 of yacc.c */
- #line 999 "program_parse.y"
-#line 930 "program_parse.y"
++#line 1014 "program_parse.y"
{
- (yyval.attrib) = (yyvsp[(2) - (2)].attrib);
+ (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg);
;}
break;
case 91:
/* Line 1455 of yacc.c */
- #line 1003 "program_parse.y"
-#line 936 "program_parse.y"
++#line 1018 "program_parse.y"
{
- (yyval.attrib) = VERT_ATTRIB_POS;
+ (yyval.dst_reg).CondMask = COND_TR;
+ (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP;
+ (yyval.dst_reg).CondSrc = 0;
;}
break;
case 92:
/* Line 1455 of yacc.c */
- #line 1011 "program_parse.y"
-#line 940 "program_parse.y"
++#line 1026 "program_parse.y"
{
- (yyval.attrib) = VERT_ATTRIB_WEIGHT;
+ (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
+ (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle;
;}
break;
case 93:
/* Line 1455 of yacc.c */
- #line 1018 "program_parse.y"
-#line 944 "program_parse.y"
++#line 1033 "program_parse.y"
{
- (yyval.attrib) = VERT_ATTRIB_NORMAL;
+ (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
+ (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle;
;}
break;
case 94:
/* Line 1455 of yacc.c */
- #line 1025 "program_parse.y"
-#line 948 "program_parse.y"
++#line 1040 "program_parse.y"
{
- if (!state->ctx->Extensions.EXT_secondary_color) {
- yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported");
+ const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string));
+ if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) {
+ char *const err_str =
+ make_error_string("invalid condition code \"%s\"", (yyvsp[(1) - (1)].string));
+
+ yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL)
+ ? err_str : "invalid condition code");
+
+ if (err_str != NULL) {
+ _mesa_free(err_str);
+ }
+
YYERROR;
}
case 95:
/* Line 1455 of yacc.c */
- #line 1048 "program_parse.y"
-#line 957 "program_parse.y"
++#line 1063 "program_parse.y"
{
- if (!state->ctx->Extensions.EXT_fog_coord) {
- yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported");
+ const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string));
+ if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) {
+ char *const err_str =
+ make_error_string("invalid condition code \"%s\"", (yyvsp[(1) - (1)].string));
+
+ yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL)
+ ? err_str : "invalid condition code");
+
+ if (err_str != NULL) {
+ _mesa_free(err_str);
+ }
+
YYERROR;
}
;}
break;
- case 96:
+ case 102:
/* Line 1455 of yacc.c */
- #line 1079 "program_parse.y"
-#line 966 "program_parse.y"
++#line 1094 "program_parse.y"
{
- (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
- ;}
- break;
+ struct asm_symbol *const s =
+ declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)]));
- case 97:
+ if (s == NULL) {
++ free((yyvsp[(2) - (4)].string));
+ YYERROR;
+ } else {
+ s->attrib_binding = (yyvsp[(4) - (4)].attrib);
+ state->InputsBound |= (1U << s->attrib_binding);
+
+ if (!validate_inputs(& (yylsp[(4) - (4)]), state)) {
+ YYERROR;
+ }
+ }
+ ;}
+ break;
+
+ case 103:
+
+/* Line 1455 of yacc.c */
- #line 1097 "program_parse.y"
++#line 1113 "program_parse.y"
+ {
+ (yyval.attrib) = (yyvsp[(2) - (2)].attrib);
+ ;}
+ break;
+
+ case 104:
+
+/* Line 1455 of yacc.c */
- #line 1101 "program_parse.y"
++#line 1117 "program_parse.y"
+ {
+ (yyval.attrib) = (yyvsp[(2) - (2)].attrib);
+ ;}
+ break;
+
+ case 105:
+
+/* Line 1455 of yacc.c */
- #line 1107 "program_parse.y"
++#line 1123 "program_parse.y"
+ {
+ (yyval.attrib) = VERT_ATTRIB_POS;
+ ;}
+ break;
+
+ case 106:
+
+/* Line 1455 of yacc.c */
- #line 1111 "program_parse.y"
++#line 1127 "program_parse.y"
+ {
+ (yyval.attrib) = VERT_ATTRIB_WEIGHT;
+ ;}
+ break;
+
+ case 107:
+
+/* Line 1455 of yacc.c */
- #line 1115 "program_parse.y"
++#line 1131 "program_parse.y"
+ {
+ (yyval.attrib) = VERT_ATTRIB_NORMAL;
+ ;}
+ break;
+
+ case 108:
+
+/* Line 1455 of yacc.c */
- #line 1119 "program_parse.y"
++#line 1135 "program_parse.y"
+ {
+ if (!state->ctx->Extensions.EXT_secondary_color) {
+ yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported");
+ YYERROR;
+ }
+
+ (yyval.attrib) = VERT_ATTRIB_COLOR0 + (yyvsp[(2) - (2)].integer);
+ ;}
+ break;
+
+ case 109:
/* Line 1455 of yacc.c */
- #line 1128 "program_parse.y"
-#line 970 "program_parse.y"
++#line 1144 "program_parse.y"
+ {
+ if (!state->ctx->Extensions.EXT_fog_coord) {
+ yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported");
+ YYERROR;
+ }
+
+ (yyval.attrib) = VERT_ATTRIB_FOG;
+ ;}
+ break;
+
+ case 110:
+
+/* Line 1455 of yacc.c */
- #line 1137 "program_parse.y"
++#line 1153 "program_parse.y"
+ {
+ (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
+ ;}
+ break;
+
+ case 111:
+
+/* Line 1455 of yacc.c */
- #line 1141 "program_parse.y"
++#line 1157 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
;}
break;
- case 98:
+ case 112:
/* Line 1455 of yacc.c */
- #line 1146 "program_parse.y"
-#line 975 "program_parse.y"
++#line 1162 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer);
;}
break;
- case 99:
+ case 113:
/* Line 1455 of yacc.c */
- #line 1152 "program_parse.y"
-#line 981 "program_parse.y"
++#line 1168 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference");
;}
break;
- case 103:
+ case 117:
/* Line 1455 of yacc.c */
- #line 1166 "program_parse.y"
-#line 995 "program_parse.y"
++#line 1182 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_WPOS;
;}
break;
- case 104:
+ case 118:
/* Line 1455 of yacc.c */
- #line 1170 "program_parse.y"
-#line 999 "program_parse.y"
++#line 1186 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer);
;}
break;
- case 105:
+ case 119:
/* Line 1455 of yacc.c */
- #line 1174 "program_parse.y"
-#line 1003 "program_parse.y"
++#line 1190 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_FOGC;
;}
break;
- case 106:
+ case 120:
/* Line 1455 of yacc.c */
- #line 1178 "program_parse.y"
-#line 1007 "program_parse.y"
++#line 1194 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
break;
- case 109:
+ case 123:
/* Line 1455 of yacc.c */
- #line 1186 "program_parse.y"
-#line 1015 "program_parse.y"
++#line 1202 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)]));
;}
break;
- case 110:
+ case 124:
/* Line 1455 of yacc.c */
- #line 1202 "program_parse.y"
-#line 1032 "program_parse.y"
++#line 1219 "program_parse.y"
{
if (((yyvsp[(4) - (6)].integer) != 0) && ((unsigned) (yyvsp[(4) - (6)].integer) != (yyvsp[(6) - (6)].temp_sym).param_binding_length)) {
+ free((yyvsp[(2) - (6)].string));
yyerror(& (yylsp[(4) - (6)]), state,
"parameter array size and number of bindings must match");
YYERROR;
;}
break;
- case 111:
+ case 125:
/* Line 1455 of yacc.c */
- #line 1224 "program_parse.y"
-#line 1056 "program_parse.y"
++#line 1243 "program_parse.y"
{
(yyval.integer) = 0;
;}
break;
- case 112:
+ case 126:
/* Line 1455 of yacc.c */
- #line 1228 "program_parse.y"
-#line 1060 "program_parse.y"
++#line 1247 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 1) || ((unsigned) (yyvsp[(1) - (1)].integer) > state->limits->MaxParameters)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid parameter array size");
;}
break;
- case 113:
+ case 127:
/* Line 1455 of yacc.c */
- #line 1239 "program_parse.y"
-#line 1071 "program_parse.y"
++#line 1258 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym);
;}
break;
- case 114:
+ case 128:
/* Line 1455 of yacc.c */
- #line 1245 "program_parse.y"
-#line 1077 "program_parse.y"
++#line 1264 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym);
;}
break;
- case 116:
+ case 130:
/* Line 1455 of yacc.c */
- #line 1252 "program_parse.y"
-#line 1084 "program_parse.y"
++#line 1271 "program_parse.y"
{
(yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length;
(yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym);
;}
break;
- case 117:
+ case 131:
/* Line 1455 of yacc.c */
- #line 1259 "program_parse.y"
-#line 1091 "program_parse.y"
++#line 1278 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 118:
+ case 132:
/* Line 1455 of yacc.c */
- #line 1265 "program_parse.y"
-#line 1097 "program_parse.y"
++#line 1284 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 119:
+ case 133:
/* Line 1455 of yacc.c */
- #line 1271 "program_parse.y"
-#line 1103 "program_parse.y"
++#line 1290 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 120:
+ case 134:
/* Line 1455 of yacc.c */
- #line 1279 "program_parse.y"
-#line 1111 "program_parse.y"
++#line 1298 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 121:
+ case 135:
/* Line 1455 of yacc.c */
- #line 1285 "program_parse.y"
-#line 1117 "program_parse.y"
++#line 1304 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 122:
+ case 136:
/* Line 1455 of yacc.c */
- #line 1291 "program_parse.y"
-#line 1123 "program_parse.y"
++#line 1310 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 123:
+ case 137:
/* Line 1455 of yacc.c */
- #line 1299 "program_parse.y"
-#line 1131 "program_parse.y"
++#line 1318 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 124:
+ case 138:
/* Line 1455 of yacc.c */
- #line 1305 "program_parse.y"
-#line 1137 "program_parse.y"
++#line 1324 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 125:
+ case 139:
/* Line 1455 of yacc.c */
- #line 1311 "program_parse.y"
-#line 1143 "program_parse.y"
++#line 1330 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
;}
break;
- case 126:
+ case 140:
/* Line 1455 of yacc.c */
- #line 1318 "program_parse.y"
-#line 1150 "program_parse.y"
++#line 1337 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;}
break;
- case 127:
+ case 141:
/* Line 1455 of yacc.c */
- #line 1319 "program_parse.y"
-#line 1151 "program_parse.y"
++#line 1338 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 128:
+ case 142:
/* Line 1455 of yacc.c */
- #line 1322 "program_parse.y"
-#line 1154 "program_parse.y"
++#line 1341 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 129:
+ case 143:
/* Line 1455 of yacc.c */
- #line 1323 "program_parse.y"
-#line 1155 "program_parse.y"
++#line 1342 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 130:
+ case 144:
/* Line 1455 of yacc.c */
- #line 1324 "program_parse.y"
-#line 1156 "program_parse.y"
++#line 1343 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 131:
+ case 145:
/* Line 1455 of yacc.c */
- #line 1325 "program_parse.y"
-#line 1157 "program_parse.y"
++#line 1344 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 132:
+ case 146:
/* Line 1455 of yacc.c */
- #line 1326 "program_parse.y"
-#line 1158 "program_parse.y"
++#line 1345 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 133:
+ case 147:
/* Line 1455 of yacc.c */
- #line 1327 "program_parse.y"
-#line 1159 "program_parse.y"
++#line 1346 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 134:
+ case 148:
/* Line 1455 of yacc.c */
- #line 1328 "program_parse.y"
-#line 1160 "program_parse.y"
++#line 1347 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 135:
+ case 149:
/* Line 1455 of yacc.c */
- #line 1329 "program_parse.y"
-#line 1161 "program_parse.y"
++#line 1348 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 136:
+ case 150:
/* Line 1455 of yacc.c */
- #line 1330 "program_parse.y"
-#line 1162 "program_parse.y"
++#line 1349 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 137:
+ case 151:
/* Line 1455 of yacc.c */
- #line 1331 "program_parse.y"
-#line 1163 "program_parse.y"
++#line 1350 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 138:
+ case 152:
/* Line 1455 of yacc.c */
- #line 1332 "program_parse.y"
-#line 1164 "program_parse.y"
++#line 1351 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
- case 139:
+ case 153:
/* Line 1455 of yacc.c */
- #line 1336 "program_parse.y"
-#line 1168 "program_parse.y"
++#line 1355 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_MATERIAL;
;}
break;
- case 140:
+ case 154:
/* Line 1455 of yacc.c */
- #line 1345 "program_parse.y"
-#line 1177 "program_parse.y"
++#line 1364 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
- case 141:
+ case 155:
/* Line 1455 of yacc.c */
- #line 1349 "program_parse.y"
-#line 1181 "program_parse.y"
++#line 1368 "program_parse.y"
{
(yyval.integer) = STATE_EMISSION;
;}
break;
- case 142:
+ case 156:
/* Line 1455 of yacc.c */
- #line 1353 "program_parse.y"
-#line 1185 "program_parse.y"
++#line 1372 "program_parse.y"
{
(yyval.integer) = STATE_SHININESS;
;}
break;
- case 143:
+ case 157:
/* Line 1455 of yacc.c */
- #line 1359 "program_parse.y"
-#line 1191 "program_parse.y"
++#line 1378 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHT;
;}
break;
- case 144:
+ case 158:
/* Line 1455 of yacc.c */
- #line 1368 "program_parse.y"
-#line 1200 "program_parse.y"
++#line 1387 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
- case 145:
+ case 159:
/* Line 1455 of yacc.c */
- #line 1372 "program_parse.y"
-#line 1204 "program_parse.y"
++#line 1391 "program_parse.y"
{
(yyval.integer) = STATE_POSITION;
;}
break;
- case 146:
+ case 160:
/* Line 1455 of yacc.c */
- #line 1376 "program_parse.y"
-#line 1208 "program_parse.y"
++#line 1395 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_point_parameters) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported");
;}
break;
- case 147:
+ case 161:
/* Line 1455 of yacc.c */
- #line 1385 "program_parse.y"
-#line 1217 "program_parse.y"
++#line 1404 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
break;
- case 148:
+ case 162:
/* Line 1455 of yacc.c */
- #line 1389 "program_parse.y"
-#line 1221 "program_parse.y"
++#line 1408 "program_parse.y"
{
(yyval.integer) = STATE_HALF_VECTOR;
;}
break;
- case 149:
+ case 163:
/* Line 1455 of yacc.c */
- #line 1395 "program_parse.y"
-#line 1227 "program_parse.y"
++#line 1414 "program_parse.y"
{
(yyval.integer) = STATE_SPOT_DIRECTION;
;}
break;
- case 150:
+ case 164:
/* Line 1455 of yacc.c */
- #line 1401 "program_parse.y"
-#line 1233 "program_parse.y"
++#line 1420 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (2)].state)[1];
;}
break;
- case 151:
+ case 165:
/* Line 1455 of yacc.c */
- #line 1408 "program_parse.y"
-#line 1240 "program_parse.y"
++#line 1427 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT;
;}
break;
- case 152:
+ case 166:
/* Line 1455 of yacc.c */
- #line 1413 "program_parse.y"
-#line 1245 "program_parse.y"
++#line 1432 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR;
;}
break;
- case 153:
+ case 167:
/* Line 1455 of yacc.c */
- #line 1421 "program_parse.y"
-#line 1253 "program_parse.y"
++#line 1440 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTPROD;
;}
break;
- case 155:
+ case 169:
/* Line 1455 of yacc.c */
- #line 1433 "program_parse.y"
-#line 1265 "program_parse.y"
++#line 1452 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(3) - (3)].integer);
;}
break;
- case 156:
+ case 170:
/* Line 1455 of yacc.c */
- #line 1441 "program_parse.y"
-#line 1273 "program_parse.y"
++#line 1460 "program_parse.y"
{
(yyval.integer) = STATE_TEXENV_COLOR;
;}
break;
- case 157:
+ case 171:
/* Line 1455 of yacc.c */
- #line 1447 "program_parse.y"
-#line 1279 "program_parse.y"
++#line 1466 "program_parse.y"
{
(yyval.integer) = STATE_AMBIENT;
;}
break;
- case 158:
+ case 172:
/* Line 1455 of yacc.c */
- #line 1451 "program_parse.y"
-#line 1283 "program_parse.y"
++#line 1470 "program_parse.y"
{
(yyval.integer) = STATE_DIFFUSE;
;}
break;
- case 159:
+ case 173:
/* Line 1455 of yacc.c */
- #line 1455 "program_parse.y"
-#line 1287 "program_parse.y"
++#line 1474 "program_parse.y"
{
(yyval.integer) = STATE_SPECULAR;
;}
break;
- case 160:
+ case 174:
/* Line 1455 of yacc.c */
- #line 1461 "program_parse.y"
-#line 1293 "program_parse.y"
++#line 1480 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector");
;}
break;
- case 161:
+ case 175:
/* Line 1455 of yacc.c */
- #line 1472 "program_parse.y"
-#line 1304 "program_parse.y"
++#line 1491 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_TEXGEN;
;}
break;
- case 162:
+ case 176:
/* Line 1455 of yacc.c */
- #line 1481 "program_parse.y"
-#line 1313 "program_parse.y"
++#line 1500 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S;
;}
break;
- case 163:
+ case 177:
/* Line 1455 of yacc.c */
- #line 1485 "program_parse.y"
-#line 1317 "program_parse.y"
++#line 1504 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_OBJECT_S;
;}
break;
- case 164:
+ case 178:
/* Line 1455 of yacc.c */
- #line 1490 "program_parse.y"
-#line 1322 "program_parse.y"
++#line 1509 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S;
;}
break;
- case 165:
+ case 179:
/* Line 1455 of yacc.c */
- #line 1494 "program_parse.y"
-#line 1326 "program_parse.y"
++#line 1513 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S;
;}
break;
- case 166:
+ case 180:
/* Line 1455 of yacc.c */
- #line 1498 "program_parse.y"
-#line 1330 "program_parse.y"
++#line 1517 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S;
;}
break;
- case 167:
+ case 181:
/* Line 1455 of yacc.c */
- #line 1502 "program_parse.y"
-#line 1334 "program_parse.y"
++#line 1521 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S;
;}
break;
- case 168:
+ case 182:
/* Line 1455 of yacc.c */
- #line 1508 "program_parse.y"
-#line 1340 "program_parse.y"
++#line 1527 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
;}
break;
- case 169:
+ case 183:
/* Line 1455 of yacc.c */
- #line 1515 "program_parse.y"
-#line 1347 "program_parse.y"
++#line 1534 "program_parse.y"
{
(yyval.integer) = STATE_FOG_COLOR;
;}
break;
- case 170:
+ case 184:
/* Line 1455 of yacc.c */
- #line 1519 "program_parse.y"
-#line 1351 "program_parse.y"
++#line 1538 "program_parse.y"
{
(yyval.integer) = STATE_FOG_PARAMS;
;}
break;
- case 171:
+ case 185:
/* Line 1455 of yacc.c */
- #line 1525 "program_parse.y"
-#line 1357 "program_parse.y"
++#line 1544 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_CLIPPLANE;
;}
break;
- case 172:
+ case 186:
/* Line 1455 of yacc.c */
- #line 1533 "program_parse.y"
-#line 1365 "program_parse.y"
++#line 1552 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector");
;}
break;
- case 173:
+ case 187:
/* Line 1455 of yacc.c */
- #line 1544 "program_parse.y"
-#line 1376 "program_parse.y"
++#line 1563 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
;}
break;
- case 174:
+ case 188:
/* Line 1455 of yacc.c */
- #line 1551 "program_parse.y"
-#line 1383 "program_parse.y"
++#line 1570 "program_parse.y"
{
(yyval.integer) = STATE_POINT_SIZE;
;}
break;
- case 175:
+ case 189:
/* Line 1455 of yacc.c */
- #line 1555 "program_parse.y"
-#line 1387 "program_parse.y"
++#line 1574 "program_parse.y"
{
(yyval.integer) = STATE_POINT_ATTENUATION;
;}
break;
- case 176:
+ case 190:
/* Line 1455 of yacc.c */
- #line 1561 "program_parse.y"
-#line 1393 "program_parse.y"
++#line 1580 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (5)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (5)].state)[1];
;}
break;
- case 177:
+ case 191:
/* Line 1455 of yacc.c */
- #line 1571 "program_parse.y"
-#line 1403 "program_parse.y"
++#line 1590 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (2)].state)[1];
;}
break;
- case 178:
+ case 192:
/* Line 1455 of yacc.c */
- #line 1581 "program_parse.y"
-#line 1413 "program_parse.y"
++#line 1600 "program_parse.y"
{
(yyval.state)[2] = 0;
(yyval.state)[3] = 3;
;}
break;
- case 179:
+ case 193:
/* Line 1455 of yacc.c */
- #line 1586 "program_parse.y"
-#line 1418 "program_parse.y"
++#line 1605 "program_parse.y"
{
/* It seems logical that the matrix row range specifier would have
* to specify a range or more than one row (i.e., $5 > $3).
;}
break;
- case 180:
+ case 194:
/* Line 1455 of yacc.c */
- #line 1604 "program_parse.y"
-#line 1436 "program_parse.y"
++#line 1623 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (3)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (3)].state)[1];
;}
break;
- case 181:
+ case 195:
/* Line 1455 of yacc.c */
- #line 1612 "program_parse.y"
-#line 1444 "program_parse.y"
++#line 1631 "program_parse.y"
{
(yyval.integer) = 0;
;}
break;
- case 182:
+ case 196:
/* Line 1455 of yacc.c */
- #line 1616 "program_parse.y"
-#line 1448 "program_parse.y"
++#line 1635 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
- case 183:
+ case 197:
/* Line 1455 of yacc.c */
- #line 1622 "program_parse.y"
-#line 1454 "program_parse.y"
++#line 1641 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVERSE;
;}
break;
- case 184:
+ case 198:
/* Line 1455 of yacc.c */
- #line 1626 "program_parse.y"
-#line 1458 "program_parse.y"
++#line 1645 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_TRANSPOSE;
;}
break;
- case 185:
+ case 199:
/* Line 1455 of yacc.c */
- #line 1630 "program_parse.y"
-#line 1462 "program_parse.y"
++#line 1649 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVTRANS;
;}
break;
- case 186:
+ case 200:
/* Line 1455 of yacc.c */
- #line 1636 "program_parse.y"
-#line 1468 "program_parse.y"
++#line 1655 "program_parse.y"
{
if ((yyvsp[(1) - (1)].integer) > 3) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference");
;}
break;
- case 187:
+ case 201:
/* Line 1455 of yacc.c */
- #line 1647 "program_parse.y"
-#line 1479 "program_parse.y"
++#line 1666 "program_parse.y"
{
(yyval.state)[0] = STATE_MODELVIEW_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
;}
break;
- case 188:
+ case 202:
/* Line 1455 of yacc.c */
- #line 1652 "program_parse.y"
-#line 1484 "program_parse.y"
++#line 1671 "program_parse.y"
{
(yyval.state)[0] = STATE_PROJECTION_MATRIX;
(yyval.state)[1] = 0;
;}
break;
- case 189:
+ case 203:
/* Line 1455 of yacc.c */
- #line 1657 "program_parse.y"
-#line 1489 "program_parse.y"
++#line 1676 "program_parse.y"
{
(yyval.state)[0] = STATE_MVP_MATRIX;
(yyval.state)[1] = 0;
;}
break;
- case 190:
+ case 204:
/* Line 1455 of yacc.c */
- #line 1662 "program_parse.y"
-#line 1494 "program_parse.y"
++#line 1681 "program_parse.y"
{
(yyval.state)[0] = STATE_TEXTURE_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
;}
break;
- case 191:
+ case 205:
/* Line 1455 of yacc.c */
- #line 1667 "program_parse.y"
-#line 1499 "program_parse.y"
++#line 1686 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
;}
break;
- case 192:
+ case 206:
/* Line 1455 of yacc.c */
- #line 1672 "program_parse.y"
-#line 1504 "program_parse.y"
++#line 1691 "program_parse.y"
{
(yyval.state)[0] = STATE_PROGRAM_MATRIX;
(yyval.state)[1] = (yyvsp[(3) - (4)].integer);
;}
break;
- case 193:
+ case 207:
/* Line 1455 of yacc.c */
- #line 1679 "program_parse.y"
-#line 1511 "program_parse.y"
++#line 1698 "program_parse.y"
{
(yyval.integer) = 0;
;}
break;
- case 194:
+ case 208:
/* Line 1455 of yacc.c */
- #line 1683 "program_parse.y"
-#line 1515 "program_parse.y"
++#line 1702 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (3)].integer);
;}
break;
- case 195:
+ case 209:
/* Line 1455 of yacc.c */
- #line 1688 "program_parse.y"
-#line 1520 "program_parse.y"
++#line 1707 "program_parse.y"
{
/* Since GL_ARB_vertex_blend isn't supported, only modelview matrix
* zero is valid.
;}
break;
- case 196:
+ case 210:
/* Line 1455 of yacc.c */
- #line 1701 "program_parse.y"
-#line 1533 "program_parse.y"
++#line 1720 "program_parse.y"
{
/* Since GL_ARB_matrix_palette isn't supported, just let any value
* through here. The error will be generated later.
;}
break;
- case 197:
+ case 211:
/* Line 1455 of yacc.c */
- #line 1709 "program_parse.y"
-#line 1541 "program_parse.y"
++#line 1728 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector");
;}
break;
- case 198:
+ case 212:
/* Line 1455 of yacc.c */
- #line 1720 "program_parse.y"
-#line 1552 "program_parse.y"
++#line 1739 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_DEPTH_RANGE;
;}
break;
- case 203:
+ case 217:
/* Line 1455 of yacc.c */
- #line 1732 "program_parse.y"
-#line 1564 "program_parse.y"
++#line 1751 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
;}
break;
- case 204:
+ case 218:
/* Line 1455 of yacc.c */
- #line 1742 "program_parse.y"
-#line 1574 "program_parse.y"
++#line 1761 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
;}
break;
- case 205:
+ case 219:
/* Line 1455 of yacc.c */
- #line 1747 "program_parse.y"
-#line 1579 "program_parse.y"
++#line 1766 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
;}
break;
- case 206:
+ case 220:
/* Line 1455 of yacc.c */
- #line 1754 "program_parse.y"
-#line 1586 "program_parse.y"
++#line 1773 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
;}
break;
- case 207:
+ case 221:
/* Line 1455 of yacc.c */
- #line 1764 "program_parse.y"
-#line 1596 "program_parse.y"
++#line 1783 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
;}
break;
- case 208:
+ case 222:
/* Line 1455 of yacc.c */
- #line 1773 "program_parse.y"
-#line 1605 "program_parse.y"
++#line 1792 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
;}
break;
- case 209:
+ case 223:
/* Line 1455 of yacc.c */
- #line 1778 "program_parse.y"
-#line 1610 "program_parse.y"
++#line 1797 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
;}
break;
- case 210:
+ case 224:
/* Line 1455 of yacc.c */
- #line 1785 "program_parse.y"
-#line 1617 "program_parse.y"
++#line 1804 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
;}
break;
- case 211:
+ case 225:
/* Line 1455 of yacc.c */
- #line 1795 "program_parse.y"
-#line 1627 "program_parse.y"
++#line 1814 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference");
;}
break;
- case 212:
+ case 226:
/* Line 1455 of yacc.c */
- #line 1805 "program_parse.y"
-#line 1637 "program_parse.y"
++#line 1824 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference");
;}
break;
- case 217:
+ case 231:
/* Line 1455 of yacc.c */
- #line 1820 "program_parse.y"
-#line 1652 "program_parse.y"
++#line 1839 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
;}
break;
- case 218:
+ case 232:
/* Line 1455 of yacc.c */
- #line 1830 "program_parse.y"
-#line 1662 "program_parse.y"
++#line 1849 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
;}
break;
- case 219:
+ case 233:
/* Line 1455 of yacc.c */
- #line 1838 "program_parse.y"
-#line 1670 "program_parse.y"
++#line 1857 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer);
;}
break;
- case 220:
+ case 234:
/* Line 1455 of yacc.c */
- #line 1848 "program_parse.y"
-#line 1680 "program_parse.y"
++#line 1867 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (3)].real);
;}
break;
- case 221:
+ case 235:
/* Line 1455 of yacc.c */
- #line 1856 "program_parse.y"
-#line 1688 "program_parse.y"
++#line 1875 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (5)].real);
;}
break;
- case 222:
+ case 236:
/* Line 1455 of yacc.c */
- #line 1865 "program_parse.y"
-#line 1697 "program_parse.y"
++#line 1884 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (7)].real);
;}
break;
- case 223:
+ case 237:
/* Line 1455 of yacc.c */
- #line 1874 "program_parse.y"
-#line 1706 "program_parse.y"
++#line 1893 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (9)].real);
;}
break;
- case 224:
+ case 238:
/* Line 1455 of yacc.c */
- #line 1884 "program_parse.y"
-#line 1716 "program_parse.y"
++#line 1903 "program_parse.y"
{
(yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real);
;}
break;
- case 225:
+ case 239:
/* Line 1455 of yacc.c */
- #line 1888 "program_parse.y"
-#line 1720 "program_parse.y"
++#line 1907 "program_parse.y"
{
(yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer));
;}
break;
- case 226:
+ case 240:
/* Line 1455 of yacc.c */
- #line 1893 "program_parse.y"
-#line 1725 "program_parse.y"
++#line 1912 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
- case 227:
+ case 241:
/* Line 1455 of yacc.c */
- #line 1894 "program_parse.y"
-#line 1726 "program_parse.y"
++#line 1913 "program_parse.y"
{ (yyval.negate) = TRUE; ;}
break;
- case 228:
+ case 242:
/* Line 1455 of yacc.c */
- #line 1895 "program_parse.y"
-#line 1727 "program_parse.y"
++#line 1914 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
- case 229:
+ case 243:
/* Line 1455 of yacc.c */
- #line 1898 "program_parse.y"
-#line 1730 "program_parse.y"
- { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
++#line 1917 "program_parse.y"
+ { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
- case 231:
+ case 245:
+
+/* Line 1455 of yacc.c */
- #line 1902 "program_parse.y"
++#line 1921 "program_parse.y"
+ {
+ /* NV_fragment_program_option defines the size qualifiers in a
+ * fairly broken way. "SHORT" or "LONG" can optionally be used
+ * before TEMP or OUTPUT. However, neither is a reserved word!
+ * This means that we have to parse it as an identifier, then check
+ * to make sure it's one of the valid values. *sigh*
+ *
+ * In addition, the grammar in the extension spec does *not* allow
+ * the size specifier to be optional, but all known implementations
+ * do.
+ */
+ if (!state->option.NV_fragment) {
+ yyerror(& (yylsp[(1) - (1)]), state, "unexpected IDENTIFIER");
+ YYERROR;
+ }
+
+ if (strcmp("SHORT", (yyvsp[(1) - (1)].string)) == 0) {
+ } else if (strcmp("LONG", (yyvsp[(1) - (1)].string)) == 0) {
+ } else {
+ char *const err_str =
+ make_error_string("invalid storage size specifier \"%s\"",
+ (yyvsp[(1) - (1)].string));
+
+ yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL)
+ ? err_str : "invalid storage size specifier");
+
+ if (err_str != NULL) {
+ _mesa_free(err_str);
+ }
+
+ YYERROR;
+ }
+ ;}
+ break;
+
+ case 246:
/* Line 1455 of yacc.c */
- #line 1936 "program_parse.y"
-#line 1733 "program_parse.y"
++#line 1955 "program_parse.y"
+ {
+ ;}
+ break;
+
+ case 247:
+
+/* Line 1455 of yacc.c */
- #line 1940 "program_parse.y"
++#line 1959 "program_parse.y"
{ (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
break;
- case 233:
+ case 249:
/* Line 1455 of yacc.c */
- #line 1944 "program_parse.y"
-#line 1737 "program_parse.y"
++#line 1963 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) {
+ free((yyvsp[(3) - (3)].string));
YYERROR;
}
;}
break;
- case 234:
+ case 250:
/* Line 1455 of yacc.c */
- #line 1950 "program_parse.y"
-#line 1744 "program_parse.y"
++#line 1970 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) {
+ free((yyvsp[(1) - (1)].string));
YYERROR;
}
;}
break;
- case 235:
+ case 251:
/* Line 1455 of yacc.c */
- #line 1958 "program_parse.y"
-#line 1753 "program_parse.y"
++#line 1979 "program_parse.y"
{
struct asm_symbol *const s =
- declare_variable(state, (yyvsp[(2) - (4)].string), at_output, & (yylsp[(2) - (4)]));
+ declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)]));
if (s == NULL) {
- free((yyvsp[(2) - (4)].string));
++ free((yyvsp[(3) - (5)].string));
YYERROR;
} else {
- s->output_binding = (yyvsp[(4) - (4)].result);
+ s->output_binding = (yyvsp[(5) - (5)].result);
}
;}
break;
- case 236:
+ case 252:
/* Line 1455 of yacc.c */
- #line 1971 "program_parse.y"
-#line 1767 "program_parse.y"
++#line 1993 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_HPOS;
;}
break;
- case 237:
+ case 253:
/* Line 1455 of yacc.c */
- #line 1980 "program_parse.y"
-#line 1776 "program_parse.y"
++#line 2002 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_FOGC;
;}
break;
- case 238:
+ case 254:
/* Line 1455 of yacc.c */
- #line 1989 "program_parse.y"
-#line 1785 "program_parse.y"
++#line 2011 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (2)].result);
;}
break;
- case 239:
+ case 255:
/* Line 1455 of yacc.c */
- #line 1993 "program_parse.y"
-#line 1789 "program_parse.y"
++#line 2015 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_PSIZ;
;}
break;
- case 240:
+ case 256:
/* Line 1455 of yacc.c */
- #line 2002 "program_parse.y"
-#line 1798 "program_parse.y"
++#line 2024 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer);
;}
break;
- case 241:
+ case 257:
/* Line 1455 of yacc.c */
- #line 2011 "program_parse.y"
-#line 1807 "program_parse.y"
++#line 2033 "program_parse.y"
{
if (state->mode == ARB_fragment) {
(yyval.result) = FRAG_RESULT_DEPTH;
;}
break;
- case 242:
+ case 258:
/* Line 1455 of yacc.c */
- #line 2022 "program_parse.y"
-#line 1818 "program_parse.y"
++#line 2044 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer);
;}
break;
- case 243:
+ case 259:
/* Line 1455 of yacc.c */
- #line 2028 "program_parse.y"
-#line 1824 "program_parse.y"
++#line 2050 "program_parse.y"
{
(yyval.integer) = (state->mode == ARB_vertex)
? VERT_RESULT_COL0
;}
break;
- case 244:
+ case 260:
/* Line 1455 of yacc.c */
- #line 2034 "program_parse.y"
-#line 1830 "program_parse.y"
++#line 2056 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_COL0;
;}
break;
- case 245:
+ case 261:
/* Line 1455 of yacc.c */
- #line 2043 "program_parse.y"
-#line 1839 "program_parse.y"
++#line 2065 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_BFC0;
;}
break;
- case 246:
+ case 262:
/* Line 1455 of yacc.c */
- #line 2054 "program_parse.y"
-#line 1850 "program_parse.y"
++#line 2076 "program_parse.y"
{
(yyval.integer) = 0;
;}
break;
- case 247:
+ case 263:
/* Line 1455 of yacc.c */
- #line 2058 "program_parse.y"
-#line 1854 "program_parse.y"
++#line 2080 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 0;
;}
break;
- case 248:
+ case 264:
/* Line 1455 of yacc.c */
- #line 2067 "program_parse.y"
-#line 1863 "program_parse.y"
++#line 2089 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 1;
;}
break;
- case 249:
+ case 265:
/* Line 1455 of yacc.c */
- #line 2077 "program_parse.y"
-#line 1873 "program_parse.y"
++#line 2099 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
- case 250:
+ case 266:
/* Line 1455 of yacc.c */
- #line 2078 "program_parse.y"
-#line 1874 "program_parse.y"
++#line 2100 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
- case 251:
+ case 267:
/* Line 1455 of yacc.c */
- #line 2079 "program_parse.y"
-#line 1875 "program_parse.y"
++#line 2101 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
- case 252:
+ case 268:
/* Line 1455 of yacc.c */
- #line 2082 "program_parse.y"
-#line 1878 "program_parse.y"
++#line 2104 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
- case 253:
+ case 269:
/* Line 1455 of yacc.c */
- #line 2083 "program_parse.y"
-#line 1879 "program_parse.y"
++#line 2105 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
- case 254:
+ case 270:
/* Line 1455 of yacc.c */
- #line 2084 "program_parse.y"
-#line 1880 "program_parse.y"
++#line 2106 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
- case 255:
+ case 271:
/* Line 1455 of yacc.c */
- #line 2087 "program_parse.y"
-#line 1883 "program_parse.y"
++#line 2109 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
- case 256:
+ case 272:
/* Line 1455 of yacc.c */
- #line 2088 "program_parse.y"
-#line 1884 "program_parse.y"
++#line 2110 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
- case 257:
+ case 273:
/* Line 1455 of yacc.c */
- #line 2091 "program_parse.y"
-#line 1887 "program_parse.y"
++#line 2113 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
- case 258:
+ case 274:
/* Line 1455 of yacc.c */
- #line 2092 "program_parse.y"
-#line 1888 "program_parse.y"
++#line 2114 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
- case 259:
+ case 275:
/* Line 1455 of yacc.c */
- #line 2095 "program_parse.y"
-#line 1891 "program_parse.y"
++#line 2117 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
- case 260:
+ case 276:
/* Line 1455 of yacc.c */
- #line 2096 "program_parse.y"
-#line 1892 "program_parse.y"
++#line 2118 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
- case 261:
+ case 277:
/* Line 1455 of yacc.c */
- #line 2100 "program_parse.y"
-#line 1896 "program_parse.y"
++#line 2122 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector");
;}
break;
- case 262:
+ case 278:
/* Line 1455 of yacc.c */
- #line 2111 "program_parse.y"
-#line 1907 "program_parse.y"
++#line 2133 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector");
;}
break;
- case 263:
+ case 279:
/* Line 1455 of yacc.c */
- #line 2122 "program_parse.y"
-#line 1918 "program_parse.y"
++#line 2144 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector");
;}
break;
- case 264:
+ case 280:
/* Line 1455 of yacc.c */
- #line 2133 "program_parse.y"
-#line 1929 "program_parse.y"
++#line 2155 "program_parse.y"
{
struct asm_symbol *exist = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string));
struct asm_symbol *target = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(4) - (4)].string));
-
+ free((yyvsp[(4) - (4)].string));
+
if (exist != NULL) {
- yyerror(& (yylsp[(2) - (4)]), state, "redeclared identifier");
+ char m[1000];
+ _mesa_snprintf(m, sizeof(m), "redeclared identifier: %s", (yyvsp[(2) - (4)].string));
+ free((yyvsp[(2) - (4)].string));
+ yyerror(& (yylsp[(2) - (4)]), state, m);
YYERROR;
} else if (target == NULL) {
+ free((yyvsp[(2) - (4)].string));
yyerror(& (yylsp[(4) - (4)]), state,
"undefined variable binding in ALIAS statement");
YYERROR;
/* Line 1455 of yacc.c */
- #line 4900 "program_parse.tab.c"
-#line 4603 "program_parse.tab.c"
++#line 4926 "program_parse.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
/* Line 1675 of yacc.c */
- #line 2158 "program_parse.y"
-#line 1953 "program_parse.y"
++#line 2184 "program_parse.y"
+
+
+void
+asm_instruction_set_operands(struct asm_instruction *inst,
+ const struct prog_dst_register *dst,
+ const struct asm_src_register *src0,
+ const struct asm_src_register *src1,
+ const struct asm_src_register *src2)
+{
+ /* In the core ARB extensions only the KIL instruction doesn't have a
+ * destination register.
+ */
+ if (dst == NULL) {
+ init_dst_reg(& inst->Base.DstReg);
+ } else {
+ inst->Base.DstReg = *dst;
+ }
+
+ /* The only instruction that doesn't have any source registers is the
+ * condition-code based KIL instruction added by NV_fragment_program_option.
+ */
+ if (src0 != NULL) {
+ inst->Base.SrcReg[0] = src0->Base;
+ inst->SrcReg[0] = *src0;
+ } else {
+ init_src_reg(& inst->SrcReg[0]);
+ }
+
+ if (src1 != NULL) {
+ inst->Base.SrcReg[1] = src1->Base;
+ inst->SrcReg[1] = *src1;
+ } else {
+ init_src_reg(& inst->SrcReg[1]);
+ }
+
+ if (src2 != NULL) {
+ inst->Base.SrcReg[2] = src2->Base;
+ inst->SrcReg[2] = *src2;
+ } else {
+ init_src_reg(& inst->SrcReg[2]);
+ }
+}
struct asm_instruction *