From a66f9c6fed88a19524f760a0430d00dacfd38674 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 10 Aug 2010 09:27:40 -0600 Subject: [PATCH 2/2] mesa: added gl_program_constants::MaxAddressOffset For more info, see fd.o bug 29418. --- src/mesa/main/context.c | 1 + src/mesa/main/mtypes.h | 1 + src/mesa/program/program.c | 3 + src/mesa/program/program_parse.tab.c | 411 +++++++++++++++++----------------- src/mesa/program/program_parse.y | 4 +- 5 files changed, 213 insertions(+), 207 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b01fed1..f48cc95 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -476,6 +476,7 @@ init_program_limits(GLenum type, struct gl_program_constants *prog) prog->MaxEnvParams = MAX_PROGRAM_ENV_PARAMS; prog->MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS; prog->MaxUniformComponents = 4 * MAX_UNIFORMS; + prog->MaxAddressOffset = MAX_PROGRAM_LOCAL_PARAMS; switch (type) { case GL_VERTEX_PROGRAM_ARB: diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 8d92892..65ca669 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2493,6 +2493,7 @@ struct gl_program_constants GLuint MaxAttribs; GLuint MaxTemps; GLuint MaxAddressRegs; + GLuint MaxAddressOffset; /**< [-MaxAddressOffset, MaxAddressOffset-1] */ GLuint MaxParameters; GLuint MaxLocalParams; GLuint MaxEnvParams; diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 3b6d682..20b92f0 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -70,6 +70,9 @@ _mesa_init_program(GLcontext *ctx) ASSERT(ctx->Const.VertexProgram.MaxUniformComponents <= 4 * MAX_UNIFORMS); ASSERT(ctx->Const.FragmentProgram.MaxUniformComponents <= 4 * MAX_UNIFORMS); + ASSERT(ctx->Const.VertexProgram.MaxAddressOffset <= (1 << INST_INDEX_BITS)); + ASSERT(ctx->Const.FragmentProgram.MaxAddressOffset <= (1 << INST_INDEX_BITS)); + /* If this fails, increase prog_instruction::TexSrcUnit size */ ASSERT(MAX_TEXTURE_UNITS < (1 << 5)); diff --git a/src/mesa/program/program_parse.tab.c b/src/mesa/program/program_parse.tab.c index 31a6096..120975a 100644 --- a/src/mesa/program/program_parse.tab.c +++ b/src/mesa/program/program_parse.tab.c @@ -799,28 +799,28 @@ static const yytype_uint16 yyrline[] = 529, 530, 531, 532, 533, 534, 535, 538, 550, 558, 575, 582, 601, 612, 632, 657, 664, 697, 704, 719, 774, 817, 826, 848, 858, 862, 891, 910, 910, 912, - 919, 931, 932, 933, 936, 950, 964, 984, 995, 1007, - 1009, 1010, 1011, 1012, 1015, 1015, 1015, 1015, 1016, 1019, - 1023, 1028, 1035, 1042, 1049, 1072, 1095, 1096, 1097, 1098, - 1099, 1100, 1103, 1122, 1126, 1132, 1136, 1140, 1144, 1153, - 1162, 1166, 1171, 1177, 1188, 1188, 1189, 1191, 1195, 1199, - 1203, 1209, 1209, 1211, 1229, 1255, 1258, 1269, 1275, 1281, - 1282, 1289, 1295, 1301, 1309, 1315, 1321, 1329, 1335, 1341, - 1349, 1350, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, - 1361, 1362, 1363, 1366, 1375, 1379, 1383, 1389, 1398, 1402, - 1406, 1415, 1419, 1425, 1431, 1438, 1443, 1451, 1461, 1463, - 1471, 1477, 1481, 1485, 1491, 1502, 1511, 1515, 1520, 1524, - 1528, 1532, 1538, 1545, 1549, 1555, 1563, 1574, 1581, 1585, - 1591, 1601, 1612, 1616, 1634, 1643, 1646, 1652, 1656, 1660, - 1666, 1677, 1682, 1687, 1692, 1697, 1702, 1710, 1713, 1718, - 1731, 1739, 1750, 1758, 1758, 1760, 1760, 1762, 1772, 1777, - 1784, 1794, 1803, 1808, 1815, 1825, 1835, 1847, 1847, 1848, - 1848, 1850, 1860, 1868, 1878, 1886, 1894, 1903, 1914, 1918, - 1924, 1925, 1926, 1929, 1929, 1932, 1967, 1971, 1971, 1974, - 1981, 1990, 2004, 2013, 2022, 2026, 2035, 2044, 2055, 2062, - 2067, 2076, 2088, 2091, 2100, 2111, 2112, 2113, 2116, 2117, - 2118, 2121, 2122, 2125, 2126, 2129, 2130, 2133, 2144, 2155, - 2166, 2192, 2193 + 919, 932, 933, 934, 937, 951, 965, 985, 996, 1008, + 1010, 1011, 1012, 1013, 1016, 1016, 1016, 1016, 1017, 1020, + 1024, 1029, 1036, 1043, 1050, 1073, 1096, 1097, 1098, 1099, + 1100, 1101, 1104, 1123, 1127, 1133, 1137, 1141, 1145, 1154, + 1163, 1167, 1172, 1178, 1189, 1189, 1190, 1192, 1196, 1200, + 1204, 1210, 1210, 1212, 1230, 1256, 1259, 1270, 1276, 1282, + 1283, 1290, 1296, 1302, 1310, 1316, 1322, 1330, 1336, 1342, + 1350, 1351, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, + 1362, 1363, 1364, 1367, 1376, 1380, 1384, 1390, 1399, 1403, + 1407, 1416, 1420, 1426, 1432, 1439, 1444, 1452, 1462, 1464, + 1472, 1478, 1482, 1486, 1492, 1503, 1512, 1516, 1521, 1525, + 1529, 1533, 1539, 1546, 1550, 1556, 1564, 1575, 1582, 1586, + 1592, 1602, 1613, 1617, 1635, 1644, 1647, 1653, 1657, 1661, + 1667, 1678, 1683, 1688, 1693, 1698, 1703, 1711, 1714, 1719, + 1732, 1740, 1751, 1759, 1759, 1761, 1761, 1763, 1773, 1778, + 1785, 1795, 1804, 1809, 1816, 1826, 1836, 1848, 1848, 1849, + 1849, 1851, 1861, 1869, 1879, 1887, 1895, 1904, 1915, 1919, + 1925, 1926, 1927, 1930, 1930, 1933, 1968, 1972, 1972, 1975, + 1982, 1991, 2005, 2014, 2023, 2027, 2036, 2045, 2056, 2063, + 2068, 2077, 2089, 2092, 2101, 2112, 2113, 2114, 2117, 2118, + 2119, 2122, 2123, 2126, 2127, 2130, 2131, 2134, 2145, 2156, + 2167, 2193, 2194 }; #endif @@ -2953,6 +2953,7 @@ yyreduce: */ init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.RelAddr = 1; + (yyval.src_reg).Base.Index = (yyvsp[(3) - (3)].integer); ;} break; @@ -2960,30 +2961,30 @@ yyreduce: case 71: /* Line 1455 of yacc.c */ -#line 931 "program_parse.y" +#line 932 "program_parse.y" { (yyval.integer) = 0; ;} break; case 72: /* Line 1455 of yacc.c */ -#line 932 "program_parse.y" +#line 933 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 73: /* Line 1455 of yacc.c */ -#line 933 "program_parse.y" +#line 934 "program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; case 74: /* Line 1455 of yacc.c */ -#line 937 "program_parse.y" +#line 938 "program_parse.y" { - if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 4095)) { + if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > (state->limits->MaxAddressOffset - 1))) { char s[100]; _mesa_snprintf(s, sizeof(s), "relative address offset too large (%d)", (yyvsp[(1) - (1)].integer)); @@ -2998,9 +2999,9 @@ yyreduce: case 75: /* Line 1455 of yacc.c */ -#line 951 "program_parse.y" +#line 952 "program_parse.y" { - if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 4096)) { + if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > state->limits->MaxAddressOffset)) { char s[100]; _mesa_snprintf(s, sizeof(s), "relative address offset too large (%d)", (yyvsp[(1) - (1)].integer)); @@ -3015,7 +3016,7 @@ yyreduce: case 76: /* Line 1455 of yacc.c */ -#line 965 "program_parse.y" +#line 966 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -3038,7 +3039,7 @@ yyreduce: case 77: /* Line 1455 of yacc.c */ -#line 985 "program_parse.y" +#line 986 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); @@ -3052,7 +3053,7 @@ yyreduce: case 78: /* Line 1455 of yacc.c */ -#line 996 "program_parse.y" +#line 997 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, @@ -3067,21 +3068,21 @@ yyreduce: case 83: /* Line 1455 of yacc.c */ -#line 1012 "program_parse.y" +#line 1013 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 88: /* Line 1455 of yacc.c */ -#line 1016 "program_parse.y" +#line 1017 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 89: /* Line 1455 of yacc.c */ -#line 1020 "program_parse.y" +#line 1021 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); ;} @@ -3090,7 +3091,7 @@ yyreduce: case 90: /* Line 1455 of yacc.c */ -#line 1024 "program_parse.y" +#line 1025 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); ;} @@ -3099,7 +3100,7 @@ yyreduce: case 91: /* Line 1455 of yacc.c */ -#line 1028 "program_parse.y" +#line 1029 "program_parse.y" { (yyval.dst_reg).CondMask = COND_TR; (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP; @@ -3110,7 +3111,7 @@ yyreduce: case 92: /* Line 1455 of yacc.c */ -#line 1036 "program_parse.y" +#line 1037 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle; @@ -3120,7 +3121,7 @@ yyreduce: case 93: /* Line 1455 of yacc.c */ -#line 1043 "program_parse.y" +#line 1044 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle; @@ -3130,7 +3131,7 @@ yyreduce: case 94: /* Line 1455 of yacc.c */ -#line 1050 "program_parse.y" +#line 1051 "program_parse.y" { const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) { @@ -3156,7 +3157,7 @@ yyreduce: case 95: /* Line 1455 of yacc.c */ -#line 1073 "program_parse.y" +#line 1074 "program_parse.y" { const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) { @@ -3182,7 +3183,7 @@ yyreduce: case 102: /* Line 1455 of yacc.c */ -#line 1104 "program_parse.y" +#line 1105 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); @@ -3204,7 +3205,7 @@ yyreduce: case 103: /* Line 1455 of yacc.c */ -#line 1123 "program_parse.y" +#line 1124 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} @@ -3213,7 +3214,7 @@ yyreduce: case 104: /* Line 1455 of yacc.c */ -#line 1127 "program_parse.y" +#line 1128 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} @@ -3222,7 +3223,7 @@ yyreduce: case 105: /* Line 1455 of yacc.c */ -#line 1133 "program_parse.y" +#line 1134 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; ;} @@ -3231,7 +3232,7 @@ yyreduce: case 106: /* Line 1455 of yacc.c */ -#line 1137 "program_parse.y" +#line 1138 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; ;} @@ -3240,7 +3241,7 @@ yyreduce: case 107: /* Line 1455 of yacc.c */ -#line 1141 "program_parse.y" +#line 1142 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; ;} @@ -3249,7 +3250,7 @@ yyreduce: case 108: /* Line 1455 of yacc.c */ -#line 1145 "program_parse.y" +#line 1146 "program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); @@ -3263,7 +3264,7 @@ yyreduce: case 109: /* Line 1455 of yacc.c */ -#line 1154 "program_parse.y" +#line 1155 "program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); @@ -3277,7 +3278,7 @@ yyreduce: case 110: /* Line 1455 of yacc.c */ -#line 1163 "program_parse.y" +#line 1164 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} @@ -3286,7 +3287,7 @@ yyreduce: case 111: /* Line 1455 of yacc.c */ -#line 1167 "program_parse.y" +#line 1168 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -3296,7 +3297,7 @@ yyreduce: case 112: /* Line 1455 of yacc.c */ -#line 1172 "program_parse.y" +#line 1173 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); ;} @@ -3305,7 +3306,7 @@ yyreduce: case 113: /* Line 1455 of yacc.c */ -#line 1178 "program_parse.y" +#line 1179 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); @@ -3319,7 +3320,7 @@ yyreduce: case 117: /* Line 1455 of yacc.c */ -#line 1192 "program_parse.y" +#line 1193 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; ;} @@ -3328,7 +3329,7 @@ yyreduce: case 118: /* Line 1455 of yacc.c */ -#line 1196 "program_parse.y" +#line 1197 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); ;} @@ -3337,7 +3338,7 @@ yyreduce: case 119: /* Line 1455 of yacc.c */ -#line 1200 "program_parse.y" +#line 1201 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; ;} @@ -3346,7 +3347,7 @@ yyreduce: case 120: /* Line 1455 of yacc.c */ -#line 1204 "program_parse.y" +#line 1205 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} @@ -3355,7 +3356,7 @@ yyreduce: case 123: /* Line 1455 of yacc.c */ -#line 1212 "program_parse.y" +#line 1213 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); @@ -3376,7 +3377,7 @@ yyreduce: case 124: /* Line 1455 of yacc.c */ -#line 1230 "program_parse.y" +#line 1231 "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)); @@ -3404,7 +3405,7 @@ yyreduce: case 125: /* Line 1455 of yacc.c */ -#line 1255 "program_parse.y" +#line 1256 "program_parse.y" { (yyval.integer) = 0; ;} @@ -3413,7 +3414,7 @@ yyreduce: case 126: /* Line 1455 of yacc.c */ -#line 1259 "program_parse.y" +#line 1260 "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"); @@ -3427,7 +3428,7 @@ yyreduce: case 127: /* Line 1455 of yacc.c */ -#line 1270 "program_parse.y" +#line 1271 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); ;} @@ -3436,7 +3437,7 @@ yyreduce: case 128: /* Line 1455 of yacc.c */ -#line 1276 "program_parse.y" +#line 1277 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); ;} @@ -3445,7 +3446,7 @@ yyreduce: case 130: /* Line 1455 of yacc.c */ -#line 1283 "program_parse.y" +#line 1284 "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); @@ -3455,7 +3456,7 @@ yyreduce: case 131: /* Line 1455 of yacc.c */ -#line 1290 "program_parse.y" +#line 1291 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3466,7 +3467,7 @@ yyreduce: case 132: /* Line 1455 of yacc.c */ -#line 1296 "program_parse.y" +#line 1297 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3477,7 +3478,7 @@ yyreduce: case 133: /* Line 1455 of yacc.c */ -#line 1302 "program_parse.y" +#line 1303 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3488,7 +3489,7 @@ yyreduce: case 134: /* Line 1455 of yacc.c */ -#line 1310 "program_parse.y" +#line 1311 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3499,7 +3500,7 @@ yyreduce: case 135: /* Line 1455 of yacc.c */ -#line 1316 "program_parse.y" +#line 1317 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3510,7 +3511,7 @@ yyreduce: case 136: /* Line 1455 of yacc.c */ -#line 1322 "program_parse.y" +#line 1323 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3521,7 +3522,7 @@ yyreduce: case 137: /* Line 1455 of yacc.c */ -#line 1330 "program_parse.y" +#line 1331 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3532,7 +3533,7 @@ yyreduce: case 138: /* Line 1455 of yacc.c */ -#line 1336 "program_parse.y" +#line 1337 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3543,7 +3544,7 @@ yyreduce: case 139: /* Line 1455 of yacc.c */ -#line 1342 "program_parse.y" +#line 1343 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3554,98 +3555,98 @@ yyreduce: case 140: /* Line 1455 of yacc.c */ -#line 1349 "program_parse.y" +#line 1350 "program_parse.y" { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; case 141: /* Line 1455 of yacc.c */ -#line 1350 "program_parse.y" +#line 1351 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 142: /* Line 1455 of yacc.c */ -#line 1353 "program_parse.y" +#line 1354 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 143: /* Line 1455 of yacc.c */ -#line 1354 "program_parse.y" +#line 1355 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 144: /* Line 1455 of yacc.c */ -#line 1355 "program_parse.y" +#line 1356 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 145: /* Line 1455 of yacc.c */ -#line 1356 "program_parse.y" +#line 1357 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 146: /* Line 1455 of yacc.c */ -#line 1357 "program_parse.y" +#line 1358 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 147: /* Line 1455 of yacc.c */ -#line 1358 "program_parse.y" +#line 1359 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 148: /* Line 1455 of yacc.c */ -#line 1359 "program_parse.y" +#line 1360 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 149: /* Line 1455 of yacc.c */ -#line 1360 "program_parse.y" +#line 1361 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 150: /* Line 1455 of yacc.c */ -#line 1361 "program_parse.y" +#line 1362 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 151: /* Line 1455 of yacc.c */ -#line 1362 "program_parse.y" +#line 1363 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 152: /* Line 1455 of yacc.c */ -#line 1363 "program_parse.y" +#line 1364 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 153: /* Line 1455 of yacc.c */ -#line 1367 "program_parse.y" +#line 1368 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3657,7 +3658,7 @@ yyreduce: case 154: /* Line 1455 of yacc.c */ -#line 1376 "program_parse.y" +#line 1377 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3666,7 +3667,7 @@ yyreduce: case 155: /* Line 1455 of yacc.c */ -#line 1380 "program_parse.y" +#line 1381 "program_parse.y" { (yyval.integer) = STATE_EMISSION; ;} @@ -3675,7 +3676,7 @@ yyreduce: case 156: /* Line 1455 of yacc.c */ -#line 1384 "program_parse.y" +#line 1385 "program_parse.y" { (yyval.integer) = STATE_SHININESS; ;} @@ -3684,7 +3685,7 @@ yyreduce: case 157: /* Line 1455 of yacc.c */ -#line 1390 "program_parse.y" +#line 1391 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3696,7 +3697,7 @@ yyreduce: case 158: /* Line 1455 of yacc.c */ -#line 1399 "program_parse.y" +#line 1400 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3705,7 +3706,7 @@ yyreduce: case 159: /* Line 1455 of yacc.c */ -#line 1403 "program_parse.y" +#line 1404 "program_parse.y" { (yyval.integer) = STATE_POSITION; ;} @@ -3714,7 +3715,7 @@ yyreduce: case 160: /* Line 1455 of yacc.c */ -#line 1407 "program_parse.y" +#line 1408 "program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); @@ -3728,7 +3729,7 @@ yyreduce: case 161: /* Line 1455 of yacc.c */ -#line 1416 "program_parse.y" +#line 1417 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} @@ -3737,7 +3738,7 @@ yyreduce: case 162: /* Line 1455 of yacc.c */ -#line 1420 "program_parse.y" +#line 1421 "program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; ;} @@ -3746,7 +3747,7 @@ yyreduce: case 163: /* Line 1455 of yacc.c */ -#line 1426 "program_parse.y" +#line 1427 "program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; ;} @@ -3755,7 +3756,7 @@ yyreduce: case 164: /* Line 1455 of yacc.c */ -#line 1432 "program_parse.y" +#line 1433 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; @@ -3765,7 +3766,7 @@ yyreduce: case 165: /* Line 1455 of yacc.c */ -#line 1439 "program_parse.y" +#line 1440 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; @@ -3775,7 +3776,7 @@ yyreduce: case 166: /* Line 1455 of yacc.c */ -#line 1444 "program_parse.y" +#line 1445 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3786,7 +3787,7 @@ yyreduce: case 167: /* Line 1455 of yacc.c */ -#line 1452 "program_parse.y" +#line 1453 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3799,7 +3800,7 @@ yyreduce: case 169: /* Line 1455 of yacc.c */ -#line 1464 "program_parse.y" +#line 1465 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(3) - (3)].integer); @@ -3810,7 +3811,7 @@ yyreduce: case 170: /* Line 1455 of yacc.c */ -#line 1472 "program_parse.y" +#line 1473 "program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; ;} @@ -3819,7 +3820,7 @@ yyreduce: case 171: /* Line 1455 of yacc.c */ -#line 1478 "program_parse.y" +#line 1479 "program_parse.y" { (yyval.integer) = STATE_AMBIENT; ;} @@ -3828,7 +3829,7 @@ yyreduce: case 172: /* Line 1455 of yacc.c */ -#line 1482 "program_parse.y" +#line 1483 "program_parse.y" { (yyval.integer) = STATE_DIFFUSE; ;} @@ -3837,7 +3838,7 @@ yyreduce: case 173: /* Line 1455 of yacc.c */ -#line 1486 "program_parse.y" +#line 1487 "program_parse.y" { (yyval.integer) = STATE_SPECULAR; ;} @@ -3846,7 +3847,7 @@ yyreduce: case 174: /* Line 1455 of yacc.c */ -#line 1492 "program_parse.y" +#line 1493 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); @@ -3860,7 +3861,7 @@ yyreduce: case 175: /* Line 1455 of yacc.c */ -#line 1503 "program_parse.y" +#line 1504 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3872,7 +3873,7 @@ yyreduce: case 176: /* Line 1455 of yacc.c */ -#line 1512 "program_parse.y" +#line 1513 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; ;} @@ -3881,7 +3882,7 @@ yyreduce: case 177: /* Line 1455 of yacc.c */ -#line 1516 "program_parse.y" +#line 1517 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; ;} @@ -3890,7 +3891,7 @@ yyreduce: case 178: /* Line 1455 of yacc.c */ -#line 1521 "program_parse.y" +#line 1522 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; ;} @@ -3899,7 +3900,7 @@ yyreduce: case 179: /* Line 1455 of yacc.c */ -#line 1525 "program_parse.y" +#line 1526 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; ;} @@ -3908,7 +3909,7 @@ yyreduce: case 180: /* Line 1455 of yacc.c */ -#line 1529 "program_parse.y" +#line 1530 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; ;} @@ -3917,7 +3918,7 @@ yyreduce: case 181: /* Line 1455 of yacc.c */ -#line 1533 "program_parse.y" +#line 1534 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; ;} @@ -3926,7 +3927,7 @@ yyreduce: case 182: /* Line 1455 of yacc.c */ -#line 1539 "program_parse.y" +#line 1540 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); @@ -3936,7 +3937,7 @@ yyreduce: case 183: /* Line 1455 of yacc.c */ -#line 1546 "program_parse.y" +#line 1547 "program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; ;} @@ -3945,7 +3946,7 @@ yyreduce: case 184: /* Line 1455 of yacc.c */ -#line 1550 "program_parse.y" +#line 1551 "program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; ;} @@ -3954,7 +3955,7 @@ yyreduce: case 185: /* Line 1455 of yacc.c */ -#line 1556 "program_parse.y" +#line 1557 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3965,7 +3966,7 @@ yyreduce: case 186: /* Line 1455 of yacc.c */ -#line 1564 "program_parse.y" +#line 1565 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); @@ -3979,7 +3980,7 @@ yyreduce: case 187: /* Line 1455 of yacc.c */ -#line 1575 "program_parse.y" +#line 1576 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); @@ -3989,7 +3990,7 @@ yyreduce: case 188: /* Line 1455 of yacc.c */ -#line 1582 "program_parse.y" +#line 1583 "program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; ;} @@ -3998,7 +3999,7 @@ yyreduce: case 189: /* Line 1455 of yacc.c */ -#line 1586 "program_parse.y" +#line 1587 "program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; ;} @@ -4007,7 +4008,7 @@ yyreduce: case 190: /* Line 1455 of yacc.c */ -#line 1592 "program_parse.y" +#line 1593 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; @@ -4020,7 +4021,7 @@ yyreduce: case 191: /* Line 1455 of yacc.c */ -#line 1602 "program_parse.y" +#line 1603 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; @@ -4033,7 +4034,7 @@ yyreduce: case 192: /* Line 1455 of yacc.c */ -#line 1612 "program_parse.y" +#line 1613 "program_parse.y" { (yyval.state)[2] = 0; (yyval.state)[3] = 3; @@ -4043,7 +4044,7 @@ yyreduce: case 193: /* Line 1455 of yacc.c */ -#line 1617 "program_parse.y" +#line 1618 "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). @@ -4064,7 +4065,7 @@ yyreduce: case 194: /* Line 1455 of yacc.c */ -#line 1635 "program_parse.y" +#line 1636 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; @@ -4075,7 +4076,7 @@ yyreduce: case 195: /* Line 1455 of yacc.c */ -#line 1643 "program_parse.y" +#line 1644 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4084,7 +4085,7 @@ yyreduce: case 196: /* Line 1455 of yacc.c */ -#line 1647 "program_parse.y" +#line 1648 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -4093,7 +4094,7 @@ yyreduce: case 197: /* Line 1455 of yacc.c */ -#line 1653 "program_parse.y" +#line 1654 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; ;} @@ -4102,7 +4103,7 @@ yyreduce: case 198: /* Line 1455 of yacc.c */ -#line 1657 "program_parse.y" +#line 1658 "program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; ;} @@ -4111,7 +4112,7 @@ yyreduce: case 199: /* Line 1455 of yacc.c */ -#line 1661 "program_parse.y" +#line 1662 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; ;} @@ -4120,7 +4121,7 @@ yyreduce: case 200: /* Line 1455 of yacc.c */ -#line 1667 "program_parse.y" +#line 1668 "program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); @@ -4134,7 +4135,7 @@ yyreduce: case 201: /* Line 1455 of yacc.c */ -#line 1678 "program_parse.y" +#line 1679 "program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); @@ -4144,7 +4145,7 @@ yyreduce: case 202: /* Line 1455 of yacc.c */ -#line 1683 "program_parse.y" +#line 1684 "program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; @@ -4154,7 +4155,7 @@ yyreduce: case 203: /* Line 1455 of yacc.c */ -#line 1688 "program_parse.y" +#line 1689 "program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; @@ -4164,7 +4165,7 @@ yyreduce: case 204: /* Line 1455 of yacc.c */ -#line 1693 "program_parse.y" +#line 1694 "program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); @@ -4174,7 +4175,7 @@ yyreduce: case 205: /* Line 1455 of yacc.c */ -#line 1698 "program_parse.y" +#line 1699 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -4184,7 +4185,7 @@ yyreduce: case 206: /* Line 1455 of yacc.c */ -#line 1703 "program_parse.y" +#line 1704 "program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[(3) - (4)].integer); @@ -4194,7 +4195,7 @@ yyreduce: case 207: /* Line 1455 of yacc.c */ -#line 1710 "program_parse.y" +#line 1711 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4203,7 +4204,7 @@ yyreduce: case 208: /* Line 1455 of yacc.c */ -#line 1714 "program_parse.y" +#line 1715 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} @@ -4212,7 +4213,7 @@ yyreduce: case 209: /* Line 1455 of yacc.c */ -#line 1719 "program_parse.y" +#line 1720 "program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -4229,7 +4230,7 @@ yyreduce: case 210: /* Line 1455 of yacc.c */ -#line 1732 "program_parse.y" +#line 1733 "program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -4241,7 +4242,7 @@ yyreduce: case 211: /* Line 1455 of yacc.c */ -#line 1740 "program_parse.y" +#line 1741 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); @@ -4255,7 +4256,7 @@ yyreduce: case 212: /* Line 1455 of yacc.c */ -#line 1751 "program_parse.y" +#line 1752 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; @@ -4265,7 +4266,7 @@ yyreduce: case 217: /* Line 1455 of yacc.c */ -#line 1763 "program_parse.y" +#line 1764 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4278,7 +4279,7 @@ yyreduce: case 218: /* Line 1455 of yacc.c */ -#line 1773 "program_parse.y" +#line 1774 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); @@ -4288,7 +4289,7 @@ yyreduce: case 219: /* Line 1455 of yacc.c */ -#line 1778 "program_parse.y" +#line 1779 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); @@ -4298,7 +4299,7 @@ yyreduce: case 220: /* Line 1455 of yacc.c */ -#line 1785 "program_parse.y" +#line 1786 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4311,7 +4312,7 @@ yyreduce: case 221: /* Line 1455 of yacc.c */ -#line 1795 "program_parse.y" +#line 1796 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4324,7 +4325,7 @@ yyreduce: case 222: /* Line 1455 of yacc.c */ -#line 1804 "program_parse.y" +#line 1805 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); @@ -4334,7 +4335,7 @@ yyreduce: case 223: /* Line 1455 of yacc.c */ -#line 1809 "program_parse.y" +#line 1810 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); @@ -4344,7 +4345,7 @@ yyreduce: case 224: /* Line 1455 of yacc.c */ -#line 1816 "program_parse.y" +#line 1817 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4357,7 +4358,7 @@ yyreduce: case 225: /* Line 1455 of yacc.c */ -#line 1826 "program_parse.y" +#line 1827 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); @@ -4370,7 +4371,7 @@ yyreduce: case 226: /* Line 1455 of yacc.c */ -#line 1836 "program_parse.y" +#line 1837 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); @@ -4383,7 +4384,7 @@ yyreduce: case 231: /* Line 1455 of yacc.c */ -#line 1851 "program_parse.y" +#line 1852 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4396,7 +4397,7 @@ yyreduce: case 232: /* Line 1455 of yacc.c */ -#line 1861 "program_parse.y" +#line 1862 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4409,7 +4410,7 @@ yyreduce: case 233: /* Line 1455 of yacc.c */ -#line 1869 "program_parse.y" +#line 1870 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer); @@ -4422,7 +4423,7 @@ yyreduce: case 234: /* Line 1455 of yacc.c */ -#line 1879 "program_parse.y" +#line 1880 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (3)].real); @@ -4435,7 +4436,7 @@ yyreduce: case 235: /* Line 1455 of yacc.c */ -#line 1887 "program_parse.y" +#line 1888 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (5)].real); @@ -4448,7 +4449,7 @@ yyreduce: case 236: /* Line 1455 of yacc.c */ -#line 1896 "program_parse.y" +#line 1897 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (7)].real); @@ -4461,7 +4462,7 @@ yyreduce: case 237: /* Line 1455 of yacc.c */ -#line 1905 "program_parse.y" +#line 1906 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (9)].real); @@ -4474,7 +4475,7 @@ yyreduce: case 238: /* Line 1455 of yacc.c */ -#line 1915 "program_parse.y" +#line 1916 "program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); ;} @@ -4483,7 +4484,7 @@ yyreduce: case 239: /* Line 1455 of yacc.c */ -#line 1919 "program_parse.y" +#line 1920 "program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); ;} @@ -4492,35 +4493,35 @@ yyreduce: case 240: /* Line 1455 of yacc.c */ -#line 1924 "program_parse.y" +#line 1925 "program_parse.y" { (yyval.negate) = FALSE; ;} break; case 241: /* Line 1455 of yacc.c */ -#line 1925 "program_parse.y" +#line 1926 "program_parse.y" { (yyval.negate) = TRUE; ;} break; case 242: /* Line 1455 of yacc.c */ -#line 1926 "program_parse.y" +#line 1927 "program_parse.y" { (yyval.negate) = FALSE; ;} break; case 243: /* Line 1455 of yacc.c */ -#line 1929 "program_parse.y" +#line 1930 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 245: /* Line 1455 of yacc.c */ -#line 1933 "program_parse.y" +#line 1934 "program_parse.y" { /* NV_fragment_program_option defines the size qualifiers in a * fairly broken way. "SHORT" or "LONG" can optionally be used @@ -4559,7 +4560,7 @@ yyreduce: case 246: /* Line 1455 of yacc.c */ -#line 1967 "program_parse.y" +#line 1968 "program_parse.y" { ;} break; @@ -4567,14 +4568,14 @@ yyreduce: case 247: /* Line 1455 of yacc.c */ -#line 1971 "program_parse.y" +#line 1972 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; case 249: /* Line 1455 of yacc.c */ -#line 1975 "program_parse.y" +#line 1976 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { free((yyvsp[(3) - (3)].string)); @@ -4586,7 +4587,7 @@ yyreduce: case 250: /* Line 1455 of yacc.c */ -#line 1982 "program_parse.y" +#line 1983 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { free((yyvsp[(1) - (1)].string)); @@ -4598,7 +4599,7 @@ yyreduce: case 251: /* Line 1455 of yacc.c */ -#line 1991 "program_parse.y" +#line 1992 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)])); @@ -4615,7 +4616,7 @@ yyreduce: case 252: /* Line 1455 of yacc.c */ -#line 2005 "program_parse.y" +#line 2006 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4629,7 +4630,7 @@ yyreduce: case 253: /* Line 1455 of yacc.c */ -#line 2014 "program_parse.y" +#line 2015 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4643,7 +4644,7 @@ yyreduce: case 254: /* Line 1455 of yacc.c */ -#line 2023 "program_parse.y" +#line 2024 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} @@ -4652,7 +4653,7 @@ yyreduce: case 255: /* Line 1455 of yacc.c */ -#line 2027 "program_parse.y" +#line 2028 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4666,7 +4667,7 @@ yyreduce: case 256: /* Line 1455 of yacc.c */ -#line 2036 "program_parse.y" +#line 2037 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4680,7 +4681,7 @@ yyreduce: case 257: /* Line 1455 of yacc.c */ -#line 2045 "program_parse.y" +#line 2046 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4694,7 +4695,7 @@ yyreduce: case 258: /* Line 1455 of yacc.c */ -#line 2056 "program_parse.y" +#line 2057 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} @@ -4703,7 +4704,7 @@ yyreduce: case 259: /* Line 1455 of yacc.c */ -#line 2062 "program_parse.y" +#line 2063 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4714,7 +4715,7 @@ yyreduce: case 260: /* Line 1455 of yacc.c */ -#line 2068 "program_parse.y" +#line 2069 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4728,7 +4729,7 @@ yyreduce: case 261: /* Line 1455 of yacc.c */ -#line 2077 "program_parse.y" +#line 2078 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4742,7 +4743,7 @@ yyreduce: case 262: /* Line 1455 of yacc.c */ -#line 2088 "program_parse.y" +#line 2089 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4751,7 +4752,7 @@ yyreduce: case 263: /* Line 1455 of yacc.c */ -#line 2092 "program_parse.y" +#line 2093 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4765,7 +4766,7 @@ yyreduce: case 264: /* Line 1455 of yacc.c */ -#line 2101 "program_parse.y" +#line 2102 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4779,91 +4780,91 @@ yyreduce: case 265: /* Line 1455 of yacc.c */ -#line 2111 "program_parse.y" +#line 2112 "program_parse.y" { (yyval.integer) = 0; ;} break; case 266: /* Line 1455 of yacc.c */ -#line 2112 "program_parse.y" +#line 2113 "program_parse.y" { (yyval.integer) = 0; ;} break; case 267: /* Line 1455 of yacc.c */ -#line 2113 "program_parse.y" +#line 2114 "program_parse.y" { (yyval.integer) = 1; ;} break; case 268: /* Line 1455 of yacc.c */ -#line 2116 "program_parse.y" +#line 2117 "program_parse.y" { (yyval.integer) = 0; ;} break; case 269: /* Line 1455 of yacc.c */ -#line 2117 "program_parse.y" +#line 2118 "program_parse.y" { (yyval.integer) = 0; ;} break; case 270: /* Line 1455 of yacc.c */ -#line 2118 "program_parse.y" +#line 2119 "program_parse.y" { (yyval.integer) = 1; ;} break; case 271: /* Line 1455 of yacc.c */ -#line 2121 "program_parse.y" +#line 2122 "program_parse.y" { (yyval.integer) = 0; ;} break; case 272: /* Line 1455 of yacc.c */ -#line 2122 "program_parse.y" +#line 2123 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 273: /* Line 1455 of yacc.c */ -#line 2125 "program_parse.y" +#line 2126 "program_parse.y" { (yyval.integer) = 0; ;} break; case 274: /* Line 1455 of yacc.c */ -#line 2126 "program_parse.y" +#line 2127 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 275: /* Line 1455 of yacc.c */ -#line 2129 "program_parse.y" +#line 2130 "program_parse.y" { (yyval.integer) = 0; ;} break; case 276: /* Line 1455 of yacc.c */ -#line 2130 "program_parse.y" +#line 2131 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 277: /* Line 1455 of yacc.c */ -#line 2134 "program_parse.y" +#line 2135 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4877,7 +4878,7 @@ yyreduce: case 278: /* Line 1455 of yacc.c */ -#line 2145 "program_parse.y" +#line 2146 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4891,7 +4892,7 @@ yyreduce: case 279: /* Line 1455 of yacc.c */ -#line 2156 "program_parse.y" +#line 2157 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4905,7 +4906,7 @@ yyreduce: case 280: /* Line 1455 of yacc.c */ -#line 2167 "program_parse.y" +#line 2168 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4934,7 +4935,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4938 "program_parse.tab.c" +#line 4939 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -5153,7 +5154,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 2196 "program_parse.y" +#line 2197 "program_parse.y" void diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y index fb6ef85..36549c4 100644 --- a/src/mesa/program/program_parse.y +++ b/src/mesa/program/program_parse.y @@ -935,7 +935,7 @@ addrRegRelOffset: { $$ = 0; } addrRegPosOffset: INTEGER { - if (($1 < 0) || ($1 > 4095)) { + if (($1 < 0) || ($1 > (state->limits->MaxAddressOffset - 1))) { char s[100]; _mesa_snprintf(s, sizeof(s), "relative address offset too large (%d)", $1); @@ -949,7 +949,7 @@ addrRegPosOffset: INTEGER addrRegNegOffset: INTEGER { - if (($1 < 0) || ($1 > 4096)) { + if (($1 < 0) || ($1 > state->limits->MaxAddressOffset)) { char s[100]; _mesa_snprintf(s, sizeof(s), "relative address offset too large (%d)", $1); -- 1.7.1.1