static void set_src_reg(struct asm_src_register *r,
gl_register_file file, GLint index);
+static void set_src_reg_swz(struct asm_src_register *r,
+ gl_register_file file, GLint index, GLuint swizzle);
+
static 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);
/* Line 189 of yacc.c */
-#line 189 "program_parse.tab.c"
+#line 192 "program_parse.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
{
/* Line 214 of yacc.c */
-#line 122 "program_parse.y"
+#line 125 "program_parse.y"
struct asm_instruction *inst;
struct asm_symbol *sym;
/* Line 214 of yacc.c */
-#line 360 "program_parse.tab.c"
+#line 363 "program_parse.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
/* Copy the second part of user declarations. */
/* Line 264 of yacc.c */
-#line 267 "program_parse.y"
+#line 270 "program_parse.y"
extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param,
void *yyscanner);
/* Line 264 of yacc.c */
-#line 391 "program_parse.tab.c"
+#line 394 "program_parse.tab.c"
#ifdef short
# undef short
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 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
+ 0, 277, 277, 280, 288, 300, 301, 304, 328, 329,
+ 332, 347, 350, 355, 362, 363, 364, 365, 366, 367,
+ 368, 371, 372, 373, 376, 382, 388, 394, 401, 407,
+ 414, 458, 463, 473, 517, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 537, 549, 557,
+ 574, 581, 600, 611, 631, 656, 663, 696, 703, 718,
+ 773, 816, 825, 846, 856, 860, 889, 908, 908, 910,
+ 917, 929, 930, 931, 934, 948, 962, 982, 993, 1005,
+ 1007, 1008, 1009, 1010, 1013, 1013, 1013, 1013, 1014, 1017,
+ 1021, 1026, 1033, 1040, 1047, 1070, 1093, 1094, 1095, 1096,
+ 1097, 1098, 1101, 1120, 1124, 1130, 1134, 1138, 1142, 1151,
+ 1160, 1164, 1169, 1175, 1186, 1186, 1187, 1189, 1193, 1197,
+ 1201, 1207, 1207, 1209, 1227, 1253, 1256, 1267, 1273, 1279,
+ 1280, 1287, 1293, 1299, 1307, 1313, 1319, 1327, 1333, 1339,
+ 1347, 1348, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358,
+ 1359, 1360, 1361, 1364, 1373, 1377, 1381, 1387, 1396, 1400,
+ 1404, 1413, 1417, 1423, 1429, 1436, 1441, 1449, 1459, 1461,
+ 1469, 1475, 1479, 1483, 1489, 1500, 1509, 1513, 1518, 1522,
+ 1526, 1530, 1536, 1543, 1547, 1553, 1561, 1572, 1579, 1583,
+ 1589, 1599, 1610, 1614, 1632, 1641, 1644, 1650, 1654, 1658,
+ 1664, 1675, 1680, 1685, 1690, 1695, 1700, 1708, 1711, 1716,
+ 1729, 1737, 1748, 1756, 1756, 1758, 1758, 1760, 1770, 1775,
+ 1782, 1792, 1801, 1806, 1813, 1823, 1833, 1845, 1845, 1846,
+ 1846, 1848, 1858, 1866, 1876, 1884, 1892, 1901, 1912, 1916,
+ 1922, 1923, 1924, 1927, 1927, 1930, 1965, 1969, 1969, 1972,
+ 1979, 1988, 2002, 2011, 2020, 2024, 2033, 2042, 2053, 2060,
+ 2065, 2074, 2086, 2089, 2098, 2109, 2110, 2111, 2114, 2115,
+ 2116, 2119, 2120, 2123, 2124, 2127, 2128, 2131, 2142, 2153,
+ 2164, 2190, 2191
};
#endif
case 3:
/* Line 1455 of yacc.c */
-#line 278 "program_parse.y"
+#line 281 "program_parse.y"
{
if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid fragment program header");
case 4:
/* Line 1455 of yacc.c */
-#line 286 "program_parse.y"
+#line 289 "program_parse.y"
{
if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex program header");
case 7:
/* Line 1455 of yacc.c */
-#line 302 "program_parse.y"
+#line 305 "program_parse.y"
{
int valid = 0;
case 10:
/* Line 1455 of yacc.c */
-#line 330 "program_parse.y"
+#line 333 "program_parse.y"
{
if ((yyvsp[(1) - (2)].inst) != NULL) {
if (state->inst_tail == NULL) {
case 12:
/* Line 1455 of yacc.c */
-#line 348 "program_parse.y"
+#line 351 "program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumAluInstructions++;
case 13:
/* Line 1455 of yacc.c */
-#line 353 "program_parse.y"
+#line 356 "program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumTexInstructions++;
case 24:
/* Line 1455 of yacc.c */
-#line 374 "program_parse.y"
+#line 377 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
case 25:
/* Line 1455 of yacc.c */
-#line 380 "program_parse.y"
+#line 383 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
case 26:
/* Line 1455 of yacc.c */
-#line 386 "program_parse.y"
+#line 389 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
case 27:
/* Line 1455 of yacc.c */
-#line 392 "program_parse.y"
+#line 395 "program_parse.y"
{
(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);
;}
case 28:
/* Line 1455 of yacc.c */
-#line 399 "program_parse.y"
+#line 402 "program_parse.y"
{
(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);
;}
case 29:
/* Line 1455 of yacc.c */
-#line 406 "program_parse.y"
+#line 409 "program_parse.y"
{
(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));
;}
case 30:
/* Line 1455 of yacc.c */
-#line 412 "program_parse.y"
+#line 415 "program_parse.y"
{
(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) {
case 31:
/* Line 1455 of yacc.c */
-#line 456 "program_parse.y"
+#line 459 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL);
state->fragment.UsesKill = 1;
case 32:
/* Line 1455 of yacc.c */
-#line 461 "program_parse.y"
+#line 464 "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;
case 33:
/* Line 1455 of yacc.c */
-#line 471 "program_parse.y"
+#line 474 "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) {
case 34:
/* Line 1455 of yacc.c */
-#line 515 "program_parse.y"
+#line 518 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
case 35:
/* Line 1455 of yacc.c */
-#line 520 "program_parse.y"
+#line 523 "program_parse.y"
{ (yyval.integer) = TEXTURE_1D_INDEX; ;}
break;
case 36:
/* Line 1455 of yacc.c */
-#line 521 "program_parse.y"
+#line 524 "program_parse.y"
{ (yyval.integer) = TEXTURE_2D_INDEX; ;}
break;
case 37:
/* Line 1455 of yacc.c */
-#line 522 "program_parse.y"
+#line 525 "program_parse.y"
{ (yyval.integer) = TEXTURE_3D_INDEX; ;}
break;
case 38:
/* Line 1455 of yacc.c */
-#line 523 "program_parse.y"
+#line 526 "program_parse.y"
{ (yyval.integer) = TEXTURE_CUBE_INDEX; ;}
break;
case 39:
/* Line 1455 of yacc.c */
-#line 524 "program_parse.y"
+#line 527 "program_parse.y"
{ (yyval.integer) = TEXTURE_RECT_INDEX; ;}
break;
case 40:
/* Line 1455 of yacc.c */
-#line 525 "program_parse.y"
+#line 528 "program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_INDEX; ;}
break;
case 41:
/* Line 1455 of yacc.c */
-#line 526 "program_parse.y"
+#line 529 "program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_INDEX; ;}
break;
case 42:
/* Line 1455 of yacc.c */
-#line 527 "program_parse.y"
+#line 530 "program_parse.y"
{ (yyval.integer) = -TEXTURE_RECT_INDEX; ;}
break;
case 43:
/* Line 1455 of yacc.c */
-#line 528 "program_parse.y"
+#line 531 "program_parse.y"
{ (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;}
break;
case 44:
/* Line 1455 of yacc.c */
-#line 529 "program_parse.y"
+#line 532 "program_parse.y"
{ (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;}
break;
case 45:
/* Line 1455 of yacc.c */
-#line 530 "program_parse.y"
+#line 533 "program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;}
break;
case 46:
/* Line 1455 of yacc.c */
-#line 531 "program_parse.y"
+#line 534 "program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;}
break;
case 47:
/* Line 1455 of yacc.c */
-#line 535 "program_parse.y"
+#line 538 "program_parse.y"
{
/* FIXME: Is this correct? Should the extenedSwizzle be applied
* FIXME: to the existing swizzle?
case 48:
/* Line 1455 of yacc.c */
-#line 547 "program_parse.y"
+#line 550 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (2)].src_reg);
case 49:
/* Line 1455 of yacc.c */
-#line 555 "program_parse.y"
+#line 558 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(3) - (4)].src_reg);
case 50:
/* Line 1455 of yacc.c */
-#line 572 "program_parse.y"
+#line 575 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(1) - (2)].src_reg);
case 51:
/* Line 1455 of yacc.c */
-#line 579 "program_parse.y"
+#line 582 "program_parse.y"
{
struct asm_symbol 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);
+ set_src_reg_swz(& (yyval.src_reg), PROGRAM_CONSTANT,
+ temp_sym.param_binding_begin,
+ temp_sym.param_binding_swizzle);
;}
break;
case 52:
/* Line 1455 of yacc.c */
-#line 596 "program_parse.y"
+#line 601 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (3)].src_reg);
case 53:
/* Line 1455 of yacc.c */
-#line 607 "program_parse.y"
+#line 612 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(3) - (5)].src_reg);
case 54:
/* Line 1455 of yacc.c */
-#line 627 "program_parse.y"
+#line 632 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (3)].dst_reg);
(yyval.dst_reg).WriteMask = (yyvsp[(2) - (3)].swiz_mask).mask;
case 55:
/* Line 1455 of yacc.c */
-#line 652 "program_parse.y"
+#line 657 "program_parse.y"
{
set_dst_reg(& (yyval.dst_reg), PROGRAM_ADDRESS, 0);
(yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask;
case 56:
/* Line 1455 of yacc.c */
-#line 659 "program_parse.y"
+#line 664 "program_parse.y"
{
const unsigned xyzw_valid =
((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0)
case 57:
/* Line 1455 of yacc.c */
-#line 692 "program_parse.y"
+#line 697 "program_parse.y"
{
(yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle);
(yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0;
case 58:
/* Line 1455 of yacc.c */
-#line 699 "program_parse.y"
+#line 704 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector");
case 59:
/* Line 1455 of yacc.c */
-#line 714 "program_parse.y"
+#line 719 "program_parse.y"
{
char s;
case 60:
/* Line 1455 of yacc.c */
-#line 769 "program_parse.y"
+#line 774 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
set_src_reg(& (yyval.src_reg), PROGRAM_TEMPORARY, s->temp_binding);
break;
case at_param:
- set_src_reg(& (yyval.src_reg), s->param_binding_type, s->param_binding_begin);
+ set_src_reg_swz(& (yyval.src_reg), s->param_binding_type,
+ s->param_binding_begin,
+ s->param_binding_swizzle);
break;
case at_attrib:
set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, s->attrib_binding);
case 61:
/* Line 1455 of yacc.c */
-#line 810 "program_parse.y"
+#line 817 "program_parse.y"
{
set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, (yyvsp[(1) - (1)].attrib));
state->prog->InputsRead |= (1U << (yyval.src_reg).Base.Index);
case 62:
/* Line 1455 of yacc.c */
-#line 819 "program_parse.y"
+#line 826 "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)) {
case 63:
/* Line 1455 of yacc.c */
-#line 840 "program_parse.y"
+#line 847 "program_parse.y"
{
gl_register_file file = ((yyvsp[(1) - (1)].temp_sym).name != NULL)
? (yyvsp[(1) - (1)].temp_sym).param_binding_type
: PROGRAM_CONSTANT;
- set_src_reg(& (yyval.src_reg), file, (yyvsp[(1) - (1)].temp_sym).param_binding_begin);
+ set_src_reg_swz(& (yyval.src_reg), file, (yyvsp[(1) - (1)].temp_sym).param_binding_begin,
+ (yyvsp[(1) - (1)].temp_sym).param_binding_swizzle);
;}
break;
case 64:
/* Line 1455 of yacc.c */
-#line 849 "program_parse.y"
+#line 857 "program_parse.y"
{
set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, (yyvsp[(1) - (1)].result));
;}
case 65:
/* Line 1455 of yacc.c */
-#line 853 "program_parse.y"
+#line 861 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
case 66:
/* Line 1455 of yacc.c */
-#line 882 "program_parse.y"
+#line 890 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
case 69:
/* Line 1455 of yacc.c */
-#line 903 "program_parse.y"
+#line 911 "program_parse.y"
{
init_src_reg(& (yyval.src_reg));
(yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer);
case 70:
/* Line 1455 of yacc.c */
-#line 910 "program_parse.y"
+#line 918 "program_parse.y"
{
/* FINISHME: Add support for multiple address registers.
*/
case 71:
/* Line 1455 of yacc.c */
-#line 921 "program_parse.y"
+#line 929 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 72:
/* Line 1455 of yacc.c */
-#line 922 "program_parse.y"
+#line 930 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
case 73:
/* Line 1455 of yacc.c */
-#line 923 "program_parse.y"
+#line 931 "program_parse.y"
{ (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}
break;
case 74:
/* Line 1455 of yacc.c */
-#line 927 "program_parse.y"
+#line 935 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) {
char s[100];
case 75:
/* Line 1455 of yacc.c */
-#line 941 "program_parse.y"
+#line 949 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) {
char s[100];
case 76:
/* Line 1455 of yacc.c */
-#line 955 "program_parse.y"
+#line 963 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
case 77:
/* Line 1455 of yacc.c */
-#line 975 "program_parse.y"
+#line 983 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector");
case 78:
/* Line 1455 of yacc.c */
-#line 986 "program_parse.y"
+#line 994 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state,
case 83:
/* Line 1455 of yacc.c */
-#line 1002 "program_parse.y"
+#line 1010 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 88:
/* Line 1455 of yacc.c */
-#line 1006 "program_parse.y"
+#line 1014 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 89:
/* Line 1455 of yacc.c */
-#line 1010 "program_parse.y"
+#line 1018 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg);
;}
case 90:
/* Line 1455 of yacc.c */
-#line 1014 "program_parse.y"
+#line 1022 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg);
;}
case 91:
/* Line 1455 of yacc.c */
-#line 1018 "program_parse.y"
+#line 1026 "program_parse.y"
{
(yyval.dst_reg).CondMask = COND_TR;
(yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP;
case 92:
/* Line 1455 of yacc.c */
-#line 1026 "program_parse.y"
+#line 1034 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
(yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle;
case 93:
/* Line 1455 of yacc.c */
-#line 1033 "program_parse.y"
+#line 1041 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
(yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle;
case 94:
/* Line 1455 of yacc.c */
-#line 1040 "program_parse.y"
+#line 1048 "program_parse.y"
{
const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string));
if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) {
case 95:
/* Line 1455 of yacc.c */
-#line 1063 "program_parse.y"
+#line 1071 "program_parse.y"
{
const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string));
if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) {
case 102:
/* Line 1455 of yacc.c */
-#line 1094 "program_parse.y"
+#line 1102 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)]));
case 103:
/* Line 1455 of yacc.c */
-#line 1113 "program_parse.y"
+#line 1121 "program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
case 104:
/* Line 1455 of yacc.c */
-#line 1117 "program_parse.y"
+#line 1125 "program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
case 105:
/* Line 1455 of yacc.c */
-#line 1123 "program_parse.y"
+#line 1131 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_POS;
;}
case 106:
/* Line 1455 of yacc.c */
-#line 1127 "program_parse.y"
+#line 1135 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_WEIGHT;
;}
case 107:
/* Line 1455 of yacc.c */
-#line 1131 "program_parse.y"
+#line 1139 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_NORMAL;
;}
case 108:
/* Line 1455 of yacc.c */
-#line 1135 "program_parse.y"
+#line 1143 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_secondary_color) {
yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported");
case 109:
/* Line 1455 of yacc.c */
-#line 1144 "program_parse.y"
+#line 1152 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_fog_coord) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported");
case 110:
/* Line 1455 of yacc.c */
-#line 1153 "program_parse.y"
+#line 1161 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
case 111:
/* Line 1455 of yacc.c */
-#line 1157 "program_parse.y"
+#line 1165 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
case 112:
/* Line 1455 of yacc.c */
-#line 1162 "program_parse.y"
+#line 1170 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer);
;}
case 113:
/* Line 1455 of yacc.c */
-#line 1168 "program_parse.y"
+#line 1176 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference");
case 117:
/* Line 1455 of yacc.c */
-#line 1182 "program_parse.y"
+#line 1190 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_WPOS;
;}
case 118:
/* Line 1455 of yacc.c */
-#line 1186 "program_parse.y"
+#line 1194 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer);
;}
case 119:
/* Line 1455 of yacc.c */
-#line 1190 "program_parse.y"
+#line 1198 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_FOGC;
;}
case 120:
/* Line 1455 of yacc.c */
-#line 1194 "program_parse.y"
+#line 1202 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
case 123:
/* Line 1455 of yacc.c */
-#line 1202 "program_parse.y"
+#line 1210 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)]));
s->param_binding_type = (yyvsp[(3) - (3)].temp_sym).param_binding_type;
s->param_binding_begin = (yyvsp[(3) - (3)].temp_sym).param_binding_begin;
s->param_binding_length = (yyvsp[(3) - (3)].temp_sym).param_binding_length;
+ s->param_binding_swizzle = SWIZZLE_XYZW;
s->param_is_array = 0;
}
;}
case 124:
/* Line 1455 of yacc.c */
-#line 1219 "program_parse.y"
+#line 1228 "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));
s->param_binding_type = (yyvsp[(6) - (6)].temp_sym).param_binding_type;
s->param_binding_begin = (yyvsp[(6) - (6)].temp_sym).param_binding_begin;
s->param_binding_length = (yyvsp[(6) - (6)].temp_sym).param_binding_length;
+ s->param_binding_swizzle = SWIZZLE_XYZW;
s->param_is_array = 1;
}
}
case 125:
/* Line 1455 of yacc.c */
-#line 1243 "program_parse.y"
+#line 1253 "program_parse.y"
{
(yyval.integer) = 0;
;}
case 126:
/* Line 1455 of yacc.c */
-#line 1247 "program_parse.y"
+#line 1257 "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");
case 127:
/* Line 1455 of yacc.c */
-#line 1258 "program_parse.y"
+#line 1268 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym);
;}
case 128:
/* Line 1455 of yacc.c */
-#line 1264 "program_parse.y"
+#line 1274 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym);
;}
case 130:
/* Line 1455 of yacc.c */
-#line 1271 "program_parse.y"
+#line 1281 "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);
case 131:
/* Line 1455 of yacc.c */
-#line 1278 "program_parse.y"
+#line 1288 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 132:
/* Line 1455 of yacc.c */
-#line 1284 "program_parse.y"
+#line 1294 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 133:
/* Line 1455 of yacc.c */
-#line 1290 "program_parse.y"
+#line 1300 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 134:
/* Line 1455 of yacc.c */
-#line 1298 "program_parse.y"
+#line 1308 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 135:
/* Line 1455 of yacc.c */
-#line 1304 "program_parse.y"
+#line 1314 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 136:
/* Line 1455 of yacc.c */
-#line 1310 "program_parse.y"
+#line 1320 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 137:
/* Line 1455 of yacc.c */
-#line 1318 "program_parse.y"
+#line 1328 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 138:
/* Line 1455 of yacc.c */
-#line 1324 "program_parse.y"
+#line 1334 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 139:
/* Line 1455 of yacc.c */
-#line 1330 "program_parse.y"
+#line 1340 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 140:
/* Line 1455 of yacc.c */
-#line 1337 "program_parse.y"
+#line 1347 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;}
break;
case 141:
/* Line 1455 of yacc.c */
-#line 1338 "program_parse.y"
+#line 1348 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 142:
/* Line 1455 of yacc.c */
-#line 1341 "program_parse.y"
+#line 1351 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 143:
/* Line 1455 of yacc.c */
-#line 1342 "program_parse.y"
+#line 1352 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 144:
/* Line 1455 of yacc.c */
-#line 1343 "program_parse.y"
+#line 1353 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 145:
/* Line 1455 of yacc.c */
-#line 1344 "program_parse.y"
+#line 1354 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 146:
/* Line 1455 of yacc.c */
-#line 1345 "program_parse.y"
+#line 1355 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 147:
/* Line 1455 of yacc.c */
-#line 1346 "program_parse.y"
+#line 1356 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 148:
/* Line 1455 of yacc.c */
-#line 1347 "program_parse.y"
+#line 1357 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 149:
/* Line 1455 of yacc.c */
-#line 1348 "program_parse.y"
+#line 1358 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 150:
/* Line 1455 of yacc.c */
-#line 1349 "program_parse.y"
+#line 1359 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 151:
/* Line 1455 of yacc.c */
-#line 1350 "program_parse.y"
+#line 1360 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 152:
/* Line 1455 of yacc.c */
-#line 1351 "program_parse.y"
+#line 1361 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 153:
/* Line 1455 of yacc.c */
-#line 1355 "program_parse.y"
+#line 1365 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_MATERIAL;
case 154:
/* Line 1455 of yacc.c */
-#line 1364 "program_parse.y"
+#line 1374 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
case 155:
/* Line 1455 of yacc.c */
-#line 1368 "program_parse.y"
+#line 1378 "program_parse.y"
{
(yyval.integer) = STATE_EMISSION;
;}
case 156:
/* Line 1455 of yacc.c */
-#line 1372 "program_parse.y"
+#line 1382 "program_parse.y"
{
(yyval.integer) = STATE_SHININESS;
;}
case 157:
/* Line 1455 of yacc.c */
-#line 1378 "program_parse.y"
+#line 1388 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHT;
case 158:
/* Line 1455 of yacc.c */
-#line 1387 "program_parse.y"
+#line 1397 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
case 159:
/* Line 1455 of yacc.c */
-#line 1391 "program_parse.y"
+#line 1401 "program_parse.y"
{
(yyval.integer) = STATE_POSITION;
;}
case 160:
/* Line 1455 of yacc.c */
-#line 1395 "program_parse.y"
+#line 1405 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_point_parameters) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported");
case 161:
/* Line 1455 of yacc.c */
-#line 1404 "program_parse.y"
+#line 1414 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
case 162:
/* Line 1455 of yacc.c */
-#line 1408 "program_parse.y"
+#line 1418 "program_parse.y"
{
(yyval.integer) = STATE_HALF_VECTOR;
;}
case 163:
/* Line 1455 of yacc.c */
-#line 1414 "program_parse.y"
+#line 1424 "program_parse.y"
{
(yyval.integer) = STATE_SPOT_DIRECTION;
;}
case 164:
/* Line 1455 of yacc.c */
-#line 1420 "program_parse.y"
+#line 1430 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (2)].state)[1];
case 165:
/* Line 1455 of yacc.c */
-#line 1427 "program_parse.y"
+#line 1437 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT;
case 166:
/* Line 1455 of yacc.c */
-#line 1432 "program_parse.y"
+#line 1442 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR;
case 167:
/* Line 1455 of yacc.c */
-#line 1440 "program_parse.y"
+#line 1450 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTPROD;
case 169:
/* Line 1455 of yacc.c */
-#line 1452 "program_parse.y"
+#line 1462 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(3) - (3)].integer);
case 170:
/* Line 1455 of yacc.c */
-#line 1460 "program_parse.y"
+#line 1470 "program_parse.y"
{
(yyval.integer) = STATE_TEXENV_COLOR;
;}
case 171:
/* Line 1455 of yacc.c */
-#line 1466 "program_parse.y"
+#line 1476 "program_parse.y"
{
(yyval.integer) = STATE_AMBIENT;
;}
case 172:
/* Line 1455 of yacc.c */
-#line 1470 "program_parse.y"
+#line 1480 "program_parse.y"
{
(yyval.integer) = STATE_DIFFUSE;
;}
case 173:
/* Line 1455 of yacc.c */
-#line 1474 "program_parse.y"
+#line 1484 "program_parse.y"
{
(yyval.integer) = STATE_SPECULAR;
;}
case 174:
/* Line 1455 of yacc.c */
-#line 1480 "program_parse.y"
+#line 1490 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector");
case 175:
/* Line 1455 of yacc.c */
-#line 1491 "program_parse.y"
+#line 1501 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_TEXGEN;
case 176:
/* Line 1455 of yacc.c */
-#line 1500 "program_parse.y"
+#line 1510 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S;
;}
case 177:
/* Line 1455 of yacc.c */
-#line 1504 "program_parse.y"
+#line 1514 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_OBJECT_S;
;}
case 178:
/* Line 1455 of yacc.c */
-#line 1509 "program_parse.y"
+#line 1519 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S;
;}
case 179:
/* Line 1455 of yacc.c */
-#line 1513 "program_parse.y"
+#line 1523 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S;
;}
case 180:
/* Line 1455 of yacc.c */
-#line 1517 "program_parse.y"
+#line 1527 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S;
;}
case 181:
/* Line 1455 of yacc.c */
-#line 1521 "program_parse.y"
+#line 1531 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S;
;}
case 182:
/* Line 1455 of yacc.c */
-#line 1527 "program_parse.y"
+#line 1537 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
case 183:
/* Line 1455 of yacc.c */
-#line 1534 "program_parse.y"
+#line 1544 "program_parse.y"
{
(yyval.integer) = STATE_FOG_COLOR;
;}
case 184:
/* Line 1455 of yacc.c */
-#line 1538 "program_parse.y"
+#line 1548 "program_parse.y"
{
(yyval.integer) = STATE_FOG_PARAMS;
;}
case 185:
/* Line 1455 of yacc.c */
-#line 1544 "program_parse.y"
+#line 1554 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_CLIPPLANE;
case 186:
/* Line 1455 of yacc.c */
-#line 1552 "program_parse.y"
+#line 1562 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector");
case 187:
/* Line 1455 of yacc.c */
-#line 1563 "program_parse.y"
+#line 1573 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
case 188:
/* Line 1455 of yacc.c */
-#line 1570 "program_parse.y"
+#line 1580 "program_parse.y"
{
(yyval.integer) = STATE_POINT_SIZE;
;}
case 189:
/* Line 1455 of yacc.c */
-#line 1574 "program_parse.y"
+#line 1584 "program_parse.y"
{
(yyval.integer) = STATE_POINT_ATTENUATION;
;}
case 190:
/* Line 1455 of yacc.c */
-#line 1580 "program_parse.y"
+#line 1590 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (5)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (5)].state)[1];
case 191:
/* Line 1455 of yacc.c */
-#line 1590 "program_parse.y"
+#line 1600 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (2)].state)[1];
case 192:
/* Line 1455 of yacc.c */
-#line 1600 "program_parse.y"
+#line 1610 "program_parse.y"
{
(yyval.state)[2] = 0;
(yyval.state)[3] = 3;
case 193:
/* Line 1455 of yacc.c */
-#line 1605 "program_parse.y"
+#line 1615 "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).
case 194:
/* Line 1455 of yacc.c */
-#line 1623 "program_parse.y"
+#line 1633 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (3)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (3)].state)[1];
case 195:
/* Line 1455 of yacc.c */
-#line 1631 "program_parse.y"
+#line 1641 "program_parse.y"
{
(yyval.integer) = 0;
;}
case 196:
/* Line 1455 of yacc.c */
-#line 1635 "program_parse.y"
+#line 1645 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
case 197:
/* Line 1455 of yacc.c */
-#line 1641 "program_parse.y"
+#line 1651 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVERSE;
;}
case 198:
/* Line 1455 of yacc.c */
-#line 1645 "program_parse.y"
+#line 1655 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_TRANSPOSE;
;}
case 199:
/* Line 1455 of yacc.c */
-#line 1649 "program_parse.y"
+#line 1659 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVTRANS;
;}
case 200:
/* Line 1455 of yacc.c */
-#line 1655 "program_parse.y"
+#line 1665 "program_parse.y"
{
if ((yyvsp[(1) - (1)].integer) > 3) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference");
case 201:
/* Line 1455 of yacc.c */
-#line 1666 "program_parse.y"
+#line 1676 "program_parse.y"
{
(yyval.state)[0] = STATE_MODELVIEW_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
case 202:
/* Line 1455 of yacc.c */
-#line 1671 "program_parse.y"
+#line 1681 "program_parse.y"
{
(yyval.state)[0] = STATE_PROJECTION_MATRIX;
(yyval.state)[1] = 0;
case 203:
/* Line 1455 of yacc.c */
-#line 1676 "program_parse.y"
+#line 1686 "program_parse.y"
{
(yyval.state)[0] = STATE_MVP_MATRIX;
(yyval.state)[1] = 0;
case 204:
/* Line 1455 of yacc.c */
-#line 1681 "program_parse.y"
+#line 1691 "program_parse.y"
{
(yyval.state)[0] = STATE_TEXTURE_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
case 205:
/* Line 1455 of yacc.c */
-#line 1686 "program_parse.y"
+#line 1696 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
case 206:
/* Line 1455 of yacc.c */
-#line 1691 "program_parse.y"
+#line 1701 "program_parse.y"
{
(yyval.state)[0] = STATE_PROGRAM_MATRIX;
(yyval.state)[1] = (yyvsp[(3) - (4)].integer);
case 207:
/* Line 1455 of yacc.c */
-#line 1698 "program_parse.y"
+#line 1708 "program_parse.y"
{
(yyval.integer) = 0;
;}
case 208:
/* Line 1455 of yacc.c */
-#line 1702 "program_parse.y"
+#line 1712 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (3)].integer);
;}
case 209:
/* Line 1455 of yacc.c */
-#line 1707 "program_parse.y"
+#line 1717 "program_parse.y"
{
/* Since GL_ARB_vertex_blend isn't supported, only modelview matrix
* zero is valid.
case 210:
/* Line 1455 of yacc.c */
-#line 1720 "program_parse.y"
+#line 1730 "program_parse.y"
{
/* Since GL_ARB_matrix_palette isn't supported, just let any value
* through here. The error will be generated later.
case 211:
/* Line 1455 of yacc.c */
-#line 1728 "program_parse.y"
+#line 1738 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector");
case 212:
/* Line 1455 of yacc.c */
-#line 1739 "program_parse.y"
+#line 1749 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_DEPTH_RANGE;
case 217:
/* Line 1455 of yacc.c */
-#line 1751 "program_parse.y"
+#line 1761 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
case 218:
/* Line 1455 of yacc.c */
-#line 1761 "program_parse.y"
+#line 1771 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
case 219:
/* Line 1455 of yacc.c */
-#line 1766 "program_parse.y"
+#line 1776 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
case 220:
/* Line 1455 of yacc.c */
-#line 1773 "program_parse.y"
+#line 1783 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
case 221:
/* Line 1455 of yacc.c */
-#line 1783 "program_parse.y"
+#line 1793 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
case 222:
/* Line 1455 of yacc.c */
-#line 1792 "program_parse.y"
+#line 1802 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
case 223:
/* Line 1455 of yacc.c */
-#line 1797 "program_parse.y"
+#line 1807 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
case 224:
/* Line 1455 of yacc.c */
-#line 1804 "program_parse.y"
+#line 1814 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
case 225:
/* Line 1455 of yacc.c */
-#line 1814 "program_parse.y"
+#line 1824 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference");
case 226:
/* Line 1455 of yacc.c */
-#line 1824 "program_parse.y"
+#line 1834 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference");
case 231:
/* Line 1455 of yacc.c */
-#line 1839 "program_parse.y"
+#line 1849 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
case 232:
/* Line 1455 of yacc.c */
-#line 1849 "program_parse.y"
+#line 1859 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
case 233:
/* Line 1455 of yacc.c */
-#line 1857 "program_parse.y"
+#line 1867 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer);
case 234:
/* Line 1455 of yacc.c */
-#line 1867 "program_parse.y"
+#line 1877 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (3)].real);
case 235:
/* Line 1455 of yacc.c */
-#line 1875 "program_parse.y"
+#line 1885 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (5)].real);
case 236:
/* Line 1455 of yacc.c */
-#line 1884 "program_parse.y"
+#line 1894 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (7)].real);
case 237:
/* Line 1455 of yacc.c */
-#line 1893 "program_parse.y"
+#line 1903 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (9)].real);
case 238:
/* Line 1455 of yacc.c */
-#line 1903 "program_parse.y"
+#line 1913 "program_parse.y"
{
(yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real);
;}
case 239:
/* Line 1455 of yacc.c */
-#line 1907 "program_parse.y"
+#line 1917 "program_parse.y"
{
(yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer));
;}
case 240:
/* Line 1455 of yacc.c */
-#line 1912 "program_parse.y"
+#line 1922 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 241:
/* Line 1455 of yacc.c */
-#line 1913 "program_parse.y"
+#line 1923 "program_parse.y"
{ (yyval.negate) = TRUE; ;}
break;
case 242:
/* Line 1455 of yacc.c */
-#line 1914 "program_parse.y"
+#line 1924 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 243:
/* Line 1455 of yacc.c */
-#line 1917 "program_parse.y"
+#line 1927 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
case 245:
/* Line 1455 of yacc.c */
-#line 1921 "program_parse.y"
+#line 1931 "program_parse.y"
{
/* NV_fragment_program_option defines the size qualifiers in a
* fairly broken way. "SHORT" or "LONG" can optionally be used
case 246:
/* Line 1455 of yacc.c */
-#line 1955 "program_parse.y"
+#line 1965 "program_parse.y"
{
;}
break;
case 247:
/* Line 1455 of yacc.c */
-#line 1959 "program_parse.y"
+#line 1969 "program_parse.y"
{ (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
break;
case 249:
/* Line 1455 of yacc.c */
-#line 1963 "program_parse.y"
+#line 1973 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) {
free((yyvsp[(3) - (3)].string));
case 250:
/* Line 1455 of yacc.c */
-#line 1970 "program_parse.y"
+#line 1980 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) {
free((yyvsp[(1) - (1)].string));
case 251:
/* Line 1455 of yacc.c */
-#line 1979 "program_parse.y"
+#line 1989 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)]));
case 252:
/* Line 1455 of yacc.c */
-#line 1993 "program_parse.y"
+#line 2003 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_HPOS;
case 253:
/* Line 1455 of yacc.c */
-#line 2002 "program_parse.y"
+#line 2012 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_FOGC;
case 254:
/* Line 1455 of yacc.c */
-#line 2011 "program_parse.y"
+#line 2021 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (2)].result);
;}
case 255:
/* Line 1455 of yacc.c */
-#line 2015 "program_parse.y"
+#line 2025 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_PSIZ;
case 256:
/* Line 1455 of yacc.c */
-#line 2024 "program_parse.y"
+#line 2034 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer);
case 257:
/* Line 1455 of yacc.c */
-#line 2033 "program_parse.y"
+#line 2043 "program_parse.y"
{
if (state->mode == ARB_fragment) {
(yyval.result) = FRAG_RESULT_DEPTH;
case 258:
/* Line 1455 of yacc.c */
-#line 2044 "program_parse.y"
+#line 2054 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer);
;}
case 259:
/* Line 1455 of yacc.c */
-#line 2050 "program_parse.y"
+#line 2060 "program_parse.y"
{
(yyval.integer) = (state->mode == ARB_vertex)
? VERT_RESULT_COL0
case 260:
/* Line 1455 of yacc.c */
-#line 2056 "program_parse.y"
+#line 2066 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_COL0;
case 261:
/* Line 1455 of yacc.c */
-#line 2065 "program_parse.y"
+#line 2075 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_BFC0;
case 262:
/* Line 1455 of yacc.c */
-#line 2076 "program_parse.y"
+#line 2086 "program_parse.y"
{
(yyval.integer) = 0;
;}
case 263:
/* Line 1455 of yacc.c */
-#line 2080 "program_parse.y"
+#line 2090 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 0;
case 264:
/* Line 1455 of yacc.c */
-#line 2089 "program_parse.y"
+#line 2099 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 1;
case 265:
/* Line 1455 of yacc.c */
-#line 2099 "program_parse.y"
+#line 2109 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 266:
/* Line 1455 of yacc.c */
-#line 2100 "program_parse.y"
+#line 2110 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 267:
/* Line 1455 of yacc.c */
-#line 2101 "program_parse.y"
+#line 2111 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 268:
/* Line 1455 of yacc.c */
-#line 2104 "program_parse.y"
+#line 2114 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 269:
/* Line 1455 of yacc.c */
-#line 2105 "program_parse.y"
+#line 2115 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 270:
/* Line 1455 of yacc.c */
-#line 2106 "program_parse.y"
+#line 2116 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 271:
/* Line 1455 of yacc.c */
-#line 2109 "program_parse.y"
+#line 2119 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 272:
/* Line 1455 of yacc.c */
-#line 2110 "program_parse.y"
+#line 2120 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 273:
/* Line 1455 of yacc.c */
-#line 2113 "program_parse.y"
+#line 2123 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 274:
/* Line 1455 of yacc.c */
-#line 2114 "program_parse.y"
+#line 2124 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 275:
/* Line 1455 of yacc.c */
-#line 2117 "program_parse.y"
+#line 2127 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 276:
/* Line 1455 of yacc.c */
-#line 2118 "program_parse.y"
+#line 2128 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 277:
/* Line 1455 of yacc.c */
-#line 2122 "program_parse.y"
+#line 2132 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector");
case 278:
/* Line 1455 of yacc.c */
-#line 2133 "program_parse.y"
+#line 2143 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector");
case 279:
/* Line 1455 of yacc.c */
-#line 2144 "program_parse.y"
+#line 2154 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector");
case 280:
/* Line 1455 of yacc.c */
-#line 2155 "program_parse.y"
+#line 2165 "program_parse.y"
{
struct asm_symbol *exist = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string));
/* Line 1455 of yacc.c */
-#line 4926 "program_parse.tab.c"
+#line 4936 "program_parse.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
/* Line 1675 of yacc.c */
-#line 2184 "program_parse.y"
+#line 2194 "program_parse.y"
void
}
-/** Like init_src_reg() but set the File and Index fields. */
+/** Like init_src_reg() but set the File and Index fields.
+ * \return GL_TRUE if a valid src register, GL_FALSE otherwise
+ */
void
set_src_reg(struct asm_src_register *r, gl_register_file file, GLint index)
+{
+ set_src_reg_swz(r, file, index, SWIZZLE_XYZW);
+}
+
+
+void
+set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index,
+ GLuint swizzle)
{
const GLint maxIndex = (1 << INST_INDEX_BITS) - 1;
const GLint minIndex = -(1 << INST_INDEX_BITS);
+ ASSERT(file < PROGRAM_FILE_MAX);
ASSERT(index >= minIndex);
ASSERT(index <= maxIndex);
- ASSERT(file < PROGRAM_FILE_MAX);
memset(r, 0, sizeof(*r));
r->Base.File = file;
r->Base.Index = index;
- r->Base.Swizzle = SWIZZLE_NOOP;
+ r->Base.Swizzle = swizzle;
r->Symbol = NULL;
}
state_tokens[2] = state_tokens[3] = row;
idx = add_state_reference(prog->Parameters, state_tokens);
- if (param_var->param_binding_begin == ~0U)
+ if (param_var->param_binding_begin == ~0U) {
param_var->param_binding_begin = idx;
+ param_var->param_binding_swizzle = SWIZZLE_XYZW;
+ }
+
param_var->param_binding_length++;
}
}
else {
idx = add_state_reference(prog->Parameters, state_tokens);
- if (param_var->param_binding_begin == ~0U)
+ if (param_var->param_binding_begin == ~0U) {
param_var->param_binding_begin = idx;
+ param_var->param_binding_swizzle = SWIZZLE_XYZW;
+ }
param_var->param_binding_length++;
}
state_tokens[2] = state_tokens[3] = row;
idx = add_state_reference(prog->Parameters, state_tokens);
- if (param_var->param_binding_begin == ~0U)
+ if (param_var->param_binding_begin == ~0U) {
param_var->param_binding_begin = idx;
+ param_var->param_binding_swizzle = SWIZZLE_XYZW;
+ }
param_var->param_binding_length++;
}
}
else {
idx = add_state_reference(prog->Parameters, state_tokens);
- if (param_var->param_binding_begin == ~0U)
+ if (param_var->param_binding_begin == ~0U) {
param_var->param_binding_begin = idx;
+ param_var->param_binding_swizzle = SWIZZLE_XYZW;
+ }
param_var->param_binding_length++;
}
}
+/**
+ * Put a float/vector constant/literal into the parameter list.
+ * \param param_var returns info about the parameter/constant's location,
+ * binding, type, etc.
+ * \param vec the vector/constant to add
+ * \return index of the constant in the parameter list.
+ */
int
initialize_symbol_from_const(struct gl_program *prog,
struct asm_symbol *param_var,
const struct asm_vector *vec)
{
- const int idx = _mesa_add_parameter(prog->Parameters, PROGRAM_CONSTANT,
- NULL, vec->count, GL_NONE, vec->data,
- NULL, 0x0);
+ unsigned swizzle;
+ const int idx = _mesa_add_unnamed_constant(prog->Parameters,
+ vec->data, vec->count, &swizzle);
param_var->type = at_param;
param_var->param_binding_type = PROGRAM_CONSTANT;
- if (param_var->param_binding_begin == ~0U)
+ if (param_var->param_binding_begin == ~0U) {
param_var->param_binding_begin = idx;
+ param_var->param_binding_swizzle = swizzle;
+ }
param_var->param_binding_length++;
return idx;