summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-07-28 21:56:42 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-07-28 21:56:42 -0700
commit86b33b5649710f351d241ce6890200ac1f38f724 (patch)
tree0df16ed67f85003b0d5550cb58290037d9190a77 /src
parentaafd5762593aa01f2d612f4d769d1af383422c1c (diff)
ARB prog parser: Set correct register file for OUTPUT variables
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/program_parse.tab.c401
-rw-r--r--src/mesa/shader/program_parse.y11
2 files changed, 213 insertions, 199 deletions
diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c
index 4a05d106be..83c7419493 100644
--- a/src/mesa/shader/program_parse.tab.c
+++ b/src/mesa/shader/program_parse.tab.c
@@ -760,28 +760,28 @@ static const yytype_uint16 yyrline[] =
338, 341, 342, 345, 351, 358, 365, 373, 380, 388,
433, 440, 446, 447, 448, 449, 450, 451, 452, 453,
454, 455, 456, 457, 460, 472, 485, 498, 520, 529,
- 538, 545, 554, 582, 624, 635, 656, 666, 672, 696,
- 713, 713, 715, 722, 734, 735, 736, 739, 751, 763,
- 781, 792, 804, 806, 807, 808, 809, 812, 812, 812,
- 812, 813, 816, 817, 818, 819, 820, 821, 824, 842,
- 846, 852, 856, 860, 864, 873, 882, 886, 891, 897,
- 908, 908, 909, 911, 915, 919, 923, 929, 929, 931,
- 947, 970, 973, 984, 990, 996, 997, 1004, 1010, 1016,
- 1024, 1030, 1036, 1044, 1050, 1056, 1064, 1065, 1068, 1069,
- 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1080, 1089,
- 1093, 1097, 1103, 1112, 1116, 1120, 1129, 1133, 1139, 1145,
- 1152, 1157, 1165, 1175, 1177, 1185, 1191, 1195, 1199, 1205,
- 1216, 1225, 1229, 1234, 1238, 1242, 1246, 1252, 1259, 1263,
- 1269, 1277, 1288, 1295, 1299, 1305, 1315, 1326, 1330, 1348,
- 1357, 1360, 1366, 1370, 1374, 1380, 1391, 1396, 1401, 1406,
- 1411, 1416, 1424, 1427, 1432, 1445, 1453, 1466, 1466, 1468,
- 1468, 1470, 1480, 1485, 1492, 1502, 1511, 1516, 1523, 1533,
- 1543, 1555, 1555, 1556, 1556, 1558, 1565, 1570, 1577, 1585,
- 1593, 1602, 1613, 1617, 1623, 1624, 1625, 1628, 1628, 1631,
- 1631, 1634, 1640, 1648, 1661, 1670, 1679, 1683, 1692, 1701,
- 1712, 1719, 1724, 1733, 1745, 1748, 1757, 1768, 1769, 1770,
- 1773, 1774, 1775, 1778, 1779, 1782, 1783, 1786, 1787, 1790,
- 1801, 1812, 1823
+ 538, 545, 554, 582, 624, 635, 656, 666, 672, 703,
+ 720, 720, 722, 729, 741, 742, 743, 746, 758, 770,
+ 788, 799, 811, 813, 814, 815, 816, 819, 819, 819,
+ 819, 820, 823, 824, 825, 826, 827, 828, 831, 849,
+ 853, 859, 863, 867, 871, 880, 889, 893, 898, 904,
+ 915, 915, 916, 918, 922, 926, 930, 936, 936, 938,
+ 954, 977, 980, 991, 997, 1003, 1004, 1011, 1017, 1023,
+ 1031, 1037, 1043, 1051, 1057, 1063, 1071, 1072, 1075, 1076,
+ 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1087, 1096,
+ 1100, 1104, 1110, 1119, 1123, 1127, 1136, 1140, 1146, 1152,
+ 1159, 1164, 1172, 1182, 1184, 1192, 1198, 1202, 1206, 1212,
+ 1223, 1232, 1236, 1241, 1245, 1249, 1253, 1259, 1266, 1270,
+ 1276, 1284, 1295, 1302, 1306, 1312, 1322, 1333, 1337, 1355,
+ 1364, 1367, 1373, 1377, 1381, 1387, 1398, 1403, 1408, 1413,
+ 1418, 1423, 1431, 1434, 1439, 1452, 1460, 1473, 1473, 1475,
+ 1475, 1477, 1487, 1492, 1499, 1509, 1518, 1523, 1530, 1540,
+ 1550, 1562, 1562, 1563, 1563, 1565, 1572, 1577, 1584, 1592,
+ 1600, 1609, 1620, 1624, 1630, 1631, 1632, 1635, 1635, 1638,
+ 1638, 1641, 1647, 1655, 1668, 1677, 1686, 1690, 1699, 1708,
+ 1719, 1726, 1731, 1740, 1752, 1755, 1764, 1775, 1776, 1777,
+ 1780, 1781, 1782, 1785, 1786, 1789, 1790, 1793, 1794, 1797,
+ 1808, 1819, 1830
};
#endif
@@ -2638,12 +2638,19 @@ yyreduce:
}
init_dst_reg(& (yyval.dst_reg));
- if (s->type == at_temp) {
+ switch (s->type) {
+ case at_temp:
(yyval.dst_reg).File = PROGRAM_TEMPORARY;
(yyval.dst_reg).Index = s->temp_binding;
- } else {
+ break;
+ case at_output:
+ (yyval.dst_reg).File = PROGRAM_OUTPUT;
+ (yyval.dst_reg).Index = s->output_binding;
+ break;
+ default:
(yyval.dst_reg).File = s->param_binding_type;
(yyval.dst_reg).Index = s->param_binding_begin;
+ break;
}
;}
break;
@@ -2651,7 +2658,7 @@ yyreduce:
case 59:
/* Line 1455 of yacc.c */
-#line 697 "program_parse.y"
+#line 704 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
@@ -2671,7 +2678,7 @@ yyreduce:
case 62:
/* Line 1455 of yacc.c */
-#line 716 "program_parse.y"
+#line 723 "program_parse.y"
{
init_src_reg(& (yyval.src_reg));
(yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer);
@@ -2681,7 +2688,7 @@ yyreduce:
case 63:
/* Line 1455 of yacc.c */
-#line 723 "program_parse.y"
+#line 730 "program_parse.y"
{
/* FINISHME: Add support for multiple address registers.
*/
@@ -2696,28 +2703,28 @@ yyreduce:
case 64:
/* Line 1455 of yacc.c */
-#line 734 "program_parse.y"
+#line 741 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 65:
/* Line 1455 of yacc.c */
-#line 735 "program_parse.y"
+#line 742 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
case 66:
/* Line 1455 of yacc.c */
-#line 736 "program_parse.y"
+#line 743 "program_parse.y"
{ (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}
break;
case 67:
/* Line 1455 of yacc.c */
-#line 740 "program_parse.y"
+#line 747 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) {
yyerror(& (yylsp[(1) - (1)]), state,
@@ -2732,7 +2739,7 @@ yyreduce:
case 68:
/* Line 1455 of yacc.c */
-#line 752 "program_parse.y"
+#line 759 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) {
yyerror(& (yylsp[(1) - (1)]), state,
@@ -2747,7 +2754,7 @@ yyreduce:
case 69:
/* Line 1455 of yacc.c */
-#line 764 "program_parse.y"
+#line 771 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
@@ -2768,7 +2775,7 @@ yyreduce:
case 70:
/* Line 1455 of yacc.c */
-#line 782 "program_parse.y"
+#line 789 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector");
@@ -2782,7 +2789,7 @@ yyreduce:
case 71:
/* Line 1455 of yacc.c */
-#line 793 "program_parse.y"
+#line 800 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state,
@@ -2797,21 +2804,21 @@ yyreduce:
case 76:
/* Line 1455 of yacc.c */
-#line 809 "program_parse.y"
+#line 816 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 81:
/* Line 1455 of yacc.c */
-#line 813 "program_parse.y"
+#line 820 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 88:
/* Line 1455 of yacc.c */
-#line 825 "program_parse.y"
+#line 832 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)]));
@@ -2832,7 +2839,7 @@ yyreduce:
case 89:
/* Line 1455 of yacc.c */
-#line 843 "program_parse.y"
+#line 850 "program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
@@ -2841,7 +2848,7 @@ yyreduce:
case 90:
/* Line 1455 of yacc.c */
-#line 847 "program_parse.y"
+#line 854 "program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
@@ -2850,7 +2857,7 @@ yyreduce:
case 91:
/* Line 1455 of yacc.c */
-#line 853 "program_parse.y"
+#line 860 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_POS;
;}
@@ -2859,7 +2866,7 @@ yyreduce:
case 92:
/* Line 1455 of yacc.c */
-#line 857 "program_parse.y"
+#line 864 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_WEIGHT;
;}
@@ -2868,7 +2875,7 @@ yyreduce:
case 93:
/* Line 1455 of yacc.c */
-#line 861 "program_parse.y"
+#line 868 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_NORMAL;
;}
@@ -2877,7 +2884,7 @@ yyreduce:
case 94:
/* Line 1455 of yacc.c */
-#line 865 "program_parse.y"
+#line 872 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_secondary_color) {
yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported");
@@ -2891,7 +2898,7 @@ yyreduce:
case 95:
/* Line 1455 of yacc.c */
-#line 874 "program_parse.y"
+#line 881 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_fog_coord) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported");
@@ -2905,7 +2912,7 @@ yyreduce:
case 96:
/* Line 1455 of yacc.c */
-#line 883 "program_parse.y"
+#line 890 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
@@ -2914,7 +2921,7 @@ yyreduce:
case 97:
/* Line 1455 of yacc.c */
-#line 887 "program_parse.y"
+#line 894 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
@@ -2924,7 +2931,7 @@ yyreduce:
case 98:
/* Line 1455 of yacc.c */
-#line 892 "program_parse.y"
+#line 899 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer);
;}
@@ -2933,7 +2940,7 @@ yyreduce:
case 99:
/* Line 1455 of yacc.c */
-#line 898 "program_parse.y"
+#line 905 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference");
@@ -2947,7 +2954,7 @@ yyreduce:
case 103:
/* Line 1455 of yacc.c */
-#line 912 "program_parse.y"
+#line 919 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_WPOS;
;}
@@ -2956,7 +2963,7 @@ yyreduce:
case 104:
/* Line 1455 of yacc.c */
-#line 916 "program_parse.y"
+#line 923 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer);
;}
@@ -2965,7 +2972,7 @@ yyreduce:
case 105:
/* Line 1455 of yacc.c */
-#line 920 "program_parse.y"
+#line 927 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_FOGC;
;}
@@ -2974,7 +2981,7 @@ yyreduce:
case 106:
/* Line 1455 of yacc.c */
-#line 924 "program_parse.y"
+#line 931 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
@@ -2983,7 +2990,7 @@ yyreduce:
case 109:
/* Line 1455 of yacc.c */
-#line 932 "program_parse.y"
+#line 939 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)]));
@@ -3002,7 +3009,7 @@ yyreduce:
case 110:
/* Line 1455 of yacc.c */
-#line 948 "program_parse.y"
+#line 955 "program_parse.y"
{
if (((yyvsp[(4) - (6)].integer) != 0) && ((unsigned) (yyvsp[(4) - (6)].integer) != (yyvsp[(6) - (6)].temp_sym).param_binding_length)) {
yyerror(& (yylsp[(4) - (6)]), state,
@@ -3027,7 +3034,7 @@ yyreduce:
case 111:
/* Line 1455 of yacc.c */
-#line 970 "program_parse.y"
+#line 977 "program_parse.y"
{
(yyval.integer) = 0;
;}
@@ -3036,7 +3043,7 @@ yyreduce:
case 112:
/* Line 1455 of yacc.c */
-#line 974 "program_parse.y"
+#line 981 "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");
@@ -3050,7 +3057,7 @@ yyreduce:
case 113:
/* Line 1455 of yacc.c */
-#line 985 "program_parse.y"
+#line 992 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym);
;}
@@ -3059,7 +3066,7 @@ yyreduce:
case 114:
/* Line 1455 of yacc.c */
-#line 991 "program_parse.y"
+#line 998 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym);
;}
@@ -3068,7 +3075,7 @@ yyreduce:
case 116:
/* Line 1455 of yacc.c */
-#line 998 "program_parse.y"
+#line 1005 "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);
@@ -3078,7 +3085,7 @@ yyreduce:
case 117:
/* Line 1455 of yacc.c */
-#line 1005 "program_parse.y"
+#line 1012 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3089,7 +3096,7 @@ yyreduce:
case 118:
/* Line 1455 of yacc.c */
-#line 1011 "program_parse.y"
+#line 1018 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3100,7 +3107,7 @@ yyreduce:
case 119:
/* Line 1455 of yacc.c */
-#line 1017 "program_parse.y"
+#line 1024 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3111,7 +3118,7 @@ yyreduce:
case 120:
/* Line 1455 of yacc.c */
-#line 1025 "program_parse.y"
+#line 1032 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3122,7 +3129,7 @@ yyreduce:
case 121:
/* Line 1455 of yacc.c */
-#line 1031 "program_parse.y"
+#line 1038 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3133,7 +3140,7 @@ yyreduce:
case 122:
/* Line 1455 of yacc.c */
-#line 1037 "program_parse.y"
+#line 1044 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3144,7 +3151,7 @@ yyreduce:
case 123:
/* Line 1455 of yacc.c */
-#line 1045 "program_parse.y"
+#line 1052 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3155,7 +3162,7 @@ yyreduce:
case 124:
/* Line 1455 of yacc.c */
-#line 1051 "program_parse.y"
+#line 1058 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3166,7 +3173,7 @@ yyreduce:
case 125:
/* Line 1455 of yacc.c */
-#line 1057 "program_parse.y"
+#line 1064 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3177,91 +3184,91 @@ yyreduce:
case 126:
/* Line 1455 of yacc.c */
-#line 1064 "program_parse.y"
+#line 1071 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;}
break;
case 127:
/* Line 1455 of yacc.c */
-#line 1065 "program_parse.y"
+#line 1072 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 128:
/* Line 1455 of yacc.c */
-#line 1068 "program_parse.y"
+#line 1075 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 129:
/* Line 1455 of yacc.c */
-#line 1069 "program_parse.y"
+#line 1076 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 130:
/* Line 1455 of yacc.c */
-#line 1070 "program_parse.y"
+#line 1077 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 131:
/* Line 1455 of yacc.c */
-#line 1071 "program_parse.y"
+#line 1078 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 132:
/* Line 1455 of yacc.c */
-#line 1072 "program_parse.y"
+#line 1079 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 133:
/* Line 1455 of yacc.c */
-#line 1073 "program_parse.y"
+#line 1080 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 134:
/* Line 1455 of yacc.c */
-#line 1074 "program_parse.y"
+#line 1081 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 135:
/* Line 1455 of yacc.c */
-#line 1075 "program_parse.y"
+#line 1082 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 136:
/* Line 1455 of yacc.c */
-#line 1076 "program_parse.y"
+#line 1083 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 137:
/* Line 1455 of yacc.c */
-#line 1077 "program_parse.y"
+#line 1084 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 138:
/* Line 1455 of yacc.c */
-#line 1081 "program_parse.y"
+#line 1088 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_MATERIAL;
@@ -3273,7 +3280,7 @@ yyreduce:
case 139:
/* Line 1455 of yacc.c */
-#line 1090 "program_parse.y"
+#line 1097 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
@@ -3282,7 +3289,7 @@ yyreduce:
case 140:
/* Line 1455 of yacc.c */
-#line 1094 "program_parse.y"
+#line 1101 "program_parse.y"
{
(yyval.integer) = STATE_EMISSION;
;}
@@ -3291,7 +3298,7 @@ yyreduce:
case 141:
/* Line 1455 of yacc.c */
-#line 1098 "program_parse.y"
+#line 1105 "program_parse.y"
{
(yyval.integer) = STATE_SHININESS;
;}
@@ -3300,7 +3307,7 @@ yyreduce:
case 142:
/* Line 1455 of yacc.c */
-#line 1104 "program_parse.y"
+#line 1111 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHT;
@@ -3312,7 +3319,7 @@ yyreduce:
case 143:
/* Line 1455 of yacc.c */
-#line 1113 "program_parse.y"
+#line 1120 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
@@ -3321,7 +3328,7 @@ yyreduce:
case 144:
/* Line 1455 of yacc.c */
-#line 1117 "program_parse.y"
+#line 1124 "program_parse.y"
{
(yyval.integer) = STATE_POSITION;
;}
@@ -3330,7 +3337,7 @@ yyreduce:
case 145:
/* Line 1455 of yacc.c */
-#line 1121 "program_parse.y"
+#line 1128 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_point_parameters) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported");
@@ -3344,7 +3351,7 @@ yyreduce:
case 146:
/* Line 1455 of yacc.c */
-#line 1130 "program_parse.y"
+#line 1137 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
@@ -3353,7 +3360,7 @@ yyreduce:
case 147:
/* Line 1455 of yacc.c */
-#line 1134 "program_parse.y"
+#line 1141 "program_parse.y"
{
(yyval.integer) = STATE_HALF_VECTOR;
;}
@@ -3362,7 +3369,7 @@ yyreduce:
case 148:
/* Line 1455 of yacc.c */
-#line 1140 "program_parse.y"
+#line 1147 "program_parse.y"
{
(yyval.integer) = STATE_SPOT_DIRECTION;
;}
@@ -3371,7 +3378,7 @@ yyreduce:
case 149:
/* Line 1455 of yacc.c */
-#line 1146 "program_parse.y"
+#line 1153 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (2)].state)[1];
@@ -3381,7 +3388,7 @@ yyreduce:
case 150:
/* Line 1455 of yacc.c */
-#line 1153 "program_parse.y"
+#line 1160 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT;
@@ -3391,7 +3398,7 @@ yyreduce:
case 151:
/* Line 1455 of yacc.c */
-#line 1158 "program_parse.y"
+#line 1165 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR;
@@ -3402,7 +3409,7 @@ yyreduce:
case 152:
/* Line 1455 of yacc.c */
-#line 1166 "program_parse.y"
+#line 1173 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTPROD;
@@ -3415,7 +3422,7 @@ yyreduce:
case 154:
/* Line 1455 of yacc.c */
-#line 1178 "program_parse.y"
+#line 1185 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(3) - (3)].integer);
@@ -3426,7 +3433,7 @@ yyreduce:
case 155:
/* Line 1455 of yacc.c */
-#line 1186 "program_parse.y"
+#line 1193 "program_parse.y"
{
(yyval.integer) = STATE_TEXENV_COLOR;
;}
@@ -3435,7 +3442,7 @@ yyreduce:
case 156:
/* Line 1455 of yacc.c */
-#line 1192 "program_parse.y"
+#line 1199 "program_parse.y"
{
(yyval.integer) = STATE_AMBIENT;
;}
@@ -3444,7 +3451,7 @@ yyreduce:
case 157:
/* Line 1455 of yacc.c */
-#line 1196 "program_parse.y"
+#line 1203 "program_parse.y"
{
(yyval.integer) = STATE_DIFFUSE;
;}
@@ -3453,7 +3460,7 @@ yyreduce:
case 158:
/* Line 1455 of yacc.c */
-#line 1200 "program_parse.y"
+#line 1207 "program_parse.y"
{
(yyval.integer) = STATE_SPECULAR;
;}
@@ -3462,7 +3469,7 @@ yyreduce:
case 159:
/* Line 1455 of yacc.c */
-#line 1206 "program_parse.y"
+#line 1213 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector");
@@ -3476,7 +3483,7 @@ yyreduce:
case 160:
/* Line 1455 of yacc.c */
-#line 1217 "program_parse.y"
+#line 1224 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_TEXGEN;
@@ -3488,7 +3495,7 @@ yyreduce:
case 161:
/* Line 1455 of yacc.c */
-#line 1226 "program_parse.y"
+#line 1233 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S;
;}
@@ -3497,7 +3504,7 @@ yyreduce:
case 162:
/* Line 1455 of yacc.c */
-#line 1230 "program_parse.y"
+#line 1237 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_OBJECT_S;
;}
@@ -3506,7 +3513,7 @@ yyreduce:
case 163:
/* Line 1455 of yacc.c */
-#line 1235 "program_parse.y"
+#line 1242 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S;
;}
@@ -3515,7 +3522,7 @@ yyreduce:
case 164:
/* Line 1455 of yacc.c */
-#line 1239 "program_parse.y"
+#line 1246 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S;
;}
@@ -3524,7 +3531,7 @@ yyreduce:
case 165:
/* Line 1455 of yacc.c */
-#line 1243 "program_parse.y"
+#line 1250 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S;
;}
@@ -3533,7 +3540,7 @@ yyreduce:
case 166:
/* Line 1455 of yacc.c */
-#line 1247 "program_parse.y"
+#line 1254 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S;
;}
@@ -3542,7 +3549,7 @@ yyreduce:
case 167:
/* Line 1455 of yacc.c */
-#line 1253 "program_parse.y"
+#line 1260 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
@@ -3552,7 +3559,7 @@ yyreduce:
case 168:
/* Line 1455 of yacc.c */
-#line 1260 "program_parse.y"
+#line 1267 "program_parse.y"
{
(yyval.integer) = STATE_FOG_COLOR;
;}
@@ -3561,7 +3568,7 @@ yyreduce:
case 169:
/* Line 1455 of yacc.c */
-#line 1264 "program_parse.y"
+#line 1271 "program_parse.y"
{
(yyval.integer) = STATE_FOG_PARAMS;
;}
@@ -3570,7 +3577,7 @@ yyreduce:
case 170:
/* Line 1455 of yacc.c */
-#line 1270 "program_parse.y"
+#line 1277 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_CLIPPLANE;
@@ -3581,7 +3588,7 @@ yyreduce:
case 171:
/* Line 1455 of yacc.c */
-#line 1278 "program_parse.y"
+#line 1285 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector");
@@ -3595,7 +3602,7 @@ yyreduce:
case 172:
/* Line 1455 of yacc.c */
-#line 1289 "program_parse.y"
+#line 1296 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
@@ -3605,7 +3612,7 @@ yyreduce:
case 173:
/* Line 1455 of yacc.c */
-#line 1296 "program_parse.y"
+#line 1303 "program_parse.y"
{
(yyval.integer) = STATE_POINT_SIZE;
;}
@@ -3614,7 +3621,7 @@ yyreduce:
case 174:
/* Line 1455 of yacc.c */
-#line 1300 "program_parse.y"
+#line 1307 "program_parse.y"
{
(yyval.integer) = STATE_POINT_ATTENUATION;
;}
@@ -3623,7 +3630,7 @@ yyreduce:
case 175:
/* Line 1455 of yacc.c */
-#line 1306 "program_parse.y"
+#line 1313 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (5)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (5)].state)[1];
@@ -3636,7 +3643,7 @@ yyreduce:
case 176:
/* Line 1455 of yacc.c */
-#line 1316 "program_parse.y"
+#line 1323 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (2)].state)[1];
@@ -3649,7 +3656,7 @@ yyreduce:
case 177:
/* Line 1455 of yacc.c */
-#line 1326 "program_parse.y"
+#line 1333 "program_parse.y"
{
(yyval.state)[2] = 0;
(yyval.state)[3] = 3;
@@ -3659,7 +3666,7 @@ yyreduce:
case 178:
/* Line 1455 of yacc.c */
-#line 1331 "program_parse.y"
+#line 1338 "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).
@@ -3680,7 +3687,7 @@ yyreduce:
case 179:
/* Line 1455 of yacc.c */
-#line 1349 "program_parse.y"
+#line 1356 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (3)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (3)].state)[1];
@@ -3691,7 +3698,7 @@ yyreduce:
case 180:
/* Line 1455 of yacc.c */
-#line 1357 "program_parse.y"
+#line 1364 "program_parse.y"
{
(yyval.integer) = 0;
;}
@@ -3700,7 +3707,7 @@ yyreduce:
case 181:
/* Line 1455 of yacc.c */
-#line 1361 "program_parse.y"
+#line 1368 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
@@ -3709,7 +3716,7 @@ yyreduce:
case 182:
/* Line 1455 of yacc.c */
-#line 1367 "program_parse.y"
+#line 1374 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVERSE;
;}
@@ -3718,7 +3725,7 @@ yyreduce:
case 183:
/* Line 1455 of yacc.c */
-#line 1371 "program_parse.y"
+#line 1378 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_TRANSPOSE;
;}
@@ -3727,7 +3734,7 @@ yyreduce:
case 184:
/* Line 1455 of yacc.c */
-#line 1375 "program_parse.y"
+#line 1382 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVTRANS;
;}
@@ -3736,7 +3743,7 @@ yyreduce:
case 185:
/* Line 1455 of yacc.c */
-#line 1381 "program_parse.y"
+#line 1388 "program_parse.y"
{
if ((yyvsp[(1) - (1)].integer) > 3) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference");
@@ -3750,7 +3757,7 @@ yyreduce:
case 186:
/* Line 1455 of yacc.c */
-#line 1392 "program_parse.y"
+#line 1399 "program_parse.y"
{
(yyval.state)[0] = STATE_MODELVIEW_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
@@ -3760,7 +3767,7 @@ yyreduce:
case 187:
/* Line 1455 of yacc.c */
-#line 1397 "program_parse.y"
+#line 1404 "program_parse.y"
{
(yyval.state)[0] = STATE_PROJECTION_MATRIX;
(yyval.state)[1] = 0;
@@ -3770,7 +3777,7 @@ yyreduce:
case 188:
/* Line 1455 of yacc.c */
-#line 1402 "program_parse.y"
+#line 1409 "program_parse.y"
{
(yyval.state)[0] = STATE_MVP_MATRIX;
(yyval.state)[1] = 0;
@@ -3780,7 +3787,7 @@ yyreduce:
case 189:
/* Line 1455 of yacc.c */
-#line 1407 "program_parse.y"
+#line 1414 "program_parse.y"
{
(yyval.state)[0] = STATE_TEXTURE_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
@@ -3790,7 +3797,7 @@ yyreduce:
case 190:
/* Line 1455 of yacc.c */
-#line 1412 "program_parse.y"
+#line 1419 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
@@ -3800,7 +3807,7 @@ yyreduce:
case 191:
/* Line 1455 of yacc.c */
-#line 1417 "program_parse.y"
+#line 1424 "program_parse.y"
{
(yyval.state)[0] = STATE_PROGRAM_MATRIX;
(yyval.state)[1] = (yyvsp[(3) - (4)].integer);
@@ -3810,7 +3817,7 @@ yyreduce:
case 192:
/* Line 1455 of yacc.c */
-#line 1424 "program_parse.y"
+#line 1431 "program_parse.y"
{
(yyval.integer) = 0;
;}
@@ -3819,7 +3826,7 @@ yyreduce:
case 193:
/* Line 1455 of yacc.c */
-#line 1428 "program_parse.y"
+#line 1435 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
@@ -3828,7 +3835,7 @@ yyreduce:
case 194:
/* Line 1455 of yacc.c */
-#line 1433 "program_parse.y"
+#line 1440 "program_parse.y"
{
/* Since GL_ARB_vertex_blend isn't supported, only modelview matrix
* zero is valid.
@@ -3845,7 +3852,7 @@ yyreduce:
case 195:
/* Line 1455 of yacc.c */
-#line 1446 "program_parse.y"
+#line 1453 "program_parse.y"
{
/* Since GL_ARB_matrix_palette isn't supported, just let any value
* through here. The error will be generated later.
@@ -3857,7 +3864,7 @@ yyreduce:
case 196:
/* Line 1455 of yacc.c */
-#line 1454 "program_parse.y"
+#line 1461 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector");
@@ -3871,7 +3878,7 @@ yyreduce:
case 201:
/* Line 1455 of yacc.c */
-#line 1471 "program_parse.y"
+#line 1478 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -3884,7 +3891,7 @@ yyreduce:
case 202:
/* Line 1455 of yacc.c */
-#line 1481 "program_parse.y"
+#line 1488 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
@@ -3894,7 +3901,7 @@ yyreduce:
case 203:
/* Line 1455 of yacc.c */
-#line 1486 "program_parse.y"
+#line 1493 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
@@ -3904,7 +3911,7 @@ yyreduce:
case 204:
/* Line 1455 of yacc.c */
-#line 1493 "program_parse.y"
+#line 1500 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -3917,7 +3924,7 @@ yyreduce:
case 205:
/* Line 1455 of yacc.c */
-#line 1503 "program_parse.y"
+#line 1510 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -3930,7 +3937,7 @@ yyreduce:
case 206:
/* Line 1455 of yacc.c */
-#line 1512 "program_parse.y"
+#line 1519 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
@@ -3940,7 +3947,7 @@ yyreduce:
case 207:
/* Line 1455 of yacc.c */
-#line 1517 "program_parse.y"
+#line 1524 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
@@ -3950,7 +3957,7 @@ yyreduce:
case 208:
/* Line 1455 of yacc.c */
-#line 1524 "program_parse.y"
+#line 1531 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -3963,7 +3970,7 @@ yyreduce:
case 209:
/* Line 1455 of yacc.c */
-#line 1534 "program_parse.y"
+#line 1541 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference");
@@ -3976,7 +3983,7 @@ yyreduce:
case 210:
/* Line 1455 of yacc.c */
-#line 1544 "program_parse.y"
+#line 1551 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference");
@@ -3989,7 +3996,7 @@ yyreduce:
case 215:
/* Line 1455 of yacc.c */
-#line 1559 "program_parse.y"
+#line 1566 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
@@ -3999,7 +4006,7 @@ yyreduce:
case 216:
/* Line 1455 of yacc.c */
-#line 1566 "program_parse.y"
+#line 1573 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
@@ -4009,7 +4016,7 @@ yyreduce:
case 217:
/* Line 1455 of yacc.c */
-#line 1571 "program_parse.y"
+#line 1578 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer);
@@ -4019,7 +4026,7 @@ yyreduce:
case 218:
/* Line 1455 of yacc.c */
-#line 1578 "program_parse.y"
+#line 1585 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (yyvsp[(2) - (3)].real);
@@ -4032,7 +4039,7 @@ yyreduce:
case 219:
/* Line 1455 of yacc.c */
-#line 1586 "program_parse.y"
+#line 1593 "program_parse.y"
{
(yyval.vector).count = 2;
(yyval.vector).data[0] = (yyvsp[(2) - (5)].real);
@@ -4045,7 +4052,7 @@ yyreduce:
case 220:
/* Line 1455 of yacc.c */
-#line 1595 "program_parse.y"
+#line 1602 "program_parse.y"
{
(yyval.vector).count = 3;
(yyval.vector).data[0] = (yyvsp[(2) - (7)].real);
@@ -4058,7 +4065,7 @@ yyreduce:
case 221:
/* Line 1455 of yacc.c */
-#line 1604 "program_parse.y"
+#line 1611 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (9)].real);
@@ -4071,7 +4078,7 @@ yyreduce:
case 222:
/* Line 1455 of yacc.c */
-#line 1614 "program_parse.y"
+#line 1621 "program_parse.y"
{
(yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real);
;}
@@ -4080,7 +4087,7 @@ yyreduce:
case 223:
/* Line 1455 of yacc.c */
-#line 1618 "program_parse.y"
+#line 1625 "program_parse.y"
{
(yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer));
;}
@@ -4089,42 +4096,42 @@ yyreduce:
case 224:
/* Line 1455 of yacc.c */
-#line 1623 "program_parse.y"
+#line 1630 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 225:
/* Line 1455 of yacc.c */
-#line 1624 "program_parse.y"
+#line 1631 "program_parse.y"
{ (yyval.negate) = TRUE; ;}
break;
case 226:
/* Line 1455 of yacc.c */
-#line 1625 "program_parse.y"
+#line 1632 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 227:
/* Line 1455 of yacc.c */
-#line 1628 "program_parse.y"
+#line 1635 "program_parse.y"
{ (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
break;
case 229:
/* Line 1455 of yacc.c */
-#line 1631 "program_parse.y"
+#line 1638 "program_parse.y"
{ (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
break;
case 231:
/* Line 1455 of yacc.c */
-#line 1635 "program_parse.y"
+#line 1642 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) {
YYERROR;
@@ -4135,7 +4142,7 @@ yyreduce:
case 232:
/* Line 1455 of yacc.c */
-#line 1641 "program_parse.y"
+#line 1648 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) {
YYERROR;
@@ -4146,7 +4153,7 @@ yyreduce:
case 233:
/* Line 1455 of yacc.c */
-#line 1649 "program_parse.y"
+#line 1656 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (4)].string), at_output, & (yylsp[(2) - (4)]));
@@ -4162,7 +4169,7 @@ yyreduce:
case 234:
/* Line 1455 of yacc.c */
-#line 1662 "program_parse.y"
+#line 1669 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_HPOS;
@@ -4176,7 +4183,7 @@ yyreduce:
case 235:
/* Line 1455 of yacc.c */
-#line 1671 "program_parse.y"
+#line 1678 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_FOGC;
@@ -4190,7 +4197,7 @@ yyreduce:
case 236:
/* Line 1455 of yacc.c */
-#line 1680 "program_parse.y"
+#line 1687 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (2)].result);
;}
@@ -4199,7 +4206,7 @@ yyreduce:
case 237:
/* Line 1455 of yacc.c */
-#line 1684 "program_parse.y"
+#line 1691 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_PSIZ;
@@ -4213,7 +4220,7 @@ yyreduce:
case 238:
/* Line 1455 of yacc.c */
-#line 1693 "program_parse.y"
+#line 1700 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer);
@@ -4227,7 +4234,7 @@ yyreduce:
case 239:
/* Line 1455 of yacc.c */
-#line 1702 "program_parse.y"
+#line 1709 "program_parse.y"
{
if (state->mode == ARB_fragment) {
(yyval.result) = FRAG_RESULT_DEPTH;
@@ -4241,7 +4248,7 @@ yyreduce:
case 240:
/* Line 1455 of yacc.c */
-#line 1713 "program_parse.y"
+#line 1720 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer);
;}
@@ -4250,7 +4257,7 @@ yyreduce:
case 241:
/* Line 1455 of yacc.c */
-#line 1719 "program_parse.y"
+#line 1726 "program_parse.y"
{
(yyval.integer) = (state->mode == ARB_vertex)
? VERT_RESULT_COL0
@@ -4261,7 +4268,7 @@ yyreduce:
case 242:
/* Line 1455 of yacc.c */
-#line 1725 "program_parse.y"
+#line 1732 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_COL0;
@@ -4275,7 +4282,7 @@ yyreduce:
case 243:
/* Line 1455 of yacc.c */
-#line 1734 "program_parse.y"
+#line 1741 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_BFC0;
@@ -4289,7 +4296,7 @@ yyreduce:
case 244:
/* Line 1455 of yacc.c */
-#line 1745 "program_parse.y"
+#line 1752 "program_parse.y"
{
(yyval.integer) = 0;
;}
@@ -4298,7 +4305,7 @@ yyreduce:
case 245:
/* Line 1455 of yacc.c */
-#line 1749 "program_parse.y"
+#line 1756 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 0;
@@ -4312,7 +4319,7 @@ yyreduce:
case 246:
/* Line 1455 of yacc.c */
-#line 1758 "program_parse.y"
+#line 1765 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 1;
@@ -4326,91 +4333,91 @@ yyreduce:
case 247:
/* Line 1455 of yacc.c */
-#line 1768 "program_parse.y"
+#line 1775 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 248:
/* Line 1455 of yacc.c */
-#line 1769 "program_parse.y"
+#line 1776 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 249:
/* Line 1455 of yacc.c */
-#line 1770 "program_parse.y"
+#line 1777 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 250:
/* Line 1455 of yacc.c */
-#line 1773 "program_parse.y"
+#line 1780 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 251:
/* Line 1455 of yacc.c */
-#line 1774 "program_parse.y"
+#line 1781 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 252:
/* Line 1455 of yacc.c */
-#line 1775 "program_parse.y"
+#line 1782 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 253:
/* Line 1455 of yacc.c */
-#line 1778 "program_parse.y"
+#line 1785 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 254:
/* Line 1455 of yacc.c */
-#line 1779 "program_parse.y"
+#line 1786 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 255:
/* Line 1455 of yacc.c */
-#line 1782 "program_parse.y"
+#line 1789 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 256:
/* Line 1455 of yacc.c */
-#line 1783 "program_parse.y"
+#line 1790 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 257:
/* Line 1455 of yacc.c */
-#line 1786 "program_parse.y"
+#line 1793 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 258:
/* Line 1455 of yacc.c */
-#line 1787 "program_parse.y"
+#line 1794 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 259:
/* Line 1455 of yacc.c */
-#line 1791 "program_parse.y"
+#line 1798 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector");
@@ -4424,7 +4431,7 @@ yyreduce:
case 260:
/* Line 1455 of yacc.c */
-#line 1802 "program_parse.y"
+#line 1809 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector");
@@ -4438,7 +4445,7 @@ yyreduce:
case 261:
/* Line 1455 of yacc.c */
-#line 1813 "program_parse.y"
+#line 1820 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector");
@@ -4452,7 +4459,7 @@ yyreduce:
case 262:
/* Line 1455 of yacc.c */
-#line 1824 "program_parse.y"
+#line 1831 "program_parse.y"
{
struct asm_symbol *exist = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string));
@@ -4476,7 +4483,7 @@ yyreduce:
/* Line 1455 of yacc.c */
-#line 4480 "program_parse.tab.c"
+#line 4487 "program_parse.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4695,7 +4702,7 @@ yyreturn:
/* Line 1675 of yacc.c */
-#line 1844 "program_parse.y"
+#line 1851 "program_parse.y"
struct asm_instruction *
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 9e7c9e444d..225dc0d5b9 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -683,12 +683,19 @@ dstReg: resultBinding
}
init_dst_reg(& $$);
- if (s->type == at_temp) {
+ switch (s->type) {
+ case at_temp:
$$.File = PROGRAM_TEMPORARY;
$$.Index = s->temp_binding;
- } else {
+ break;
+ case at_output:
+ $$.File = PROGRAM_OUTPUT;
+ $$.Index = s->output_binding;
+ break;
+ default:
$$.File = s->param_binding_type;
$$.Index = s->param_binding_begin;
+ break;
}
}
;