/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 256, 256, 259, 267, 279, 280, 283, 305, 306,
- 309, 324, 327, 332, 339, 340, 341, 342, 343, 344,
- 345, 348, 349, 352, 358, 365, 372, 380, 387, 395,
- 440, 447, 453, 454, 455, 456, 457, 458, 459, 460,
- 461, 462, 463, 464, 467, 480, 493, 506, 528, 537,
- 570, 577, 592, 642, 684, 695, 716, 726, 732, 763,
- 780, 780, 782, 789, 801, 802, 803, 806, 818, 830,
- 848, 859, 871, 873, 874, 875, 876, 879, 879, 879,
- 879, 880, 883, 884, 885, 886, 887, 888, 891, 909,
- 913, 919, 923, 927, 931, 940, 949, 953, 958, 964,
- 975, 975, 976, 978, 982, 986, 990, 996, 996, 998,
- 1014, 1037, 1040, 1051, 1057, 1063, 1064, 1071, 1077, 1083,
- 1091, 1097, 1103, 1111, 1117, 1123, 1131, 1132, 1135, 1136,
- 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1148,
- 1157, 1161, 1165, 1171, 1180, 1184, 1188, 1197, 1201, 1207,
- 1213, 1220, 1225, 1233, 1243, 1245, 1253, 1259, 1263, 1267,
- 1273, 1284, 1293, 1297, 1302, 1306, 1310, 1314, 1320, 1327,
- 1331, 1337, 1345, 1356, 1363, 1367, 1373, 1383, 1394, 1398,
- 1416, 1425, 1428, 1434, 1438, 1442, 1448, 1459, 1464, 1469,
- 1474, 1479, 1484, 1492, 1495, 1500, 1513, 1521, 1532, 1540,
- 1540, 1542, 1542, 1544, 1554, 1559, 1566, 1576, 1585, 1590,
- 1597, 1607, 1617, 1629, 1629, 1630, 1630, 1632, 1642, 1650,
- 1660, 1668, 1676, 1685, 1696, 1700, 1706, 1707, 1708, 1711,
- 1711, 1714, 1714, 1717, 1723, 1731, 1744, 1753, 1762, 1766,
- 1775, 1784, 1795, 1802, 1807, 1816, 1828, 1831, 1840, 1851,
- 1852, 1853, 1856, 1857, 1858, 1861, 1862, 1865, 1866, 1869,
- 1870, 1873, 1884, 1895, 1906
+ 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
};
#endif
}
+ free((yyvsp[(2) - (3)].string));
+
if (!valid) {
const char *const err_str = (state->mode == ARB_vertex)
? "invalid ARB vertex program option"
case 10:
/* Line 1455 of yacc.c */
-#line 310 "program_parse.y"
+#line 312 "program_parse.y"
{
if ((yyvsp[(1) - (2)].inst) != NULL) {
if (state->inst_tail == NULL) {
case 12:
/* Line 1455 of yacc.c */
-#line 328 "program_parse.y"
+#line 330 "program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumAluInstructions++;
case 13:
/* Line 1455 of yacc.c */
-#line 333 "program_parse.y"
+#line 335 "program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumTexInstructions++;
case 23:
/* Line 1455 of yacc.c */
-#line 353 "program_parse.y"
+#line 355 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
case 24:
/* Line 1455 of yacc.c */
-#line 359 "program_parse.y"
+#line 361 "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;
case 25:
/* Line 1455 of yacc.c */
-#line 366 "program_parse.y"
+#line 368 "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;
case 26:
/* Line 1455 of yacc.c */
-#line 373 "program_parse.y"
+#line 375 "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;
case 27:
/* Line 1455 of yacc.c */
-#line 381 "program_parse.y"
+#line 383 "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;
case 28:
/* Line 1455 of yacc.c */
-#line 389 "program_parse.y"
+#line 391 "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;
case 29:
/* Line 1455 of yacc.c */
-#line 396 "program_parse.y"
+#line 398 "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);
if ((yyval.inst) != NULL) {
case 30:
/* Line 1455 of yacc.c */
-#line 441 "program_parse.y"
+#line 443 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL);
state->fragment.UsesKill = 1;
case 31:
/* Line 1455 of yacc.c */
-#line 448 "program_parse.y"
+#line 450 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
case 32:
/* Line 1455 of yacc.c */
-#line 453 "program_parse.y"
+#line 455 "program_parse.y"
{ (yyval.integer) = TEXTURE_1D_INDEX; ;}
break;
case 33:
/* Line 1455 of yacc.c */
-#line 454 "program_parse.y"
+#line 456 "program_parse.y"
{ (yyval.integer) = TEXTURE_2D_INDEX; ;}
break;
case 34:
/* Line 1455 of yacc.c */
-#line 455 "program_parse.y"
+#line 457 "program_parse.y"
{ (yyval.integer) = TEXTURE_3D_INDEX; ;}
break;
case 35:
/* Line 1455 of yacc.c */
-#line 456 "program_parse.y"
+#line 458 "program_parse.y"
{ (yyval.integer) = TEXTURE_CUBE_INDEX; ;}
break;
case 36:
/* Line 1455 of yacc.c */
-#line 457 "program_parse.y"
+#line 459 "program_parse.y"
{ (yyval.integer) = TEXTURE_RECT_INDEX; ;}
break;
case 37:
/* Line 1455 of yacc.c */
-#line 458 "program_parse.y"
+#line 460 "program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_INDEX; ;}
break;
case 38:
/* Line 1455 of yacc.c */
-#line 459 "program_parse.y"
+#line 461 "program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_INDEX; ;}
break;
case 39:
/* Line 1455 of yacc.c */
-#line 460 "program_parse.y"
+#line 462 "program_parse.y"
{ (yyval.integer) = -TEXTURE_RECT_INDEX; ;}
break;
case 40:
/* Line 1455 of yacc.c */
-#line 461 "program_parse.y"
+#line 463 "program_parse.y"
{ (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;}
break;
case 41:
/* Line 1455 of yacc.c */
-#line 462 "program_parse.y"
+#line 464 "program_parse.y"
{ (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;}
break;
case 42:
/* Line 1455 of yacc.c */
-#line 463 "program_parse.y"
+#line 465 "program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;}
break;
case 43:
/* Line 1455 of yacc.c */
-#line 464 "program_parse.y"
+#line 466 "program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;}
break;
case 44:
/* Line 1455 of yacc.c */
-#line 468 "program_parse.y"
+#line 470 "program_parse.y"
{
/* FIXME: Is this correct? Should the extenedSwizzle be applied
* FIXME: to the existing swizzle?
case 45:
/* Line 1455 of yacc.c */
-#line 481 "program_parse.y"
+#line 483 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (3)].src_reg);
case 46:
/* Line 1455 of yacc.c */
-#line 494 "program_parse.y"
+#line 496 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (3)].src_reg);
case 47:
/* Line 1455 of yacc.c */
-#line 507 "program_parse.y"
+#line 509 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
(yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask;
case 48:
/* Line 1455 of yacc.c */
-#line 529 "program_parse.y"
+#line 531 "program_parse.y"
{
init_dst_reg(& (yyval.dst_reg));
(yyval.dst_reg).File = PROGRAM_ADDRESS;
case 49:
/* Line 1455 of yacc.c */
-#line 538 "program_parse.y"
+#line 540 "program_parse.y"
{
const unsigned xyzw_valid =
((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0)
case 50:
/* Line 1455 of yacc.c */
-#line 571 "program_parse.y"
+#line 573 "program_parse.y"
{
(yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle);
(yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0;
case 51:
/* Line 1455 of yacc.c */
-#line 578 "program_parse.y"
+#line 580 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector");
case 52:
/* Line 1455 of yacc.c */
-#line 593 "program_parse.y"
+#line 595 "program_parse.y"
{
+ char s;
+
if (strlen((yyvsp[(1) - (1)].string)) > 1) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector");
YYERROR;
}
- switch ((yyvsp[(1) - (1)].string)[0]) {
+ s = (yyvsp[(1) - (1)].string)[0];
+ free((yyvsp[(1) - (1)].string));
+
+ switch (s) {
case 'x':
(yyval.ext_swizzle).swz = SWIZZLE_X;
(yyval.ext_swizzle).xyzw_valid = 1;
case 53:
/* Line 1455 of yacc.c */
-#line 643 "program_parse.y"
+#line 650 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
+ free((yyvsp[(1) - (1)].string));
+
if (s == NULL) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable");
YYERROR;
case 54:
/* Line 1455 of yacc.c */
-#line 685 "program_parse.y"
+#line 694 "program_parse.y"
{
init_src_reg(& (yyval.src_reg));
(yyval.src_reg).Base.File = PROGRAM_INPUT;
case 55:
/* Line 1455 of yacc.c */
-#line 696 "program_parse.y"
+#line 705 "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 56:
/* Line 1455 of yacc.c */
-#line 717 "program_parse.y"
+#line 726 "program_parse.y"
{
init_src_reg(& (yyval.src_reg));
(yyval.src_reg).Base.File = ((yyvsp[(1) - (1)].temp_sym).name != NULL)
case 57:
/* Line 1455 of yacc.c */
-#line 727 "program_parse.y"
+#line 736 "program_parse.y"
{
init_dst_reg(& (yyval.dst_reg));
(yyval.dst_reg).File = PROGRAM_OUTPUT;
case 58:
/* Line 1455 of yacc.c */
-#line 733 "program_parse.y"
+#line 742 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
+ free((yyvsp[(1) - (1)].string));
+
if (s == NULL) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable");
YYERROR;
case 59:
/* Line 1455 of yacc.c */
-#line 764 "program_parse.y"
+#line 775 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
+ free((yyvsp[(1) - (1)].string));
+
if (s == NULL) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable");
YYERROR;
case 62:
/* Line 1455 of yacc.c */
-#line 783 "program_parse.y"
+#line 796 "program_parse.y"
{
init_src_reg(& (yyval.src_reg));
(yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer);
case 63:
/* Line 1455 of yacc.c */
-#line 790 "program_parse.y"
+#line 803 "program_parse.y"
{
/* FINISHME: Add support for multiple address registers.
*/
case 64:
/* Line 1455 of yacc.c */
-#line 801 "program_parse.y"
+#line 814 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 65:
/* Line 1455 of yacc.c */
-#line 802 "program_parse.y"
+#line 815 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
case 66:
/* Line 1455 of yacc.c */
-#line 803 "program_parse.y"
+#line 816 "program_parse.y"
{ (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}
break;
case 67:
/* Line 1455 of yacc.c */
-#line 807 "program_parse.y"
+#line 820 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) {
yyerror(& (yylsp[(1) - (1)]), state,
case 68:
/* Line 1455 of yacc.c */
-#line 819 "program_parse.y"
+#line 832 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) {
yyerror(& (yylsp[(1) - (1)]), state,
case 69:
/* Line 1455 of yacc.c */
-#line 831 "program_parse.y"
+#line 844 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
+ free((yyvsp[(1) - (1)].string));
+
if (s == NULL) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid array member");
YYERROR;
case 70:
/* Line 1455 of yacc.c */
-#line 849 "program_parse.y"
+#line 864 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector");
case 71:
/* Line 1455 of yacc.c */
-#line 860 "program_parse.y"
+#line 875 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state,
case 76:
/* Line 1455 of yacc.c */
-#line 876 "program_parse.y"
+#line 891 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 81:
/* Line 1455 of yacc.c */
-#line 880 "program_parse.y"
+#line 895 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 88:
/* Line 1455 of yacc.c */
-#line 892 "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);
case 89:
/* Line 1455 of yacc.c */
-#line 910 "program_parse.y"
+#line 926 "program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
case 90:
/* Line 1455 of yacc.c */
-#line 914 "program_parse.y"
+#line 930 "program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
case 91:
/* Line 1455 of yacc.c */
-#line 920 "program_parse.y"
+#line 936 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_POS;
;}
case 92:
/* Line 1455 of yacc.c */
-#line 924 "program_parse.y"
+#line 940 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_WEIGHT;
;}
case 93:
/* Line 1455 of yacc.c */
-#line 928 "program_parse.y"
+#line 944 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_NORMAL;
;}
case 94:
/* Line 1455 of yacc.c */
-#line 932 "program_parse.y"
+#line 948 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_secondary_color) {
yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported");
case 95:
/* Line 1455 of yacc.c */
-#line 941 "program_parse.y"
+#line 957 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_fog_coord) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported");
case 96:
/* Line 1455 of yacc.c */
-#line 950 "program_parse.y"
+#line 966 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
case 97:
/* Line 1455 of yacc.c */
-#line 954 "program_parse.y"
+#line 970 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
case 98:
/* Line 1455 of yacc.c */
-#line 959 "program_parse.y"
+#line 975 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer);
;}
case 99:
/* Line 1455 of yacc.c */
-#line 965 "program_parse.y"
+#line 981 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference");
case 103:
/* Line 1455 of yacc.c */
-#line 979 "program_parse.y"
+#line 995 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_WPOS;
;}
case 104:
/* Line 1455 of yacc.c */
-#line 983 "program_parse.y"
+#line 999 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer);
;}
case 105:
/* Line 1455 of yacc.c */
-#line 987 "program_parse.y"
+#line 1003 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_FOGC;
;}
case 106:
/* Line 1455 of yacc.c */
-#line 991 "program_parse.y"
+#line 1007 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
case 109:
/* Line 1455 of yacc.c */
-#line 999 "program_parse.y"
+#line 1015 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)]));
if (s == NULL) {
+ free((yyvsp[(2) - (3)].string));
YYERROR;
} else {
s->param_binding_type = (yyvsp[(3) - (3)].temp_sym).param_binding_type;
case 110:
/* Line 1455 of yacc.c */
-#line 1015 "program_parse.y"
+#line 1032 "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;
declare_variable(state, (yyvsp[(2) - (6)].string), (yyvsp[(6) - (6)].temp_sym).type, & (yylsp[(2) - (6)]));
if (s == NULL) {
+ free((yyvsp[(2) - (6)].string));
YYERROR;
} else {
s->param_binding_type = (yyvsp[(6) - (6)].temp_sym).param_binding_type;
case 111:
/* Line 1455 of yacc.c */
-#line 1037 "program_parse.y"
+#line 1056 "program_parse.y"
{
(yyval.integer) = 0;
;}
case 112:
/* Line 1455 of yacc.c */
-#line 1041 "program_parse.y"
+#line 1060 "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 113:
/* Line 1455 of yacc.c */
-#line 1052 "program_parse.y"
+#line 1071 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym);
;}
case 114:
/* Line 1455 of yacc.c */
-#line 1058 "program_parse.y"
+#line 1077 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym);
;}
case 116:
/* Line 1455 of yacc.c */
-#line 1065 "program_parse.y"
+#line 1084 "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 117:
/* Line 1455 of yacc.c */
-#line 1072 "program_parse.y"
+#line 1091 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 118:
/* Line 1455 of yacc.c */
-#line 1078 "program_parse.y"
+#line 1097 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 119:
/* Line 1455 of yacc.c */
-#line 1084 "program_parse.y"
+#line 1103 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 120:
/* Line 1455 of yacc.c */
-#line 1092 "program_parse.y"
+#line 1111 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 121:
/* Line 1455 of yacc.c */
-#line 1098 "program_parse.y"
+#line 1117 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 122:
/* Line 1455 of yacc.c */
-#line 1104 "program_parse.y"
+#line 1123 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 123:
/* Line 1455 of yacc.c */
-#line 1112 "program_parse.y"
+#line 1131 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 124:
/* Line 1455 of yacc.c */
-#line 1118 "program_parse.y"
+#line 1137 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 125:
/* Line 1455 of yacc.c */
-#line 1124 "program_parse.y"
+#line 1143 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
case 126:
/* Line 1455 of yacc.c */
-#line 1131 "program_parse.y"
+#line 1150 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;}
break;
case 127:
/* Line 1455 of yacc.c */
-#line 1132 "program_parse.y"
+#line 1151 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 128:
/* Line 1455 of yacc.c */
-#line 1135 "program_parse.y"
+#line 1154 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 129:
/* Line 1455 of yacc.c */
-#line 1136 "program_parse.y"
+#line 1155 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 130:
/* Line 1455 of yacc.c */
-#line 1137 "program_parse.y"
+#line 1156 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 131:
/* Line 1455 of yacc.c */
-#line 1138 "program_parse.y"
+#line 1157 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 132:
/* Line 1455 of yacc.c */
-#line 1139 "program_parse.y"
+#line 1158 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 133:
/* Line 1455 of yacc.c */
-#line 1140 "program_parse.y"
+#line 1159 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 134:
/* Line 1455 of yacc.c */
-#line 1141 "program_parse.y"
+#line 1160 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 135:
/* Line 1455 of yacc.c */
-#line 1142 "program_parse.y"
+#line 1161 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 136:
/* Line 1455 of yacc.c */
-#line 1143 "program_parse.y"
+#line 1162 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 137:
/* Line 1455 of yacc.c */
-#line 1144 "program_parse.y"
+#line 1163 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 138:
/* Line 1455 of yacc.c */
-#line 1145 "program_parse.y"
+#line 1164 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 139:
/* Line 1455 of yacc.c */
-#line 1149 "program_parse.y"
+#line 1168 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_MATERIAL;
case 140:
/* Line 1455 of yacc.c */
-#line 1158 "program_parse.y"
+#line 1177 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
case 141:
/* Line 1455 of yacc.c */
-#line 1162 "program_parse.y"
+#line 1181 "program_parse.y"
{
(yyval.integer) = STATE_EMISSION;
;}
case 142:
/* Line 1455 of yacc.c */
-#line 1166 "program_parse.y"
+#line 1185 "program_parse.y"
{
(yyval.integer) = STATE_SHININESS;
;}
case 143:
/* Line 1455 of yacc.c */
-#line 1172 "program_parse.y"
+#line 1191 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHT;
case 144:
/* Line 1455 of yacc.c */
-#line 1181 "program_parse.y"
+#line 1200 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
case 145:
/* Line 1455 of yacc.c */
-#line 1185 "program_parse.y"
+#line 1204 "program_parse.y"
{
(yyval.integer) = STATE_POSITION;
;}
case 146:
/* Line 1455 of yacc.c */
-#line 1189 "program_parse.y"
+#line 1208 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_point_parameters) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported");
case 147:
/* Line 1455 of yacc.c */
-#line 1198 "program_parse.y"
+#line 1217 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
case 148:
/* Line 1455 of yacc.c */
-#line 1202 "program_parse.y"
+#line 1221 "program_parse.y"
{
(yyval.integer) = STATE_HALF_VECTOR;
;}
case 149:
/* Line 1455 of yacc.c */
-#line 1208 "program_parse.y"
+#line 1227 "program_parse.y"
{
(yyval.integer) = STATE_SPOT_DIRECTION;
;}
case 150:
/* Line 1455 of yacc.c */
-#line 1214 "program_parse.y"
+#line 1233 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (2)].state)[1];
case 151:
/* Line 1455 of yacc.c */
-#line 1221 "program_parse.y"
+#line 1240 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT;
case 152:
/* Line 1455 of yacc.c */
-#line 1226 "program_parse.y"
+#line 1245 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR;
case 153:
/* Line 1455 of yacc.c */
-#line 1234 "program_parse.y"
+#line 1253 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTPROD;
case 155:
/* Line 1455 of yacc.c */
-#line 1246 "program_parse.y"
+#line 1265 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(3) - (3)].integer);
case 156:
/* Line 1455 of yacc.c */
-#line 1254 "program_parse.y"
+#line 1273 "program_parse.y"
{
(yyval.integer) = STATE_TEXENV_COLOR;
;}
case 157:
/* Line 1455 of yacc.c */
-#line 1260 "program_parse.y"
+#line 1279 "program_parse.y"
{
(yyval.integer) = STATE_AMBIENT;
;}
case 158:
/* Line 1455 of yacc.c */
-#line 1264 "program_parse.y"
+#line 1283 "program_parse.y"
{
(yyval.integer) = STATE_DIFFUSE;
;}
case 159:
/* Line 1455 of yacc.c */
-#line 1268 "program_parse.y"
+#line 1287 "program_parse.y"
{
(yyval.integer) = STATE_SPECULAR;
;}
case 160:
/* Line 1455 of yacc.c */
-#line 1274 "program_parse.y"
+#line 1293 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector");
case 161:
/* Line 1455 of yacc.c */
-#line 1285 "program_parse.y"
+#line 1304 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_TEXGEN;
case 162:
/* Line 1455 of yacc.c */
-#line 1294 "program_parse.y"
+#line 1313 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S;
;}
case 163:
/* Line 1455 of yacc.c */
-#line 1298 "program_parse.y"
+#line 1317 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_OBJECT_S;
;}
case 164:
/* Line 1455 of yacc.c */
-#line 1303 "program_parse.y"
+#line 1322 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S;
;}
case 165:
/* Line 1455 of yacc.c */
-#line 1307 "program_parse.y"
+#line 1326 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S;
;}
case 166:
/* Line 1455 of yacc.c */
-#line 1311 "program_parse.y"
+#line 1330 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S;
;}
case 167:
/* Line 1455 of yacc.c */
-#line 1315 "program_parse.y"
+#line 1334 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S;
;}
case 168:
/* Line 1455 of yacc.c */
-#line 1321 "program_parse.y"
+#line 1340 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
case 169:
/* Line 1455 of yacc.c */
-#line 1328 "program_parse.y"
+#line 1347 "program_parse.y"
{
(yyval.integer) = STATE_FOG_COLOR;
;}
case 170:
/* Line 1455 of yacc.c */
-#line 1332 "program_parse.y"
+#line 1351 "program_parse.y"
{
(yyval.integer) = STATE_FOG_PARAMS;
;}
case 171:
/* Line 1455 of yacc.c */
-#line 1338 "program_parse.y"
+#line 1357 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_CLIPPLANE;
case 172:
/* Line 1455 of yacc.c */
-#line 1346 "program_parse.y"
+#line 1365 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector");
case 173:
/* Line 1455 of yacc.c */
-#line 1357 "program_parse.y"
+#line 1376 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
case 174:
/* Line 1455 of yacc.c */
-#line 1364 "program_parse.y"
+#line 1383 "program_parse.y"
{
(yyval.integer) = STATE_POINT_SIZE;
;}
case 175:
/* Line 1455 of yacc.c */
-#line 1368 "program_parse.y"
+#line 1387 "program_parse.y"
{
(yyval.integer) = STATE_POINT_ATTENUATION;
;}
case 176:
/* Line 1455 of yacc.c */
-#line 1374 "program_parse.y"
+#line 1393 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (5)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (5)].state)[1];
case 177:
/* Line 1455 of yacc.c */
-#line 1384 "program_parse.y"
+#line 1403 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (2)].state)[1];
case 178:
/* Line 1455 of yacc.c */
-#line 1394 "program_parse.y"
+#line 1413 "program_parse.y"
{
(yyval.state)[2] = 0;
(yyval.state)[3] = 3;
case 179:
/* Line 1455 of yacc.c */
-#line 1399 "program_parse.y"
+#line 1418 "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 180:
/* Line 1455 of yacc.c */
-#line 1417 "program_parse.y"
+#line 1436 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (3)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (3)].state)[1];
case 181:
/* Line 1455 of yacc.c */
-#line 1425 "program_parse.y"
+#line 1444 "program_parse.y"
{
(yyval.integer) = 0;
;}
case 182:
/* Line 1455 of yacc.c */
-#line 1429 "program_parse.y"
+#line 1448 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
case 183:
/* Line 1455 of yacc.c */
-#line 1435 "program_parse.y"
+#line 1454 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVERSE;
;}
case 184:
/* Line 1455 of yacc.c */
-#line 1439 "program_parse.y"
+#line 1458 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_TRANSPOSE;
;}
case 185:
/* Line 1455 of yacc.c */
-#line 1443 "program_parse.y"
+#line 1462 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVTRANS;
;}
case 186:
/* Line 1455 of yacc.c */
-#line 1449 "program_parse.y"
+#line 1468 "program_parse.y"
{
if ((yyvsp[(1) - (1)].integer) > 3) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference");
case 187:
/* Line 1455 of yacc.c */
-#line 1460 "program_parse.y"
+#line 1479 "program_parse.y"
{
(yyval.state)[0] = STATE_MODELVIEW_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
case 188:
/* Line 1455 of yacc.c */
-#line 1465 "program_parse.y"
+#line 1484 "program_parse.y"
{
(yyval.state)[0] = STATE_PROJECTION_MATRIX;
(yyval.state)[1] = 0;
case 189:
/* Line 1455 of yacc.c */
-#line 1470 "program_parse.y"
+#line 1489 "program_parse.y"
{
(yyval.state)[0] = STATE_MVP_MATRIX;
(yyval.state)[1] = 0;
case 190:
/* Line 1455 of yacc.c */
-#line 1475 "program_parse.y"
+#line 1494 "program_parse.y"
{
(yyval.state)[0] = STATE_TEXTURE_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
case 191:
/* Line 1455 of yacc.c */
-#line 1480 "program_parse.y"
+#line 1499 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
case 192:
/* Line 1455 of yacc.c */
-#line 1485 "program_parse.y"
+#line 1504 "program_parse.y"
{
(yyval.state)[0] = STATE_PROGRAM_MATRIX;
(yyval.state)[1] = (yyvsp[(3) - (4)].integer);
case 193:
/* Line 1455 of yacc.c */
-#line 1492 "program_parse.y"
+#line 1511 "program_parse.y"
{
(yyval.integer) = 0;
;}
case 194:
/* Line 1455 of yacc.c */
-#line 1496 "program_parse.y"
+#line 1515 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (3)].integer);
;}
case 195:
/* Line 1455 of yacc.c */
-#line 1501 "program_parse.y"
+#line 1520 "program_parse.y"
{
/* Since GL_ARB_vertex_blend isn't supported, only modelview matrix
* zero is valid.
case 196:
/* Line 1455 of yacc.c */
-#line 1514 "program_parse.y"
+#line 1533 "program_parse.y"
{
/* Since GL_ARB_matrix_palette isn't supported, just let any value
* through here. The error will be generated later.
case 197:
/* Line 1455 of yacc.c */
-#line 1522 "program_parse.y"
+#line 1541 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector");
case 198:
/* Line 1455 of yacc.c */
-#line 1533 "program_parse.y"
+#line 1552 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_DEPTH_RANGE;
case 203:
/* Line 1455 of yacc.c */
-#line 1545 "program_parse.y"
+#line 1564 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
case 204:
/* Line 1455 of yacc.c */
-#line 1555 "program_parse.y"
+#line 1574 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
case 205:
/* Line 1455 of yacc.c */
-#line 1560 "program_parse.y"
+#line 1579 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
case 206:
/* Line 1455 of yacc.c */
-#line 1567 "program_parse.y"
+#line 1586 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
case 207:
/* Line 1455 of yacc.c */
-#line 1577 "program_parse.y"
+#line 1596 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
case 208:
/* Line 1455 of yacc.c */
-#line 1586 "program_parse.y"
+#line 1605 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
case 209:
/* Line 1455 of yacc.c */
-#line 1591 "program_parse.y"
+#line 1610 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
case 210:
/* Line 1455 of yacc.c */
-#line 1598 "program_parse.y"
+#line 1617 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
case 211:
/* Line 1455 of yacc.c */
-#line 1608 "program_parse.y"
+#line 1627 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference");
case 212:
/* Line 1455 of yacc.c */
-#line 1618 "program_parse.y"
+#line 1637 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference");
case 217:
/* Line 1455 of yacc.c */
-#line 1633 "program_parse.y"
+#line 1652 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
case 218:
/* Line 1455 of yacc.c */
-#line 1643 "program_parse.y"
+#line 1662 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
case 219:
/* Line 1455 of yacc.c */
-#line 1651 "program_parse.y"
+#line 1670 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer);
case 220:
/* Line 1455 of yacc.c */
-#line 1661 "program_parse.y"
+#line 1680 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (3)].real);
case 221:
/* Line 1455 of yacc.c */
-#line 1669 "program_parse.y"
+#line 1688 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (5)].real);
case 222:
/* Line 1455 of yacc.c */
-#line 1678 "program_parse.y"
+#line 1697 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (7)].real);
case 223:
/* Line 1455 of yacc.c */
-#line 1687 "program_parse.y"
+#line 1706 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (9)].real);
case 224:
/* Line 1455 of yacc.c */
-#line 1697 "program_parse.y"
+#line 1716 "program_parse.y"
{
(yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real);
;}
case 225:
/* Line 1455 of yacc.c */
-#line 1701 "program_parse.y"
+#line 1720 "program_parse.y"
{
(yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer));
;}
case 226:
/* Line 1455 of yacc.c */
-#line 1706 "program_parse.y"
+#line 1725 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 227:
/* Line 1455 of yacc.c */
-#line 1707 "program_parse.y"
+#line 1726 "program_parse.y"
{ (yyval.negate) = TRUE; ;}
break;
case 228:
/* Line 1455 of yacc.c */
-#line 1708 "program_parse.y"
+#line 1727 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 229:
/* Line 1455 of yacc.c */
-#line 1711 "program_parse.y"
+#line 1730 "program_parse.y"
{ (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
break;
case 231:
/* Line 1455 of yacc.c */
-#line 1714 "program_parse.y"
+#line 1733 "program_parse.y"
{ (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
break;
case 233:
/* Line 1455 of yacc.c */
-#line 1718 "program_parse.y"
+#line 1737 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) {
+ free((yyvsp[(3) - (3)].string));
YYERROR;
}
;}
case 234:
/* Line 1455 of yacc.c */
-#line 1724 "program_parse.y"
+#line 1744 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) {
+ free((yyvsp[(1) - (1)].string));
YYERROR;
}
;}
case 235:
/* Line 1455 of yacc.c */
-#line 1732 "program_parse.y"
+#line 1753 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (4)].string), at_output, & (yylsp[(2) - (4)]));
if (s == NULL) {
+ free((yyvsp[(2) - (4)].string));
YYERROR;
} else {
s->output_binding = (yyvsp[(4) - (4)].result);
case 236:
/* Line 1455 of yacc.c */
-#line 1745 "program_parse.y"
+#line 1767 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_HPOS;
case 237:
/* Line 1455 of yacc.c */
-#line 1754 "program_parse.y"
+#line 1776 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_FOGC;
case 238:
/* Line 1455 of yacc.c */
-#line 1763 "program_parse.y"
+#line 1785 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (2)].result);
;}
case 239:
/* Line 1455 of yacc.c */
-#line 1767 "program_parse.y"
+#line 1789 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_PSIZ;
case 240:
/* Line 1455 of yacc.c */
-#line 1776 "program_parse.y"
+#line 1798 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer);
case 241:
/* Line 1455 of yacc.c */
-#line 1785 "program_parse.y"
+#line 1807 "program_parse.y"
{
if (state->mode == ARB_fragment) {
(yyval.result) = FRAG_RESULT_DEPTH;
case 242:
/* Line 1455 of yacc.c */
-#line 1796 "program_parse.y"
+#line 1818 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer);
;}
case 243:
/* Line 1455 of yacc.c */
-#line 1802 "program_parse.y"
+#line 1824 "program_parse.y"
{
(yyval.integer) = (state->mode == ARB_vertex)
? VERT_RESULT_COL0
case 244:
/* Line 1455 of yacc.c */
-#line 1808 "program_parse.y"
+#line 1830 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_COL0;
case 245:
/* Line 1455 of yacc.c */
-#line 1817 "program_parse.y"
+#line 1839 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_BFC0;
case 246:
/* Line 1455 of yacc.c */
-#line 1828 "program_parse.y"
+#line 1850 "program_parse.y"
{
(yyval.integer) = 0;
;}
case 247:
/* Line 1455 of yacc.c */
-#line 1832 "program_parse.y"
+#line 1854 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 0;
case 248:
/* Line 1455 of yacc.c */
-#line 1841 "program_parse.y"
+#line 1863 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 1;
case 249:
/* Line 1455 of yacc.c */
-#line 1851 "program_parse.y"
+#line 1873 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 250:
/* Line 1455 of yacc.c */
-#line 1852 "program_parse.y"
+#line 1874 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 251:
/* Line 1455 of yacc.c */
-#line 1853 "program_parse.y"
+#line 1875 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 252:
/* Line 1455 of yacc.c */
-#line 1856 "program_parse.y"
+#line 1878 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 253:
/* Line 1455 of yacc.c */
-#line 1857 "program_parse.y"
+#line 1879 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 254:
/* Line 1455 of yacc.c */
-#line 1858 "program_parse.y"
+#line 1880 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 255:
/* Line 1455 of yacc.c */
-#line 1861 "program_parse.y"
+#line 1883 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 256:
/* Line 1455 of yacc.c */
-#line 1862 "program_parse.y"
+#line 1884 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 257:
/* Line 1455 of yacc.c */
-#line 1865 "program_parse.y"
+#line 1887 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 258:
/* Line 1455 of yacc.c */
-#line 1866 "program_parse.y"
+#line 1888 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 259:
/* Line 1455 of yacc.c */
-#line 1869 "program_parse.y"
+#line 1891 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 260:
/* Line 1455 of yacc.c */
-#line 1870 "program_parse.y"
+#line 1892 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 261:
/* Line 1455 of yacc.c */
-#line 1874 "program_parse.y"
+#line 1896 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector");
case 262:
/* Line 1455 of yacc.c */
-#line 1885 "program_parse.y"
+#line 1907 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector");
case 263:
/* Line 1455 of yacc.c */
-#line 1896 "program_parse.y"
+#line 1918 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector");
case 264:
/* Line 1455 of yacc.c */
-#line 1907 "program_parse.y"
+#line 1929 "program_parse.y"
{
struct asm_symbol *exist = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string));
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(4) - (4)].string));
+ free((yyvsp[(4) - (4)].string));
+
if (exist != NULL) {
+ free((yyvsp[(2) - (4)].string));
yyerror(& (yylsp[(2) - (4)]), state, "redeclared identifier");
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 4577 "program_parse.tab.c"
+#line 4603 "program_parse.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
/* Line 1675 of yacc.c */
-#line 1927 "program_parse.y"
+#line 1953 "program_parse.y"
struct asm_instruction *