From 67d4a5b15cfd8583c19a5776b0ec1564b60239eb Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sun, 23 Aug 2009 23:50:27 +0100 Subject: mesa/swrast: use one fewer divide in swrast's choose_cube_face also Same change as for softpipe --- src/mesa/swrast/s_texfilter.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 6b1f9346475..216c107e3f3 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1905,8 +1905,12 @@ choose_cube_face(const struct gl_texture_object *texObj, } } - newCoord[0] = ( sc / ma + 1.0F ) * 0.5F; - newCoord[1] = ( tc / ma + 1.0F ) * 0.5F; + { + const float ima = 1.0F / ma; + newCoord[0] = ( sc * ima + 1.0F ) * 0.5F; + newCoord[1] = ( tc * ima + 1.0F ) * 0.5F; + } + return (const struct gl_texture_image **) texObj->Image[face]; } -- cgit v1.2.3 From efff7aa980e78dc3ee1782308f0c9f3861c9992a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 31 Aug 2009 16:43:39 -0700 Subject: NV fp: Add tracking for NV_fragment_program_option --- src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + 2 files changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 195fdde3468..903da99ed0c 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -162,6 +162,7 @@ static const struct { { ON, "GL_MESA_window_pos", F(ARB_window_pos) }, { OFF, "GL_NV_blend_square", F(NV_blend_square) }, { OFF, "GL_NV_fragment_program", F(NV_fragment_program) }, + { OFF, "GL_NV_fragment_program_option", F(NV_fragment_program_option) }, { ON, "GL_NV_light_max_exponent", F(NV_light_max_exponent) }, { OFF, "GL_NV_point_sprite", F(NV_point_sprite) }, { OFF, "GL_NV_texture_env_combine4", F(NV_texture_env_combine4) }, diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 53dc6360ea1..a99a25597f4 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2553,6 +2553,7 @@ struct gl_extensions GLboolean MESA_texture_signed_rgba; GLboolean NV_blend_square; GLboolean NV_fragment_program; + GLboolean NV_fragment_program_option; GLboolean NV_light_max_exponent; GLboolean NV_point_sprite; GLboolean NV_texgen_reflection; -- cgit v1.2.3 From dc8ec05ace3d2a0284dbe47ec2d88168b1efb517 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 31 Aug 2009 16:57:49 -0700 Subject: NV fp: Parse 'OPTION NV_fragment_program' in ARB assembly shaders --- src/mesa/shader/program_parse_extra.c | 11 +++++++++++ src/mesa/shader/program_parser.h | 1 + 2 files changed, 12 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/program_parse_extra.c b/src/mesa/shader/program_parse_extra.c index 8e4be606f16..79e80c54d71 100644 --- a/src/mesa/shader/program_parse_extra.c +++ b/src/mesa/shader/program_parse_extra.c @@ -102,6 +102,17 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option) return 1; } } + } else if (strncmp(option, "NV_fragment_program", 19) == 0) { + option += 19; + + /* Other NV_fragment_program strings may be supported later. + */ + if (option[0] == '\0') { + if (state->ctx->Extensions.NV_fragment_program_option) { + state->option.NV_fragment = 1; + return 1; + } + } } else if (strncmp(option, "MESA_", 5) == 0) { option += 5; diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h index fa47d84565a..be32a1bed15 100644 --- a/src/mesa/shader/program_parser.h +++ b/src/mesa/shader/program_parser.h @@ -202,6 +202,7 @@ struct asm_parser_state { unsigned Shadow:1; unsigned TexRect:1; unsigned TexArray:1; + unsigned NV_fragment:1; } option; struct { -- cgit v1.2.3 From ede0cd4d8c8eb8c6c443c84905138091944d69af Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 31 Aug 2009 17:00:31 -0700 Subject: NV fp lexer: Add new opcodes --- src/mesa/shader/lex.yy.c | 1766 ++++++++++++++++++++--------------- src/mesa/shader/program_lexer.l | 36 + src/mesa/shader/program_parse.tab.c | 671 ++++++------- src/mesa/shader/program_parse.tab.h | 171 ++-- src/mesa/shader/program_parse.y | 2 +- 5 files changed, 1455 insertions(+), 1191 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c index 6d661bd1874..5bde12a6b77 100644 --- a/src/mesa/shader/lex.yy.c +++ b/src/mesa/shader/lex.yy.c @@ -357,8 +357,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 183 -#define YY_END_OF_BUFFER 184 +#define YY_NUM_RULES 217 +#define YY_END_OF_BUFFER 218 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -366,82 +366,93 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[675] = +static yyconst flex_int16_t yy_accept[776] = { 0, - 0, 0, 184, 182, 180, 179, 182, 182, 152, 178, - 154, 154, 154, 154, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 180, 0, 0, 181, 152, 0, - 153, 155, 175, 175, 0, 0, 0, 0, 175, 0, - 0, 0, 0, 0, 0, 0, 132, 176, 133, 134, - 166, 166, 166, 166, 0, 154, 0, 140, 141, 142, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 174, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 173, 173, 0, 0, 0, + 0, 0, 218, 216, 214, 213, 216, 216, 186, 212, + 188, 188, 188, 188, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 214, 0, 0, 215, 186, + 0, 187, 189, 209, 209, 0, 0, 0, 0, 209, + 0, 0, 0, 0, 0, 0, 0, 166, 210, 167, + 168, 200, 200, 200, 200, 0, 188, 0, 174, 175, + 176, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 208, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 207, 207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 163, 163, 163, 164, 164, 165, 156, - 155, 156, 0, 157, 11, 13, 152, 15, 152, 152, - 16, 18, 152, 20, 22, 24, 26, 6, 28, 30, - 31, 33, 35, 38, 36, 40, 41, 43, 45, 47, - - 49, 51, 152, 152, 152, 53, 55, 152, 57, 59, - 61, 152, 63, 65, 67, 69, 152, 71, 73, 75, - 77, 152, 152, 152, 152, 152, 152, 0, 0, 0, - 0, 155, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 93, 94, 96, 0, 171, 0, 0, 0, - 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 170, 169, 169, 122, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 160, 160, - 161, 162, 0, 158, 152, 152, 152, 152, 152, 152, - 152, 152, 143, 152, 152, 152, 152, 152, 152, 152, - - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 144, 152, 152, 152, 152, 152, 152, - 152, 152, 10, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 0, 177, 0, 0, 0, 86, 87, - 0, 0, 0, 0, 0, 0, 0, 98, 0, 0, + 206, 206, 206, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 197, 197, 197, 198, 198, 199, 190, + 189, 190, 0, 191, 11, 13, 186, 15, 186, 186, + 16, 18, 186, 20, 22, 24, 26, 28, 30, 6, + + 32, 34, 35, 37, 39, 42, 40, 44, 45, 47, + 49, 51, 53, 55, 186, 186, 186, 186, 186, 65, + 67, 186, 69, 71, 73, 75, 77, 79, 81, 186, + 83, 85, 87, 89, 91, 93, 95, 186, 97, 99, + 101, 103, 186, 109, 111, 186, 186, 186, 186, 186, + 186, 0, 0, 0, 0, 189, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 127, 128, 130, 0, + 205, 0, 0, 0, 0, 0, 0, 144, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 204, 203, + 203, 156, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 194, 194, 195, 196, 0, 192, 186, 186, + 186, 186, 186, 186, 186, 186, 177, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 57, 186, 61, + 186, 186, 186, 178, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 10, + 186, 186, 186, 186, 105, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 0, 211, 0, 0, 0, 120, + 121, 0, 0, 0, 0, 0, 0, 0, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, - 126, 0, 128, 0, 0, 0, 0, 0, 0, 167, - 159, 152, 152, 152, 4, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - - 152, 152, 152, 152, 152, 152, 9, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 82, 152, 152, 0, 0, 0, - 0, 0, 88, 89, 0, 0, 0, 0, 97, 0, - 0, 101, 104, 0, 0, 0, 0, 0, 0, 0, - 115, 116, 0, 0, 0, 0, 121, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 152, 152, 152, - 152, 152, 152, 5, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 7, 8, 152, 152, 152, 152, 152, 152, 152, - - 152, 152, 152, 152, 152, 152, 152, 152, 152, 83, - 152, 79, 0, 0, 0, 0, 137, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 107, 0, 111, 112, - 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 130, 131, 0, 0, 138, 12, 3, 14, - 148, 149, 152, 17, 19, 21, 23, 25, 27, 29, - 32, 34, 39, 37, 42, 44, 46, 48, 50, 52, - 54, 56, 58, 60, 62, 152, 152, 152, 64, 66, - 68, 70, 72, 74, 76, 78, 152, 81, 139, 0, - 0, 84, 0, 90, 0, 0, 0, 99, 0, 0, - - 0, 0, 0, 0, 113, 0, 0, 119, 106, 0, - 0, 0, 0, 0, 0, 135, 0, 152, 145, 146, - 152, 80, 0, 0, 0, 0, 92, 95, 100, 0, - 0, 105, 0, 0, 0, 118, 0, 0, 0, 0, - 127, 129, 0, 152, 152, 2, 1, 0, 91, 0, - 103, 0, 109, 117, 0, 0, 124, 125, 136, 152, - 147, 0, 102, 0, 120, 123, 152, 85, 108, 152, - 152, 150, 151, 0 + + 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, + 0, 160, 0, 162, 0, 0, 0, 0, 0, 0, + 201, 193, 186, 186, 186, 4, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 9, + 186, 59, 186, 63, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 107, 186, 186, 186, + 186, 186, 116, 186, 186, 0, 0, 0, 0, 0, + 122, 123, 0, 0, 0, 0, 131, 0, 0, 135, + + 138, 0, 0, 0, 0, 0, 0, 0, 149, 150, + 0, 0, 0, 0, 155, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 186, 186, 186, 186, 186, + 186, 5, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 7, 8, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, + 186, 186, 186, 186, 117, 186, 113, 0, 0, 0, + 0, 171, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 141, 0, 145, 146, 0, 148, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 164, 165, 0, + 0, 172, 12, 3, 14, 182, 183, 186, 17, 19, + 21, 23, 25, 27, 29, 31, 33, 36, 38, 43, + 41, 46, 48, 50, 52, 54, 56, 186, 186, 186, + 186, 66, 68, 70, 72, 74, 76, 78, 80, 82, + 186, 186, 186, 84, 86, 88, 90, 92, 94, 96, + 98, 100, 102, 104, 186, 186, 110, 112, 186, 115, + 173, 0, 0, 118, 0, 124, 0, 0, 0, 133, + 0, 0, 0, 0, 0, 0, 147, 0, 0, 153, + + 140, 0, 0, 0, 0, 0, 0, 169, 0, 186, + 58, 186, 62, 186, 179, 180, 186, 106, 186, 114, + 0, 0, 0, 0, 126, 129, 134, 0, 0, 139, + 0, 0, 0, 152, 0, 0, 0, 0, 161, 163, + 0, 186, 60, 64, 186, 108, 2, 1, 0, 125, + 0, 137, 0, 143, 151, 0, 0, 158, 159, 170, + 186, 181, 0, 136, 0, 154, 157, 186, 119, 142, + 186, 186, 184, 185, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -487,280 +498,313 @@ static yyconst flex_int32_t yy_meta[68] = 2, 2, 2, 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[678] = +static yyconst flex_int16_t yy_base[779] = { 0, - 0, 0, 954, 955, 66, 955, 948, 949, 0, 69, - 85, 128, 140, 152, 151, 58, 39, 48, 75, 927, - 158, 160, 73, 59, 71, 170, 54, 920, 890, 889, - 901, 885, 899, 898, 142, 927, 939, 955, 0, 206, - 955, 189, 168, 171, 53, 27, 66, 119, 175, 899, - 885, 123, 170, 883, 895, 183, 955, 198, 225, 99, - 212, 219, 223, 227, 285, 297, 308, 955, 955, 955, - 904, 917, 911, 165, 900, 903, 899, 914, 224, 896, - 910, 194, 896, 909, 900, 913, 890, 901, 892, 294, - 893, 884, 893, 884, 883, 884, 878, 884, 895, 881, - - 878, 890, 893, 880, 873, 889, 865, 193, 139, 885, - 861, 846, 841, 858, 834, 839, 865, 167, 854, 259, - 849, 325, 282, 851, 832, 302, 842, 838, 833, 43, - 839, 825, 841, 838, 829, 305, 309, 831, 820, 834, - 837, 819, 834, 821, 818, 825, 275, 833, 254, 299, - 317, 327, 331, 810, 827, 828, 821, 803, 310, 804, - 826, 817, 316, 327, 331, 335, 339, 343, 347, 955, - 405, 416, 422, 428, 825, 240, 849, 0, 848, 831, - 821, 820, 840, 818, 817, 816, 815, 0, 814, 0, - 813, 812, 0, 811, 810, 0, 809, 808, 807, 806, - - 805, 804, 820, 813, 826, 800, 799, 805, 797, 796, - 795, 816, 793, 792, 791, 790, 800, 788, 787, 786, - 785, 777, 776, 761, 761, 760, 759, 802, 774, 762, - 434, 442, 416, 766, 186, 763, 757, 757, 751, 764, - 764, 749, 955, 955, 764, 752, 418, 759, 281, 756, - 762, 308, 757, 955, 748, 755, 754, 757, 743, 742, - 746, 741, 278, 746, 420, 428, 430, 955, 738, 736, - 736, 744, 745, 727, 421, 732, 738, 419, 426, 430, - 434, 438, 496, 502, 752, 764, 750, 749, 742, 756, - 746, 745, 0, 744, 743, 742, 741, 740, 739, 738, - - 737, 736, 735, 734, 733, 732, 731, 730, 733, 726, - 733, 726, 725, 0, 724, 723, 722, 725, 720, 719, - 718, 717, 0, 716, 715, 714, 713, 691, 685, 690, - 696, 679, 694, 315, 955, 693, 683, 687, 955, 955, - 677, 686, 672, 689, 672, 675, 669, 955, 670, 669, - 666, 673, 666, 674, 670, 680, 677, 659, 665, 672, - 656, 655, 673, 655, 667, 666, 955, 665, 655, 659, - 955, 646, 955, 651, 651, 659, 642, 643, 653, 955, - 955, 685, 667, 683, 0, 507, 681, 681, 680, 679, - 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, - - 668, 667, 666, 665, 652, 645, 0, 662, 661, 660, - 659, 658, 636, 656, 655, 654, 653, 652, 651, 650, - 649, 618, 621, 601, 0, 602, 595, 602, 601, 602, - 594, 612, 955, 955, 594, 592, 602, 595, 955, 590, - 607, 330, 955, 598, 582, 583, 592, 583, 582, 582, - 955, 581, 590, 580, 596, 593, 955, 592, 590, 579, - 580, 576, 568, 575, 570, 571, 566, 592, 592, 590, - 604, 603, 598, 0, 586, 585, 584, 583, 582, 581, - 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, - 570, 0, 0, 569, 568, 567, 566, 565, 509, 564, - - 563, 562, 561, 560, 559, 558, 557, 535, 535, 0, - 542, 0, 576, 575, 524, 542, 955, 537, 532, 525, - 521, 533, 523, 521, 517, 533, 524, 523, 955, 955, - 526, 955, 521, 514, 503, 514, 506, 510, 523, 518, - 521, 503, 955, 955, 515, 504, 955, 0, 0, 0, - 0, 0, 543, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1054, 1055, 66, 1055, 1048, 1049, 0, 69, + 85, 128, 140, 152, 151, 58, 56, 63, 76, 1027, + 158, 160, 39, 163, 173, 189, 52, 1020, 76, 990, + 989, 1001, 985, 999, 998, 105, 1027, 1039, 1055, 0, + 225, 1055, 218, 160, 157, 20, 123, 66, 119, 192, + 999, 985, 54, 162, 983, 995, 194, 1055, 200, 195, + 98, 227, 196, 231, 235, 293, 305, 316, 1055, 1055, + 1055, 1004, 1017, 1011, 223, 1000, 1003, 999, 1014, 107, + 298, 996, 1010, 246, 996, 1009, 1000, 1013, 990, 1001, + 992, 182, 993, 984, 993, 984, 983, 984, 144, 978, + + 984, 995, 986, 980, 977, 978, 982, 289, 991, 978, + 302, 985, 972, 986, 962, 65, 315, 989, 981, 980, + 956, 941, 936, 953, 929, 934, 960, 279, 949, 293, + 944, 342, 299, 946, 927, 317, 937, 933, 928, 207, + 934, 920, 936, 933, 924, 320, 324, 926, 915, 929, + 932, 914, 929, 916, 913, 920, 284, 928, 227, 288, + 327, 342, 345, 905, 922, 923, 916, 898, 318, 899, + 921, 912, 330, 341, 345, 349, 353, 357, 361, 1055, + 419, 430, 436, 442, 920, 205, 944, 0, 943, 926, + 916, 915, 935, 913, 912, 911, 910, 909, 908, 0, + + 907, 0, 906, 905, 0, 904, 903, 0, 902, 901, + 900, 899, 898, 897, 913, 906, 919, 354, 356, 893, + 892, 898, 890, 889, 888, 887, 886, 885, 884, 905, + 882, 881, 880, 879, 878, 877, 876, 886, 874, 873, + 872, 871, 357, 870, 869, 861, 860, 845, 845, 844, + 843, 886, 858, 846, 448, 456, 430, 850, 418, 847, + 841, 841, 835, 848, 848, 833, 1055, 1055, 848, 836, + 432, 843, 135, 840, 846, 433, 841, 1055, 832, 839, + 838, 841, 827, 826, 830, 825, 330, 830, 439, 442, + 451, 1055, 822, 820, 820, 828, 829, 811, 456, 816, + + 822, 441, 447, 454, 458, 462, 520, 526, 836, 848, + 834, 833, 826, 840, 830, 829, 0, 828, 827, 826, + 825, 824, 823, 822, 821, 820, 819, 818, 817, 816, + 815, 814, 813, 812, 815, 808, 815, 800, 807, 798, + 821, 804, 803, 0, 802, 801, 800, 799, 798, 797, + 796, 799, 794, 793, 792, 791, 790, 789, 788, 0, + 787, 786, 785, 784, 775, 782, 781, 780, 758, 752, + 757, 763, 746, 761, 495, 1055, 760, 750, 754, 1055, + 1055, 744, 753, 739, 756, 739, 742, 736, 1055, 737, + 736, 733, 740, 733, 741, 737, 747, 744, 726, 732, + + 739, 723, 722, 740, 722, 734, 733, 1055, 732, 722, + 726, 1055, 713, 1055, 718, 718, 726, 709, 710, 720, + 1055, 1055, 752, 734, 750, 0, 532, 748, 748, 747, + 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, + 736, 735, 734, 733, 732, 731, 730, 717, 710, 0, + 710, 701, 708, 699, 723, 722, 721, 720, 719, 718, + 717, 716, 715, 693, 713, 712, 711, 710, 709, 708, + 707, 706, 705, 704, 703, 685, 676, 700, 699, 668, + 671, 651, 0, 652, 645, 652, 651, 652, 644, 662, + 1055, 1055, 644, 642, 652, 645, 1055, 640, 657, 345, + + 1055, 648, 632, 633, 642, 633, 632, 632, 1055, 631, + 640, 630, 646, 643, 1055, 642, 640, 629, 630, 626, + 618, 625, 620, 621, 616, 642, 642, 640, 654, 653, + 648, 0, 636, 635, 634, 633, 632, 631, 630, 629, + 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, + 618, 0, 0, 635, 617, 633, 615, 613, 612, 611, + 610, 609, 608, 607, 606, 605, 484, 604, 603, 602, + 601, 600, 599, 598, 597, 596, 595, 594, 611, 593, + 591, 590, 568, 568, 0, 575, 0, 609, 608, 557, + 575, 1055, 570, 565, 558, 554, 566, 556, 554, 550, + + 566, 557, 556, 1055, 1055, 559, 1055, 554, 547, 536, + 547, 539, 543, 556, 551, 554, 536, 1055, 1055, 548, + 537, 1055, 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 539, 538, 536, 0, 0, - 0, 0, 0, 0, 0, 0, 494, 0, 0, 545, - 544, 955, 491, 955, 495, 495, 504, 955, 488, 502, - - 483, 485, 482, 490, 955, 468, 479, 955, 955, 483, - 479, 472, 470, 470, 483, 955, 467, 507, 0, 0, - 507, 0, 514, 513, 472, 433, 955, 955, 955, 435, - 435, 955, 429, 386, 377, 955, 366, 365, 323, 328, - 955, 955, 339, 348, 337, 955, 955, 307, 955, 305, - 955, 257, 955, 955, 247, 221, 955, 955, 955, 236, - 0, 213, 955, 150, 955, 955, 232, 955, 955, 162, - 138, 0, 0, 955, 541, 108, 544 + 0, 0, 0, 0, 0, 0, 0, 557, 574, 555, + 572, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 568, 567, 565, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 550, 567, 0, 0, 521, 0, + 0, 572, 571, 1055, 518, 1055, 522, 522, 531, 1055, + 515, 529, 517, 519, 516, 518, 1055, 496, 507, 1055, + + 1055, 511, 507, 500, 497, 497, 510, 1055, 494, 534, + 0, 518, 0, 517, 0, 0, 532, 0, 515, 0, + 67, 187, 172, 202, 1055, 1055, 1055, 219, 243, 1055, + 245, 246, 300, 1055, 292, 315, 332, 340, 1055, 1055, + 357, 406, 0, 0, 402, 0, 1055, 1055, 381, 1055, + 423, 1055, 437, 1055, 1055, 431, 429, 1055, 1055, 1055, + 460, 0, 448, 1055, 444, 1055, 1055, 534, 1055, 1055, + 496, 528, 0, 0, 1055, 565, 546, 568 } ; -static yyconst flex_int16_t yy_def[678] = +static yyconst flex_int16_t yy_def[779] = { 0, - 674, 1, 674, 674, 674, 674, 674, 675, 676, 674, - 674, 674, 674, 674, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 674, 674, 675, 674, 676, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 677, 674, 674, 674, 674, 674, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, - 676, 676, 676, 676, 676, 676, 676, 676, 676, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 676, 676, 676, - 676, 676, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 676, 676, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 676, - 676, 674, 674, 674, 674, 674, 676, 674, 674, 676, - 676, 676, 676, 0, 674, 674, 674 + 775, 1, 775, 775, 775, 775, 775, 776, 777, 775, + 775, 775, 775, 775, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 775, 775, 776, 775, 777, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 778, 775, 775, 775, 775, + 775, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + + 775, 775, 775, 775, 775, 775, 775, 775, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 777, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + + 775, 775, 775, 775, 775, 775, 775, 775, 775, 777, + 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 777, 777, 777, 777, 777, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 777, 777, 775, 775, 775, 775, 775, 777, 775, 775, + 777, 777, 777, 777, 0, 775, 775, 775 } ; -static yyconst flex_int16_t yy_nxt[1023] = +static yyconst flex_int16_t yy_nxt[1123] = { 0, 4, 5, 6, 5, 7, 8, 9, 4, 10, 11, 12, 13, 14, 11, 11, 15, 9, 16, 17, 18, 19, 9, 9, 9, 20, 21, 22, 9, 23, 24, - 9, 25, 26, 27, 9, 9, 9, 28, 9, 9, - 9, 9, 9, 9, 9, 9, 29, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 30, 9, 31, 32, - 33, 9, 34, 9, 9, 9, 9, 35, 79, 35, - 40, 80, 129, 108, 96, 81, 130, 41, 42, 42, - 42, 42, 42, 42, 76, 82, 77, 97, 98, 240, - 99, 109, 78, 65, 66, 66, 66, 66, 66, 66, - - 83, 241, 94, 100, 67, 127, 84, 95, 128, 39, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 131, - 132, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 67, 133, 61, 62, 63, 64, 65, 66, 66, 66, - 66, 66, 66, 35, 160, 35, 68, 67, 65, 66, - 66, 66, 66, 66, 66, 219, 673, 161, 69, 67, - 65, 66, 66, 66, 66, 66, 66, 71, 220, 72, - 70, 67, 140, 67, 134, 90, 73, 135, 141, 86, - 672, 87, 74, 91, 75, 67, 88, 101, 92, 89, - 178, 102, 103, 104, 93, 105, 179, 67, 42, 42, - - 42, 42, 42, 42, 106, 189, 107, 40, 122, 123, - 123, 142, 126, 123, 669, 123, 136, 137, 123, 217, - 124, 124, 123, 190, 147, 143, 123, 125, 125, 123, - 218, 337, 144, 123, 122, 148, 184, 185, 149, 151, - 152, 150, 670, 671, 338, 153, 186, 118, 119, 45, - 46, 47, 48, 154, 50, 51, 123, 162, 52, 53, - 54, 55, 56, 57, 120, 59, 60, 668, 155, 121, - 156, 286, 667, 157, 158, 163, 163, 163, 163, 666, - 287, 159, 164, 163, 165, 166, 167, 163, 163, 168, - 169, 163, 163, 163, 171, 171, 171, 171, 171, 171, - - 230, 665, 664, 260, 172, 65, 66, 66, 66, 66, - 66, 66, 198, 261, 154, 173, 67, 174, 174, 174, - 174, 174, 174, 233, 233, 364, 349, 257, 365, 233, - 172, 199, 231, 258, 232, 232, 232, 232, 232, 232, - 233, 350, 67, 233, 233, 236, 233, 233, 262, 233, - 247, 233, 233, 353, 263, 273, 233, 663, 233, 233, - 233, 428, 662, 233, 233, 274, 354, 233, 265, 233, - 661, 264, 266, 267, 233, 233, 660, 429, 233, 278, - 278, 278, 278, 524, 659, 233, 525, 658, 657, 233, - 278, 278, 278, 278, 279, 278, 278, 280, 281, 278, - - 278, 278, 278, 278, 278, 278, 282, 278, 278, 278, - 278, 278, 278, 278, 42, 42, 42, 42, 42, 42, - 656, 655, 654, 283, 122, 284, 284, 284, 284, 284, - 284, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 232, 232, 232, 232, 232, 232, 653, - 122, 232, 232, 232, 232, 232, 232, 335, 335, 335, - 335, 335, 335, 335, 374, 335, 375, 335, 376, 335, - 335, 367, 335, 652, 335, 335, 335, 335, 335, 651, - 650, 377, 380, 380, 380, 380, 335, 649, 335, 380, - 380, 380, 380, 381, 380, 380, 380, 380, 380, 380, - - 380, 380, 380, 380, 380, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 471, 472, 576, - 577, 648, 647, 646, 645, 644, 643, 642, 641, 640, - 639, 638, 637, 636, 635, 634, 633, 632, 631, 473, - 578, 37, 37, 37, 170, 170, 630, 629, 628, 627, - 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, - 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, - 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, + 9, 25, 26, 27, 28, 9, 9, 29, 9, 9, + 9, 9, 9, 9, 9, 9, 30, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 31, 9, 32, 33, + 34, 9, 35, 9, 9, 9, 9, 36, 96, 36, + 41, 116, 137, 97, 80, 138, 747, 42, 43, 43, + 43, 43, 43, 43, 77, 81, 78, 119, 82, 117, + 83, 238, 79, 66, 67, 67, 67, 67, 67, 67, + + 84, 85, 239, 150, 68, 120, 36, 86, 36, 151, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 141, + 142, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 68, 143, 62, 63, 64, 65, 66, 67, 67, 67, + 67, 67, 67, 170, 194, 195, 69, 68, 66, 67, + 67, 67, 67, 67, 67, 218, 171, 219, 70, 68, + 66, 67, 67, 67, 67, 67, 67, 72, 139, 73, + 71, 68, 140, 68, 144, 92, 74, 145, 98, 88, + 390, 89, 75, 93, 76, 68, 90, 99, 94, 91, + 101, 100, 102, 103, 95, 391, 748, 68, 136, 133, + + 210, 133, 133, 152, 133, 104, 105, 133, 106, 107, + 108, 109, 110, 134, 111, 133, 112, 153, 133, 211, + 135, 749, 113, 114, 154, 115, 41, 43, 43, 43, + 43, 43, 43, 146, 147, 157, 310, 132, 165, 133, + 166, 161, 162, 167, 168, 311, 158, 163, 188, 159, + 133, 169, 160, 264, 189, 164, 750, 201, 133, 174, + 173, 175, 176, 132, 751, 265, 128, 129, 46, 47, + 48, 49, 172, 51, 52, 202, 284, 53, 54, 55, + 56, 57, 58, 130, 60, 61, 285, 752, 131, 753, + 173, 173, 173, 173, 177, 173, 173, 178, 179, 173, + + 173, 173, 181, 181, 181, 181, 181, 181, 228, 754, + 196, 197, 182, 66, 67, 67, 67, 67, 67, 67, + 198, 232, 229, 183, 68, 184, 184, 184, 184, 184, + 184, 240, 134, 241, 254, 233, 281, 286, 182, 135, + 257, 257, 282, 287, 242, 755, 257, 756, 164, 255, + 68, 256, 256, 256, 256, 256, 256, 257, 257, 257, + 260, 257, 257, 297, 257, 271, 257, 257, 257, 257, + 757, 257, 340, 298, 257, 257, 338, 405, 257, 365, + 406, 288, 257, 289, 257, 257, 290, 291, 339, 257, + 341, 366, 257, 302, 302, 302, 302, 758, 599, 759, + + 257, 600, 760, 257, 302, 302, 302, 302, 303, 302, + 302, 304, 305, 302, 302, 302, 302, 302, 302, 302, + 306, 302, 302, 302, 302, 302, 302, 302, 43, 43, + 43, 43, 43, 43, 761, 762, 763, 307, 132, 308, + 308, 308, 308, 308, 308, 184, 184, 184, 184, 184, + 184, 184, 184, 184, 184, 184, 184, 256, 256, 256, + 256, 256, 256, 378, 132, 256, 256, 256, 256, 256, + 256, 376, 376, 376, 376, 764, 379, 376, 394, 376, + 376, 376, 765, 376, 376, 766, 376, 767, 376, 376, + 376, 395, 408, 376, 661, 662, 768, 376, 376, 415, + + 376, 416, 769, 417, 421, 421, 421, 421, 770, 376, + 421, 421, 421, 421, 773, 663, 418, 422, 421, 421, + 421, 421, 421, 421, 421, 421, 421, 421, 421, 308, + 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, + 308, 486, 529, 530, 771, 772, 774, 40, 746, 745, + 744, 743, 742, 741, 740, 739, 738, 487, 737, 736, + 735, 734, 733, 732, 531, 38, 38, 38, 180, 180, + 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, + 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, + 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, + + 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, + 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, + 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, + 671, 670, 669, 668, 667, 666, 665, 664, 660, 659, + 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, + 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, + 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, + 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, + 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, + 608, 607, 606, 605, 604, 603, 602, 601, 598, 597, + 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, - 586, 585, 584, 583, 582, 581, 580, 579, 575, 574, - - 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, - 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, - 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, - 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, - 533, 532, 531, 530, 529, 528, 527, 526, 523, 522, - 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, - 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, - 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, - 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, - 481, 480, 479, 478, 477, 476, 475, 474, 470, 469, - - 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, - 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, - 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, - 438, 437, 436, 435, 434, 433, 432, 431, 430, 427, - 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, - 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, - 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, - 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, - 386, 385, 384, 383, 382, 379, 378, 373, 372, 371, - 370, 369, 368, 366, 363, 362, 361, 360, 359, 358, - - 357, 356, 355, 352, 351, 348, 347, 346, 345, 344, - 343, 342, 341, 340, 339, 336, 264, 236, 334, 333, - 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, - 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, - 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, - 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, - 292, 291, 290, 289, 288, 285, 277, 276, 275, 272, - 271, 270, 269, 268, 259, 256, 255, 254, 253, 252, - 251, 250, 249, 248, 246, 245, 244, 243, 242, 239, - 238, 237, 235, 234, 162, 229, 228, 227, 226, 225, - - 224, 223, 222, 221, 216, 215, 214, 213, 212, 211, - 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, - 200, 197, 196, 195, 194, 193, 192, 191, 188, 187, - 183, 182, 181, 180, 177, 176, 175, 146, 145, 139, - 138, 38, 117, 116, 115, 114, 113, 112, 111, 110, - 85, 38, 36, 674, 3, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674 + 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, + 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, + 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, + 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, + 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, + 536, 535, 534, 533, 532, 528, 527, 526, 525, 524, + 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, + 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, + 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, + + 493, 492, 491, 490, 489, 488, 485, 484, 483, 482, + 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, + 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, + 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, + 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, + 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, + 431, 430, 429, 428, 427, 426, 425, 424, 423, 420, + 419, 414, 413, 412, 411, 410, 409, 407, 404, 403, + 402, 401, 400, 399, 398, 397, 396, 393, 392, 389, + 388, 387, 386, 385, 384, 383, 382, 381, 380, 377, + + 288, 260, 375, 374, 373, 372, 371, 370, 369, 368, + 367, 364, 363, 362, 361, 360, 359, 358, 357, 356, + 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, + 345, 344, 343, 342, 337, 336, 335, 334, 333, 332, + 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, + 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, + 309, 301, 300, 299, 296, 295, 294, 293, 292, 283, + 280, 279, 278, 277, 276, 275, 274, 273, 272, 270, + 269, 268, 267, 266, 263, 262, 261, 259, 258, 172, + 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, + + 243, 237, 236, 235, 234, 231, 230, 227, 226, 225, + 224, 223, 222, 221, 220, 217, 216, 215, 214, 213, + 212, 209, 208, 207, 206, 205, 204, 203, 200, 199, + 193, 192, 191, 190, 187, 186, 185, 156, 155, 149, + 148, 39, 127, 126, 125, 124, 123, 122, 121, 118, + 87, 39, 37, 775, 3, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775 } ; -static yyconst flex_int16_t yy_chk[1023] = +static yyconst flex_int16_t yy_chk[1123] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -768,113 +812,124 @@ static yyconst flex_int16_t yy_chk[1023] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 5, 17, 5, - 10, 17, 46, 27, 24, 18, 46, 10, 10, 10, - 10, 10, 10, 10, 16, 18, 16, 24, 25, 130, - 25, 27, 16, 11, 11, 11, 11, 11, 11, 11, - - 19, 130, 23, 25, 11, 45, 19, 23, 45, 676, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 47, - 47, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 11, 47, 10, 10, 10, 10, 12, 12, 12, 12, - 12, 12, 12, 35, 60, 35, 12, 12, 13, 13, - 13, 13, 13, 13, 13, 109, 671, 60, 13, 13, - 14, 14, 14, 14, 14, 14, 14, 15, 109, 15, - 14, 14, 52, 12, 48, 22, 15, 48, 52, 21, - 670, 21, 15, 22, 15, 13, 21, 26, 22, 21, - 74, 26, 26, 26, 22, 26, 74, 14, 42, 42, - - 42, 42, 42, 42, 26, 82, 26, 40, 42, 43, - 43, 53, 44, 44, 664, 43, 49, 49, 44, 108, - 118, 43, 49, 82, 56, 53, 43, 118, 43, 44, - 108, 235, 53, 49, 42, 56, 79, 79, 56, 58, - 58, 56, 667, 667, 235, 58, 79, 40, 40, 40, - 40, 40, 40, 58, 40, 40, 58, 61, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 662, 59, 40, - 59, 176, 660, 59, 59, 61, 61, 61, 61, 656, - 176, 59, 62, 62, 62, 62, 63, 63, 63, 63, - 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, - - 120, 655, 652, 149, 65, 66, 66, 66, 66, 66, - 66, 66, 90, 149, 120, 67, 66, 67, 67, 67, - 67, 67, 67, 123, 123, 263, 249, 147, 263, 123, - 65, 90, 122, 147, 122, 122, 122, 122, 122, 122, - 123, 249, 66, 126, 126, 126, 136, 136, 150, 126, - 137, 137, 136, 252, 150, 159, 137, 650, 151, 151, - 126, 334, 648, 136, 151, 159, 252, 137, 152, 152, - 645, 151, 153, 153, 152, 151, 644, 334, 153, 163, - 163, 163, 163, 442, 643, 152, 442, 640, 639, 153, - 164, 164, 164, 164, 165, 165, 165, 165, 166, 166, - - 166, 166, 167, 167, 167, 167, 168, 168, 168, 168, - 169, 169, 169, 169, 171, 171, 171, 171, 171, 171, - 638, 637, 635, 172, 171, 172, 172, 172, 172, 172, - 172, 173, 173, 173, 173, 173, 173, 174, 174, 174, - 174, 174, 174, 231, 231, 231, 231, 231, 231, 634, - 171, 232, 232, 232, 232, 232, 232, 233, 233, 247, - 247, 265, 265, 233, 275, 247, 275, 265, 275, 266, - 266, 267, 267, 633, 233, 266, 247, 267, 265, 631, - 630, 275, 278, 278, 278, 278, 266, 626, 267, 279, - 279, 279, 279, 280, 280, 280, 280, 281, 281, 281, - - 281, 282, 282, 282, 282, 283, 283, 283, 283, 283, - 283, 284, 284, 284, 284, 284, 284, 386, 386, 499, - 499, 625, 624, 623, 621, 618, 617, 615, 614, 613, - 612, 611, 610, 607, 606, 604, 603, 602, 601, 386, - 499, 675, 675, 675, 677, 677, 600, 599, 597, 596, - 595, 593, 591, 590, 587, 578, 577, 576, 553, 546, - 545, 542, 541, 540, 539, 538, 537, 536, 535, 534, - 533, 531, 528, 527, 526, 525, 524, 523, 522, 521, - 520, 519, 518, 516, 515, 514, 513, 511, 509, 508, - 507, 506, 505, 504, 503, 502, 501, 500, 498, 497, - - 496, 495, 494, 491, 490, 489, 488, 487, 486, 485, - 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, + 1, 1, 1, 1, 1, 1, 1, 5, 23, 5, + 10, 27, 46, 23, 17, 46, 721, 10, 10, 10, + 10, 10, 10, 10, 16, 17, 16, 29, 17, 27, + 18, 116, 16, 11, 11, 11, 11, 11, 11, 11, + + 18, 19, 116, 53, 11, 29, 36, 19, 36, 53, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 48, + 48, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 11, 48, 10, 10, 10, 10, 12, 12, 12, 12, + 12, 12, 12, 61, 80, 80, 12, 12, 13, 13, + 13, 13, 13, 13, 13, 99, 61, 99, 13, 13, + 14, 14, 14, 14, 14, 14, 14, 15, 47, 15, + 14, 14, 47, 12, 49, 22, 15, 49, 24, 21, + 273, 21, 15, 22, 15, 13, 21, 24, 22, 21, + 25, 24, 25, 25, 22, 273, 722, 14, 45, 45, + + 92, 44, 44, 54, 45, 25, 26, 44, 26, 26, + 26, 26, 26, 44, 26, 45, 26, 54, 44, 92, + 44, 723, 26, 26, 54, 26, 41, 43, 43, 43, + 43, 43, 43, 50, 50, 57, 186, 43, 60, 50, + 60, 59, 59, 60, 60, 186, 57, 59, 75, 57, + 50, 60, 57, 140, 75, 59, 724, 84, 59, 63, + 63, 63, 63, 43, 728, 140, 41, 41, 41, 41, + 41, 41, 62, 41, 41, 84, 159, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 159, 729, 41, 731, + 62, 62, 62, 62, 64, 64, 64, 64, 65, 65, + + 65, 65, 66, 66, 66, 66, 66, 66, 108, 732, + 81, 81, 66, 67, 67, 67, 67, 67, 67, 67, + 81, 111, 108, 68, 67, 68, 68, 68, 68, 68, + 68, 117, 128, 117, 130, 111, 157, 160, 66, 128, + 133, 133, 157, 160, 117, 733, 133, 735, 130, 132, + 67, 132, 132, 132, 132, 132, 132, 133, 136, 136, + 136, 146, 146, 169, 136, 147, 147, 146, 161, 161, + 736, 147, 219, 169, 161, 136, 218, 287, 146, 243, + 287, 161, 147, 162, 162, 161, 163, 163, 218, 162, + 219, 243, 163, 173, 173, 173, 173, 737, 500, 738, + + 162, 500, 741, 163, 174, 174, 174, 174, 175, 175, + 175, 175, 176, 176, 176, 176, 177, 177, 177, 177, + 178, 178, 178, 178, 179, 179, 179, 179, 181, 181, + 181, 181, 181, 181, 742, 745, 749, 182, 181, 182, + 182, 182, 182, 182, 182, 183, 183, 183, 183, 183, + 183, 184, 184, 184, 184, 184, 184, 255, 255, 255, + 255, 255, 255, 259, 181, 256, 256, 256, 256, 256, + 256, 257, 257, 271, 271, 751, 259, 257, 276, 271, + 289, 289, 753, 290, 290, 756, 289, 757, 257, 290, + 271, 276, 291, 291, 567, 567, 761, 289, 291, 299, + + 290, 299, 763, 299, 302, 302, 302, 302, 765, 291, + 303, 303, 303, 303, 771, 567, 299, 304, 304, 304, + 304, 305, 305, 305, 305, 306, 306, 306, 306, 307, + 307, 307, 307, 307, 307, 308, 308, 308, 308, 308, + 308, 375, 427, 427, 768, 768, 772, 777, 719, 717, + 714, 712, 710, 709, 707, 706, 705, 375, 704, 703, + 702, 699, 698, 696, 427, 776, 776, 776, 778, 778, + 695, 694, 693, 692, 691, 689, 688, 687, 685, 683, + 682, 679, 676, 675, 663, 662, 661, 651, 650, 649, + 648, 628, 621, 620, 617, 616, 615, 614, 613, 612, + + 611, 610, 609, 608, 606, 603, 602, 601, 600, 599, + 598, 597, 596, 595, 594, 593, 591, 590, 589, 588, + 586, 584, 583, 582, 581, 580, 579, 578, 577, 576, + 575, 574, 573, 572, 571, 570, 569, 568, 566, 565, + 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, + 554, 551, 550, 549, 548, 547, 546, 545, 544, 543, + 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, + 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, + 521, 520, 519, 518, 517, 516, 514, 513, 512, 511, + 510, 508, 507, 506, 505, 504, 503, 502, 499, 498, + + 496, 495, 494, 493, 490, 489, 488, 487, 486, 485, + 484, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, - 463, 462, 461, 460, 459, 458, 456, 455, 454, 453, - 452, 450, 449, 448, 447, 446, 445, 444, 441, 440, - 438, 437, 436, 435, 432, 431, 430, 429, 428, 427, - 426, 424, 423, 422, 421, 420, 419, 418, 417, 416, - 415, 414, 413, 412, 411, 410, 409, 408, 406, 405, - 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, - 394, 393, 392, 391, 390, 389, 388, 387, 384, 383, - - 382, 379, 378, 377, 376, 375, 374, 372, 370, 369, - 368, 366, 365, 364, 363, 362, 361, 360, 359, 358, - 357, 356, 355, 354, 353, 352, 351, 350, 349, 347, - 346, 345, 344, 343, 342, 341, 338, 337, 336, 333, - 332, 331, 330, 329, 328, 327, 326, 325, 324, 322, - 321, 320, 319, 318, 317, 316, 315, 313, 312, 311, - 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, - 300, 299, 298, 297, 296, 295, 294, 292, 291, 290, - 289, 288, 287, 286, 285, 277, 276, 274, 273, 272, - 271, 270, 269, 264, 262, 261, 260, 259, 258, 257, - - 256, 255, 253, 251, 250, 248, 246, 245, 242, 241, - 240, 239, 238, 237, 236, 234, 230, 229, 228, 227, - 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, - 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, - 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, - 195, 194, 192, 191, 189, 187, 186, 185, 184, 183, - 182, 181, 180, 179, 177, 175, 162, 161, 160, 158, - 157, 156, 155, 154, 148, 146, 145, 144, 143, 142, - 141, 140, 139, 138, 135, 134, 133, 132, 131, 129, - 128, 127, 125, 124, 121, 119, 117, 116, 115, 114, - - 113, 112, 111, 110, 107, 106, 105, 104, 103, 102, - 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, - 91, 89, 88, 87, 86, 85, 84, 83, 81, 80, - 78, 77, 76, 75, 73, 72, 71, 55, 54, 51, - 50, 37, 36, 34, 33, 32, 31, 30, 29, 28, - 20, 8, 7, 3, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, - 674, 674 + 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, + 453, 452, 451, 449, 448, 447, 446, 445, 444, 443, + 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, + 432, 431, 430, 429, 428, 425, 424, 423, 420, 419, + 418, 417, 416, 415, 413, 411, 410, 409, 407, 406, + 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, + 395, 394, 393, 392, 391, 390, 388, 387, 386, 385, + + 384, 383, 382, 379, 378, 377, 374, 373, 372, 371, + 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, + 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, + 349, 348, 347, 346, 345, 343, 342, 341, 340, 339, + 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, + 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, + 318, 316, 315, 314, 313, 312, 311, 310, 309, 301, + 300, 298, 297, 296, 295, 294, 293, 288, 286, 285, + 284, 283, 282, 281, 280, 279, 277, 275, 274, 272, + 270, 269, 266, 265, 264, 263, 262, 261, 260, 258, + + 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, + 244, 242, 241, 240, 239, 238, 237, 236, 235, 234, + 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, + 223, 222, 221, 220, 217, 216, 215, 214, 213, 212, + 211, 210, 209, 207, 206, 204, 203, 201, 199, 198, + 197, 196, 195, 194, 193, 192, 191, 190, 189, 187, + 185, 172, 171, 170, 168, 167, 166, 165, 164, 158, + 156, 155, 154, 153, 152, 151, 150, 149, 148, 145, + 144, 143, 142, 141, 139, 138, 137, 135, 134, 131, + 129, 127, 126, 125, 124, 123, 122, 121, 120, 119, + + 118, 115, 114, 113, 112, 110, 109, 107, 106, 105, + 104, 103, 102, 101, 100, 98, 97, 96, 95, 94, + 93, 91, 90, 89, 88, 87, 86, 85, 83, 82, + 79, 78, 77, 76, 74, 73, 72, 56, 55, 52, + 51, 38, 37, 35, 34, 33, 32, 31, 30, 28, + 20, 8, 7, 3, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, + 775, 775 } ; /* The intent behind this definition is that it'll catch @@ -916,6 +971,7 @@ static yyconst flex_int16_t yy_chk[1023] = #define require_ARB_vp (yyextra->mode == ARB_vertex) #define require_ARB_fp (yyextra->mode == ARB_fragment) +#define require_NV_fp (yyextra->option.NV_fragment) #define require_shadow (yyextra->option.Shadow) #define require_rect (yyextra->option.TexRect) #define require_texarray (yyextra->option.TexArray) @@ -1011,7 +1067,7 @@ swiz_from_char(char c) } while(0); #define YY_EXTRA_TYPE struct asm_parser_state * -#line 1015 "lex.yy.c" +#line 1071 "lex.yy.c" #define INITIAL 0 @@ -1257,10 +1313,10 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 135 "program_lexer.l" +#line 136 "program_lexer.l" -#line 1264 "lex.yy.c" +#line 1320 "lex.yy.c" yylval = yylval_param; @@ -1317,13 +1373,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 675 ) + if ( yy_current_state >= 776 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 955 ); + while ( yy_base[yy_current_state] != 1055 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1349,17 +1405,17 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 137 "program_lexer.l" +#line 138 "program_lexer.l" { return ARBvp_10; } YY_BREAK case 2: YY_RULE_SETUP -#line 138 "program_lexer.l" +#line 139 "program_lexer.l" { return ARBfp_10; } YY_BREAK case 3: YY_RULE_SETUP -#line 139 "program_lexer.l" +#line 140 "program_lexer.l" { yylval->integer = at_address; return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS); @@ -1367,813 +1423,983 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 143 "program_lexer.l" +#line 144 "program_lexer.l" { return ALIAS; } YY_BREAK case 5: YY_RULE_SETUP -#line 144 "program_lexer.l" +#line 145 "program_lexer.l" { return ATTRIB; } YY_BREAK case 6: YY_RULE_SETUP -#line 145 "program_lexer.l" +#line 146 "program_lexer.l" { return END; } YY_BREAK case 7: YY_RULE_SETUP -#line 146 "program_lexer.l" +#line 147 "program_lexer.l" { return OPTION; } YY_BREAK case 8: YY_RULE_SETUP -#line 147 "program_lexer.l" +#line 148 "program_lexer.l" { return OUTPUT; } YY_BREAK case 9: YY_RULE_SETUP -#line 148 "program_lexer.l" +#line 149 "program_lexer.l" { return PARAM; } YY_BREAK case 10: YY_RULE_SETUP -#line 149 "program_lexer.l" +#line 150 "program_lexer.l" { yylval->integer = at_temp; return TEMP; } YY_BREAK case 11: YY_RULE_SETUP -#line 151 "program_lexer.l" +#line 152 "program_lexer.l" { return_opcode( 1, VECTOR_OP, ABS, OFF); } YY_BREAK case 12: YY_RULE_SETUP -#line 152 "program_lexer.l" +#line 153 "program_lexer.l" { return_opcode(require_ARB_fp, VECTOR_OP, ABS, ZERO_ONE); } YY_BREAK case 13: YY_RULE_SETUP -#line 153 "program_lexer.l" +#line 154 "program_lexer.l" { return_opcode( 1, BIN_OP, ADD, OFF); } YY_BREAK case 14: YY_RULE_SETUP -#line 154 "program_lexer.l" +#line 155 "program_lexer.l" { return_opcode(require_ARB_fp, BIN_OP, ADD, ZERO_ONE); } YY_BREAK case 15: YY_RULE_SETUP -#line 155 "program_lexer.l" +#line 156 "program_lexer.l" { return_opcode(require_ARB_vp, ARL, ARL, OFF); } YY_BREAK case 16: YY_RULE_SETUP -#line 157 "program_lexer.l" +#line 158 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, CMP, OFF); } YY_BREAK case 17: YY_RULE_SETUP -#line 158 "program_lexer.l" +#line 159 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, CMP, ZERO_ONE); } YY_BREAK case 18: YY_RULE_SETUP -#line 159 "program_lexer.l" +#line 160 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, COS, OFF); } YY_BREAK case 19: YY_RULE_SETUP -#line 160 "program_lexer.l" +#line 161 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, COS, ZERO_ONE); } YY_BREAK case 20: YY_RULE_SETUP -#line 162 "program_lexer.l" -{ return_opcode( 1, BIN_OP, DP3, OFF); } +#line 163 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, DDX, OFF); } YY_BREAK case 21: YY_RULE_SETUP -#line 163 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, DP3, ZERO_ONE); } +#line 164 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, DDX, ZERO_ONE); } YY_BREAK case 22: YY_RULE_SETUP -#line 164 "program_lexer.l" -{ return_opcode( 1, BIN_OP, DP4, OFF); } +#line 165 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, DDY, OFF); } YY_BREAK case 23: YY_RULE_SETUP -#line 165 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, DP4, ZERO_ONE); } +#line 166 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, DDY, ZERO_ONE); } YY_BREAK case 24: YY_RULE_SETUP -#line 166 "program_lexer.l" -{ return_opcode( 1, BIN_OP, DPH, OFF); } +#line 167 "program_lexer.l" +{ return_opcode( 1, BIN_OP, DP3, OFF); } YY_BREAK case 25: YY_RULE_SETUP -#line 167 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, DPH, ZERO_ONE); } +#line 168 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, DP3, ZERO_ONE); } YY_BREAK case 26: YY_RULE_SETUP -#line 168 "program_lexer.l" -{ return_opcode( 1, BIN_OP, DST, OFF); } +#line 169 "program_lexer.l" +{ return_opcode( 1, BIN_OP, DP4, OFF); } YY_BREAK case 27: YY_RULE_SETUP -#line 169 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, DST, ZERO_ONE); } +#line 170 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, DP4, ZERO_ONE); } YY_BREAK case 28: YY_RULE_SETUP #line 171 "program_lexer.l" -{ return_opcode( 1, SCALAR_OP, EX2, OFF); } +{ return_opcode( 1, BIN_OP, DPH, OFF); } YY_BREAK case 29: YY_RULE_SETUP #line 172 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, EX2, ZERO_ONE); } +{ return_opcode(require_ARB_fp, BIN_OP, DPH, ZERO_ONE); } YY_BREAK case 30: YY_RULE_SETUP #line 173 "program_lexer.l" -{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, OFF); } +{ return_opcode( 1, BIN_OP, DST, OFF); } YY_BREAK case 31: YY_RULE_SETUP -#line 175 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, FLR, OFF); } +#line 174 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, DST, ZERO_ONE); } YY_BREAK case 32: YY_RULE_SETUP #line 176 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, FLR, ZERO_ONE); } +{ return_opcode( 1, SCALAR_OP, EX2, OFF); } YY_BREAK case 33: YY_RULE_SETUP #line 177 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, FRC, OFF); } +{ return_opcode(require_ARB_fp, SCALAR_OP, EX2, ZERO_ONE); } YY_BREAK case 34: YY_RULE_SETUP #line 178 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, FRC, ZERO_ONE); } +{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, OFF); } YY_BREAK case 35: YY_RULE_SETUP #line 180 "program_lexer.l" -{ return_opcode(require_ARB_fp, KIL, KIL, OFF); } +{ return_opcode( 1, VECTOR_OP, FLR, OFF); } YY_BREAK case 36: YY_RULE_SETUP -#line 182 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, LIT, OFF); } +#line 181 "program_lexer.l" +{ return_opcode(require_ARB_fp, VECTOR_OP, FLR, ZERO_ONE); } YY_BREAK case 37: YY_RULE_SETUP -#line 183 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, LIT, ZERO_ONE); } +#line 182 "program_lexer.l" +{ return_opcode( 1, VECTOR_OP, FRC, OFF); } YY_BREAK case 38: YY_RULE_SETUP -#line 184 "program_lexer.l" -{ return_opcode( 1, SCALAR_OP, LG2, OFF); } +#line 183 "program_lexer.l" +{ return_opcode(require_ARB_fp, VECTOR_OP, FRC, ZERO_ONE); } YY_BREAK case 39: YY_RULE_SETUP #line 185 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, LG2, ZERO_ONE); } +{ return_opcode(require_ARB_fp, KIL, KIL, OFF); } YY_BREAK case 40: YY_RULE_SETUP -#line 186 "program_lexer.l" -{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, OFF); } +#line 187 "program_lexer.l" +{ return_opcode( 1, VECTOR_OP, LIT, OFF); } YY_BREAK case 41: YY_RULE_SETUP -#line 187 "program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, LRP, OFF); } +#line 188 "program_lexer.l" +{ return_opcode(require_ARB_fp, VECTOR_OP, LIT, ZERO_ONE); } YY_BREAK case 42: YY_RULE_SETUP -#line 188 "program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, LRP, ZERO_ONE); } +#line 189 "program_lexer.l" +{ return_opcode( 1, SCALAR_OP, LG2, OFF); } YY_BREAK case 43: YY_RULE_SETUP #line 190 "program_lexer.l" -{ return_opcode( 1, TRI_OP, MAD, OFF); } +{ return_opcode(require_ARB_fp, SCALAR_OP, LG2, ZERO_ONE); } YY_BREAK case 44: YY_RULE_SETUP #line 191 "program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, MAD, ZERO_ONE); } +{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, OFF); } YY_BREAK case 45: YY_RULE_SETUP #line 192 "program_lexer.l" -{ return_opcode( 1, BIN_OP, MAX, OFF); } +{ return_opcode(require_ARB_fp, TRI_OP, LRP, OFF); } YY_BREAK case 46: YY_RULE_SETUP #line 193 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, MAX, ZERO_ONE); } +{ return_opcode(require_ARB_fp, TRI_OP, LRP, ZERO_ONE); } YY_BREAK case 47: YY_RULE_SETUP -#line 194 "program_lexer.l" -{ return_opcode( 1, BIN_OP, MIN, OFF); } +#line 195 "program_lexer.l" +{ return_opcode( 1, TRI_OP, MAD, OFF); } YY_BREAK case 48: YY_RULE_SETUP -#line 195 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, MIN, ZERO_ONE); } +#line 196 "program_lexer.l" +{ return_opcode(require_ARB_fp, TRI_OP, MAD, ZERO_ONE); } YY_BREAK case 49: YY_RULE_SETUP -#line 196 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, MOV, OFF); } +#line 197 "program_lexer.l" +{ return_opcode( 1, BIN_OP, MAX, OFF); } YY_BREAK case 50: YY_RULE_SETUP -#line 197 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, MOV, ZERO_ONE); } +#line 198 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, MAX, ZERO_ONE); } YY_BREAK case 51: YY_RULE_SETUP -#line 198 "program_lexer.l" -{ return_opcode( 1, BIN_OP, MUL, OFF); } +#line 199 "program_lexer.l" +{ return_opcode( 1, BIN_OP, MIN, OFF); } YY_BREAK case 52: YY_RULE_SETUP -#line 199 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, MUL, ZERO_ONE); } +#line 200 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, MIN, ZERO_ONE); } YY_BREAK case 53: YY_RULE_SETUP #line 201 "program_lexer.l" -{ return_opcode( 1, BINSC_OP, POW, OFF); } +{ return_opcode( 1, VECTOR_OP, MOV, OFF); } YY_BREAK case 54: YY_RULE_SETUP #line 202 "program_lexer.l" -{ return_opcode(require_ARB_fp, BINSC_OP, POW, ZERO_ONE); } +{ return_opcode(require_ARB_fp, VECTOR_OP, MOV, ZERO_ONE); } YY_BREAK case 55: YY_RULE_SETUP -#line 204 "program_lexer.l" -{ return_opcode( 1, SCALAR_OP, RCP, OFF); } +#line 203 "program_lexer.l" +{ return_opcode( 1, BIN_OP, MUL, OFF); } YY_BREAK case 56: YY_RULE_SETUP -#line 205 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, RCP, ZERO_ONE); } +#line 204 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, MUL, ZERO_ONE); } YY_BREAK case 57: YY_RULE_SETUP #line 206 "program_lexer.l" -{ return_opcode( 1, SCALAR_OP, RSQ, OFF); } +{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, OFF); } YY_BREAK case 58: YY_RULE_SETUP #line 207 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, RSQ, ZERO_ONE); } +{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, ZERO_ONE); } YY_BREAK case 59: YY_RULE_SETUP -#line 209 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, OFF); } +#line 208 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, OFF); } YY_BREAK case 60: YY_RULE_SETUP -#line 210 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, ZERO_ONE); } +#line 209 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, ZERO_ONE); } YY_BREAK case 61: YY_RULE_SETUP -#line 211 "program_lexer.l" -{ return_opcode( 1, BIN_OP, SGE, OFF); } +#line 210 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, OFF); } YY_BREAK case 62: YY_RULE_SETUP -#line 212 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, SGE, ZERO_ONE); } +#line 211 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, ZERO_ONE); } YY_BREAK case 63: YY_RULE_SETUP -#line 213 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, OFF); } +#line 212 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, OFF); } YY_BREAK case 64: YY_RULE_SETUP -#line 214 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, ZERO_ONE); } +#line 213 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, ZERO_ONE); } YY_BREAK case 65: YY_RULE_SETUP -#line 215 "program_lexer.l" -{ return_opcode( 1, BIN_OP, SLT, OFF); } +#line 214 "program_lexer.l" +{ return_opcode( 1, BINSC_OP, POW, OFF); } YY_BREAK case 66: YY_RULE_SETUP -#line 216 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, SLT, ZERO_ONE); } +#line 215 "program_lexer.l" +{ return_opcode(require_ARB_fp, BINSC_OP, POW, ZERO_ONE); } YY_BREAK case 67: YY_RULE_SETUP #line 217 "program_lexer.l" -{ return_opcode( 1, BIN_OP, SUB, OFF); } +{ return_opcode( 1, SCALAR_OP, RCP, OFF); } YY_BREAK case 68: YY_RULE_SETUP #line 218 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, SUB, ZERO_ONE); } +{ return_opcode(require_ARB_fp, SCALAR_OP, RCP, ZERO_ONE); } YY_BREAK case 69: YY_RULE_SETUP #line 219 "program_lexer.l" -{ return_opcode( 1, SWZ, SWZ, OFF); } +{ return_opcode(require_NV_fp, BIN_OP, RFL, OFF); } YY_BREAK case 70: YY_RULE_SETUP #line 220 "program_lexer.l" -{ return_opcode(require_ARB_fp, SWZ, SWZ, ZERO_ONE); } +{ return_opcode(require_NV_fp, BIN_OP, RFL, ZERO_ONE); } YY_BREAK case 71: YY_RULE_SETUP -#line 222 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, OFF); } +#line 221 "program_lexer.l" +{ return_opcode( 1, SCALAR_OP, RSQ, OFF); } YY_BREAK case 72: YY_RULE_SETUP -#line 223 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, ZERO_ONE); } +#line 222 "program_lexer.l" +{ return_opcode(require_ARB_fp, SCALAR_OP, RSQ, ZERO_ONE); } YY_BREAK case 73: YY_RULE_SETUP #line 224 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, OFF); } +{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, OFF); } YY_BREAK case 74: YY_RULE_SETUP #line 225 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, ZERO_ONE); } +{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, ZERO_ONE); } YY_BREAK case 75: YY_RULE_SETUP #line 226 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, OFF); } +{ return_opcode(require_NV_fp, BIN_OP, SEQ, OFF); } YY_BREAK case 76: YY_RULE_SETUP #line 227 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, ZERO_ONE); } +{ return_opcode(require_NV_fp, BIN_OP, SEQ, ZERO_ONE); } YY_BREAK case 77: YY_RULE_SETUP -#line 229 "program_lexer.l" -{ return_opcode( 1, BIN_OP, XPD, OFF); } +#line 228 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SFL, OFF); } YY_BREAK case 78: YY_RULE_SETUP -#line 230 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, XPD, ZERO_ONE); } +#line 229 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SFL, ZERO_ONE); } YY_BREAK case 79: YY_RULE_SETUP -#line 232 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } +#line 230 "program_lexer.l" +{ return_opcode( 1, BIN_OP, SGE, OFF); } YY_BREAK case 80: YY_RULE_SETUP -#line 233 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } +#line 231 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, SGE, ZERO_ONE); } YY_BREAK case 81: YY_RULE_SETUP -#line 234 "program_lexer.l" -{ return PROGRAM; } +#line 232 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SGT, OFF); } YY_BREAK case 82: YY_RULE_SETUP -#line 235 "program_lexer.l" -{ return STATE; } +#line 233 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SGT, ZERO_ONE); } YY_BREAK case 83: YY_RULE_SETUP -#line 236 "program_lexer.l" -{ return RESULT; } +#line 234 "program_lexer.l" +{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, OFF); } YY_BREAK case 84: YY_RULE_SETUP -#line 238 "program_lexer.l" -{ return AMBIENT; } +#line 235 "program_lexer.l" +{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, ZERO_ONE); } YY_BREAK case 85: YY_RULE_SETUP -#line 239 "program_lexer.l" -{ return ATTENUATION; } +#line 236 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SLE, OFF); } YY_BREAK case 86: YY_RULE_SETUP -#line 240 "program_lexer.l" -{ return BACK; } +#line 237 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SLE, ZERO_ONE); } YY_BREAK case 87: YY_RULE_SETUP -#line 241 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, CLIP); } +#line 238 "program_lexer.l" +{ return_opcode( 1, BIN_OP, SLT, OFF); } YY_BREAK case 88: YY_RULE_SETUP -#line 242 "program_lexer.l" -{ return COLOR; } +#line 239 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, SLT, ZERO_ONE); } YY_BREAK case 89: YY_RULE_SETUP -#line 243 "program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, DEPTH); } +#line 240 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SNE, OFF); } YY_BREAK case 90: YY_RULE_SETUP -#line 244 "program_lexer.l" -{ return DIFFUSE; } +#line 241 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SNE, ZERO_ONE); } YY_BREAK case 91: YY_RULE_SETUP -#line 245 "program_lexer.l" -{ return DIRECTION; } +#line 242 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, STR, OFF); } YY_BREAK case 92: YY_RULE_SETUP -#line 246 "program_lexer.l" -{ return EMISSION; } +#line 243 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, STR, ZERO_ONE); } YY_BREAK case 93: YY_RULE_SETUP -#line 247 "program_lexer.l" -{ return ENV; } +#line 244 "program_lexer.l" +{ return_opcode( 1, BIN_OP, SUB, OFF); } YY_BREAK case 94: YY_RULE_SETUP -#line 248 "program_lexer.l" -{ return EYE; } +#line 245 "program_lexer.l" +{ return_opcode(require_ARB_fp, BIN_OP, SUB, ZERO_ONE); } YY_BREAK case 95: YY_RULE_SETUP -#line 249 "program_lexer.l" -{ return FOGCOORD; } +#line 246 "program_lexer.l" +{ return_opcode( 1, SWZ, SWZ, OFF); } YY_BREAK case 96: YY_RULE_SETUP -#line 250 "program_lexer.l" -{ return FOG; } +#line 247 "program_lexer.l" +{ return_opcode(require_ARB_fp, SWZ, SWZ, ZERO_ONE); } YY_BREAK case 97: YY_RULE_SETUP -#line 251 "program_lexer.l" -{ return FRONT; } +#line 249 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, OFF); } YY_BREAK case 98: YY_RULE_SETUP -#line 252 "program_lexer.l" -{ return HALF; } +#line 250 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, ZERO_ONE); } YY_BREAK case 99: YY_RULE_SETUP -#line 253 "program_lexer.l" -{ return INVERSE; } +#line 251 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, OFF); } YY_BREAK case 100: YY_RULE_SETUP -#line 254 "program_lexer.l" -{ return INVTRANS; } +#line 252 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, ZERO_ONE); } YY_BREAK case 101: YY_RULE_SETUP -#line 255 "program_lexer.l" -{ return LIGHT; } +#line 253 "program_lexer.l" +{ return_opcode(require_NV_fp, TXD_OP, TXD, OFF); } YY_BREAK case 102: YY_RULE_SETUP -#line 256 "program_lexer.l" -{ return LIGHTMODEL; } +#line 254 "program_lexer.l" +{ return_opcode(require_NV_fp, TXD_OP, TXD, ZERO_ONE); } YY_BREAK case 103: YY_RULE_SETUP -#line 257 "program_lexer.l" -{ return LIGHTPROD; } +#line 255 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, OFF); } YY_BREAK case 104: YY_RULE_SETUP -#line 258 "program_lexer.l" -{ return LOCAL; } +#line 256 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, ZERO_ONE); } YY_BREAK case 105: YY_RULE_SETUP -#line 259 "program_lexer.l" -{ return MATERIAL; } +#line 258 "program_lexer.l" +{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, OFF); } YY_BREAK case 106: YY_RULE_SETUP -#line 260 "program_lexer.l" -{ return MAT_PROGRAM; } +#line 259 "program_lexer.l" +{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, ZERO_ONE); } YY_BREAK case 107: YY_RULE_SETUP -#line 261 "program_lexer.l" -{ return MATRIX; } +#line 260 "program_lexer.l" +{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, OFF); } YY_BREAK case 108: YY_RULE_SETUP -#line 262 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } +#line 261 "program_lexer.l" +{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, ZERO_ONE); } YY_BREAK case 109: YY_RULE_SETUP #line 263 "program_lexer.l" -{ return MODELVIEW; } +{ return_opcode(require_NV_fp, TRI_OP, X2D, OFF); } YY_BREAK case 110: YY_RULE_SETUP #line 264 "program_lexer.l" -{ return MVP; } +{ return_opcode(require_NV_fp, TRI_OP, X2D, ZERO_ONE); } YY_BREAK case 111: YY_RULE_SETUP #line 265 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, NORMAL); } +{ return_opcode( 1, BIN_OP, XPD, OFF); } YY_BREAK case 112: YY_RULE_SETUP #line 266 "program_lexer.l" -{ return OBJECT; } +{ return_opcode(require_ARB_fp, BIN_OP, XPD, ZERO_ONE); } YY_BREAK case 113: YY_RULE_SETUP -#line 267 "program_lexer.l" -{ return PALETTE; } +#line 268 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } YY_BREAK case 114: YY_RULE_SETUP -#line 268 "program_lexer.l" -{ return PARAMS; } +#line 269 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } YY_BREAK case 115: YY_RULE_SETUP -#line 269 "program_lexer.l" -{ return PLANE; } +#line 270 "program_lexer.l" +{ return PROGRAM; } YY_BREAK case 116: YY_RULE_SETUP -#line 270 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINT); } +#line 271 "program_lexer.l" +{ return STATE; } YY_BREAK case 117: YY_RULE_SETUP -#line 271 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINTSIZE); } +#line 272 "program_lexer.l" +{ return RESULT; } YY_BREAK case 118: YY_RULE_SETUP -#line 272 "program_lexer.l" -{ return POSITION; } +#line 274 "program_lexer.l" +{ return AMBIENT; } YY_BREAK case 119: YY_RULE_SETUP -#line 273 "program_lexer.l" -{ return PRIMARY; } +#line 275 "program_lexer.l" +{ return ATTENUATION; } YY_BREAK case 120: YY_RULE_SETUP -#line 274 "program_lexer.l" -{ return PROJECTION; } +#line 276 "program_lexer.l" +{ return BACK; } YY_BREAK case 121: YY_RULE_SETUP -#line 275 "program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, RANGE); } +#line 277 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, CLIP); } YY_BREAK case 122: YY_RULE_SETUP -#line 276 "program_lexer.l" -{ return ROW; } +#line 278 "program_lexer.l" +{ return COLOR; } YY_BREAK case 123: YY_RULE_SETUP -#line 277 "program_lexer.l" -{ return SCENECOLOR; } +#line 279 "program_lexer.l" +{ return_token_or_DOT(require_ARB_fp, DEPTH); } YY_BREAK case 124: YY_RULE_SETUP -#line 278 "program_lexer.l" -{ return SECONDARY; } +#line 280 "program_lexer.l" +{ return DIFFUSE; } YY_BREAK case 125: YY_RULE_SETUP -#line 279 "program_lexer.l" -{ return SHININESS; } +#line 281 "program_lexer.l" +{ return DIRECTION; } YY_BREAK case 126: YY_RULE_SETUP -#line 280 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, SIZE); } +#line 282 "program_lexer.l" +{ return EMISSION; } YY_BREAK case 127: YY_RULE_SETUP -#line 281 "program_lexer.l" -{ return SPECULAR; } +#line 283 "program_lexer.l" +{ return ENV; } YY_BREAK case 128: YY_RULE_SETUP -#line 282 "program_lexer.l" -{ return SPOT; } +#line 284 "program_lexer.l" +{ return EYE; } YY_BREAK case 129: YY_RULE_SETUP -#line 283 "program_lexer.l" -{ return TEXCOORD; } +#line 285 "program_lexer.l" +{ return FOGCOORD; } YY_BREAK case 130: YY_RULE_SETUP -#line 284 "program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, TEXENV); } +#line 286 "program_lexer.l" +{ return FOG; } YY_BREAK case 131: YY_RULE_SETUP -#line 285 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN); } +#line 287 "program_lexer.l" +{ return FRONT; } YY_BREAK case 132: YY_RULE_SETUP -#line 286 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } +#line 288 "program_lexer.l" +{ return HALF; } YY_BREAK case 133: YY_RULE_SETUP -#line 287 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); } +#line 289 "program_lexer.l" +{ return INVERSE; } YY_BREAK case 134: YY_RULE_SETUP -#line 288 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); } +#line 290 "program_lexer.l" +{ return INVTRANS; } YY_BREAK case 135: YY_RULE_SETUP -#line 289 "program_lexer.l" -{ return TEXTURE; } +#line 291 "program_lexer.l" +{ return LIGHT; } YY_BREAK case 136: YY_RULE_SETUP -#line 290 "program_lexer.l" -{ return TRANSPOSE; } +#line 292 "program_lexer.l" +{ return LIGHTMODEL; } YY_BREAK case 137: YY_RULE_SETUP -#line 291 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); } +#line 293 "program_lexer.l" +{ return LIGHTPROD; } YY_BREAK case 138: YY_RULE_SETUP -#line 292 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, WEIGHT); } +#line 294 "program_lexer.l" +{ return LOCAL; } YY_BREAK case 139: YY_RULE_SETUP -#line 294 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } +#line 295 "program_lexer.l" +{ return MATERIAL; } YY_BREAK case 140: YY_RULE_SETUP -#line 295 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } +#line 296 "program_lexer.l" +{ return MAT_PROGRAM; } YY_BREAK case 141: YY_RULE_SETUP -#line 296 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } +#line 297 "program_lexer.l" +{ return MATRIX; } YY_BREAK case 142: YY_RULE_SETUP -#line 297 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } +#line 298 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } YY_BREAK case 143: YY_RULE_SETUP -#line 298 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } +#line 299 "program_lexer.l" +{ return MODELVIEW; } YY_BREAK case 144: YY_RULE_SETUP -#line 299 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } +#line 300 "program_lexer.l" +{ return MVP; } YY_BREAK case 145: YY_RULE_SETUP -#line 300 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } +#line 301 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, NORMAL); } YY_BREAK case 146: YY_RULE_SETUP -#line 301 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } +#line 302 "program_lexer.l" +{ return OBJECT; } YY_BREAK case 147: YY_RULE_SETUP -#line 302 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } +#line 303 "program_lexer.l" +{ return PALETTE; } YY_BREAK case 148: YY_RULE_SETUP -#line 303 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } +#line 304 "program_lexer.l" +{ return PARAMS; } YY_BREAK case 149: YY_RULE_SETUP -#line 304 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } +#line 305 "program_lexer.l" +{ return PLANE; } YY_BREAK case 150: YY_RULE_SETUP -#line 305 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } +#line 306 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, POINT); } YY_BREAK case 151: YY_RULE_SETUP -#line 306 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } +#line 307 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, POINTSIZE); } YY_BREAK case 152: YY_RULE_SETUP #line 308 "program_lexer.l" +{ return POSITION; } + YY_BREAK +case 153: +YY_RULE_SETUP +#line 309 "program_lexer.l" +{ return PRIMARY; } + YY_BREAK +case 154: +YY_RULE_SETUP +#line 310 "program_lexer.l" +{ return PROJECTION; } + YY_BREAK +case 155: +YY_RULE_SETUP +#line 311 "program_lexer.l" +{ return_token_or_DOT(require_ARB_fp, RANGE); } + YY_BREAK +case 156: +YY_RULE_SETUP +#line 312 "program_lexer.l" +{ return ROW; } + YY_BREAK +case 157: +YY_RULE_SETUP +#line 313 "program_lexer.l" +{ return SCENECOLOR; } + YY_BREAK +case 158: +YY_RULE_SETUP +#line 314 "program_lexer.l" +{ return SECONDARY; } + YY_BREAK +case 159: +YY_RULE_SETUP +#line 315 "program_lexer.l" +{ return SHININESS; } + YY_BREAK +case 160: +YY_RULE_SETUP +#line 316 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, SIZE); } + YY_BREAK +case 161: +YY_RULE_SETUP +#line 317 "program_lexer.l" +{ return SPECULAR; } + YY_BREAK +case 162: +YY_RULE_SETUP +#line 318 "program_lexer.l" +{ return SPOT; } + YY_BREAK +case 163: +YY_RULE_SETUP +#line 319 "program_lexer.l" +{ return TEXCOORD; } + YY_BREAK +case 164: +YY_RULE_SETUP +#line 320 "program_lexer.l" +{ return_token_or_DOT(require_ARB_fp, TEXENV); } + YY_BREAK +case 165: +YY_RULE_SETUP +#line 321 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, TEXGEN); } + YY_BREAK +case 166: +YY_RULE_SETUP +#line 322 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } + YY_BREAK +case 167: +YY_RULE_SETUP +#line 323 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); } + YY_BREAK +case 168: +YY_RULE_SETUP +#line 324 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); } + YY_BREAK +case 169: +YY_RULE_SETUP +#line 325 "program_lexer.l" +{ return TEXTURE; } + YY_BREAK +case 170: +YY_RULE_SETUP +#line 326 "program_lexer.l" +{ return TRANSPOSE; } + YY_BREAK +case 171: +YY_RULE_SETUP +#line 327 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); } + YY_BREAK +case 172: +YY_RULE_SETUP +#line 328 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, WEIGHT); } + YY_BREAK +case 173: +YY_RULE_SETUP +#line 330 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } + YY_BREAK +case 174: +YY_RULE_SETUP +#line 331 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } + YY_BREAK +case 175: +YY_RULE_SETUP +#line 332 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } + YY_BREAK +case 176: +YY_RULE_SETUP +#line 333 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } + YY_BREAK +case 177: +YY_RULE_SETUP +#line 334 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } + YY_BREAK +case 178: +YY_RULE_SETUP +#line 335 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } + YY_BREAK +case 179: +YY_RULE_SETUP +#line 336 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } + YY_BREAK +case 180: +YY_RULE_SETUP +#line 337 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } + YY_BREAK +case 181: +YY_RULE_SETUP +#line 338 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } + YY_BREAK +case 182: +YY_RULE_SETUP +#line 339 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } + YY_BREAK +case 183: +YY_RULE_SETUP +#line 340 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } + YY_BREAK +case 184: +YY_RULE_SETUP +#line 341 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } + YY_BREAK +case 185: +YY_RULE_SETUP +#line 342 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } + YY_BREAK +case 186: +YY_RULE_SETUP +#line 344 "program_lexer.l" { yylval->string = strdup(yytext); return IDENTIFIER; } YY_BREAK -case 153: +case 187: YY_RULE_SETUP -#line 313 "program_lexer.l" +#line 349 "program_lexer.l" { return DOT_DOT; } YY_BREAK -case 154: +case 188: YY_RULE_SETUP -#line 315 "program_lexer.l" +#line 351 "program_lexer.l" { yylval->integer = strtol(yytext, NULL, 10); return INTEGER; } YY_BREAK -case 155: +case 189: YY_RULE_SETUP -#line 319 "program_lexer.l" +#line 355 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 156: -/* rule 156 can match eol */ +case 190: +/* rule 190 can match eol */ *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 323 "program_lexer.l" +#line 359 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 157: +case 191: YY_RULE_SETUP -#line 327 "program_lexer.l" +#line 363 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 158: +case 192: YY_RULE_SETUP -#line 331 "program_lexer.l" +#line 367 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 159: +case 193: YY_RULE_SETUP -#line 336 "program_lexer.l" +#line 372 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; return MASK4; } YY_BREAK -case 160: +case 194: YY_RULE_SETUP -#line 342 "program_lexer.l" +#line 378 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2181,27 +2407,27 @@ YY_RULE_SETUP return MASK3; } YY_BREAK -case 161: +case 195: YY_RULE_SETUP -#line 348 "program_lexer.l" +#line 384 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; return MASK3; } YY_BREAK -case 162: +case 196: YY_RULE_SETUP -#line 353 "program_lexer.l" +#line 389 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; return MASK3; } YY_BREAK -case 163: +case 197: YY_RULE_SETUP -#line 359 "program_lexer.l" +#line 395 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2209,9 +2435,9 @@ YY_RULE_SETUP return MASK2; } YY_BREAK -case 164: +case 198: YY_RULE_SETUP -#line 365 "program_lexer.l" +#line 401 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2219,18 +2445,18 @@ YY_RULE_SETUP return MASK2; } YY_BREAK -case 165: +case 199: YY_RULE_SETUP -#line 371 "program_lexer.l" +#line 407 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; return MASK2; } YY_BREAK -case 166: +case 200: YY_RULE_SETUP -#line 377 "program_lexer.l" +#line 413 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2238,9 +2464,9 @@ YY_RULE_SETUP return MASK1; } YY_BREAK -case 167: +case 201: YY_RULE_SETUP -#line 384 "program_lexer.l" +#line 420 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2250,18 +2476,18 @@ YY_RULE_SETUP return SWIZZLE; } YY_BREAK -case 168: +case 202: YY_RULE_SETUP -#line 393 "program_lexer.l" +#line 429 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; return_token_or_DOT(require_ARB_fp, MASK4); } YY_BREAK -case 169: +case 203: YY_RULE_SETUP -#line 399 "program_lexer.l" +#line 435 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2269,27 +2495,27 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 170: +case 204: YY_RULE_SETUP -#line 405 "program_lexer.l" +#line 441 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 171: +case 205: YY_RULE_SETUP -#line 410 "program_lexer.l" +#line 446 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 172: +case 206: YY_RULE_SETUP -#line 416 "program_lexer.l" +#line 452 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2297,9 +2523,9 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 173: +case 207: YY_RULE_SETUP -#line 422 "program_lexer.l" +#line 458 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2307,18 +2533,18 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 174: +case 208: YY_RULE_SETUP -#line 428 "program_lexer.l" +#line 464 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 175: +case 209: YY_RULE_SETUP -#line 434 "program_lexer.l" +#line 470 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2326,9 +2552,9 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK1); } YY_BREAK -case 176: +case 210: YY_RULE_SETUP -#line 442 "program_lexer.l" +#line 478 "program_lexer.l" { if (require_ARB_vp) { return TEXGEN_R; @@ -2340,9 +2566,9 @@ YY_RULE_SETUP } } YY_BREAK -case 177: +case 211: YY_RULE_SETUP -#line 453 "program_lexer.l" +#line 489 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2352,15 +2578,15 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, SWIZZLE); } YY_BREAK -case 178: +case 212: YY_RULE_SETUP -#line 462 "program_lexer.l" +#line 498 "program_lexer.l" { return DOT; } YY_BREAK -case 179: -/* rule 179 can match eol */ +case 213: +/* rule 213 can match eol */ YY_RULE_SETUP -#line 464 "program_lexer.l" +#line 500 "program_lexer.l" { yylloc->first_line++; yylloc->first_column = 1; @@ -2369,30 +2595,30 @@ YY_RULE_SETUP yylloc->position++; } YY_BREAK -case 180: +case 214: YY_RULE_SETUP -#line 471 "program_lexer.l" +#line 507 "program_lexer.l" /* eat whitespace */ ; YY_BREAK -case 181: +case 215: *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 472 "program_lexer.l" +#line 508 "program_lexer.l" /* eat comments */ ; YY_BREAK -case 182: +case 216: YY_RULE_SETUP -#line 473 "program_lexer.l" +#line 509 "program_lexer.l" { return yytext[0]; } YY_BREAK -case 183: +case 217: YY_RULE_SETUP -#line 474 "program_lexer.l" +#line 510 "program_lexer.l" ECHO; YY_BREAK -#line 2396 "lex.yy.c" +#line 2622 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2686,7 +2912,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 675 ) + if ( yy_current_state >= 776 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2715,11 +2941,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 675 ) + if ( yy_current_state >= 776 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 674); + yy_is_jam = (yy_current_state == 775); return yy_is_jam ? 0 : yy_current_state; } @@ -3567,7 +3793,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 474 "program_lexer.l" +#line 510 "program_lexer.l" diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l index c50c7c57399..62ca9b6db6a 100644 --- a/src/mesa/shader/program_lexer.l +++ b/src/mesa/shader/program_lexer.l @@ -29,6 +29,7 @@ #define require_ARB_vp (yyextra->mode == ARB_vertex) #define require_ARB_fp (yyextra->mode == ARB_fragment) +#define require_NV_fp (yyextra->option.NV_fragment) #define require_shadow (yyextra->option.Shadow) #define require_rect (yyextra->option.TexRect) #define require_texarray (yyextra->option.TexArray) @@ -159,6 +160,10 @@ CMP_SAT { return_opcode(require_ARB_fp, TRI_OP, CMP, ZERO_ONE); } COS { return_opcode(require_ARB_fp, SCALAR_OP, COS, OFF); } COS_SAT { return_opcode(require_ARB_fp, SCALAR_OP, COS, ZERO_ONE); } +DDX { return_opcode(require_NV_fp, VECTOR_OP, DDX, OFF); } +DDX_SAT { return_opcode(require_NV_fp, VECTOR_OP, DDX, ZERO_ONE); } +DDY { return_opcode(require_NV_fp, VECTOR_OP, DDY, OFF); } +DDY_SAT { return_opcode(require_NV_fp, VECTOR_OP, DDY, ZERO_ONE); } DP3 { return_opcode( 1, BIN_OP, DP3, OFF); } DP3_SAT { return_opcode(require_ARB_fp, BIN_OP, DP3, ZERO_ONE); } DP4 { return_opcode( 1, BIN_OP, DP4, OFF); } @@ -198,22 +203,44 @@ MOV_SAT { return_opcode(require_ARB_fp, VECTOR_OP, MOV, ZERO_ONE); } MUL { return_opcode( 1, BIN_OP, MUL, OFF); } MUL_SAT { return_opcode(require_ARB_fp, BIN_OP, MUL, ZERO_ONE); } +PK2H { return_opcode(require_NV_fp, VECTOR_OP, PK2H, OFF); } +PK2H_SAT { return_opcode(require_NV_fp, VECTOR_OP, PK2H, ZERO_ONE); } +PK2US { return_opcode(require_NV_fp, VECTOR_OP, PK2US, OFF); } +PK2US_SAT { return_opcode(require_NV_fp, VECTOR_OP, PK2US, ZERO_ONE); } +PK4B { return_opcode(require_NV_fp, VECTOR_OP, PK4B, OFF); } +PK4B_SAT { return_opcode(require_NV_fp, VECTOR_OP, PK4B, ZERO_ONE); } +PK4UB { return_opcode(require_NV_fp, VECTOR_OP, PK4UB, OFF); } +PK4UB_SAT { return_opcode(require_NV_fp, VECTOR_OP, PK4UB, ZERO_ONE); } POW { return_opcode( 1, BINSC_OP, POW, OFF); } POW_SAT { return_opcode(require_ARB_fp, BINSC_OP, POW, ZERO_ONE); } RCP { return_opcode( 1, SCALAR_OP, RCP, OFF); } RCP_SAT { return_opcode(require_ARB_fp, SCALAR_OP, RCP, ZERO_ONE); } +RFL { return_opcode(require_NV_fp, BIN_OP, RFL, OFF); } +RFL_SAT { return_opcode(require_NV_fp, BIN_OP, RFL, ZERO_ONE); } RSQ { return_opcode( 1, SCALAR_OP, RSQ, OFF); } RSQ_SAT { return_opcode(require_ARB_fp, SCALAR_OP, RSQ, ZERO_ONE); } SCS { return_opcode(require_ARB_fp, SCALAR_OP, SCS, OFF); } SCS_SAT { return_opcode(require_ARB_fp, SCALAR_OP, SCS, ZERO_ONE); } +SEQ { return_opcode(require_NV_fp, BIN_OP, SEQ, OFF); } +SEQ_SAT { return_opcode(require_NV_fp, BIN_OP, SEQ, ZERO_ONE); } +SFL { return_opcode(require_NV_fp, BIN_OP, SFL, OFF); } +SFL_SAT { return_opcode(require_NV_fp, BIN_OP, SFL, ZERO_ONE); } SGE { return_opcode( 1, BIN_OP, SGE, OFF); } SGE_SAT { return_opcode(require_ARB_fp, BIN_OP, SGE, ZERO_ONE); } +SGT { return_opcode(require_NV_fp, BIN_OP, SGT, OFF); } +SGT_SAT { return_opcode(require_NV_fp, BIN_OP, SGT, ZERO_ONE); } SIN { return_opcode(require_ARB_fp, SCALAR_OP, SIN, OFF); } SIN_SAT { return_opcode(require_ARB_fp, SCALAR_OP, SIN, ZERO_ONE); } +SLE { return_opcode(require_NV_fp, BIN_OP, SLE, OFF); } +SLE_SAT { return_opcode(require_NV_fp, BIN_OP, SLE, ZERO_ONE); } SLT { return_opcode( 1, BIN_OP, SLT, OFF); } SLT_SAT { return_opcode(require_ARB_fp, BIN_OP, SLT, ZERO_ONE); } +SNE { return_opcode(require_NV_fp, BIN_OP, SNE, OFF); } +SNE_SAT { return_opcode(require_NV_fp, BIN_OP, SNE, ZERO_ONE); } +STR { return_opcode(require_NV_fp, BIN_OP, STR, OFF); } +STR_SAT { return_opcode(require_NV_fp, BIN_OP, STR, ZERO_ONE); } SUB { return_opcode( 1, BIN_OP, SUB, OFF); } SUB_SAT { return_opcode(require_ARB_fp, BIN_OP, SUB, ZERO_ONE); } SWZ { return_opcode( 1, SWZ, SWZ, OFF); } @@ -223,9 +250,18 @@ TEX { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, OFF); } TEX_SAT { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, ZERO_ONE); } TXB { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, OFF); } TXB_SAT { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, ZERO_ONE); } +TXD { return_opcode(require_NV_fp, TXD_OP, TXD, OFF); } +TXD_SAT { return_opcode(require_NV_fp, TXD_OP, TXD, ZERO_ONE); } TXP { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, OFF); } TXP_SAT { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, ZERO_ONE); } +UP2H { return_opcode(require_NV_fp, SCALAR_OP, UP2H, OFF); } +UP2H_SAT { return_opcode(require_NV_fp, SCALAR_OP, UP2H, ZERO_ONE); } +UP2US { return_opcode(require_NV_fp, SCALAR_OP, UP2US, OFF); } +UP2US_SAT { return_opcode(require_NV_fp, SCALAR_OP, UP2US, ZERO_ONE); } + +X2D { return_opcode(require_NV_fp, TRI_OP, X2D, OFF); } +X2D_SAT { return_opcode(require_NV_fp, TRI_OP, X2D, ZERO_ONE); } XPD { return_opcode( 1, BIN_OP, XPD, OFF); } XPD_SAT { return_opcode(require_ARB_fp, BIN_OP, XPD, ZERO_ONE); } diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index 5c604c2fd1f..4108374652e 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -216,90 +216,91 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, ARL = 274, KIL = 275, SWZ = 276, - INTEGER = 277, - REAL = 278, - AMBIENT = 279, - ATTENUATION = 280, - BACK = 281, - CLIP = 282, - COLOR = 283, - DEPTH = 284, - DIFFUSE = 285, - DIRECTION = 286, - EMISSION = 287, - ENV = 288, - EYE = 289, - FOG = 290, - FOGCOORD = 291, - FRAGMENT = 292, - FRONT = 293, - HALF = 294, - INVERSE = 295, - INVTRANS = 296, - LIGHT = 297, - LIGHTMODEL = 298, - LIGHTPROD = 299, - LOCAL = 300, - MATERIAL = 301, - MAT_PROGRAM = 302, - MATRIX = 303, - MATRIXINDEX = 304, - MODELVIEW = 305, - MVP = 306, - NORMAL = 307, - OBJECT = 308, - PALETTE = 309, - PARAMS = 310, - PLANE = 311, - POINT = 312, - POINTSIZE = 313, - POSITION = 314, - PRIMARY = 315, - PROGRAM = 316, - PROJECTION = 317, - RANGE = 318, - RESULT = 319, - ROW = 320, - SCENECOLOR = 321, - SECONDARY = 322, - SHININESS = 323, - SIZE = 324, - SPECULAR = 325, - SPOT = 326, - STATE = 327, - TEXCOORD = 328, - TEXENV = 329, - TEXGEN = 330, - TEXGEN_Q = 331, - TEXGEN_R = 332, - TEXGEN_S = 333, - TEXGEN_T = 334, - TEXTURE = 335, - TRANSPOSE = 336, - TEXTURE_UNIT = 337, - TEX_1D = 338, - TEX_2D = 339, - TEX_3D = 340, - TEX_CUBE = 341, - TEX_RECT = 342, - TEX_SHADOW1D = 343, - TEX_SHADOW2D = 344, - TEX_SHADOWRECT = 345, - TEX_ARRAY1D = 346, - TEX_ARRAY2D = 347, - TEX_ARRAYSHADOW1D = 348, - TEX_ARRAYSHADOW2D = 349, - VERTEX = 350, - VTXATTRIB = 351, - WEIGHT = 352, - IDENTIFIER = 353, - MASK4 = 354, - MASK3 = 355, - MASK2 = 356, - MASK1 = 357, - SWIZZLE = 358, - DOT_DOT = 359, - DOT = 360 + TXD_OP = 277, + INTEGER = 278, + REAL = 279, + AMBIENT = 280, + ATTENUATION = 281, + BACK = 282, + CLIP = 283, + COLOR = 284, + DEPTH = 285, + DIFFUSE = 286, + DIRECTION = 287, + EMISSION = 288, + ENV = 289, + EYE = 290, + FOG = 291, + FOGCOORD = 292, + FRAGMENT = 293, + FRONT = 294, + HALF = 295, + INVERSE = 296, + INVTRANS = 297, + LIGHT = 298, + LIGHTMODEL = 299, + LIGHTPROD = 300, + LOCAL = 301, + MATERIAL = 302, + MAT_PROGRAM = 303, + MATRIX = 304, + MATRIXINDEX = 305, + MODELVIEW = 306, + MVP = 307, + NORMAL = 308, + OBJECT = 309, + PALETTE = 310, + PARAMS = 311, + PLANE = 312, + POINT = 313, + POINTSIZE = 314, + POSITION = 315, + PRIMARY = 316, + PROGRAM = 317, + PROJECTION = 318, + RANGE = 319, + RESULT = 320, + ROW = 321, + SCENECOLOR = 322, + SECONDARY = 323, + SHININESS = 324, + SIZE = 325, + SPECULAR = 326, + SPOT = 327, + STATE = 328, + TEXCOORD = 329, + TEXENV = 330, + TEXGEN = 331, + TEXGEN_Q = 332, + TEXGEN_R = 333, + TEXGEN_S = 334, + TEXGEN_T = 335, + TEXTURE = 336, + TRANSPOSE = 337, + TEXTURE_UNIT = 338, + TEX_1D = 339, + TEX_2D = 340, + TEX_3D = 341, + TEX_CUBE = 342, + TEX_RECT = 343, + TEX_SHADOW1D = 344, + TEX_SHADOW2D = 345, + TEX_SHADOWRECT = 346, + TEX_ARRAY1D = 347, + TEX_ARRAY2D = 348, + TEX_ARRAYSHADOW1D = 349, + TEX_ARRAYSHADOW2D = 350, + VERTEX = 351, + VTXATTRIB = 352, + WEIGHT = 353, + IDENTIFIER = 354, + MASK4 = 355, + MASK3 = 356, + MASK2 = 357, + MASK1 = 358, + SWIZZLE = 359, + DOT_DOT = 360, + DOT = 361 }; #endif @@ -339,7 +340,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 343 "program_parse.tab.c" +#line 344 "program_parse.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -370,7 +371,7 @@ extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, /* Line 264 of yacc.c */ -#line 374 "program_parse.tab.c" +#line 375 "program_parse.tab.c" #ifdef short # undef short @@ -590,7 +591,7 @@ union yyalloc #define YYLAST 340 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 115 +#define YYNTOKENS 116 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 134 /* YYNRULES -- Number of rules. */ @@ -600,7 +601,7 @@ union yyalloc /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 360 +#define YYMAXUTOK 361 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -612,15 +613,15 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 110, 107, 111, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 106, - 2, 112, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 111, 108, 112, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 107, + 2, 113, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 108, 2, 109, 2, 2, 2, 2, 2, 2, + 2, 109, 2, 110, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 113, 2, 114, 2, 2, 2, 2, + 2, 2, 2, 114, 2, 115, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -644,7 +645,7 @@ static const yytype_uint8 yytranslate[] = 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105 + 105, 106 }; #if YYDEBUG @@ -684,80 +685,80 @@ static const yytype_uint16 yyprhs[] = /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 116, 0, -1, 117, 118, 120, 12, -1, 3, -1, - 4, -1, 118, 119, -1, -1, 8, 98, 106, -1, - 120, 121, -1, -1, 122, 106, -1, 158, 106, -1, - 123, -1, 124, -1, 125, -1, 126, -1, 127, -1, - 128, -1, 129, -1, 130, -1, 135, -1, 131, -1, - 132, -1, 19, 139, 107, 136, -1, 18, 138, 107, - 137, -1, 16, 138, 107, 136, -1, 14, 138, 107, - 136, 107, 136, -1, 13, 138, 107, 137, 107, 137, - -1, 17, 138, 107, 137, 107, 137, 107, 137, -1, - 15, 138, 107, 137, 107, 133, 107, 134, -1, 20, - 137, -1, 82, 243, -1, 83, -1, 84, -1, 85, - -1, 86, -1, 87, -1, 88, -1, 89, -1, 90, - -1, 91, -1, 92, -1, 93, -1, 94, -1, 21, - 138, 107, 143, 107, 140, -1, 229, 143, 155, -1, - 229, 143, 156, -1, 144, 157, -1, 152, 154, -1, - 141, 107, 141, 107, 141, 107, 141, -1, 229, 142, - -1, 22, -1, 98, -1, 98, -1, 160, -1, 145, - 108, 146, 109, -1, 174, -1, 236, -1, 98, -1, - 98, -1, 147, -1, 148, -1, 22, -1, 152, 153, - 149, -1, -1, 110, 150, -1, 111, 151, -1, 22, - -1, 22, -1, 98, -1, 102, -1, 102, -1, 102, - -1, 102, -1, 99, -1, 103, -1, -1, 99, -1, - 100, -1, 101, -1, 102, -1, -1, 159, -1, 166, - -1, 230, -1, 232, -1, 235, -1, 248, -1, 7, - 98, 112, 160, -1, 95, 161, -1, 37, 165, -1, - 59, -1, 97, 163, -1, 52, -1, 28, 241, -1, - 36, -1, 73, 242, -1, 49, 108, 164, 109, -1, - 96, 108, 162, 109, -1, 22, -1, -1, 108, 164, - 109, -1, 22, -1, 59, -1, 28, 241, -1, 36, - -1, 73, 242, -1, 167, -1, 168, -1, 10, 98, - 170, -1, 10, 98, 108, 169, 109, 171, -1, -1, - 22, -1, 112, 173, -1, 112, 113, 172, 114, -1, - 175, -1, 172, 107, 175, -1, 177, -1, 213, -1, - 223, -1, 177, -1, 213, -1, 224, -1, 176, -1, - 214, -1, 223, -1, 177, -1, 72, 201, -1, 72, - 178, -1, 72, 180, -1, 72, 183, -1, 72, 185, - -1, 72, 191, -1, 72, 187, -1, 72, 194, -1, - 72, 196, -1, 72, 198, -1, 72, 200, -1, 72, - 212, -1, 46, 240, 179, -1, 189, -1, 32, -1, - 68, -1, 42, 108, 190, 109, 181, -1, 189, -1, - 59, -1, 25, -1, 71, 182, -1, 39, -1, 31, - -1, 43, 184, -1, 24, -1, 240, 66, -1, 44, - 108, 190, 109, 240, 186, -1, 189, -1, 74, 244, - 188, -1, 28, -1, 24, -1, 30, -1, 70, -1, - 22, -1, 75, 242, 192, 193, -1, 34, -1, 53, - -1, 78, -1, 79, -1, 77, -1, 76, -1, 35, - 195, -1, 28, -1, 55, -1, 27, 108, 197, 109, - 56, -1, 22, -1, 57, 199, -1, 69, -1, 25, - -1, 203, 65, 108, 206, 109, -1, 203, 202, -1, - -1, 65, 108, 206, 104, 206, 109, -1, 48, 207, - 204, -1, -1, 205, -1, 40, -1, 81, -1, 41, - -1, 22, -1, 50, 208, -1, 62, -1, 51, -1, - 80, 242, -1, 54, 108, 210, 109, -1, 47, 108, - 211, 109, -1, -1, 209, -1, 22, -1, 22, -1, - 22, -1, 29, 63, -1, 217, -1, 220, -1, 215, - -1, 218, -1, 61, 33, 108, 216, 109, -1, 221, - -1, 221, 104, 221, -1, 61, 33, 108, 221, 109, - -1, 61, 45, 108, 219, 109, -1, 222, -1, 222, - 104, 222, -1, 61, 45, 108, 222, 109, -1, 22, - -1, 22, -1, 225, -1, 227, -1, 226, -1, 227, - -1, 228, -1, 23, -1, 22, -1, 113, 228, 114, - -1, 113, 228, 107, 228, 114, -1, 113, 228, 107, - 228, 107, 228, 114, -1, 113, 228, 107, 228, 107, - 228, 107, 228, 114, -1, 229, 23, -1, 229, 22, - -1, 110, -1, 111, -1, -1, -1, 11, 231, 234, - -1, -1, 5, 233, 234, -1, 234, 107, 98, -1, - 98, -1, 9, 98, 112, 236, -1, 64, 59, -1, - 64, 36, -1, 64, 237, -1, 64, 58, -1, 64, - 73, 242, -1, 64, 29, -1, 28, 238, 239, -1, - -1, 38, -1, 26, -1, -1, 60, -1, 67, -1, - -1, 38, -1, 26, -1, -1, 60, -1, 67, -1, - -1, 108, 245, 109, -1, -1, 108, 246, 109, -1, - -1, 108, 247, 109, -1, 22, -1, 22, -1, 22, - -1, 6, 98, 112, 98, -1 + 117, 0, -1, 118, 119, 121, 12, -1, 3, -1, + 4, -1, 119, 120, -1, -1, 8, 99, 107, -1, + 121, 122, -1, -1, 123, 107, -1, 159, 107, -1, + 124, -1, 125, -1, 126, -1, 127, -1, 128, -1, + 129, -1, 130, -1, 131, -1, 136, -1, 132, -1, + 133, -1, 19, 140, 108, 137, -1, 18, 139, 108, + 138, -1, 16, 139, 108, 137, -1, 14, 139, 108, + 137, 108, 137, -1, 13, 139, 108, 138, 108, 138, + -1, 17, 139, 108, 138, 108, 138, 108, 138, -1, + 15, 139, 108, 138, 108, 134, 108, 135, -1, 20, + 138, -1, 83, 244, -1, 84, -1, 85, -1, 86, + -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, + -1, 92, -1, 93, -1, 94, -1, 95, -1, 21, + 139, 108, 144, 108, 141, -1, 230, 144, 156, -1, + 230, 144, 157, -1, 145, 158, -1, 153, 155, -1, + 142, 108, 142, 108, 142, 108, 142, -1, 230, 143, + -1, 23, -1, 99, -1, 99, -1, 161, -1, 146, + 109, 147, 110, -1, 175, -1, 237, -1, 99, -1, + 99, -1, 148, -1, 149, -1, 23, -1, 153, 154, + 150, -1, -1, 111, 151, -1, 112, 152, -1, 23, + -1, 23, -1, 99, -1, 103, -1, 103, -1, 103, + -1, 103, -1, 100, -1, 104, -1, -1, 100, -1, + 101, -1, 102, -1, 103, -1, -1, 160, -1, 167, + -1, 231, -1, 233, -1, 236, -1, 249, -1, 7, + 99, 113, 161, -1, 96, 162, -1, 38, 166, -1, + 60, -1, 98, 164, -1, 53, -1, 29, 242, -1, + 37, -1, 74, 243, -1, 50, 109, 165, 110, -1, + 97, 109, 163, 110, -1, 23, -1, -1, 109, 165, + 110, -1, 23, -1, 60, -1, 29, 242, -1, 37, + -1, 74, 243, -1, 168, -1, 169, -1, 10, 99, + 171, -1, 10, 99, 109, 170, 110, 172, -1, -1, + 23, -1, 113, 174, -1, 113, 114, 173, 115, -1, + 176, -1, 173, 108, 176, -1, 178, -1, 214, -1, + 224, -1, 178, -1, 214, -1, 225, -1, 177, -1, + 215, -1, 224, -1, 178, -1, 73, 202, -1, 73, + 179, -1, 73, 181, -1, 73, 184, -1, 73, 186, + -1, 73, 192, -1, 73, 188, -1, 73, 195, -1, + 73, 197, -1, 73, 199, -1, 73, 201, -1, 73, + 213, -1, 47, 241, 180, -1, 190, -1, 33, -1, + 69, -1, 43, 109, 191, 110, 182, -1, 190, -1, + 60, -1, 26, -1, 72, 183, -1, 40, -1, 32, + -1, 44, 185, -1, 25, -1, 241, 67, -1, 45, + 109, 191, 110, 241, 187, -1, 190, -1, 75, 245, + 189, -1, 29, -1, 25, -1, 31, -1, 71, -1, + 23, -1, 76, 243, 193, 194, -1, 35, -1, 54, + -1, 79, -1, 80, -1, 78, -1, 77, -1, 36, + 196, -1, 29, -1, 56, -1, 28, 109, 198, 110, + 57, -1, 23, -1, 58, 200, -1, 70, -1, 26, + -1, 204, 66, 109, 207, 110, -1, 204, 203, -1, + -1, 66, 109, 207, 105, 207, 110, -1, 49, 208, + 205, -1, -1, 206, -1, 41, -1, 82, -1, 42, + -1, 23, -1, 51, 209, -1, 63, -1, 52, -1, + 81, 243, -1, 55, 109, 211, 110, -1, 48, 109, + 212, 110, -1, -1, 210, -1, 23, -1, 23, -1, + 23, -1, 30, 64, -1, 218, -1, 221, -1, 216, + -1, 219, -1, 62, 34, 109, 217, 110, -1, 222, + -1, 222, 105, 222, -1, 62, 34, 109, 222, 110, + -1, 62, 46, 109, 220, 110, -1, 223, -1, 223, + 105, 223, -1, 62, 46, 109, 223, 110, -1, 23, + -1, 23, -1, 226, -1, 228, -1, 227, -1, 228, + -1, 229, -1, 24, -1, 23, -1, 114, 229, 115, + -1, 114, 229, 108, 229, 115, -1, 114, 229, 108, + 229, 108, 229, 115, -1, 114, 229, 108, 229, 108, + 229, 108, 229, 115, -1, 230, 24, -1, 230, 23, + -1, 111, -1, 112, -1, -1, -1, 11, 232, 235, + -1, -1, 5, 234, 235, -1, 235, 108, 99, -1, + 99, -1, 9, 99, 113, 237, -1, 65, 60, -1, + 65, 37, -1, 65, 238, -1, 65, 59, -1, 65, + 74, 243, -1, 65, 30, -1, 29, 239, 240, -1, + -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, + -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, + -1, 109, 246, 110, -1, -1, 109, 247, 110, -1, + -1, 109, 248, 110, -1, 23, -1, 23, -1, 23, + -1, 6, 99, 113, 99, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -801,9 +802,9 @@ static const char *const yytname[] = "$end", "error", "$undefined", "ARBvp_10", "ARBfp_10", "ADDRESS", "ALIAS", "ATTRIB", "OPTION", "OUTPUT", "PARAM", "TEMP", "END", "BIN_OP", "BINSC_OP", "SAMPLE_OP", "SCALAR_OP", "TRI_OP", "VECTOR_OP", "ARL", - "KIL", "SWZ", "INTEGER", "REAL", "AMBIENT", "ATTENUATION", "BACK", - "CLIP", "COLOR", "DEPTH", "DIFFUSE", "DIRECTION", "EMISSION", "ENV", - "EYE", "FOG", "FOGCOORD", "FRAGMENT", "FRONT", "HALF", "INVERSE", + "KIL", "SWZ", "TXD_OP", "INTEGER", "REAL", "AMBIENT", "ATTENUATION", + "BACK", "CLIP", "COLOR", "DEPTH", "DIFFUSE", "DIRECTION", "EMISSION", + "ENV", "EYE", "FOG", "FOGCOORD", "FRAGMENT", "FRONT", "HALF", "INVERSE", "INVTRANS", "LIGHT", "LIGHTMODEL", "LIGHTPROD", "LOCAL", "MATERIAL", "MAT_PROGRAM", "MATRIX", "MATRIXINDEX", "MODELVIEW", "MVP", "NORMAL", "OBJECT", "PALETTE", "PARAMS", "PLANE", "POINT", "POINTSIZE", "POSITION", @@ -875,41 +876,41 @@ static const yytype_uint16 yytoknum[] = 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 59, 44, 91, 93, - 43, 45, 61, 123, 125 + 355, 356, 357, 358, 359, 360, 361, 59, 44, 91, + 93, 43, 45, 61, 123, 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 115, 116, 117, 117, 118, 118, 119, 120, 120, - 121, 121, 122, 122, 123, 123, 123, 123, 123, 123, - 123, 124, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 142, 143, 143, 143, 143, 144, 144, 145, - 146, 146, 147, 148, 149, 149, 149, 150, 151, 152, - 153, 154, 155, 156, 156, 156, 156, 157, 157, 157, - 157, 157, 158, 158, 158, 158, 158, 158, 159, 160, - 160, 161, 161, 161, 161, 161, 161, 161, 161, 162, - 163, 163, 164, 165, 165, 165, 165, 166, 166, 167, - 168, 169, 169, 170, 171, 172, 172, 173, 173, 173, - 174, 174, 174, 175, 175, 175, 176, 176, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 178, - 179, 179, 179, 180, 181, 181, 181, 181, 181, 182, - 183, 184, 184, 185, 186, 187, 188, 189, 189, 189, - 190, 191, 192, 192, 193, 193, 193, 193, 194, 195, - 195, 196, 197, 198, 199, 199, 200, 201, 202, 202, - 203, 204, 204, 205, 205, 205, 206, 207, 207, 207, - 207, 207, 207, 208, 208, 209, 210, 211, 212, 213, - 213, 214, 214, 215, 216, 216, 217, 218, 219, 219, - 220, 221, 222, 223, 223, 224, 224, 225, 226, 226, - 227, 227, 227, 227, 228, 228, 229, 229, 229, 231, - 230, 233, 232, 234, 234, 235, 236, 236, 236, 236, - 236, 236, 237, 238, 238, 238, 239, 239, 239, 240, - 240, 240, 241, 241, 241, 242, 242, 243, 243, 244, - 244, 245, 246, 247, 248 + 0, 116, 117, 118, 118, 119, 119, 120, 121, 121, + 122, 122, 123, 123, 124, 124, 124, 124, 124, 124, + 124, 125, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 143, 144, 144, 144, 144, 145, 145, 146, + 147, 147, 148, 149, 150, 150, 150, 151, 152, 153, + 154, 155, 156, 157, 157, 157, 157, 158, 158, 158, + 158, 158, 159, 159, 159, 159, 159, 159, 160, 161, + 161, 162, 162, 162, 162, 162, 162, 162, 162, 163, + 164, 164, 165, 166, 166, 166, 166, 167, 167, 168, + 169, 170, 170, 171, 172, 173, 173, 174, 174, 174, + 175, 175, 175, 176, 176, 176, 177, 177, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, 178, 179, + 180, 180, 180, 181, 182, 182, 182, 182, 182, 183, + 184, 185, 185, 186, 187, 188, 189, 190, 190, 190, + 191, 192, 193, 193, 194, 194, 194, 194, 195, 196, + 196, 197, 198, 199, 200, 200, 201, 202, 203, 203, + 204, 205, 205, 206, 206, 206, 207, 208, 208, 208, + 208, 208, 208, 209, 209, 210, 211, 212, 213, 214, + 214, 215, 215, 216, 217, 217, 218, 219, 220, 220, + 221, 222, 223, 224, 224, 225, 225, 226, 227, 227, + 228, 228, 228, 228, 229, 229, 230, 230, 230, 232, + 231, 234, 233, 235, 235, 236, 237, 237, 237, 237, + 237, 237, 238, 239, 239, 239, 240, 240, 240, 241, + 241, 241, 242, 242, 242, 243, 243, 244, 244, 245, + 245, 246, 247, 248, 249 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1019,50 +1020,50 @@ static const yytype_int16 yydefgoto[] = #define YYPACT_NINF -334 static const yytype_int16 yypact[] = { - 134, -334, -334, 41, -334, -334, 47, -49, -334, 169, - 20, -334, 34, 61, 75, 115, -334, -334, -19, -19, - -19, -19, -19, -19, 116, 44, -19, -334, 109, -334, + 134, -334, -334, 41, -334, -334, 47, -50, -334, 169, + 19, -334, 33, 60, 74, 114, -334, -334, -20, -20, + -20, -20, -20, -20, 115, 43, -20, -334, 108, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - 110, -334, -334, -334, -334, -334, -334, -334, -334, -334, - 119, 106, 107, 111, -22, 119, 4, -334, 5, 104, - -334, 113, 114, 117, 118, 120, -334, 121, 124, -334, - -334, -334, -15, 122, -334, -334, -334, 123, 133, -14, - 158, 210, -11, -334, 123, 21, -334, -334, -334, -334, - 127, -334, 44, -334, -334, -334, -334, -334, 44, 44, - 44, 44, 44, 44, -334, -334, -334, -334, 1, 68, - 87, -1, 132, 44, 65, 135, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -15, 141, -334, -334, -334, - -334, 136, -334, -334, -334, -334, -334, -334, -334, 149, - -334, -334, 58, 219, -334, 137, 139, -15, 140, -334, - 142, -334, -334, 74, -334, -334, 127, -334, 143, 144, - 145, 179, 15, 146, 81, 147, 83, 89, 0, 148, - 127, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, 183, -334, 74, -334, 150, -334, -334, 127, 151, - 152, -334, 43, -334, -334, -334, -334, -10, 155, -334, - 138, -334, -334, -334, -334, -334, -334, 154, 44, 44, - 162, 175, 44, -334, -334, -334, -334, 243, 245, 246, - -334, -334, -334, -334, 247, -334, -334, -334, -334, 204, - 247, -4, 163, 250, -334, 165, -334, 127, 27, -334, - -334, -334, 252, 248, 18, 167, -334, 255, -334, 256, - 255, -334, 44, -334, -334, 170, -334, -334, 178, 44, - 168, -334, -334, -334, -334, -334, -334, 174, 176, 177, - -334, 180, -334, 181, -334, 182, -334, 184, -334, 185, + 109, -334, -334, -334, -334, -334, -334, -334, -334, -334, + 118, 105, 106, 110, -23, 118, 3, -334, 4, 103, + -334, 112, 113, 116, 117, 119, -334, 120, 123, -334, + -334, -334, -16, 121, -334, -334, -334, 122, 132, -15, + 157, 209, -12, -334, 122, 20, -334, -334, -334, -334, + 131, -334, 43, -334, -334, -334, -334, -334, 43, 43, + 43, 43, 43, 43, -334, -334, -334, -334, 0, 67, + 86, -2, 133, 43, 64, 135, -334, -334, -334, -334, + -334, -334, -334, -334, -334, -16, 136, -334, -334, -334, + -334, 129, -334, -334, -334, -334, -334, -334, -334, 148, + -334, -334, 57, 218, -334, 137, 138, -16, 139, -334, + 140, -334, -334, 73, -334, -334, 131, -334, 141, 142, + 143, 179, 14, 144, 80, 145, 82, 88, -1, 146, + 131, -334, -334, -334, -334, -334, -334, -334, -334, -334, + -334, 183, -334, 73, -334, 147, -334, -334, 131, 149, + 150, -334, 42, -334, -334, -334, -334, -11, 152, -334, + 151, -334, -334, -334, -334, -334, -334, 153, 43, 43, + 154, 182, 43, -334, -334, -334, -334, 239, 244, 245, + -334, -334, -334, -334, 246, -334, -334, -334, -334, 203, + 246, -5, 162, 249, -334, 164, -334, 131, 26, -334, + -334, -334, 251, 247, 17, 166, -334, 254, -334, 255, + 254, -334, 43, -334, -334, 170, -334, -334, 176, 43, + 167, -334, -334, -334, -334, -334, -334, 173, 175, 177, + -334, 174, -334, 178, -334, 180, -334, 181, -334, 184, -334, -334, -334, -334, -334, -334, -334, 263, -334, -334, - -334, 264, -334, -334, -334, -334, -334, -334, -334, 186, - -334, -334, -334, -334, 131, 265, -334, 188, -334, 189, - 190, 46, -334, -334, 101, -334, 193, -5, -7, 266, - -334, 108, 44, -334, -334, 236, 14, 83, -334, 192, - -334, 194, -334, -334, -334, -334, -334, -334, -334, 195, - -334, -334, -334, 44, -334, 280, 283, -334, 44, -334, - -334, -334, 78, 87, 49, -334, -334, -334, -334, -334, - -334, -334, -334, 197, -334, -334, -334, -334, -334, -334, + -334, 264, -334, -334, -334, -334, -334, -334, -334, 185, + -334, -334, -334, -334, 130, 266, -334, 187, -334, 188, + 189, 45, -334, -334, 100, -334, 192, -6, -8, 269, + -334, 107, 43, -334, -334, 236, 13, 82, -334, 191, + -334, 193, -334, -334, -334, -334, -334, -334, -334, 194, + -334, -334, -334, 43, -334, 279, 282, -334, 43, -334, + -334, -334, 77, 86, 48, -334, -334, -334, -334, -334, + -334, -334, -334, 196, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, -334, 276, -334, -334, 6, -334, -334, -334, 51, - -334, -334, -334, -334, 201, 202, 203, -334, 244, -7, - -334, -334, -334, -334, -334, -334, 44, -334, 44, 243, - 245, 205, -334, -334, 198, 207, 206, 212, 211, 217, - 265, -334, 44, -334, 243, -334, 245, -17, -334, -334, - -334, 265, 213, -334 + -334, -334, 275, -334, -334, 5, -334, -334, -334, 50, + -334, -334, -334, -334, 200, 201, 202, -334, 243, -8, + -334, -334, -334, -334, -334, -334, 43, -334, 43, 239, + 244, 204, -334, -334, 197, 206, 205, 211, 210, 216, + 266, -334, 43, -334, 239, -334, 244, -18, -334, -334, + -334, 266, 212, -334 }; /* YYPGOTO[NTERM-NUM]. */ @@ -1072,15 +1073,15 @@ static const yytype_int16 yypgoto[] = -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -94, -88, 126, -334, -334, -333, -334, -91, -334, -334, -334, -334, -334, -334, -334, -334, 128, -334, -334, - -334, -334, -334, -334, -334, 249, -334, -334, -334, 73, + -334, -334, -334, -334, -334, 248, -334, -334, -334, 78, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -72, -334, -81, -334, -334, -334, -334, -334, -334, -334, + -76, -334, -81, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, -307, 99, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -23, -334, - -334, -303, -334, -334, -334, -334, -334, -334, 251, -334, - -334, -334, -334, -334, -334, -334, -327, -316, 253, -334, - -334, -334, -80, -110, -82, -334, -334, -334, -334, 277, - -334, 254, -334, -334, -334, -161, 153, -146, -334, -334, + -334, -334, -334, -334, -334, -334, -334, -334, -22, -334, + -334, -303, -334, -334, -334, -334, -334, -334, 250, -334, + -334, -334, -334, -334, -334, -334, -327, -316, 252, -334, + -334, -334, -80, -110, -82, -334, -334, -334, -334, 278, + -334, 256, -334, -334, -334, -161, 155, -146, -334, -334, -334, -334, -334, -334 }; @@ -1114,56 +1115,56 @@ static const yytype_int16 yytable[] = 373, 374, 375, 93, 94, 95, 96, 333, 334, 335, 336, 345, 346, 54, 66, 74, 75, 76, 78, 79, 98, 99, 56, 80, 100, 101, 104, 102, 103, 125, - 126, 127, 130, 389, 377, 143, 139, 357, 137, 199, - -59, 206, 220, 197, 208, 200, 209, 211, 245, 212, - 260, 217, 218, 219, 224, 230, 242, 267, 247, 249, - 250, 139, 259, 262, 265, 270, 317, 272, 274, 276, - 278, 287, 288, 291, 298, 305, 300, 306, 308, 312, - 313, 318, 319, 321, 322, 328, 330, 338, 362, 323, - 324, 325, 378, 326, 327, 332, 414, 340, 341, 342, + 126, 127, 130, 389, 377, 199, 139, 357, 137, 200, + 143, 206, -59, 220, 197, 208, 209, 211, 212, 245, + 217, 218, 219, 224, 230, 242, 247, 265, 249, 250, + 259, 139, 270, 262, 260, 267, 317, 272, 274, 276, + 278, 287, 288, 291, 298, 305, 300, 306, 308, 313, + 312, 318, 319, 321, 323, 322, 328, 330, 324, 338, + 325, 326, 362, 378, 327, 332, 414, 340, 341, 342, 348, 386, 390, 387, 388, 392, 401, 402, 408, 411, 409, 410, 421, 420, 422, 423, 424, 139, 357, 137, - 425, 426, 433, 310, 139, 258, 317, 413, 128, 279, - 398, 0, 84, 134, 129, 135, 246, 0, 0, 0, + 425, 426, 433, 413, 139, 258, 317, 128, 310, 279, + 0, 398, 134, 84, 135, 0, 129, 0, 246, 0, 317 }; static const yytype_int16 yycheck[] = { - 82, 82, 82, 113, 92, 166, 100, 22, 23, 103, - 156, 99, 22, 101, 102, 348, 98, 22, 100, 326, - 24, 103, 37, 37, 170, 25, 30, 28, 32, 28, - 24, 113, 28, 29, 125, 36, 30, 36, 24, 25, - 36, 0, 188, 28, 30, 64, 61, 26, 49, 98, - 61, 52, 34, 39, 61, 8, 147, 72, 59, 38, - 59, 72, 58, 59, 68, 72, 70, 40, 41, 69, - 55, 53, 73, 59, 73, 408, 70, 73, 385, 98, - 95, 95, 409, 98, 70, 71, 108, 104, 98, 422, - 112, 237, 109, 98, 410, 96, 97, 424, 113, 110, - 111, 33, 113, 110, 111, 24, 113, 26, 81, 26, - 426, 33, 107, 45, 27, 209, 29, 420, 60, 38, - 208, 38, 35, 45, 212, 67, 106, 209, 431, 42, - 43, 44, 98, 46, 60, 48, 47, 3, 4, 50, - 51, 67, 252, 54, 57, 19, 20, 21, 22, 23, - 107, 62, 26, 107, 110, 111, 107, 114, 107, 98, - 114, 74, 75, 114, 99, 114, 327, 102, 103, 80, - 252, 22, 23, 98, 5, 6, 7, 259, 9, 10, + 82, 82, 82, 113, 92, 166, 100, 23, 24, 103, + 156, 99, 23, 101, 102, 348, 98, 23, 100, 326, + 25, 103, 38, 38, 170, 26, 31, 29, 33, 29, + 25, 113, 29, 30, 125, 37, 31, 37, 25, 26, + 37, 0, 188, 29, 31, 65, 62, 27, 50, 99, + 62, 53, 35, 40, 62, 8, 147, 73, 60, 39, + 60, 73, 59, 60, 69, 73, 71, 41, 42, 70, + 56, 54, 74, 60, 74, 408, 71, 74, 385, 99, + 96, 96, 409, 99, 71, 72, 109, 105, 99, 422, + 113, 237, 110, 99, 410, 97, 98, 424, 114, 111, + 112, 34, 114, 111, 112, 25, 114, 27, 82, 27, + 426, 34, 108, 46, 28, 209, 30, 420, 61, 39, + 208, 39, 36, 46, 212, 68, 107, 209, 431, 43, + 44, 45, 99, 47, 61, 49, 48, 3, 4, 51, + 52, 68, 252, 55, 58, 19, 20, 21, 22, 23, + 108, 63, 26, 108, 111, 112, 108, 115, 108, 99, + 115, 75, 76, 115, 100, 115, 327, 103, 104, 81, + 252, 23, 24, 99, 5, 6, 7, 259, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 99, 100, 101, 102, 76, 77, 78, - 79, 110, 111, 98, 98, 106, 106, 98, 112, 112, - 107, 107, 64, 112, 107, 107, 102, 107, 107, 107, - 107, 98, 22, 343, 322, 108, 318, 318, 318, 98, - 108, 22, 63, 108, 107, 109, 107, 107, 65, 107, - 112, 108, 108, 108, 108, 108, 108, 82, 108, 108, - 108, 343, 107, 109, 102, 22, 348, 22, 22, 22, - 66, 108, 22, 108, 22, 108, 28, 22, 22, 109, - 102, 113, 108, 107, 107, 22, 22, 22, 22, 109, - 109, 109, 56, 109, 109, 109, 406, 109, 109, 109, - 107, 109, 22, 109, 109, 22, 109, 31, 107, 65, - 108, 108, 114, 108, 107, 109, 104, 399, 399, 399, - 109, 104, 109, 250, 406, 197, 408, 399, 79, 230, - 353, -1, 55, 82, 80, 82, 183, -1, -1, -1, + 21, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 100, 101, 102, 103, 77, 78, 79, + 80, 111, 112, 99, 99, 107, 107, 99, 113, 113, + 108, 108, 65, 113, 108, 108, 103, 108, 108, 108, + 108, 99, 23, 343, 322, 99, 318, 318, 318, 110, + 109, 23, 109, 64, 109, 108, 108, 108, 108, 66, + 109, 109, 109, 109, 109, 109, 109, 103, 109, 109, + 108, 343, 23, 110, 113, 83, 348, 23, 23, 23, + 67, 109, 23, 109, 23, 109, 29, 23, 23, 103, + 110, 114, 109, 108, 110, 108, 23, 23, 110, 23, + 110, 110, 23, 57, 110, 110, 406, 110, 110, 110, + 108, 110, 23, 110, 110, 23, 110, 32, 108, 66, + 109, 109, 115, 109, 108, 110, 105, 399, 399, 399, + 110, 105, 110, 399, 406, 197, 408, 79, 250, 230, + -1, 353, 82, 55, 82, -1, 80, -1, 183, -1, 422 }; @@ -1171,50 +1172,50 @@ static const yytype_int16 yycheck[] = symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 3, 4, 116, 117, 0, 118, 8, 119, 120, - 98, 5, 6, 7, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 135, - 158, 159, 166, 167, 168, 230, 232, 235, 248, 106, - 233, 98, 98, 98, 98, 231, 64, 98, 138, 144, - 236, 138, 138, 138, 138, 138, 98, 139, 152, 110, - 111, 137, 229, 138, 106, 106, 98, 234, 112, 112, - 112, 108, 112, 170, 234, 28, 29, 36, 58, 59, - 73, 237, 107, 99, 100, 101, 102, 157, 107, 107, - 107, 107, 107, 107, 102, 154, 22, 23, 37, 61, - 72, 95, 98, 113, 143, 145, 160, 174, 177, 213, - 217, 220, 224, 226, 227, 107, 107, 98, 160, 236, - 22, 169, 173, 177, 213, 223, 225, 227, 228, 229, - 26, 38, 238, 108, 242, 137, 136, 229, 137, 136, - 137, 137, 136, 28, 36, 59, 73, 165, 33, 45, - 27, 29, 35, 42, 43, 44, 46, 48, 57, 74, - 75, 178, 180, 183, 185, 187, 191, 194, 196, 198, - 200, 203, 212, 28, 36, 49, 52, 59, 73, 96, - 97, 161, 228, 99, 102, 103, 156, 108, 143, 98, - 109, 22, 23, 60, 67, 239, 22, 245, 107, 107, - 143, 107, 107, 60, 67, 241, 242, 108, 108, 108, - 63, 28, 55, 195, 108, 24, 26, 38, 184, 240, - 108, 240, 47, 50, 51, 54, 62, 80, 207, 25, - 69, 199, 108, 244, 242, 65, 241, 108, 242, 108, - 108, 163, 107, 114, 22, 146, 147, 148, 152, 107, - 112, 171, 109, 137, 136, 102, 155, 82, 133, 137, - 22, 221, 22, 222, 22, 197, 22, 190, 66, 190, - 24, 30, 32, 68, 70, 179, 189, 108, 22, 208, - 209, 108, 242, 40, 41, 81, 204, 205, 22, 247, - 28, 188, 34, 53, 192, 108, 22, 164, 22, 162, - 164, 228, 109, 102, 153, 140, 141, 229, 113, 108, - 243, 107, 107, 109, 109, 109, 109, 109, 22, 211, - 22, 210, 109, 76, 77, 78, 79, 193, 22, 206, - 109, 109, 109, 107, 114, 110, 111, 149, 107, 22, - 98, 142, 61, 72, 172, 175, 176, 177, 214, 215, - 218, 223, 22, 246, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 134, 137, 56, 25, - 39, 59, 71, 181, 189, 240, 109, 109, 109, 228, - 22, 150, 22, 151, 141, 33, 45, 201, 203, 107, - 114, 109, 31, 182, 186, 189, 107, 114, 107, 108, - 108, 65, 202, 175, 228, 141, 216, 221, 219, 222, - 108, 114, 107, 109, 104, 109, 104, 206, 141, 221, - 222, 104, 206, 109 + 0, 3, 4, 117, 118, 0, 119, 8, 120, 121, + 99, 5, 6, 7, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 136, + 159, 160, 167, 168, 169, 231, 233, 236, 249, 107, + 234, 99, 99, 99, 99, 232, 65, 99, 139, 145, + 237, 139, 139, 139, 139, 139, 99, 140, 153, 111, + 112, 138, 230, 139, 107, 107, 99, 235, 113, 113, + 113, 109, 113, 171, 235, 29, 30, 37, 59, 60, + 74, 238, 108, 100, 101, 102, 103, 158, 108, 108, + 108, 108, 108, 108, 103, 155, 23, 24, 38, 62, + 73, 96, 99, 114, 144, 146, 161, 175, 178, 214, + 218, 221, 225, 227, 228, 108, 108, 99, 161, 237, + 23, 170, 174, 178, 214, 224, 226, 228, 229, 230, + 27, 39, 239, 109, 243, 138, 137, 230, 138, 137, + 138, 138, 137, 29, 37, 60, 74, 166, 34, 46, + 28, 30, 36, 43, 44, 45, 47, 49, 58, 75, + 76, 179, 181, 184, 186, 188, 192, 195, 197, 199, + 201, 204, 213, 29, 37, 50, 53, 60, 74, 97, + 98, 162, 229, 100, 103, 104, 157, 109, 144, 99, + 110, 23, 24, 61, 68, 240, 23, 246, 108, 108, + 144, 108, 108, 61, 68, 242, 243, 109, 109, 109, + 64, 29, 56, 196, 109, 25, 27, 39, 185, 241, + 109, 241, 48, 51, 52, 55, 63, 81, 208, 26, + 70, 200, 109, 245, 243, 66, 242, 109, 243, 109, + 109, 164, 108, 115, 23, 147, 148, 149, 153, 108, + 113, 172, 110, 138, 137, 103, 156, 83, 134, 138, + 23, 222, 23, 223, 23, 198, 23, 191, 67, 191, + 25, 31, 33, 69, 71, 180, 190, 109, 23, 209, + 210, 109, 243, 41, 42, 82, 205, 206, 23, 248, + 29, 189, 35, 54, 193, 109, 23, 165, 23, 163, + 165, 229, 110, 103, 154, 141, 142, 230, 114, 109, + 244, 108, 108, 110, 110, 110, 110, 110, 23, 212, + 23, 211, 110, 77, 78, 79, 80, 194, 23, 207, + 110, 110, 110, 108, 115, 111, 112, 150, 108, 23, + 99, 143, 62, 73, 173, 176, 177, 178, 215, 216, + 219, 224, 23, 247, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 135, 138, 57, 26, + 40, 60, 72, 182, 190, 241, 110, 110, 110, 229, + 23, 151, 23, 152, 142, 34, 46, 202, 204, 108, + 115, 110, 32, 183, 187, 190, 108, 115, 108, 109, + 109, 66, 203, 176, 229, 142, 217, 222, 220, 223, + 109, 115, 108, 110, 105, 110, 105, 207, 142, 222, + 223, 105, 207, 110 }; #define yyerrok (yyerrstatus = 0) @@ -4573,7 +4574,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4577 "program_parse.tab.c" +#line 4578 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); diff --git a/src/mesa/shader/program_parse.tab.h b/src/mesa/shader/program_parse.tab.h index de08fb747f2..7ab6f6b23ef 100644 --- a/src/mesa/shader/program_parse.tab.h +++ b/src/mesa/shader/program_parse.tab.h @@ -58,90 +58,91 @@ ARL = 274, KIL = 275, SWZ = 276, - INTEGER = 277, - REAL = 278, - AMBIENT = 279, - ATTENUATION = 280, - BACK = 281, - CLIP = 282, - COLOR = 283, - DEPTH = 284, - DIFFUSE = 285, - DIRECTION = 286, - EMISSION = 287, - ENV = 288, - EYE = 289, - FOG = 290, - FOGCOORD = 291, - FRAGMENT = 292, - FRONT = 293, - HALF = 294, - INVERSE = 295, - INVTRANS = 296, - LIGHT = 297, - LIGHTMODEL = 298, - LIGHTPROD = 299, - LOCAL = 300, - MATERIAL = 301, - MAT_PROGRAM = 302, - MATRIX = 303, - MATRIXINDEX = 304, - MODELVIEW = 305, - MVP = 306, - NORMAL = 307, - OBJECT = 308, - PALETTE = 309, - PARAMS = 310, - PLANE = 311, - POINT = 312, - POINTSIZE = 313, - POSITION = 314, - PRIMARY = 315, - PROGRAM = 316, - PROJECTION = 317, - RANGE = 318, - RESULT = 319, - ROW = 320, - SCENECOLOR = 321, - SECONDARY = 322, - SHININESS = 323, - SIZE = 324, - SPECULAR = 325, - SPOT = 326, - STATE = 327, - TEXCOORD = 328, - TEXENV = 329, - TEXGEN = 330, - TEXGEN_Q = 331, - TEXGEN_R = 332, - TEXGEN_S = 333, - TEXGEN_T = 334, - TEXTURE = 335, - TRANSPOSE = 336, - TEXTURE_UNIT = 337, - TEX_1D = 338, - TEX_2D = 339, - TEX_3D = 340, - TEX_CUBE = 341, - TEX_RECT = 342, - TEX_SHADOW1D = 343, - TEX_SHADOW2D = 344, - TEX_SHADOWRECT = 345, - TEX_ARRAY1D = 346, - TEX_ARRAY2D = 347, - TEX_ARRAYSHADOW1D = 348, - TEX_ARRAYSHADOW2D = 349, - VERTEX = 350, - VTXATTRIB = 351, - WEIGHT = 352, - IDENTIFIER = 353, - MASK4 = 354, - MASK3 = 355, - MASK2 = 356, - MASK1 = 357, - SWIZZLE = 358, - DOT_DOT = 359, - DOT = 360 + TXD_OP = 277, + INTEGER = 278, + REAL = 279, + AMBIENT = 280, + ATTENUATION = 281, + BACK = 282, + CLIP = 283, + COLOR = 284, + DEPTH = 285, + DIFFUSE = 286, + DIRECTION = 287, + EMISSION = 288, + ENV = 289, + EYE = 290, + FOG = 291, + FOGCOORD = 292, + FRAGMENT = 293, + FRONT = 294, + HALF = 295, + INVERSE = 296, + INVTRANS = 297, + LIGHT = 298, + LIGHTMODEL = 299, + LIGHTPROD = 300, + LOCAL = 301, + MATERIAL = 302, + MAT_PROGRAM = 303, + MATRIX = 304, + MATRIXINDEX = 305, + MODELVIEW = 306, + MVP = 307, + NORMAL = 308, + OBJECT = 309, + PALETTE = 310, + PARAMS = 311, + PLANE = 312, + POINT = 313, + POINTSIZE = 314, + POSITION = 315, + PRIMARY = 316, + PROGRAM = 317, + PROJECTION = 318, + RANGE = 319, + RESULT = 320, + ROW = 321, + SCENECOLOR = 322, + SECONDARY = 323, + SHININESS = 324, + SIZE = 325, + SPECULAR = 326, + SPOT = 327, + STATE = 328, + TEXCOORD = 329, + TEXENV = 330, + TEXGEN = 331, + TEXGEN_Q = 332, + TEXGEN_R = 333, + TEXGEN_S = 334, + TEXGEN_T = 335, + TEXTURE = 336, + TRANSPOSE = 337, + TEXTURE_UNIT = 338, + TEX_1D = 339, + TEX_2D = 340, + TEX_3D = 341, + TEX_CUBE = 342, + TEX_RECT = 343, + TEX_SHADOW1D = 344, + TEX_SHADOW2D = 345, + TEX_SHADOWRECT = 346, + TEX_ARRAY1D = 347, + TEX_ARRAY2D = 348, + TEX_ARRAYSHADOW1D = 349, + TEX_ARRAYSHADOW2D = 350, + VERTEX = 351, + VTXATTRIB = 352, + WEIGHT = 353, + IDENTIFIER = 354, + MASK4 = 355, + MASK3 = 356, + MASK2 = 357, + MASK1 = 358, + SWIZZLE = 359, + DOT_DOT = 360, + DOT = 361 }; #endif @@ -181,7 +182,7 @@ typedef union YYSTYPE /* Line 1676 of yacc.c */ -#line 185 "program_parse.tab.h" +#line 186 "program_parse.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index e2e83e484f5..9dab00c3856 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -142,7 +142,7 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, /* Tokens for instructions */ %token BIN_OP BINSC_OP SAMPLE_OP SCALAR_OP TRI_OP VECTOR_OP -%token ARL KIL SWZ +%token ARL KIL SWZ TXD_OP %token INTEGER %token REAL -- cgit v1.2.3 From 8ca6fd8a83412e3a76746f0ee61027b796516f95 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 1 Sep 2009 14:16:03 -0700 Subject: NV fp parser: Parse TXD instruction --- src/mesa/shader/program_parse.tab.c | 1735 ++++++++++++++++++----------------- src/mesa/shader/program_parse.y | 48 +- 2 files changed, 941 insertions(+), 842 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index 4108374652e..06aefd073fd 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -588,16 +588,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 340 +#define YYLAST 349 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 116 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 134 +#define YYNNTS 135 /* YYNRULES -- Number of rules. */ -#define YYNRULES 264 +#define YYNRULES 266 /* YYNRULES -- Number of states. */ -#define YYNSTATES 434 +#define YYNSTATES 447 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -655,31 +655,31 @@ static const yytype_uint16 yyprhs[] = { 0, 0, 3, 8, 10, 12, 15, 16, 20, 23, 24, 27, 30, 32, 34, 36, 38, 40, 42, 44, - 46, 48, 50, 52, 57, 62, 67, 74, 81, 90, - 99, 102, 105, 107, 109, 111, 113, 115, 117, 119, - 121, 123, 125, 127, 129, 136, 140, 144, 147, 150, - 158, 161, 163, 165, 167, 169, 174, 176, 178, 180, - 182, 184, 186, 188, 192, 193, 196, 199, 201, 203, - 205, 207, 209, 211, 213, 215, 217, 218, 220, 222, - 224, 226, 227, 229, 231, 233, 235, 237, 239, 244, - 247, 250, 252, 255, 257, 260, 262, 265, 270, 275, - 277, 278, 282, 284, 286, 289, 291, 294, 296, 298, - 302, 309, 310, 312, 315, 320, 322, 326, 328, 330, - 332, 334, 336, 338, 340, 342, 344, 346, 349, 352, - 355, 358, 361, 364, 367, 370, 373, 376, 379, 382, - 386, 388, 390, 392, 398, 400, 402, 404, 407, 409, - 411, 414, 416, 419, 426, 428, 432, 434, 436, 438, - 440, 442, 447, 449, 451, 453, 455, 457, 459, 462, - 464, 466, 472, 474, 477, 479, 481, 487, 490, 491, - 498, 502, 503, 505, 507, 509, 511, 513, 516, 518, - 520, 523, 528, 533, 534, 536, 538, 540, 542, 545, - 547, 549, 551, 553, 559, 561, 565, 571, 577, 579, - 583, 589, 591, 593, 595, 597, 599, 601, 603, 605, - 607, 611, 617, 625, 635, 638, 641, 643, 645, 646, - 647, 651, 652, 656, 660, 662, 667, 670, 673, 676, - 679, 683, 686, 690, 691, 693, 695, 696, 698, 700, - 701, 703, 705, 706, 708, 710, 711, 715, 716, 720, - 721, 725, 727, 729, 731 + 46, 48, 50, 52, 54, 59, 64, 69, 76, 83, + 92, 101, 104, 117, 120, 122, 124, 126, 128, 130, + 132, 134, 136, 138, 140, 142, 144, 151, 155, 159, + 162, 165, 173, 176, 178, 180, 182, 184, 189, 191, + 193, 195, 197, 199, 201, 203, 207, 208, 211, 214, + 216, 218, 220, 222, 224, 226, 228, 230, 232, 233, + 235, 237, 239, 241, 242, 244, 246, 248, 250, 252, + 254, 259, 262, 265, 267, 270, 272, 275, 277, 280, + 285, 290, 292, 293, 297, 299, 301, 304, 306, 309, + 311, 313, 317, 324, 325, 327, 330, 335, 337, 341, + 343, 345, 347, 349, 351, 353, 355, 357, 359, 361, + 364, 367, 370, 373, 376, 379, 382, 385, 388, 391, + 394, 397, 401, 403, 405, 407, 413, 415, 417, 419, + 422, 424, 426, 429, 431, 434, 441, 443, 447, 449, + 451, 453, 455, 457, 462, 464, 466, 468, 470, 472, + 474, 477, 479, 481, 487, 489, 492, 494, 496, 502, + 505, 506, 513, 517, 518, 520, 522, 524, 526, 528, + 531, 533, 535, 538, 543, 548, 549, 551, 553, 555, + 557, 560, 562, 564, 566, 568, 574, 576, 580, 586, + 592, 594, 598, 604, 606, 608, 610, 612, 614, 616, + 618, 620, 622, 626, 632, 640, 650, 653, 656, 658, + 660, 661, 662, 666, 667, 671, 675, 677, 682, 685, + 688, 691, 694, 698, 701, 705, 706, 708, 710, 711, + 713, 715, 716, 718, 720, 721, 723, 725, 726, 730, + 731, 735, 736, 740, 742, 744, 746 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -687,78 +687,80 @@ static const yytype_int16 yyrhs[] = { 117, 0, -1, 118, 119, 121, 12, -1, 3, -1, 4, -1, 119, 120, -1, -1, 8, 99, 107, -1, - 121, 122, -1, -1, 123, 107, -1, 159, 107, -1, + 121, 122, -1, -1, 123, 107, -1, 160, 107, -1, 124, -1, 125, -1, 126, -1, 127, -1, 128, -1, - 129, -1, 130, -1, 131, -1, 136, -1, 132, -1, - 133, -1, 19, 140, 108, 137, -1, 18, 139, 108, - 138, -1, 16, 139, 108, 137, -1, 14, 139, 108, - 137, 108, 137, -1, 13, 139, 108, 138, 108, 138, - -1, 17, 139, 108, 138, 108, 138, 108, 138, -1, - 15, 139, 108, 138, 108, 134, 108, 135, -1, 20, - 138, -1, 83, 244, -1, 84, -1, 85, -1, 86, - -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, - -1, 92, -1, 93, -1, 94, -1, 95, -1, 21, - 139, 108, 144, 108, 141, -1, 230, 144, 156, -1, - 230, 144, 157, -1, 145, 158, -1, 153, 155, -1, - 142, 108, 142, 108, 142, 108, 142, -1, 230, 143, - -1, 23, -1, 99, -1, 99, -1, 161, -1, 146, - 109, 147, 110, -1, 175, -1, 237, -1, 99, -1, - 99, -1, 148, -1, 149, -1, 23, -1, 153, 154, - 150, -1, -1, 111, 151, -1, 112, 152, -1, 23, - -1, 23, -1, 99, -1, 103, -1, 103, -1, 103, - -1, 103, -1, 100, -1, 104, -1, -1, 100, -1, - 101, -1, 102, -1, 103, -1, -1, 160, -1, 167, - -1, 231, -1, 233, -1, 236, -1, 249, -1, 7, - 99, 113, 161, -1, 96, 162, -1, 38, 166, -1, - 60, -1, 98, 164, -1, 53, -1, 29, 242, -1, - 37, -1, 74, 243, -1, 50, 109, 165, 110, -1, - 97, 109, 163, 110, -1, 23, -1, -1, 109, 165, - 110, -1, 23, -1, 60, -1, 29, 242, -1, 37, - -1, 74, 243, -1, 168, -1, 169, -1, 10, 99, - 171, -1, 10, 99, 109, 170, 110, 172, -1, -1, - 23, -1, 113, 174, -1, 113, 114, 173, 115, -1, - 176, -1, 173, 108, 176, -1, 178, -1, 214, -1, - 224, -1, 178, -1, 214, -1, 225, -1, 177, -1, - 215, -1, 224, -1, 178, -1, 73, 202, -1, 73, - 179, -1, 73, 181, -1, 73, 184, -1, 73, 186, - -1, 73, 192, -1, 73, 188, -1, 73, 195, -1, - 73, 197, -1, 73, 199, -1, 73, 201, -1, 73, - 213, -1, 47, 241, 180, -1, 190, -1, 33, -1, - 69, -1, 43, 109, 191, 110, 182, -1, 190, -1, - 60, -1, 26, -1, 72, 183, -1, 40, -1, 32, - -1, 44, 185, -1, 25, -1, 241, 67, -1, 45, - 109, 191, 110, 241, 187, -1, 190, -1, 75, 245, - 189, -1, 29, -1, 25, -1, 31, -1, 71, -1, - 23, -1, 76, 243, 193, 194, -1, 35, -1, 54, - -1, 79, -1, 80, -1, 78, -1, 77, -1, 36, - 196, -1, 29, -1, 56, -1, 28, 109, 198, 110, - 57, -1, 23, -1, 58, 200, -1, 70, -1, 26, - -1, 204, 66, 109, 207, 110, -1, 204, 203, -1, - -1, 66, 109, 207, 105, 207, 110, -1, 49, 208, - 205, -1, -1, 206, -1, 41, -1, 82, -1, 42, - -1, 23, -1, 51, 209, -1, 63, -1, 52, -1, - 81, 243, -1, 55, 109, 211, 110, -1, 48, 109, - 212, 110, -1, -1, 210, -1, 23, -1, 23, -1, - 23, -1, 30, 64, -1, 218, -1, 221, -1, 216, - -1, 219, -1, 62, 34, 109, 217, 110, -1, 222, - -1, 222, 105, 222, -1, 62, 34, 109, 222, 110, - -1, 62, 46, 109, 220, 110, -1, 223, -1, 223, - 105, 223, -1, 62, 46, 109, 223, 110, -1, 23, - -1, 23, -1, 226, -1, 228, -1, 227, -1, 228, - -1, 229, -1, 24, -1, 23, -1, 114, 229, 115, - -1, 114, 229, 108, 229, 115, -1, 114, 229, 108, - 229, 108, 229, 115, -1, 114, 229, 108, 229, 108, - 229, 108, 229, 115, -1, 230, 24, -1, 230, 23, - -1, 111, -1, 112, -1, -1, -1, 11, 232, 235, - -1, -1, 5, 234, 235, -1, 235, 108, 99, -1, - 99, -1, 9, 99, 113, 237, -1, 65, 60, -1, - 65, 37, -1, 65, 238, -1, 65, 59, -1, 65, - 74, 243, -1, 65, 30, -1, 29, 239, 240, -1, - -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, - -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, - -1, 109, 246, 110, -1, -1, 109, 247, 110, -1, - -1, 109, 248, 110, -1, 23, -1, 23, -1, 23, - -1, 6, 99, 113, 99, -1 + 129, -1, 130, -1, 131, -1, 137, -1, 132, -1, + 133, -1, 134, -1, 19, 141, 108, 138, -1, 18, + 140, 108, 139, -1, 16, 140, 108, 138, -1, 14, + 140, 108, 138, 108, 138, -1, 13, 140, 108, 139, + 108, 139, -1, 17, 140, 108, 139, 108, 139, 108, + 139, -1, 15, 140, 108, 139, 108, 135, 108, 136, + -1, 20, 139, -1, 22, 140, 108, 139, 108, 139, + 108, 139, 108, 135, 108, 136, -1, 83, 245, -1, + 84, -1, 85, -1, 86, -1, 87, -1, 88, -1, + 89, -1, 90, -1, 91, -1, 92, -1, 93, -1, + 94, -1, 95, -1, 21, 140, 108, 145, 108, 142, + -1, 231, 145, 157, -1, 231, 145, 158, -1, 146, + 159, -1, 154, 156, -1, 143, 108, 143, 108, 143, + 108, 143, -1, 231, 144, -1, 23, -1, 99, -1, + 99, -1, 162, -1, 147, 109, 148, 110, -1, 176, + -1, 238, -1, 99, -1, 99, -1, 149, -1, 150, + -1, 23, -1, 154, 155, 151, -1, -1, 111, 152, + -1, 112, 153, -1, 23, -1, 23, -1, 99, -1, + 103, -1, 103, -1, 103, -1, 103, -1, 100, -1, + 104, -1, -1, 100, -1, 101, -1, 102, -1, 103, + -1, -1, 161, -1, 168, -1, 232, -1, 234, -1, + 237, -1, 250, -1, 7, 99, 113, 162, -1, 96, + 163, -1, 38, 167, -1, 60, -1, 98, 165, -1, + 53, -1, 29, 243, -1, 37, -1, 74, 244, -1, + 50, 109, 166, 110, -1, 97, 109, 164, 110, -1, + 23, -1, -1, 109, 166, 110, -1, 23, -1, 60, + -1, 29, 243, -1, 37, -1, 74, 244, -1, 169, + -1, 170, -1, 10, 99, 172, -1, 10, 99, 109, + 171, 110, 173, -1, -1, 23, -1, 113, 175, -1, + 113, 114, 174, 115, -1, 177, -1, 174, 108, 177, + -1, 179, -1, 215, -1, 225, -1, 179, -1, 215, + -1, 226, -1, 178, -1, 216, -1, 225, -1, 179, + -1, 73, 203, -1, 73, 180, -1, 73, 182, -1, + 73, 185, -1, 73, 187, -1, 73, 193, -1, 73, + 189, -1, 73, 196, -1, 73, 198, -1, 73, 200, + -1, 73, 202, -1, 73, 214, -1, 47, 242, 181, + -1, 191, -1, 33, -1, 69, -1, 43, 109, 192, + 110, 183, -1, 191, -1, 60, -1, 26, -1, 72, + 184, -1, 40, -1, 32, -1, 44, 186, -1, 25, + -1, 242, 67, -1, 45, 109, 192, 110, 242, 188, + -1, 191, -1, 75, 246, 190, -1, 29, -1, 25, + -1, 31, -1, 71, -1, 23, -1, 76, 244, 194, + 195, -1, 35, -1, 54, -1, 79, -1, 80, -1, + 78, -1, 77, -1, 36, 197, -1, 29, -1, 56, + -1, 28, 109, 199, 110, 57, -1, 23, -1, 58, + 201, -1, 70, -1, 26, -1, 205, 66, 109, 208, + 110, -1, 205, 204, -1, -1, 66, 109, 208, 105, + 208, 110, -1, 49, 209, 206, -1, -1, 207, -1, + 41, -1, 82, -1, 42, -1, 23, -1, 51, 210, + -1, 63, -1, 52, -1, 81, 244, -1, 55, 109, + 212, 110, -1, 48, 109, 213, 110, -1, -1, 211, + -1, 23, -1, 23, -1, 23, -1, 30, 64, -1, + 219, -1, 222, -1, 217, -1, 220, -1, 62, 34, + 109, 218, 110, -1, 223, -1, 223, 105, 223, -1, + 62, 34, 109, 223, 110, -1, 62, 46, 109, 221, + 110, -1, 224, -1, 224, 105, 224, -1, 62, 46, + 109, 224, 110, -1, 23, -1, 23, -1, 227, -1, + 229, -1, 228, -1, 229, -1, 230, -1, 24, -1, + 23, -1, 114, 230, 115, -1, 114, 230, 108, 230, + 115, -1, 114, 230, 108, 230, 108, 230, 115, -1, + 114, 230, 108, 230, 108, 230, 108, 230, 115, -1, + 231, 24, -1, 231, 23, -1, 111, -1, 112, -1, + -1, -1, 11, 233, 236, -1, -1, 5, 235, 236, + -1, 236, 108, 99, -1, 99, -1, 9, 99, 113, + 238, -1, 65, 60, -1, 65, 37, -1, 65, 239, + -1, 65, 59, -1, 65, 74, 244, -1, 65, 30, + -1, 29, 240, 241, -1, -1, 39, -1, 27, -1, + -1, 61, -1, 68, -1, -1, 39, -1, 27, -1, + -1, 61, -1, 68, -1, -1, 109, 247, 110, -1, + -1, 109, 248, 110, -1, -1, 109, 249, 110, -1, + 23, -1, 23, -1, 23, -1, 6, 99, 113, 99, + -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -766,31 +768,31 @@ 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 + 345, 348, 349, 350, 353, 359, 366, 373, 381, 388, + 396, 441, 448, 493, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 513, 526, 539, 552, + 574, 583, 616, 623, 638, 688, 730, 741, 762, 772, + 778, 809, 826, 826, 828, 835, 847, 848, 849, 852, + 864, 876, 894, 905, 917, 919, 920, 921, 922, 925, + 925, 925, 925, 926, 929, 930, 931, 932, 933, 934, + 937, 955, 959, 965, 969, 973, 977, 986, 995, 999, + 1004, 1010, 1021, 1021, 1022, 1024, 1028, 1032, 1036, 1042, + 1042, 1044, 1060, 1083, 1086, 1097, 1103, 1109, 1110, 1117, + 1123, 1129, 1137, 1143, 1149, 1157, 1163, 1169, 1177, 1178, + 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, + 1191, 1194, 1203, 1207, 1211, 1217, 1226, 1230, 1234, 1243, + 1247, 1253, 1259, 1266, 1271, 1279, 1289, 1291, 1299, 1305, + 1309, 1313, 1319, 1330, 1339, 1343, 1348, 1352, 1356, 1360, + 1366, 1373, 1377, 1383, 1391, 1402, 1409, 1413, 1419, 1429, + 1440, 1444, 1462, 1471, 1474, 1480, 1484, 1488, 1494, 1505, + 1510, 1515, 1520, 1525, 1530, 1538, 1541, 1546, 1559, 1567, + 1578, 1586, 1586, 1588, 1588, 1590, 1600, 1605, 1612, 1622, + 1631, 1636, 1643, 1653, 1663, 1675, 1675, 1676, 1676, 1678, + 1688, 1696, 1706, 1714, 1722, 1731, 1742, 1746, 1752, 1753, + 1754, 1757, 1757, 1760, 1760, 1763, 1769, 1777, 1790, 1799, + 1808, 1812, 1821, 1830, 1841, 1848, 1853, 1862, 1874, 1877, + 1886, 1897, 1898, 1899, 1902, 1903, 1904, 1907, 1908, 1911, + 1912, 1915, 1916, 1919, 1930, 1941, 1952 }; #endif @@ -822,24 +824,24 @@ static const char *const yytname[] = "TexInstruction", "ARL_instruction", "VECTORop_instruction", "SCALARop_instruction", "BINSCop_instruction", "BINop_instruction", "TRIop_instruction", "SAMPLE_instruction", "KIL_instruction", - "texImageUnit", "texTarget", "SWZ_instruction", "scalarSrcReg", - "swizzleSrcReg", "maskedDstReg", "maskedAddrReg", "extendedSwizzle", - "extSwizComp", "extSwizSel", "srcReg", "dstReg", "progParamArray", - "progParamArrayMem", "progParamArrayAbs", "progParamArrayRel", - "addrRegRelOffset", "addrRegPosOffset", "addrRegNegOffset", "addrReg", - "addrComponent", "addrWriteMask", "scalarSuffix", "swizzleSuffix", - "optionalMask", "namingStatement", "ATTRIB_statement", "attribBinding", - "vtxAttribItem", "vtxAttribNum", "vtxOptWeightNum", "vtxWeightNum", - "fragAttribItem", "PARAM_statement", "PARAM_singleStmt", - "PARAM_multipleStmt", "optArraySize", "paramSingleInit", - "paramMultipleInit", "paramMultInitList", "paramSingleItemDecl", - "paramSingleItemUse", "paramMultipleItem", "stateMultipleItem", - "stateSingleItem", "stateMaterialItem", "stateMatProperty", - "stateLightItem", "stateLightProperty", "stateSpotProperty", - "stateLightModelItem", "stateLModProperty", "stateLightProdItem", - "stateLProdProperty", "stateTexEnvItem", "stateTexEnvProperty", - "ambDiffSpecProperty", "stateLightNumber", "stateTexGenItem", - "stateTexGenType", "stateTexGenCoord", "stateFogItem", + "TXD_instruction", "texImageUnit", "texTarget", "SWZ_instruction", + "scalarSrcReg", "swizzleSrcReg", "maskedDstReg", "maskedAddrReg", + "extendedSwizzle", "extSwizComp", "extSwizSel", "srcReg", "dstReg", + "progParamArray", "progParamArrayMem", "progParamArrayAbs", + "progParamArrayRel", "addrRegRelOffset", "addrRegPosOffset", + "addrRegNegOffset", "addrReg", "addrComponent", "addrWriteMask", + "scalarSuffix", "swizzleSuffix", "optionalMask", "namingStatement", + "ATTRIB_statement", "attribBinding", "vtxAttribItem", "vtxAttribNum", + "vtxOptWeightNum", "vtxWeightNum", "fragAttribItem", "PARAM_statement", + "PARAM_singleStmt", "PARAM_multipleStmt", "optArraySize", + "paramSingleInit", "paramMultipleInit", "paramMultInitList", + "paramSingleItemDecl", "paramSingleItemUse", "paramMultipleItem", + "stateMultipleItem", "stateSingleItem", "stateMaterialItem", + "stateMatProperty", "stateLightItem", "stateLightProperty", + "stateSpotProperty", "stateLightModelItem", "stateLModProperty", + "stateLightProdItem", "stateLProdProperty", "stateTexEnvItem", + "stateTexEnvProperty", "ambDiffSpecProperty", "stateLightNumber", + "stateTexGenItem", "stateTexGenType", "stateTexGenCoord", "stateFogItem", "stateFogProperty", "stateClipPlaneItem", "stateClipPlaneNum", "statePointItem", "statePointProperty", "stateMatrixRow", "stateMatrixRows", "optMatrixRows", "stateMatrixItem", @@ -886,31 +888,31 @@ static const yytype_uint8 yyr1[] = { 0, 116, 117, 118, 118, 119, 119, 120, 121, 121, 122, 122, 123, 123, 124, 124, 124, 124, 124, 124, - 124, 125, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 143, 144, 144, 144, 144, 145, 145, 146, - 147, 147, 148, 149, 150, 150, 150, 151, 152, 153, - 154, 155, 156, 157, 157, 157, 157, 158, 158, 158, - 158, 158, 159, 159, 159, 159, 159, 159, 160, 161, - 161, 162, 162, 162, 162, 162, 162, 162, 162, 163, - 164, 164, 165, 166, 166, 166, 166, 167, 167, 168, - 169, 170, 170, 171, 172, 173, 173, 174, 174, 174, - 175, 175, 175, 176, 176, 176, 177, 177, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 179, - 180, 180, 180, 181, 182, 182, 182, 182, 182, 183, - 184, 185, 185, 186, 187, 188, 189, 190, 190, 190, - 191, 192, 193, 193, 194, 194, 194, 194, 195, 196, - 196, 197, 198, 199, 200, 200, 201, 202, 203, 203, - 204, 205, 205, 206, 206, 206, 207, 208, 208, 208, - 208, 208, 208, 209, 209, 210, 211, 212, 213, 214, - 214, 215, 215, 216, 217, 217, 218, 219, 220, 220, - 221, 222, 223, 224, 224, 225, 225, 226, 227, 227, - 228, 228, 228, 228, 229, 229, 230, 230, 230, 232, - 231, 234, 233, 235, 235, 236, 237, 237, 237, 237, - 237, 237, 238, 239, 239, 239, 240, 240, 240, 241, - 241, 241, 242, 242, 242, 243, 243, 244, 244, 245, - 245, 246, 247, 248, 249 + 124, 125, 125, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 144, 145, 145, 145, 145, 146, + 146, 147, 148, 148, 149, 150, 151, 151, 151, 152, + 153, 154, 155, 156, 157, 158, 158, 158, 158, 159, + 159, 159, 159, 159, 160, 160, 160, 160, 160, 160, + 161, 162, 162, 163, 163, 163, 163, 163, 163, 163, + 163, 164, 165, 165, 166, 167, 167, 167, 167, 168, + 168, 169, 170, 171, 171, 172, 173, 174, 174, 175, + 175, 175, 176, 176, 176, 177, 177, 177, 178, 178, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 180, 181, 181, 181, 182, 183, 183, 183, 183, + 183, 184, 185, 186, 186, 187, 188, 189, 190, 191, + 191, 191, 192, 193, 194, 194, 195, 195, 195, 195, + 196, 197, 197, 198, 199, 200, 201, 201, 202, 203, + 204, 204, 205, 206, 206, 207, 207, 207, 208, 209, + 209, 209, 209, 209, 209, 210, 210, 211, 212, 213, + 214, 215, 215, 216, 216, 217, 218, 218, 219, 220, + 221, 221, 222, 223, 224, 225, 225, 226, 226, 227, + 228, 228, 229, 229, 229, 229, 230, 230, 231, 231, + 231, 233, 232, 235, 234, 236, 236, 237, 238, 238, + 238, 238, 238, 238, 239, 240, 240, 240, 241, 241, + 241, 242, 242, 242, 243, 243, 243, 244, 244, 245, + 245, 246, 246, 247, 248, 249, 250 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -918,31 +920,31 @@ static const yytype_uint8 yyr2[] = { 0, 2, 4, 1, 1, 2, 0, 3, 2, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 4, 4, 4, 6, 6, 8, 8, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 6, 3, 3, 2, 2, 7, - 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, - 1, 1, 1, 3, 0, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 4, 2, - 2, 1, 2, 1, 2, 1, 2, 4, 4, 1, - 0, 3, 1, 1, 2, 1, 2, 1, 1, 3, - 6, 0, 1, 2, 4, 1, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, - 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, - 2, 1, 2, 6, 1, 3, 1, 1, 1, 1, - 1, 4, 1, 1, 1, 1, 1, 1, 2, 1, - 1, 5, 1, 2, 1, 1, 5, 2, 0, 6, - 3, 0, 1, 1, 1, 1, 1, 2, 1, 1, - 2, 4, 4, 0, 1, 1, 1, 1, 2, 1, - 1, 1, 1, 5, 1, 3, 5, 5, 1, 3, - 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 5, 7, 9, 2, 2, 1, 1, 0, 0, - 3, 0, 3, 3, 1, 4, 2, 2, 2, 2, - 3, 2, 3, 0, 1, 1, 0, 1, 1, 0, - 1, 1, 0, 1, 1, 0, 3, 0, 3, 0, - 3, 1, 1, 1, 4 + 1, 1, 1, 1, 4, 4, 4, 6, 6, 8, + 8, 2, 12, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 6, 3, 3, 2, + 2, 7, 2, 1, 1, 1, 1, 4, 1, 1, + 1, 1, 1, 1, 1, 3, 0, 2, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, + 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, + 4, 2, 2, 1, 2, 1, 2, 1, 2, 4, + 4, 1, 0, 3, 1, 1, 2, 1, 2, 1, + 1, 3, 6, 0, 1, 2, 4, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 3, 1, 1, 1, 5, 1, 1, 1, 2, + 1, 1, 2, 1, 2, 6, 1, 3, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, + 2, 1, 1, 5, 1, 2, 1, 1, 5, 2, + 0, 6, 3, 0, 1, 1, 1, 1, 1, 2, + 1, 1, 2, 4, 4, 0, 1, 1, 1, 1, + 2, 1, 1, 1, 1, 5, 1, 3, 5, 5, + 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 5, 7, 9, 2, 2, 1, 1, + 0, 0, 3, 0, 3, 3, 1, 4, 2, 2, + 2, 2, 3, 2, 3, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 3, 0, + 3, 0, 3, 1, 1, 1, 4 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -951,221 +953,223 @@ static const yytype_uint8 yyr2[] = static const yytype_uint16 yydefact[] = { 0, 3, 4, 0, 6, 1, 9, 0, 5, 0, - 0, 231, 0, 0, 0, 0, 229, 2, 0, 0, - 0, 0, 0, 0, 0, 228, 0, 8, 0, 12, - 13, 14, 15, 16, 17, 18, 19, 21, 22, 20, - 0, 82, 83, 107, 108, 84, 85, 86, 87, 7, - 0, 0, 0, 0, 0, 0, 0, 58, 0, 81, - 57, 0, 0, 0, 0, 0, 69, 0, 0, 226, - 227, 30, 0, 0, 10, 11, 234, 232, 0, 0, - 0, 111, 228, 109, 230, 243, 241, 237, 239, 236, - 255, 238, 228, 77, 78, 79, 80, 47, 228, 228, - 228, 228, 228, 228, 71, 48, 219, 218, 0, 0, - 0, 0, 53, 228, 76, 0, 54, 56, 120, 121, - 199, 200, 122, 215, 216, 0, 0, 264, 88, 235, - 112, 0, 113, 117, 118, 119, 213, 214, 217, 0, - 245, 244, 246, 0, 240, 0, 0, 0, 0, 25, - 0, 24, 23, 252, 105, 103, 255, 90, 0, 0, - 0, 0, 0, 0, 249, 0, 249, 0, 0, 259, - 255, 128, 129, 130, 131, 133, 132, 134, 135, 136, - 137, 0, 138, 252, 95, 0, 93, 91, 255, 0, - 100, 89, 0, 74, 73, 75, 46, 0, 0, 233, - 0, 225, 224, 247, 248, 242, 261, 0, 228, 228, - 0, 0, 228, 253, 254, 104, 106, 0, 0, 0, - 198, 169, 170, 168, 0, 151, 251, 250, 150, 0, - 0, 0, 0, 193, 189, 0, 188, 255, 181, 175, - 174, 173, 0, 0, 0, 0, 94, 0, 96, 0, - 0, 92, 228, 220, 62, 0, 60, 61, 0, 228, - 0, 110, 256, 27, 26, 72, 45, 257, 0, 0, - 211, 0, 212, 0, 172, 0, 160, 0, 152, 0, - 157, 158, 141, 142, 159, 139, 140, 0, 195, 187, - 194, 0, 190, 183, 185, 184, 180, 182, 263, 0, - 156, 155, 162, 163, 0, 0, 102, 0, 99, 0, - 0, 0, 55, 70, 64, 44, 0, 0, 228, 0, - 31, 0, 228, 206, 210, 0, 0, 249, 197, 0, - 196, 0, 260, 167, 166, 164, 165, 161, 186, 0, - 97, 98, 101, 228, 221, 0, 0, 63, 228, 51, - 52, 50, 0, 0, 0, 115, 123, 126, 124, 201, - 202, 125, 262, 0, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 29, 28, 171, 146, - 148, 145, 0, 143, 144, 0, 192, 191, 176, 0, - 67, 65, 68, 66, 0, 0, 0, 127, 178, 228, - 114, 258, 149, 147, 153, 154, 228, 222, 228, 0, - 0, 0, 177, 116, 0, 0, 0, 204, 0, 208, - 0, 223, 228, 203, 0, 207, 0, 0, 49, 205, - 209, 0, 0, 179 + 0, 233, 0, 0, 0, 0, 231, 2, 0, 0, + 0, 0, 0, 0, 0, 230, 0, 0, 8, 0, + 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, + 23, 20, 0, 84, 85, 109, 110, 86, 87, 88, + 89, 7, 0, 0, 0, 0, 0, 0, 0, 60, + 0, 83, 59, 0, 0, 0, 0, 0, 71, 0, + 0, 228, 229, 31, 0, 0, 0, 10, 11, 236, + 234, 0, 0, 0, 113, 230, 111, 232, 245, 243, + 239, 241, 238, 257, 240, 230, 79, 80, 81, 82, + 49, 230, 230, 230, 230, 230, 230, 73, 50, 221, + 220, 0, 0, 0, 0, 55, 230, 78, 0, 56, + 58, 122, 123, 201, 202, 124, 217, 218, 0, 230, + 0, 266, 90, 237, 114, 0, 115, 119, 120, 121, + 215, 216, 219, 0, 247, 246, 248, 0, 242, 0, + 0, 0, 0, 26, 0, 25, 24, 254, 107, 105, + 257, 92, 0, 0, 0, 0, 0, 0, 251, 0, + 251, 0, 0, 261, 257, 130, 131, 132, 133, 135, + 134, 136, 137, 138, 139, 0, 140, 254, 97, 0, + 95, 93, 257, 0, 102, 91, 0, 76, 75, 77, + 48, 0, 0, 0, 235, 0, 227, 226, 249, 250, + 244, 263, 0, 230, 230, 0, 0, 230, 255, 256, + 106, 108, 0, 0, 0, 200, 171, 172, 170, 0, + 153, 253, 252, 152, 0, 0, 0, 0, 195, 191, + 0, 190, 257, 183, 177, 176, 175, 0, 0, 0, + 0, 96, 0, 98, 0, 0, 94, 230, 222, 64, + 0, 62, 63, 0, 230, 230, 0, 112, 258, 28, + 27, 74, 47, 259, 0, 0, 213, 0, 214, 0, + 174, 0, 162, 0, 154, 0, 159, 160, 143, 144, + 161, 141, 142, 0, 197, 189, 196, 0, 192, 185, + 187, 186, 182, 184, 265, 0, 158, 157, 164, 165, + 0, 0, 104, 0, 101, 0, 0, 0, 57, 72, + 66, 46, 0, 0, 0, 230, 0, 33, 0, 230, + 208, 212, 0, 0, 251, 199, 0, 198, 0, 262, + 169, 168, 166, 167, 163, 188, 0, 99, 100, 103, + 230, 223, 0, 0, 65, 230, 53, 54, 52, 230, + 0, 0, 0, 117, 125, 128, 126, 203, 204, 127, + 264, 0, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 30, 29, 173, 148, 150, 147, + 0, 145, 146, 0, 194, 193, 178, 0, 69, 67, + 70, 68, 0, 0, 0, 0, 129, 180, 230, 116, + 260, 151, 149, 155, 156, 230, 224, 230, 0, 0, + 0, 0, 179, 118, 0, 0, 0, 0, 206, 0, + 210, 0, 225, 230, 0, 205, 0, 209, 0, 0, + 51, 32, 207, 211, 0, 0, 181 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 3, 4, 6, 8, 9, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 268, 376, - 39, 146, 71, 58, 67, 315, 316, 351, 114, 59, - 115, 255, 256, 257, 347, 391, 393, 68, 314, 105, - 266, 196, 97, 40, 41, 116, 191, 309, 251, 307, - 157, 42, 43, 44, 131, 83, 261, 354, 132, 117, - 355, 356, 118, 171, 285, 172, 383, 403, 173, 228, - 174, 404, 175, 301, 286, 277, 176, 304, 337, 177, - 223, 178, 275, 179, 241, 180, 397, 412, 181, 296, - 297, 339, 238, 289, 290, 331, 329, 182, 119, 358, - 359, 416, 120, 360, 418, 121, 271, 273, 361, 122, - 136, 123, 124, 138, 72, 45, 55, 46, 50, 77, - 47, 60, 91, 142, 205, 229, 215, 144, 320, 243, - 207, 363, 299, 48 + -1, 3, 4, 6, 8, 9, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 274, + 384, 41, 150, 73, 60, 69, 321, 322, 358, 117, + 61, 118, 260, 261, 262, 354, 399, 401, 70, 320, + 108, 272, 200, 100, 42, 43, 119, 195, 315, 256, + 313, 161, 44, 45, 46, 135, 86, 267, 362, 136, + 120, 363, 364, 121, 175, 291, 176, 391, 412, 177, + 233, 178, 413, 179, 307, 292, 283, 180, 310, 344, + 181, 228, 182, 281, 183, 246, 184, 406, 422, 185, + 302, 303, 346, 243, 295, 296, 338, 336, 186, 122, + 366, 367, 427, 123, 368, 429, 124, 277, 279, 369, + 125, 140, 126, 127, 142, 74, 47, 57, 48, 52, + 80, 49, 62, 94, 146, 210, 234, 220, 148, 327, + 248, 212, 371, 305, 50 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -334 +#define YYPACT_NINF -384 static const yytype_int16 yypact[] = { - 134, -334, -334, 41, -334, -334, 47, -50, -334, 169, - 19, -334, 33, 60, 74, 114, -334, -334, -20, -20, - -20, -20, -20, -20, 115, 43, -20, -334, 108, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - 109, -334, -334, -334, -334, -334, -334, -334, -334, -334, - 118, 105, 106, 110, -23, 118, 3, -334, 4, 103, - -334, 112, 113, 116, 117, 119, -334, 120, 123, -334, - -334, -334, -16, 121, -334, -334, -334, 122, 132, -15, - 157, 209, -12, -334, 122, 20, -334, -334, -334, -334, - 131, -334, 43, -334, -334, -334, -334, -334, 43, 43, - 43, 43, 43, 43, -334, -334, -334, -334, 0, 67, - 86, -2, 133, 43, 64, 135, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -16, 136, -334, -334, -334, - -334, 129, -334, -334, -334, -334, -334, -334, -334, 148, - -334, -334, 57, 218, -334, 137, 138, -16, 139, -334, - 140, -334, -334, 73, -334, -334, 131, -334, 141, 142, - 143, 179, 14, 144, 80, 145, 82, 88, -1, 146, - 131, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, 183, -334, 73, -334, 147, -334, -334, 131, 149, - 150, -334, 42, -334, -334, -334, -334, -11, 152, -334, - 151, -334, -334, -334, -334, -334, -334, 153, 43, 43, - 154, 182, 43, -334, -334, -334, -334, 239, 244, 245, - -334, -334, -334, -334, 246, -334, -334, -334, -334, 203, - 246, -5, 162, 249, -334, 164, -334, 131, 26, -334, - -334, -334, 251, 247, 17, 166, -334, 254, -334, 255, - 254, -334, 43, -334, -334, 170, -334, -334, 176, 43, - 167, -334, -334, -334, -334, -334, -334, 173, 175, 177, - -334, 174, -334, 178, -334, 180, -334, 181, -334, 184, - -334, -334, -334, -334, -334, -334, -334, 263, -334, -334, - -334, 264, -334, -334, -334, -334, -334, -334, -334, 185, - -334, -334, -334, -334, 130, 266, -334, 187, -334, 188, - 189, 45, -334, -334, 100, -334, 192, -6, -8, 269, - -334, 107, 43, -334, -334, 236, 13, 82, -334, 191, - -334, 193, -334, -334, -334, -334, -334, -334, -334, 194, - -334, -334, -334, 43, -334, 279, 282, -334, 43, -334, - -334, -334, 77, 86, 48, -334, -334, -334, -334, -334, - -334, -334, -334, 196, -334, -334, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, -334, 275, -334, -334, 5, -334, -334, -334, 50, - -334, -334, -334, -334, 200, 201, 202, -334, 243, -8, - -334, -334, -334, -334, -334, -334, 43, -334, 43, 239, - 244, 204, -334, -334, 197, 206, 205, 211, 210, 216, - 266, -334, 43, -334, 239, -334, 244, -18, -334, -334, - -334, 266, 212, -334 + 167, -384, -384, 37, -384, -384, 60, -70, -384, 171, + -23, -384, -13, 9, 12, 63, -384, -384, -33, -33, + -33, -33, -33, -33, 67, 104, -33, -33, -384, 66, + -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, + -384, -384, 68, -384, -384, -384, -384, -384, -384, -384, + -384, -384, 115, 109, 111, 112, -4, 115, 22, -384, + 113, 106, -384, 118, 120, 121, 122, 123, -384, 124, + 130, -384, -384, -384, -16, 126, 127, -384, -384, -384, + 128, 140, -18, 158, 204, -39, -384, 128, 26, -384, + -384, -384, -384, 134, -384, 104, -384, -384, -384, -384, + -384, 104, 104, 104, 104, 104, 104, -384, -384, -384, + -384, 73, 84, 76, -10, 135, 104, 64, 136, -384, + -384, -384, -384, -384, -384, -384, -384, -384, -16, 104, + 147, -384, -384, -384, -384, 137, -384, -384, -384, -384, + -384, -384, -384, 194, -384, -384, 46, 225, -384, 141, + 142, -16, 143, -384, 144, -384, -384, 87, -384, -384, + 134, -384, 145, 146, 148, 189, 15, 149, 88, 150, + 97, 80, 0, 151, 134, -384, -384, -384, -384, -384, + -384, -384, -384, -384, -384, 190, -384, 87, -384, 152, + -384, -384, 134, 153, 154, -384, 42, -384, -384, -384, + -384, -8, 156, 159, -384, 160, -384, -384, -384, -384, + -384, -384, 161, 104, 104, 163, 186, 104, -384, -384, + -384, -384, 249, 251, 252, -384, -384, -384, -384, 253, + -384, -384, -384, -384, 210, 253, 8, 169, 256, -384, + 172, -384, 134, 21, -384, -384, -384, 257, 254, -7, + 173, -384, 261, -384, 262, 261, -384, 104, -384, -384, + 176, -384, -384, 184, 104, 104, 174, -384, -384, -384, + -384, -384, -384, 180, 182, 183, -384, 185, -384, 187, + -384, 188, -384, 191, -384, 193, -384, -384, -384, -384, + -384, -384, -384, 269, -384, -384, -384, 270, -384, -384, + -384, -384, -384, -384, -384, 195, -384, -384, -384, -384, + 133, 271, -384, 196, -384, 197, 198, 45, -384, -384, + 108, -384, 192, -6, 201, -17, 273, -384, 110, 104, + -384, -384, 242, 29, 97, -384, 200, -384, 202, -384, + -384, -384, -384, -384, -384, -384, 203, -384, -384, -384, + 104, -384, 281, 288, -384, 104, -384, -384, -384, 104, + 103, 76, 48, -384, -384, -384, -384, -384, -384, -384, + -384, 205, -384, -384, -384, -384, -384, -384, -384, -384, + -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, + 282, -384, -384, 5, -384, -384, -384, 50, -384, -384, + -384, -384, 208, 209, 211, 212, -384, 260, -17, -384, + -384, -384, -384, -384, -384, 104, -384, 104, 186, 249, + 251, 213, -384, -384, 214, 219, 220, 221, 228, 224, + 230, 271, -384, 104, 110, -384, 249, -384, 251, 49, + -384, -384, -384, -384, 271, 226, -384 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -334, -94, -88, 126, -334, -334, -333, -334, -91, -334, - -334, -334, -334, -334, -334, -334, -334, 128, -334, -334, - -334, -334, -334, -334, -334, 248, -334, -334, -334, 78, - -334, -334, -334, -334, -334, -334, -334, -334, -334, -334, - -76, -334, -81, -334, -334, -334, -334, -334, -334, -334, - -334, -334, -334, -334, -307, 99, -334, -334, -334, -334, - -334, -334, -334, -334, -334, -334, -334, -334, -22, -334, - -334, -303, -334, -334, -334, -334, -334, -334, 250, -334, - -334, -334, -334, -334, -334, -334, -327, -316, 252, -334, - -334, -334, -80, -110, -82, -334, -334, -334, -334, 278, - -334, 256, -334, -334, -334, -161, 155, -146, -334, -334, - -334, -334, -334, -334 + -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, + -384, -384, -384, -384, -384, -384, -384, -384, -384, -100, + -115, -384, -97, -91, 119, -384, -384, -343, -384, -93, + -384, -384, -384, -384, -384, -384, -384, -384, 138, -384, + -384, -384, -384, -384, -384, -384, 255, -384, -384, -384, + 83, -384, -384, -384, -384, -384, -384, -384, -384, -384, + -384, -68, -384, -84, -384, -384, -384, -384, -384, -384, + -384, -384, -384, -384, -384, -308, 107, -384, -384, -384, + -384, -384, -384, -384, -384, -384, -384, -384, -384, -20, + -384, -384, -383, -384, -384, -384, -384, -384, -384, 258, + -384, -384, -384, -384, -384, -384, -384, -320, -371, 259, + -384, -384, -384, -83, -113, -85, -384, -384, -384, -384, + 289, -384, 264, -384, -384, -384, -165, 162, -150, -384, + -384, -384, -384, -384, -384 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -60 +#define YYTABLE_NINF -62 static const yytype_int16 yytable[] = { - 139, 133, 137, 192, 145, 231, 149, 106, 107, 152, - 216, 148, 254, 150, 151, 394, 147, 349, 147, 384, - 280, 147, 108, 108, 244, 239, 281, 183, 282, 153, - 280, 139, 85, 86, 198, 184, 281, 154, 280, 379, - 87, 5, 248, 221, 281, 56, 109, 140, 185, 10, - 109, 186, 302, 380, 352, 7, 210, 110, 187, 141, - 155, 110, 88, 89, 283, 353, 284, 293, 294, 240, - 222, 303, 188, 381, 156, 415, 284, 90, 405, 57, - 111, 111, 417, 112, 284, 382, 81, 431, 66, 428, - 82, 292, 388, 350, 419, 189, 190, 429, 113, 69, - 70, 158, 113, 69, 70, 225, 113, 226, 295, 226, - 430, 395, 92, 159, 160, 264, 161, 427, 203, 227, - 263, 227, 162, 396, 269, 204, 49, 147, 432, 163, - 164, 165, 51, 166, 213, 167, 232, 1, 2, 233, - 234, 214, 311, 235, 168, 61, 62, 63, 64, 65, - 252, 236, 73, 343, 69, 70, 399, 253, 406, 52, - 344, 169, 170, 400, 193, 407, 385, 194, 195, 237, - 139, 201, 202, 53, 11, 12, 13, 317, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 93, 94, 95, 96, 333, 334, 335, - 336, 345, 346, 54, 66, 74, 75, 76, 78, 79, - 98, 99, 56, 80, 100, 101, 104, 102, 103, 125, - 126, 127, 130, 389, 377, 199, 139, 357, 137, 200, - 143, 206, -59, 220, 197, 208, 209, 211, 212, 245, - 217, 218, 219, 224, 230, 242, 247, 265, 249, 250, - 259, 139, 270, 262, 260, 267, 317, 272, 274, 276, - 278, 287, 288, 291, 298, 305, 300, 306, 308, 313, - 312, 318, 319, 321, 323, 322, 328, 330, 324, 338, - 325, 326, 362, 378, 327, 332, 414, 340, 341, 342, - 348, 386, 390, 387, 388, 392, 401, 402, 408, 411, - 409, 410, 421, 420, 422, 423, 424, 139, 357, 137, - 425, 426, 433, 413, 139, 258, 317, 128, 310, 279, - 0, 398, 134, 84, 135, 0, 129, 0, 246, 0, - 317 + 143, 137, 141, 196, 149, 236, 153, 109, 110, 156, + 221, 152, 402, 154, 155, 259, 151, 356, 151, 187, + 111, 151, 111, 112, 249, 392, 244, 188, 308, 10, + 286, 143, 58, 286, 113, 202, 287, 5, 203, 287, + 189, 288, 253, 190, 226, 360, 112, 309, 439, 430, + 191, 88, 89, 144, 286, 387, 361, 113, 215, 90, + 287, 445, 299, 300, 192, 145, 59, 443, 7, 388, + 245, 227, 71, 72, 425, 116, 290, 289, 114, 290, + 114, 91, 92, 115, 51, 414, 53, 193, 194, 389, + 440, 68, 298, 357, 71, 72, 93, 116, 116, 428, + 290, 390, 157, 301, 164, 84, 165, 208, 54, 85, + 158, 55, 166, 230, 209, 231, 442, 270, 162, 167, + 168, 169, 269, 170, 231, 171, 275, 232, 237, 151, + 163, 238, 239, 159, 172, 240, 232, 404, 63, 64, + 65, 66, 67, 241, 317, 75, 76, 160, 218, 405, + 257, 173, 174, 350, 444, 219, 408, 258, 415, 396, + 351, 242, 56, 409, 197, 416, 68, 198, 199, 393, + 1, 2, 143, 77, 324, 78, 11, 12, 13, 323, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 96, 97, 98, 99, + 340, 341, 342, 343, 79, 71, 72, 206, 207, 352, + 353, 95, 81, 58, 82, 83, 101, 134, 102, 103, + 104, 105, 106, 107, 128, 129, 130, 397, 385, 131, + 143, 365, 141, 147, -61, 201, 204, 205, 211, 213, + 214, 216, 217, 225, 222, 223, 250, 224, 229, 235, + 247, 252, 254, 255, 264, 143, 271, 265, 403, 273, + 323, 268, 276, 266, 278, 280, 282, 284, 293, 294, + 304, 297, 311, 306, 312, 314, 318, 319, 325, 326, + 328, 329, 335, 337, 345, 330, 370, 331, 332, 386, + 355, 333, 424, 334, 398, 339, 347, 348, 349, 359, + 394, 400, 395, 396, 411, 410, 417, 418, 426, 441, + 419, 420, 431, 143, 365, 141, 421, 433, 434, 432, + 143, 435, 323, 436, 437, 438, 446, 132, 316, 263, + 423, 407, 285, 138, 139, 0, 87, 133, 323, 251 }; static const yytype_int16 yycheck[] = { - 82, 82, 82, 113, 92, 166, 100, 23, 24, 103, - 156, 99, 23, 101, 102, 348, 98, 23, 100, 326, - 25, 103, 38, 38, 170, 26, 31, 29, 33, 29, - 25, 113, 29, 30, 125, 37, 31, 37, 25, 26, - 37, 0, 188, 29, 31, 65, 62, 27, 50, 99, - 62, 53, 35, 40, 62, 8, 147, 73, 60, 39, - 60, 73, 59, 60, 69, 73, 71, 41, 42, 70, - 56, 54, 74, 60, 74, 408, 71, 74, 385, 99, - 96, 96, 409, 99, 71, 72, 109, 105, 99, 422, - 113, 237, 110, 99, 410, 97, 98, 424, 114, 111, - 112, 34, 114, 111, 112, 25, 114, 27, 82, 27, - 426, 34, 108, 46, 28, 209, 30, 420, 61, 39, - 208, 39, 36, 46, 212, 68, 107, 209, 431, 43, - 44, 45, 99, 47, 61, 49, 48, 3, 4, 51, - 52, 68, 252, 55, 58, 19, 20, 21, 22, 23, - 108, 63, 26, 108, 111, 112, 108, 115, 108, 99, - 115, 75, 76, 115, 100, 115, 327, 103, 104, 81, - 252, 23, 24, 99, 5, 6, 7, 259, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 100, 101, 102, 103, 77, 78, 79, - 80, 111, 112, 99, 99, 107, 107, 99, 113, 113, - 108, 108, 65, 113, 108, 108, 103, 108, 108, 108, - 108, 99, 23, 343, 322, 99, 318, 318, 318, 110, - 109, 23, 109, 64, 109, 108, 108, 108, 108, 66, - 109, 109, 109, 109, 109, 109, 109, 103, 109, 109, - 108, 343, 23, 110, 113, 83, 348, 23, 23, 23, - 67, 109, 23, 109, 23, 109, 29, 23, 23, 103, - 110, 114, 109, 108, 110, 108, 23, 23, 110, 23, - 110, 110, 23, 57, 110, 110, 406, 110, 110, 110, - 108, 110, 23, 110, 110, 23, 110, 32, 108, 66, - 109, 109, 115, 109, 108, 110, 105, 399, 399, 399, - 110, 105, 110, 399, 406, 197, 408, 79, 250, 230, - -1, 353, 82, 55, 82, -1, 80, -1, 183, -1, - 422 + 85, 85, 85, 116, 95, 170, 103, 23, 24, 106, + 160, 102, 355, 104, 105, 23, 101, 23, 103, 29, + 38, 106, 38, 62, 174, 333, 26, 37, 35, 99, + 25, 116, 65, 25, 73, 128, 31, 0, 129, 31, + 50, 33, 192, 53, 29, 62, 62, 54, 431, 420, + 60, 29, 30, 27, 25, 26, 73, 73, 151, 37, + 31, 444, 41, 42, 74, 39, 99, 438, 8, 40, + 70, 56, 111, 112, 417, 114, 71, 69, 96, 71, + 96, 59, 60, 99, 107, 393, 99, 97, 98, 60, + 433, 99, 242, 99, 111, 112, 74, 114, 114, 419, + 71, 72, 29, 82, 28, 109, 30, 61, 99, 113, + 37, 99, 36, 25, 68, 27, 436, 214, 34, 43, + 44, 45, 213, 47, 27, 49, 217, 39, 48, 214, + 46, 51, 52, 60, 58, 55, 39, 34, 19, 20, + 21, 22, 23, 63, 257, 26, 27, 74, 61, 46, + 108, 75, 76, 108, 105, 68, 108, 115, 108, 110, + 115, 81, 99, 115, 100, 115, 99, 103, 104, 334, + 3, 4, 257, 107, 265, 107, 5, 6, 7, 264, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 100, 101, 102, 103, + 77, 78, 79, 80, 99, 111, 112, 23, 24, 111, + 112, 108, 113, 65, 113, 113, 108, 23, 108, 108, + 108, 108, 108, 103, 108, 108, 108, 350, 329, 99, + 325, 325, 325, 109, 109, 109, 99, 110, 23, 108, + 108, 108, 108, 64, 109, 109, 66, 109, 109, 109, + 109, 109, 109, 109, 108, 350, 103, 108, 359, 83, + 355, 110, 23, 113, 23, 23, 23, 67, 109, 23, + 23, 109, 109, 29, 23, 23, 110, 103, 114, 109, + 108, 108, 23, 23, 23, 110, 23, 110, 110, 57, + 108, 110, 415, 110, 23, 110, 110, 110, 110, 108, + 110, 23, 110, 110, 32, 110, 108, 108, 418, 434, + 109, 109, 109, 408, 408, 408, 66, 108, 108, 115, + 415, 110, 417, 105, 110, 105, 110, 82, 255, 201, + 408, 361, 235, 85, 85, -1, 57, 83, 433, 187 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1174,48 +1178,49 @@ static const yytype_uint8 yystos[] = { 0, 3, 4, 117, 118, 0, 119, 8, 120, 121, 99, 5, 6, 7, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 136, - 159, 160, 167, 168, 169, 231, 233, 236, 249, 107, - 234, 99, 99, 99, 99, 232, 65, 99, 139, 145, - 237, 139, 139, 139, 139, 139, 99, 140, 153, 111, - 112, 138, 230, 139, 107, 107, 99, 235, 113, 113, - 113, 109, 113, 171, 235, 29, 30, 37, 59, 60, - 74, 238, 108, 100, 101, 102, 103, 158, 108, 108, - 108, 108, 108, 108, 103, 155, 23, 24, 38, 62, - 73, 96, 99, 114, 144, 146, 161, 175, 178, 214, - 218, 221, 225, 227, 228, 108, 108, 99, 161, 237, - 23, 170, 174, 178, 214, 224, 226, 228, 229, 230, - 27, 39, 239, 109, 243, 138, 137, 230, 138, 137, - 138, 138, 137, 29, 37, 60, 74, 166, 34, 46, - 28, 30, 36, 43, 44, 45, 47, 49, 58, 75, - 76, 179, 181, 184, 186, 188, 192, 195, 197, 199, - 201, 204, 213, 29, 37, 50, 53, 60, 74, 97, - 98, 162, 229, 100, 103, 104, 157, 109, 144, 99, - 110, 23, 24, 61, 68, 240, 23, 246, 108, 108, - 144, 108, 108, 61, 68, 242, 243, 109, 109, 109, - 64, 29, 56, 196, 109, 25, 27, 39, 185, 241, - 109, 241, 48, 51, 52, 55, 63, 81, 208, 26, - 70, 200, 109, 245, 243, 66, 242, 109, 243, 109, - 109, 164, 108, 115, 23, 147, 148, 149, 153, 108, - 113, 172, 110, 138, 137, 103, 156, 83, 134, 138, - 23, 222, 23, 223, 23, 198, 23, 191, 67, 191, - 25, 31, 33, 69, 71, 180, 190, 109, 23, 209, - 210, 109, 243, 41, 42, 82, 205, 206, 23, 248, - 29, 189, 35, 54, 193, 109, 23, 165, 23, 163, - 165, 229, 110, 103, 154, 141, 142, 230, 114, 109, - 244, 108, 108, 110, 110, 110, 110, 110, 23, 212, - 23, 211, 110, 77, 78, 79, 80, 194, 23, 207, - 110, 110, 110, 108, 115, 111, 112, 150, 108, 23, - 99, 143, 62, 73, 173, 176, 177, 178, 215, 216, - 219, 224, 23, 247, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 135, 138, 57, 26, - 40, 60, 72, 182, 190, 241, 110, 110, 110, 229, - 23, 151, 23, 152, 142, 34, 46, 202, 204, 108, - 115, 110, 32, 183, 187, 190, 108, 115, 108, 109, - 109, 66, 203, 176, 229, 142, 217, 222, 220, 223, - 109, 115, 108, 110, 105, 110, 105, 207, 142, 222, - 223, 105, 207, 110 + 15, 16, 17, 18, 19, 20, 21, 22, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 137, 160, 161, 168, 169, 170, 232, 234, 237, + 250, 107, 235, 99, 99, 99, 99, 233, 65, 99, + 140, 146, 238, 140, 140, 140, 140, 140, 99, 141, + 154, 111, 112, 139, 231, 140, 140, 107, 107, 99, + 236, 113, 113, 113, 109, 113, 172, 236, 29, 30, + 37, 59, 60, 74, 239, 108, 100, 101, 102, 103, + 159, 108, 108, 108, 108, 108, 108, 103, 156, 23, + 24, 38, 62, 73, 96, 99, 114, 145, 147, 162, + 176, 179, 215, 219, 222, 226, 228, 229, 108, 108, + 108, 99, 162, 238, 23, 171, 175, 179, 215, 225, + 227, 229, 230, 231, 27, 39, 240, 109, 244, 139, + 138, 231, 139, 138, 139, 139, 138, 29, 37, 60, + 74, 167, 34, 46, 28, 30, 36, 43, 44, 45, + 47, 49, 58, 75, 76, 180, 182, 185, 187, 189, + 193, 196, 198, 200, 202, 205, 214, 29, 37, 50, + 53, 60, 74, 97, 98, 163, 230, 100, 103, 104, + 158, 109, 145, 139, 99, 110, 23, 24, 61, 68, + 241, 23, 247, 108, 108, 145, 108, 108, 61, 68, + 243, 244, 109, 109, 109, 64, 29, 56, 197, 109, + 25, 27, 39, 186, 242, 109, 242, 48, 51, 52, + 55, 63, 81, 209, 26, 70, 201, 109, 246, 244, + 66, 243, 109, 244, 109, 109, 165, 108, 115, 23, + 148, 149, 150, 154, 108, 108, 113, 173, 110, 139, + 138, 103, 157, 83, 135, 139, 23, 223, 23, 224, + 23, 199, 23, 192, 67, 192, 25, 31, 33, 69, + 71, 181, 191, 109, 23, 210, 211, 109, 244, 41, + 42, 82, 206, 207, 23, 249, 29, 190, 35, 54, + 194, 109, 23, 166, 23, 164, 166, 230, 110, 103, + 155, 142, 143, 231, 139, 114, 109, 245, 108, 108, + 110, 110, 110, 110, 110, 23, 213, 23, 212, 110, + 77, 78, 79, 80, 195, 23, 208, 110, 110, 110, + 108, 115, 111, 112, 151, 108, 23, 99, 144, 108, + 62, 73, 174, 177, 178, 179, 216, 217, 220, 225, + 23, 248, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 136, 139, 57, 26, 40, 60, + 72, 183, 191, 242, 110, 110, 110, 230, 23, 152, + 23, 153, 143, 139, 34, 46, 203, 205, 108, 115, + 110, 32, 184, 188, 191, 108, 115, 108, 108, 109, + 109, 66, 204, 177, 230, 143, 135, 218, 223, 221, + 224, 109, 115, 108, 108, 110, 105, 110, 105, 208, + 143, 136, 223, 224, 105, 208, 110 }; #define yyerrok (yyerrstatus = 0) @@ -2159,69 +2164,69 @@ yyreduce: ;} break; - case 23: + case 24: /* Line 1455 of yacc.c */ -#line 353 "program_parse.y" +#line 354 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} break; - case 24: + case 25: /* Line 1455 of yacc.c */ -#line 359 "program_parse.y" +#line 360 "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; ;} break; - case 25: + case 26: /* Line 1455 of yacc.c */ -#line 366 "program_parse.y" +#line 367 "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; ;} break; - case 26: + case 27: /* Line 1455 of yacc.c */ -#line 373 "program_parse.y" +#line 374 "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; ;} break; - case 27: + case 28: /* Line 1455 of yacc.c */ -#line 381 "program_parse.y" +#line 382 "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; ;} break; - case 28: + case 29: /* Line 1455 of yacc.c */ -#line 389 "program_parse.y" +#line 390 "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; ;} break; - case 29: + case 30: /* Line 1455 of yacc.c */ -#line 396 "program_parse.y" +#line 397 "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) { @@ -2266,113 +2271,161 @@ yyreduce: ;} break; - case 30: + case 31: /* Line 1455 of yacc.c */ -#line 441 "program_parse.y" +#line 442 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL); state->fragment.UsesKill = 1; ;} break; - case 31: + case 32: + +/* Line 1455 of yacc.c */ +#line 449 "program_parse.y" + { + (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (12)].temp_inst).Opcode, & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg)); + if ((yyval.inst) != NULL) { + const GLbitfield tex_mask = (1U << (yyvsp[(10) - (12)].integer)); + GLbitfield shadow_tex = 0; + GLbitfield target_mask = 0; + + + (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (12)].temp_inst).SaturateMode; + (yyval.inst)->Base.TexSrcUnit = (yyvsp[(10) - (12)].integer); + + if ((yyvsp[(12) - (12)].integer) < 0) { + shadow_tex = tex_mask; + + (yyval.inst)->Base.TexSrcTarget = -(yyvsp[(12) - (12)].integer); + (yyval.inst)->Base.TexShadow = 1; + } else { + (yyval.inst)->Base.TexSrcTarget = (yyvsp[(12) - (12)].integer); + } + + target_mask = (1U << (yyval.inst)->Base.TexSrcTarget); + + /* If this texture unit was previously accessed and that access + * had a different texture target, generate an error. + * + * If this texture unit was previously accessed and that access + * had a different shadow mode, generate an error. + */ + if ((state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] != 0) + && ((state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] != target_mask) + || ((state->prog->ShadowSamplers & tex_mask) + != shadow_tex))) { + yyerror(& (yylsp[(12) - (12)]), state, + "multiple targets used on one texture image unit"); + YYERROR; + } + + + state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] |= target_mask; + state->prog->ShadowSamplers |= shadow_tex; + } + ;} + break; + + case 33: /* Line 1455 of yacc.c */ -#line 448 "program_parse.y" +#line 494 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 32: + case 34: /* Line 1455 of yacc.c */ -#line 453 "program_parse.y" +#line 499 "program_parse.y" { (yyval.integer) = TEXTURE_1D_INDEX; ;} break; - case 33: + case 35: /* Line 1455 of yacc.c */ -#line 454 "program_parse.y" +#line 500 "program_parse.y" { (yyval.integer) = TEXTURE_2D_INDEX; ;} break; - case 34: + case 36: /* Line 1455 of yacc.c */ -#line 455 "program_parse.y" +#line 501 "program_parse.y" { (yyval.integer) = TEXTURE_3D_INDEX; ;} break; - case 35: + case 37: /* Line 1455 of yacc.c */ -#line 456 "program_parse.y" +#line 502 "program_parse.y" { (yyval.integer) = TEXTURE_CUBE_INDEX; ;} break; - case 36: + case 38: /* Line 1455 of yacc.c */ -#line 457 "program_parse.y" +#line 503 "program_parse.y" { (yyval.integer) = TEXTURE_RECT_INDEX; ;} break; - case 37: + case 39: /* Line 1455 of yacc.c */ -#line 458 "program_parse.y" +#line 504 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_INDEX; ;} break; - case 38: + case 40: /* Line 1455 of yacc.c */ -#line 459 "program_parse.y" +#line 505 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_INDEX; ;} break; - case 39: + case 41: /* Line 1455 of yacc.c */ -#line 460 "program_parse.y" +#line 506 "program_parse.y" { (yyval.integer) = -TEXTURE_RECT_INDEX; ;} break; - case 40: + case 42: /* Line 1455 of yacc.c */ -#line 461 "program_parse.y" +#line 507 "program_parse.y" { (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;} break; - case 41: + case 43: /* Line 1455 of yacc.c */ -#line 462 "program_parse.y" +#line 508 "program_parse.y" { (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;} break; - case 42: + case 44: /* Line 1455 of yacc.c */ -#line 463 "program_parse.y" +#line 509 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;} break; - case 43: + case 45: /* Line 1455 of yacc.c */ -#line 464 "program_parse.y" +#line 510 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;} break; - case 44: + case 46: /* Line 1455 of yacc.c */ -#line 468 "program_parse.y" +#line 514 "program_parse.y" { /* FIXME: Is this correct? Should the extenedSwizzle be applied * FIXME: to the existing swizzle? @@ -2385,10 +2438,10 @@ yyreduce: ;} break; - case 45: + case 47: /* Line 1455 of yacc.c */ -#line 481 "program_parse.y" +#line 527 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2401,10 +2454,10 @@ yyreduce: ;} break; - case 46: + case 48: /* Line 1455 of yacc.c */ -#line 494 "program_parse.y" +#line 540 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2417,10 +2470,10 @@ yyreduce: ;} break; - case 47: + case 49: /* Line 1455 of yacc.c */ -#line 507 "program_parse.y" +#line 553 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask; @@ -2442,10 +2495,10 @@ yyreduce: ;} break; - case 48: + case 50: /* Line 1455 of yacc.c */ -#line 529 "program_parse.y" +#line 575 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_ADDRESS; @@ -2454,10 +2507,10 @@ yyreduce: ;} break; - case 49: + case 51: /* Line 1455 of yacc.c */ -#line 538 "program_parse.y" +#line 584 "program_parse.y" { const unsigned xyzw_valid = ((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0) @@ -2490,20 +2543,20 @@ yyreduce: ;} break; - case 50: + case 52: /* Line 1455 of yacc.c */ -#line 571 "program_parse.y" +#line 617 "program_parse.y" { (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); (yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0; ;} break; - case 51: + case 53: /* Line 1455 of yacc.c */ -#line 578 "program_parse.y" +#line 624 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2520,10 +2573,10 @@ yyreduce: ;} break; - case 52: + case 54: /* Line 1455 of yacc.c */ -#line 593 "program_parse.y" +#line 639 "program_parse.y" { if (strlen((yyvsp[(1) - (1)].string)) > 1) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2573,10 +2626,10 @@ yyreduce: ;} break; - case 53: + case 55: /* Line 1455 of yacc.c */ -#line 643 "program_parse.y" +#line 689 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2620,10 +2673,10 @@ yyreduce: ;} break; - case 54: + case 56: /* Line 1455 of yacc.c */ -#line 685 "program_parse.y" +#line 731 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = PROGRAM_INPUT; @@ -2636,10 +2689,10 @@ yyreduce: ;} break; - case 55: + case 57: /* Line 1455 of yacc.c */ -#line 696 "program_parse.y" +#line 742 "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)) { @@ -2662,10 +2715,10 @@ yyreduce: ;} break; - case 56: + case 58: /* Line 1455 of yacc.c */ -#line 717 "program_parse.y" +#line 763 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = ((yyvsp[(1) - (1)].temp_sym).name != NULL) @@ -2675,10 +2728,10 @@ yyreduce: ;} break; - case 57: + case 59: /* Line 1455 of yacc.c */ -#line 727 "program_parse.y" +#line 773 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_OUTPUT; @@ -2686,10 +2739,10 @@ yyreduce: ;} break; - case 58: + case 60: /* Line 1455 of yacc.c */ -#line 733 "program_parse.y" +#line 779 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2720,10 +2773,10 @@ yyreduce: ;} break; - case 59: + case 61: /* Line 1455 of yacc.c */ -#line 764 "program_parse.y" +#line 810 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2740,20 +2793,20 @@ yyreduce: ;} break; - case 62: + case 64: /* Line 1455 of yacc.c */ -#line 783 "program_parse.y" +#line 829 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer); ;} break; - case 63: + case 65: /* Line 1455 of yacc.c */ -#line 790 "program_parse.y" +#line 836 "program_parse.y" { /* FINISHME: Add support for multiple address registers. */ @@ -2765,31 +2818,31 @@ yyreduce: ;} break; - case 64: + case 66: /* Line 1455 of yacc.c */ -#line 801 "program_parse.y" +#line 847 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 65: + case 67: /* Line 1455 of yacc.c */ -#line 802 "program_parse.y" +#line 848 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 66: + case 68: /* Line 1455 of yacc.c */ -#line 803 "program_parse.y" +#line 849 "program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; - case 67: + case 69: /* Line 1455 of yacc.c */ -#line 807 "program_parse.y" +#line 853 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2801,10 +2854,10 @@ yyreduce: ;} break; - case 68: + case 70: /* Line 1455 of yacc.c */ -#line 819 "program_parse.y" +#line 865 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2816,10 +2869,10 @@ yyreduce: ;} break; - case 69: + case 71: /* Line 1455 of yacc.c */ -#line 831 "program_parse.y" +#line 877 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2837,10 +2890,10 @@ yyreduce: ;} break; - case 70: + case 72: /* Line 1455 of yacc.c */ -#line 849 "program_parse.y" +#line 895 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); @@ -2851,10 +2904,10 @@ yyreduce: ;} break; - case 71: + case 73: /* Line 1455 of yacc.c */ -#line 860 "program_parse.y" +#line 906 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2866,24 +2919,24 @@ yyreduce: ;} break; - case 76: + case 78: /* Line 1455 of yacc.c */ -#line 876 "program_parse.y" +#line 922 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; - case 81: + case 83: /* Line 1455 of yacc.c */ -#line 880 "program_parse.y" +#line 926 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; - case 88: + case 90: /* Line 1455 of yacc.c */ -#line 892 "program_parse.y" +#line 938 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); @@ -2901,55 +2954,55 @@ yyreduce: ;} break; - case 89: + case 91: /* Line 1455 of yacc.c */ -#line 910 "program_parse.y" +#line 956 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} break; - case 90: + case 92: /* Line 1455 of yacc.c */ -#line 914 "program_parse.y" +#line 960 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} break; - case 91: + case 93: /* Line 1455 of yacc.c */ -#line 920 "program_parse.y" +#line 966 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; ;} break; - case 92: + case 94: /* Line 1455 of yacc.c */ -#line 924 "program_parse.y" +#line 970 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; ;} break; - case 93: + case 95: /* Line 1455 of yacc.c */ -#line 928 "program_parse.y" +#line 974 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; ;} break; - case 94: + case 96: /* Line 1455 of yacc.c */ -#line 932 "program_parse.y" +#line 978 "program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); @@ -2960,10 +3013,10 @@ yyreduce: ;} break; - case 95: + case 97: /* Line 1455 of yacc.c */ -#line 941 "program_parse.y" +#line 987 "program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); @@ -2974,38 +3027,38 @@ yyreduce: ;} break; - case 96: + case 98: /* Line 1455 of yacc.c */ -#line 950 "program_parse.y" +#line 996 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} break; - case 97: + case 99: /* Line 1455 of yacc.c */ -#line 954 "program_parse.y" +#line 1000 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; ;} break; - case 98: + case 100: /* Line 1455 of yacc.c */ -#line 959 "program_parse.y" +#line 1005 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); ;} break; - case 99: + case 101: /* Line 1455 of yacc.c */ -#line 965 "program_parse.y" +#line 1011 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); @@ -3016,46 +3069,46 @@ yyreduce: ;} break; - case 103: + case 105: /* Line 1455 of yacc.c */ -#line 979 "program_parse.y" +#line 1025 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; ;} break; - case 104: + case 106: /* Line 1455 of yacc.c */ -#line 983 "program_parse.y" +#line 1029 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); ;} break; - case 105: + case 107: /* Line 1455 of yacc.c */ -#line 987 "program_parse.y" +#line 1033 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; ;} break; - case 106: + case 108: /* Line 1455 of yacc.c */ -#line 991 "program_parse.y" +#line 1037 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} break; - case 109: + case 111: /* Line 1455 of yacc.c */ -#line 999 "program_parse.y" +#line 1045 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); @@ -3071,10 +3124,10 @@ yyreduce: ;} break; - case 110: + case 112: /* Line 1455 of yacc.c */ -#line 1015 "program_parse.y" +#line 1061 "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, @@ -3096,19 +3149,19 @@ yyreduce: ;} break; - case 111: + case 113: /* Line 1455 of yacc.c */ -#line 1037 "program_parse.y" +#line 1083 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 112: + case 114: /* Line 1455 of yacc.c */ -#line 1041 "program_parse.y" +#line 1087 "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"); @@ -3119,38 +3172,38 @@ yyreduce: ;} break; - case 113: + case 115: /* Line 1455 of yacc.c */ -#line 1052 "program_parse.y" +#line 1098 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); ;} break; - case 114: + case 116: /* Line 1455 of yacc.c */ -#line 1058 "program_parse.y" +#line 1104 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); ;} break; - case 116: + case 118: /* Line 1455 of yacc.c */ -#line 1065 "program_parse.y" +#line 1111 "program_parse.y" { (yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length; (yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym); ;} break; - case 117: + case 119: /* Line 1455 of yacc.c */ -#line 1072 "program_parse.y" +#line 1118 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3158,10 +3211,10 @@ yyreduce: ;} break; - case 118: + case 120: /* Line 1455 of yacc.c */ -#line 1078 "program_parse.y" +#line 1124 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3169,10 +3222,10 @@ yyreduce: ;} break; - case 119: + case 121: /* Line 1455 of yacc.c */ -#line 1084 "program_parse.y" +#line 1130 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3180,10 +3233,10 @@ yyreduce: ;} break; - case 120: + case 122: /* Line 1455 of yacc.c */ -#line 1092 "program_parse.y" +#line 1138 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3191,10 +3244,10 @@ yyreduce: ;} break; - case 121: + case 123: /* Line 1455 of yacc.c */ -#line 1098 "program_parse.y" +#line 1144 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3202,10 +3255,10 @@ yyreduce: ;} break; - case 122: + case 124: /* Line 1455 of yacc.c */ -#line 1104 "program_parse.y" +#line 1150 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3213,10 +3266,10 @@ yyreduce: ;} break; - case 123: + case 125: /* Line 1455 of yacc.c */ -#line 1112 "program_parse.y" +#line 1158 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3224,10 +3277,10 @@ yyreduce: ;} break; - case 124: + case 126: /* Line 1455 of yacc.c */ -#line 1118 "program_parse.y" +#line 1164 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3235,10 +3288,10 @@ yyreduce: ;} break; - case 125: + case 127: /* Line 1455 of yacc.c */ -#line 1124 "program_parse.y" +#line 1170 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3246,101 +3299,101 @@ yyreduce: ;} break; - case 126: - -/* Line 1455 of yacc.c */ -#line 1131 "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" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} - break; - case 128: /* Line 1455 of yacc.c */ -#line 1135 "program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} +#line 1177 "program_parse.y" + { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; case 129: /* Line 1455 of yacc.c */ -#line 1136 "program_parse.y" +#line 1178 "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 1181 "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 1182 "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 1183 "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 1184 "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 1185 "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 1186 "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 1187 "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 1188 "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 1189 "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 1190 "program_parse.y" + { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} + break; + + case 140: + +/* Line 1455 of yacc.c */ +#line 1191 "program_parse.y" + { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} + break; + + case 141: + +/* Line 1455 of yacc.c */ +#line 1195 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3349,37 +3402,37 @@ yyreduce: ;} break; - case 140: + case 142: /* Line 1455 of yacc.c */ -#line 1158 "program_parse.y" +#line 1204 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 141: + case 143: /* Line 1455 of yacc.c */ -#line 1162 "program_parse.y" +#line 1208 "program_parse.y" { (yyval.integer) = STATE_EMISSION; ;} break; - case 142: + case 144: /* Line 1455 of yacc.c */ -#line 1166 "program_parse.y" +#line 1212 "program_parse.y" { (yyval.integer) = STATE_SHININESS; ;} break; - case 143: + case 145: /* Line 1455 of yacc.c */ -#line 1172 "program_parse.y" +#line 1218 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3388,28 +3441,28 @@ yyreduce: ;} break; - case 144: + case 146: /* Line 1455 of yacc.c */ -#line 1181 "program_parse.y" +#line 1227 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 145: + case 147: /* Line 1455 of yacc.c */ -#line 1185 "program_parse.y" +#line 1231 "program_parse.y" { (yyval.integer) = STATE_POSITION; ;} break; - case 146: + case 148: /* Line 1455 of yacc.c */ -#line 1189 "program_parse.y" +#line 1235 "program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); @@ -3420,57 +3473,57 @@ yyreduce: ;} break; - case 147: + case 149: /* Line 1455 of yacc.c */ -#line 1198 "program_parse.y" +#line 1244 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 148: + case 150: /* Line 1455 of yacc.c */ -#line 1202 "program_parse.y" +#line 1248 "program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; ;} break; - case 149: + case 151: /* Line 1455 of yacc.c */ -#line 1208 "program_parse.y" +#line 1254 "program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; ;} break; - case 150: + case 152: /* Line 1455 of yacc.c */ -#line 1214 "program_parse.y" +#line 1260 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; ;} break; - case 151: + case 153: /* Line 1455 of yacc.c */ -#line 1221 "program_parse.y" +#line 1267 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; ;} break; - case 152: + case 154: /* Line 1455 of yacc.c */ -#line 1226 "program_parse.y" +#line 1272 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3478,10 +3531,10 @@ yyreduce: ;} break; - case 153: + case 155: /* Line 1455 of yacc.c */ -#line 1234 "program_parse.y" +#line 1280 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3491,10 +3544,10 @@ yyreduce: ;} break; - case 155: + case 157: /* Line 1455 of yacc.c */ -#line 1246 "program_parse.y" +#line 1292 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(3) - (3)].integer); @@ -3502,46 +3555,46 @@ yyreduce: ;} break; - case 156: + case 158: /* Line 1455 of yacc.c */ -#line 1254 "program_parse.y" +#line 1300 "program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; ;} break; - case 157: + case 159: /* Line 1455 of yacc.c */ -#line 1260 "program_parse.y" +#line 1306 "program_parse.y" { (yyval.integer) = STATE_AMBIENT; ;} break; - case 158: + case 160: /* Line 1455 of yacc.c */ -#line 1264 "program_parse.y" +#line 1310 "program_parse.y" { (yyval.integer) = STATE_DIFFUSE; ;} break; - case 159: + case 161: /* Line 1455 of yacc.c */ -#line 1268 "program_parse.y" +#line 1314 "program_parse.y" { (yyval.integer) = STATE_SPECULAR; ;} break; - case 160: + case 162: /* Line 1455 of yacc.c */ -#line 1274 "program_parse.y" +#line 1320 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); @@ -3552,10 +3605,10 @@ yyreduce: ;} break; - case 161: + case 163: /* Line 1455 of yacc.c */ -#line 1285 "program_parse.y" +#line 1331 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3564,92 +3617,92 @@ yyreduce: ;} break; - case 162: + case 164: /* Line 1455 of yacc.c */ -#line 1294 "program_parse.y" +#line 1340 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; ;} break; - case 163: + case 165: /* Line 1455 of yacc.c */ -#line 1298 "program_parse.y" +#line 1344 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; ;} break; - case 164: + case 166: /* Line 1455 of yacc.c */ -#line 1303 "program_parse.y" +#line 1349 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; ;} break; - case 165: + case 167: /* Line 1455 of yacc.c */ -#line 1307 "program_parse.y" +#line 1353 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; ;} break; - case 166: + case 168: /* Line 1455 of yacc.c */ -#line 1311 "program_parse.y" +#line 1357 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; ;} break; - case 167: + case 169: /* Line 1455 of yacc.c */ -#line 1315 "program_parse.y" +#line 1361 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; ;} break; - case 168: + case 170: /* Line 1455 of yacc.c */ -#line 1321 "program_parse.y" +#line 1367 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); ;} break; - case 169: + case 171: /* Line 1455 of yacc.c */ -#line 1328 "program_parse.y" +#line 1374 "program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; ;} break; - case 170: + case 172: /* Line 1455 of yacc.c */ -#line 1332 "program_parse.y" +#line 1378 "program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; ;} break; - case 171: + case 173: /* Line 1455 of yacc.c */ -#line 1338 "program_parse.y" +#line 1384 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3657,10 +3710,10 @@ yyreduce: ;} break; - case 172: + case 174: /* Line 1455 of yacc.c */ -#line 1346 "program_parse.y" +#line 1392 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); @@ -3671,38 +3724,38 @@ yyreduce: ;} break; - case 173: + case 175: /* Line 1455 of yacc.c */ -#line 1357 "program_parse.y" +#line 1403 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); ;} break; - case 174: + case 176: /* Line 1455 of yacc.c */ -#line 1364 "program_parse.y" +#line 1410 "program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; ;} break; - case 175: + case 177: /* Line 1455 of yacc.c */ -#line 1368 "program_parse.y" +#line 1414 "program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; ;} break; - case 176: + case 178: /* Line 1455 of yacc.c */ -#line 1374 "program_parse.y" +#line 1420 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; @@ -3712,10 +3765,10 @@ yyreduce: ;} break; - case 177: + case 179: /* Line 1455 of yacc.c */ -#line 1384 "program_parse.y" +#line 1430 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; @@ -3725,20 +3778,20 @@ yyreduce: ;} break; - case 178: + case 180: /* Line 1455 of yacc.c */ -#line 1394 "program_parse.y" +#line 1440 "program_parse.y" { (yyval.state)[2] = 0; (yyval.state)[3] = 3; ;} break; - case 179: + case 181: /* Line 1455 of yacc.c */ -#line 1399 "program_parse.y" +#line 1445 "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). @@ -3756,10 +3809,10 @@ yyreduce: ;} break; - case 180: + case 182: /* Line 1455 of yacc.c */ -#line 1417 "program_parse.y" +#line 1463 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; @@ -3767,55 +3820,55 @@ yyreduce: ;} break; - case 181: + case 183: /* Line 1455 of yacc.c */ -#line 1425 "program_parse.y" +#line 1471 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 182: + case 184: /* Line 1455 of yacc.c */ -#line 1429 "program_parse.y" +#line 1475 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 183: + case 185: /* Line 1455 of yacc.c */ -#line 1435 "program_parse.y" +#line 1481 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; ;} break; - case 184: + case 186: /* Line 1455 of yacc.c */ -#line 1439 "program_parse.y" +#line 1485 "program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; ;} break; - case 185: + case 187: /* Line 1455 of yacc.c */ -#line 1443 "program_parse.y" +#line 1489 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; ;} break; - case 186: + case 188: /* Line 1455 of yacc.c */ -#line 1449 "program_parse.y" +#line 1495 "program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); @@ -3826,88 +3879,88 @@ yyreduce: ;} break; - case 187: + case 189: /* Line 1455 of yacc.c */ -#line 1460 "program_parse.y" +#line 1506 "program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); ;} break; - case 188: + case 190: /* Line 1455 of yacc.c */ -#line 1465 "program_parse.y" +#line 1511 "program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; ;} break; - case 189: + case 191: /* Line 1455 of yacc.c */ -#line 1470 "program_parse.y" +#line 1516 "program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; ;} break; - case 190: + case 192: /* Line 1455 of yacc.c */ -#line 1475 "program_parse.y" +#line 1521 "program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); ;} break; - case 191: + case 193: /* Line 1455 of yacc.c */ -#line 1480 "program_parse.y" +#line 1526 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; ;} break; - case 192: + case 194: /* Line 1455 of yacc.c */ -#line 1485 "program_parse.y" +#line 1531 "program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[(3) - (4)].integer); ;} break; - case 193: + case 195: /* Line 1455 of yacc.c */ -#line 1492 "program_parse.y" +#line 1538 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 194: + case 196: /* Line 1455 of yacc.c */ -#line 1496 "program_parse.y" +#line 1542 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 195: + case 197: /* Line 1455 of yacc.c */ -#line 1501 "program_parse.y" +#line 1547 "program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -3921,10 +3974,10 @@ yyreduce: ;} break; - case 196: + case 198: /* Line 1455 of yacc.c */ -#line 1514 "program_parse.y" +#line 1560 "program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -3933,10 +3986,10 @@ yyreduce: ;} break; - case 197: + case 199: /* Line 1455 of yacc.c */ -#line 1522 "program_parse.y" +#line 1568 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); @@ -3947,20 +4000,20 @@ yyreduce: ;} break; - case 198: + case 200: /* Line 1455 of yacc.c */ -#line 1533 "program_parse.y" +#line 1579 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; ;} break; - case 203: + case 205: /* Line 1455 of yacc.c */ -#line 1545 "program_parse.y" +#line 1591 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -3970,30 +4023,30 @@ yyreduce: ;} break; - case 204: + case 206: /* Line 1455 of yacc.c */ -#line 1555 "program_parse.y" +#line 1601 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); ;} break; - case 205: + case 207: /* Line 1455 of yacc.c */ -#line 1560 "program_parse.y" +#line 1606 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); ;} break; - case 206: + case 208: /* Line 1455 of yacc.c */ -#line 1567 "program_parse.y" +#line 1613 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4003,10 +4056,10 @@ yyreduce: ;} break; - case 207: + case 209: /* Line 1455 of yacc.c */ -#line 1577 "program_parse.y" +#line 1623 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4016,30 +4069,30 @@ yyreduce: ;} break; - case 208: + case 210: /* Line 1455 of yacc.c */ -#line 1586 "program_parse.y" +#line 1632 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); ;} break; - case 209: + case 211: /* Line 1455 of yacc.c */ -#line 1591 "program_parse.y" +#line 1637 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); ;} break; - case 210: + case 212: /* Line 1455 of yacc.c */ -#line 1598 "program_parse.y" +#line 1644 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4049,10 +4102,10 @@ yyreduce: ;} break; - case 211: + case 213: /* Line 1455 of yacc.c */ -#line 1608 "program_parse.y" +#line 1654 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); @@ -4062,10 +4115,10 @@ yyreduce: ;} break; - case 212: + case 214: /* Line 1455 of yacc.c */ -#line 1618 "program_parse.y" +#line 1664 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); @@ -4075,10 +4128,10 @@ yyreduce: ;} break; - case 217: + case 219: /* Line 1455 of yacc.c */ -#line 1633 "program_parse.y" +#line 1679 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4088,10 +4141,10 @@ yyreduce: ;} break; - case 218: + case 220: /* Line 1455 of yacc.c */ -#line 1643 "program_parse.y" +#line 1689 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4101,10 +4154,10 @@ yyreduce: ;} break; - case 219: + case 221: /* Line 1455 of yacc.c */ -#line 1651 "program_parse.y" +#line 1697 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer); @@ -4114,10 +4167,10 @@ yyreduce: ;} break; - case 220: + case 222: /* Line 1455 of yacc.c */ -#line 1661 "program_parse.y" +#line 1707 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (3)].real); @@ -4127,10 +4180,10 @@ yyreduce: ;} break; - case 221: + case 223: /* Line 1455 of yacc.c */ -#line 1669 "program_parse.y" +#line 1715 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (5)].real); @@ -4140,10 +4193,10 @@ yyreduce: ;} break; - case 222: + case 224: /* Line 1455 of yacc.c */ -#line 1678 "program_parse.y" +#line 1724 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (7)].real); @@ -4153,10 +4206,10 @@ yyreduce: ;} break; - case 223: + case 225: /* Line 1455 of yacc.c */ -#line 1687 "program_parse.y" +#line 1733 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (9)].real); @@ -4166,63 +4219,63 @@ yyreduce: ;} break; - case 224: + case 226: /* Line 1455 of yacc.c */ -#line 1697 "program_parse.y" +#line 1743 "program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); ;} break; - case 225: + case 227: /* Line 1455 of yacc.c */ -#line 1701 "program_parse.y" +#line 1747 "program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); ;} break; - case 226: + case 228: /* Line 1455 of yacc.c */ -#line 1706 "program_parse.y" +#line 1752 "program_parse.y" { (yyval.negate) = FALSE; ;} break; - case 227: + case 229: /* Line 1455 of yacc.c */ -#line 1707 "program_parse.y" +#line 1753 "program_parse.y" { (yyval.negate) = TRUE; ;} break; - case 228: + case 230: /* Line 1455 of yacc.c */ -#line 1708 "program_parse.y" +#line 1754 "program_parse.y" { (yyval.negate) = FALSE; ;} break; - case 229: + case 231: /* Line 1455 of yacc.c */ -#line 1711 "program_parse.y" +#line 1757 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 231: + case 233: /* Line 1455 of yacc.c */ -#line 1714 "program_parse.y" +#line 1760 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 233: + case 235: /* Line 1455 of yacc.c */ -#line 1718 "program_parse.y" +#line 1764 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { YYERROR; @@ -4230,10 +4283,10 @@ yyreduce: ;} break; - case 234: + case 236: /* Line 1455 of yacc.c */ -#line 1724 "program_parse.y" +#line 1770 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { YYERROR; @@ -4241,10 +4294,10 @@ yyreduce: ;} break; - case 235: + case 237: /* Line 1455 of yacc.c */ -#line 1732 "program_parse.y" +#line 1778 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_output, & (yylsp[(2) - (4)])); @@ -4257,10 +4310,10 @@ yyreduce: ;} break; - case 236: + case 238: /* Line 1455 of yacc.c */ -#line 1745 "program_parse.y" +#line 1791 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4271,10 +4324,10 @@ yyreduce: ;} break; - case 237: + case 239: /* Line 1455 of yacc.c */ -#line 1754 "program_parse.y" +#line 1800 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4285,19 +4338,19 @@ yyreduce: ;} break; - case 238: + case 240: /* Line 1455 of yacc.c */ -#line 1763 "program_parse.y" +#line 1809 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} break; - case 239: + case 241: /* Line 1455 of yacc.c */ -#line 1767 "program_parse.y" +#line 1813 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4308,10 +4361,10 @@ yyreduce: ;} break; - case 240: + case 242: /* Line 1455 of yacc.c */ -#line 1776 "program_parse.y" +#line 1822 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4322,10 +4375,10 @@ yyreduce: ;} break; - case 241: + case 243: /* Line 1455 of yacc.c */ -#line 1785 "program_parse.y" +#line 1831 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4336,19 +4389,19 @@ yyreduce: ;} break; - case 242: + case 244: /* Line 1455 of yacc.c */ -#line 1796 "program_parse.y" +#line 1842 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} break; - case 243: + case 245: /* Line 1455 of yacc.c */ -#line 1802 "program_parse.y" +#line 1848 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4356,10 +4409,10 @@ yyreduce: ;} break; - case 244: + case 246: /* Line 1455 of yacc.c */ -#line 1808 "program_parse.y" +#line 1854 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4370,10 +4423,10 @@ yyreduce: ;} break; - case 245: + case 247: /* Line 1455 of yacc.c */ -#line 1817 "program_parse.y" +#line 1863 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4384,19 +4437,19 @@ yyreduce: ;} break; - case 246: + case 248: /* Line 1455 of yacc.c */ -#line 1828 "program_parse.y" +#line 1874 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 247: + case 249: /* Line 1455 of yacc.c */ -#line 1832 "program_parse.y" +#line 1878 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4407,10 +4460,10 @@ yyreduce: ;} break; - case 248: + case 250: /* Line 1455 of yacc.c */ -#line 1841 "program_parse.y" +#line 1887 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4421,94 +4474,94 @@ yyreduce: ;} break; - case 249: + case 251: /* Line 1455 of yacc.c */ -#line 1851 "program_parse.y" +#line 1897 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 250: + case 252: /* Line 1455 of yacc.c */ -#line 1852 "program_parse.y" +#line 1898 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 251: + case 253: /* Line 1455 of yacc.c */ -#line 1853 "program_parse.y" +#line 1899 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 252: + case 254: /* Line 1455 of yacc.c */ -#line 1856 "program_parse.y" +#line 1902 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 253: + case 255: /* Line 1455 of yacc.c */ -#line 1857 "program_parse.y" +#line 1903 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 254: + case 256: /* Line 1455 of yacc.c */ -#line 1858 "program_parse.y" +#line 1904 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 255: + case 257: /* Line 1455 of yacc.c */ -#line 1861 "program_parse.y" +#line 1907 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 256: + case 258: /* Line 1455 of yacc.c */ -#line 1862 "program_parse.y" +#line 1908 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 257: + case 259: /* Line 1455 of yacc.c */ -#line 1865 "program_parse.y" +#line 1911 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 258: + case 260: /* Line 1455 of yacc.c */ -#line 1866 "program_parse.y" +#line 1912 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 259: + case 261: /* Line 1455 of yacc.c */ -#line 1869 "program_parse.y" +#line 1915 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 260: + case 262: /* Line 1455 of yacc.c */ -#line 1870 "program_parse.y" +#line 1916 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 261: + case 263: /* Line 1455 of yacc.c */ -#line 1874 "program_parse.y" +#line 1920 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4519,10 +4572,10 @@ yyreduce: ;} break; - case 262: + case 264: /* Line 1455 of yacc.c */ -#line 1885 "program_parse.y" +#line 1931 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4533,10 +4586,10 @@ yyreduce: ;} break; - case 263: + case 265: /* Line 1455 of yacc.c */ -#line 1896 "program_parse.y" +#line 1942 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4547,10 +4600,10 @@ yyreduce: ;} break; - case 264: + case 266: /* Line 1455 of yacc.c */ -#line 1907 "program_parse.y" +#line 1953 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4574,7 +4627,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4578 "program_parse.tab.c" +#line 4631 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4793,7 +4846,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 1927 "program_parse.y" +#line 1973 "program_parse.y" struct asm_instruction * diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 9dab00c3856..4cd459a096f 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -177,7 +177,7 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, %type instruction ALU_instruction TexInstruction %type ARL_instruction VECTORop_instruction %type SCALARop_instruction BINSCop_instruction BINop_instruction -%type TRIop_instruction SWZ_instruction SAMPLE_instruction +%type TRIop_instruction TXD_instruction SWZ_instruction SAMPLE_instruction %type KIL_instruction %type dstReg maskedDstReg maskedAddrReg @@ -347,6 +347,7 @@ ALU_instruction: ARL_instruction TexInstruction: SAMPLE_instruction | KIL_instruction + | TXD_instruction ; ARL_instruction: ARL maskedAddrReg ',' scalarSrcReg @@ -444,6 +445,51 @@ KIL_instruction: KIL swizzleSrcReg } ; +TXD_instruction: TXD_OP maskedDstReg ',' swizzleSrcReg ',' swizzleSrcReg ',' swizzleSrcReg ',' texImageUnit ',' texTarget + { + $$ = asm_instruction_ctor($1.Opcode, & $2, & $4, & $6, & $8); + if ($$ != NULL) { + const GLbitfield tex_mask = (1U << $10); + GLbitfield shadow_tex = 0; + GLbitfield target_mask = 0; + + + $$->Base.SaturateMode = $1.SaturateMode; + $$->Base.TexSrcUnit = $10; + + if ($12 < 0) { + shadow_tex = tex_mask; + + $$->Base.TexSrcTarget = -$12; + $$->Base.TexShadow = 1; + } else { + $$->Base.TexSrcTarget = $12; + } + + target_mask = (1U << $$->Base.TexSrcTarget); + + /* If this texture unit was previously accessed and that access + * had a different texture target, generate an error. + * + * If this texture unit was previously accessed and that access + * had a different shadow mode, generate an error. + */ + if ((state->prog->TexturesUsed[$10] != 0) + && ((state->prog->TexturesUsed[$10] != target_mask) + || ((state->prog->ShadowSamplers & tex_mask) + != shadow_tex))) { + yyerror(& @12, state, + "multiple targets used on one texture image unit"); + YYERROR; + } + + + state->prog->TexturesUsed[$10] |= target_mask; + state->prog->ShadowSamplers |= shadow_tex; + } + } + ; + texImageUnit: TEXTURE_UNIT optTexImageUnitNum { $$ = $2; -- cgit v1.2.3 From b8e389bb0315287b72087b93a089ab944d77ab80 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 3 Sep 2009 14:05:18 -0700 Subject: NV fp parser: Support new scalar constant behavior ARBfp requires scalar constants have a '.x' suffix, but NVfp_option does not. This shows up with instructions that require a scalar parameter (e.g., COS). --- src/mesa/shader/program_parse.tab.c | 1482 ++++++++++++++++++----------------- src/mesa/shader/program_parse.y | 17 + 2 files changed, 770 insertions(+), 729 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index 06aefd073fd..508ac617e4a 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -588,16 +588,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 349 +#define YYLAST 351 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 116 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 135 /* YYNRULES -- Number of rules. */ -#define YYNRULES 266 +#define YYNRULES 267 /* YYNRULES -- Number of states. */ -#define YYNSTATES 447 +#define YYNSTATES 448 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -657,29 +657,29 @@ static const yytype_uint16 yyprhs[] = 24, 27, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 59, 64, 69, 76, 83, 92, 101, 104, 117, 120, 122, 124, 126, 128, 130, - 132, 134, 136, 138, 140, 142, 144, 151, 155, 159, - 162, 165, 173, 176, 178, 180, 182, 184, 189, 191, - 193, 195, 197, 199, 201, 203, 207, 208, 211, 214, - 216, 218, 220, 222, 224, 226, 228, 230, 232, 233, - 235, 237, 239, 241, 242, 244, 246, 248, 250, 252, - 254, 259, 262, 265, 267, 270, 272, 275, 277, 280, - 285, 290, 292, 293, 297, 299, 301, 304, 306, 309, - 311, 313, 317, 324, 325, 327, 330, 335, 337, 341, - 343, 345, 347, 349, 351, 353, 355, 357, 359, 361, + 132, 134, 136, 138, 140, 142, 144, 151, 155, 158, + 162, 165, 168, 176, 179, 181, 183, 185, 187, 192, + 194, 196, 198, 200, 202, 204, 206, 210, 211, 214, + 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, + 236, 238, 240, 242, 244, 245, 247, 249, 251, 253, + 255, 257, 262, 265, 268, 270, 273, 275, 278, 280, + 283, 288, 293, 295, 296, 300, 302, 304, 307, 309, + 312, 314, 316, 320, 327, 328, 330, 333, 338, 340, + 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 367, 370, 373, 376, 379, 382, 385, 388, 391, - 394, 397, 401, 403, 405, 407, 413, 415, 417, 419, - 422, 424, 426, 429, 431, 434, 441, 443, 447, 449, - 451, 453, 455, 457, 462, 464, 466, 468, 470, 472, - 474, 477, 479, 481, 487, 489, 492, 494, 496, 502, - 505, 506, 513, 517, 518, 520, 522, 524, 526, 528, - 531, 533, 535, 538, 543, 548, 549, 551, 553, 555, - 557, 560, 562, 564, 566, 568, 574, 576, 580, 586, - 592, 594, 598, 604, 606, 608, 610, 612, 614, 616, - 618, 620, 622, 626, 632, 640, 650, 653, 656, 658, - 660, 661, 662, 666, 667, 671, 675, 677, 682, 685, - 688, 691, 694, 698, 701, 705, 706, 708, 710, 711, - 713, 715, 716, 718, 720, 721, 723, 725, 726, 730, - 731, 735, 736, 740, 742, 744, 746 + 394, 397, 400, 404, 406, 408, 410, 416, 418, 420, + 422, 425, 427, 429, 432, 434, 437, 444, 446, 450, + 452, 454, 456, 458, 460, 465, 467, 469, 471, 473, + 475, 477, 480, 482, 484, 490, 492, 495, 497, 499, + 505, 508, 509, 516, 520, 521, 523, 525, 527, 529, + 531, 534, 536, 538, 541, 546, 551, 552, 554, 556, + 558, 560, 563, 565, 567, 569, 571, 577, 579, 583, + 589, 595, 597, 601, 607, 609, 611, 613, 615, 617, + 619, 621, 623, 625, 629, 635, 643, 653, 656, 659, + 661, 663, 664, 665, 669, 670, 674, 678, 680, 685, + 688, 691, 694, 697, 701, 704, 708, 709, 711, 713, + 714, 716, 718, 719, 721, 723, 724, 726, 728, 729, + 733, 734, 738, 739, 743, 745, 747, 749 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -700,67 +700,67 @@ static const yytype_int16 yyrhs[] = 84, -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, -1, 93, -1, 94, -1, 95, -1, 21, 140, 108, 145, 108, 142, - -1, 231, 145, 157, -1, 231, 145, 158, -1, 146, - 159, -1, 154, 156, -1, 143, 108, 143, 108, 143, - 108, 143, -1, 231, 144, -1, 23, -1, 99, -1, - 99, -1, 162, -1, 147, 109, 148, 110, -1, 176, - -1, 238, -1, 99, -1, 99, -1, 149, -1, 150, - -1, 23, -1, 154, 155, 151, -1, -1, 111, 152, - -1, 112, 153, -1, 23, -1, 23, -1, 99, -1, - 103, -1, 103, -1, 103, -1, 103, -1, 100, -1, - 104, -1, -1, 100, -1, 101, -1, 102, -1, 103, - -1, -1, 161, -1, 168, -1, 232, -1, 234, -1, - 237, -1, 250, -1, 7, 99, 113, 162, -1, 96, - 163, -1, 38, 167, -1, 60, -1, 98, 165, -1, - 53, -1, 29, 243, -1, 37, -1, 74, 244, -1, - 50, 109, 166, 110, -1, 97, 109, 164, 110, -1, - 23, -1, -1, 109, 166, 110, -1, 23, -1, 60, - -1, 29, 243, -1, 37, -1, 74, 244, -1, 169, - -1, 170, -1, 10, 99, 172, -1, 10, 99, 109, - 171, 110, 173, -1, -1, 23, -1, 113, 175, -1, - 113, 114, 174, 115, -1, 177, -1, 174, 108, 177, - -1, 179, -1, 215, -1, 225, -1, 179, -1, 215, - -1, 226, -1, 178, -1, 216, -1, 225, -1, 179, - -1, 73, 203, -1, 73, 180, -1, 73, 182, -1, - 73, 185, -1, 73, 187, -1, 73, 193, -1, 73, - 189, -1, 73, 196, -1, 73, 198, -1, 73, 200, - -1, 73, 202, -1, 73, 214, -1, 47, 242, 181, - -1, 191, -1, 33, -1, 69, -1, 43, 109, 192, - 110, 183, -1, 191, -1, 60, -1, 26, -1, 72, - 184, -1, 40, -1, 32, -1, 44, 186, -1, 25, - -1, 242, 67, -1, 45, 109, 192, 110, 242, 188, - -1, 191, -1, 75, 246, 190, -1, 29, -1, 25, - -1, 31, -1, 71, -1, 23, -1, 76, 244, 194, - 195, -1, 35, -1, 54, -1, 79, -1, 80, -1, - 78, -1, 77, -1, 36, 197, -1, 29, -1, 56, - -1, 28, 109, 199, 110, 57, -1, 23, -1, 58, - 201, -1, 70, -1, 26, -1, 205, 66, 109, 208, - 110, -1, 205, 204, -1, -1, 66, 109, 208, 105, - 208, 110, -1, 49, 209, 206, -1, -1, 207, -1, - 41, -1, 82, -1, 42, -1, 23, -1, 51, 210, - -1, 63, -1, 52, -1, 81, 244, -1, 55, 109, - 212, 110, -1, 48, 109, 213, 110, -1, -1, 211, - -1, 23, -1, 23, -1, 23, -1, 30, 64, -1, - 219, -1, 222, -1, 217, -1, 220, -1, 62, 34, - 109, 218, 110, -1, 223, -1, 223, 105, 223, -1, - 62, 34, 109, 223, 110, -1, 62, 46, 109, 221, - 110, -1, 224, -1, 224, 105, 224, -1, 62, 46, - 109, 224, 110, -1, 23, -1, 23, -1, 227, -1, - 229, -1, 228, -1, 229, -1, 230, -1, 24, -1, - 23, -1, 114, 230, 115, -1, 114, 230, 108, 230, - 115, -1, 114, 230, 108, 230, 108, 230, 115, -1, - 114, 230, 108, 230, 108, 230, 108, 230, 115, -1, - 231, 24, -1, 231, 23, -1, 111, -1, 112, -1, - -1, -1, 11, 233, 236, -1, -1, 5, 235, 236, - -1, 236, 108, 99, -1, 99, -1, 9, 99, 113, - 238, -1, 65, 60, -1, 65, 37, -1, 65, 239, - -1, 65, 59, -1, 65, 74, 244, -1, 65, 30, - -1, 29, 240, 241, -1, -1, 39, -1, 27, -1, - -1, 61, -1, 68, -1, -1, 39, -1, 27, -1, - -1, 61, -1, 68, -1, -1, 109, 247, 110, -1, - -1, 109, 248, 110, -1, -1, 109, 249, 110, -1, - 23, -1, 23, -1, 23, -1, 6, 99, 113, 99, - -1 + -1, 231, 145, 157, -1, 231, 228, -1, 231, 145, + 158, -1, 146, 159, -1, 154, 156, -1, 143, 108, + 143, 108, 143, 108, 143, -1, 231, 144, -1, 23, + -1, 99, -1, 99, -1, 162, -1, 147, 109, 148, + 110, -1, 176, -1, 238, -1, 99, -1, 99, -1, + 149, -1, 150, -1, 23, -1, 154, 155, 151, -1, + -1, 111, 152, -1, 112, 153, -1, 23, -1, 23, + -1, 99, -1, 103, -1, 103, -1, 103, -1, 103, + -1, 100, -1, 104, -1, -1, 100, -1, 101, -1, + 102, -1, 103, -1, -1, 161, -1, 168, -1, 232, + -1, 234, -1, 237, -1, 250, -1, 7, 99, 113, + 162, -1, 96, 163, -1, 38, 167, -1, 60, -1, + 98, 165, -1, 53, -1, 29, 243, -1, 37, -1, + 74, 244, -1, 50, 109, 166, 110, -1, 97, 109, + 164, 110, -1, 23, -1, -1, 109, 166, 110, -1, + 23, -1, 60, -1, 29, 243, -1, 37, -1, 74, + 244, -1, 169, -1, 170, -1, 10, 99, 172, -1, + 10, 99, 109, 171, 110, 173, -1, -1, 23, -1, + 113, 175, -1, 113, 114, 174, 115, -1, 177, -1, + 174, 108, 177, -1, 179, -1, 215, -1, 225, -1, + 179, -1, 215, -1, 226, -1, 178, -1, 216, -1, + 225, -1, 179, -1, 73, 203, -1, 73, 180, -1, + 73, 182, -1, 73, 185, -1, 73, 187, -1, 73, + 193, -1, 73, 189, -1, 73, 196, -1, 73, 198, + -1, 73, 200, -1, 73, 202, -1, 73, 214, -1, + 47, 242, 181, -1, 191, -1, 33, -1, 69, -1, + 43, 109, 192, 110, 183, -1, 191, -1, 60, -1, + 26, -1, 72, 184, -1, 40, -1, 32, -1, 44, + 186, -1, 25, -1, 242, 67, -1, 45, 109, 192, + 110, 242, 188, -1, 191, -1, 75, 246, 190, -1, + 29, -1, 25, -1, 31, -1, 71, -1, 23, -1, + 76, 244, 194, 195, -1, 35, -1, 54, -1, 79, + -1, 80, -1, 78, -1, 77, -1, 36, 197, -1, + 29, -1, 56, -1, 28, 109, 199, 110, 57, -1, + 23, -1, 58, 201, -1, 70, -1, 26, -1, 205, + 66, 109, 208, 110, -1, 205, 204, -1, -1, 66, + 109, 208, 105, 208, 110, -1, 49, 209, 206, -1, + -1, 207, -1, 41, -1, 82, -1, 42, -1, 23, + -1, 51, 210, -1, 63, -1, 52, -1, 81, 244, + -1, 55, 109, 212, 110, -1, 48, 109, 213, 110, + -1, -1, 211, -1, 23, -1, 23, -1, 23, -1, + 30, 64, -1, 219, -1, 222, -1, 217, -1, 220, + -1, 62, 34, 109, 218, 110, -1, 223, -1, 223, + 105, 223, -1, 62, 34, 109, 223, 110, -1, 62, + 46, 109, 221, 110, -1, 224, -1, 224, 105, 224, + -1, 62, 46, 109, 224, 110, -1, 23, -1, 23, + -1, 227, -1, 229, -1, 228, -1, 229, -1, 230, + -1, 24, -1, 23, -1, 114, 230, 115, -1, 114, + 230, 108, 230, 115, -1, 114, 230, 108, 230, 108, + 230, 115, -1, 114, 230, 108, 230, 108, 230, 108, + 230, 115, -1, 231, 24, -1, 231, 23, -1, 111, + -1, 112, -1, -1, -1, 11, 233, 236, -1, -1, + 5, 235, 236, -1, 236, 108, 99, -1, 99, -1, + 9, 99, 113, 238, -1, 65, 60, -1, 65, 37, + -1, 65, 239, -1, 65, 59, -1, 65, 74, 244, + -1, 65, 30, -1, 29, 240, 241, -1, -1, 39, + -1, 27, -1, -1, 61, -1, 68, -1, -1, 39, + -1, 27, -1, -1, 61, -1, 68, -1, -1, 109, + 247, 110, -1, -1, 109, 248, 110, -1, -1, 109, + 249, 110, -1, 23, -1, 23, -1, 23, -1, 6, + 99, 113, 99, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -770,29 +770,29 @@ static const yytype_uint16 yyrline[] = 309, 324, 327, 332, 339, 340, 341, 342, 343, 344, 345, 348, 349, 350, 353, 359, 366, 373, 381, 388, 396, 441, 448, 493, 499, 500, 501, 502, 503, 504, - 505, 506, 507, 508, 509, 510, 513, 526, 539, 552, - 574, 583, 616, 623, 638, 688, 730, 741, 762, 772, - 778, 809, 826, 826, 828, 835, 847, 848, 849, 852, - 864, 876, 894, 905, 917, 919, 920, 921, 922, 925, - 925, 925, 925, 926, 929, 930, 931, 932, 933, 934, - 937, 955, 959, 965, 969, 973, 977, 986, 995, 999, - 1004, 1010, 1021, 1021, 1022, 1024, 1028, 1032, 1036, 1042, - 1042, 1044, 1060, 1083, 1086, 1097, 1103, 1109, 1110, 1117, - 1123, 1129, 1137, 1143, 1149, 1157, 1163, 1169, 1177, 1178, - 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, - 1191, 1194, 1203, 1207, 1211, 1217, 1226, 1230, 1234, 1243, - 1247, 1253, 1259, 1266, 1271, 1279, 1289, 1291, 1299, 1305, - 1309, 1313, 1319, 1330, 1339, 1343, 1348, 1352, 1356, 1360, - 1366, 1373, 1377, 1383, 1391, 1402, 1409, 1413, 1419, 1429, - 1440, 1444, 1462, 1471, 1474, 1480, 1484, 1488, 1494, 1505, - 1510, 1515, 1520, 1525, 1530, 1538, 1541, 1546, 1559, 1567, - 1578, 1586, 1586, 1588, 1588, 1590, 1600, 1605, 1612, 1622, - 1631, 1636, 1643, 1653, 1663, 1675, 1675, 1676, 1676, 1678, - 1688, 1696, 1706, 1714, 1722, 1731, 1742, 1746, 1752, 1753, - 1754, 1757, 1757, 1760, 1760, 1763, 1769, 1777, 1790, 1799, - 1808, 1812, 1821, 1830, 1841, 1848, 1853, 1862, 1874, 1877, - 1886, 1897, 1898, 1899, 1902, 1903, 1904, 1907, 1908, 1911, - 1912, 1915, 1916, 1919, 1930, 1941, 1952 + 505, 506, 507, 508, 509, 510, 513, 526, 537, 556, + 569, 591, 600, 633, 640, 655, 705, 747, 758, 779, + 789, 795, 826, 843, 843, 845, 852, 864, 865, 866, + 869, 881, 893, 911, 922, 934, 936, 937, 938, 939, + 942, 942, 942, 942, 943, 946, 947, 948, 949, 950, + 951, 954, 972, 976, 982, 986, 990, 994, 1003, 1012, + 1016, 1021, 1027, 1038, 1038, 1039, 1041, 1045, 1049, 1053, + 1059, 1059, 1061, 1077, 1100, 1103, 1114, 1120, 1126, 1127, + 1134, 1140, 1146, 1154, 1160, 1166, 1174, 1180, 1186, 1194, + 1195, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, + 1207, 1208, 1211, 1220, 1224, 1228, 1234, 1243, 1247, 1251, + 1260, 1264, 1270, 1276, 1283, 1288, 1296, 1306, 1308, 1316, + 1322, 1326, 1330, 1336, 1347, 1356, 1360, 1365, 1369, 1373, + 1377, 1383, 1390, 1394, 1400, 1408, 1419, 1426, 1430, 1436, + 1446, 1457, 1461, 1479, 1488, 1491, 1497, 1501, 1505, 1511, + 1522, 1527, 1532, 1537, 1542, 1547, 1555, 1558, 1563, 1576, + 1584, 1595, 1603, 1603, 1605, 1605, 1607, 1617, 1622, 1629, + 1639, 1648, 1653, 1660, 1670, 1680, 1692, 1692, 1693, 1693, + 1695, 1705, 1713, 1723, 1731, 1739, 1748, 1759, 1763, 1769, + 1770, 1771, 1774, 1774, 1777, 1777, 1780, 1786, 1794, 1807, + 1816, 1825, 1829, 1838, 1847, 1858, 1865, 1870, 1879, 1891, + 1894, 1903, 1914, 1915, 1916, 1919, 1920, 1921, 1924, 1925, + 1928, 1929, 1932, 1933, 1936, 1947, 1958, 1969 }; #endif @@ -890,29 +890,29 @@ static const yytype_uint8 yyr1[] = 122, 122, 123, 123, 124, 124, 124, 124, 124, 124, 124, 125, 125, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 144, 145, 145, 145, 145, 146, - 146, 147, 148, 148, 149, 150, 151, 151, 151, 152, - 153, 154, 155, 156, 157, 158, 158, 158, 158, 159, - 159, 159, 159, 159, 160, 160, 160, 160, 160, 160, - 161, 162, 162, 163, 163, 163, 163, 163, 163, 163, - 163, 164, 165, 165, 166, 167, 167, 167, 167, 168, - 168, 169, 170, 171, 171, 172, 173, 174, 174, 175, - 175, 175, 176, 176, 176, 177, 177, 177, 178, 178, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 180, 181, 181, 181, 182, 183, 183, 183, 183, - 183, 184, 185, 186, 186, 187, 188, 189, 190, 191, - 191, 191, 192, 193, 194, 194, 195, 195, 195, 195, - 196, 197, 197, 198, 199, 200, 201, 201, 202, 203, - 204, 204, 205, 206, 206, 207, 207, 207, 208, 209, - 209, 209, 209, 209, 209, 210, 210, 211, 212, 213, - 214, 215, 215, 216, 216, 217, 218, 218, 219, 220, - 221, 221, 222, 223, 224, 225, 225, 226, 226, 227, - 228, 228, 229, 229, 229, 229, 230, 230, 231, 231, - 231, 233, 232, 235, 234, 236, 236, 237, 238, 238, - 238, 238, 238, 238, 239, 240, 240, 240, 241, 241, - 241, 242, 242, 242, 243, 243, 243, 244, 244, 245, - 245, 246, 246, 247, 248, 249, 250 + 136, 136, 136, 136, 136, 136, 137, 138, 138, 139, + 140, 141, 142, 143, 144, 144, 145, 145, 145, 145, + 146, 146, 147, 148, 148, 149, 150, 151, 151, 151, + 152, 153, 154, 155, 156, 157, 158, 158, 158, 158, + 159, 159, 159, 159, 159, 160, 160, 160, 160, 160, + 160, 161, 162, 162, 163, 163, 163, 163, 163, 163, + 163, 163, 164, 165, 165, 166, 167, 167, 167, 167, + 168, 168, 169, 170, 171, 171, 172, 173, 174, 174, + 175, 175, 175, 176, 176, 176, 177, 177, 177, 178, + 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 180, 181, 181, 181, 182, 183, 183, 183, + 183, 183, 184, 185, 186, 186, 187, 188, 189, 190, + 191, 191, 191, 192, 193, 194, 194, 195, 195, 195, + 195, 196, 197, 197, 198, 199, 200, 201, 201, 202, + 203, 204, 204, 205, 206, 206, 207, 207, 207, 208, + 209, 209, 209, 209, 209, 209, 210, 210, 211, 212, + 213, 214, 215, 215, 216, 216, 217, 218, 218, 219, + 220, 221, 221, 222, 223, 224, 225, 225, 226, 226, + 227, 228, 228, 229, 229, 229, 229, 230, 230, 231, + 231, 231, 233, 232, 235, 234, 236, 236, 237, 238, + 238, 238, 238, 238, 238, 239, 240, 240, 240, 241, + 241, 241, 242, 242, 242, 243, 243, 243, 244, 244, + 245, 245, 246, 246, 247, 248, 249, 250 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -922,29 +922,29 @@ static const yytype_uint8 yyr2[] = 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 6, 6, 8, 8, 2, 12, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 6, 3, 3, 2, - 2, 7, 2, 1, 1, 1, 1, 4, 1, 1, - 1, 1, 1, 1, 1, 3, 0, 2, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, - 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 4, 2, 2, 1, 2, 1, 2, 1, 2, 4, - 4, 1, 0, 3, 1, 1, 2, 1, 2, 1, - 1, 3, 6, 0, 1, 2, 4, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 6, 3, 2, 3, + 2, 2, 7, 2, 1, 1, 1, 1, 4, 1, + 1, 1, 1, 1, 1, 1, 3, 0, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 4, 2, 2, 1, 2, 1, 2, 1, 2, + 4, 4, 1, 0, 3, 1, 1, 2, 1, 2, + 1, 1, 3, 6, 0, 1, 2, 4, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 3, 1, 1, 1, 5, 1, 1, 1, 2, - 1, 1, 2, 1, 2, 6, 1, 3, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, - 2, 1, 1, 5, 1, 2, 1, 1, 5, 2, - 0, 6, 3, 0, 1, 1, 1, 1, 1, 2, - 1, 1, 2, 4, 4, 0, 1, 1, 1, 1, - 2, 1, 1, 1, 1, 5, 1, 3, 5, 5, - 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 5, 7, 9, 2, 2, 1, 1, - 0, 0, 3, 0, 3, 3, 1, 4, 2, 2, - 2, 2, 3, 2, 3, 0, 1, 1, 0, 1, - 1, 0, 1, 1, 0, 1, 1, 0, 3, 0, - 3, 0, 3, 1, 1, 1, 4 + 2, 2, 3, 1, 1, 1, 5, 1, 1, 1, + 2, 1, 1, 2, 1, 2, 6, 1, 3, 1, + 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 5, 1, 2, 1, 1, 5, + 2, 0, 6, 3, 0, 1, 1, 1, 1, 1, + 2, 1, 1, 2, 4, 4, 0, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 5, 1, 3, 5, + 5, 1, 3, 5, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 5, 7, 9, 2, 2, 1, + 1, 0, 0, 3, 0, 3, 3, 1, 4, 2, + 2, 2, 2, 3, 2, 3, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 3, + 0, 3, 0, 3, 1, 1, 1, 4 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -953,223 +953,225 @@ static const yytype_uint8 yyr2[] = static const yytype_uint16 yydefact[] = { 0, 3, 4, 0, 6, 1, 9, 0, 5, 0, - 0, 233, 0, 0, 0, 0, 231, 2, 0, 0, - 0, 0, 0, 0, 0, 230, 0, 0, 8, 0, + 0, 234, 0, 0, 0, 0, 232, 2, 0, 0, + 0, 0, 0, 0, 0, 231, 0, 0, 8, 0, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, - 23, 20, 0, 84, 85, 109, 110, 86, 87, 88, - 89, 7, 0, 0, 0, 0, 0, 0, 0, 60, - 0, 83, 59, 0, 0, 0, 0, 0, 71, 0, - 0, 228, 229, 31, 0, 0, 0, 10, 11, 236, - 234, 0, 0, 0, 113, 230, 111, 232, 245, 243, - 239, 241, 238, 257, 240, 230, 79, 80, 81, 82, - 49, 230, 230, 230, 230, 230, 230, 73, 50, 221, - 220, 0, 0, 0, 0, 55, 230, 78, 0, 56, - 58, 122, 123, 201, 202, 124, 217, 218, 0, 230, - 0, 266, 90, 237, 114, 0, 115, 119, 120, 121, - 215, 216, 219, 0, 247, 246, 248, 0, 242, 0, - 0, 0, 0, 26, 0, 25, 24, 254, 107, 105, - 257, 92, 0, 0, 0, 0, 0, 0, 251, 0, - 251, 0, 0, 261, 257, 130, 131, 132, 133, 135, - 134, 136, 137, 138, 139, 0, 140, 254, 97, 0, - 95, 93, 257, 0, 102, 91, 0, 76, 75, 77, - 48, 0, 0, 0, 235, 0, 227, 226, 249, 250, - 244, 263, 0, 230, 230, 0, 0, 230, 255, 256, - 106, 108, 0, 0, 0, 200, 171, 172, 170, 0, - 153, 253, 252, 152, 0, 0, 0, 0, 195, 191, - 0, 190, 257, 183, 177, 176, 175, 0, 0, 0, - 0, 96, 0, 98, 0, 0, 94, 230, 222, 64, - 0, 62, 63, 0, 230, 230, 0, 112, 258, 28, - 27, 74, 47, 259, 0, 0, 213, 0, 214, 0, - 174, 0, 162, 0, 154, 0, 159, 160, 143, 144, - 161, 141, 142, 0, 197, 189, 196, 0, 192, 185, - 187, 186, 182, 184, 265, 0, 158, 157, 164, 165, - 0, 0, 104, 0, 101, 0, 0, 0, 57, 72, - 66, 46, 0, 0, 0, 230, 0, 33, 0, 230, - 208, 212, 0, 0, 251, 199, 0, 198, 0, 262, - 169, 168, 166, 167, 163, 188, 0, 99, 100, 103, - 230, 223, 0, 0, 65, 230, 53, 54, 52, 230, - 0, 0, 0, 117, 125, 128, 126, 203, 204, 127, - 264, 0, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 30, 29, 173, 148, 150, 147, - 0, 145, 146, 0, 194, 193, 178, 0, 69, 67, - 70, 68, 0, 0, 0, 0, 129, 180, 230, 116, - 260, 151, 149, 155, 156, 230, 224, 230, 0, 0, - 0, 0, 179, 118, 0, 0, 0, 0, 206, 0, - 210, 0, 225, 230, 0, 205, 0, 209, 0, 0, - 51, 32, 207, 211, 0, 0, 181 + 23, 20, 0, 85, 86, 110, 111, 87, 88, 89, + 90, 7, 0, 0, 0, 0, 0, 0, 0, 61, + 0, 84, 60, 0, 0, 0, 0, 0, 72, 0, + 0, 229, 230, 31, 0, 0, 0, 10, 11, 237, + 235, 0, 0, 0, 114, 231, 112, 233, 246, 244, + 240, 242, 239, 258, 241, 231, 80, 81, 82, 83, + 50, 231, 231, 231, 231, 231, 231, 74, 51, 222, + 221, 0, 0, 0, 0, 56, 231, 79, 0, 57, + 59, 123, 124, 202, 203, 125, 218, 219, 0, 231, + 0, 267, 91, 238, 115, 0, 116, 120, 121, 122, + 216, 217, 220, 0, 248, 247, 249, 0, 243, 0, + 0, 0, 0, 26, 0, 25, 24, 255, 108, 106, + 258, 93, 0, 0, 0, 0, 0, 0, 252, 0, + 252, 0, 0, 262, 258, 131, 132, 133, 134, 136, + 135, 137, 138, 139, 140, 0, 141, 255, 98, 0, + 96, 94, 258, 0, 103, 92, 0, 77, 76, 78, + 49, 0, 0, 0, 236, 0, 228, 227, 250, 251, + 245, 264, 0, 231, 231, 0, 48, 0, 231, 256, + 257, 107, 109, 0, 0, 0, 201, 172, 173, 171, + 0, 154, 254, 253, 153, 0, 0, 0, 0, 196, + 192, 0, 191, 258, 184, 178, 177, 176, 0, 0, + 0, 0, 97, 0, 99, 0, 0, 95, 231, 223, + 65, 0, 63, 64, 0, 231, 231, 0, 113, 259, + 28, 27, 75, 47, 260, 0, 0, 214, 0, 215, + 0, 175, 0, 163, 0, 155, 0, 160, 161, 144, + 145, 162, 142, 143, 0, 198, 190, 197, 0, 193, + 186, 188, 187, 183, 185, 266, 0, 159, 158, 165, + 166, 0, 0, 105, 0, 102, 0, 0, 0, 58, + 73, 67, 46, 0, 0, 0, 231, 0, 33, 0, + 231, 209, 213, 0, 0, 252, 200, 0, 199, 0, + 263, 170, 169, 167, 168, 164, 189, 0, 100, 101, + 104, 231, 224, 0, 0, 66, 231, 54, 55, 53, + 231, 0, 0, 0, 118, 126, 129, 127, 204, 205, + 128, 265, 0, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 30, 29, 174, 149, 151, + 148, 0, 146, 147, 0, 195, 194, 179, 0, 70, + 68, 71, 69, 0, 0, 0, 0, 130, 181, 231, + 117, 261, 152, 150, 156, 157, 231, 225, 231, 0, + 0, 0, 0, 180, 119, 0, 0, 0, 0, 207, + 0, 211, 0, 226, 231, 0, 206, 0, 210, 0, + 0, 52, 32, 208, 212, 0, 0, 182 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 3, 4, 6, 8, 9, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 274, - 384, 41, 150, 73, 60, 69, 321, 322, 358, 117, - 61, 118, 260, 261, 262, 354, 399, 401, 70, 320, - 108, 272, 200, 100, 42, 43, 119, 195, 315, 256, - 313, 161, 44, 45, 46, 135, 86, 267, 362, 136, - 120, 363, 364, 121, 175, 291, 176, 391, 412, 177, - 233, 178, 413, 179, 307, 292, 283, 180, 310, 344, - 181, 228, 182, 281, 183, 246, 184, 406, 422, 185, - 302, 303, 346, 243, 295, 296, 338, 336, 186, 122, - 366, 367, 427, 123, 368, 429, 124, 277, 279, 369, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 275, + 385, 41, 150, 73, 60, 69, 322, 323, 359, 117, + 61, 118, 261, 262, 263, 355, 400, 402, 70, 321, + 108, 273, 200, 100, 42, 43, 119, 195, 316, 257, + 314, 161, 44, 45, 46, 135, 86, 268, 363, 136, + 120, 364, 365, 121, 175, 292, 176, 392, 413, 177, + 234, 178, 414, 179, 308, 293, 284, 180, 311, 345, + 181, 229, 182, 282, 183, 247, 184, 407, 423, 185, + 303, 304, 347, 244, 296, 297, 339, 337, 186, 122, + 367, 368, 428, 123, 369, 430, 124, 278, 280, 370, 125, 140, 126, 127, 142, 74, 47, 57, 48, 52, - 80, 49, 62, 94, 146, 210, 234, 220, 148, 327, - 248, 212, 371, 305, 50 + 80, 49, 62, 94, 146, 210, 235, 221, 148, 328, + 249, 212, 372, 306, 50 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -384 +#define YYPACT_NINF -399 static const yytype_int16 yypact[] = { - 167, -384, -384, 37, -384, -384, 60, -70, -384, 171, - -23, -384, -13, 9, 12, 63, -384, -384, -33, -33, - -33, -33, -33, -33, 67, 104, -33, -33, -384, 66, - -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, - -384, -384, 68, -384, -384, -384, -384, -384, -384, -384, - -384, -384, 115, 109, 111, 112, -4, 115, 22, -384, - 113, 106, -384, 118, 120, 121, 122, 123, -384, 124, - 130, -384, -384, -384, -16, 126, 127, -384, -384, -384, - 128, 140, -18, 158, 204, -39, -384, 128, 26, -384, - -384, -384, -384, 134, -384, 104, -384, -384, -384, -384, - -384, 104, 104, 104, 104, 104, 104, -384, -384, -384, - -384, 73, 84, 76, -10, 135, 104, 64, 136, -384, - -384, -384, -384, -384, -384, -384, -384, -384, -16, 104, - 147, -384, -384, -384, -384, 137, -384, -384, -384, -384, - -384, -384, -384, 194, -384, -384, 46, 225, -384, 141, - 142, -16, 143, -384, 144, -384, -384, 87, -384, -384, - 134, -384, 145, 146, 148, 189, 15, 149, 88, 150, - 97, 80, 0, 151, 134, -384, -384, -384, -384, -384, - -384, -384, -384, -384, -384, 190, -384, 87, -384, 152, - -384, -384, 134, 153, 154, -384, 42, -384, -384, -384, - -384, -8, 156, 159, -384, 160, -384, -384, -384, -384, - -384, -384, 161, 104, 104, 163, 186, 104, -384, -384, - -384, -384, 249, 251, 252, -384, -384, -384, -384, 253, - -384, -384, -384, -384, 210, 253, 8, 169, 256, -384, - 172, -384, 134, 21, -384, -384, -384, 257, 254, -7, - 173, -384, 261, -384, 262, 261, -384, 104, -384, -384, - 176, -384, -384, 184, 104, 104, 174, -384, -384, -384, - -384, -384, -384, 180, 182, 183, -384, 185, -384, 187, - -384, 188, -384, 191, -384, 193, -384, -384, -384, -384, - -384, -384, -384, 269, -384, -384, -384, 270, -384, -384, - -384, -384, -384, -384, -384, 195, -384, -384, -384, -384, - 133, 271, -384, 196, -384, 197, 198, 45, -384, -384, - 108, -384, 192, -6, 201, -17, 273, -384, 110, 104, - -384, -384, 242, 29, 97, -384, 200, -384, 202, -384, - -384, -384, -384, -384, -384, -384, 203, -384, -384, -384, - 104, -384, 281, 288, -384, 104, -384, -384, -384, 104, - 103, 76, 48, -384, -384, -384, -384, -384, -384, -384, - -384, 205, -384, -384, -384, -384, -384, -384, -384, -384, - -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, - 282, -384, -384, 5, -384, -384, -384, 50, -384, -384, - -384, -384, 208, 209, 211, 212, -384, 260, -17, -384, - -384, -384, -384, -384, -384, 104, -384, 104, 186, 249, - 251, 213, -384, -384, 214, 219, 220, 221, 228, 224, - 230, 271, -384, 104, 110, -384, 249, -384, 251, 49, - -384, -384, -384, -384, 271, 226, -384 + 154, -399, -399, 48, -399, -399, 51, -37, -399, 172, + -2, -399, 17, 31, 42, 47, -399, -399, -33, -33, + -33, -33, -33, -33, 54, 56, -33, -33, -399, 6, + -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, + -399, -399, 52, -399, -399, -399, -399, -399, -399, -399, + -399, -399, 66, 25, 61, 112, -6, 66, 102, -399, + 118, 116, -399, 119, 120, 121, 122, 123, -399, 124, + 130, -399, -399, -399, -16, 126, 127, -399, -399, -399, + 128, 70, -15, 159, 214, -36, -399, 128, 28, -399, + -399, -399, -399, 131, -399, 56, -399, -399, -399, -399, + -399, 56, 56, 56, 56, 56, 56, -399, -399, -399, + -399, 27, 38, 76, -9, 135, 56, 60, 136, -399, + -399, -399, -399, -399, -399, -399, -399, -399, -16, 56, + 147, -399, -399, -399, -399, 137, -399, -399, -399, -399, + -399, -399, -399, 148, -399, -399, 18, 225, -399, 141, + 142, -16, 144, -399, 145, -399, -399, 50, -399, -399, + 131, -399, 146, 149, 150, 187, 7, 151, 43, 152, + 69, 85, -1, 153, 131, -399, -399, -399, -399, -399, + -399, -399, -399, -399, -399, 190, -399, 50, -399, 155, + -399, -399, 131, 156, 158, -399, 20, -399, -399, -399, + -399, -8, 160, 162, -399, 161, -399, -399, -399, -399, + -399, -399, 163, 56, 56, 169, 173, 171, 56, -399, + -399, -399, -399, 234, 240, 252, -399, -399, -399, -399, + 254, -399, -399, -399, -399, 211, 254, 2, 170, 257, + -399, 174, -399, 131, 12, -399, -399, -399, 258, 253, + -5, 175, -399, 262, -399, 263, 262, -399, 56, -399, + -399, 177, -399, -399, 185, 56, 56, 176, -399, -399, + -399, -399, -399, -399, 180, 183, 184, -399, 186, -399, + 189, -399, 191, -399, 192, -399, 194, -399, -399, -399, + -399, -399, -399, -399, 270, -399, -399, -399, 271, -399, + -399, -399, -399, -399, -399, -399, 195, -399, -399, -399, + -399, 143, 272, -399, 196, -399, 197, 198, 34, -399, + -399, 101, -399, 201, -4, 202, -12, 274, -399, 111, + 56, -399, -399, 241, 84, 69, -399, 203, -399, 204, + -399, -399, -399, -399, -399, -399, -399, 205, -399, -399, + -399, 56, -399, 277, 288, -399, 56, -399, -399, -399, + 56, 80, 76, 35, -399, -399, -399, -399, -399, -399, + -399, -399, 206, -399, -399, -399, -399, -399, -399, -399, + -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, + -399, 280, -399, -399, 14, -399, -399, -399, 39, -399, + -399, -399, -399, 209, 210, 212, 213, -399, 261, -12, + -399, -399, -399, -399, -399, -399, 56, -399, 56, 171, + 234, 240, 219, -399, -399, 208, 221, 222, 224, 215, + 226, 227, 272, -399, 56, 111, -399, 234, -399, 240, + -13, -399, -399, -399, -399, 272, 228, -399 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -384, -384, -384, -384, -384, -384, -384, -384, -384, -384, - -384, -384, -384, -384, -384, -384, -384, -384, -384, -100, - -115, -384, -97, -91, 119, -384, -384, -343, -384, -93, - -384, -384, -384, -384, -384, -384, -384, -384, 138, -384, - -384, -384, -384, -384, -384, -384, 255, -384, -384, -384, - 83, -384, -384, -384, -384, -384, -384, -384, -384, -384, - -384, -68, -384, -84, -384, -384, -384, -384, -384, -384, - -384, -384, -384, -384, -384, -308, 107, -384, -384, -384, - -384, -384, -384, -384, -384, -384, -384, -384, -384, -20, - -384, -384, -383, -384, -384, -384, -384, -384, -384, 258, - -384, -384, -384, -384, -384, -384, -384, -320, -371, 259, - -384, -384, -384, -83, -113, -85, -384, -384, -384, -384, - 289, -384, 264, -384, -384, -384, -165, 162, -150, -384, - -384, -384, -384, -384, -384 + -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, + -399, -399, -399, -399, -399, -399, -399, -399, -399, -100, + -98, -399, -97, -91, 188, -399, -399, -344, -399, -99, + -399, -399, -399, -399, -399, -399, -399, -399, 134, -399, + -399, -399, -399, -399, -399, -399, 259, -399, -399, -399, + 83, -399, -399, -399, -399, -399, -399, -399, -399, -399, + -399, -69, -399, -84, -399, -399, -399, -399, -399, -399, + -399, -399, -399, -399, -399, -317, 106, -399, -399, -399, + -399, -399, -399, -399, -399, -399, -399, -399, -399, -19, + -399, -399, -398, -399, -399, -399, -399, -399, -399, 260, + -399, -399, -399, -399, -399, -399, -399, -377, -381, 265, + -399, -399, 193, -83, -113, -85, -399, -399, -399, -399, + 289, -399, 264, -399, -399, -399, -165, 164, -150, -399, + -399, -399, -399, -399, -399 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -62 +#define YYTABLE_NINF -219 static const yytype_int16 yytable[] = { - 143, 137, 141, 196, 149, 236, 153, 109, 110, 156, - 221, 152, 402, 154, 155, 259, 151, 356, 151, 187, - 111, 151, 111, 112, 249, 392, 244, 188, 308, 10, - 286, 143, 58, 286, 113, 202, 287, 5, 203, 287, - 189, 288, 253, 190, 226, 360, 112, 309, 439, 430, - 191, 88, 89, 144, 286, 387, 361, 113, 215, 90, - 287, 445, 299, 300, 192, 145, 59, 443, 7, 388, - 245, 227, 71, 72, 425, 116, 290, 289, 114, 290, - 114, 91, 92, 115, 51, 414, 53, 193, 194, 389, - 440, 68, 298, 357, 71, 72, 93, 116, 116, 428, - 290, 390, 157, 301, 164, 84, 165, 208, 54, 85, - 158, 55, 166, 230, 209, 231, 442, 270, 162, 167, - 168, 169, 269, 170, 231, 171, 275, 232, 237, 151, - 163, 238, 239, 159, 172, 240, 232, 404, 63, 64, - 65, 66, 67, 241, 317, 75, 76, 160, 218, 405, - 257, 173, 174, 350, 444, 219, 408, 258, 415, 396, - 351, 242, 56, 409, 197, 416, 68, 198, 199, 393, - 1, 2, 143, 77, 324, 78, 11, 12, 13, 323, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 96, 97, 98, 99, - 340, 341, 342, 343, 79, 71, 72, 206, 207, 352, - 353, 95, 81, 58, 82, 83, 101, 134, 102, 103, - 104, 105, 106, 107, 128, 129, 130, 397, 385, 131, - 143, 365, 141, 147, -61, 201, 204, 205, 211, 213, - 214, 216, 217, 225, 222, 223, 250, 224, 229, 235, - 247, 252, 254, 255, 264, 143, 271, 265, 403, 273, - 323, 268, 276, 266, 278, 280, 282, 284, 293, 294, - 304, 297, 311, 306, 312, 314, 318, 319, 325, 326, - 328, 329, 335, 337, 345, 330, 370, 331, 332, 386, - 355, 333, 424, 334, 398, 339, 347, 348, 349, 359, - 394, 400, 395, 396, 411, 410, 417, 418, 426, 441, - 419, 420, 431, 143, 365, 141, 421, 433, 434, 432, - 143, 435, 323, 436, 437, 438, 446, 132, 316, 263, - 423, 407, 285, 138, 139, 0, 87, 133, 323, 251 + 143, 137, 141, 196, 149, 237, 153, 109, 110, 156, + 222, 152, 403, 154, 155, 260, 151, 393, 151, 357, + 187, 151, 111, 111, 250, 245, 112, 287, 188, 202, + 309, 143, 58, 288, 440, 289, 227, 113, 203, 287, + 431, 189, 254, 429, 190, 288, 112, 446, 5, 310, + 361, 191, 215, 300, 301, 144, 157, 113, 444, 7, + 443, 362, 10, 228, 158, 192, 59, 145, 231, 246, + 232, 290, 162, 291, 426, 71, 72, 415, 116, 208, + 114, 114, 233, 115, 163, 291, 209, 159, 193, 194, + 441, 68, 445, 299, 302, 358, 232, 397, 116, 71, + 72, 160, 116, 84, 164, 51, 165, 85, 233, 287, + 388, 219, 166, 77, 405, 288, 53, 271, 220, 167, + 168, 169, 270, 170, 389, 171, 406, 276, 258, 151, + 54, 88, 89, 238, 172, 259, 239, 240, 81, 90, + 241, 55, 351, 409, 390, 318, 56, 416, 242, 352, + 410, 173, 174, 68, 417, 291, 391, 1, 2, 78, + 197, 91, 92, 198, 199, 79, 243, 71, 72, 131, + 394, 206, 207, 143, 82, 325, 93, 11, 12, 13, + 324, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 63, 64, 65, + 66, 67, 353, 354, 75, 76, 96, 97, 98, 99, + 341, 342, 343, 344, 58, 83, 95, 101, 102, 103, + 104, 105, 106, 107, 128, 129, 130, 134, 398, 386, + 147, 143, 366, 141, -62, 201, 204, 205, 211, 213, + 214, 226, 217, 218, 274, 223, 251, 277, 224, 225, + 230, 236, 248, 279, 253, 255, 143, 256, 265, 404, + 266, 324, 272, 269, 267, 281, -218, 283, 285, 294, + 295, 305, 307, 298, 312, 313, 315, 319, 320, 327, + 326, 329, 330, 336, 338, 346, 331, 371, 387, 332, + 399, 333, 334, 425, 335, 340, 348, 349, 350, 356, + 360, 401, 412, 395, 396, 397, 411, 418, 419, 427, + 437, 420, 421, 433, 143, 366, 141, 422, 432, 434, + 435, 143, 439, 324, 436, 264, 438, 442, 447, 317, + 424, 132, 286, 408, 216, 138, 87, 133, 0, 324, + 139, 252 }; static const yytype_int16 yycheck[] = { 85, 85, 85, 116, 95, 170, 103, 23, 24, 106, - 160, 102, 355, 104, 105, 23, 101, 23, 103, 29, - 38, 106, 38, 62, 174, 333, 26, 37, 35, 99, - 25, 116, 65, 25, 73, 128, 31, 0, 129, 31, - 50, 33, 192, 53, 29, 62, 62, 54, 431, 420, - 60, 29, 30, 27, 25, 26, 73, 73, 151, 37, - 31, 444, 41, 42, 74, 39, 99, 438, 8, 40, - 70, 56, 111, 112, 417, 114, 71, 69, 96, 71, - 96, 59, 60, 99, 107, 393, 99, 97, 98, 60, - 433, 99, 242, 99, 111, 112, 74, 114, 114, 419, - 71, 72, 29, 82, 28, 109, 30, 61, 99, 113, - 37, 99, 36, 25, 68, 27, 436, 214, 34, 43, - 44, 45, 213, 47, 27, 49, 217, 39, 48, 214, - 46, 51, 52, 60, 58, 55, 39, 34, 19, 20, - 21, 22, 23, 63, 257, 26, 27, 74, 61, 46, - 108, 75, 76, 108, 105, 68, 108, 115, 108, 110, - 115, 81, 99, 115, 100, 115, 99, 103, 104, 334, - 3, 4, 257, 107, 265, 107, 5, 6, 7, 264, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 100, 101, 102, 103, - 77, 78, 79, 80, 99, 111, 112, 23, 24, 111, - 112, 108, 113, 65, 113, 113, 108, 23, 108, 108, - 108, 108, 108, 103, 108, 108, 108, 350, 329, 99, - 325, 325, 325, 109, 109, 109, 99, 110, 23, 108, - 108, 108, 108, 64, 109, 109, 66, 109, 109, 109, - 109, 109, 109, 109, 108, 350, 103, 108, 359, 83, - 355, 110, 23, 113, 23, 23, 23, 67, 109, 23, - 23, 109, 109, 29, 23, 23, 110, 103, 114, 109, - 108, 108, 23, 23, 23, 110, 23, 110, 110, 57, - 108, 110, 415, 110, 23, 110, 110, 110, 110, 108, - 110, 23, 110, 110, 32, 110, 108, 108, 418, 434, - 109, 109, 109, 408, 408, 408, 66, 108, 108, 115, - 415, 110, 417, 105, 110, 105, 110, 82, 255, 201, - 408, 361, 235, 85, 85, -1, 57, 83, 433, 187 + 160, 102, 356, 104, 105, 23, 101, 334, 103, 23, + 29, 106, 38, 38, 174, 26, 62, 25, 37, 128, + 35, 116, 65, 31, 432, 33, 29, 73, 129, 25, + 421, 50, 192, 420, 53, 31, 62, 445, 0, 54, + 62, 60, 151, 41, 42, 27, 29, 73, 439, 8, + 437, 73, 99, 56, 37, 74, 99, 39, 25, 70, + 27, 69, 34, 71, 418, 111, 112, 394, 114, 61, + 96, 96, 39, 99, 46, 71, 68, 60, 97, 98, + 434, 99, 105, 243, 82, 99, 27, 110, 114, 111, + 112, 74, 114, 109, 28, 107, 30, 113, 39, 25, + 26, 61, 36, 107, 34, 31, 99, 214, 68, 43, + 44, 45, 213, 47, 40, 49, 46, 218, 108, 214, + 99, 29, 30, 48, 58, 115, 51, 52, 113, 37, + 55, 99, 108, 108, 60, 258, 99, 108, 63, 115, + 115, 75, 76, 99, 115, 71, 72, 3, 4, 107, + 100, 59, 60, 103, 104, 99, 81, 111, 112, 99, + 335, 23, 24, 258, 113, 266, 74, 5, 6, 7, + 265, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 19, 20, 21, + 22, 23, 111, 112, 26, 27, 100, 101, 102, 103, + 77, 78, 79, 80, 65, 113, 108, 108, 108, 108, + 108, 108, 108, 103, 108, 108, 108, 23, 351, 330, + 109, 326, 326, 326, 109, 109, 99, 110, 23, 108, + 108, 64, 108, 108, 83, 109, 66, 23, 109, 109, + 109, 109, 109, 23, 109, 109, 351, 109, 108, 360, + 108, 356, 103, 110, 113, 23, 103, 23, 67, 109, + 23, 23, 29, 109, 109, 23, 23, 110, 103, 109, + 114, 108, 108, 23, 23, 23, 110, 23, 57, 110, + 23, 110, 110, 416, 110, 110, 110, 110, 110, 108, + 108, 23, 32, 110, 110, 110, 110, 108, 108, 419, + 105, 109, 109, 115, 409, 409, 409, 66, 109, 108, + 108, 416, 105, 418, 110, 201, 110, 435, 110, 256, + 409, 82, 236, 362, 151, 85, 57, 83, -1, 434, + 85, 187 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1197,30 +1199,30 @@ static const yytype_uint8 yystos[] = 193, 196, 198, 200, 202, 205, 214, 29, 37, 50, 53, 60, 74, 97, 98, 163, 230, 100, 103, 104, 158, 109, 145, 139, 99, 110, 23, 24, 61, 68, - 241, 23, 247, 108, 108, 145, 108, 108, 61, 68, - 243, 244, 109, 109, 109, 64, 29, 56, 197, 109, - 25, 27, 39, 186, 242, 109, 242, 48, 51, 52, - 55, 63, 81, 209, 26, 70, 201, 109, 246, 244, - 66, 243, 109, 244, 109, 109, 165, 108, 115, 23, - 148, 149, 150, 154, 108, 108, 113, 173, 110, 139, - 138, 103, 157, 83, 135, 139, 23, 223, 23, 224, - 23, 199, 23, 192, 67, 192, 25, 31, 33, 69, - 71, 181, 191, 109, 23, 210, 211, 109, 244, 41, - 42, 82, 206, 207, 23, 249, 29, 190, 35, 54, - 194, 109, 23, 166, 23, 164, 166, 230, 110, 103, - 155, 142, 143, 231, 139, 114, 109, 245, 108, 108, - 110, 110, 110, 110, 110, 23, 213, 23, 212, 110, - 77, 78, 79, 80, 195, 23, 208, 110, 110, 110, - 108, 115, 111, 112, 151, 108, 23, 99, 144, 108, - 62, 73, 174, 177, 178, 179, 216, 217, 220, 225, - 23, 248, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 136, 139, 57, 26, 40, 60, - 72, 183, 191, 242, 110, 110, 110, 230, 23, 152, - 23, 153, 143, 139, 34, 46, 203, 205, 108, 115, - 110, 32, 184, 188, 191, 108, 115, 108, 108, 109, - 109, 66, 204, 177, 230, 143, 135, 218, 223, 221, - 224, 109, 115, 108, 108, 110, 105, 110, 105, 208, - 143, 136, 223, 224, 105, 208, 110 + 241, 23, 247, 108, 108, 145, 228, 108, 108, 61, + 68, 243, 244, 109, 109, 109, 64, 29, 56, 197, + 109, 25, 27, 39, 186, 242, 109, 242, 48, 51, + 52, 55, 63, 81, 209, 26, 70, 201, 109, 246, + 244, 66, 243, 109, 244, 109, 109, 165, 108, 115, + 23, 148, 149, 150, 154, 108, 108, 113, 173, 110, + 139, 138, 103, 157, 83, 135, 139, 23, 223, 23, + 224, 23, 199, 23, 192, 67, 192, 25, 31, 33, + 69, 71, 181, 191, 109, 23, 210, 211, 109, 244, + 41, 42, 82, 206, 207, 23, 249, 29, 190, 35, + 54, 194, 109, 23, 166, 23, 164, 166, 230, 110, + 103, 155, 142, 143, 231, 139, 114, 109, 245, 108, + 108, 110, 110, 110, 110, 110, 23, 213, 23, 212, + 110, 77, 78, 79, 80, 195, 23, 208, 110, 110, + 110, 108, 115, 111, 112, 151, 108, 23, 99, 144, + 108, 62, 73, 174, 177, 178, 179, 216, 217, 220, + 225, 23, 248, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 136, 139, 57, 26, 40, + 60, 72, 183, 191, 242, 110, 110, 110, 230, 23, + 152, 23, 153, 143, 139, 34, 46, 203, 205, 108, + 115, 110, 32, 184, 188, 191, 108, 115, 108, 108, + 109, 109, 66, 204, 177, 230, 143, 135, 218, 223, + 221, 224, 109, 115, 108, 108, 110, 105, 110, 105, + 208, 143, 136, 223, 224, 105, 208, 110 }; #define yyerrok (yyerrstatus = 0) @@ -2457,7 +2459,29 @@ yyreduce: case 48: /* Line 1455 of yacc.c */ -#line 540 "program_parse.y" +#line 538 "program_parse.y" + { + struct asm_symbol temp_sym; + + if (!state->option.NV_fragment) { + yyerror(& (yylsp[(2) - (2)]), state, "expected scalar suffix"); + YYERROR; + } + + memset(& temp_sym, 0, sizeof(temp_sym)); + temp_sym.param_binding_begin = ~0; + initialize_symbol_from_const(state->prog, & temp_sym, & (yyvsp[(2) - (2)].vector)); + + init_src_reg(& (yyval.src_reg)); + (yyval.src_reg).Base.File = PROGRAM_CONSTANT; + (yyval.src_reg).Base.Index = temp_sym.param_binding_begin; + ;} + break; + + case 49: + +/* Line 1455 of yacc.c */ +#line 557 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2470,10 +2494,10 @@ yyreduce: ;} break; - case 49: + case 50: /* Line 1455 of yacc.c */ -#line 553 "program_parse.y" +#line 570 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask; @@ -2495,10 +2519,10 @@ yyreduce: ;} break; - case 50: + case 51: /* Line 1455 of yacc.c */ -#line 575 "program_parse.y" +#line 592 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_ADDRESS; @@ -2507,10 +2531,10 @@ yyreduce: ;} break; - case 51: + case 52: /* Line 1455 of yacc.c */ -#line 584 "program_parse.y" +#line 601 "program_parse.y" { const unsigned xyzw_valid = ((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0) @@ -2543,20 +2567,20 @@ yyreduce: ;} break; - case 52: + case 53: /* Line 1455 of yacc.c */ -#line 617 "program_parse.y" +#line 634 "program_parse.y" { (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); (yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0; ;} break; - case 53: + case 54: /* Line 1455 of yacc.c */ -#line 624 "program_parse.y" +#line 641 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2573,10 +2597,10 @@ yyreduce: ;} break; - case 54: + case 55: /* Line 1455 of yacc.c */ -#line 639 "program_parse.y" +#line 656 "program_parse.y" { if (strlen((yyvsp[(1) - (1)].string)) > 1) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2626,10 +2650,10 @@ yyreduce: ;} break; - case 55: + case 56: /* Line 1455 of yacc.c */ -#line 689 "program_parse.y" +#line 706 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2673,10 +2697,10 @@ yyreduce: ;} break; - case 56: + case 57: /* Line 1455 of yacc.c */ -#line 731 "program_parse.y" +#line 748 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = PROGRAM_INPUT; @@ -2689,10 +2713,10 @@ yyreduce: ;} break; - case 57: + case 58: /* Line 1455 of yacc.c */ -#line 742 "program_parse.y" +#line 759 "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)) { @@ -2715,10 +2739,10 @@ yyreduce: ;} break; - case 58: + case 59: /* Line 1455 of yacc.c */ -#line 763 "program_parse.y" +#line 780 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = ((yyvsp[(1) - (1)].temp_sym).name != NULL) @@ -2728,10 +2752,10 @@ yyreduce: ;} break; - case 59: + case 60: /* Line 1455 of yacc.c */ -#line 773 "program_parse.y" +#line 790 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_OUTPUT; @@ -2739,10 +2763,10 @@ yyreduce: ;} break; - case 60: + case 61: /* Line 1455 of yacc.c */ -#line 779 "program_parse.y" +#line 796 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2773,10 +2797,10 @@ yyreduce: ;} break; - case 61: + case 62: /* Line 1455 of yacc.c */ -#line 810 "program_parse.y" +#line 827 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2793,20 +2817,20 @@ yyreduce: ;} break; - case 64: + case 65: /* Line 1455 of yacc.c */ -#line 829 "program_parse.y" +#line 846 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer); ;} break; - case 65: + case 66: /* Line 1455 of yacc.c */ -#line 836 "program_parse.y" +#line 853 "program_parse.y" { /* FINISHME: Add support for multiple address registers. */ @@ -2818,31 +2842,31 @@ yyreduce: ;} break; - case 66: + case 67: /* Line 1455 of yacc.c */ -#line 847 "program_parse.y" +#line 864 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 67: + case 68: /* Line 1455 of yacc.c */ -#line 848 "program_parse.y" +#line 865 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 68: + case 69: /* Line 1455 of yacc.c */ -#line 849 "program_parse.y" +#line 866 "program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; - case 69: + case 70: /* Line 1455 of yacc.c */ -#line 853 "program_parse.y" +#line 870 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2854,10 +2878,10 @@ yyreduce: ;} break; - case 70: + case 71: /* Line 1455 of yacc.c */ -#line 865 "program_parse.y" +#line 882 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2869,10 +2893,10 @@ yyreduce: ;} break; - case 71: + case 72: /* Line 1455 of yacc.c */ -#line 877 "program_parse.y" +#line 894 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2890,10 +2914,10 @@ yyreduce: ;} break; - case 72: + case 73: /* Line 1455 of yacc.c */ -#line 895 "program_parse.y" +#line 912 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); @@ -2904,10 +2928,10 @@ yyreduce: ;} break; - case 73: + case 74: /* Line 1455 of yacc.c */ -#line 906 "program_parse.y" +#line 923 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2919,24 +2943,24 @@ yyreduce: ;} break; - case 78: + case 79: /* Line 1455 of yacc.c */ -#line 922 "program_parse.y" +#line 939 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; - case 83: + case 84: /* Line 1455 of yacc.c */ -#line 926 "program_parse.y" +#line 943 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; - case 90: + case 91: /* Line 1455 of yacc.c */ -#line 938 "program_parse.y" +#line 955 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); @@ -2954,55 +2978,55 @@ yyreduce: ;} break; - case 91: + case 92: /* Line 1455 of yacc.c */ -#line 956 "program_parse.y" +#line 973 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} break; - case 92: + case 93: /* Line 1455 of yacc.c */ -#line 960 "program_parse.y" +#line 977 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} break; - case 93: + case 94: /* Line 1455 of yacc.c */ -#line 966 "program_parse.y" +#line 983 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; ;} break; - case 94: + case 95: /* Line 1455 of yacc.c */ -#line 970 "program_parse.y" +#line 987 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; ;} break; - case 95: + case 96: /* Line 1455 of yacc.c */ -#line 974 "program_parse.y" +#line 991 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; ;} break; - case 96: + case 97: /* Line 1455 of yacc.c */ -#line 978 "program_parse.y" +#line 995 "program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); @@ -3013,10 +3037,10 @@ yyreduce: ;} break; - case 97: + case 98: /* Line 1455 of yacc.c */ -#line 987 "program_parse.y" +#line 1004 "program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); @@ -3027,38 +3051,38 @@ yyreduce: ;} break; - case 98: + case 99: /* Line 1455 of yacc.c */ -#line 996 "program_parse.y" +#line 1013 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} break; - case 99: + case 100: /* Line 1455 of yacc.c */ -#line 1000 "program_parse.y" +#line 1017 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; ;} break; - case 100: + case 101: /* Line 1455 of yacc.c */ -#line 1005 "program_parse.y" +#line 1022 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); ;} break; - case 101: + case 102: /* Line 1455 of yacc.c */ -#line 1011 "program_parse.y" +#line 1028 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); @@ -3069,46 +3093,46 @@ yyreduce: ;} break; - case 105: + case 106: /* Line 1455 of yacc.c */ -#line 1025 "program_parse.y" +#line 1042 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; ;} break; - case 106: + case 107: /* Line 1455 of yacc.c */ -#line 1029 "program_parse.y" +#line 1046 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); ;} break; - case 107: + case 108: /* Line 1455 of yacc.c */ -#line 1033 "program_parse.y" +#line 1050 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; ;} break; - case 108: + case 109: /* Line 1455 of yacc.c */ -#line 1037 "program_parse.y" +#line 1054 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} break; - case 111: + case 112: /* Line 1455 of yacc.c */ -#line 1045 "program_parse.y" +#line 1062 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); @@ -3124,10 +3148,10 @@ yyreduce: ;} break; - case 112: + case 113: /* Line 1455 of yacc.c */ -#line 1061 "program_parse.y" +#line 1078 "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, @@ -3149,19 +3173,19 @@ yyreduce: ;} break; - case 113: + case 114: /* Line 1455 of yacc.c */ -#line 1083 "program_parse.y" +#line 1100 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 114: + case 115: /* Line 1455 of yacc.c */ -#line 1087 "program_parse.y" +#line 1104 "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"); @@ -3172,38 +3196,38 @@ yyreduce: ;} break; - case 115: + case 116: /* Line 1455 of yacc.c */ -#line 1098 "program_parse.y" +#line 1115 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); ;} break; - case 116: + case 117: /* Line 1455 of yacc.c */ -#line 1104 "program_parse.y" +#line 1121 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); ;} break; - case 118: + case 119: /* Line 1455 of yacc.c */ -#line 1111 "program_parse.y" +#line 1128 "program_parse.y" { (yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length; (yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym); ;} break; - case 119: + case 120: /* Line 1455 of yacc.c */ -#line 1118 "program_parse.y" +#line 1135 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3211,10 +3235,10 @@ yyreduce: ;} break; - case 120: + case 121: /* Line 1455 of yacc.c */ -#line 1124 "program_parse.y" +#line 1141 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3222,10 +3246,10 @@ yyreduce: ;} break; - case 121: + case 122: /* Line 1455 of yacc.c */ -#line 1130 "program_parse.y" +#line 1147 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3233,10 +3257,10 @@ yyreduce: ;} break; - case 122: + case 123: /* Line 1455 of yacc.c */ -#line 1138 "program_parse.y" +#line 1155 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3244,10 +3268,10 @@ yyreduce: ;} break; - case 123: + case 124: /* Line 1455 of yacc.c */ -#line 1144 "program_parse.y" +#line 1161 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3255,10 +3279,10 @@ yyreduce: ;} break; - case 124: + case 125: /* Line 1455 of yacc.c */ -#line 1150 "program_parse.y" +#line 1167 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3266,10 +3290,10 @@ yyreduce: ;} break; - case 125: + case 126: /* Line 1455 of yacc.c */ -#line 1158 "program_parse.y" +#line 1175 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3277,10 +3301,10 @@ yyreduce: ;} break; - case 126: + case 127: /* Line 1455 of yacc.c */ -#line 1164 "program_parse.y" +#line 1181 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3288,10 +3312,10 @@ yyreduce: ;} break; - case 127: + case 128: /* Line 1455 of yacc.c */ -#line 1170 "program_parse.y" +#line 1187 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3299,101 +3323,101 @@ yyreduce: ;} break; - case 128: - -/* Line 1455 of yacc.c */ -#line 1177 "program_parse.y" - { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} - break; - case 129: /* Line 1455 of yacc.c */ -#line 1178 "program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} +#line 1194 "program_parse.y" + { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; case 130: /* Line 1455 of yacc.c */ -#line 1181 "program_parse.y" +#line 1195 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 131: /* Line 1455 of yacc.c */ -#line 1182 "program_parse.y" +#line 1198 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 132: /* Line 1455 of yacc.c */ -#line 1183 "program_parse.y" +#line 1199 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 133: /* Line 1455 of yacc.c */ -#line 1184 "program_parse.y" +#line 1200 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 134: /* Line 1455 of yacc.c */ -#line 1185 "program_parse.y" +#line 1201 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 135: /* Line 1455 of yacc.c */ -#line 1186 "program_parse.y" +#line 1202 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 136: /* Line 1455 of yacc.c */ -#line 1187 "program_parse.y" +#line 1203 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 137: /* Line 1455 of yacc.c */ -#line 1188 "program_parse.y" +#line 1204 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 138: /* Line 1455 of yacc.c */ -#line 1189 "program_parse.y" +#line 1205 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 139: /* Line 1455 of yacc.c */ -#line 1190 "program_parse.y" +#line 1206 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 140: /* Line 1455 of yacc.c */ -#line 1191 "program_parse.y" +#line 1207 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 141: /* Line 1455 of yacc.c */ -#line 1195 "program_parse.y" +#line 1208 "program_parse.y" + { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} + break; + + case 142: + +/* Line 1455 of yacc.c */ +#line 1212 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3402,37 +3426,37 @@ yyreduce: ;} break; - case 142: + case 143: /* Line 1455 of yacc.c */ -#line 1204 "program_parse.y" +#line 1221 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 143: + case 144: /* Line 1455 of yacc.c */ -#line 1208 "program_parse.y" +#line 1225 "program_parse.y" { (yyval.integer) = STATE_EMISSION; ;} break; - case 144: + case 145: /* Line 1455 of yacc.c */ -#line 1212 "program_parse.y" +#line 1229 "program_parse.y" { (yyval.integer) = STATE_SHININESS; ;} break; - case 145: + case 146: /* Line 1455 of yacc.c */ -#line 1218 "program_parse.y" +#line 1235 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3441,28 +3465,28 @@ yyreduce: ;} break; - case 146: + case 147: /* Line 1455 of yacc.c */ -#line 1227 "program_parse.y" +#line 1244 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 147: + case 148: /* Line 1455 of yacc.c */ -#line 1231 "program_parse.y" +#line 1248 "program_parse.y" { (yyval.integer) = STATE_POSITION; ;} break; - case 148: + case 149: /* Line 1455 of yacc.c */ -#line 1235 "program_parse.y" +#line 1252 "program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); @@ -3473,57 +3497,57 @@ yyreduce: ;} break; - case 149: + case 150: /* Line 1455 of yacc.c */ -#line 1244 "program_parse.y" +#line 1261 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 150: + case 151: /* Line 1455 of yacc.c */ -#line 1248 "program_parse.y" +#line 1265 "program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; ;} break; - case 151: + case 152: /* Line 1455 of yacc.c */ -#line 1254 "program_parse.y" +#line 1271 "program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; ;} break; - case 152: + case 153: /* Line 1455 of yacc.c */ -#line 1260 "program_parse.y" +#line 1277 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; ;} break; - case 153: + case 154: /* Line 1455 of yacc.c */ -#line 1267 "program_parse.y" +#line 1284 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; ;} break; - case 154: + case 155: /* Line 1455 of yacc.c */ -#line 1272 "program_parse.y" +#line 1289 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3531,10 +3555,10 @@ yyreduce: ;} break; - case 155: + case 156: /* Line 1455 of yacc.c */ -#line 1280 "program_parse.y" +#line 1297 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3544,10 +3568,10 @@ yyreduce: ;} break; - case 157: + case 158: /* Line 1455 of yacc.c */ -#line 1292 "program_parse.y" +#line 1309 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(3) - (3)].integer); @@ -3555,46 +3579,46 @@ yyreduce: ;} break; - case 158: + case 159: /* Line 1455 of yacc.c */ -#line 1300 "program_parse.y" +#line 1317 "program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; ;} break; - case 159: + case 160: /* Line 1455 of yacc.c */ -#line 1306 "program_parse.y" +#line 1323 "program_parse.y" { (yyval.integer) = STATE_AMBIENT; ;} break; - case 160: + case 161: /* Line 1455 of yacc.c */ -#line 1310 "program_parse.y" +#line 1327 "program_parse.y" { (yyval.integer) = STATE_DIFFUSE; ;} break; - case 161: + case 162: /* Line 1455 of yacc.c */ -#line 1314 "program_parse.y" +#line 1331 "program_parse.y" { (yyval.integer) = STATE_SPECULAR; ;} break; - case 162: + case 163: /* Line 1455 of yacc.c */ -#line 1320 "program_parse.y" +#line 1337 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); @@ -3605,10 +3629,10 @@ yyreduce: ;} break; - case 163: + case 164: /* Line 1455 of yacc.c */ -#line 1331 "program_parse.y" +#line 1348 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3617,92 +3641,92 @@ yyreduce: ;} break; - case 164: + case 165: /* Line 1455 of yacc.c */ -#line 1340 "program_parse.y" +#line 1357 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; ;} break; - case 165: + case 166: /* Line 1455 of yacc.c */ -#line 1344 "program_parse.y" +#line 1361 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; ;} break; - case 166: + case 167: /* Line 1455 of yacc.c */ -#line 1349 "program_parse.y" +#line 1366 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; ;} break; - case 167: + case 168: /* Line 1455 of yacc.c */ -#line 1353 "program_parse.y" +#line 1370 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; ;} break; - case 168: + case 169: /* Line 1455 of yacc.c */ -#line 1357 "program_parse.y" +#line 1374 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; ;} break; - case 169: + case 170: /* Line 1455 of yacc.c */ -#line 1361 "program_parse.y" +#line 1378 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; ;} break; - case 170: + case 171: /* Line 1455 of yacc.c */ -#line 1367 "program_parse.y" +#line 1384 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); ;} break; - case 171: + case 172: /* Line 1455 of yacc.c */ -#line 1374 "program_parse.y" +#line 1391 "program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; ;} break; - case 172: + case 173: /* Line 1455 of yacc.c */ -#line 1378 "program_parse.y" +#line 1395 "program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; ;} break; - case 173: + case 174: /* Line 1455 of yacc.c */ -#line 1384 "program_parse.y" +#line 1401 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3710,10 +3734,10 @@ yyreduce: ;} break; - case 174: + case 175: /* Line 1455 of yacc.c */ -#line 1392 "program_parse.y" +#line 1409 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); @@ -3724,38 +3748,38 @@ yyreduce: ;} break; - case 175: + case 176: /* Line 1455 of yacc.c */ -#line 1403 "program_parse.y" +#line 1420 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); ;} break; - case 176: + case 177: /* Line 1455 of yacc.c */ -#line 1410 "program_parse.y" +#line 1427 "program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; ;} break; - case 177: + case 178: /* Line 1455 of yacc.c */ -#line 1414 "program_parse.y" +#line 1431 "program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; ;} break; - case 178: + case 179: /* Line 1455 of yacc.c */ -#line 1420 "program_parse.y" +#line 1437 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; @@ -3765,10 +3789,10 @@ yyreduce: ;} break; - case 179: + case 180: /* Line 1455 of yacc.c */ -#line 1430 "program_parse.y" +#line 1447 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; @@ -3778,20 +3802,20 @@ yyreduce: ;} break; - case 180: + case 181: /* Line 1455 of yacc.c */ -#line 1440 "program_parse.y" +#line 1457 "program_parse.y" { (yyval.state)[2] = 0; (yyval.state)[3] = 3; ;} break; - case 181: + case 182: /* Line 1455 of yacc.c */ -#line 1445 "program_parse.y" +#line 1462 "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). @@ -3809,10 +3833,10 @@ yyreduce: ;} break; - case 182: + case 183: /* Line 1455 of yacc.c */ -#line 1463 "program_parse.y" +#line 1480 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; @@ -3820,55 +3844,55 @@ yyreduce: ;} break; - case 183: + case 184: /* Line 1455 of yacc.c */ -#line 1471 "program_parse.y" +#line 1488 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 184: + case 185: /* Line 1455 of yacc.c */ -#line 1475 "program_parse.y" +#line 1492 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 185: + case 186: /* Line 1455 of yacc.c */ -#line 1481 "program_parse.y" +#line 1498 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; ;} break; - case 186: + case 187: /* Line 1455 of yacc.c */ -#line 1485 "program_parse.y" +#line 1502 "program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; ;} break; - case 187: + case 188: /* Line 1455 of yacc.c */ -#line 1489 "program_parse.y" +#line 1506 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; ;} break; - case 188: + case 189: /* Line 1455 of yacc.c */ -#line 1495 "program_parse.y" +#line 1512 "program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); @@ -3879,88 +3903,88 @@ yyreduce: ;} break; - case 189: + case 190: /* Line 1455 of yacc.c */ -#line 1506 "program_parse.y" +#line 1523 "program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); ;} break; - case 190: + case 191: /* Line 1455 of yacc.c */ -#line 1511 "program_parse.y" +#line 1528 "program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; ;} break; - case 191: + case 192: /* Line 1455 of yacc.c */ -#line 1516 "program_parse.y" +#line 1533 "program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; ;} break; - case 192: + case 193: /* Line 1455 of yacc.c */ -#line 1521 "program_parse.y" +#line 1538 "program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); ;} break; - case 193: + case 194: /* Line 1455 of yacc.c */ -#line 1526 "program_parse.y" +#line 1543 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; ;} break; - case 194: + case 195: /* Line 1455 of yacc.c */ -#line 1531 "program_parse.y" +#line 1548 "program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[(3) - (4)].integer); ;} break; - case 195: + case 196: /* Line 1455 of yacc.c */ -#line 1538 "program_parse.y" +#line 1555 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 196: + case 197: /* Line 1455 of yacc.c */ -#line 1542 "program_parse.y" +#line 1559 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 197: + case 198: /* Line 1455 of yacc.c */ -#line 1547 "program_parse.y" +#line 1564 "program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -3974,10 +3998,10 @@ yyreduce: ;} break; - case 198: + case 199: /* Line 1455 of yacc.c */ -#line 1560 "program_parse.y" +#line 1577 "program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -3986,10 +4010,10 @@ yyreduce: ;} break; - case 199: + case 200: /* Line 1455 of yacc.c */ -#line 1568 "program_parse.y" +#line 1585 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); @@ -4000,20 +4024,20 @@ yyreduce: ;} break; - case 200: + case 201: /* Line 1455 of yacc.c */ -#line 1579 "program_parse.y" +#line 1596 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; ;} break; - case 205: + case 206: /* Line 1455 of yacc.c */ -#line 1591 "program_parse.y" +#line 1608 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4023,30 +4047,30 @@ yyreduce: ;} break; - case 206: + case 207: /* Line 1455 of yacc.c */ -#line 1601 "program_parse.y" +#line 1618 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); ;} break; - case 207: + case 208: /* Line 1455 of yacc.c */ -#line 1606 "program_parse.y" +#line 1623 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); ;} break; - case 208: + case 209: /* Line 1455 of yacc.c */ -#line 1613 "program_parse.y" +#line 1630 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4056,10 +4080,10 @@ yyreduce: ;} break; - case 209: + case 210: /* Line 1455 of yacc.c */ -#line 1623 "program_parse.y" +#line 1640 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4069,30 +4093,30 @@ yyreduce: ;} break; - case 210: + case 211: /* Line 1455 of yacc.c */ -#line 1632 "program_parse.y" +#line 1649 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); ;} break; - case 211: + case 212: /* Line 1455 of yacc.c */ -#line 1637 "program_parse.y" +#line 1654 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); ;} break; - case 212: + case 213: /* Line 1455 of yacc.c */ -#line 1644 "program_parse.y" +#line 1661 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4102,10 +4126,10 @@ yyreduce: ;} break; - case 213: + case 214: /* Line 1455 of yacc.c */ -#line 1654 "program_parse.y" +#line 1671 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); @@ -4115,10 +4139,10 @@ yyreduce: ;} break; - case 214: + case 215: /* Line 1455 of yacc.c */ -#line 1664 "program_parse.y" +#line 1681 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); @@ -4128,10 +4152,10 @@ yyreduce: ;} break; - case 219: + case 220: /* Line 1455 of yacc.c */ -#line 1679 "program_parse.y" +#line 1696 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4141,10 +4165,10 @@ yyreduce: ;} break; - case 220: + case 221: /* Line 1455 of yacc.c */ -#line 1689 "program_parse.y" +#line 1706 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4154,10 +4178,10 @@ yyreduce: ;} break; - case 221: + case 222: /* Line 1455 of yacc.c */ -#line 1697 "program_parse.y" +#line 1714 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer); @@ -4167,10 +4191,10 @@ yyreduce: ;} break; - case 222: + case 223: /* Line 1455 of yacc.c */ -#line 1707 "program_parse.y" +#line 1724 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (3)].real); @@ -4180,10 +4204,10 @@ yyreduce: ;} break; - case 223: + case 224: /* Line 1455 of yacc.c */ -#line 1715 "program_parse.y" +#line 1732 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (5)].real); @@ -4193,10 +4217,10 @@ yyreduce: ;} break; - case 224: + case 225: /* Line 1455 of yacc.c */ -#line 1724 "program_parse.y" +#line 1741 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (7)].real); @@ -4206,10 +4230,10 @@ yyreduce: ;} break; - case 225: + case 226: /* Line 1455 of yacc.c */ -#line 1733 "program_parse.y" +#line 1750 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (9)].real); @@ -4219,63 +4243,63 @@ yyreduce: ;} break; - case 226: + case 227: /* Line 1455 of yacc.c */ -#line 1743 "program_parse.y" +#line 1760 "program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); ;} break; - case 227: + case 228: /* Line 1455 of yacc.c */ -#line 1747 "program_parse.y" +#line 1764 "program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); ;} break; - case 228: + case 229: /* Line 1455 of yacc.c */ -#line 1752 "program_parse.y" +#line 1769 "program_parse.y" { (yyval.negate) = FALSE; ;} break; - case 229: + case 230: /* Line 1455 of yacc.c */ -#line 1753 "program_parse.y" +#line 1770 "program_parse.y" { (yyval.negate) = TRUE; ;} break; - case 230: + case 231: /* Line 1455 of yacc.c */ -#line 1754 "program_parse.y" +#line 1771 "program_parse.y" { (yyval.negate) = FALSE; ;} break; - case 231: + case 232: /* Line 1455 of yacc.c */ -#line 1757 "program_parse.y" +#line 1774 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 233: + case 234: /* Line 1455 of yacc.c */ -#line 1760 "program_parse.y" +#line 1777 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 235: + case 236: /* Line 1455 of yacc.c */ -#line 1764 "program_parse.y" +#line 1781 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { YYERROR; @@ -4283,10 +4307,10 @@ yyreduce: ;} break; - case 236: + case 237: /* Line 1455 of yacc.c */ -#line 1770 "program_parse.y" +#line 1787 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { YYERROR; @@ -4294,10 +4318,10 @@ yyreduce: ;} break; - case 237: + case 238: /* Line 1455 of yacc.c */ -#line 1778 "program_parse.y" +#line 1795 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_output, & (yylsp[(2) - (4)])); @@ -4310,10 +4334,10 @@ yyreduce: ;} break; - case 238: + case 239: /* Line 1455 of yacc.c */ -#line 1791 "program_parse.y" +#line 1808 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4324,10 +4348,10 @@ yyreduce: ;} break; - case 239: + case 240: /* Line 1455 of yacc.c */ -#line 1800 "program_parse.y" +#line 1817 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4338,19 +4362,19 @@ yyreduce: ;} break; - case 240: + case 241: /* Line 1455 of yacc.c */ -#line 1809 "program_parse.y" +#line 1826 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} break; - case 241: + case 242: /* Line 1455 of yacc.c */ -#line 1813 "program_parse.y" +#line 1830 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4361,10 +4385,10 @@ yyreduce: ;} break; - case 242: + case 243: /* Line 1455 of yacc.c */ -#line 1822 "program_parse.y" +#line 1839 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4375,10 +4399,10 @@ yyreduce: ;} break; - case 243: + case 244: /* Line 1455 of yacc.c */ -#line 1831 "program_parse.y" +#line 1848 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4389,19 +4413,19 @@ yyreduce: ;} break; - case 244: + case 245: /* Line 1455 of yacc.c */ -#line 1842 "program_parse.y" +#line 1859 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} break; - case 245: + case 246: /* Line 1455 of yacc.c */ -#line 1848 "program_parse.y" +#line 1865 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4409,10 +4433,10 @@ yyreduce: ;} break; - case 246: + case 247: /* Line 1455 of yacc.c */ -#line 1854 "program_parse.y" +#line 1871 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4423,10 +4447,10 @@ yyreduce: ;} break; - case 247: + case 248: /* Line 1455 of yacc.c */ -#line 1863 "program_parse.y" +#line 1880 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4437,19 +4461,19 @@ yyreduce: ;} break; - case 248: + case 249: /* Line 1455 of yacc.c */ -#line 1874 "program_parse.y" +#line 1891 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 249: + case 250: /* Line 1455 of yacc.c */ -#line 1878 "program_parse.y" +#line 1895 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4460,10 +4484,10 @@ yyreduce: ;} break; - case 250: + case 251: /* Line 1455 of yacc.c */ -#line 1887 "program_parse.y" +#line 1904 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4474,94 +4498,94 @@ yyreduce: ;} break; - case 251: + case 252: /* Line 1455 of yacc.c */ -#line 1897 "program_parse.y" +#line 1914 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 252: + case 253: /* Line 1455 of yacc.c */ -#line 1898 "program_parse.y" +#line 1915 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 253: + case 254: /* Line 1455 of yacc.c */ -#line 1899 "program_parse.y" +#line 1916 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 254: + case 255: /* Line 1455 of yacc.c */ -#line 1902 "program_parse.y" +#line 1919 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 255: + case 256: /* Line 1455 of yacc.c */ -#line 1903 "program_parse.y" +#line 1920 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 256: + case 257: /* Line 1455 of yacc.c */ -#line 1904 "program_parse.y" +#line 1921 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 257: + case 258: /* Line 1455 of yacc.c */ -#line 1907 "program_parse.y" +#line 1924 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 258: + case 259: /* Line 1455 of yacc.c */ -#line 1908 "program_parse.y" +#line 1925 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 259: + case 260: /* Line 1455 of yacc.c */ -#line 1911 "program_parse.y" +#line 1928 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 260: + case 261: /* Line 1455 of yacc.c */ -#line 1912 "program_parse.y" +#line 1929 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 261: + case 262: /* Line 1455 of yacc.c */ -#line 1915 "program_parse.y" +#line 1932 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 262: + case 263: /* Line 1455 of yacc.c */ -#line 1916 "program_parse.y" +#line 1933 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 263: + case 264: /* Line 1455 of yacc.c */ -#line 1920 "program_parse.y" +#line 1937 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4572,10 +4596,10 @@ yyreduce: ;} break; - case 264: + case 265: /* Line 1455 of yacc.c */ -#line 1931 "program_parse.y" +#line 1948 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4586,10 +4610,10 @@ yyreduce: ;} break; - case 265: + case 266: /* Line 1455 of yacc.c */ -#line 1942 "program_parse.y" +#line 1959 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4600,10 +4624,10 @@ yyreduce: ;} break; - case 266: + case 267: /* Line 1455 of yacc.c */ -#line 1953 "program_parse.y" +#line 1970 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4627,7 +4651,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4631 "program_parse.tab.c" +#line 4655 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4846,7 +4870,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 1973 "program_parse.y" +#line 1990 "program_parse.y" struct asm_instruction * diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 4cd459a096f..fa94f763c4d 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -534,6 +534,23 @@ scalarSrcReg: optionalSign srcReg scalarSuffix $$.Base.Swizzle = _mesa_combine_swizzles($$.Base.Swizzle, $3.swizzle); } + | optionalSign paramConstScalarUse + { + struct asm_symbol temp_sym; + + if (!state->option.NV_fragment) { + yyerror(& @2, state, "expected scalar suffix"); + YYERROR; + } + + memset(& temp_sym, 0, sizeof(temp_sym)); + temp_sym.param_binding_begin = ~0; + initialize_symbol_from_const(state->prog, & temp_sym, & $2); + + init_src_reg(& $$); + $$.Base.File = PROGRAM_CONSTANT; + $$.Base.Index = temp_sym.param_binding_begin; + } ; swizzleSrcReg: optionalSign srcReg swizzleSuffix -- cgit v1.2.3 From 5db8ebb8f534907614247afaf1dd8621b2d0462e Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 3 Sep 2009 14:06:42 -0700 Subject: Enable GL_NV_fragment_program_option for software rendering At this point the extension is not fully implemented. --- src/mesa/drivers/dri/swrast/swrast.c | 1 + src/mesa/main/extensions.c | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 3aa7843b1bc..d8de5cca808 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -109,6 +109,7 @@ const struct dri_extension card_extensions[] = { "GL_MESA_resize_buffers", GL_MESA_resize_buffers_functions }, { "GL_NV_vertex_program", GL_NV_vertex_program_functions }, { "GL_NV_fragment_program", GL_NV_fragment_program_functions }, + { "GL_NV_fragment_program_option", NULL }, { NULL, NULL } }; diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 903da99ed0c..c6f5068685b 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -305,6 +305,9 @@ _mesa_enable_sw_extensions(GLcontext *ctx) #endif #if FEATURE_NV_fragment_program ctx->Extensions.NV_fragment_program = GL_TRUE; +#endif +#if FEATURE_NV_fragment_program && FEATURE_ARB_fragment_program + ctx->Extensions.NV_fragment_program_option = GL_TRUE; #endif ctx->Extensions.SGI_color_matrix = GL_TRUE; ctx->Extensions.SGI_color_table = GL_TRUE; -- cgit v1.2.3 From eeb1402c0514248773e66f2077b0fb52f7245d56 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 3 Sep 2009 14:32:48 -0700 Subject: NV fp parser: Add support for absolute value operator on instruction operands --- src/mesa/shader/program_parse.tab.c | 1731 ++++++++++++++++++----------------- src/mesa/shader/program_parse.y | 51 +- 2 files changed, 942 insertions(+), 840 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index 508ac617e4a..505a1eb94f2 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -588,16 +588,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 351 +#define YYLAST 375 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 116 +#define YYNTOKENS 117 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 135 +#define YYNNTS 136 /* YYNRULES -- Number of rules. */ -#define YYNRULES 267 +#define YYNRULES 270 /* YYNRULES -- Number of states. */ -#define YYNSTATES 448 +#define YYNSTATES 456 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -613,15 +613,15 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 111, 108, 112, 2, 2, 2, 2, + 2, 2, 2, 112, 108, 113, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 107, - 2, 113, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 114, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 109, 2, 110, 2, 2, 2, 2, 2, 2, + 2, 110, 2, 111, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 114, 2, 115, 2, 2, 2, 2, + 2, 2, 2, 115, 109, 116, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -657,110 +657,112 @@ static const yytype_uint16 yyprhs[] = 24, 27, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 59, 64, 69, 76, 83, 92, 101, 104, 117, 120, 122, 124, 126, 128, 130, - 132, 134, 136, 138, 140, 142, 144, 151, 155, 158, - 162, 165, 168, 176, 179, 181, 183, 185, 187, 192, - 194, 196, 198, 200, 202, 204, 206, 210, 211, 214, - 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, - 236, 238, 240, 242, 244, 245, 247, 249, 251, 253, - 255, 257, 262, 265, 268, 270, 273, 275, 278, 280, - 283, 288, 293, 295, 296, 300, 302, 304, 307, 309, - 312, 314, 316, 320, 327, 328, 330, 333, 338, 340, - 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, - 364, 367, 370, 373, 376, 379, 382, 385, 388, 391, - 394, 397, 400, 404, 406, 408, 410, 416, 418, 420, - 422, 425, 427, 429, 432, 434, 437, 444, 446, 450, - 452, 454, 456, 458, 460, 465, 467, 469, 471, 473, - 475, 477, 480, 482, 484, 490, 492, 495, 497, 499, - 505, 508, 509, 516, 520, 521, 523, 525, 527, 529, - 531, 534, 536, 538, 541, 546, 551, 552, 554, 556, - 558, 560, 563, 565, 567, 569, 571, 577, 579, 583, - 589, 595, 597, 601, 607, 609, 611, 613, 615, 617, - 619, 621, 623, 625, 629, 635, 643, 653, 656, 659, - 661, 663, 664, 665, 669, 670, 674, 678, 680, 685, - 688, 691, 694, 697, 701, 704, 708, 709, 711, 713, - 714, 716, 718, 719, 721, 723, 724, 726, 728, 729, - 733, 734, 738, 739, 743, 745, 747, 749 + 132, 134, 136, 138, 140, 142, 144, 151, 154, 159, + 162, 164, 168, 174, 177, 180, 188, 191, 193, 195, + 197, 199, 204, 206, 208, 210, 212, 214, 216, 218, + 222, 223, 226, 229, 231, 233, 235, 237, 239, 241, + 243, 245, 247, 248, 250, 252, 254, 256, 257, 259, + 261, 263, 265, 267, 269, 274, 277, 280, 282, 285, + 287, 290, 292, 295, 300, 305, 307, 308, 312, 314, + 316, 319, 321, 324, 326, 328, 332, 339, 340, 342, + 345, 350, 352, 356, 358, 360, 362, 364, 366, 368, + 370, 372, 374, 376, 379, 382, 385, 388, 391, 394, + 397, 400, 403, 406, 409, 412, 416, 418, 420, 422, + 428, 430, 432, 434, 437, 439, 441, 444, 446, 449, + 456, 458, 462, 464, 466, 468, 470, 472, 477, 479, + 481, 483, 485, 487, 489, 492, 494, 496, 502, 504, + 507, 509, 511, 517, 520, 521, 528, 532, 533, 535, + 537, 539, 541, 543, 546, 548, 550, 553, 558, 563, + 564, 566, 568, 570, 572, 575, 577, 579, 581, 583, + 589, 591, 595, 601, 607, 609, 613, 619, 621, 623, + 625, 627, 629, 631, 633, 635, 637, 641, 647, 655, + 665, 668, 671, 673, 675, 676, 677, 681, 682, 686, + 690, 692, 697, 700, 703, 706, 709, 713, 716, 720, + 721, 723, 725, 726, 728, 730, 731, 733, 735, 736, + 738, 740, 741, 745, 746, 750, 751, 755, 757, 759, + 761 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 117, 0, -1, 118, 119, 121, 12, -1, 3, -1, - 4, -1, 119, 120, -1, -1, 8, 99, 107, -1, - 121, 122, -1, -1, 123, 107, -1, 160, 107, -1, - 124, -1, 125, -1, 126, -1, 127, -1, 128, -1, - 129, -1, 130, -1, 131, -1, 137, -1, 132, -1, - 133, -1, 134, -1, 19, 141, 108, 138, -1, 18, - 140, 108, 139, -1, 16, 140, 108, 138, -1, 14, - 140, 108, 138, 108, 138, -1, 13, 140, 108, 139, - 108, 139, -1, 17, 140, 108, 139, 108, 139, 108, - 139, -1, 15, 140, 108, 139, 108, 135, 108, 136, - -1, 20, 139, -1, 22, 140, 108, 139, 108, 139, - 108, 139, 108, 135, 108, 136, -1, 83, 245, -1, + 118, 0, -1, 119, 120, 122, 12, -1, 3, -1, + 4, -1, 120, 121, -1, -1, 8, 99, 107, -1, + 122, 123, -1, -1, 124, 107, -1, 162, 107, -1, + 125, -1, 126, -1, 127, -1, 128, -1, 129, -1, + 130, -1, 131, -1, 132, -1, 138, -1, 133, -1, + 134, -1, 135, -1, 19, 143, 108, 139, -1, 18, + 142, 108, 141, -1, 16, 142, 108, 139, -1, 14, + 142, 108, 139, 108, 139, -1, 13, 142, 108, 141, + 108, 141, -1, 17, 142, 108, 141, 108, 141, 108, + 141, -1, 15, 142, 108, 141, 108, 136, 108, 137, + -1, 20, 141, -1, 22, 142, 108, 141, 108, 141, + 108, 141, 108, 136, 108, 137, -1, 83, 247, -1, 84, -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, -1, 93, -1, - 94, -1, 95, -1, 21, 140, 108, 145, 108, 142, - -1, 231, 145, 157, -1, 231, 228, -1, 231, 145, - 158, -1, 146, 159, -1, 154, 156, -1, 143, 108, - 143, 108, 143, 108, 143, -1, 231, 144, -1, 23, - -1, 99, -1, 99, -1, 162, -1, 147, 109, 148, - 110, -1, 176, -1, 238, -1, 99, -1, 99, -1, - 149, -1, 150, -1, 23, -1, 154, 155, 151, -1, - -1, 111, 152, -1, 112, 153, -1, 23, -1, 23, - -1, 99, -1, 103, -1, 103, -1, 103, -1, 103, - -1, 100, -1, 104, -1, -1, 100, -1, 101, -1, - 102, -1, 103, -1, -1, 161, -1, 168, -1, 232, - -1, 234, -1, 237, -1, 250, -1, 7, 99, 113, - 162, -1, 96, 163, -1, 38, 167, -1, 60, -1, - 98, 165, -1, 53, -1, 29, 243, -1, 37, -1, - 74, 244, -1, 50, 109, 166, 110, -1, 97, 109, - 164, 110, -1, 23, -1, -1, 109, 166, 110, -1, - 23, -1, 60, -1, 29, 243, -1, 37, -1, 74, - 244, -1, 169, -1, 170, -1, 10, 99, 172, -1, - 10, 99, 109, 171, 110, 173, -1, -1, 23, -1, - 113, 175, -1, 113, 114, 174, 115, -1, 177, -1, - 174, 108, 177, -1, 179, -1, 215, -1, 225, -1, - 179, -1, 215, -1, 226, -1, 178, -1, 216, -1, - 225, -1, 179, -1, 73, 203, -1, 73, 180, -1, - 73, 182, -1, 73, 185, -1, 73, 187, -1, 73, - 193, -1, 73, 189, -1, 73, 196, -1, 73, 198, - -1, 73, 200, -1, 73, 202, -1, 73, 214, -1, - 47, 242, 181, -1, 191, -1, 33, -1, 69, -1, - 43, 109, 192, 110, 183, -1, 191, -1, 60, -1, - 26, -1, 72, 184, -1, 40, -1, 32, -1, 44, - 186, -1, 25, -1, 242, 67, -1, 45, 109, 192, - 110, 242, 188, -1, 191, -1, 75, 246, 190, -1, - 29, -1, 25, -1, 31, -1, 71, -1, 23, -1, - 76, 244, 194, 195, -1, 35, -1, 54, -1, 79, - -1, 80, -1, 78, -1, 77, -1, 36, 197, -1, - 29, -1, 56, -1, 28, 109, 199, 110, 57, -1, - 23, -1, 58, 201, -1, 70, -1, 26, -1, 205, - 66, 109, 208, 110, -1, 205, 204, -1, -1, 66, - 109, 208, 105, 208, 110, -1, 49, 209, 206, -1, - -1, 207, -1, 41, -1, 82, -1, 42, -1, 23, - -1, 51, 210, -1, 63, -1, 52, -1, 81, 244, - -1, 55, 109, 212, 110, -1, 48, 109, 213, 110, - -1, -1, 211, -1, 23, -1, 23, -1, 23, -1, - 30, 64, -1, 219, -1, 222, -1, 217, -1, 220, - -1, 62, 34, 109, 218, 110, -1, 223, -1, 223, - 105, 223, -1, 62, 34, 109, 223, 110, -1, 62, - 46, 109, 221, 110, -1, 224, -1, 224, 105, 224, - -1, 62, 46, 109, 224, 110, -1, 23, -1, 23, - -1, 227, -1, 229, -1, 228, -1, 229, -1, 230, - -1, 24, -1, 23, -1, 114, 230, 115, -1, 114, - 230, 108, 230, 115, -1, 114, 230, 108, 230, 108, - 230, 115, -1, 114, 230, 108, 230, 108, 230, 108, - 230, 115, -1, 231, 24, -1, 231, 23, -1, 111, - -1, 112, -1, -1, -1, 11, 233, 236, -1, -1, - 5, 235, 236, -1, 236, 108, 99, -1, 99, -1, - 9, 99, 113, 238, -1, 65, 60, -1, 65, 37, - -1, 65, 239, -1, 65, 59, -1, 65, 74, 244, - -1, 65, 30, -1, 29, 240, 241, -1, -1, 39, - -1, 27, -1, -1, 61, -1, 68, -1, -1, 39, - -1, 27, -1, -1, 61, -1, 68, -1, -1, 109, - 247, 110, -1, -1, 109, 248, 110, -1, -1, 109, - 249, 110, -1, 23, -1, 23, -1, 23, -1, 6, - 99, 113, 99, -1 + 94, -1, 95, -1, 21, 142, 108, 147, 108, 144, + -1, 233, 140, -1, 233, 109, 140, 109, -1, 147, + 159, -1, 230, -1, 233, 147, 160, -1, 233, 109, + 147, 160, 109, -1, 148, 161, -1, 156, 158, -1, + 145, 108, 145, 108, 145, 108, 145, -1, 233, 146, + -1, 23, -1, 99, -1, 99, -1, 164, -1, 149, + 110, 150, 111, -1, 178, -1, 240, -1, 99, -1, + 99, -1, 151, -1, 152, -1, 23, -1, 156, 157, + 153, -1, -1, 112, 154, -1, 113, 155, -1, 23, + -1, 23, -1, 99, -1, 103, -1, 103, -1, 103, + -1, 103, -1, 100, -1, 104, -1, -1, 100, -1, + 101, -1, 102, -1, 103, -1, -1, 163, -1, 170, + -1, 234, -1, 236, -1, 239, -1, 252, -1, 7, + 99, 114, 164, -1, 96, 165, -1, 38, 169, -1, + 60, -1, 98, 167, -1, 53, -1, 29, 245, -1, + 37, -1, 74, 246, -1, 50, 110, 168, 111, -1, + 97, 110, 166, 111, -1, 23, -1, -1, 110, 168, + 111, -1, 23, -1, 60, -1, 29, 245, -1, 37, + -1, 74, 246, -1, 171, -1, 172, -1, 10, 99, + 174, -1, 10, 99, 110, 173, 111, 175, -1, -1, + 23, -1, 114, 177, -1, 114, 115, 176, 116, -1, + 179, -1, 176, 108, 179, -1, 181, -1, 217, -1, + 227, -1, 181, -1, 217, -1, 228, -1, 180, -1, + 218, -1, 227, -1, 181, -1, 73, 205, -1, 73, + 182, -1, 73, 184, -1, 73, 187, -1, 73, 189, + -1, 73, 195, -1, 73, 191, -1, 73, 198, -1, + 73, 200, -1, 73, 202, -1, 73, 204, -1, 73, + 216, -1, 47, 244, 183, -1, 193, -1, 33, -1, + 69, -1, 43, 110, 194, 111, 185, -1, 193, -1, + 60, -1, 26, -1, 72, 186, -1, 40, -1, 32, + -1, 44, 188, -1, 25, -1, 244, 67, -1, 45, + 110, 194, 111, 244, 190, -1, 193, -1, 75, 248, + 192, -1, 29, -1, 25, -1, 31, -1, 71, -1, + 23, -1, 76, 246, 196, 197, -1, 35, -1, 54, + -1, 79, -1, 80, -1, 78, -1, 77, -1, 36, + 199, -1, 29, -1, 56, -1, 28, 110, 201, 111, + 57, -1, 23, -1, 58, 203, -1, 70, -1, 26, + -1, 207, 66, 110, 210, 111, -1, 207, 206, -1, + -1, 66, 110, 210, 105, 210, 111, -1, 49, 211, + 208, -1, -1, 209, -1, 41, -1, 82, -1, 42, + -1, 23, -1, 51, 212, -1, 63, -1, 52, -1, + 81, 246, -1, 55, 110, 214, 111, -1, 48, 110, + 215, 111, -1, -1, 213, -1, 23, -1, 23, -1, + 23, -1, 30, 64, -1, 221, -1, 224, -1, 219, + -1, 222, -1, 62, 34, 110, 220, 111, -1, 225, + -1, 225, 105, 225, -1, 62, 34, 110, 225, 111, + -1, 62, 46, 110, 223, 111, -1, 226, -1, 226, + 105, 226, -1, 62, 46, 110, 226, 111, -1, 23, + -1, 23, -1, 229, -1, 231, -1, 230, -1, 231, + -1, 232, -1, 24, -1, 23, -1, 115, 232, 116, + -1, 115, 232, 108, 232, 116, -1, 115, 232, 108, + 232, 108, 232, 116, -1, 115, 232, 108, 232, 108, + 232, 108, 232, 116, -1, 233, 24, -1, 233, 23, + -1, 112, -1, 113, -1, -1, -1, 11, 235, 238, + -1, -1, 5, 237, 238, -1, 238, 108, 99, -1, + 99, -1, 9, 99, 114, 240, -1, 65, 60, -1, + 65, 37, -1, 65, 241, -1, 65, 59, -1, 65, + 74, 246, -1, 65, 30, -1, 29, 242, 243, -1, + -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, + -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, + -1, 110, 249, 111, -1, -1, 110, 250, 111, -1, + -1, 110, 251, 111, -1, 23, -1, 23, -1, 23, + -1, 6, 99, 114, 99, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -770,29 +772,30 @@ static const yytype_uint16 yyrline[] = 309, 324, 327, 332, 339, 340, 341, 342, 343, 344, 345, 348, 349, 350, 353, 359, 366, 373, 381, 388, 396, 441, 448, 493, 499, 500, 501, 502, 503, 504, - 505, 506, 507, 508, 509, 510, 513, 526, 537, 556, - 569, 591, 600, 633, 640, 655, 705, 747, 758, 779, - 789, 795, 826, 843, 843, 845, 852, 864, 865, 866, - 869, 881, 893, 911, 922, 934, 936, 937, 938, 939, - 942, 942, 942, 942, 943, 946, 947, 948, 949, 950, - 951, 954, 972, 976, 982, 986, 990, 994, 1003, 1012, - 1016, 1021, 1027, 1038, 1038, 1039, 1041, 1045, 1049, 1053, - 1059, 1059, 1061, 1077, 1100, 1103, 1114, 1120, 1126, 1127, - 1134, 1140, 1146, 1154, 1160, 1166, 1174, 1180, 1186, 1194, - 1195, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, - 1207, 1208, 1211, 1220, 1224, 1228, 1234, 1243, 1247, 1251, - 1260, 1264, 1270, 1276, 1283, 1288, 1296, 1306, 1308, 1316, - 1322, 1326, 1330, 1336, 1347, 1356, 1360, 1365, 1369, 1373, - 1377, 1383, 1390, 1394, 1400, 1408, 1419, 1426, 1430, 1436, - 1446, 1457, 1461, 1479, 1488, 1491, 1497, 1501, 1505, 1511, - 1522, 1527, 1532, 1537, 1542, 1547, 1555, 1558, 1563, 1576, - 1584, 1595, 1603, 1603, 1605, 1605, 1607, 1617, 1622, 1629, - 1639, 1648, 1653, 1660, 1670, 1680, 1692, 1692, 1693, 1693, - 1695, 1705, 1713, 1723, 1731, 1739, 1748, 1759, 1763, 1769, - 1770, 1771, 1774, 1774, 1777, 1777, 1780, 1786, 1794, 1807, - 1816, 1825, 1829, 1838, 1847, 1858, 1865, 1870, 1879, 1891, - 1894, 1903, 1914, 1915, 1916, 1919, 1920, 1921, 1924, 1925, - 1928, 1929, 1932, 1933, 1936, 1947, 1958, 1969 + 505, 506, 507, 508, 509, 510, 513, 526, 534, 551, + 558, 577, 588, 608, 630, 639, 672, 679, 694, 744, + 786, 797, 818, 828, 834, 865, 882, 882, 884, 891, + 903, 904, 905, 908, 920, 932, 950, 961, 973, 975, + 976, 977, 978, 981, 981, 981, 981, 982, 985, 986, + 987, 988, 989, 990, 993, 1011, 1015, 1021, 1025, 1029, + 1033, 1042, 1051, 1055, 1060, 1066, 1077, 1077, 1078, 1080, + 1084, 1088, 1092, 1098, 1098, 1100, 1116, 1139, 1142, 1153, + 1159, 1165, 1166, 1173, 1179, 1185, 1193, 1199, 1205, 1213, + 1219, 1225, 1233, 1234, 1237, 1238, 1239, 1240, 1241, 1242, + 1243, 1244, 1245, 1246, 1247, 1250, 1259, 1263, 1267, 1273, + 1282, 1286, 1290, 1299, 1303, 1309, 1315, 1322, 1327, 1335, + 1345, 1347, 1355, 1361, 1365, 1369, 1375, 1386, 1395, 1399, + 1404, 1408, 1412, 1416, 1422, 1429, 1433, 1439, 1447, 1458, + 1465, 1469, 1475, 1485, 1496, 1500, 1518, 1527, 1530, 1536, + 1540, 1544, 1550, 1561, 1566, 1571, 1576, 1581, 1586, 1594, + 1597, 1602, 1615, 1623, 1634, 1642, 1642, 1644, 1644, 1646, + 1656, 1661, 1668, 1678, 1687, 1692, 1699, 1709, 1719, 1731, + 1731, 1732, 1732, 1734, 1744, 1752, 1762, 1770, 1778, 1787, + 1798, 1802, 1808, 1809, 1810, 1813, 1813, 1816, 1816, 1819, + 1825, 1833, 1846, 1855, 1864, 1868, 1877, 1886, 1897, 1904, + 1909, 1918, 1930, 1933, 1942, 1953, 1954, 1955, 1958, 1959, + 1960, 1963, 1964, 1967, 1968, 1971, 1972, 1975, 1986, 1997, + 2008 }; #endif @@ -818,45 +821,45 @@ static const char *const yytname[] = "TEX_SHADOW2D", "TEX_SHADOWRECT", "TEX_ARRAY1D", "TEX_ARRAY2D", "TEX_ARRAYSHADOW1D", "TEX_ARRAYSHADOW2D", "VERTEX", "VTXATTRIB", "WEIGHT", "IDENTIFIER", "MASK4", "MASK3", "MASK2", "MASK1", "SWIZZLE", - "DOT_DOT", "DOT", "';'", "','", "'['", "']'", "'+'", "'-'", "'='", "'{'", - "'}'", "$accept", "program", "language", "optionSequence", "option", - "statementSequence", "statement", "instruction", "ALU_instruction", - "TexInstruction", "ARL_instruction", "VECTORop_instruction", - "SCALARop_instruction", "BINSCop_instruction", "BINop_instruction", - "TRIop_instruction", "SAMPLE_instruction", "KIL_instruction", - "TXD_instruction", "texImageUnit", "texTarget", "SWZ_instruction", - "scalarSrcReg", "swizzleSrcReg", "maskedDstReg", "maskedAddrReg", - "extendedSwizzle", "extSwizComp", "extSwizSel", "srcReg", "dstReg", - "progParamArray", "progParamArrayMem", "progParamArrayAbs", - "progParamArrayRel", "addrRegRelOffset", "addrRegPosOffset", - "addrRegNegOffset", "addrReg", "addrComponent", "addrWriteMask", - "scalarSuffix", "swizzleSuffix", "optionalMask", "namingStatement", - "ATTRIB_statement", "attribBinding", "vtxAttribItem", "vtxAttribNum", - "vtxOptWeightNum", "vtxWeightNum", "fragAttribItem", "PARAM_statement", - "PARAM_singleStmt", "PARAM_multipleStmt", "optArraySize", - "paramSingleInit", "paramMultipleInit", "paramMultInitList", - "paramSingleItemDecl", "paramSingleItemUse", "paramMultipleItem", - "stateMultipleItem", "stateSingleItem", "stateMaterialItem", - "stateMatProperty", "stateLightItem", "stateLightProperty", - "stateSpotProperty", "stateLightModelItem", "stateLModProperty", - "stateLightProdItem", "stateLProdProperty", "stateTexEnvItem", - "stateTexEnvProperty", "ambDiffSpecProperty", "stateLightNumber", - "stateTexGenItem", "stateTexGenType", "stateTexGenCoord", "stateFogItem", - "stateFogProperty", "stateClipPlaneItem", "stateClipPlaneNum", - "statePointItem", "statePointProperty", "stateMatrixRow", - "stateMatrixRows", "optMatrixRows", "stateMatrixItem", - "stateOptMatModifier", "stateMatModifier", "stateMatrixRowNum", - "stateMatrixName", "stateOptModMatNum", "stateModMatNum", - "statePaletteMatNum", "stateProgramMatNum", "stateDepthItem", - "programSingleItem", "programMultipleItem", "progEnvParams", - "progEnvParamNums", "progEnvParam", "progLocalParams", - "progLocalParamNums", "progLocalParam", "progEnvParamNum", - "progLocalParamNum", "paramConstDecl", "paramConstUse", - "paramConstScalarDecl", "paramConstScalarUse", "paramConstVector", - "signedFloatConstant", "optionalSign", "TEMP_statement", "@1", - "ADDRESS_statement", "@2", "varNameList", "OUTPUT_statement", - "resultBinding", "resultColBinding", "optResultFaceType", - "optResultColorType", "optFaceType", "optColorType", + "DOT_DOT", "DOT", "';'", "','", "'|'", "'['", "']'", "'+'", "'-'", "'='", + "'{'", "'}'", "$accept", "program", "language", "optionSequence", + "option", "statementSequence", "statement", "instruction", + "ALU_instruction", "TexInstruction", "ARL_instruction", + "VECTORop_instruction", "SCALARop_instruction", "BINSCop_instruction", + "BINop_instruction", "TRIop_instruction", "SAMPLE_instruction", + "KIL_instruction", "TXD_instruction", "texImageUnit", "texTarget", + "SWZ_instruction", "scalarSrcReg", "scalarUse", "swizzleSrcReg", + "maskedDstReg", "maskedAddrReg", "extendedSwizzle", "extSwizComp", + "extSwizSel", "srcReg", "dstReg", "progParamArray", "progParamArrayMem", + "progParamArrayAbs", "progParamArrayRel", "addrRegRelOffset", + "addrRegPosOffset", "addrRegNegOffset", "addrReg", "addrComponent", + "addrWriteMask", "scalarSuffix", "swizzleSuffix", "optionalMask", + "namingStatement", "ATTRIB_statement", "attribBinding", "vtxAttribItem", + "vtxAttribNum", "vtxOptWeightNum", "vtxWeightNum", "fragAttribItem", + "PARAM_statement", "PARAM_singleStmt", "PARAM_multipleStmt", + "optArraySize", "paramSingleInit", "paramMultipleInit", + "paramMultInitList", "paramSingleItemDecl", "paramSingleItemUse", + "paramMultipleItem", "stateMultipleItem", "stateSingleItem", + "stateMaterialItem", "stateMatProperty", "stateLightItem", + "stateLightProperty", "stateSpotProperty", "stateLightModelItem", + "stateLModProperty", "stateLightProdItem", "stateLProdProperty", + "stateTexEnvItem", "stateTexEnvProperty", "ambDiffSpecProperty", + "stateLightNumber", "stateTexGenItem", "stateTexGenType", + "stateTexGenCoord", "stateFogItem", "stateFogProperty", + "stateClipPlaneItem", "stateClipPlaneNum", "statePointItem", + "statePointProperty", "stateMatrixRow", "stateMatrixRows", + "optMatrixRows", "stateMatrixItem", "stateOptMatModifier", + "stateMatModifier", "stateMatrixRowNum", "stateMatrixName", + "stateOptModMatNum", "stateModMatNum", "statePaletteMatNum", + "stateProgramMatNum", "stateDepthItem", "programSingleItem", + "programMultipleItem", "progEnvParams", "progEnvParamNums", + "progEnvParam", "progLocalParams", "progLocalParamNums", + "progLocalParam", "progEnvParamNum", "progLocalParamNum", + "paramConstDecl", "paramConstUse", "paramConstScalarDecl", + "paramConstScalarUse", "paramConstVector", "signedFloatConstant", + "optionalSign", "TEMP_statement", "@1", "ADDRESS_statement", "@2", + "varNameList", "OUTPUT_statement", "resultBinding", "resultColBinding", + "optResultFaceType", "optResultColorType", "optFaceType", "optColorType", "optTexCoordUnitNum", "optTexImageUnitNum", "optLegacyTexUnitNum", "texCoordUnitNum", "texImageUnitNum", "legacyTexUnitNum", "ALIAS_statement", 0 @@ -878,41 +881,42 @@ static const yytype_uint16 yytoknum[] = 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 59, 44, 91, - 93, 43, 45, 61, 123, 125 + 355, 356, 357, 358, 359, 360, 361, 59, 44, 124, + 91, 93, 43, 45, 61, 123, 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 116, 117, 118, 118, 119, 119, 120, 121, 121, - 122, 122, 123, 123, 124, 124, 124, 124, 124, 124, - 124, 125, 125, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 137, 138, 138, 139, - 140, 141, 142, 143, 144, 144, 145, 145, 145, 145, - 146, 146, 147, 148, 148, 149, 150, 151, 151, 151, - 152, 153, 154, 155, 156, 157, 158, 158, 158, 158, - 159, 159, 159, 159, 159, 160, 160, 160, 160, 160, - 160, 161, 162, 162, 163, 163, 163, 163, 163, 163, - 163, 163, 164, 165, 165, 166, 167, 167, 167, 167, - 168, 168, 169, 170, 171, 171, 172, 173, 174, 174, - 175, 175, 175, 176, 176, 176, 177, 177, 177, 178, - 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 180, 181, 181, 181, 182, 183, 183, 183, - 183, 183, 184, 185, 186, 186, 187, 188, 189, 190, - 191, 191, 191, 192, 193, 194, 194, 195, 195, 195, - 195, 196, 197, 197, 198, 199, 200, 201, 201, 202, - 203, 204, 204, 205, 206, 206, 207, 207, 207, 208, - 209, 209, 209, 209, 209, 209, 210, 210, 211, 212, - 213, 214, 215, 215, 216, 216, 217, 218, 218, 219, - 220, 221, 221, 222, 223, 224, 225, 225, 226, 226, - 227, 228, 228, 229, 229, 229, 229, 230, 230, 231, - 231, 231, 233, 232, 235, 234, 236, 236, 237, 238, - 238, 238, 238, 238, 238, 239, 240, 240, 240, 241, - 241, 241, 242, 242, 242, 243, 243, 243, 244, 244, - 245, 245, 246, 246, 247, 248, 249, 250 + 0, 117, 118, 119, 119, 120, 120, 121, 122, 122, + 123, 123, 124, 124, 125, 125, 125, 125, 125, 125, + 125, 126, 126, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 138, 139, 139, 140, + 140, 141, 141, 142, 143, 144, 145, 146, 146, 147, + 147, 147, 147, 148, 148, 149, 150, 150, 151, 152, + 153, 153, 153, 154, 155, 156, 157, 158, 159, 160, + 160, 160, 160, 161, 161, 161, 161, 161, 162, 162, + 162, 162, 162, 162, 163, 164, 164, 165, 165, 165, + 165, 165, 165, 165, 165, 166, 167, 167, 168, 169, + 169, 169, 169, 170, 170, 171, 172, 173, 173, 174, + 175, 176, 176, 177, 177, 177, 178, 178, 178, 179, + 179, 179, 180, 180, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 182, 183, 183, 183, 184, + 185, 185, 185, 185, 185, 186, 187, 188, 188, 189, + 190, 191, 192, 193, 193, 193, 194, 195, 196, 196, + 197, 197, 197, 197, 198, 199, 199, 200, 201, 202, + 203, 203, 204, 205, 206, 206, 207, 208, 208, 209, + 209, 209, 210, 211, 211, 211, 211, 211, 211, 212, + 212, 213, 214, 215, 216, 217, 217, 218, 218, 219, + 220, 220, 221, 222, 223, 223, 224, 225, 226, 227, + 227, 228, 228, 229, 230, 230, 231, 231, 231, 231, + 232, 232, 233, 233, 233, 235, 234, 237, 236, 238, + 238, 239, 240, 240, 240, 240, 240, 240, 241, 242, + 242, 242, 243, 243, 243, 244, 244, 244, 245, 245, + 245, 246, 246, 247, 247, 248, 248, 249, 250, 251, + 252 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -922,29 +926,30 @@ static const yytype_uint8 yyr2[] = 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 6, 6, 8, 8, 2, 12, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 6, 3, 2, 3, - 2, 2, 7, 2, 1, 1, 1, 1, 4, 1, - 1, 1, 1, 1, 1, 1, 3, 0, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, - 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 4, 2, 2, 1, 2, 1, 2, 1, 2, - 4, 4, 1, 0, 3, 1, 1, 2, 1, 2, - 1, 1, 3, 6, 0, 1, 2, 4, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 3, 1, 1, 1, 5, 1, 1, 1, - 2, 1, 1, 2, 1, 2, 6, 1, 3, 1, - 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 5, 1, 2, 1, 1, 5, - 2, 0, 6, 3, 0, 1, 1, 1, 1, 1, - 2, 1, 1, 2, 4, 4, 0, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 5, 1, 3, 5, - 5, 1, 3, 5, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 5, 7, 9, 2, 2, 1, - 1, 0, 0, 3, 0, 3, 3, 1, 4, 2, - 2, 2, 2, 3, 2, 3, 0, 1, 1, 0, - 1, 1, 0, 1, 1, 0, 1, 1, 0, 3, - 0, 3, 0, 3, 1, 1, 1, 4 + 1, 1, 1, 1, 1, 1, 6, 2, 4, 2, + 1, 3, 5, 2, 2, 7, 2, 1, 1, 1, + 1, 4, 1, 1, 1, 1, 1, 1, 1, 3, + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 4, 2, 2, 1, 2, 1, + 2, 1, 2, 4, 4, 1, 0, 3, 1, 1, + 2, 1, 2, 1, 1, 3, 6, 0, 1, 2, + 4, 1, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 3, 1, 1, 1, 5, + 1, 1, 1, 2, 1, 1, 2, 1, 2, 6, + 1, 3, 1, 1, 1, 1, 1, 4, 1, 1, + 1, 1, 1, 1, 2, 1, 1, 5, 1, 2, + 1, 1, 5, 2, 0, 6, 3, 0, 1, 1, + 1, 1, 1, 2, 1, 1, 2, 4, 4, 0, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 5, + 1, 3, 5, 5, 1, 3, 5, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 5, 7, 9, + 2, 2, 1, 1, 0, 0, 3, 0, 3, 3, + 1, 4, 2, 2, 2, 2, 3, 2, 3, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 3, 0, 3, 0, 3, 1, 1, 1, + 4 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -953,276 +958,283 @@ static const yytype_uint8 yyr2[] = static const yytype_uint16 yydefact[] = { 0, 3, 4, 0, 6, 1, 9, 0, 5, 0, - 0, 234, 0, 0, 0, 0, 232, 2, 0, 0, - 0, 0, 0, 0, 0, 231, 0, 0, 8, 0, + 0, 237, 0, 0, 0, 0, 235, 2, 0, 0, + 0, 0, 0, 0, 0, 234, 0, 0, 8, 0, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, - 23, 20, 0, 85, 86, 110, 111, 87, 88, 89, - 90, 7, 0, 0, 0, 0, 0, 0, 0, 61, - 0, 84, 60, 0, 0, 0, 0, 0, 72, 0, - 0, 229, 230, 31, 0, 0, 0, 10, 11, 237, - 235, 0, 0, 0, 114, 231, 112, 233, 246, 244, - 240, 242, 239, 258, 241, 231, 80, 81, 82, 83, - 50, 231, 231, 231, 231, 231, 231, 74, 51, 222, - 221, 0, 0, 0, 0, 56, 231, 79, 0, 57, - 59, 123, 124, 202, 203, 125, 218, 219, 0, 231, - 0, 267, 91, 238, 115, 0, 116, 120, 121, 122, - 216, 217, 220, 0, 248, 247, 249, 0, 243, 0, - 0, 0, 0, 26, 0, 25, 24, 255, 108, 106, - 258, 93, 0, 0, 0, 0, 0, 0, 252, 0, - 252, 0, 0, 262, 258, 131, 132, 133, 134, 136, - 135, 137, 138, 139, 140, 0, 141, 255, 98, 0, - 96, 94, 258, 0, 103, 92, 0, 77, 76, 78, - 49, 0, 0, 0, 236, 0, 228, 227, 250, 251, - 245, 264, 0, 231, 231, 0, 48, 0, 231, 256, - 257, 107, 109, 0, 0, 0, 201, 172, 173, 171, - 0, 154, 254, 253, 153, 0, 0, 0, 0, 196, - 192, 0, 191, 258, 184, 178, 177, 176, 0, 0, - 0, 0, 97, 0, 99, 0, 0, 95, 231, 223, - 65, 0, 63, 64, 0, 231, 231, 0, 113, 259, - 28, 27, 75, 47, 260, 0, 0, 214, 0, 215, - 0, 175, 0, 163, 0, 155, 0, 160, 161, 144, - 145, 162, 142, 143, 0, 198, 190, 197, 0, 193, - 186, 188, 187, 183, 185, 266, 0, 159, 158, 165, - 166, 0, 0, 105, 0, 102, 0, 0, 0, 58, - 73, 67, 46, 0, 0, 0, 231, 0, 33, 0, - 231, 209, 213, 0, 0, 252, 200, 0, 199, 0, - 263, 170, 169, 167, 168, 164, 189, 0, 100, 101, - 104, 231, 224, 0, 0, 66, 231, 54, 55, 53, - 231, 0, 0, 0, 118, 126, 129, 127, 204, 205, - 128, 265, 0, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 30, 29, 174, 149, 151, - 148, 0, 146, 147, 0, 195, 194, 179, 0, 70, - 68, 71, 69, 0, 0, 0, 0, 130, 181, 231, - 117, 261, 152, 150, 156, 157, 231, 225, 231, 0, - 0, 0, 0, 180, 119, 0, 0, 0, 0, 207, - 0, 211, 0, 226, 231, 0, 206, 0, 210, 0, - 0, 52, 32, 208, 212, 0, 0, 182 + 23, 20, 0, 88, 89, 113, 114, 90, 91, 92, + 93, 7, 0, 0, 0, 0, 0, 0, 0, 64, + 0, 87, 63, 0, 0, 0, 0, 0, 75, 0, + 0, 232, 233, 31, 0, 0, 0, 10, 11, 240, + 238, 0, 0, 0, 117, 234, 115, 236, 249, 247, + 243, 245, 242, 261, 244, 234, 83, 84, 85, 86, + 53, 234, 234, 234, 234, 234, 234, 77, 54, 225, + 224, 0, 0, 0, 0, 59, 0, 234, 82, 0, + 60, 62, 126, 127, 205, 206, 128, 221, 222, 0, + 234, 0, 270, 94, 241, 118, 0, 119, 123, 124, + 125, 219, 220, 223, 0, 251, 250, 252, 0, 246, + 0, 0, 0, 0, 26, 0, 25, 24, 258, 111, + 109, 261, 96, 0, 0, 0, 0, 0, 0, 255, + 0, 255, 0, 0, 265, 261, 134, 135, 136, 137, + 139, 138, 140, 141, 142, 143, 0, 144, 258, 101, + 0, 99, 97, 261, 0, 106, 95, 82, 0, 80, + 79, 81, 51, 0, 0, 0, 239, 0, 231, 230, + 253, 254, 248, 267, 0, 234, 234, 0, 47, 0, + 50, 0, 234, 259, 260, 110, 112, 0, 0, 0, + 204, 175, 176, 174, 0, 157, 257, 256, 156, 0, + 0, 0, 0, 199, 195, 0, 194, 261, 187, 181, + 180, 179, 0, 0, 0, 0, 100, 0, 102, 0, + 0, 98, 0, 234, 226, 68, 0, 66, 67, 0, + 234, 234, 0, 116, 262, 28, 27, 0, 78, 49, + 263, 0, 0, 217, 0, 218, 0, 178, 0, 166, + 0, 158, 0, 163, 164, 147, 148, 165, 145, 146, + 0, 201, 193, 200, 0, 196, 189, 191, 190, 186, + 188, 269, 0, 162, 161, 168, 169, 0, 0, 108, + 0, 105, 0, 0, 52, 0, 61, 76, 70, 46, + 0, 0, 0, 234, 48, 0, 33, 0, 234, 212, + 216, 0, 0, 255, 203, 0, 202, 0, 266, 173, + 172, 170, 171, 167, 192, 0, 103, 104, 107, 234, + 227, 0, 0, 69, 234, 57, 58, 56, 234, 0, + 0, 0, 121, 129, 132, 130, 207, 208, 131, 268, + 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 30, 29, 177, 152, 154, 151, 0, + 149, 150, 0, 198, 197, 182, 0, 73, 71, 74, + 72, 0, 0, 0, 0, 133, 184, 234, 120, 264, + 155, 153, 159, 160, 234, 228, 234, 0, 0, 0, + 0, 183, 122, 0, 0, 0, 0, 210, 0, 214, + 0, 229, 234, 0, 209, 0, 213, 0, 0, 55, + 32, 211, 215, 0, 0, 185 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 3, 4, 6, 8, 9, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 275, - 385, 41, 150, 73, 60, 69, 322, 323, 359, 117, - 61, 118, 261, 262, 263, 355, 400, 402, 70, 321, - 108, 273, 200, 100, 42, 43, 119, 195, 316, 257, - 314, 161, 44, 45, 46, 135, 86, 268, 363, 136, - 120, 364, 365, 121, 175, 292, 176, 392, 413, 177, - 234, 178, 414, 179, 308, 293, 284, 180, 311, 345, - 181, 229, 182, 282, 183, 247, 184, 407, 423, 185, - 303, 304, 347, 244, 296, 297, 339, 337, 186, 122, - 367, 368, 428, 123, 369, 430, 124, 278, 280, 370, - 125, 140, 126, 127, 142, 74, 47, 57, 48, 52, - 80, 49, 62, 94, 146, 210, 235, 221, 148, 328, - 249, 212, 372, 306, 50 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 281, + 393, 41, 151, 218, 73, 60, 69, 329, 330, 367, + 219, 61, 119, 266, 267, 268, 363, 408, 410, 70, + 328, 108, 279, 202, 100, 42, 43, 120, 196, 322, + 261, 320, 162, 44, 45, 46, 136, 86, 273, 371, + 137, 121, 372, 373, 122, 176, 298, 177, 400, 421, + 178, 238, 179, 422, 180, 314, 299, 290, 181, 317, + 353, 182, 233, 183, 288, 184, 251, 185, 415, 431, + 186, 309, 310, 355, 248, 302, 303, 347, 345, 187, + 123, 375, 376, 436, 124, 377, 438, 125, 284, 286, + 378, 126, 141, 127, 128, 143, 74, 47, 57, 48, + 52, 80, 49, 62, 94, 147, 212, 239, 225, 149, + 336, 253, 214, 380, 312, 50 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -399 +#define YYPACT_NINF -403 static const yytype_int16 yypact[] = { - 154, -399, -399, 48, -399, -399, 51, -37, -399, 172, - -2, -399, 17, 31, 42, 47, -399, -399, -33, -33, - -33, -33, -33, -33, 54, 56, -33, -33, -399, 6, - -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, - -399, -399, 52, -399, -399, -399, -399, -399, -399, -399, - -399, -399, 66, 25, 61, 112, -6, 66, 102, -399, - 118, 116, -399, 119, 120, 121, 122, 123, -399, 124, - 130, -399, -399, -399, -16, 126, 127, -399, -399, -399, - 128, 70, -15, 159, 214, -36, -399, 128, 28, -399, - -399, -399, -399, 131, -399, 56, -399, -399, -399, -399, - -399, 56, 56, 56, 56, 56, 56, -399, -399, -399, - -399, 27, 38, 76, -9, 135, 56, 60, 136, -399, - -399, -399, -399, -399, -399, -399, -399, -399, -16, 56, - 147, -399, -399, -399, -399, 137, -399, -399, -399, -399, - -399, -399, -399, 148, -399, -399, 18, 225, -399, 141, - 142, -16, 144, -399, 145, -399, -399, 50, -399, -399, - 131, -399, 146, 149, 150, 187, 7, 151, 43, 152, - 69, 85, -1, 153, 131, -399, -399, -399, -399, -399, - -399, -399, -399, -399, -399, 190, -399, 50, -399, 155, - -399, -399, 131, 156, 158, -399, 20, -399, -399, -399, - -399, -8, 160, 162, -399, 161, -399, -399, -399, -399, - -399, -399, 163, 56, 56, 169, 173, 171, 56, -399, - -399, -399, -399, 234, 240, 252, -399, -399, -399, -399, - 254, -399, -399, -399, -399, 211, 254, 2, 170, 257, - -399, 174, -399, 131, 12, -399, -399, -399, 258, 253, - -5, 175, -399, 262, -399, 263, 262, -399, 56, -399, - -399, 177, -399, -399, 185, 56, 56, 176, -399, -399, - -399, -399, -399, -399, 180, 183, 184, -399, 186, -399, - 189, -399, 191, -399, 192, -399, 194, -399, -399, -399, - -399, -399, -399, -399, 270, -399, -399, -399, 271, -399, - -399, -399, -399, -399, -399, -399, 195, -399, -399, -399, - -399, 143, 272, -399, 196, -399, 197, 198, 34, -399, - -399, 101, -399, 201, -4, 202, -12, 274, -399, 111, - 56, -399, -399, 241, 84, 69, -399, 203, -399, 204, - -399, -399, -399, -399, -399, -399, -399, 205, -399, -399, - -399, 56, -399, 277, 288, -399, 56, -399, -399, -399, - 56, 80, 76, 35, -399, -399, -399, -399, -399, -399, - -399, -399, 206, -399, -399, -399, -399, -399, -399, -399, - -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, - -399, 280, -399, -399, 14, -399, -399, -399, 39, -399, - -399, -399, -399, 209, 210, 212, 213, -399, 261, -12, - -399, -399, -399, -399, -399, -399, 56, -399, 56, 171, - 234, 240, 219, -399, -399, 208, 221, 222, 224, 215, - 226, 227, 272, -399, 56, 111, -399, 234, -399, 240, - -13, -399, -399, -399, -399, 272, 228, -399 + 62, -403, -403, 41, -403, -403, 81, -36, -403, 198, + -8, -403, -5, 18, 20, 35, -403, -403, -23, -23, + -23, -23, -23, -23, 45, 131, -23, -23, -403, 58, + -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, + -403, -403, 67, -403, -403, -403, -403, -403, -403, -403, + -403, -403, 63, 86, 92, 128, 84, 63, 99, -403, + 69, 133, -403, 87, 89, 129, 145, 146, -403, 147, + 154, -403, -403, -403, -13, 150, 151, -403, -403, -403, + 152, 162, -14, 197, 240, -34, -403, 152, 98, -403, + -403, -403, -403, 155, -403, 131, -403, -403, -403, -403, + -403, 131, 131, 131, 131, 131, 131, -403, -403, -403, + -403, 72, 105, 77, 17, 156, 12, 131, 68, 157, + -403, -403, -403, -403, -403, -403, -403, -403, -403, 12, + 131, 165, -403, -403, -403, -403, 158, -403, -403, -403, + -403, -403, -403, -403, 223, -403, -403, -16, 245, -403, + 163, 164, -9, 167, -403, 168, -403, -403, 55, -403, + -403, 155, -403, 170, 171, 172, 206, 2, 173, 34, + 174, 127, 112, 1, 175, 155, -403, -403, -403, -403, + -403, -403, -403, -403, -403, -403, 207, -403, 55, -403, + 177, -403, -403, 155, 178, 179, -403, 68, 22, -403, + -403, -403, -403, -6, 169, 182, -403, 180, -403, -403, + -403, -403, -403, -403, 181, 131, 131, 12, -403, 188, + 190, 195, 131, -403, -403, -403, -403, 272, 273, 274, + -403, -403, -403, -403, 275, -403, -403, -403, -403, 232, + 275, 79, 191, 277, -403, 192, -403, 155, 15, -403, + -403, -403, 280, 276, 8, 194, -403, 283, -403, 284, + 283, -403, 199, 131, -403, -403, 200, -403, -403, 209, + 131, 131, 201, -403, -403, -403, -403, 204, -403, -403, + 205, 210, 211, -403, 203, -403, 212, -403, 213, -403, + 214, -403, 215, -403, -403, -403, -403, -403, -403, -403, + 286, -403, -403, -403, 294, -403, -403, -403, -403, -403, + -403, -403, 216, -403, -403, -403, -403, 161, 297, -403, + 217, -403, 218, 219, -403, 76, -403, -403, 139, -403, + 227, -4, 228, 30, -403, 298, -403, 137, 131, -403, + -403, 265, 130, 127, -403, 220, -403, 226, -403, -403, + -403, -403, -403, -403, -403, 229, -403, -403, -403, 131, + -403, 315, 319, -403, 131, -403, -403, -403, 131, 123, + 77, 80, -403, -403, -403, -403, -403, -403, -403, -403, + 233, -403, -403, -403, -403, -403, -403, -403, -403, -403, + -403, -403, -403, -403, -403, -403, -403, -403, -403, 311, + -403, -403, 9, -403, -403, -403, 83, -403, -403, -403, + -403, 237, 238, 239, 241, -403, 281, 30, -403, -403, + -403, -403, -403, -403, 131, -403, 131, 195, 272, 273, + 242, -403, -403, 234, 246, 247, 248, 243, 249, 251, + 297, -403, 131, 137, -403, 272, -403, 273, 36, -403, + -403, -403, -403, 297, 250, -403 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, - -399, -399, -399, -399, -399, -399, -399, -399, -399, -100, - -98, -399, -97, -91, 188, -399, -399, -344, -399, -99, - -399, -399, -399, -399, -399, -399, -399, -399, 134, -399, - -399, -399, -399, -399, -399, -399, 259, -399, -399, -399, - 83, -399, -399, -399, -399, -399, -399, -399, -399, -399, - -399, -69, -399, -84, -399, -399, -399, -399, -399, -399, - -399, -399, -399, -399, -399, -317, 106, -399, -399, -399, - -399, -399, -399, -399, -399, -399, -399, -399, -399, -19, - -399, -399, -398, -399, -399, -399, -399, -399, -399, 260, - -399, -399, -399, -399, -399, -399, -399, -377, -381, 265, - -399, -399, 193, -83, -113, -85, -399, -399, -399, -399, - 289, -399, 264, -399, -399, -399, -165, 164, -150, -399, - -399, -399, -399, -399, -399 + -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, + -403, -403, -403, -403, -403, -403, -403, -403, -403, -74, + -81, -403, -98, 141, -82, 160, -403, -403, -358, -403, + -41, -403, -403, -403, -403, -403, -403, -403, -403, 166, + -403, -403, -403, 176, -403, -403, -403, 282, -403, -403, + -403, 103, -403, -403, -403, -403, -403, -403, -403, -403, + -403, -403, -52, -403, -84, -403, -403, -403, -403, -403, + -403, -403, -403, -403, -403, -403, -333, 126, -403, -403, + -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, + -3, -403, -403, -402, -403, -403, -403, -403, -403, -403, + 285, -403, -403, -403, -403, -403, -403, -403, -398, -392, + 287, -403, -403, -145, -83, -114, -85, -403, -403, -403, + -403, 314, -403, 291, -403, -403, -403, -167, 187, -149, + -403, -403, -403, -403, -403, -403 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -219 +#define YYTABLE_NINF -222 static const yytype_int16 yytable[] = { - 143, 137, 141, 196, 149, 237, 153, 109, 110, 156, - 222, 152, 403, 154, 155, 260, 151, 393, 151, 357, - 187, 151, 111, 111, 250, 245, 112, 287, 188, 202, - 309, 143, 58, 288, 440, 289, 227, 113, 203, 287, - 431, 189, 254, 429, 190, 288, 112, 446, 5, 310, - 361, 191, 215, 300, 301, 144, 157, 113, 444, 7, - 443, 362, 10, 228, 158, 192, 59, 145, 231, 246, - 232, 290, 162, 291, 426, 71, 72, 415, 116, 208, - 114, 114, 233, 115, 163, 291, 209, 159, 193, 194, - 441, 68, 445, 299, 302, 358, 232, 397, 116, 71, - 72, 160, 116, 84, 164, 51, 165, 85, 233, 287, - 388, 219, 166, 77, 405, 288, 53, 271, 220, 167, - 168, 169, 270, 170, 389, 171, 406, 276, 258, 151, - 54, 88, 89, 238, 172, 259, 239, 240, 81, 90, - 241, 55, 351, 409, 390, 318, 56, 416, 242, 352, - 410, 173, 174, 68, 417, 291, 391, 1, 2, 78, - 197, 91, 92, 198, 199, 79, 243, 71, 72, 131, - 394, 206, 207, 143, 82, 325, 93, 11, 12, 13, - 324, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 384, 63, 64, 65, - 66, 67, 353, 354, 75, 76, 96, 97, 98, 99, - 341, 342, 343, 344, 58, 83, 95, 101, 102, 103, - 104, 105, 106, 107, 128, 129, 130, 134, 398, 386, - 147, 143, 366, 141, -62, 201, 204, 205, 211, 213, - 214, 226, 217, 218, 274, 223, 251, 277, 224, 225, - 230, 236, 248, 279, 253, 255, 143, 256, 265, 404, - 266, 324, 272, 269, 267, 281, -218, 283, 285, 294, - 295, 305, 307, 298, 312, 313, 315, 319, 320, 327, - 326, 329, 330, 336, 338, 346, 331, 371, 387, 332, - 399, 333, 334, 425, 335, 340, 348, 349, 350, 356, - 360, 401, 412, 395, 396, 397, 411, 418, 419, 427, - 437, 420, 421, 433, 143, 366, 141, 422, 432, 434, - 435, 143, 439, 324, 436, 264, 438, 442, 447, 317, - 424, 132, 286, 408, 216, 138, 87, 133, 0, 324, - 139, 252 + 144, 138, 142, 198, 241, 154, 411, 220, 157, 401, + 109, 110, 226, 150, 109, 110, 152, 265, 152, 365, + 153, 152, 155, 156, 111, 111, 254, 249, 112, 111, + 437, 231, 144, 118, 293, 109, 110, 439, 448, 113, + 294, 5, 58, 315, 258, 210, 188, 451, 205, 112, + 111, 454, 211, 112, 189, 452, 306, 307, 232, 235, + 113, 236, 316, 10, 113, 1, 2, 190, 434, 423, + 191, 250, 220, 237, 112, 197, 59, 192, 71, 72, + 297, 117, 114, 114, 449, 113, 115, 114, 204, 7, + 115, 193, 369, 68, 53, 366, 116, 308, 305, 51, + 217, 158, 117, 370, 293, 165, 117, 166, 114, 159, + 294, 115, 295, 167, 194, 195, 223, 54, 276, 55, + 168, 169, 170, 224, 171, 145, 172, 117, 88, 89, + 263, 152, 160, 275, 56, 173, 90, 146, 264, 163, + 282, 453, 71, 72, 68, 117, 161, 405, 296, 325, + 297, 164, 174, 175, 236, 293, 396, 413, 91, 92, + 242, 294, 79, 243, 244, 77, 237, 245, 199, 414, + 397, 200, 201, 93, 78, 246, 402, 95, 144, 63, + 64, 65, 66, 67, 359, 331, 75, 76, 417, 332, + 398, 424, 360, 247, 84, 101, 418, 102, 85, 425, + 81, 297, 399, 11, 12, 13, 82, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 381, 382, 383, 384, 385, 386, 387, 388, 389, + 390, 391, 392, 96, 97, 98, 99, 103, 349, 350, + 351, 352, 83, 71, 72, 406, 208, 209, 144, 374, + 142, 361, 362, 104, 105, 106, 394, 107, 129, 130, + 131, 132, 58, 135, 206, 148, -65, 203, 213, 207, + 230, 215, 216, 255, 144, 221, 222, 270, 280, 331, + 227, 228, 229, 234, 240, 252, 412, 257, 259, 260, + 271, 278, 274, -221, 272, 283, 285, 287, 289, 291, + 301, 300, 304, 311, 318, 313, 319, 321, 324, 344, + 433, 326, 327, 334, 339, 335, 333, 346, 337, 338, + 354, 379, 395, 340, 341, 342, 343, 348, 356, 357, + 358, 403, 144, 374, 142, 364, 368, 404, 407, 144, + 405, 331, 409, 420, 419, 426, 427, 430, 445, 428, + 441, 429, 440, 435, 442, 443, 447, 331, 277, 444, + 446, 455, 450, 323, 133, 432, 292, 416, 0, 269, + 139, 87, 140, 262, 134, 256 }; static const yytype_int16 yycheck[] = { - 85, 85, 85, 116, 95, 170, 103, 23, 24, 106, - 160, 102, 356, 104, 105, 23, 101, 334, 103, 23, - 29, 106, 38, 38, 174, 26, 62, 25, 37, 128, - 35, 116, 65, 31, 432, 33, 29, 73, 129, 25, - 421, 50, 192, 420, 53, 31, 62, 445, 0, 54, - 62, 60, 151, 41, 42, 27, 29, 73, 439, 8, - 437, 73, 99, 56, 37, 74, 99, 39, 25, 70, - 27, 69, 34, 71, 418, 111, 112, 394, 114, 61, - 96, 96, 39, 99, 46, 71, 68, 60, 97, 98, - 434, 99, 105, 243, 82, 99, 27, 110, 114, 111, - 112, 74, 114, 109, 28, 107, 30, 113, 39, 25, - 26, 61, 36, 107, 34, 31, 99, 214, 68, 43, - 44, 45, 213, 47, 40, 49, 46, 218, 108, 214, - 99, 29, 30, 48, 58, 115, 51, 52, 113, 37, - 55, 99, 108, 108, 60, 258, 99, 108, 63, 115, - 115, 75, 76, 99, 115, 71, 72, 3, 4, 107, - 100, 59, 60, 103, 104, 99, 81, 111, 112, 99, - 335, 23, 24, 258, 113, 266, 74, 5, 6, 7, - 265, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 19, 20, 21, - 22, 23, 111, 112, 26, 27, 100, 101, 102, 103, - 77, 78, 79, 80, 65, 113, 108, 108, 108, 108, - 108, 108, 108, 103, 108, 108, 108, 23, 351, 330, - 109, 326, 326, 326, 109, 109, 99, 110, 23, 108, - 108, 64, 108, 108, 83, 109, 66, 23, 109, 109, - 109, 109, 109, 23, 109, 109, 351, 109, 108, 360, - 108, 356, 103, 110, 113, 23, 103, 23, 67, 109, - 23, 23, 29, 109, 109, 23, 23, 110, 103, 109, - 114, 108, 108, 23, 23, 23, 110, 23, 57, 110, - 23, 110, 110, 416, 110, 110, 110, 110, 110, 108, - 108, 23, 32, 110, 110, 110, 110, 108, 108, 419, - 105, 109, 109, 115, 409, 409, 409, 66, 109, 108, - 108, 416, 105, 418, 110, 201, 110, 435, 110, 256, - 409, 82, 236, 362, 151, 85, 57, 83, -1, 434, - 85, 187 + 85, 85, 85, 117, 171, 103, 364, 152, 106, 342, + 23, 24, 161, 95, 23, 24, 101, 23, 103, 23, + 102, 106, 104, 105, 38, 38, 175, 26, 62, 38, + 428, 29, 117, 74, 25, 23, 24, 429, 440, 73, + 31, 0, 65, 35, 193, 61, 29, 445, 130, 62, + 38, 453, 68, 62, 37, 447, 41, 42, 56, 25, + 73, 27, 54, 99, 73, 3, 4, 50, 426, 402, + 53, 70, 217, 39, 62, 116, 99, 60, 112, 113, + 71, 115, 96, 96, 442, 73, 99, 96, 129, 8, + 99, 74, 62, 99, 99, 99, 109, 82, 247, 107, + 109, 29, 115, 73, 25, 28, 115, 30, 96, 37, + 31, 99, 33, 36, 97, 98, 61, 99, 216, 99, + 43, 44, 45, 68, 47, 27, 49, 115, 29, 30, + 108, 216, 60, 215, 99, 58, 37, 39, 116, 34, + 222, 105, 112, 113, 99, 115, 74, 111, 69, 263, + 71, 46, 75, 76, 27, 25, 26, 34, 59, 60, + 48, 31, 99, 51, 52, 107, 39, 55, 100, 46, + 40, 103, 104, 74, 107, 63, 343, 108, 263, 19, + 20, 21, 22, 23, 108, 270, 26, 27, 108, 271, + 60, 108, 116, 81, 110, 108, 116, 108, 114, 116, + 114, 71, 72, 5, 6, 7, 114, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 100, 101, 102, 103, 108, 77, 78, + 79, 80, 114, 112, 113, 359, 23, 24, 333, 333, + 333, 112, 113, 108, 108, 108, 338, 103, 108, 108, + 108, 99, 65, 23, 99, 110, 110, 110, 23, 111, + 64, 108, 108, 66, 359, 108, 108, 108, 83, 364, + 110, 110, 110, 110, 110, 110, 368, 110, 110, 110, + 108, 103, 111, 103, 114, 23, 23, 23, 23, 67, + 23, 110, 110, 23, 110, 29, 23, 23, 109, 23, + 424, 111, 103, 109, 111, 110, 115, 23, 108, 108, + 23, 23, 57, 111, 111, 111, 111, 111, 111, 111, + 111, 111, 417, 417, 417, 108, 108, 111, 23, 424, + 111, 426, 23, 32, 111, 108, 108, 66, 105, 110, + 116, 110, 110, 427, 108, 108, 105, 442, 217, 111, + 111, 111, 443, 260, 82, 417, 240, 370, -1, 203, + 85, 57, 85, 197, 83, 188 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 3, 4, 117, 118, 0, 119, 8, 120, 121, + 0, 3, 4, 118, 119, 0, 120, 8, 121, 122, 99, 5, 6, 7, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 137, 160, 161, 168, 169, 170, 232, 234, 237, - 250, 107, 235, 99, 99, 99, 99, 233, 65, 99, - 140, 146, 238, 140, 140, 140, 140, 140, 99, 141, - 154, 111, 112, 139, 231, 140, 140, 107, 107, 99, - 236, 113, 113, 113, 109, 113, 172, 236, 29, 30, - 37, 59, 60, 74, 239, 108, 100, 101, 102, 103, - 159, 108, 108, 108, 108, 108, 108, 103, 156, 23, - 24, 38, 62, 73, 96, 99, 114, 145, 147, 162, - 176, 179, 215, 219, 222, 226, 228, 229, 108, 108, - 108, 99, 162, 238, 23, 171, 175, 179, 215, 225, - 227, 229, 230, 231, 27, 39, 240, 109, 244, 139, - 138, 231, 139, 138, 139, 139, 138, 29, 37, 60, - 74, 167, 34, 46, 28, 30, 36, 43, 44, 45, - 47, 49, 58, 75, 76, 180, 182, 185, 187, 189, - 193, 196, 198, 200, 202, 205, 214, 29, 37, 50, - 53, 60, 74, 97, 98, 163, 230, 100, 103, 104, - 158, 109, 145, 139, 99, 110, 23, 24, 61, 68, - 241, 23, 247, 108, 108, 145, 228, 108, 108, 61, - 68, 243, 244, 109, 109, 109, 64, 29, 56, 197, - 109, 25, 27, 39, 186, 242, 109, 242, 48, 51, - 52, 55, 63, 81, 209, 26, 70, 201, 109, 246, - 244, 66, 243, 109, 244, 109, 109, 165, 108, 115, - 23, 148, 149, 150, 154, 108, 108, 113, 173, 110, - 139, 138, 103, 157, 83, 135, 139, 23, 223, 23, - 224, 23, 199, 23, 192, 67, 192, 25, 31, 33, - 69, 71, 181, 191, 109, 23, 210, 211, 109, 244, - 41, 42, 82, 206, 207, 23, 249, 29, 190, 35, - 54, 194, 109, 23, 166, 23, 164, 166, 230, 110, - 103, 155, 142, 143, 231, 139, 114, 109, 245, 108, - 108, 110, 110, 110, 110, 110, 23, 213, 23, 212, - 110, 77, 78, 79, 80, 195, 23, 208, 110, 110, - 110, 108, 115, 111, 112, 151, 108, 23, 99, 144, - 108, 62, 73, 174, 177, 178, 179, 216, 217, 220, - 225, 23, 248, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 136, 139, 57, 26, 40, - 60, 72, 183, 191, 242, 110, 110, 110, 230, 23, - 152, 23, 153, 143, 139, 34, 46, 203, 205, 108, - 115, 110, 32, 184, 188, 191, 108, 115, 108, 108, - 109, 109, 66, 204, 177, 230, 143, 135, 218, 223, - 221, 224, 109, 115, 108, 108, 110, 105, 110, 105, - 208, 143, 136, 223, 224, 105, 208, 110 + 15, 16, 17, 18, 19, 20, 21, 22, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 138, 162, 163, 170, 171, 172, 234, 236, 239, + 252, 107, 237, 99, 99, 99, 99, 235, 65, 99, + 142, 148, 240, 142, 142, 142, 142, 142, 99, 143, + 156, 112, 113, 141, 233, 142, 142, 107, 107, 99, + 238, 114, 114, 114, 110, 114, 174, 238, 29, 30, + 37, 59, 60, 74, 241, 108, 100, 101, 102, 103, + 161, 108, 108, 108, 108, 108, 108, 103, 158, 23, + 24, 38, 62, 73, 96, 99, 109, 115, 147, 149, + 164, 178, 181, 217, 221, 224, 228, 230, 231, 108, + 108, 108, 99, 164, 240, 23, 173, 177, 181, 217, + 227, 229, 231, 232, 233, 27, 39, 242, 110, 246, + 141, 139, 233, 141, 139, 141, 141, 139, 29, 37, + 60, 74, 169, 34, 46, 28, 30, 36, 43, 44, + 45, 47, 49, 58, 75, 76, 182, 184, 187, 189, + 191, 195, 198, 200, 202, 204, 207, 216, 29, 37, + 50, 53, 60, 74, 97, 98, 165, 147, 232, 100, + 103, 104, 160, 110, 147, 141, 99, 111, 23, 24, + 61, 68, 243, 23, 249, 108, 108, 109, 140, 147, + 230, 108, 108, 61, 68, 245, 246, 110, 110, 110, + 64, 29, 56, 199, 110, 25, 27, 39, 188, 244, + 110, 244, 48, 51, 52, 55, 63, 81, 211, 26, + 70, 203, 110, 248, 246, 66, 245, 110, 246, 110, + 110, 167, 160, 108, 116, 23, 150, 151, 152, 156, + 108, 108, 114, 175, 111, 141, 139, 140, 103, 159, + 83, 136, 141, 23, 225, 23, 226, 23, 201, 23, + 194, 67, 194, 25, 31, 33, 69, 71, 183, 193, + 110, 23, 212, 213, 110, 246, 41, 42, 82, 208, + 209, 23, 251, 29, 192, 35, 54, 196, 110, 23, + 168, 23, 166, 168, 109, 232, 111, 103, 157, 144, + 145, 233, 141, 115, 109, 110, 247, 108, 108, 111, + 111, 111, 111, 111, 23, 215, 23, 214, 111, 77, + 78, 79, 80, 197, 23, 210, 111, 111, 111, 108, + 116, 112, 113, 153, 108, 23, 99, 146, 108, 62, + 73, 176, 179, 180, 181, 218, 219, 222, 227, 23, + 250, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 137, 141, 57, 26, 40, 60, 72, + 185, 193, 244, 111, 111, 111, 232, 23, 154, 23, + 155, 145, 141, 34, 46, 205, 207, 108, 116, 111, + 32, 186, 190, 193, 108, 116, 108, 108, 110, 110, + 66, 206, 179, 232, 145, 136, 220, 225, 223, 226, + 110, 116, 108, 108, 111, 105, 111, 105, 210, 145, + 137, 225, 226, 105, 210, 111 }; #define yyerrok (yyerrstatus = 0) @@ -2445,32 +2457,61 @@ yyreduce: /* Line 1455 of yacc.c */ #line 527 "program_parse.y" { - (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); + (yyval.src_reg) = (yyvsp[(2) - (2)].src_reg); - if ((yyvsp[(1) - (3)].negate)) { + if ((yyvsp[(1) - (2)].negate)) { + (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate; + } + ;} + break; + + case 48: + +/* Line 1455 of yacc.c */ +#line 535 "program_parse.y" + { + (yyval.src_reg) = (yyvsp[(3) - (4)].src_reg); + + if (!state->option.NV_fragment) { + yyerror(& (yylsp[(2) - (4)]), state, "unexpected character '|'"); + YYERROR; + } + + if ((yyvsp[(1) - (4)].negate)) { (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate; } + (yyval.src_reg).Base.Abs = 1; + ;} + break; + + case 49: + +/* Line 1455 of yacc.c */ +#line 552 "program_parse.y" + { + (yyval.src_reg) = (yyvsp[(1) - (2)].src_reg); + (yyval.src_reg).Base.Swizzle = _mesa_combine_swizzles((yyval.src_reg).Base.Swizzle, - (yyvsp[(3) - (3)].swiz_mask).swizzle); + (yyvsp[(2) - (2)].swiz_mask).swizzle); ;} break; - case 48: + case 50: /* Line 1455 of yacc.c */ -#line 538 "program_parse.y" +#line 559 "program_parse.y" { struct asm_symbol temp_sym; if (!state->option.NV_fragment) { - yyerror(& (yylsp[(2) - (2)]), state, "expected scalar suffix"); + yyerror(& (yylsp[(1) - (1)]), state, "expected scalar suffix"); YYERROR; } memset(& temp_sym, 0, sizeof(temp_sym)); temp_sym.param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & temp_sym, & (yyvsp[(2) - (2)].vector)); + initialize_symbol_from_const(state->prog, & temp_sym, & (yyvsp[(1) - (1)].vector)); init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = PROGRAM_CONSTANT; @@ -2478,10 +2519,10 @@ yyreduce: ;} break; - case 49: + case 51: /* Line 1455 of yacc.c */ -#line 557 "program_parse.y" +#line 578 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2494,10 +2535,32 @@ yyreduce: ;} break; - case 50: + case 52: + +/* Line 1455 of yacc.c */ +#line 589 "program_parse.y" + { + (yyval.src_reg) = (yyvsp[(3) - (5)].src_reg); + + if (!state->option.NV_fragment) { + yyerror(& (yylsp[(2) - (5)]), state, "unexpected character '|'"); + YYERROR; + } + + if ((yyvsp[(1) - (5)].negate)) { + (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate; + } + + (yyval.src_reg).Base.Abs = 1; + (yyval.src_reg).Base.Swizzle = _mesa_combine_swizzles((yyval.src_reg).Base.Swizzle, + (yyvsp[(4) - (5)].swiz_mask).swizzle); + ;} + break; + + case 53: /* Line 1455 of yacc.c */ -#line 570 "program_parse.y" +#line 609 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask; @@ -2519,10 +2582,10 @@ yyreduce: ;} break; - case 51: + case 54: /* Line 1455 of yacc.c */ -#line 592 "program_parse.y" +#line 631 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_ADDRESS; @@ -2531,10 +2594,10 @@ yyreduce: ;} break; - case 52: + case 55: /* Line 1455 of yacc.c */ -#line 601 "program_parse.y" +#line 640 "program_parse.y" { const unsigned xyzw_valid = ((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0) @@ -2567,20 +2630,20 @@ yyreduce: ;} break; - case 53: + case 56: /* Line 1455 of yacc.c */ -#line 634 "program_parse.y" +#line 673 "program_parse.y" { (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); (yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0; ;} break; - case 54: + case 57: /* Line 1455 of yacc.c */ -#line 641 "program_parse.y" +#line 680 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2597,10 +2660,10 @@ yyreduce: ;} break; - case 55: + case 58: /* Line 1455 of yacc.c */ -#line 656 "program_parse.y" +#line 695 "program_parse.y" { if (strlen((yyvsp[(1) - (1)].string)) > 1) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2650,10 +2713,10 @@ yyreduce: ;} break; - case 56: + case 59: /* Line 1455 of yacc.c */ -#line 706 "program_parse.y" +#line 745 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2697,10 +2760,10 @@ yyreduce: ;} break; - case 57: + case 60: /* Line 1455 of yacc.c */ -#line 748 "program_parse.y" +#line 787 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = PROGRAM_INPUT; @@ -2713,10 +2776,10 @@ yyreduce: ;} break; - case 58: + case 61: /* Line 1455 of yacc.c */ -#line 759 "program_parse.y" +#line 798 "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)) { @@ -2739,10 +2802,10 @@ yyreduce: ;} break; - case 59: + case 62: /* Line 1455 of yacc.c */ -#line 780 "program_parse.y" +#line 819 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = ((yyvsp[(1) - (1)].temp_sym).name != NULL) @@ -2752,10 +2815,10 @@ yyreduce: ;} break; - case 60: + case 63: /* Line 1455 of yacc.c */ -#line 790 "program_parse.y" +#line 829 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_OUTPUT; @@ -2763,10 +2826,10 @@ yyreduce: ;} break; - case 61: + case 64: /* Line 1455 of yacc.c */ -#line 796 "program_parse.y" +#line 835 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2797,10 +2860,10 @@ yyreduce: ;} break; - case 62: + case 65: /* Line 1455 of yacc.c */ -#line 827 "program_parse.y" +#line 866 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2817,20 +2880,20 @@ yyreduce: ;} break; - case 65: + case 68: /* Line 1455 of yacc.c */ -#line 846 "program_parse.y" +#line 885 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer); ;} break; - case 66: + case 69: /* Line 1455 of yacc.c */ -#line 853 "program_parse.y" +#line 892 "program_parse.y" { /* FINISHME: Add support for multiple address registers. */ @@ -2842,31 +2905,31 @@ yyreduce: ;} break; - case 67: + case 70: /* Line 1455 of yacc.c */ -#line 864 "program_parse.y" +#line 903 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 68: + case 71: /* Line 1455 of yacc.c */ -#line 865 "program_parse.y" +#line 904 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 69: + case 72: /* Line 1455 of yacc.c */ -#line 866 "program_parse.y" +#line 905 "program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; - case 70: + case 73: /* Line 1455 of yacc.c */ -#line 870 "program_parse.y" +#line 909 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2878,10 +2941,10 @@ yyreduce: ;} break; - case 71: + case 74: /* Line 1455 of yacc.c */ -#line 882 "program_parse.y" +#line 921 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2893,10 +2956,10 @@ yyreduce: ;} break; - case 72: + case 75: /* Line 1455 of yacc.c */ -#line 894 "program_parse.y" +#line 933 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2914,10 +2977,10 @@ yyreduce: ;} break; - case 73: + case 76: /* Line 1455 of yacc.c */ -#line 912 "program_parse.y" +#line 951 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); @@ -2928,10 +2991,10 @@ yyreduce: ;} break; - case 74: + case 77: /* Line 1455 of yacc.c */ -#line 923 "program_parse.y" +#line 962 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2943,24 +3006,24 @@ yyreduce: ;} break; - case 79: + case 82: /* Line 1455 of yacc.c */ -#line 939 "program_parse.y" +#line 978 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; - case 84: + case 87: /* Line 1455 of yacc.c */ -#line 943 "program_parse.y" +#line 982 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; - case 91: + case 94: /* Line 1455 of yacc.c */ -#line 955 "program_parse.y" +#line 994 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); @@ -2978,55 +3041,55 @@ yyreduce: ;} break; - case 92: + case 95: /* Line 1455 of yacc.c */ -#line 973 "program_parse.y" +#line 1012 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} break; - case 93: + case 96: /* Line 1455 of yacc.c */ -#line 977 "program_parse.y" +#line 1016 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} break; - case 94: + case 97: /* Line 1455 of yacc.c */ -#line 983 "program_parse.y" +#line 1022 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; ;} break; - case 95: + case 98: /* Line 1455 of yacc.c */ -#line 987 "program_parse.y" +#line 1026 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; ;} break; - case 96: + case 99: /* Line 1455 of yacc.c */ -#line 991 "program_parse.y" +#line 1030 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; ;} break; - case 97: + case 100: /* Line 1455 of yacc.c */ -#line 995 "program_parse.y" +#line 1034 "program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); @@ -3037,10 +3100,10 @@ yyreduce: ;} break; - case 98: + case 101: /* Line 1455 of yacc.c */ -#line 1004 "program_parse.y" +#line 1043 "program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); @@ -3051,38 +3114,38 @@ yyreduce: ;} break; - case 99: + case 102: /* Line 1455 of yacc.c */ -#line 1013 "program_parse.y" +#line 1052 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} break; - case 100: + case 103: /* Line 1455 of yacc.c */ -#line 1017 "program_parse.y" +#line 1056 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; ;} break; - case 101: + case 104: /* Line 1455 of yacc.c */ -#line 1022 "program_parse.y" +#line 1061 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); ;} break; - case 102: + case 105: /* Line 1455 of yacc.c */ -#line 1028 "program_parse.y" +#line 1067 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); @@ -3093,46 +3156,46 @@ yyreduce: ;} break; - case 106: + case 109: /* Line 1455 of yacc.c */ -#line 1042 "program_parse.y" +#line 1081 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; ;} break; - case 107: + case 110: /* Line 1455 of yacc.c */ -#line 1046 "program_parse.y" +#line 1085 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); ;} break; - case 108: + case 111: /* Line 1455 of yacc.c */ -#line 1050 "program_parse.y" +#line 1089 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; ;} break; - case 109: + case 112: /* Line 1455 of yacc.c */ -#line 1054 "program_parse.y" +#line 1093 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} break; - case 112: + case 115: /* Line 1455 of yacc.c */ -#line 1062 "program_parse.y" +#line 1101 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); @@ -3148,10 +3211,10 @@ yyreduce: ;} break; - case 113: + case 116: /* Line 1455 of yacc.c */ -#line 1078 "program_parse.y" +#line 1117 "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, @@ -3173,19 +3236,19 @@ yyreduce: ;} break; - case 114: + case 117: /* Line 1455 of yacc.c */ -#line 1100 "program_parse.y" +#line 1139 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 115: + case 118: /* Line 1455 of yacc.c */ -#line 1104 "program_parse.y" +#line 1143 "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"); @@ -3196,38 +3259,38 @@ yyreduce: ;} break; - case 116: + case 119: /* Line 1455 of yacc.c */ -#line 1115 "program_parse.y" +#line 1154 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); ;} break; - case 117: + case 120: /* Line 1455 of yacc.c */ -#line 1121 "program_parse.y" +#line 1160 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); ;} break; - case 119: + case 122: /* Line 1455 of yacc.c */ -#line 1128 "program_parse.y" +#line 1167 "program_parse.y" { (yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length; (yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym); ;} break; - case 120: + case 123: /* Line 1455 of yacc.c */ -#line 1135 "program_parse.y" +#line 1174 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3235,10 +3298,10 @@ yyreduce: ;} break; - case 121: + case 124: /* Line 1455 of yacc.c */ -#line 1141 "program_parse.y" +#line 1180 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3246,10 +3309,10 @@ yyreduce: ;} break; - case 122: + case 125: /* Line 1455 of yacc.c */ -#line 1147 "program_parse.y" +#line 1186 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3257,10 +3320,10 @@ yyreduce: ;} break; - case 123: + case 126: /* Line 1455 of yacc.c */ -#line 1155 "program_parse.y" +#line 1194 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3268,10 +3331,10 @@ yyreduce: ;} break; - case 124: + case 127: /* Line 1455 of yacc.c */ -#line 1161 "program_parse.y" +#line 1200 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3279,10 +3342,10 @@ yyreduce: ;} break; - case 125: + case 128: /* Line 1455 of yacc.c */ -#line 1167 "program_parse.y" +#line 1206 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3290,10 +3353,10 @@ yyreduce: ;} break; - case 126: + case 129: /* Line 1455 of yacc.c */ -#line 1175 "program_parse.y" +#line 1214 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3301,10 +3364,10 @@ yyreduce: ;} break; - case 127: + case 130: /* Line 1455 of yacc.c */ -#line 1181 "program_parse.y" +#line 1220 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3312,10 +3375,10 @@ yyreduce: ;} break; - case 128: + case 131: /* Line 1455 of yacc.c */ -#line 1187 "program_parse.y" +#line 1226 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3323,101 +3386,101 @@ yyreduce: ;} break; - case 129: + case 132: /* Line 1455 of yacc.c */ -#line 1194 "program_parse.y" +#line 1233 "program_parse.y" { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; - case 130: + case 133: /* Line 1455 of yacc.c */ -#line 1195 "program_parse.y" +#line 1234 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 131: + case 134: /* Line 1455 of yacc.c */ -#line 1198 "program_parse.y" +#line 1237 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 132: + case 135: /* Line 1455 of yacc.c */ -#line 1199 "program_parse.y" +#line 1238 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 133: + case 136: /* Line 1455 of yacc.c */ -#line 1200 "program_parse.y" +#line 1239 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 134: + case 137: /* Line 1455 of yacc.c */ -#line 1201 "program_parse.y" +#line 1240 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 135: + case 138: /* Line 1455 of yacc.c */ -#line 1202 "program_parse.y" +#line 1241 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 136: + case 139: /* Line 1455 of yacc.c */ -#line 1203 "program_parse.y" +#line 1242 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 137: + case 140: /* Line 1455 of yacc.c */ -#line 1204 "program_parse.y" +#line 1243 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 138: + case 141: /* Line 1455 of yacc.c */ -#line 1205 "program_parse.y" +#line 1244 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 139: + case 142: /* Line 1455 of yacc.c */ -#line 1206 "program_parse.y" +#line 1245 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 140: + case 143: /* Line 1455 of yacc.c */ -#line 1207 "program_parse.y" +#line 1246 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 141: + case 144: /* Line 1455 of yacc.c */ -#line 1208 "program_parse.y" +#line 1247 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 142: + case 145: /* Line 1455 of yacc.c */ -#line 1212 "program_parse.y" +#line 1251 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3426,37 +3489,37 @@ yyreduce: ;} break; - case 143: + case 146: /* Line 1455 of yacc.c */ -#line 1221 "program_parse.y" +#line 1260 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 144: + case 147: /* Line 1455 of yacc.c */ -#line 1225 "program_parse.y" +#line 1264 "program_parse.y" { (yyval.integer) = STATE_EMISSION; ;} break; - case 145: + case 148: /* Line 1455 of yacc.c */ -#line 1229 "program_parse.y" +#line 1268 "program_parse.y" { (yyval.integer) = STATE_SHININESS; ;} break; - case 146: + case 149: /* Line 1455 of yacc.c */ -#line 1235 "program_parse.y" +#line 1274 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3465,28 +3528,28 @@ yyreduce: ;} break; - case 147: + case 150: /* Line 1455 of yacc.c */ -#line 1244 "program_parse.y" +#line 1283 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 148: + case 151: /* Line 1455 of yacc.c */ -#line 1248 "program_parse.y" +#line 1287 "program_parse.y" { (yyval.integer) = STATE_POSITION; ;} break; - case 149: + case 152: /* Line 1455 of yacc.c */ -#line 1252 "program_parse.y" +#line 1291 "program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); @@ -3497,57 +3560,57 @@ yyreduce: ;} break; - case 150: + case 153: /* Line 1455 of yacc.c */ -#line 1261 "program_parse.y" +#line 1300 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 151: + case 154: /* Line 1455 of yacc.c */ -#line 1265 "program_parse.y" +#line 1304 "program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; ;} break; - case 152: + case 155: /* Line 1455 of yacc.c */ -#line 1271 "program_parse.y" +#line 1310 "program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; ;} break; - case 153: + case 156: /* Line 1455 of yacc.c */ -#line 1277 "program_parse.y" +#line 1316 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; ;} break; - case 154: + case 157: /* Line 1455 of yacc.c */ -#line 1284 "program_parse.y" +#line 1323 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; ;} break; - case 155: + case 158: /* Line 1455 of yacc.c */ -#line 1289 "program_parse.y" +#line 1328 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3555,10 +3618,10 @@ yyreduce: ;} break; - case 156: + case 159: /* Line 1455 of yacc.c */ -#line 1297 "program_parse.y" +#line 1336 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3568,10 +3631,10 @@ yyreduce: ;} break; - case 158: + case 161: /* Line 1455 of yacc.c */ -#line 1309 "program_parse.y" +#line 1348 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(3) - (3)].integer); @@ -3579,46 +3642,46 @@ yyreduce: ;} break; - case 159: + case 162: /* Line 1455 of yacc.c */ -#line 1317 "program_parse.y" +#line 1356 "program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; ;} break; - case 160: + case 163: /* Line 1455 of yacc.c */ -#line 1323 "program_parse.y" +#line 1362 "program_parse.y" { (yyval.integer) = STATE_AMBIENT; ;} break; - case 161: + case 164: /* Line 1455 of yacc.c */ -#line 1327 "program_parse.y" +#line 1366 "program_parse.y" { (yyval.integer) = STATE_DIFFUSE; ;} break; - case 162: + case 165: /* Line 1455 of yacc.c */ -#line 1331 "program_parse.y" +#line 1370 "program_parse.y" { (yyval.integer) = STATE_SPECULAR; ;} break; - case 163: + case 166: /* Line 1455 of yacc.c */ -#line 1337 "program_parse.y" +#line 1376 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); @@ -3629,10 +3692,10 @@ yyreduce: ;} break; - case 164: + case 167: /* Line 1455 of yacc.c */ -#line 1348 "program_parse.y" +#line 1387 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3641,92 +3704,92 @@ yyreduce: ;} break; - case 165: + case 168: /* Line 1455 of yacc.c */ -#line 1357 "program_parse.y" +#line 1396 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; ;} break; - case 166: + case 169: /* Line 1455 of yacc.c */ -#line 1361 "program_parse.y" +#line 1400 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; ;} break; - case 167: + case 170: /* Line 1455 of yacc.c */ -#line 1366 "program_parse.y" +#line 1405 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; ;} break; - case 168: + case 171: /* Line 1455 of yacc.c */ -#line 1370 "program_parse.y" +#line 1409 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; ;} break; - case 169: + case 172: /* Line 1455 of yacc.c */ -#line 1374 "program_parse.y" +#line 1413 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; ;} break; - case 170: + case 173: /* Line 1455 of yacc.c */ -#line 1378 "program_parse.y" +#line 1417 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; ;} break; - case 171: + case 174: /* Line 1455 of yacc.c */ -#line 1384 "program_parse.y" +#line 1423 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); ;} break; - case 172: + case 175: /* Line 1455 of yacc.c */ -#line 1391 "program_parse.y" +#line 1430 "program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; ;} break; - case 173: + case 176: /* Line 1455 of yacc.c */ -#line 1395 "program_parse.y" +#line 1434 "program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; ;} break; - case 174: + case 177: /* Line 1455 of yacc.c */ -#line 1401 "program_parse.y" +#line 1440 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3734,10 +3797,10 @@ yyreduce: ;} break; - case 175: + case 178: /* Line 1455 of yacc.c */ -#line 1409 "program_parse.y" +#line 1448 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); @@ -3748,38 +3811,38 @@ yyreduce: ;} break; - case 176: + case 179: /* Line 1455 of yacc.c */ -#line 1420 "program_parse.y" +#line 1459 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); ;} break; - case 177: + case 180: /* Line 1455 of yacc.c */ -#line 1427 "program_parse.y" +#line 1466 "program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; ;} break; - case 178: + case 181: /* Line 1455 of yacc.c */ -#line 1431 "program_parse.y" +#line 1470 "program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; ;} break; - case 179: + case 182: /* Line 1455 of yacc.c */ -#line 1437 "program_parse.y" +#line 1476 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; @@ -3789,10 +3852,10 @@ yyreduce: ;} break; - case 180: + case 183: /* Line 1455 of yacc.c */ -#line 1447 "program_parse.y" +#line 1486 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; @@ -3802,20 +3865,20 @@ yyreduce: ;} break; - case 181: + case 184: /* Line 1455 of yacc.c */ -#line 1457 "program_parse.y" +#line 1496 "program_parse.y" { (yyval.state)[2] = 0; (yyval.state)[3] = 3; ;} break; - case 182: + case 185: /* Line 1455 of yacc.c */ -#line 1462 "program_parse.y" +#line 1501 "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). @@ -3833,10 +3896,10 @@ yyreduce: ;} break; - case 183: + case 186: /* Line 1455 of yacc.c */ -#line 1480 "program_parse.y" +#line 1519 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; @@ -3844,55 +3907,55 @@ yyreduce: ;} break; - case 184: + case 187: /* Line 1455 of yacc.c */ -#line 1488 "program_parse.y" +#line 1527 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 185: + case 188: /* Line 1455 of yacc.c */ -#line 1492 "program_parse.y" +#line 1531 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 186: + case 189: /* Line 1455 of yacc.c */ -#line 1498 "program_parse.y" +#line 1537 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; ;} break; - case 187: + case 190: /* Line 1455 of yacc.c */ -#line 1502 "program_parse.y" +#line 1541 "program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; ;} break; - case 188: + case 191: /* Line 1455 of yacc.c */ -#line 1506 "program_parse.y" +#line 1545 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; ;} break; - case 189: + case 192: /* Line 1455 of yacc.c */ -#line 1512 "program_parse.y" +#line 1551 "program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); @@ -3903,88 +3966,88 @@ yyreduce: ;} break; - case 190: + case 193: /* Line 1455 of yacc.c */ -#line 1523 "program_parse.y" +#line 1562 "program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); ;} break; - case 191: + case 194: /* Line 1455 of yacc.c */ -#line 1528 "program_parse.y" +#line 1567 "program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; ;} break; - case 192: + case 195: /* Line 1455 of yacc.c */ -#line 1533 "program_parse.y" +#line 1572 "program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; ;} break; - case 193: + case 196: /* Line 1455 of yacc.c */ -#line 1538 "program_parse.y" +#line 1577 "program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); ;} break; - case 194: + case 197: /* Line 1455 of yacc.c */ -#line 1543 "program_parse.y" +#line 1582 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; ;} break; - case 195: + case 198: /* Line 1455 of yacc.c */ -#line 1548 "program_parse.y" +#line 1587 "program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[(3) - (4)].integer); ;} break; - case 196: + case 199: /* Line 1455 of yacc.c */ -#line 1555 "program_parse.y" +#line 1594 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 197: + case 200: /* Line 1455 of yacc.c */ -#line 1559 "program_parse.y" +#line 1598 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 198: + case 201: /* Line 1455 of yacc.c */ -#line 1564 "program_parse.y" +#line 1603 "program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -3998,10 +4061,10 @@ yyreduce: ;} break; - case 199: + case 202: /* Line 1455 of yacc.c */ -#line 1577 "program_parse.y" +#line 1616 "program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -4010,10 +4073,10 @@ yyreduce: ;} break; - case 200: + case 203: /* Line 1455 of yacc.c */ -#line 1585 "program_parse.y" +#line 1624 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); @@ -4024,20 +4087,20 @@ yyreduce: ;} break; - case 201: + case 204: /* Line 1455 of yacc.c */ -#line 1596 "program_parse.y" +#line 1635 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; ;} break; - case 206: + case 209: /* Line 1455 of yacc.c */ -#line 1608 "program_parse.y" +#line 1647 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4047,30 +4110,30 @@ yyreduce: ;} break; - case 207: + case 210: /* Line 1455 of yacc.c */ -#line 1618 "program_parse.y" +#line 1657 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); ;} break; - case 208: + case 211: /* Line 1455 of yacc.c */ -#line 1623 "program_parse.y" +#line 1662 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); ;} break; - case 209: + case 212: /* Line 1455 of yacc.c */ -#line 1630 "program_parse.y" +#line 1669 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4080,10 +4143,10 @@ yyreduce: ;} break; - case 210: + case 213: /* Line 1455 of yacc.c */ -#line 1640 "program_parse.y" +#line 1679 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4093,30 +4156,30 @@ yyreduce: ;} break; - case 211: + case 214: /* Line 1455 of yacc.c */ -#line 1649 "program_parse.y" +#line 1688 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); ;} break; - case 212: + case 215: /* Line 1455 of yacc.c */ -#line 1654 "program_parse.y" +#line 1693 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); ;} break; - case 213: + case 216: /* Line 1455 of yacc.c */ -#line 1661 "program_parse.y" +#line 1700 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4126,10 +4189,10 @@ yyreduce: ;} break; - case 214: + case 217: /* Line 1455 of yacc.c */ -#line 1671 "program_parse.y" +#line 1710 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); @@ -4139,10 +4202,10 @@ yyreduce: ;} break; - case 215: + case 218: /* Line 1455 of yacc.c */ -#line 1681 "program_parse.y" +#line 1720 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); @@ -4152,10 +4215,10 @@ yyreduce: ;} break; - case 220: + case 223: /* Line 1455 of yacc.c */ -#line 1696 "program_parse.y" +#line 1735 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4165,10 +4228,10 @@ yyreduce: ;} break; - case 221: + case 224: /* Line 1455 of yacc.c */ -#line 1706 "program_parse.y" +#line 1745 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4178,10 +4241,10 @@ yyreduce: ;} break; - case 222: + case 225: /* Line 1455 of yacc.c */ -#line 1714 "program_parse.y" +#line 1753 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer); @@ -4191,10 +4254,10 @@ yyreduce: ;} break; - case 223: + case 226: /* Line 1455 of yacc.c */ -#line 1724 "program_parse.y" +#line 1763 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (3)].real); @@ -4204,10 +4267,10 @@ yyreduce: ;} break; - case 224: + case 227: /* Line 1455 of yacc.c */ -#line 1732 "program_parse.y" +#line 1771 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (5)].real); @@ -4217,10 +4280,10 @@ yyreduce: ;} break; - case 225: + case 228: /* Line 1455 of yacc.c */ -#line 1741 "program_parse.y" +#line 1780 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (7)].real); @@ -4230,10 +4293,10 @@ yyreduce: ;} break; - case 226: + case 229: /* Line 1455 of yacc.c */ -#line 1750 "program_parse.y" +#line 1789 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (9)].real); @@ -4243,63 +4306,63 @@ yyreduce: ;} break; - case 227: + case 230: /* Line 1455 of yacc.c */ -#line 1760 "program_parse.y" +#line 1799 "program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); ;} break; - case 228: + case 231: /* Line 1455 of yacc.c */ -#line 1764 "program_parse.y" +#line 1803 "program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); ;} break; - case 229: + case 232: /* Line 1455 of yacc.c */ -#line 1769 "program_parse.y" +#line 1808 "program_parse.y" { (yyval.negate) = FALSE; ;} break; - case 230: + case 233: /* Line 1455 of yacc.c */ -#line 1770 "program_parse.y" +#line 1809 "program_parse.y" { (yyval.negate) = TRUE; ;} break; - case 231: + case 234: /* Line 1455 of yacc.c */ -#line 1771 "program_parse.y" +#line 1810 "program_parse.y" { (yyval.negate) = FALSE; ;} break; - case 232: + case 235: /* Line 1455 of yacc.c */ -#line 1774 "program_parse.y" +#line 1813 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 234: + case 237: /* Line 1455 of yacc.c */ -#line 1777 "program_parse.y" +#line 1816 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 236: + case 239: /* Line 1455 of yacc.c */ -#line 1781 "program_parse.y" +#line 1820 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { YYERROR; @@ -4307,10 +4370,10 @@ yyreduce: ;} break; - case 237: + case 240: /* Line 1455 of yacc.c */ -#line 1787 "program_parse.y" +#line 1826 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { YYERROR; @@ -4318,10 +4381,10 @@ yyreduce: ;} break; - case 238: + case 241: /* Line 1455 of yacc.c */ -#line 1795 "program_parse.y" +#line 1834 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_output, & (yylsp[(2) - (4)])); @@ -4334,10 +4397,10 @@ yyreduce: ;} break; - case 239: + case 242: /* Line 1455 of yacc.c */ -#line 1808 "program_parse.y" +#line 1847 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4348,10 +4411,10 @@ yyreduce: ;} break; - case 240: + case 243: /* Line 1455 of yacc.c */ -#line 1817 "program_parse.y" +#line 1856 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4362,19 +4425,19 @@ yyreduce: ;} break; - case 241: + case 244: /* Line 1455 of yacc.c */ -#line 1826 "program_parse.y" +#line 1865 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} break; - case 242: + case 245: /* Line 1455 of yacc.c */ -#line 1830 "program_parse.y" +#line 1869 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4385,10 +4448,10 @@ yyreduce: ;} break; - case 243: + case 246: /* Line 1455 of yacc.c */ -#line 1839 "program_parse.y" +#line 1878 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4399,10 +4462,10 @@ yyreduce: ;} break; - case 244: + case 247: /* Line 1455 of yacc.c */ -#line 1848 "program_parse.y" +#line 1887 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4413,19 +4476,19 @@ yyreduce: ;} break; - case 245: + case 248: /* Line 1455 of yacc.c */ -#line 1859 "program_parse.y" +#line 1898 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} break; - case 246: + case 249: /* Line 1455 of yacc.c */ -#line 1865 "program_parse.y" +#line 1904 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4433,10 +4496,10 @@ yyreduce: ;} break; - case 247: + case 250: /* Line 1455 of yacc.c */ -#line 1871 "program_parse.y" +#line 1910 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4447,10 +4510,10 @@ yyreduce: ;} break; - case 248: + case 251: /* Line 1455 of yacc.c */ -#line 1880 "program_parse.y" +#line 1919 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4461,19 +4524,19 @@ yyreduce: ;} break; - case 249: + case 252: /* Line 1455 of yacc.c */ -#line 1891 "program_parse.y" +#line 1930 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 250: + case 253: /* Line 1455 of yacc.c */ -#line 1895 "program_parse.y" +#line 1934 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4484,10 +4547,10 @@ yyreduce: ;} break; - case 251: + case 254: /* Line 1455 of yacc.c */ -#line 1904 "program_parse.y" +#line 1943 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4498,94 +4561,94 @@ yyreduce: ;} break; - case 252: + case 255: /* Line 1455 of yacc.c */ -#line 1914 "program_parse.y" +#line 1953 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 253: + case 256: /* Line 1455 of yacc.c */ -#line 1915 "program_parse.y" +#line 1954 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 254: + case 257: /* Line 1455 of yacc.c */ -#line 1916 "program_parse.y" +#line 1955 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 255: + case 258: /* Line 1455 of yacc.c */ -#line 1919 "program_parse.y" +#line 1958 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 256: + case 259: /* Line 1455 of yacc.c */ -#line 1920 "program_parse.y" +#line 1959 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 257: + case 260: /* Line 1455 of yacc.c */ -#line 1921 "program_parse.y" +#line 1960 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 258: + case 261: /* Line 1455 of yacc.c */ -#line 1924 "program_parse.y" +#line 1963 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 259: + case 262: /* Line 1455 of yacc.c */ -#line 1925 "program_parse.y" +#line 1964 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 260: + case 263: /* Line 1455 of yacc.c */ -#line 1928 "program_parse.y" +#line 1967 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 261: + case 264: /* Line 1455 of yacc.c */ -#line 1929 "program_parse.y" +#line 1968 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 262: + case 265: /* Line 1455 of yacc.c */ -#line 1932 "program_parse.y" +#line 1971 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 263: + case 266: /* Line 1455 of yacc.c */ -#line 1933 "program_parse.y" +#line 1972 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 264: + case 267: /* Line 1455 of yacc.c */ -#line 1937 "program_parse.y" +#line 1976 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4596,10 +4659,10 @@ yyreduce: ;} break; - case 265: + case 268: /* Line 1455 of yacc.c */ -#line 1948 "program_parse.y" +#line 1987 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4610,10 +4673,10 @@ yyreduce: ;} break; - case 266: + case 269: /* Line 1455 of yacc.c */ -#line 1959 "program_parse.y" +#line 1998 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4624,10 +4687,10 @@ yyreduce: ;} break; - case 267: + case 270: /* Line 1455 of yacc.c */ -#line 1970 "program_parse.y" +#line 2009 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4651,7 +4714,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4655 "program_parse.tab.c" +#line 4718 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4870,7 +4933,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 1990 "program_parse.y" +#line 2029 "program_parse.y" struct asm_instruction * diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index fa94f763c4d..32aa9d503f1 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -181,7 +181,7 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, %type KIL_instruction %type dstReg maskedDstReg maskedAddrReg -%type srcReg scalarSrcReg swizzleSrcReg +%type srcReg scalarUse scalarSrcReg swizzleSrcReg %type scalarSuffix swizzleSuffix extendedSwizzle %type extSwizComp extSwizSel %type optionalMask @@ -523,29 +523,50 @@ SWZ_instruction: SWZ maskedDstReg ',' srcReg ',' extendedSwizzle } ; -scalarSrcReg: optionalSign srcReg scalarSuffix +scalarSrcReg: optionalSign scalarUse { $$ = $2; if ($1) { $$.Base.Negate = ~$$.Base.Negate; } + } + | optionalSign '|' scalarUse '|' + { + $$ = $3; + + if (!state->option.NV_fragment) { + yyerror(& @2, state, "unexpected character '|'"); + YYERROR; + } + + if ($1) { + $$.Base.Negate = ~$$.Base.Negate; + } + + $$.Base.Abs = 1; + } + ; + +scalarUse: srcReg scalarSuffix + { + $$ = $1; $$.Base.Swizzle = _mesa_combine_swizzles($$.Base.Swizzle, - $3.swizzle); + $2.swizzle); } - | optionalSign paramConstScalarUse + | paramConstScalarUse { struct asm_symbol temp_sym; if (!state->option.NV_fragment) { - yyerror(& @2, state, "expected scalar suffix"); + yyerror(& @1, state, "expected scalar suffix"); YYERROR; } memset(& temp_sym, 0, sizeof(temp_sym)); temp_sym.param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & temp_sym, & $2); + initialize_symbol_from_const(state->prog, & temp_sym, & $1); init_src_reg(& $$); $$.Base.File = PROGRAM_CONSTANT; @@ -564,6 +585,24 @@ swizzleSrcReg: optionalSign srcReg swizzleSuffix $$.Base.Swizzle = _mesa_combine_swizzles($$.Base.Swizzle, $3.swizzle); } + | optionalSign '|' srcReg swizzleSuffix '|' + { + $$ = $3; + + if (!state->option.NV_fragment) { + yyerror(& @2, state, "unexpected character '|'"); + YYERROR; + } + + if ($1) { + $$.Base.Negate = ~$$.Base.Negate; + } + + $$.Base.Abs = 1; + $$.Base.Swizzle = _mesa_combine_swizzles($$.Base.Swizzle, + $4.swizzle); + } + ; maskedDstReg: dstReg optionalMask -- cgit v1.2.3 From 9ea4319744fb7474635cb1994e1babe1552d4d4f Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 4 Sep 2009 16:35:50 -0700 Subject: ARB prog parser: Add new constructor for asm_instruction The new constructor copies fields from the prog_instruction that the parser expects the lexer to set. --- src/mesa/shader/program_parse.tab.c | 621 +++++++++++++++++++----------------- src/mesa/shader/program_parse.tab.h | 2 +- src/mesa/shader/program_parse.y | 111 ++++--- 3 files changed, 400 insertions(+), 334 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index 505a1eb94f2..b9a0e557ada 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -139,10 +139,19 @@ static void init_dst_reg(struct prog_dst_register *r); static void init_src_reg(struct asm_src_register *r); +static void asm_instruction_set_operands(struct asm_instruction *inst, + const struct prog_dst_register *dst, const struct asm_src_register *src0, + const struct asm_src_register *src1, const struct asm_src_register *src2); + static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, const struct prog_dst_register *dst, const struct asm_src_register *src0, const struct asm_src_register *src1, const struct asm_src_register *src2); +static struct asm_instruction *asm_instruction_copy_ctor( + const struct prog_instruction *base, const struct prog_dst_register *dst, + const struct asm_src_register *src0, const struct asm_src_register *src1, + const struct asm_src_register *src2); + #ifndef FALSE #define FALSE 0 #define TRUE (!FALSE) @@ -170,7 +179,7 @@ static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, /* Line 189 of yacc.c */ -#line 174 "program_parse.tab.c" +#line 183 "program_parse.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -311,7 +320,7 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 107 "program_parse.y" +#line 116 "program_parse.y" struct asm_instruction *inst; struct asm_symbol *sym; @@ -340,7 +349,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 344 "program_parse.tab.c" +#line 353 "program_parse.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -364,14 +373,14 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ -#line 249 "program_parse.y" +#line 258 "program_parse.y" extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, void *yyscanner); /* Line 264 of yacc.c */ -#line 375 "program_parse.tab.c" +#line 384 "program_parse.tab.c" #ifdef short # undef short @@ -768,34 +777,34 @@ static const yytype_int16 yyrhs[] = /* 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, 350, 353, 359, 366, 373, 381, 388, - 396, 441, 448, 493, 499, 500, 501, 502, 503, 504, - 505, 506, 507, 508, 509, 510, 513, 526, 534, 551, - 558, 577, 588, 608, 630, 639, 672, 679, 694, 744, - 786, 797, 818, 828, 834, 865, 882, 882, 884, 891, - 903, 904, 905, 908, 920, 932, 950, 961, 973, 975, - 976, 977, 978, 981, 981, 981, 981, 982, 985, 986, - 987, 988, 989, 990, 993, 1011, 1015, 1021, 1025, 1029, - 1033, 1042, 1051, 1055, 1060, 1066, 1077, 1077, 1078, 1080, - 1084, 1088, 1092, 1098, 1098, 1100, 1116, 1139, 1142, 1153, - 1159, 1165, 1166, 1173, 1179, 1185, 1193, 1199, 1205, 1213, - 1219, 1225, 1233, 1234, 1237, 1238, 1239, 1240, 1241, 1242, - 1243, 1244, 1245, 1246, 1247, 1250, 1259, 1263, 1267, 1273, - 1282, 1286, 1290, 1299, 1303, 1309, 1315, 1322, 1327, 1335, - 1345, 1347, 1355, 1361, 1365, 1369, 1375, 1386, 1395, 1399, - 1404, 1408, 1412, 1416, 1422, 1429, 1433, 1439, 1447, 1458, - 1465, 1469, 1475, 1485, 1496, 1500, 1518, 1527, 1530, 1536, - 1540, 1544, 1550, 1561, 1566, 1571, 1576, 1581, 1586, 1594, - 1597, 1602, 1615, 1623, 1634, 1642, 1642, 1644, 1644, 1646, - 1656, 1661, 1668, 1678, 1687, 1692, 1699, 1709, 1719, 1731, - 1731, 1732, 1732, 1734, 1744, 1752, 1762, 1770, 1778, 1787, - 1798, 1802, 1808, 1809, 1810, 1813, 1813, 1816, 1816, 1819, - 1825, 1833, 1846, 1855, 1864, 1868, 1877, 1886, 1897, 1904, - 1909, 1918, 1930, 1933, 1942, 1953, 1954, 1955, 1958, 1959, - 1960, 1963, 1964, 1967, 1968, 1971, 1972, 1975, 1986, 1997, - 2008 + 0, 265, 265, 268, 276, 288, 289, 292, 314, 315, + 318, 333, 336, 341, 348, 349, 350, 351, 352, 353, + 354, 357, 358, 359, 362, 368, 374, 380, 387, 393, + 400, 444, 451, 495, 501, 502, 503, 504, 505, 506, + 507, 508, 509, 510, 511, 512, 515, 527, 535, 552, + 559, 578, 589, 609, 631, 640, 673, 680, 695, 745, + 787, 798, 819, 829, 835, 866, 883, 883, 885, 892, + 904, 905, 906, 909, 921, 933, 951, 962, 974, 976, + 977, 978, 979, 982, 982, 982, 982, 983, 986, 987, + 988, 989, 990, 991, 994, 1012, 1016, 1022, 1026, 1030, + 1034, 1043, 1052, 1056, 1061, 1067, 1078, 1078, 1079, 1081, + 1085, 1089, 1093, 1099, 1099, 1101, 1117, 1140, 1143, 1154, + 1160, 1166, 1167, 1174, 1180, 1186, 1194, 1200, 1206, 1214, + 1220, 1226, 1234, 1235, 1238, 1239, 1240, 1241, 1242, 1243, + 1244, 1245, 1246, 1247, 1248, 1251, 1260, 1264, 1268, 1274, + 1283, 1287, 1291, 1300, 1304, 1310, 1316, 1323, 1328, 1336, + 1346, 1348, 1356, 1362, 1366, 1370, 1376, 1387, 1396, 1400, + 1405, 1409, 1413, 1417, 1423, 1430, 1434, 1440, 1448, 1459, + 1466, 1470, 1476, 1486, 1497, 1501, 1519, 1528, 1531, 1537, + 1541, 1545, 1551, 1562, 1567, 1572, 1577, 1582, 1587, 1595, + 1598, 1603, 1616, 1624, 1635, 1643, 1643, 1645, 1645, 1647, + 1657, 1662, 1669, 1679, 1688, 1693, 1700, 1710, 1720, 1732, + 1732, 1733, 1733, 1735, 1745, 1753, 1763, 1771, 1779, 1788, + 1799, 1803, 1809, 1810, 1811, 1814, 1814, 1817, 1817, 1820, + 1826, 1834, 1847, 1856, 1865, 1869, 1878, 1887, 1898, 1905, + 1910, 1919, 1931, 1934, 1943, 1954, 1955, 1956, 1959, 1960, + 1961, 1964, 1965, 1968, 1969, 1972, 1973, 1976, 1987, 1998, + 2009 }; #endif @@ -2088,7 +2097,7 @@ yyreduce: case 3: /* Line 1455 of yacc.c */ -#line 260 "program_parse.y" +#line 269 "program_parse.y" { if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) { yyerror(& (yylsp[(1) - (1)]), state, "invalid fragment program header"); @@ -2101,7 +2110,7 @@ yyreduce: case 4: /* Line 1455 of yacc.c */ -#line 268 "program_parse.y" +#line 277 "program_parse.y" { if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex program header"); @@ -2116,7 +2125,7 @@ yyreduce: case 7: /* Line 1455 of yacc.c */ -#line 284 "program_parse.y" +#line 293 "program_parse.y" { int valid = 0; @@ -2141,7 +2150,7 @@ yyreduce: case 10: /* Line 1455 of yacc.c */ -#line 310 "program_parse.y" +#line 319 "program_parse.y" { if ((yyvsp[(1) - (2)].inst) != NULL) { if (state->inst_tail == NULL) { @@ -2161,7 +2170,7 @@ yyreduce: case 12: /* Line 1455 of yacc.c */ -#line 328 "program_parse.y" +#line 337 "program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); state->prog->NumAluInstructions++; @@ -2171,7 +2180,7 @@ yyreduce: case 13: /* Line 1455 of yacc.c */ -#line 333 "program_parse.y" +#line 342 "program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); state->prog->NumTexInstructions++; @@ -2181,7 +2190,7 @@ yyreduce: case 24: /* Line 1455 of yacc.c */ -#line 354 "program_parse.y" +#line 363 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2190,66 +2199,60 @@ yyreduce: case 25: /* Line 1455 of yacc.c */ -#line 360 "program_parse.y" +#line 369 "program_parse.y" { - (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (4)].temp_inst).Opcode, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); - (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (4)].temp_inst).SaturateMode; + (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} break; case 26: /* Line 1455 of yacc.c */ -#line 367 "program_parse.y" +#line 375 "program_parse.y" { - (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (4)].temp_inst).Opcode, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); - (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (4)].temp_inst).SaturateMode; + (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} break; case 27: /* Line 1455 of yacc.c */ -#line 374 "program_parse.y" +#line 381 "program_parse.y" { - (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (6)].temp_inst).Opcode, & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); - (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (6)].temp_inst).SaturateMode; + (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); ;} break; case 28: /* Line 1455 of yacc.c */ -#line 382 "program_parse.y" +#line 388 "program_parse.y" { - (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (6)].temp_inst).Opcode, & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); - (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (6)].temp_inst).SaturateMode; + (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); ;} break; case 29: /* Line 1455 of yacc.c */ -#line 390 "program_parse.y" +#line 395 "program_parse.y" { - (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (8)].temp_inst).Opcode, & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg)); - (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (8)].temp_inst).SaturateMode; + (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg)); ;} break; case 30: /* Line 1455 of yacc.c */ -#line 397 "program_parse.y" +#line 401 "program_parse.y" { - (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (8)].temp_inst).Opcode, & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL); + (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL); if ((yyval.inst) != NULL) { const GLbitfield tex_mask = (1U << (yyvsp[(6) - (8)].integer)); GLbitfield shadow_tex = 0; GLbitfield target_mask = 0; - (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (8)].temp_inst).SaturateMode; (yyval.inst)->Base.TexSrcUnit = (yyvsp[(6) - (8)].integer); if ((yyvsp[(8) - (8)].integer) < 0) { @@ -2288,7 +2291,7 @@ yyreduce: case 31: /* Line 1455 of yacc.c */ -#line 442 "program_parse.y" +#line 445 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL); state->fragment.UsesKill = 1; @@ -2298,16 +2301,15 @@ yyreduce: case 32: /* Line 1455 of yacc.c */ -#line 449 "program_parse.y" +#line 452 "program_parse.y" { - (yyval.inst) = asm_instruction_ctor((yyvsp[(1) - (12)].temp_inst).Opcode, & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg)); + (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg)); if ((yyval.inst) != NULL) { const GLbitfield tex_mask = (1U << (yyvsp[(10) - (12)].integer)); GLbitfield shadow_tex = 0; GLbitfield target_mask = 0; - (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (12)].temp_inst).SaturateMode; (yyval.inst)->Base.TexSrcUnit = (yyvsp[(10) - (12)].integer); if ((yyvsp[(12) - (12)].integer) < 0) { @@ -2346,7 +2348,7 @@ yyreduce: case 33: /* Line 1455 of yacc.c */ -#line 494 "program_parse.y" +#line 496 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} @@ -2355,91 +2357,91 @@ yyreduce: case 34: /* Line 1455 of yacc.c */ -#line 499 "program_parse.y" +#line 501 "program_parse.y" { (yyval.integer) = TEXTURE_1D_INDEX; ;} break; case 35: /* Line 1455 of yacc.c */ -#line 500 "program_parse.y" +#line 502 "program_parse.y" { (yyval.integer) = TEXTURE_2D_INDEX; ;} break; case 36: /* Line 1455 of yacc.c */ -#line 501 "program_parse.y" +#line 503 "program_parse.y" { (yyval.integer) = TEXTURE_3D_INDEX; ;} break; case 37: /* Line 1455 of yacc.c */ -#line 502 "program_parse.y" +#line 504 "program_parse.y" { (yyval.integer) = TEXTURE_CUBE_INDEX; ;} break; case 38: /* Line 1455 of yacc.c */ -#line 503 "program_parse.y" +#line 505 "program_parse.y" { (yyval.integer) = TEXTURE_RECT_INDEX; ;} break; case 39: /* Line 1455 of yacc.c */ -#line 504 "program_parse.y" +#line 506 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_INDEX; ;} break; case 40: /* Line 1455 of yacc.c */ -#line 505 "program_parse.y" +#line 507 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_INDEX; ;} break; case 41: /* Line 1455 of yacc.c */ -#line 506 "program_parse.y" +#line 508 "program_parse.y" { (yyval.integer) = -TEXTURE_RECT_INDEX; ;} break; case 42: /* Line 1455 of yacc.c */ -#line 507 "program_parse.y" +#line 509 "program_parse.y" { (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;} break; case 43: /* Line 1455 of yacc.c */ -#line 508 "program_parse.y" +#line 510 "program_parse.y" { (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;} break; case 44: /* Line 1455 of yacc.c */ -#line 509 "program_parse.y" +#line 511 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;} break; case 45: /* Line 1455 of yacc.c */ -#line 510 "program_parse.y" +#line 512 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;} break; case 46: /* Line 1455 of yacc.c */ -#line 514 "program_parse.y" +#line 516 "program_parse.y" { /* FIXME: Is this correct? Should the extenedSwizzle be applied * FIXME: to the existing swizzle? @@ -2447,15 +2449,14 @@ yyreduce: (yyvsp[(4) - (6)].src_reg).Base.Swizzle = (yyvsp[(6) - (6)].swiz_mask).swizzle; (yyvsp[(4) - (6)].src_reg).Base.Negate = (yyvsp[(6) - (6)].swiz_mask).mask; - (yyval.inst) = asm_instruction_ctor(OPCODE_SWZ, & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), NULL, NULL); - (yyval.inst)->Base.SaturateMode = (yyvsp[(1) - (6)].temp_inst).SaturateMode; + (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), NULL, NULL); ;} break; case 47: /* Line 1455 of yacc.c */ -#line 527 "program_parse.y" +#line 528 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (2)].src_reg); @@ -2468,7 +2469,7 @@ yyreduce: case 48: /* Line 1455 of yacc.c */ -#line 535 "program_parse.y" +#line 536 "program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (4)].src_reg); @@ -2488,7 +2489,7 @@ yyreduce: case 49: /* Line 1455 of yacc.c */ -#line 552 "program_parse.y" +#line 553 "program_parse.y" { (yyval.src_reg) = (yyvsp[(1) - (2)].src_reg); @@ -2500,7 +2501,7 @@ yyreduce: case 50: /* Line 1455 of yacc.c */ -#line 559 "program_parse.y" +#line 560 "program_parse.y" { struct asm_symbol temp_sym; @@ -2522,7 +2523,7 @@ yyreduce: case 51: /* Line 1455 of yacc.c */ -#line 578 "program_parse.y" +#line 579 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2538,7 +2539,7 @@ yyreduce: case 52: /* Line 1455 of yacc.c */ -#line 589 "program_parse.y" +#line 590 "program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (5)].src_reg); @@ -2560,7 +2561,7 @@ yyreduce: case 53: /* Line 1455 of yacc.c */ -#line 609 "program_parse.y" +#line 610 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask; @@ -2585,7 +2586,7 @@ yyreduce: case 54: /* Line 1455 of yacc.c */ -#line 631 "program_parse.y" +#line 632 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_ADDRESS; @@ -2597,7 +2598,7 @@ yyreduce: case 55: /* Line 1455 of yacc.c */ -#line 640 "program_parse.y" +#line 641 "program_parse.y" { const unsigned xyzw_valid = ((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0) @@ -2633,7 +2634,7 @@ yyreduce: case 56: /* Line 1455 of yacc.c */ -#line 673 "program_parse.y" +#line 674 "program_parse.y" { (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); (yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0; @@ -2643,7 +2644,7 @@ yyreduce: case 57: /* Line 1455 of yacc.c */ -#line 680 "program_parse.y" +#line 681 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2663,7 +2664,7 @@ yyreduce: case 58: /* Line 1455 of yacc.c */ -#line 695 "program_parse.y" +#line 696 "program_parse.y" { if (strlen((yyvsp[(1) - (1)].string)) > 1) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2716,7 +2717,7 @@ yyreduce: case 59: /* Line 1455 of yacc.c */ -#line 745 "program_parse.y" +#line 746 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2763,7 +2764,7 @@ yyreduce: case 60: /* Line 1455 of yacc.c */ -#line 787 "program_parse.y" +#line 788 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = PROGRAM_INPUT; @@ -2779,7 +2780,7 @@ yyreduce: case 61: /* Line 1455 of yacc.c */ -#line 798 "program_parse.y" +#line 799 "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)) { @@ -2805,7 +2806,7 @@ yyreduce: case 62: /* Line 1455 of yacc.c */ -#line 819 "program_parse.y" +#line 820 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = ((yyvsp[(1) - (1)].temp_sym).name != NULL) @@ -2818,7 +2819,7 @@ yyreduce: case 63: /* Line 1455 of yacc.c */ -#line 829 "program_parse.y" +#line 830 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_OUTPUT; @@ -2829,7 +2830,7 @@ yyreduce: case 64: /* Line 1455 of yacc.c */ -#line 835 "program_parse.y" +#line 836 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2863,7 +2864,7 @@ yyreduce: case 65: /* Line 1455 of yacc.c */ -#line 866 "program_parse.y" +#line 867 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2883,7 +2884,7 @@ yyreduce: case 68: /* Line 1455 of yacc.c */ -#line 885 "program_parse.y" +#line 886 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer); @@ -2893,7 +2894,7 @@ yyreduce: case 69: /* Line 1455 of yacc.c */ -#line 892 "program_parse.y" +#line 893 "program_parse.y" { /* FINISHME: Add support for multiple address registers. */ @@ -2908,28 +2909,28 @@ yyreduce: case 70: /* Line 1455 of yacc.c */ -#line 903 "program_parse.y" +#line 904 "program_parse.y" { (yyval.integer) = 0; ;} break; case 71: /* Line 1455 of yacc.c */ -#line 904 "program_parse.y" +#line 905 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 72: /* Line 1455 of yacc.c */ -#line 905 "program_parse.y" +#line 906 "program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; case 73: /* Line 1455 of yacc.c */ -#line 909 "program_parse.y" +#line 910 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2944,7 +2945,7 @@ yyreduce: case 74: /* Line 1455 of yacc.c */ -#line 921 "program_parse.y" +#line 922 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2959,7 +2960,7 @@ yyreduce: case 75: /* Line 1455 of yacc.c */ -#line 933 "program_parse.y" +#line 934 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2980,7 +2981,7 @@ yyreduce: case 76: /* Line 1455 of yacc.c */ -#line 951 "program_parse.y" +#line 952 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); @@ -2994,7 +2995,7 @@ yyreduce: case 77: /* Line 1455 of yacc.c */ -#line 962 "program_parse.y" +#line 963 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, @@ -3009,21 +3010,21 @@ yyreduce: case 82: /* Line 1455 of yacc.c */ -#line 978 "program_parse.y" +#line 979 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 87: /* Line 1455 of yacc.c */ -#line 982 "program_parse.y" +#line 983 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 94: /* Line 1455 of yacc.c */ -#line 994 "program_parse.y" +#line 995 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); @@ -3044,7 +3045,7 @@ yyreduce: case 95: /* Line 1455 of yacc.c */ -#line 1012 "program_parse.y" +#line 1013 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} @@ -3053,7 +3054,7 @@ yyreduce: case 96: /* Line 1455 of yacc.c */ -#line 1016 "program_parse.y" +#line 1017 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} @@ -3062,7 +3063,7 @@ yyreduce: case 97: /* Line 1455 of yacc.c */ -#line 1022 "program_parse.y" +#line 1023 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; ;} @@ -3071,7 +3072,7 @@ yyreduce: case 98: /* Line 1455 of yacc.c */ -#line 1026 "program_parse.y" +#line 1027 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; ;} @@ -3080,7 +3081,7 @@ yyreduce: case 99: /* Line 1455 of yacc.c */ -#line 1030 "program_parse.y" +#line 1031 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; ;} @@ -3089,7 +3090,7 @@ yyreduce: case 100: /* Line 1455 of yacc.c */ -#line 1034 "program_parse.y" +#line 1035 "program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); @@ -3103,7 +3104,7 @@ yyreduce: case 101: /* Line 1455 of yacc.c */ -#line 1043 "program_parse.y" +#line 1044 "program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); @@ -3117,7 +3118,7 @@ yyreduce: case 102: /* Line 1455 of yacc.c */ -#line 1052 "program_parse.y" +#line 1053 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} @@ -3126,7 +3127,7 @@ yyreduce: case 103: /* Line 1455 of yacc.c */ -#line 1056 "program_parse.y" +#line 1057 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -3136,7 +3137,7 @@ yyreduce: case 104: /* Line 1455 of yacc.c */ -#line 1061 "program_parse.y" +#line 1062 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); ;} @@ -3145,7 +3146,7 @@ yyreduce: case 105: /* Line 1455 of yacc.c */ -#line 1067 "program_parse.y" +#line 1068 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); @@ -3159,7 +3160,7 @@ yyreduce: case 109: /* Line 1455 of yacc.c */ -#line 1081 "program_parse.y" +#line 1082 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; ;} @@ -3168,7 +3169,7 @@ yyreduce: case 110: /* Line 1455 of yacc.c */ -#line 1085 "program_parse.y" +#line 1086 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); ;} @@ -3177,7 +3178,7 @@ yyreduce: case 111: /* Line 1455 of yacc.c */ -#line 1089 "program_parse.y" +#line 1090 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; ;} @@ -3186,7 +3187,7 @@ yyreduce: case 112: /* Line 1455 of yacc.c */ -#line 1093 "program_parse.y" +#line 1094 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} @@ -3195,7 +3196,7 @@ yyreduce: case 115: /* Line 1455 of yacc.c */ -#line 1101 "program_parse.y" +#line 1102 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); @@ -3214,7 +3215,7 @@ yyreduce: case 116: /* Line 1455 of yacc.c */ -#line 1117 "program_parse.y" +#line 1118 "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, @@ -3239,7 +3240,7 @@ yyreduce: case 117: /* Line 1455 of yacc.c */ -#line 1139 "program_parse.y" +#line 1140 "program_parse.y" { (yyval.integer) = 0; ;} @@ -3248,7 +3249,7 @@ yyreduce: case 118: /* Line 1455 of yacc.c */ -#line 1143 "program_parse.y" +#line 1144 "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"); @@ -3262,7 +3263,7 @@ yyreduce: case 119: /* Line 1455 of yacc.c */ -#line 1154 "program_parse.y" +#line 1155 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); ;} @@ -3271,7 +3272,7 @@ yyreduce: case 120: /* Line 1455 of yacc.c */ -#line 1160 "program_parse.y" +#line 1161 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); ;} @@ -3280,7 +3281,7 @@ yyreduce: case 122: /* Line 1455 of yacc.c */ -#line 1167 "program_parse.y" +#line 1168 "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); @@ -3290,7 +3291,7 @@ yyreduce: case 123: /* Line 1455 of yacc.c */ -#line 1174 "program_parse.y" +#line 1175 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3301,7 +3302,7 @@ yyreduce: case 124: /* Line 1455 of yacc.c */ -#line 1180 "program_parse.y" +#line 1181 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3312,7 +3313,7 @@ yyreduce: case 125: /* Line 1455 of yacc.c */ -#line 1186 "program_parse.y" +#line 1187 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3323,7 +3324,7 @@ yyreduce: case 126: /* Line 1455 of yacc.c */ -#line 1194 "program_parse.y" +#line 1195 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3334,7 +3335,7 @@ yyreduce: case 127: /* Line 1455 of yacc.c */ -#line 1200 "program_parse.y" +#line 1201 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3345,7 +3346,7 @@ yyreduce: case 128: /* Line 1455 of yacc.c */ -#line 1206 "program_parse.y" +#line 1207 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3356,7 +3357,7 @@ yyreduce: case 129: /* Line 1455 of yacc.c */ -#line 1214 "program_parse.y" +#line 1215 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3367,7 +3368,7 @@ yyreduce: case 130: /* Line 1455 of yacc.c */ -#line 1220 "program_parse.y" +#line 1221 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3378,7 +3379,7 @@ yyreduce: case 131: /* Line 1455 of yacc.c */ -#line 1226 "program_parse.y" +#line 1227 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3389,98 +3390,98 @@ yyreduce: case 132: /* Line 1455 of yacc.c */ -#line 1233 "program_parse.y" +#line 1234 "program_parse.y" { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; case 133: /* Line 1455 of yacc.c */ -#line 1234 "program_parse.y" +#line 1235 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 134: /* Line 1455 of yacc.c */ -#line 1237 "program_parse.y" +#line 1238 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 135: /* Line 1455 of yacc.c */ -#line 1238 "program_parse.y" +#line 1239 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 136: /* Line 1455 of yacc.c */ -#line 1239 "program_parse.y" +#line 1240 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 137: /* Line 1455 of yacc.c */ -#line 1240 "program_parse.y" +#line 1241 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 138: /* Line 1455 of yacc.c */ -#line 1241 "program_parse.y" +#line 1242 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 139: /* Line 1455 of yacc.c */ -#line 1242 "program_parse.y" +#line 1243 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 140: /* Line 1455 of yacc.c */ -#line 1243 "program_parse.y" +#line 1244 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 141: /* Line 1455 of yacc.c */ -#line 1244 "program_parse.y" +#line 1245 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 142: /* Line 1455 of yacc.c */ -#line 1245 "program_parse.y" +#line 1246 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 143: /* Line 1455 of yacc.c */ -#line 1246 "program_parse.y" +#line 1247 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 144: /* Line 1455 of yacc.c */ -#line 1247 "program_parse.y" +#line 1248 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 145: /* Line 1455 of yacc.c */ -#line 1251 "program_parse.y" +#line 1252 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3492,7 +3493,7 @@ yyreduce: case 146: /* Line 1455 of yacc.c */ -#line 1260 "program_parse.y" +#line 1261 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3501,7 +3502,7 @@ yyreduce: case 147: /* Line 1455 of yacc.c */ -#line 1264 "program_parse.y" +#line 1265 "program_parse.y" { (yyval.integer) = STATE_EMISSION; ;} @@ -3510,7 +3511,7 @@ yyreduce: case 148: /* Line 1455 of yacc.c */ -#line 1268 "program_parse.y" +#line 1269 "program_parse.y" { (yyval.integer) = STATE_SHININESS; ;} @@ -3519,7 +3520,7 @@ yyreduce: case 149: /* Line 1455 of yacc.c */ -#line 1274 "program_parse.y" +#line 1275 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3531,7 +3532,7 @@ yyreduce: case 150: /* Line 1455 of yacc.c */ -#line 1283 "program_parse.y" +#line 1284 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3540,7 +3541,7 @@ yyreduce: case 151: /* Line 1455 of yacc.c */ -#line 1287 "program_parse.y" +#line 1288 "program_parse.y" { (yyval.integer) = STATE_POSITION; ;} @@ -3549,7 +3550,7 @@ yyreduce: case 152: /* Line 1455 of yacc.c */ -#line 1291 "program_parse.y" +#line 1292 "program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); @@ -3563,7 +3564,7 @@ yyreduce: case 153: /* Line 1455 of yacc.c */ -#line 1300 "program_parse.y" +#line 1301 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} @@ -3572,7 +3573,7 @@ yyreduce: case 154: /* Line 1455 of yacc.c */ -#line 1304 "program_parse.y" +#line 1305 "program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; ;} @@ -3581,7 +3582,7 @@ yyreduce: case 155: /* Line 1455 of yacc.c */ -#line 1310 "program_parse.y" +#line 1311 "program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; ;} @@ -3590,7 +3591,7 @@ yyreduce: case 156: /* Line 1455 of yacc.c */ -#line 1316 "program_parse.y" +#line 1317 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; @@ -3600,7 +3601,7 @@ yyreduce: case 157: /* Line 1455 of yacc.c */ -#line 1323 "program_parse.y" +#line 1324 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; @@ -3610,7 +3611,7 @@ yyreduce: case 158: /* Line 1455 of yacc.c */ -#line 1328 "program_parse.y" +#line 1329 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3621,7 +3622,7 @@ yyreduce: case 159: /* Line 1455 of yacc.c */ -#line 1336 "program_parse.y" +#line 1337 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3634,7 +3635,7 @@ yyreduce: case 161: /* Line 1455 of yacc.c */ -#line 1348 "program_parse.y" +#line 1349 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(3) - (3)].integer); @@ -3645,7 +3646,7 @@ yyreduce: case 162: /* Line 1455 of yacc.c */ -#line 1356 "program_parse.y" +#line 1357 "program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; ;} @@ -3654,7 +3655,7 @@ yyreduce: case 163: /* Line 1455 of yacc.c */ -#line 1362 "program_parse.y" +#line 1363 "program_parse.y" { (yyval.integer) = STATE_AMBIENT; ;} @@ -3663,7 +3664,7 @@ yyreduce: case 164: /* Line 1455 of yacc.c */ -#line 1366 "program_parse.y" +#line 1367 "program_parse.y" { (yyval.integer) = STATE_DIFFUSE; ;} @@ -3672,7 +3673,7 @@ yyreduce: case 165: /* Line 1455 of yacc.c */ -#line 1370 "program_parse.y" +#line 1371 "program_parse.y" { (yyval.integer) = STATE_SPECULAR; ;} @@ -3681,7 +3682,7 @@ yyreduce: case 166: /* Line 1455 of yacc.c */ -#line 1376 "program_parse.y" +#line 1377 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); @@ -3695,7 +3696,7 @@ yyreduce: case 167: /* Line 1455 of yacc.c */ -#line 1387 "program_parse.y" +#line 1388 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3707,7 +3708,7 @@ yyreduce: case 168: /* Line 1455 of yacc.c */ -#line 1396 "program_parse.y" +#line 1397 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; ;} @@ -3716,7 +3717,7 @@ yyreduce: case 169: /* Line 1455 of yacc.c */ -#line 1400 "program_parse.y" +#line 1401 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; ;} @@ -3725,7 +3726,7 @@ yyreduce: case 170: /* Line 1455 of yacc.c */ -#line 1405 "program_parse.y" +#line 1406 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; ;} @@ -3734,7 +3735,7 @@ yyreduce: case 171: /* Line 1455 of yacc.c */ -#line 1409 "program_parse.y" +#line 1410 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; ;} @@ -3743,7 +3744,7 @@ yyreduce: case 172: /* Line 1455 of yacc.c */ -#line 1413 "program_parse.y" +#line 1414 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; ;} @@ -3752,7 +3753,7 @@ yyreduce: case 173: /* Line 1455 of yacc.c */ -#line 1417 "program_parse.y" +#line 1418 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; ;} @@ -3761,7 +3762,7 @@ yyreduce: case 174: /* Line 1455 of yacc.c */ -#line 1423 "program_parse.y" +#line 1424 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); @@ -3771,7 +3772,7 @@ yyreduce: case 175: /* Line 1455 of yacc.c */ -#line 1430 "program_parse.y" +#line 1431 "program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; ;} @@ -3780,7 +3781,7 @@ yyreduce: case 176: /* Line 1455 of yacc.c */ -#line 1434 "program_parse.y" +#line 1435 "program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; ;} @@ -3789,7 +3790,7 @@ yyreduce: case 177: /* Line 1455 of yacc.c */ -#line 1440 "program_parse.y" +#line 1441 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3800,7 +3801,7 @@ yyreduce: case 178: /* Line 1455 of yacc.c */ -#line 1448 "program_parse.y" +#line 1449 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); @@ -3814,7 +3815,7 @@ yyreduce: case 179: /* Line 1455 of yacc.c */ -#line 1459 "program_parse.y" +#line 1460 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); @@ -3824,7 +3825,7 @@ yyreduce: case 180: /* Line 1455 of yacc.c */ -#line 1466 "program_parse.y" +#line 1467 "program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; ;} @@ -3833,7 +3834,7 @@ yyreduce: case 181: /* Line 1455 of yacc.c */ -#line 1470 "program_parse.y" +#line 1471 "program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; ;} @@ -3842,7 +3843,7 @@ yyreduce: case 182: /* Line 1455 of yacc.c */ -#line 1476 "program_parse.y" +#line 1477 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; @@ -3855,7 +3856,7 @@ yyreduce: case 183: /* Line 1455 of yacc.c */ -#line 1486 "program_parse.y" +#line 1487 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; @@ -3868,7 +3869,7 @@ yyreduce: case 184: /* Line 1455 of yacc.c */ -#line 1496 "program_parse.y" +#line 1497 "program_parse.y" { (yyval.state)[2] = 0; (yyval.state)[3] = 3; @@ -3878,7 +3879,7 @@ yyreduce: case 185: /* Line 1455 of yacc.c */ -#line 1501 "program_parse.y" +#line 1502 "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). @@ -3899,7 +3900,7 @@ yyreduce: case 186: /* Line 1455 of yacc.c */ -#line 1519 "program_parse.y" +#line 1520 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; @@ -3910,7 +3911,7 @@ yyreduce: case 187: /* Line 1455 of yacc.c */ -#line 1527 "program_parse.y" +#line 1528 "program_parse.y" { (yyval.integer) = 0; ;} @@ -3919,7 +3920,7 @@ yyreduce: case 188: /* Line 1455 of yacc.c */ -#line 1531 "program_parse.y" +#line 1532 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3928,7 +3929,7 @@ yyreduce: case 189: /* Line 1455 of yacc.c */ -#line 1537 "program_parse.y" +#line 1538 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; ;} @@ -3937,7 +3938,7 @@ yyreduce: case 190: /* Line 1455 of yacc.c */ -#line 1541 "program_parse.y" +#line 1542 "program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; ;} @@ -3946,7 +3947,7 @@ yyreduce: case 191: /* Line 1455 of yacc.c */ -#line 1545 "program_parse.y" +#line 1546 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; ;} @@ -3955,7 +3956,7 @@ yyreduce: case 192: /* Line 1455 of yacc.c */ -#line 1551 "program_parse.y" +#line 1552 "program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); @@ -3969,7 +3970,7 @@ yyreduce: case 193: /* Line 1455 of yacc.c */ -#line 1562 "program_parse.y" +#line 1563 "program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); @@ -3979,7 +3980,7 @@ yyreduce: case 194: /* Line 1455 of yacc.c */ -#line 1567 "program_parse.y" +#line 1568 "program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; @@ -3989,7 +3990,7 @@ yyreduce: case 195: /* Line 1455 of yacc.c */ -#line 1572 "program_parse.y" +#line 1573 "program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; @@ -3999,7 +4000,7 @@ yyreduce: case 196: /* Line 1455 of yacc.c */ -#line 1577 "program_parse.y" +#line 1578 "program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); @@ -4009,7 +4010,7 @@ yyreduce: case 197: /* Line 1455 of yacc.c */ -#line 1582 "program_parse.y" +#line 1583 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -4019,7 +4020,7 @@ yyreduce: case 198: /* Line 1455 of yacc.c */ -#line 1587 "program_parse.y" +#line 1588 "program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[(3) - (4)].integer); @@ -4029,7 +4030,7 @@ yyreduce: case 199: /* Line 1455 of yacc.c */ -#line 1594 "program_parse.y" +#line 1595 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4038,7 +4039,7 @@ yyreduce: case 200: /* Line 1455 of yacc.c */ -#line 1598 "program_parse.y" +#line 1599 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -4047,7 +4048,7 @@ yyreduce: case 201: /* Line 1455 of yacc.c */ -#line 1603 "program_parse.y" +#line 1604 "program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -4064,7 +4065,7 @@ yyreduce: case 202: /* Line 1455 of yacc.c */ -#line 1616 "program_parse.y" +#line 1617 "program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -4076,7 +4077,7 @@ yyreduce: case 203: /* Line 1455 of yacc.c */ -#line 1624 "program_parse.y" +#line 1625 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); @@ -4090,7 +4091,7 @@ yyreduce: case 204: /* Line 1455 of yacc.c */ -#line 1635 "program_parse.y" +#line 1636 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; @@ -4100,7 +4101,7 @@ yyreduce: case 209: /* Line 1455 of yacc.c */ -#line 1647 "program_parse.y" +#line 1648 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4113,7 +4114,7 @@ yyreduce: case 210: /* Line 1455 of yacc.c */ -#line 1657 "program_parse.y" +#line 1658 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); @@ -4123,7 +4124,7 @@ yyreduce: case 211: /* Line 1455 of yacc.c */ -#line 1662 "program_parse.y" +#line 1663 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); @@ -4133,7 +4134,7 @@ yyreduce: case 212: /* Line 1455 of yacc.c */ -#line 1669 "program_parse.y" +#line 1670 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4146,7 +4147,7 @@ yyreduce: case 213: /* Line 1455 of yacc.c */ -#line 1679 "program_parse.y" +#line 1680 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4159,7 +4160,7 @@ yyreduce: case 214: /* Line 1455 of yacc.c */ -#line 1688 "program_parse.y" +#line 1689 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); @@ -4169,7 +4170,7 @@ yyreduce: case 215: /* Line 1455 of yacc.c */ -#line 1693 "program_parse.y" +#line 1694 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); @@ -4179,7 +4180,7 @@ yyreduce: case 216: /* Line 1455 of yacc.c */ -#line 1700 "program_parse.y" +#line 1701 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4192,7 +4193,7 @@ yyreduce: case 217: /* Line 1455 of yacc.c */ -#line 1710 "program_parse.y" +#line 1711 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); @@ -4205,7 +4206,7 @@ yyreduce: case 218: /* Line 1455 of yacc.c */ -#line 1720 "program_parse.y" +#line 1721 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); @@ -4218,7 +4219,7 @@ yyreduce: case 223: /* Line 1455 of yacc.c */ -#line 1735 "program_parse.y" +#line 1736 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4231,7 +4232,7 @@ yyreduce: case 224: /* Line 1455 of yacc.c */ -#line 1745 "program_parse.y" +#line 1746 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4244,7 +4245,7 @@ yyreduce: case 225: /* Line 1455 of yacc.c */ -#line 1753 "program_parse.y" +#line 1754 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer); @@ -4257,7 +4258,7 @@ yyreduce: case 226: /* Line 1455 of yacc.c */ -#line 1763 "program_parse.y" +#line 1764 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (3)].real); @@ -4270,7 +4271,7 @@ yyreduce: case 227: /* Line 1455 of yacc.c */ -#line 1771 "program_parse.y" +#line 1772 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (5)].real); @@ -4283,7 +4284,7 @@ yyreduce: case 228: /* Line 1455 of yacc.c */ -#line 1780 "program_parse.y" +#line 1781 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (7)].real); @@ -4296,7 +4297,7 @@ yyreduce: case 229: /* Line 1455 of yacc.c */ -#line 1789 "program_parse.y" +#line 1790 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (9)].real); @@ -4309,7 +4310,7 @@ yyreduce: case 230: /* Line 1455 of yacc.c */ -#line 1799 "program_parse.y" +#line 1800 "program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); ;} @@ -4318,7 +4319,7 @@ yyreduce: case 231: /* Line 1455 of yacc.c */ -#line 1803 "program_parse.y" +#line 1804 "program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); ;} @@ -4327,42 +4328,42 @@ yyreduce: case 232: /* Line 1455 of yacc.c */ -#line 1808 "program_parse.y" +#line 1809 "program_parse.y" { (yyval.negate) = FALSE; ;} break; case 233: /* Line 1455 of yacc.c */ -#line 1809 "program_parse.y" +#line 1810 "program_parse.y" { (yyval.negate) = TRUE; ;} break; case 234: /* Line 1455 of yacc.c */ -#line 1810 "program_parse.y" +#line 1811 "program_parse.y" { (yyval.negate) = FALSE; ;} break; case 235: /* Line 1455 of yacc.c */ -#line 1813 "program_parse.y" +#line 1814 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; case 237: /* Line 1455 of yacc.c */ -#line 1816 "program_parse.y" +#line 1817 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; case 239: /* Line 1455 of yacc.c */ -#line 1820 "program_parse.y" +#line 1821 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { YYERROR; @@ -4373,7 +4374,7 @@ yyreduce: case 240: /* Line 1455 of yacc.c */ -#line 1826 "program_parse.y" +#line 1827 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { YYERROR; @@ -4384,7 +4385,7 @@ yyreduce: case 241: /* Line 1455 of yacc.c */ -#line 1834 "program_parse.y" +#line 1835 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_output, & (yylsp[(2) - (4)])); @@ -4400,7 +4401,7 @@ yyreduce: case 242: /* Line 1455 of yacc.c */ -#line 1847 "program_parse.y" +#line 1848 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4414,7 +4415,7 @@ yyreduce: case 243: /* Line 1455 of yacc.c */ -#line 1856 "program_parse.y" +#line 1857 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4428,7 +4429,7 @@ yyreduce: case 244: /* Line 1455 of yacc.c */ -#line 1865 "program_parse.y" +#line 1866 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} @@ -4437,7 +4438,7 @@ yyreduce: case 245: /* Line 1455 of yacc.c */ -#line 1869 "program_parse.y" +#line 1870 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4451,7 +4452,7 @@ yyreduce: case 246: /* Line 1455 of yacc.c */ -#line 1878 "program_parse.y" +#line 1879 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4465,7 +4466,7 @@ yyreduce: case 247: /* Line 1455 of yacc.c */ -#line 1887 "program_parse.y" +#line 1888 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4479,7 +4480,7 @@ yyreduce: case 248: /* Line 1455 of yacc.c */ -#line 1898 "program_parse.y" +#line 1899 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} @@ -4488,7 +4489,7 @@ yyreduce: case 249: /* Line 1455 of yacc.c */ -#line 1904 "program_parse.y" +#line 1905 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4499,7 +4500,7 @@ yyreduce: case 250: /* Line 1455 of yacc.c */ -#line 1910 "program_parse.y" +#line 1911 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4513,7 +4514,7 @@ yyreduce: case 251: /* Line 1455 of yacc.c */ -#line 1919 "program_parse.y" +#line 1920 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4527,7 +4528,7 @@ yyreduce: case 252: /* Line 1455 of yacc.c */ -#line 1930 "program_parse.y" +#line 1931 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4536,7 +4537,7 @@ yyreduce: case 253: /* Line 1455 of yacc.c */ -#line 1934 "program_parse.y" +#line 1935 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4550,7 +4551,7 @@ yyreduce: case 254: /* Line 1455 of yacc.c */ -#line 1943 "program_parse.y" +#line 1944 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4564,91 +4565,91 @@ yyreduce: case 255: /* Line 1455 of yacc.c */ -#line 1953 "program_parse.y" +#line 1954 "program_parse.y" { (yyval.integer) = 0; ;} break; case 256: /* Line 1455 of yacc.c */ -#line 1954 "program_parse.y" +#line 1955 "program_parse.y" { (yyval.integer) = 0; ;} break; case 257: /* Line 1455 of yacc.c */ -#line 1955 "program_parse.y" +#line 1956 "program_parse.y" { (yyval.integer) = 1; ;} break; case 258: /* Line 1455 of yacc.c */ -#line 1958 "program_parse.y" +#line 1959 "program_parse.y" { (yyval.integer) = 0; ;} break; case 259: /* Line 1455 of yacc.c */ -#line 1959 "program_parse.y" +#line 1960 "program_parse.y" { (yyval.integer) = 0; ;} break; case 260: /* Line 1455 of yacc.c */ -#line 1960 "program_parse.y" +#line 1961 "program_parse.y" { (yyval.integer) = 1; ;} break; case 261: /* Line 1455 of yacc.c */ -#line 1963 "program_parse.y" +#line 1964 "program_parse.y" { (yyval.integer) = 0; ;} break; case 262: /* Line 1455 of yacc.c */ -#line 1964 "program_parse.y" +#line 1965 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 263: /* Line 1455 of yacc.c */ -#line 1967 "program_parse.y" +#line 1968 "program_parse.y" { (yyval.integer) = 0; ;} break; case 264: /* Line 1455 of yacc.c */ -#line 1968 "program_parse.y" +#line 1969 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 265: /* Line 1455 of yacc.c */ -#line 1971 "program_parse.y" +#line 1972 "program_parse.y" { (yyval.integer) = 0; ;} break; case 266: /* Line 1455 of yacc.c */ -#line 1972 "program_parse.y" +#line 1973 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 267: /* Line 1455 of yacc.c */ -#line 1976 "program_parse.y" +#line 1977 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4662,7 +4663,7 @@ yyreduce: case 268: /* Line 1455 of yacc.c */ -#line 1987 "program_parse.y" +#line 1988 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4676,7 +4677,7 @@ yyreduce: case 269: /* Line 1455 of yacc.c */ -#line 1998 "program_parse.y" +#line 1999 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4690,7 +4691,7 @@ yyreduce: case 270: /* Line 1455 of yacc.c */ -#line 2009 "program_parse.y" +#line 2010 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4714,7 +4715,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4718 "program_parse.tab.c" +#line 4719 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4933,7 +4934,42 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 2029 "program_parse.y" +#line 2030 "program_parse.y" + + +void +asm_instruction_set_operands(struct asm_instruction *inst, + const struct prog_dst_register *dst, + const struct asm_src_register *src0, + const struct asm_src_register *src1, + const struct asm_src_register *src2) +{ + /* In the core ARB extensions only the KIL instruction doesn't have a + * destination register. + */ + if (dst == NULL) { + init_dst_reg(& inst->Base.DstReg); + } else { + inst->Base.DstReg = *dst; + } + + inst->Base.SrcReg[0] = src0->Base; + inst->SrcReg[0] = *src0; + + if (src1 != NULL) { + inst->Base.SrcReg[1] = src1->Base; + inst->SrcReg[1] = *src1; + } else { + init_src_reg(& inst->SrcReg[1]); + } + + if (src2 != NULL) { + inst->Base.SrcReg[2] = src2->Base; + inst->SrcReg[2] = *src2; + } else { + init_src_reg(& inst->SrcReg[2]); + } +} struct asm_instruction * @@ -4943,37 +4979,34 @@ asm_instruction_ctor(gl_inst_opcode op, const struct asm_src_register *src1, const struct asm_src_register *src2) { - struct asm_instruction *inst = calloc(1, sizeof(struct asm_instruction)); + struct asm_instruction *inst = CALLOC_STRUCT(asm_instruction); if (inst) { _mesa_init_instructions(& inst->Base, 1); inst->Base.Opcode = op; - /* In the core ARB extensions only the KIL instruction doesn't have a - * destination register. - */ - if (dst == NULL) { - init_dst_reg(& inst->Base.DstReg); - } else { - inst->Base.DstReg = *dst; - } + asm_instruction_set_operands(inst, dst, src0, src1, src2); + } - inst->Base.SrcReg[0] = src0->Base; - inst->SrcReg[0] = *src0; + return inst; +} - if (src1 != NULL) { - inst->Base.SrcReg[1] = src1->Base; - inst->SrcReg[1] = *src1; - } else { - init_src_reg(& inst->SrcReg[1]); - } - if (src2 != NULL) { - inst->Base.SrcReg[2] = src2->Base; - inst->SrcReg[2] = *src2; - } else { - init_src_reg(& inst->SrcReg[2]); - } +struct asm_instruction * +asm_instruction_copy_ctor(const struct prog_instruction *base, + const struct prog_dst_register *dst, + const struct asm_src_register *src0, + const struct asm_src_register *src1, + const struct asm_src_register *src2) +{ + struct asm_instruction *inst = CALLOC_STRUCT(asm_instruction); + + if (inst) { + _mesa_init_instructions(& inst->Base, 1); + inst->Base.Opcode = base->Opcode; + inst->Base.SaturateMode = base->SaturateMode; + + asm_instruction_set_operands(inst, dst, src0, src1, src2); } return inst; diff --git a/src/mesa/shader/program_parse.tab.h b/src/mesa/shader/program_parse.tab.h index 7ab6f6b23ef..5f89532d654 100644 --- a/src/mesa/shader/program_parse.tab.h +++ b/src/mesa/shader/program_parse.tab.h @@ -153,7 +153,7 @@ typedef union YYSTYPE { /* Line 1676 of yacc.c */ -#line 107 "program_parse.y" +#line 116 "program_parse.y" struct asm_instruction *inst; struct asm_symbol *sym; diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 32aa9d503f1..4e2912d1c4d 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -68,10 +68,19 @@ static void init_dst_reg(struct prog_dst_register *r); static void init_src_reg(struct asm_src_register *r); +static void asm_instruction_set_operands(struct asm_instruction *inst, + const struct prog_dst_register *dst, const struct asm_src_register *src0, + const struct asm_src_register *src1, const struct asm_src_register *src2); + static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, const struct prog_dst_register *dst, const struct asm_src_register *src0, const struct asm_src_register *src1, const struct asm_src_register *src2); +static struct asm_instruction *asm_instruction_copy_ctor( + const struct prog_instruction *base, const struct prog_dst_register *dst, + const struct asm_src_register *src0, const struct asm_src_register *src1, + const struct asm_src_register *src2); + #ifndef FALSE #define FALSE 0 #define TRUE (!FALSE) @@ -358,51 +367,45 @@ ARL_instruction: ARL maskedAddrReg ',' scalarSrcReg VECTORop_instruction: VECTOR_OP maskedDstReg ',' swizzleSrcReg { - $$ = asm_instruction_ctor($1.Opcode, & $2, & $4, NULL, NULL); - $$->Base.SaturateMode = $1.SaturateMode; + $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL); } ; SCALARop_instruction: SCALAR_OP maskedDstReg ',' scalarSrcReg { - $$ = asm_instruction_ctor($1.Opcode, & $2, & $4, NULL, NULL); - $$->Base.SaturateMode = $1.SaturateMode; + $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL); } ; BINSCop_instruction: BINSC_OP maskedDstReg ',' scalarSrcReg ',' scalarSrcReg { - $$ = asm_instruction_ctor($1.Opcode, & $2, & $4, & $6, NULL); - $$->Base.SaturateMode = $1.SaturateMode; + $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, & $6, NULL); } ; BINop_instruction: BIN_OP maskedDstReg ',' swizzleSrcReg ',' swizzleSrcReg { - $$ = asm_instruction_ctor($1.Opcode, & $2, & $4, & $6, NULL); - $$->Base.SaturateMode = $1.SaturateMode; + $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, & $6, NULL); } ; TRIop_instruction: TRI_OP maskedDstReg ',' swizzleSrcReg ',' swizzleSrcReg ',' swizzleSrcReg { - $$ = asm_instruction_ctor($1.Opcode, & $2, & $4, & $6, & $8); - $$->Base.SaturateMode = $1.SaturateMode; + $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, & $6, & $8); } ; SAMPLE_instruction: SAMPLE_OP maskedDstReg ',' swizzleSrcReg ',' texImageUnit ',' texTarget { - $$ = asm_instruction_ctor($1.Opcode, & $2, & $4, NULL, NULL); + $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL); if ($$ != NULL) { const GLbitfield tex_mask = (1U << $6); GLbitfield shadow_tex = 0; GLbitfield target_mask = 0; - $$->Base.SaturateMode = $1.SaturateMode; $$->Base.TexSrcUnit = $6; if ($8 < 0) { @@ -447,14 +450,13 @@ KIL_instruction: KIL swizzleSrcReg TXD_instruction: TXD_OP maskedDstReg ',' swizzleSrcReg ',' swizzleSrcReg ',' swizzleSrcReg ',' texImageUnit ',' texTarget { - $$ = asm_instruction_ctor($1.Opcode, & $2, & $4, & $6, & $8); + $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, & $6, & $8); if ($$ != NULL) { const GLbitfield tex_mask = (1U << $10); GLbitfield shadow_tex = 0; GLbitfield target_mask = 0; - $$->Base.SaturateMode = $1.SaturateMode; $$->Base.TexSrcUnit = $10; if ($12 < 0) { @@ -518,8 +520,7 @@ SWZ_instruction: SWZ maskedDstReg ',' srcReg ',' extendedSwizzle $4.Base.Swizzle = $6.swizzle; $4.Base.Negate = $6.mask; - $$ = asm_instruction_ctor(OPCODE_SWZ, & $2, & $4, NULL, NULL); - $$->Base.SaturateMode = $1.SaturateMode; + $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL); } ; @@ -2028,6 +2029,41 @@ ALIAS_statement: ALIAS IDENTIFIER '=' IDENTIFIER %% +void +asm_instruction_set_operands(struct asm_instruction *inst, + const struct prog_dst_register *dst, + const struct asm_src_register *src0, + const struct asm_src_register *src1, + const struct asm_src_register *src2) +{ + /* In the core ARB extensions only the KIL instruction doesn't have a + * destination register. + */ + if (dst == NULL) { + init_dst_reg(& inst->Base.DstReg); + } else { + inst->Base.DstReg = *dst; + } + + inst->Base.SrcReg[0] = src0->Base; + inst->SrcReg[0] = *src0; + + if (src1 != NULL) { + inst->Base.SrcReg[1] = src1->Base; + inst->SrcReg[1] = *src1; + } else { + init_src_reg(& inst->SrcReg[1]); + } + + if (src2 != NULL) { + inst->Base.SrcReg[2] = src2->Base; + inst->SrcReg[2] = *src2; + } else { + init_src_reg(& inst->SrcReg[2]); + } +} + + struct asm_instruction * asm_instruction_ctor(gl_inst_opcode op, const struct prog_dst_register *dst, @@ -2035,37 +2071,34 @@ asm_instruction_ctor(gl_inst_opcode op, const struct asm_src_register *src1, const struct asm_src_register *src2) { - struct asm_instruction *inst = calloc(1, sizeof(struct asm_instruction)); + struct asm_instruction *inst = CALLOC_STRUCT(asm_instruction); if (inst) { _mesa_init_instructions(& inst->Base, 1); inst->Base.Opcode = op; - /* In the core ARB extensions only the KIL instruction doesn't have a - * destination register. - */ - if (dst == NULL) { - init_dst_reg(& inst->Base.DstReg); - } else { - inst->Base.DstReg = *dst; - } + asm_instruction_set_operands(inst, dst, src0, src1, src2); + } - inst->Base.SrcReg[0] = src0->Base; - inst->SrcReg[0] = *src0; + return inst; +} - if (src1 != NULL) { - inst->Base.SrcReg[1] = src1->Base; - inst->SrcReg[1] = *src1; - } else { - init_src_reg(& inst->SrcReg[1]); - } - if (src2 != NULL) { - inst->Base.SrcReg[2] = src2->Base; - inst->SrcReg[2] = *src2; - } else { - init_src_reg(& inst->SrcReg[2]); - } +struct asm_instruction * +asm_instruction_copy_ctor(const struct prog_instruction *base, + const struct prog_dst_register *dst, + const struct asm_src_register *src0, + const struct asm_src_register *src1, + const struct asm_src_register *src2) +{ + struct asm_instruction *inst = CALLOC_STRUCT(asm_instruction); + + if (inst) { + _mesa_init_instructions(& inst->Base, 1); + inst->Base.Opcode = base->Opcode; + inst->Base.SaturateMode = base->SaturateMode; + + asm_instruction_set_operands(inst, dst, src0, src1, src2); } return inst; -- cgit v1.2.3 From d0adebb8d5ef680590b0f281a20516318c0b8b62 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 4 Sep 2009 17:27:27 -0700 Subject: NV fp parser: Support instruction and TEMP / OUTPUT sizes Adds support for declaring TEMP and OUTPUT variables as 'LONG' or 'SHORT' precision. The precision specifiers are parsed, but they are currently ignored. Some support for this may be added in the future, but neither Intel hardware nor, as far as I'm aware, Radeon hardware support multiple precisions. Also adds support for instruction precision ('X', 'H', and 'R') suffixes and instruction condition code output ('C') suffix. This results in a fairly major change to the lexer. Instructions are matched with all the possible suffix strings. The suffix string are then carved off by a context (i.e., which program mode and options are set) aware parser that converts the suffixes to bits in prog_instruction. This could have been handled in the same way _SAT was originally handled in the lexer, but it would have resulted in a very large lexer with lots of opportunity for cut-and-paste errors. --- src/mesa/shader/lex.yy.c | 1874 +++++++++++++++------------------ src/mesa/shader/program_lexer.l | 194 ++-- src/mesa/shader/program_parse.tab.c | 776 +++++++------- src/mesa/shader/program_parse.y | 50 +- src/mesa/shader/program_parse_extra.c | 61 ++ src/mesa/shader/program_parser.h | 14 + 6 files changed, 1463 insertions(+), 1506 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c index 5bde12a6b77..d71a13c3bd7 100644 --- a/src/mesa/shader/lex.yy.c +++ b/src/mesa/shader/lex.yy.c @@ -357,8 +357,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 217 -#define YY_END_OF_BUFFER 218 +#define YY_NUM_RULES 168 +#define YY_END_OF_BUFFER 169 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -366,93 +366,100 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[776] = +static yyconst flex_int16_t yy_accept[836] = { 0, - 0, 0, 218, 216, 214, 213, 216, 216, 186, 212, - 188, 188, 188, 188, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 214, 0, 0, 215, 186, - 0, 187, 189, 209, 209, 0, 0, 0, 0, 209, - 0, 0, 0, 0, 0, 0, 0, 166, 210, 167, - 168, 200, 200, 200, 200, 0, 188, 0, 174, 175, - 176, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 208, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 207, 207, 0, 0, 0, + 0, 0, 169, 167, 165, 164, 167, 167, 137, 163, + 139, 139, 139, 139, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 165, 0, 0, 166, 137, + 0, 138, 140, 160, 160, 0, 0, 0, 0, 160, + 0, 0, 0, 0, 0, 0, 0, 117, 161, 118, + 119, 151, 151, 151, 151, 0, 139, 0, 125, 126, + 127, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 158, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 206, 206, 206, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 197, 197, 197, 198, 198, 199, 190, - 189, 190, 0, 191, 11, 13, 186, 15, 186, 186, - 16, 18, 186, 20, 22, 24, 26, 28, 30, 6, - - 32, 34, 35, 37, 39, 42, 40, 44, 45, 47, - 49, 51, 53, 55, 186, 186, 186, 186, 186, 65, - 67, 186, 69, 71, 73, 75, 77, 79, 81, 186, - 83, 85, 87, 89, 91, 93, 95, 186, 97, 99, - 101, 103, 186, 109, 111, 186, 186, 186, 186, 186, - 186, 0, 0, 0, 0, 189, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 127, 128, 130, 0, - 205, 0, 0, 0, 0, 0, 0, 144, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 204, 203, - 203, 156, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 194, 194, 195, 196, 0, 192, 186, 186, - 186, 186, 186, 186, 186, 186, 177, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 57, 186, 61, - 186, 186, 186, 178, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 10, - 186, 186, 186, 186, 105, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 0, 211, 0, 0, 0, 120, - 121, 0, 0, 0, 0, 0, 0, 0, 132, 0, + 157, 157, 157, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 148, 148, 148, 149, 149, 150, 141, + 140, 141, 0, 142, 11, 12, 137, 13, 137, 137, + 14, 15, 137, 16, 17, 18, 19, 20, 21, 6, + + 22, 23, 24, 25, 26, 28, 27, 29, 30, 31, + 32, 33, 34, 35, 137, 137, 137, 137, 137, 40, + 41, 137, 42, 43, 44, 45, 46, 47, 48, 137, + 49, 50, 51, 52, 53, 54, 55, 137, 56, 57, + 58, 59, 137, 62, 63, 137, 137, 137, 137, 137, + 137, 0, 0, 0, 0, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 78, 79, 81, 0, + 156, 0, 0, 0, 0, 0, 0, 95, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 155, 154, + 154, 107, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 145, 145, 146, 147, 0, 143, 11, 11, + 137, 12, 12, 12, 137, 137, 137, 137, 137, 15, + 15, 137, 128, 16, 16, 137, 17, 17, 137, 18, + 18, 137, 19, 19, 137, 20, 20, 137, 21, 21, + 137, 22, 22, 137, 24, 24, 137, 25, 25, 137, + 28, 28, 137, 27, 27, 137, 30, 30, 137, 31, + 31, 137, 32, 32, 137, 33, 33, 137, 34, 34, + 137, 35, 35, 137, 137, 137, 137, 36, 137, 38, + 137, 40, 40, 137, 41, 41, 137, 129, 42, 42, + 137, 43, 43, 137, 137, 45, 45, 137, 46, 46, + + 137, 47, 47, 137, 48, 48, 137, 137, 49, 49, + 137, 50, 50, 137, 51, 51, 137, 52, 52, 137, + 53, 53, 137, 54, 54, 137, 137, 10, 56, 137, + 57, 137, 58, 137, 59, 137, 60, 137, 62, 62, + 137, 137, 137, 137, 137, 137, 137, 137, 0, 162, + 0, 0, 0, 71, 72, 0, 0, 0, 0, 0, + 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, - 0, 160, 0, 162, 0, 0, 0, 0, 0, 0, - 201, 193, 186, 186, 186, 4, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 9, - 186, 59, 186, 63, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 107, 186, 186, 186, - 186, 186, 116, 186, 186, 0, 0, 0, 0, 0, - 122, 123, 0, 0, 0, 0, 131, 0, 0, 135, - - 138, 0, 0, 0, 0, 0, 0, 0, 149, 150, - 0, 0, 0, 0, 155, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 186, 186, 186, 186, 186, - 186, 5, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 7, 8, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 186, 186, 186, 186, 186, 186, - 186, 186, 186, 186, 117, 186, 113, 0, 0, 0, - 0, 171, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 141, 0, 145, 146, 0, 148, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 164, 165, 0, - 0, 172, 12, 3, 14, 182, 183, 186, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 36, 38, 43, - 41, 46, 48, 50, 52, 54, 56, 186, 186, 186, - 186, 66, 68, 70, 72, 74, 76, 78, 80, 82, - 186, 186, 186, 84, 86, 88, 90, 92, 94, 96, - 98, 100, 102, 104, 186, 186, 110, 112, 186, 115, - 173, 0, 0, 118, 0, 124, 0, 0, 0, 133, - 0, 0, 0, 0, 0, 0, 147, 0, 0, 153, - - 140, 0, 0, 0, 0, 0, 0, 169, 0, 186, - 58, 186, 62, 186, 179, 180, 186, 106, 186, 114, - 0, 0, 0, 0, 126, 129, 134, 0, 0, 139, - 0, 0, 0, 152, 0, 0, 0, 0, 161, 163, - 0, 186, 60, 64, 186, 108, 2, 1, 0, 125, - 0, 137, 0, 143, 151, 0, 0, 158, 159, 170, - 186, 181, 0, 136, 0, 154, 157, 186, 119, 142, - 186, 186, 184, 185, 0 + 0, 153, 0, 0, 0, 111, 0, 113, 0, 0, + 0, 0, 0, 0, 152, 144, 137, 137, 137, 4, + + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 9, 37, 39, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 60, 137, 61, + 137, 137, 137, 137, 137, 67, 137, 137, 0, 0, + 0, 0, 0, 73, 74, 0, 0, 0, 0, 82, + 0, 0, 86, 89, 0, 0, 0, 0, 0, 0, + 0, 100, 101, 0, 0, 0, 0, 106, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 137, 137, + + 137, 137, 137, 137, 5, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 7, 8, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 61, 137, + 137, 137, 137, 137, 68, 137, 64, 0, 0, 0, + 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 92, 0, 96, 97, 0, 99, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 115, 116, 0, + 0, 123, 11, 3, 12, 133, 134, 137, 14, 15, + + 16, 17, 18, 19, 20, 21, 22, 24, 25, 28, + 27, 30, 31, 32, 33, 34, 35, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 137, 137, 137, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 137, 137, 62, 63, 137, 66, 124, 0, 0, 69, + 0, 75, 0, 0, 0, 84, 0, 0, 0, 0, + 0, 0, 98, 0, 0, 104, 91, 0, 0, 0, + 0, 0, 0, 120, 0, 137, 130, 131, 137, 60, + 137, 65, 0, 0, 0, 0, 77, 80, 85, 0, + 0, 90, 0, 0, 0, 103, 0, 0, 0, 0, + + 112, 114, 0, 137, 137, 61, 2, 1, 0, 76, + 0, 88, 0, 94, 102, 0, 0, 109, 110, 121, + 137, 132, 0, 87, 0, 105, 108, 137, 70, 93, + 137, 137, 135, 136, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -498,185 +505,199 @@ static yyconst flex_int32_t yy_meta[68] = 2, 2, 2, 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[779] = +static yyconst flex_int16_t yy_base[839] = { 0, - 0, 0, 1054, 1055, 66, 1055, 1048, 1049, 0, 69, - 85, 128, 140, 152, 151, 58, 56, 63, 76, 1027, - 158, 160, 39, 163, 173, 189, 52, 1020, 76, 990, - 989, 1001, 985, 999, 998, 105, 1027, 1039, 1055, 0, - 225, 1055, 218, 160, 157, 20, 123, 66, 119, 192, - 999, 985, 54, 162, 983, 995, 194, 1055, 200, 195, - 98, 227, 196, 231, 235, 293, 305, 316, 1055, 1055, - 1055, 1004, 1017, 1011, 223, 1000, 1003, 999, 1014, 107, - 298, 996, 1010, 246, 996, 1009, 1000, 1013, 990, 1001, - 992, 182, 993, 984, 993, 984, 983, 984, 144, 978, - - 984, 995, 986, 980, 977, 978, 982, 289, 991, 978, - 302, 985, 972, 986, 962, 65, 315, 989, 981, 980, - 956, 941, 936, 953, 929, 934, 960, 279, 949, 293, - 944, 342, 299, 946, 927, 317, 937, 933, 928, 207, - 934, 920, 936, 933, 924, 320, 324, 926, 915, 929, - 932, 914, 929, 916, 913, 920, 284, 928, 227, 288, - 327, 342, 345, 905, 922, 923, 916, 898, 318, 899, - 921, 912, 330, 341, 345, 349, 353, 357, 361, 1055, - 419, 430, 436, 442, 920, 205, 944, 0, 943, 926, - 916, 915, 935, 913, 912, 911, 910, 909, 908, 0, - - 907, 0, 906, 905, 0, 904, 903, 0, 902, 901, - 900, 899, 898, 897, 913, 906, 919, 354, 356, 893, - 892, 898, 890, 889, 888, 887, 886, 885, 884, 905, - 882, 881, 880, 879, 878, 877, 876, 886, 874, 873, - 872, 871, 357, 870, 869, 861, 860, 845, 845, 844, - 843, 886, 858, 846, 448, 456, 430, 850, 418, 847, - 841, 841, 835, 848, 848, 833, 1055, 1055, 848, 836, - 432, 843, 135, 840, 846, 433, 841, 1055, 832, 839, - 838, 841, 827, 826, 830, 825, 330, 830, 439, 442, - 451, 1055, 822, 820, 820, 828, 829, 811, 456, 816, - - 822, 441, 447, 454, 458, 462, 520, 526, 836, 848, - 834, 833, 826, 840, 830, 829, 0, 828, 827, 826, - 825, 824, 823, 822, 821, 820, 819, 818, 817, 816, - 815, 814, 813, 812, 815, 808, 815, 800, 807, 798, - 821, 804, 803, 0, 802, 801, 800, 799, 798, 797, - 796, 799, 794, 793, 792, 791, 790, 789, 788, 0, - 787, 786, 785, 784, 775, 782, 781, 780, 758, 752, - 757, 763, 746, 761, 495, 1055, 760, 750, 754, 1055, - 1055, 744, 753, 739, 756, 739, 742, 736, 1055, 737, - 736, 733, 740, 733, 741, 737, 747, 744, 726, 732, - - 739, 723, 722, 740, 722, 734, 733, 1055, 732, 722, - 726, 1055, 713, 1055, 718, 718, 726, 709, 710, 720, - 1055, 1055, 752, 734, 750, 0, 532, 748, 748, 747, - 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, - 736, 735, 734, 733, 732, 731, 730, 717, 710, 0, - 710, 701, 708, 699, 723, 722, 721, 720, 719, 718, - 717, 716, 715, 693, 713, 712, 711, 710, 709, 708, - 707, 706, 705, 704, 703, 685, 676, 700, 699, 668, - 671, 651, 0, 652, 645, 652, 651, 652, 644, 662, - 1055, 1055, 644, 642, 652, 645, 1055, 640, 657, 345, - - 1055, 648, 632, 633, 642, 633, 632, 632, 1055, 631, - 640, 630, 646, 643, 1055, 642, 640, 629, 630, 626, - 618, 625, 620, 621, 616, 642, 642, 640, 654, 653, - 648, 0, 636, 635, 634, 633, 632, 631, 630, 629, - 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, - 618, 0, 0, 635, 617, 633, 615, 613, 612, 611, - 610, 609, 608, 607, 606, 605, 484, 604, 603, 602, - 601, 600, 599, 598, 597, 596, 595, 594, 611, 593, - 591, 590, 568, 568, 0, 575, 0, 609, 608, 557, - 575, 1055, 570, 565, 558, 554, 566, 556, 554, 550, - - 566, 557, 556, 1055, 1055, 559, 1055, 554, 547, 536, - 547, 539, 543, 556, 551, 554, 536, 1055, 1055, 548, - 537, 1055, 0, 0, 0, 0, 0, 576, 0, 0, + 0, 0, 1283, 1284, 66, 1284, 1277, 1278, 0, 69, + 85, 128, 140, 152, 151, 58, 56, 63, 76, 1256, + 158, 160, 39, 163, 173, 189, 52, 1249, 76, 1219, + 1218, 1230, 1214, 1228, 1227, 105, 1256, 1268, 1284, 0, + 225, 1284, 218, 160, 157, 20, 123, 66, 119, 192, + 1228, 1214, 54, 162, 1212, 1224, 194, 1284, 200, 195, + 98, 227, 196, 231, 235, 293, 305, 316, 1284, 1284, + 1284, 1233, 1246, 1240, 223, 1229, 1232, 1228, 1243, 107, + 298, 1225, 1239, 246, 1225, 1238, 1229, 1242, 1219, 1230, + 1221, 182, 1222, 1213, 1222, 1213, 1212, 1213, 144, 1207, + + 1213, 1224, 1215, 1209, 1206, 1207, 1211, 289, 1220, 1207, + 302, 1214, 1201, 1215, 1191, 65, 315, 1218, 1210, 1209, + 1185, 1170, 1165, 1182, 1158, 1163, 1189, 279, 1178, 293, + 1173, 342, 299, 1175, 1156, 317, 1166, 1162, 1157, 207, + 1163, 1149, 1165, 1162, 1153, 320, 324, 1155, 1144, 1158, + 1161, 1143, 1158, 1145, 1142, 1149, 284, 1157, 227, 288, + 327, 342, 345, 1134, 1151, 1152, 1145, 1127, 318, 1128, + 1150, 1141, 330, 341, 345, 349, 353, 357, 361, 1284, + 419, 430, 436, 442, 440, 441, 1174, 0, 1173, 1156, + 1146, 443, 1166, 444, 451, 468, 470, 472, 471, 0, + + 496, 0, 497, 498, 0, 499, 500, 0, 524, 525, + 526, 536, 537, 553, 1161, 1154, 1167, 354, 356, 561, + 563, 1148, 564, 565, 1140, 580, 590, 591, 592, 1161, + 593, 617, 618, 619, 629, 630, 1138, 1148, 247, 330, + 362, 419, 445, 646, 1136, 1128, 1127, 1112, 1112, 1111, + 1110, 1153, 1125, 1113, 662, 669, 643, 1117, 487, 1114, + 1108, 1108, 1102, 1115, 1115, 1100, 1284, 1284, 1115, 1103, + 646, 1110, 135, 1107, 1113, 561, 1108, 1284, 1099, 1106, + 1105, 1108, 1094, 1093, 1097, 1092, 330, 1097, 650, 653, + 665, 1284, 1089, 1087, 1087, 1095, 1096, 1078, 670, 1083, + + 1089, 432, 460, 486, 579, 655, 715, 722, 1095, 682, + 1102, 1093, 697, 721, 1100, 1099, 1092, 1106, 1096, 1087, + 699, 1094, 0, 1085, 724, 1092, 1083, 725, 1090, 1081, + 726, 1088, 1079, 727, 1086, 1077, 728, 1084, 1075, 729, + 1082, 1073, 730, 1080, 1071, 731, 1078, 1069, 732, 1076, + 1067, 733, 1074, 1065, 734, 1072, 1063, 735, 1070, 1061, + 736, 1068, 1059, 737, 1066, 1057, 738, 1064, 1055, 739, + 1062, 1053, 740, 1060, 1063, 1056, 1063, 0, 1056, 0, + 1071, 1046, 741, 1053, 1044, 742, 1051, 0, 1042, 743, + 1049, 1040, 745, 1047, 1046, 1037, 746, 1044, 1035, 767, + + 1042, 1033, 770, 1040, 1031, 771, 1038, 1041, 1028, 772, + 1035, 1026, 773, 1033, 1024, 774, 1031, 1022, 775, 1029, + 1020, 776, 1027, 1018, 777, 1025, 1024, 0, 1015, 1022, + 1013, 1020, 1011, 1018, 1009, 1016, 778, 1015, 1006, 779, + 1013, 1012, 990, 984, 989, 995, 978, 993, 424, 1284, + 992, 982, 986, 1284, 1284, 976, 985, 971, 988, 971, + 974, 968, 1284, 969, 968, 965, 972, 965, 973, 969, + 979, 976, 958, 964, 971, 955, 954, 972, 954, 966, + 965, 1284, 964, 954, 958, 1284, 945, 1284, 950, 950, + 958, 941, 942, 952, 1284, 1284, 984, 966, 982, 0, + + 788, 980, 980, 979, 978, 977, 976, 975, 974, 973, + 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, + 962, 949, 942, 0, 0, 0, 959, 958, 957, 956, + 955, 954, 953, 952, 951, 929, 949, 948, 947, 946, + 945, 944, 943, 942, 941, 940, 939, 913, 920, 783, + 936, 935, 904, 907, 887, 0, 888, 881, 888, 887, + 888, 880, 898, 1284, 1284, 880, 878, 888, 881, 1284, + 876, 893, 345, 1284, 884, 868, 869, 878, 869, 868, + 868, 1284, 867, 876, 866, 882, 879, 1284, 878, 876, + 865, 866, 862, 854, 861, 856, 857, 852, 878, 878, + + 876, 890, 889, 884, 0, 872, 871, 870, 869, 868, + 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, + 857, 856, 855, 854, 0, 0, 853, 852, 851, 850, + 849, 848, 847, 846, 845, 791, 844, 843, 842, 841, + 840, 839, 838, 837, 836, 835, 834, 851, 825, 832, + 830, 829, 807, 807, 0, 814, 0, 848, 847, 796, + 814, 1284, 809, 804, 797, 793, 805, 795, 793, 789, + 805, 796, 795, 1284, 1284, 798, 1284, 793, 786, 775, + 786, 778, 782, 795, 790, 793, 775, 1284, 1284, 787, + 776, 1284, 0, 0, 0, 0, 0, 815, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 811, 803, 790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 557, 574, 555, - 572, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 568, 567, 565, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 550, 567, 0, 0, 521, 0, - 0, 572, 571, 1055, 518, 1055, 522, 522, 531, 1055, - 515, 529, 517, 519, 516, 518, 1055, 496, 507, 1055, - - 1055, 511, 507, 500, 497, 497, 510, 1055, 494, 534, - 0, 518, 0, 517, 0, 0, 532, 0, 515, 0, - 67, 187, 172, 202, 1055, 1055, 1055, 219, 243, 1055, - 245, 246, 300, 1055, 292, 315, 332, 340, 1055, 1055, - 357, 406, 0, 0, 402, 0, 1055, 1055, 381, 1055, - 423, 1055, 437, 1055, 1055, 431, 429, 1055, 1055, 1055, - 460, 0, 448, 1055, 444, 1055, 1055, 534, 1055, 1055, - 496, 528, 0, 0, 1055, 565, 546, 568 + 775, 791, 0, 0, 745, 0, 0, 796, 795, 1284, + 737, 1284, 655, 655, 661, 1284, 644, 658, 643, 644, + 635, 620, 1284, 598, 608, 1284, 1284, 604, 586, 579, + 567, 567, 574, 1284, 557, 582, 0, 0, 582, 0, + 565, 0, 582, 580, 539, 525, 1284, 1284, 1284, 527, + 527, 1284, 525, 497, 499, 1284, 478, 451, 439, 441, + + 1284, 1284, 431, 441, 366, 0, 1284, 1284, 21, 1284, + 144, 1284, 176, 1284, 1284, 182, 187, 1284, 1284, 1284, + 220, 0, 235, 1284, 245, 1284, 1284, 424, 1284, 1284, + 327, 373, 0, 0, 1284, 824, 396, 827 } ; -static yyconst flex_int16_t yy_def[779] = +static yyconst flex_int16_t yy_def[839] = { 0, - 775, 1, 775, 775, 775, 775, 775, 776, 777, 775, - 775, 775, 775, 775, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 775, 775, 776, 775, 777, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 778, 775, 775, 775, 775, - 775, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - - 775, 775, 775, 775, 775, 775, 775, 775, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 777, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - - 775, 775, 775, 775, 775, 775, 775, 775, 775, 777, - 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 777, 777, 777, 777, 777, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 777, 777, 775, 775, 775, 775, 775, 777, 775, 775, - 777, 777, 777, 777, 0, 775, 775, 775 + 835, 1, 835, 835, 835, 835, 835, 836, 837, 835, + 835, 835, 835, 835, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 835, 835, 836, 835, 837, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 838, 835, 835, 835, 835, + 835, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + + 835, 835, 835, 835, 835, 835, 835, 835, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 837, 837, 837, 837, + + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 837, 837, + + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 837, 837, 837, 837, 837, 837, 837, 837, + + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, + 837, 837, 837, 837, 837, 837, 837, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 837, 837, 837, 837, 837, + 837, 837, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + + 835, 835, 835, 837, 837, 837, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 837, 837, 835, 835, 835, 835, 835, 837, 835, 835, + 837, 837, 837, 837, 0, 835, 835, 835 } ; -static yyconst flex_int16_t yy_nxt[1123] = +static yyconst flex_int16_t yy_nxt[1352] = { 0, 4, 5, 6, 5, 7, 8, 9, 4, 10, 11, 12, 13, 14, 11, 11, 15, 9, 16, 17, 18, @@ -685,7 +706,7 @@ static yyconst flex_int16_t yy_nxt[1123] = 9, 9, 9, 9, 9, 9, 30, 9, 9, 9, 9, 9, 9, 9, 9, 9, 31, 9, 32, 33, 34, 9, 35, 9, 9, 9, 9, 36, 96, 36, - 41, 116, 137, 97, 80, 138, 747, 42, 43, 43, + 41, 116, 137, 97, 80, 138, 823, 42, 43, 43, 43, 43, 43, 43, 77, 81, 78, 119, 82, 117, 83, 238, 79, 66, 67, 67, 67, 67, 67, 67, @@ -697,114 +718,139 @@ static yyconst flex_int16_t yy_nxt[1123] = 67, 67, 67, 67, 67, 218, 171, 219, 70, 68, 66, 67, 67, 67, 67, 67, 67, 72, 139, 73, 71, 68, 140, 68, 144, 92, 74, 145, 98, 88, - 390, 89, 75, 93, 76, 68, 90, 99, 94, 91, - 101, 100, 102, 103, 95, 391, 748, 68, 136, 133, + 464, 89, 75, 93, 76, 68, 90, 99, 94, 91, + 101, 100, 102, 103, 95, 465, 824, 68, 136, 133, 210, 133, 133, 152, 133, 104, 105, 133, 106, 107, 108, 109, 110, 134, 111, 133, 112, 153, 133, 211, - 135, 749, 113, 114, 154, 115, 41, 43, 43, 43, - 43, 43, 43, 146, 147, 157, 310, 132, 165, 133, - 166, 161, 162, 167, 168, 311, 158, 163, 188, 159, - 133, 169, 160, 264, 189, 164, 750, 201, 133, 174, - 173, 175, 176, 132, 751, 265, 128, 129, 46, 47, + 135, 825, 113, 114, 154, 115, 41, 43, 43, 43, + 43, 43, 43, 146, 147, 157, 826, 132, 165, 133, + 166, 161, 162, 167, 168, 827, 158, 163, 188, 159, + 133, 169, 160, 264, 189, 164, 828, 201, 133, 174, + 173, 175, 176, 132, 429, 265, 128, 129, 46, 47, 48, 49, 172, 51, 52, 202, 284, 53, 54, 55, - 56, 57, 58, 130, 60, 61, 285, 752, 131, 753, + 56, 57, 58, 130, 60, 61, 285, 430, 131, 829, 173, 173, 173, 173, 177, 173, 173, 178, 179, 173, - 173, 173, 181, 181, 181, 181, 181, 181, 228, 754, + 173, 173, 181, 181, 181, 181, 181, 181, 228, 830, 196, 197, 182, 66, 67, 67, 67, 67, 67, 67, 198, 232, 229, 183, 68, 184, 184, 184, 184, 184, 184, 240, 134, 241, 254, 233, 281, 286, 182, 135, - 257, 257, 282, 287, 242, 755, 257, 756, 164, 255, + 257, 257, 282, 287, 242, 833, 257, 431, 164, 255, 68, 256, 256, 256, 256, 256, 256, 257, 257, 257, 260, 257, 257, 297, 257, 271, 257, 257, 257, 257, - 757, 257, 340, 298, 257, 257, 338, 405, 257, 365, - 406, 288, 257, 289, 257, 257, 290, 291, 339, 257, - 341, 366, 257, 302, 302, 302, 302, 758, 599, 759, + 432, 257, 380, 298, 257, 257, 378, 479, 257, 433, + 480, 288, 257, 289, 257, 257, 290, 291, 379, 257, + 381, 834, 257, 302, 302, 302, 302, 40, 669, 822, - 257, 600, 760, 257, 302, 302, 302, 302, 303, 302, + 257, 670, 434, 257, 302, 302, 302, 302, 303, 302, 302, 304, 305, 302, 302, 302, 302, 302, 302, 302, 306, 302, 302, 302, 302, 302, 302, 302, 43, 43, - 43, 43, 43, 43, 761, 762, 763, 307, 132, 308, + 43, 43, 43, 43, 831, 832, 435, 307, 132, 308, 308, 308, 308, 308, 308, 184, 184, 184, 184, 184, - 184, 184, 184, 184, 184, 184, 184, 256, 256, 256, - 256, 256, 256, 378, 132, 256, 256, 256, 256, 256, - 256, 376, 376, 376, 376, 764, 379, 376, 394, 376, - 376, 376, 765, 376, 376, 766, 376, 767, 376, 376, - 376, 395, 408, 376, 661, 662, 768, 376, 376, 415, - - 376, 416, 769, 417, 421, 421, 421, 421, 770, 376, - 421, 421, 421, 421, 773, 663, 418, 422, 421, 421, - 421, 421, 421, 421, 421, 421, 421, 421, 421, 308, - 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, - 308, 486, 529, 530, 771, 772, 774, 40, 746, 745, - 744, 743, 742, 741, 740, 739, 738, 487, 737, 736, - 735, 734, 733, 732, 531, 38, 38, 38, 180, 180, - 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, - 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, - 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, - - 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, - 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, - 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, - 671, 670, 669, 668, 667, 666, 665, 664, 660, 659, - 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, - 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, - 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, - 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, - 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, - 608, 607, 606, 605, 604, 603, 602, 601, 598, 597, - - 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, - 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, - 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, - 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, - 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, - 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, - 536, 535, 534, 533, 532, 528, 527, 526, 525, 524, - 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, - 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, - 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, - - 493, 492, 491, 490, 489, 488, 485, 484, 483, 482, - 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, - 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, - 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, - 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, - 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, - 431, 430, 429, 428, 427, 426, 425, 424, 423, 420, - 419, 414, 413, 412, 411, 410, 409, 407, 404, 403, - 402, 401, 400, 399, 398, 397, 396, 393, 392, 389, - 388, 387, 386, 385, 384, 383, 382, 381, 380, 377, - - 288, 260, 375, 374, 373, 372, 371, 370, 369, 368, - 367, 364, 363, 362, 361, 360, 359, 358, 357, 356, - 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, - 345, 344, 343, 342, 337, 336, 335, 334, 333, 332, - 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, - 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, - 309, 301, 300, 299, 296, 295, 294, 293, 292, 283, - 280, 279, 278, 277, 276, 275, 274, 273, 272, 270, - 269, 268, 267, 266, 263, 262, 261, 259, 258, 172, - 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, - - 243, 237, 236, 235, 234, 231, 230, 227, 226, 225, - 224, 223, 222, 221, 220, 217, 216, 215, 214, 213, - 212, 209, 208, 207, 206, 205, 204, 203, 200, 199, - 193, 192, 191, 190, 187, 186, 185, 156, 155, 149, - 148, 39, 127, 126, 125, 124, 123, 122, 121, 118, - 87, 39, 37, 775, 3, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775 + 184, 184, 184, 184, 184, 184, 184, 309, 312, 436, + 320, 324, 310, 313, 132, 321, 325, 437, 327, 821, + 559, 310, 314, 328, 321, 325, 820, 310, 313, 438, + 311, 315, 328, 322, 326, 330, 560, 333, 339, 336, + 331, 329, 334, 340, 337, 495, 495, 495, 495, 331, + + 819, 334, 340, 337, 818, 331, 817, 334, 332, 337, + 335, 341, 338, 342, 345, 348, 351, 354, 343, 346, + 349, 352, 355, 495, 495, 495, 495, 343, 346, 349, + 352, 355, 452, 816, 346, 349, 344, 347, 350, 353, + 356, 357, 360, 363, 815, 453, 358, 361, 364, 496, + 495, 495, 495, 366, 369, 358, 361, 364, 367, 370, + 814, 358, 361, 364, 359, 362, 365, 367, 370, 813, + 372, 812, 811, 367, 370, 373, 368, 371, 382, 810, + 385, 389, 392, 383, 373, 386, 390, 393, 809, 808, + 373, 807, 383, 374, 386, 390, 393, 396, 806, 805, + + 804, 384, 397, 387, 391, 394, 468, 399, 402, 405, + 409, 397, 400, 403, 406, 410, 803, 397, 802, 469, + 398, 400, 403, 406, 410, 801, 800, 400, 403, 406, + 401, 404, 407, 411, 412, 415, 418, 799, 798, 413, + 416, 419, 495, 495, 495, 495, 421, 424, 413, 416, + 419, 422, 425, 797, 413, 416, 419, 414, 417, 420, + 422, 425, 796, 439, 795, 794, 422, 425, 440, 423, + 426, 256, 256, 256, 256, 256, 256, 440, 256, 256, + 256, 256, 256, 256, 450, 450, 441, 450, 450, 793, + 450, 450, 450, 450, 450, 450, 792, 450, 791, 309, + + 450, 450, 790, 789, 450, 788, 482, 450, 450, 787, + 786, 450, 450, 489, 312, 490, 320, 491, 495, 495, + 495, 495, 311, 450, 308, 308, 308, 308, 308, 308, + 492, 308, 308, 308, 308, 308, 308, 315, 312, 322, + 498, 324, 327, 330, 333, 336, 339, 342, 345, 348, + 351, 354, 357, 360, 363, 366, 369, 372, 382, 385, + 389, 315, 392, 396, 326, 329, 332, 335, 338, 341, + 344, 347, 350, 353, 356, 359, 362, 365, 368, 371, + 374, 384, 387, 391, 399, 394, 398, 402, 405, 409, + 412, 415, 418, 421, 424, 548, 439, 785, 602, 603, + + 649, 727, 728, 784, 783, 782, 781, 401, 780, 779, + 404, 407, 411, 414, 417, 420, 423, 426, 549, 441, + 604, 778, 729, 650, 38, 38, 38, 180, 180, 777, + 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, + 766, 765, 764, 763, 762, 761, 760, 759, 758, 757, + 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, + 746, 745, 744, 743, 742, 650, 741, 740, 739, 738, + 737, 736, 735, 734, 733, 732, 731, 730, 726, 725, + 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, + 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, + + 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, + 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, + 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, + 674, 673, 672, 671, 668, 667, 666, 665, 664, 663, + 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, + 652, 651, 648, 549, 647, 646, 645, 644, 643, 642, + 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, + 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, + 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, + 611, 610, 609, 608, 607, 606, 605, 601, 600, 599, + + 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, + 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, + 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, + 568, 567, 566, 565, 564, 563, 562, 561, 558, 557, + 556, 555, 554, 553, 552, 551, 441, 550, 547, 436, + 546, 434, 545, 432, 544, 430, 543, 542, 426, 541, + 423, 540, 420, 539, 417, 538, 414, 537, 411, 536, + 535, 407, 534, 404, 533, 401, 532, 398, 531, 530, + 394, 529, 391, 528, 387, 527, 384, 526, 525, 524, + 523, 522, 521, 374, 520, 371, 519, 368, 518, 365, + + 517, 362, 516, 359, 515, 356, 514, 353, 513, 350, + 512, 347, 511, 344, 510, 341, 509, 338, 508, 335, + 507, 332, 506, 329, 505, 326, 504, 322, 503, 502, + 501, 500, 499, 315, 497, 311, 494, 493, 488, 487, + 486, 485, 484, 483, 481, 478, 477, 476, 475, 474, + 473, 472, 471, 470, 467, 466, 463, 462, 461, 460, + 459, 458, 457, 456, 455, 454, 451, 288, 260, 449, + 448, 447, 446, 445, 444, 443, 442, 428, 427, 408, + 395, 388, 377, 376, 375, 323, 319, 318, 317, 316, + 301, 300, 299, 296, 295, 294, 293, 292, 283, 280, + + 279, 278, 277, 276, 275, 274, 273, 272, 270, 269, + 268, 267, 266, 263, 262, 261, 259, 258, 172, 253, + 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, + 237, 236, 235, 234, 231, 230, 227, 226, 225, 224, + 223, 222, 221, 220, 217, 216, 215, 214, 213, 212, + 209, 208, 207, 206, 205, 204, 203, 200, 199, 193, + 192, 191, 190, 187, 186, 185, 156, 155, 149, 148, + 39, 127, 126, 125, 124, 123, 122, 121, 118, 87, + 39, 37, 835, 3, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835 } ; -static yyconst flex_int16_t yy_chk[1123] = +static yyconst flex_int16_t yy_chk[1352] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -813,7 +859,7 @@ static yyconst flex_int16_t yy_chk[1123] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 23, 5, - 10, 27, 46, 23, 17, 46, 721, 10, 10, 10, + 10, 27, 46, 23, 17, 46, 809, 10, 10, 10, 10, 10, 10, 10, 16, 17, 16, 29, 17, 27, 18, 116, 16, 11, 11, 11, 11, 11, 11, 11, @@ -826,110 +872,135 @@ static yyconst flex_int16_t yy_chk[1123] = 14, 14, 14, 14, 14, 14, 14, 15, 47, 15, 14, 14, 47, 12, 49, 22, 15, 49, 24, 21, 273, 21, 15, 22, 15, 13, 21, 24, 22, 21, - 25, 24, 25, 25, 22, 273, 722, 14, 45, 45, + 25, 24, 25, 25, 22, 273, 811, 14, 45, 45, 92, 44, 44, 54, 45, 25, 26, 44, 26, 26, 26, 26, 26, 44, 26, 45, 26, 54, 44, 92, - 44, 723, 26, 26, 54, 26, 41, 43, 43, 43, - 43, 43, 43, 50, 50, 57, 186, 43, 60, 50, - 60, 59, 59, 60, 60, 186, 57, 59, 75, 57, - 50, 60, 57, 140, 75, 59, 724, 84, 59, 63, - 63, 63, 63, 43, 728, 140, 41, 41, 41, 41, + 44, 813, 26, 26, 54, 26, 41, 43, 43, 43, + 43, 43, 43, 50, 50, 57, 816, 43, 60, 50, + 60, 59, 59, 60, 60, 817, 57, 59, 75, 57, + 50, 60, 57, 140, 75, 59, 821, 84, 59, 63, + 63, 63, 63, 43, 239, 140, 41, 41, 41, 41, 41, 41, 62, 41, 41, 84, 159, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 159, 729, 41, 731, + 41, 41, 41, 41, 41, 41, 159, 239, 41, 823, 62, 62, 62, 62, 64, 64, 64, 64, 65, 65, - 65, 65, 66, 66, 66, 66, 66, 66, 108, 732, + 65, 65, 66, 66, 66, 66, 66, 66, 108, 825, 81, 81, 66, 67, 67, 67, 67, 67, 67, 67, 81, 111, 108, 68, 67, 68, 68, 68, 68, 68, 68, 117, 128, 117, 130, 111, 157, 160, 66, 128, - 133, 133, 157, 160, 117, 733, 133, 735, 130, 132, + 133, 133, 157, 160, 117, 831, 133, 240, 130, 132, 67, 132, 132, 132, 132, 132, 132, 133, 136, 136, 136, 146, 146, 169, 136, 147, 147, 146, 161, 161, - 736, 147, 219, 169, 161, 136, 218, 287, 146, 243, + 240, 147, 219, 169, 161, 136, 218, 287, 146, 241, 287, 161, 147, 162, 162, 161, 163, 163, 218, 162, - 219, 243, 163, 173, 173, 173, 173, 737, 500, 738, + 219, 832, 163, 173, 173, 173, 173, 837, 573, 805, - 162, 500, 741, 163, 174, 174, 174, 174, 175, 175, + 162, 573, 241, 163, 174, 174, 174, 174, 175, 175, 175, 175, 176, 176, 176, 176, 177, 177, 177, 177, 178, 178, 178, 178, 179, 179, 179, 179, 181, 181, - 181, 181, 181, 181, 742, 745, 749, 182, 181, 182, + 181, 181, 181, 181, 828, 828, 242, 182, 181, 182, 182, 182, 182, 182, 182, 183, 183, 183, 183, 183, - 183, 184, 184, 184, 184, 184, 184, 255, 255, 255, - 255, 255, 255, 259, 181, 256, 256, 256, 256, 256, - 256, 257, 257, 271, 271, 751, 259, 257, 276, 271, - 289, 289, 753, 290, 290, 756, 289, 757, 257, 290, - 271, 276, 291, 291, 567, 567, 761, 289, 291, 299, - - 290, 299, 763, 299, 302, 302, 302, 302, 765, 291, - 303, 303, 303, 303, 771, 567, 299, 304, 304, 304, - 304, 305, 305, 305, 305, 306, 306, 306, 306, 307, - 307, 307, 307, 307, 307, 308, 308, 308, 308, 308, - 308, 375, 427, 427, 768, 768, 772, 777, 719, 717, - 714, 712, 710, 709, 707, 706, 705, 375, 704, 703, - 702, 699, 698, 696, 427, 776, 776, 776, 778, 778, - 695, 694, 693, 692, 691, 689, 688, 687, 685, 683, - 682, 679, 676, 675, 663, 662, 661, 651, 650, 649, - 648, 628, 621, 620, 617, 616, 615, 614, 613, 612, - - 611, 610, 609, 608, 606, 603, 602, 601, 600, 599, - 598, 597, 596, 595, 594, 593, 591, 590, 589, 588, - 586, 584, 583, 582, 581, 580, 579, 578, 577, 576, - 575, 574, 573, 572, 571, 570, 569, 568, 566, 565, - 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, - 554, 551, 550, 549, 548, 547, 546, 545, 544, 543, - 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, - 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, - 521, 520, 519, 518, 517, 516, 514, 513, 512, 511, - 510, 508, 507, 506, 505, 504, 503, 502, 499, 498, - - 496, 495, 494, 493, 490, 489, 488, 487, 486, 485, - 484, 482, 481, 480, 479, 478, 477, 476, 475, 474, - 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, - 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, - 453, 452, 451, 449, 448, 447, 446, 445, 444, 443, - 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, - 432, 431, 430, 429, 428, 425, 424, 423, 420, 419, - 418, 417, 416, 415, 413, 411, 410, 409, 407, 406, - 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, - 395, 394, 393, 392, 391, 390, 388, 387, 386, 385, - - 384, 383, 382, 379, 378, 377, 374, 373, 372, 371, - 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, - 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, - 349, 348, 347, 346, 345, 343, 342, 341, 340, 339, - 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, - 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, - 318, 316, 315, 314, 313, 312, 311, 310, 309, 301, - 300, 298, 297, 296, 295, 294, 293, 288, 286, 285, - 284, 283, 282, 281, 280, 279, 277, 275, 274, 272, - 270, 269, 266, 265, 264, 263, 262, 261, 260, 258, - - 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, - 244, 242, 241, 240, 239, 238, 237, 236, 235, 234, - 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, - 223, 222, 221, 220, 217, 216, 215, 214, 213, 212, - 211, 210, 209, 207, 206, 204, 203, 201, 199, 198, - 197, 196, 195, 194, 193, 192, 191, 190, 189, 187, - 185, 172, 171, 170, 168, 167, 166, 165, 164, 158, - 156, 155, 154, 153, 152, 151, 150, 149, 148, 145, - 144, 143, 142, 141, 139, 138, 137, 135, 134, 131, - 129, 127, 126, 125, 124, 123, 122, 121, 120, 119, - - 118, 115, 114, 113, 112, 110, 109, 107, 106, 105, - 104, 103, 102, 101, 100, 98, 97, 96, 95, 94, - 93, 91, 90, 89, 88, 87, 86, 85, 83, 82, - 79, 78, 77, 76, 74, 73, 72, 56, 55, 52, - 51, 38, 37, 35, 34, 33, 32, 31, 30, 28, - 20, 8, 7, 3, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, - 775, 775 + 183, 184, 184, 184, 184, 184, 184, 185, 186, 242, + 192, 194, 185, 186, 181, 192, 194, 243, 195, 804, + 449, 185, 186, 195, 192, 194, 803, 185, 186, 243, + 185, 186, 195, 192, 194, 196, 449, 197, 199, 198, + 196, 195, 197, 199, 198, 302, 302, 302, 302, 196, + + 800, 197, 199, 198, 799, 196, 798, 197, 196, 198, + 197, 199, 198, 201, 203, 204, 206, 207, 201, 203, + 204, 206, 207, 303, 303, 303, 303, 201, 203, 204, + 206, 207, 259, 797, 203, 204, 201, 203, 204, 206, + 207, 209, 210, 211, 795, 259, 209, 210, 211, 304, + 304, 304, 304, 212, 213, 209, 210, 211, 212, 213, + 794, 209, 210, 211, 209, 210, 211, 212, 213, 793, + 214, 791, 790, 212, 213, 214, 212, 213, 220, 786, + 221, 223, 224, 220, 214, 221, 223, 224, 785, 784, + 214, 783, 220, 214, 221, 223, 224, 226, 781, 779, + + 776, 220, 226, 221, 223, 224, 276, 227, 228, 229, + 231, 226, 227, 228, 229, 231, 775, 226, 773, 276, + 226, 227, 228, 229, 231, 772, 771, 227, 228, 229, + 227, 228, 229, 231, 232, 233, 234, 770, 769, 232, + 233, 234, 305, 305, 305, 305, 235, 236, 232, 233, + 234, 235, 236, 768, 232, 233, 234, 232, 233, 234, + 235, 236, 765, 244, 764, 762, 235, 236, 244, 235, + 236, 255, 255, 255, 255, 255, 255, 244, 256, 256, + 256, 256, 256, 256, 257, 257, 244, 271, 271, 761, + 257, 289, 289, 271, 290, 290, 760, 289, 759, 310, + + 290, 257, 758, 757, 271, 755, 291, 291, 289, 754, + 753, 290, 291, 299, 313, 299, 321, 299, 306, 306, + 306, 306, 310, 291, 307, 307, 307, 307, 307, 307, + 299, 308, 308, 308, 308, 308, 308, 313, 314, 321, + 314, 325, 328, 331, 334, 337, 340, 343, 346, 349, + 352, 355, 358, 361, 364, 367, 370, 373, 383, 386, + 390, 314, 393, 397, 325, 328, 331, 334, 337, 340, + 343, 346, 349, 352, 355, 358, 361, 364, 367, 370, + 373, 383, 386, 390, 400, 393, 397, 403, 406, 410, + 413, 416, 419, 422, 425, 437, 440, 751, 501, 501, + + 550, 636, 636, 749, 748, 745, 742, 400, 741, 729, + 403, 406, 410, 413, 416, 419, 422, 425, 437, 440, + 501, 728, 636, 550, 836, 836, 836, 838, 838, 727, + 698, 691, 690, 687, 686, 685, 684, 683, 682, 681, + 680, 679, 678, 676, 673, 672, 671, 670, 669, 668, + 667, 666, 665, 664, 663, 661, 660, 659, 658, 656, + 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, + 644, 643, 642, 641, 640, 639, 638, 637, 635, 634, + 633, 632, 631, 630, 629, 628, 627, 624, 623, 622, + 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, + + 611, 610, 609, 608, 607, 606, 604, 603, 602, 601, + 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, + 590, 589, 587, 586, 585, 584, 583, 581, 580, 579, + 578, 577, 576, 575, 572, 571, 569, 568, 567, 566, + 563, 562, 561, 560, 559, 558, 557, 555, 554, 553, + 552, 551, 549, 548, 547, 546, 545, 544, 543, 542, + 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, + 531, 530, 529, 528, 527, 523, 522, 521, 520, 519, + 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, + 508, 507, 506, 505, 504, 503, 502, 499, 498, 497, + + 494, 493, 492, 491, 490, 489, 487, 485, 484, 483, + 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, + 471, 470, 469, 468, 467, 466, 465, 464, 462, 461, + 460, 459, 458, 457, 456, 453, 452, 451, 448, 447, + 446, 445, 444, 443, 442, 441, 439, 438, 436, 435, + 434, 433, 432, 431, 430, 429, 427, 426, 424, 423, + 421, 420, 418, 417, 415, 414, 412, 411, 409, 408, + 407, 405, 404, 402, 401, 399, 398, 396, 395, 394, + 392, 391, 389, 387, 385, 384, 382, 381, 379, 377, + 376, 375, 374, 372, 371, 369, 368, 366, 365, 363, + + 362, 360, 359, 357, 356, 354, 353, 351, 350, 348, + 347, 345, 344, 342, 341, 339, 338, 336, 335, 333, + 332, 330, 329, 327, 326, 324, 322, 320, 319, 318, + 317, 316, 315, 312, 311, 309, 301, 300, 298, 297, + 296, 295, 294, 293, 288, 286, 285, 284, 283, 282, + 281, 280, 279, 277, 275, 274, 272, 270, 269, 266, + 265, 264, 263, 262, 261, 260, 258, 254, 253, 252, + 251, 250, 249, 248, 247, 246, 245, 238, 237, 230, + 225, 222, 217, 216, 215, 193, 191, 190, 189, 187, + 172, 171, 170, 168, 167, 166, 165, 164, 158, 156, + + 155, 154, 153, 152, 151, 150, 149, 148, 145, 144, + 143, 142, 141, 139, 138, 137, 135, 134, 131, 129, + 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, + 115, 114, 113, 112, 110, 109, 107, 106, 105, 104, + 103, 102, 101, 100, 98, 97, 96, 95, 94, 93, + 91, 90, 89, 88, 87, 86, 85, 83, 82, 79, + 78, 77, 76, 74, 73, 72, 56, 55, 52, 51, + 38, 37, 35, 34, 33, 32, 31, 30, 28, 20, + 8, 7, 3, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, + 835 } ; /* The intent behind this definition is that it'll catch @@ -997,11 +1068,13 @@ static yyconst flex_int16_t yy_chk[1123] = } while (0) -#define return_opcode(condition, token, opcode, sat) \ +#define return_opcode(condition, token, opcode, len) \ do { \ - if (condition) { \ + if (condition && \ + _mesa_parse_instruction_suffix(yyextra, \ + yytext + len, \ + & yylval->temp_inst)) { \ yylval->temp_inst.Opcode = OPCODE_ ## opcode; \ - yylval->temp_inst.SaturateMode = SATURATE_ ## sat; \ return token; \ } else { \ yylval->string = strdup(yytext); \ @@ -1067,7 +1140,7 @@ swiz_from_char(char c) } while(0); #define YY_EXTRA_TYPE struct asm_parser_state * -#line 1071 "lex.yy.c" +#line 1144 "lex.yy.c" #define INITIAL 0 @@ -1313,10 +1386,10 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 136 "program_lexer.l" +#line 143 "program_lexer.l" -#line 1320 "lex.yy.c" +#line 1393 "lex.yy.c" yylval = yylval_param; @@ -1373,13 +1446,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 776 ) + if ( yy_current_state >= 836 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 1055 ); + while ( yy_base[yy_current_state] != 1284 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1405,17 +1478,17 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 138 "program_lexer.l" +#line 145 "program_lexer.l" { return ARBvp_10; } YY_BREAK case 2: YY_RULE_SETUP -#line 139 "program_lexer.l" +#line 146 "program_lexer.l" { return ARBfp_10; } YY_BREAK case 3: YY_RULE_SETUP -#line 140 "program_lexer.l" +#line 147 "program_lexer.l" { yylval->integer = at_address; return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS); @@ -1423,983 +1496,738 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 144 "program_lexer.l" +#line 151 "program_lexer.l" { return ALIAS; } YY_BREAK case 5: YY_RULE_SETUP -#line 145 "program_lexer.l" +#line 152 "program_lexer.l" { return ATTRIB; } YY_BREAK case 6: YY_RULE_SETUP -#line 146 "program_lexer.l" +#line 153 "program_lexer.l" { return END; } YY_BREAK case 7: YY_RULE_SETUP -#line 147 "program_lexer.l" +#line 154 "program_lexer.l" { return OPTION; } YY_BREAK case 8: YY_RULE_SETUP -#line 148 "program_lexer.l" +#line 155 "program_lexer.l" { return OUTPUT; } YY_BREAK case 9: YY_RULE_SETUP -#line 149 "program_lexer.l" +#line 156 "program_lexer.l" { return PARAM; } YY_BREAK case 10: YY_RULE_SETUP -#line 150 "program_lexer.l" +#line 157 "program_lexer.l" { yylval->integer = at_temp; return TEMP; } YY_BREAK case 11: YY_RULE_SETUP -#line 152 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, ABS, OFF); } +#line 159 "program_lexer.l" +{ return_opcode( 1, VECTOR_OP, ABS, 3); } YY_BREAK case 12: YY_RULE_SETUP -#line 153 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, ABS, ZERO_ONE); } +#line 160 "program_lexer.l" +{ return_opcode( 1, BIN_OP, ADD, 3); } YY_BREAK case 13: YY_RULE_SETUP -#line 154 "program_lexer.l" -{ return_opcode( 1, BIN_OP, ADD, OFF); } +#line 161 "program_lexer.l" +{ return_opcode(require_ARB_vp, ARL, ARL, 3); } YY_BREAK case 14: YY_RULE_SETUP -#line 155 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, ADD, ZERO_ONE); } +#line 163 "program_lexer.l" +{ return_opcode(require_ARB_fp, TRI_OP, CMP, 3); } YY_BREAK case 15: YY_RULE_SETUP -#line 156 "program_lexer.l" -{ return_opcode(require_ARB_vp, ARL, ARL, OFF); } +#line 164 "program_lexer.l" +{ return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); } YY_BREAK case 16: YY_RULE_SETUP -#line 158 "program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, CMP, OFF); } +#line 166 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); } YY_BREAK case 17: YY_RULE_SETUP -#line 159 "program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, CMP, ZERO_ONE); } +#line 167 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); } YY_BREAK case 18: YY_RULE_SETUP -#line 160 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, COS, OFF); } +#line 168 "program_lexer.l" +{ return_opcode( 1, BIN_OP, DP3, 3); } YY_BREAK case 19: YY_RULE_SETUP -#line 161 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, COS, ZERO_ONE); } +#line 169 "program_lexer.l" +{ return_opcode( 1, BIN_OP, DP4, 3); } YY_BREAK case 20: YY_RULE_SETUP -#line 163 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, DDX, OFF); } +#line 170 "program_lexer.l" +{ return_opcode( 1, BIN_OP, DPH, 3); } YY_BREAK case 21: YY_RULE_SETUP -#line 164 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, DDX, ZERO_ONE); } +#line 171 "program_lexer.l" +{ return_opcode( 1, BIN_OP, DST, 3); } YY_BREAK case 22: YY_RULE_SETUP -#line 165 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, DDY, OFF); } +#line 173 "program_lexer.l" +{ return_opcode( 1, SCALAR_OP, EX2, 3); } YY_BREAK case 23: YY_RULE_SETUP -#line 166 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, DDY, ZERO_ONE); } +#line 174 "program_lexer.l" +{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); } YY_BREAK case 24: YY_RULE_SETUP -#line 167 "program_lexer.l" -{ return_opcode( 1, BIN_OP, DP3, OFF); } +#line 176 "program_lexer.l" +{ return_opcode( 1, VECTOR_OP, FLR, 3); } YY_BREAK case 25: YY_RULE_SETUP -#line 168 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, DP3, ZERO_ONE); } +#line 177 "program_lexer.l" +{ return_opcode( 1, VECTOR_OP, FRC, 3); } YY_BREAK case 26: YY_RULE_SETUP -#line 169 "program_lexer.l" -{ return_opcode( 1, BIN_OP, DP4, OFF); } +#line 179 "program_lexer.l" +{ return_opcode(require_ARB_fp, KIL, KIL, 3); } YY_BREAK case 27: YY_RULE_SETUP -#line 170 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, DP4, ZERO_ONE); } +#line 181 "program_lexer.l" +{ return_opcode( 1, VECTOR_OP, LIT, 3); } YY_BREAK case 28: YY_RULE_SETUP -#line 171 "program_lexer.l" -{ return_opcode( 1, BIN_OP, DPH, OFF); } +#line 182 "program_lexer.l" +{ return_opcode( 1, SCALAR_OP, LG2, 3); } YY_BREAK case 29: YY_RULE_SETUP -#line 172 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, DPH, ZERO_ONE); } +#line 183 "program_lexer.l" +{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); } YY_BREAK case 30: YY_RULE_SETUP -#line 173 "program_lexer.l" -{ return_opcode( 1, BIN_OP, DST, OFF); } +#line 184 "program_lexer.l" +{ return_opcode(require_ARB_fp, TRI_OP, LRP, 3); } YY_BREAK case 31: YY_RULE_SETUP -#line 174 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, DST, ZERO_ONE); } +#line 186 "program_lexer.l" +{ return_opcode( 1, TRI_OP, MAD, 3); } YY_BREAK case 32: YY_RULE_SETUP -#line 176 "program_lexer.l" -{ return_opcode( 1, SCALAR_OP, EX2, OFF); } +#line 187 "program_lexer.l" +{ return_opcode( 1, BIN_OP, MAX, 3); } YY_BREAK case 33: YY_RULE_SETUP -#line 177 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, EX2, ZERO_ONE); } +#line 188 "program_lexer.l" +{ return_opcode( 1, BIN_OP, MIN, 3); } YY_BREAK case 34: YY_RULE_SETUP -#line 178 "program_lexer.l" -{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, OFF); } +#line 189 "program_lexer.l" +{ return_opcode( 1, VECTOR_OP, MOV, 3); } YY_BREAK case 35: YY_RULE_SETUP -#line 180 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, FLR, OFF); } +#line 190 "program_lexer.l" +{ return_opcode( 1, BIN_OP, MUL, 3); } YY_BREAK case 36: YY_RULE_SETUP -#line 181 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, FLR, ZERO_ONE); } +#line 192 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); } YY_BREAK case 37: YY_RULE_SETUP -#line 182 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, FRC, OFF); } +#line 193 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); } YY_BREAK case 38: YY_RULE_SETUP -#line 183 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, FRC, ZERO_ONE); } +#line 194 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); } YY_BREAK case 39: YY_RULE_SETUP -#line 185 "program_lexer.l" -{ return_opcode(require_ARB_fp, KIL, KIL, OFF); } +#line 195 "program_lexer.l" +{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); } YY_BREAK case 40: YY_RULE_SETUP -#line 187 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, LIT, OFF); } +#line 196 "program_lexer.l" +{ return_opcode( 1, BINSC_OP, POW, 3); } YY_BREAK case 41: YY_RULE_SETUP -#line 188 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, LIT, ZERO_ONE); } +#line 198 "program_lexer.l" +{ return_opcode( 1, SCALAR_OP, RCP, 3); } YY_BREAK case 42: YY_RULE_SETUP -#line 189 "program_lexer.l" -{ return_opcode( 1, SCALAR_OP, LG2, OFF); } +#line 199 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, RFL, 3); } YY_BREAK case 43: YY_RULE_SETUP -#line 190 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, LG2, ZERO_ONE); } +#line 200 "program_lexer.l" +{ return_opcode( 1, SCALAR_OP, RSQ, 3); } YY_BREAK case 44: YY_RULE_SETUP -#line 191 "program_lexer.l" -{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, OFF); } +#line 202 "program_lexer.l" +{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); } YY_BREAK case 45: YY_RULE_SETUP -#line 192 "program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, LRP, OFF); } +#line 203 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SEQ, 3); } YY_BREAK case 46: YY_RULE_SETUP -#line 193 "program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, LRP, ZERO_ONE); } +#line 204 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SFL, 3); } YY_BREAK case 47: YY_RULE_SETUP -#line 195 "program_lexer.l" -{ return_opcode( 1, TRI_OP, MAD, OFF); } +#line 205 "program_lexer.l" +{ return_opcode( 1, BIN_OP, SGE, 3); } YY_BREAK case 48: YY_RULE_SETUP -#line 196 "program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, MAD, ZERO_ONE); } +#line 206 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SGT, 3); } YY_BREAK case 49: YY_RULE_SETUP -#line 197 "program_lexer.l" -{ return_opcode( 1, BIN_OP, MAX, OFF); } +#line 207 "program_lexer.l" +{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); } YY_BREAK case 50: YY_RULE_SETUP -#line 198 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, MAX, ZERO_ONE); } +#line 208 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SLE, 3); } YY_BREAK case 51: YY_RULE_SETUP -#line 199 "program_lexer.l" -{ return_opcode( 1, BIN_OP, MIN, OFF); } +#line 209 "program_lexer.l" +{ return_opcode( 1, BIN_OP, SLT, 3); } YY_BREAK case 52: YY_RULE_SETUP -#line 200 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, MIN, ZERO_ONE); } +#line 210 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, SNE, 3); } YY_BREAK case 53: YY_RULE_SETUP -#line 201 "program_lexer.l" -{ return_opcode( 1, VECTOR_OP, MOV, OFF); } +#line 211 "program_lexer.l" +{ return_opcode(require_NV_fp, BIN_OP, STR, 3); } YY_BREAK case 54: YY_RULE_SETUP -#line 202 "program_lexer.l" -{ return_opcode(require_ARB_fp, VECTOR_OP, MOV, ZERO_ONE); } +#line 212 "program_lexer.l" +{ return_opcode( 1, BIN_OP, SUB, 3); } YY_BREAK case 55: YY_RULE_SETUP -#line 203 "program_lexer.l" -{ return_opcode( 1, BIN_OP, MUL, OFF); } +#line 213 "program_lexer.l" +{ return_opcode( 1, SWZ, SWZ, 3); } YY_BREAK case 56: YY_RULE_SETUP -#line 204 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, MUL, ZERO_ONE); } +#line 215 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); } YY_BREAK case 57: YY_RULE_SETUP -#line 206 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, OFF); } +#line 216 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); } YY_BREAK case 58: YY_RULE_SETUP -#line 207 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, ZERO_ONE); } +#line 217 "program_lexer.l" +{ return_opcode(require_NV_fp, TXD_OP, TXD, 3); } YY_BREAK case 59: YY_RULE_SETUP -#line 208 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, OFF); } +#line 218 "program_lexer.l" +{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); } YY_BREAK case 60: YY_RULE_SETUP -#line 209 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, ZERO_ONE); } +#line 220 "program_lexer.l" +{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); } YY_BREAK case 61: YY_RULE_SETUP -#line 210 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, OFF); } +#line 221 "program_lexer.l" +{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); } YY_BREAK case 62: YY_RULE_SETUP -#line 211 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, ZERO_ONE); } +#line 223 "program_lexer.l" +{ return_opcode(require_NV_fp, TRI_OP, X2D, 3); } YY_BREAK case 63: YY_RULE_SETUP -#line 212 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, OFF); } +#line 224 "program_lexer.l" +{ return_opcode( 1, BIN_OP, XPD, 3); } YY_BREAK case 64: YY_RULE_SETUP -#line 213 "program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, ZERO_ONE); } +#line 226 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } YY_BREAK case 65: YY_RULE_SETUP -#line 214 "program_lexer.l" -{ return_opcode( 1, BINSC_OP, POW, OFF); } +#line 227 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } YY_BREAK case 66: YY_RULE_SETUP -#line 215 "program_lexer.l" -{ return_opcode(require_ARB_fp, BINSC_OP, POW, ZERO_ONE); } +#line 228 "program_lexer.l" +{ return PROGRAM; } YY_BREAK case 67: YY_RULE_SETUP -#line 217 "program_lexer.l" -{ return_opcode( 1, SCALAR_OP, RCP, OFF); } +#line 229 "program_lexer.l" +{ return STATE; } YY_BREAK case 68: YY_RULE_SETUP -#line 218 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, RCP, ZERO_ONE); } +#line 230 "program_lexer.l" +{ return RESULT; } YY_BREAK case 69: YY_RULE_SETUP -#line 219 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, RFL, OFF); } +#line 232 "program_lexer.l" +{ return AMBIENT; } YY_BREAK case 70: YY_RULE_SETUP -#line 220 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, RFL, ZERO_ONE); } +#line 233 "program_lexer.l" +{ return ATTENUATION; } YY_BREAK case 71: YY_RULE_SETUP -#line 221 "program_lexer.l" -{ return_opcode( 1, SCALAR_OP, RSQ, OFF); } +#line 234 "program_lexer.l" +{ return BACK; } YY_BREAK case 72: YY_RULE_SETUP -#line 222 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, RSQ, ZERO_ONE); } +#line 235 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, CLIP); } YY_BREAK case 73: YY_RULE_SETUP -#line 224 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, OFF); } +#line 236 "program_lexer.l" +{ return COLOR; } YY_BREAK case 74: YY_RULE_SETUP -#line 225 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, ZERO_ONE); } +#line 237 "program_lexer.l" +{ return_token_or_DOT(require_ARB_fp, DEPTH); } YY_BREAK case 75: YY_RULE_SETUP -#line 226 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SEQ, OFF); } +#line 238 "program_lexer.l" +{ return DIFFUSE; } YY_BREAK case 76: YY_RULE_SETUP -#line 227 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SEQ, ZERO_ONE); } +#line 239 "program_lexer.l" +{ return DIRECTION; } YY_BREAK case 77: YY_RULE_SETUP -#line 228 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SFL, OFF); } +#line 240 "program_lexer.l" +{ return EMISSION; } YY_BREAK case 78: YY_RULE_SETUP -#line 229 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SFL, ZERO_ONE); } +#line 241 "program_lexer.l" +{ return ENV; } YY_BREAK case 79: YY_RULE_SETUP -#line 230 "program_lexer.l" -{ return_opcode( 1, BIN_OP, SGE, OFF); } +#line 242 "program_lexer.l" +{ return EYE; } YY_BREAK case 80: YY_RULE_SETUP -#line 231 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, SGE, ZERO_ONE); } +#line 243 "program_lexer.l" +{ return FOGCOORD; } YY_BREAK case 81: YY_RULE_SETUP -#line 232 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SGT, OFF); } +#line 244 "program_lexer.l" +{ return FOG; } YY_BREAK case 82: YY_RULE_SETUP -#line 233 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SGT, ZERO_ONE); } +#line 245 "program_lexer.l" +{ return FRONT; } YY_BREAK case 83: YY_RULE_SETUP -#line 234 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, OFF); } +#line 246 "program_lexer.l" +{ return HALF; } YY_BREAK case 84: YY_RULE_SETUP -#line 235 "program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, ZERO_ONE); } +#line 247 "program_lexer.l" +{ return INVERSE; } YY_BREAK case 85: YY_RULE_SETUP -#line 236 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SLE, OFF); } +#line 248 "program_lexer.l" +{ return INVTRANS; } YY_BREAK case 86: YY_RULE_SETUP -#line 237 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SLE, ZERO_ONE); } +#line 249 "program_lexer.l" +{ return LIGHT; } YY_BREAK case 87: YY_RULE_SETUP -#line 238 "program_lexer.l" -{ return_opcode( 1, BIN_OP, SLT, OFF); } +#line 250 "program_lexer.l" +{ return LIGHTMODEL; } YY_BREAK case 88: YY_RULE_SETUP -#line 239 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, SLT, ZERO_ONE); } +#line 251 "program_lexer.l" +{ return LIGHTPROD; } YY_BREAK case 89: YY_RULE_SETUP -#line 240 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SNE, OFF); } +#line 252 "program_lexer.l" +{ return LOCAL; } YY_BREAK case 90: YY_RULE_SETUP -#line 241 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SNE, ZERO_ONE); } +#line 253 "program_lexer.l" +{ return MATERIAL; } YY_BREAK case 91: YY_RULE_SETUP -#line 242 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, STR, OFF); } +#line 254 "program_lexer.l" +{ return MAT_PROGRAM; } YY_BREAK case 92: YY_RULE_SETUP -#line 243 "program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, STR, ZERO_ONE); } +#line 255 "program_lexer.l" +{ return MATRIX; } YY_BREAK case 93: YY_RULE_SETUP -#line 244 "program_lexer.l" -{ return_opcode( 1, BIN_OP, SUB, OFF); } +#line 256 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } YY_BREAK case 94: YY_RULE_SETUP -#line 245 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, SUB, ZERO_ONE); } +#line 257 "program_lexer.l" +{ return MODELVIEW; } YY_BREAK case 95: YY_RULE_SETUP -#line 246 "program_lexer.l" -{ return_opcode( 1, SWZ, SWZ, OFF); } +#line 258 "program_lexer.l" +{ return MVP; } YY_BREAK case 96: YY_RULE_SETUP -#line 247 "program_lexer.l" -{ return_opcode(require_ARB_fp, SWZ, SWZ, ZERO_ONE); } +#line 259 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, NORMAL); } YY_BREAK case 97: YY_RULE_SETUP -#line 249 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, OFF); } +#line 260 "program_lexer.l" +{ return OBJECT; } YY_BREAK case 98: YY_RULE_SETUP -#line 250 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, ZERO_ONE); } +#line 261 "program_lexer.l" +{ return PALETTE; } YY_BREAK case 99: YY_RULE_SETUP -#line 251 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, OFF); } +#line 262 "program_lexer.l" +{ return PARAMS; } YY_BREAK case 100: YY_RULE_SETUP -#line 252 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, ZERO_ONE); } +#line 263 "program_lexer.l" +{ return PLANE; } YY_BREAK case 101: YY_RULE_SETUP -#line 253 "program_lexer.l" -{ return_opcode(require_NV_fp, TXD_OP, TXD, OFF); } +#line 264 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, POINT); } YY_BREAK case 102: YY_RULE_SETUP -#line 254 "program_lexer.l" -{ return_opcode(require_NV_fp, TXD_OP, TXD, ZERO_ONE); } +#line 265 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, POINTSIZE); } YY_BREAK case 103: YY_RULE_SETUP -#line 255 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, OFF); } +#line 266 "program_lexer.l" +{ return POSITION; } YY_BREAK case 104: YY_RULE_SETUP -#line 256 "program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, ZERO_ONE); } +#line 267 "program_lexer.l" +{ return PRIMARY; } YY_BREAK case 105: YY_RULE_SETUP -#line 258 "program_lexer.l" -{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, OFF); } +#line 268 "program_lexer.l" +{ return PROJECTION; } YY_BREAK case 106: YY_RULE_SETUP -#line 259 "program_lexer.l" -{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, ZERO_ONE); } +#line 269 "program_lexer.l" +{ return_token_or_DOT(require_ARB_fp, RANGE); } YY_BREAK case 107: YY_RULE_SETUP -#line 260 "program_lexer.l" -{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, OFF); } +#line 270 "program_lexer.l" +{ return ROW; } YY_BREAK case 108: YY_RULE_SETUP -#line 261 "program_lexer.l" -{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, ZERO_ONE); } +#line 271 "program_lexer.l" +{ return SCENECOLOR; } YY_BREAK case 109: YY_RULE_SETUP -#line 263 "program_lexer.l" -{ return_opcode(require_NV_fp, TRI_OP, X2D, OFF); } +#line 272 "program_lexer.l" +{ return SECONDARY; } YY_BREAK case 110: YY_RULE_SETUP -#line 264 "program_lexer.l" -{ return_opcode(require_NV_fp, TRI_OP, X2D, ZERO_ONE); } +#line 273 "program_lexer.l" +{ return SHININESS; } YY_BREAK case 111: YY_RULE_SETUP -#line 265 "program_lexer.l" -{ return_opcode( 1, BIN_OP, XPD, OFF); } +#line 274 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, SIZE); } YY_BREAK case 112: YY_RULE_SETUP -#line 266 "program_lexer.l" -{ return_opcode(require_ARB_fp, BIN_OP, XPD, ZERO_ONE); } +#line 275 "program_lexer.l" +{ return SPECULAR; } YY_BREAK case 113: YY_RULE_SETUP -#line 268 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } +#line 276 "program_lexer.l" +{ return SPOT; } YY_BREAK case 114: YY_RULE_SETUP -#line 269 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } +#line 277 "program_lexer.l" +{ return TEXCOORD; } YY_BREAK case 115: YY_RULE_SETUP -#line 270 "program_lexer.l" -{ return PROGRAM; } - YY_BREAK -case 116: -YY_RULE_SETUP -#line 271 "program_lexer.l" -{ return STATE; } - YY_BREAK -case 117: -YY_RULE_SETUP -#line 272 "program_lexer.l" -{ return RESULT; } - YY_BREAK -case 118: -YY_RULE_SETUP -#line 274 "program_lexer.l" -{ return AMBIENT; } - YY_BREAK -case 119: -YY_RULE_SETUP -#line 275 "program_lexer.l" -{ return ATTENUATION; } - YY_BREAK -case 120: -YY_RULE_SETUP -#line 276 "program_lexer.l" -{ return BACK; } - YY_BREAK -case 121: -YY_RULE_SETUP -#line 277 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, CLIP); } - YY_BREAK -case 122: -YY_RULE_SETUP #line 278 "program_lexer.l" -{ return COLOR; } - YY_BREAK -case 123: -YY_RULE_SETUP -#line 279 "program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, DEPTH); } - YY_BREAK -case 124: -YY_RULE_SETUP -#line 280 "program_lexer.l" -{ return DIFFUSE; } - YY_BREAK -case 125: -YY_RULE_SETUP -#line 281 "program_lexer.l" -{ return DIRECTION; } - YY_BREAK -case 126: -YY_RULE_SETUP -#line 282 "program_lexer.l" -{ return EMISSION; } - YY_BREAK -case 127: -YY_RULE_SETUP -#line 283 "program_lexer.l" -{ return ENV; } - YY_BREAK -case 128: -YY_RULE_SETUP -#line 284 "program_lexer.l" -{ return EYE; } - YY_BREAK -case 129: -YY_RULE_SETUP -#line 285 "program_lexer.l" -{ return FOGCOORD; } - YY_BREAK -case 130: -YY_RULE_SETUP -#line 286 "program_lexer.l" -{ return FOG; } - YY_BREAK -case 131: -YY_RULE_SETUP -#line 287 "program_lexer.l" -{ return FRONT; } - YY_BREAK -case 132: -YY_RULE_SETUP -#line 288 "program_lexer.l" -{ return HALF; } - YY_BREAK -case 133: -YY_RULE_SETUP -#line 289 "program_lexer.l" -{ return INVERSE; } - YY_BREAK -case 134: -YY_RULE_SETUP -#line 290 "program_lexer.l" -{ return INVTRANS; } - YY_BREAK -case 135: -YY_RULE_SETUP -#line 291 "program_lexer.l" -{ return LIGHT; } - YY_BREAK -case 136: -YY_RULE_SETUP -#line 292 "program_lexer.l" -{ return LIGHTMODEL; } - YY_BREAK -case 137: -YY_RULE_SETUP -#line 293 "program_lexer.l" -{ return LIGHTPROD; } - YY_BREAK -case 138: -YY_RULE_SETUP -#line 294 "program_lexer.l" -{ return LOCAL; } - YY_BREAK -case 139: -YY_RULE_SETUP -#line 295 "program_lexer.l" -{ return MATERIAL; } - YY_BREAK -case 140: -YY_RULE_SETUP -#line 296 "program_lexer.l" -{ return MAT_PROGRAM; } - YY_BREAK -case 141: -YY_RULE_SETUP -#line 297 "program_lexer.l" -{ return MATRIX; } - YY_BREAK -case 142: -YY_RULE_SETUP -#line 298 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } - YY_BREAK -case 143: -YY_RULE_SETUP -#line 299 "program_lexer.l" -{ return MODELVIEW; } - YY_BREAK -case 144: -YY_RULE_SETUP -#line 300 "program_lexer.l" -{ return MVP; } - YY_BREAK -case 145: -YY_RULE_SETUP -#line 301 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, NORMAL); } - YY_BREAK -case 146: -YY_RULE_SETUP -#line 302 "program_lexer.l" -{ return OBJECT; } - YY_BREAK -case 147: -YY_RULE_SETUP -#line 303 "program_lexer.l" -{ return PALETTE; } - YY_BREAK -case 148: -YY_RULE_SETUP -#line 304 "program_lexer.l" -{ return PARAMS; } - YY_BREAK -case 149: -YY_RULE_SETUP -#line 305 "program_lexer.l" -{ return PLANE; } - YY_BREAK -case 150: -YY_RULE_SETUP -#line 306 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINT); } - YY_BREAK -case 151: -YY_RULE_SETUP -#line 307 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINTSIZE); } - YY_BREAK -case 152: -YY_RULE_SETUP -#line 308 "program_lexer.l" -{ return POSITION; } - YY_BREAK -case 153: -YY_RULE_SETUP -#line 309 "program_lexer.l" -{ return PRIMARY; } - YY_BREAK -case 154: -YY_RULE_SETUP -#line 310 "program_lexer.l" -{ return PROJECTION; } - YY_BREAK -case 155: -YY_RULE_SETUP -#line 311 "program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, RANGE); } - YY_BREAK -case 156: -YY_RULE_SETUP -#line 312 "program_lexer.l" -{ return ROW; } - YY_BREAK -case 157: -YY_RULE_SETUP -#line 313 "program_lexer.l" -{ return SCENECOLOR; } - YY_BREAK -case 158: -YY_RULE_SETUP -#line 314 "program_lexer.l" -{ return SECONDARY; } - YY_BREAK -case 159: -YY_RULE_SETUP -#line 315 "program_lexer.l" -{ return SHININESS; } - YY_BREAK -case 160: -YY_RULE_SETUP -#line 316 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, SIZE); } - YY_BREAK -case 161: -YY_RULE_SETUP -#line 317 "program_lexer.l" -{ return SPECULAR; } - YY_BREAK -case 162: -YY_RULE_SETUP -#line 318 "program_lexer.l" -{ return SPOT; } - YY_BREAK -case 163: -YY_RULE_SETUP -#line 319 "program_lexer.l" -{ return TEXCOORD; } - YY_BREAK -case 164: -YY_RULE_SETUP -#line 320 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, TEXENV); } YY_BREAK -case 165: +case 116: YY_RULE_SETUP -#line 321 "program_lexer.l" +#line 279 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN); } YY_BREAK -case 166: +case 117: YY_RULE_SETUP -#line 322 "program_lexer.l" +#line 280 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } YY_BREAK -case 167: +case 118: YY_RULE_SETUP -#line 323 "program_lexer.l" +#line 281 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_S); } YY_BREAK -case 168: +case 119: YY_RULE_SETUP -#line 324 "program_lexer.l" +#line 282 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_T); } YY_BREAK -case 169: +case 120: YY_RULE_SETUP -#line 325 "program_lexer.l" +#line 283 "program_lexer.l" { return TEXTURE; } YY_BREAK -case 170: +case 121: YY_RULE_SETUP -#line 326 "program_lexer.l" +#line 284 "program_lexer.l" { return TRANSPOSE; } YY_BREAK -case 171: +case 122: YY_RULE_SETUP -#line 327 "program_lexer.l" +#line 285 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, VTXATTRIB); } YY_BREAK -case 172: +case 123: YY_RULE_SETUP -#line 328 "program_lexer.l" +#line 286 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, WEIGHT); } YY_BREAK -case 173: +case 124: YY_RULE_SETUP -#line 330 "program_lexer.l" +#line 288 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } YY_BREAK -case 174: +case 125: YY_RULE_SETUP -#line 331 "program_lexer.l" +#line 289 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } YY_BREAK -case 175: +case 126: YY_RULE_SETUP -#line 332 "program_lexer.l" +#line 290 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } YY_BREAK -case 176: +case 127: YY_RULE_SETUP -#line 333 "program_lexer.l" +#line 291 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } YY_BREAK -case 177: +case 128: YY_RULE_SETUP -#line 334 "program_lexer.l" +#line 292 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } YY_BREAK -case 178: +case 129: YY_RULE_SETUP -#line 335 "program_lexer.l" +#line 293 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } YY_BREAK -case 179: +case 130: YY_RULE_SETUP -#line 336 "program_lexer.l" +#line 294 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } YY_BREAK -case 180: +case 131: YY_RULE_SETUP -#line 337 "program_lexer.l" +#line 295 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } YY_BREAK -case 181: +case 132: YY_RULE_SETUP -#line 338 "program_lexer.l" +#line 296 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } YY_BREAK -case 182: +case 133: YY_RULE_SETUP -#line 339 "program_lexer.l" +#line 297 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } YY_BREAK -case 183: +case 134: YY_RULE_SETUP -#line 340 "program_lexer.l" +#line 298 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } YY_BREAK -case 184: +case 135: YY_RULE_SETUP -#line 341 "program_lexer.l" +#line 299 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } YY_BREAK -case 185: +case 136: YY_RULE_SETUP -#line 342 "program_lexer.l" +#line 300 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } YY_BREAK -case 186: +case 137: YY_RULE_SETUP -#line 344 "program_lexer.l" +#line 302 "program_lexer.l" { yylval->string = strdup(yytext); return IDENTIFIER; } YY_BREAK -case 187: +case 138: YY_RULE_SETUP -#line 349 "program_lexer.l" +#line 307 "program_lexer.l" { return DOT_DOT; } YY_BREAK -case 188: +case 139: YY_RULE_SETUP -#line 351 "program_lexer.l" +#line 309 "program_lexer.l" { yylval->integer = strtol(yytext, NULL, 10); return INTEGER; } YY_BREAK -case 189: +case 140: YY_RULE_SETUP -#line 355 "program_lexer.l" +#line 313 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 190: -/* rule 190 can match eol */ +case 141: +/* rule 141 can match eol */ *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 359 "program_lexer.l" +#line 317 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 191: +case 142: YY_RULE_SETUP -#line 363 "program_lexer.l" +#line 321 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 192: +case 143: YY_RULE_SETUP -#line 367 "program_lexer.l" +#line 325 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 193: +case 144: YY_RULE_SETUP -#line 372 "program_lexer.l" +#line 330 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; return MASK4; } YY_BREAK -case 194: +case 145: YY_RULE_SETUP -#line 378 "program_lexer.l" +#line 336 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2407,27 +2235,27 @@ YY_RULE_SETUP return MASK3; } YY_BREAK -case 195: +case 146: YY_RULE_SETUP -#line 384 "program_lexer.l" +#line 342 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; return MASK3; } YY_BREAK -case 196: +case 147: YY_RULE_SETUP -#line 389 "program_lexer.l" +#line 347 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; return MASK3; } YY_BREAK -case 197: +case 148: YY_RULE_SETUP -#line 395 "program_lexer.l" +#line 353 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2435,9 +2263,9 @@ YY_RULE_SETUP return MASK2; } YY_BREAK -case 198: +case 149: YY_RULE_SETUP -#line 401 "program_lexer.l" +#line 359 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2445,18 +2273,18 @@ YY_RULE_SETUP return MASK2; } YY_BREAK -case 199: +case 150: YY_RULE_SETUP -#line 407 "program_lexer.l" +#line 365 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; return MASK2; } YY_BREAK -case 200: +case 151: YY_RULE_SETUP -#line 413 "program_lexer.l" +#line 371 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2464,9 +2292,9 @@ YY_RULE_SETUP return MASK1; } YY_BREAK -case 201: +case 152: YY_RULE_SETUP -#line 420 "program_lexer.l" +#line 378 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2476,18 +2304,18 @@ YY_RULE_SETUP return SWIZZLE; } YY_BREAK -case 202: +case 153: YY_RULE_SETUP -#line 429 "program_lexer.l" +#line 387 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; return_token_or_DOT(require_ARB_fp, MASK4); } YY_BREAK -case 203: +case 154: YY_RULE_SETUP -#line 435 "program_lexer.l" +#line 393 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2495,27 +2323,27 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 204: +case 155: YY_RULE_SETUP -#line 441 "program_lexer.l" +#line 399 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 205: +case 156: YY_RULE_SETUP -#line 446 "program_lexer.l" +#line 404 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 206: +case 157: YY_RULE_SETUP -#line 452 "program_lexer.l" +#line 410 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2523,9 +2351,9 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 207: +case 158: YY_RULE_SETUP -#line 458 "program_lexer.l" +#line 416 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2533,18 +2361,18 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 208: +case 159: YY_RULE_SETUP -#line 464 "program_lexer.l" +#line 422 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 209: +case 160: YY_RULE_SETUP -#line 470 "program_lexer.l" +#line 428 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2552,9 +2380,9 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK1); } YY_BREAK -case 210: +case 161: YY_RULE_SETUP -#line 478 "program_lexer.l" +#line 436 "program_lexer.l" { if (require_ARB_vp) { return TEXGEN_R; @@ -2566,9 +2394,9 @@ YY_RULE_SETUP } } YY_BREAK -case 211: +case 162: YY_RULE_SETUP -#line 489 "program_lexer.l" +#line 447 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2578,15 +2406,15 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, SWIZZLE); } YY_BREAK -case 212: +case 163: YY_RULE_SETUP -#line 498 "program_lexer.l" +#line 456 "program_lexer.l" { return DOT; } YY_BREAK -case 213: -/* rule 213 can match eol */ +case 164: +/* rule 164 can match eol */ YY_RULE_SETUP -#line 500 "program_lexer.l" +#line 458 "program_lexer.l" { yylloc->first_line++; yylloc->first_column = 1; @@ -2595,30 +2423,30 @@ YY_RULE_SETUP yylloc->position++; } YY_BREAK -case 214: +case 165: YY_RULE_SETUP -#line 507 "program_lexer.l" +#line 465 "program_lexer.l" /* eat whitespace */ ; YY_BREAK -case 215: +case 166: *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 508 "program_lexer.l" +#line 466 "program_lexer.l" /* eat comments */ ; YY_BREAK -case 216: +case 167: YY_RULE_SETUP -#line 509 "program_lexer.l" +#line 467 "program_lexer.l" { return yytext[0]; } YY_BREAK -case 217: +case 168: YY_RULE_SETUP -#line 510 "program_lexer.l" +#line 468 "program_lexer.l" ECHO; YY_BREAK -#line 2622 "lex.yy.c" +#line 2450 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2912,7 +2740,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 776 ) + if ( yy_current_state >= 836 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2941,11 +2769,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 776 ) + if ( yy_current_state >= 836 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 775); + yy_is_jam = (yy_current_state == 835); return yy_is_jam ? 0 : yy_current_state; } @@ -3793,7 +3621,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 510 "program_lexer.l" +#line 468 "program_lexer.l" diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l index 62ca9b6db6a..d7493f42fad 100644 --- a/src/mesa/shader/program_lexer.l +++ b/src/mesa/shader/program_lexer.l @@ -55,11 +55,13 @@ } while (0) -#define return_opcode(condition, token, opcode, sat) \ +#define return_opcode(condition, token, opcode, len) \ do { \ - if (condition) { \ + if (condition && \ + _mesa_parse_instruction_suffix(yyextra, \ + yytext + len, \ + & yylval->temp_inst)) { \ yylval->temp_inst.Opcode = OPCODE_ ## opcode; \ - yylval->temp_inst.SaturateMode = SATURATE_ ## sat; \ return token; \ } else { \ yylval->string = strdup(yytext); \ @@ -132,6 +134,11 @@ exp [Ee][-+]?[0-9]+ frac "."[0-9]+ dot "."[ \t]* +sz [HRX]? +szf [HR]? +cc C? +sat (_SAT)? + %option bison-bridge bison-locations reentrant noyywrap %% @@ -149,121 +156,72 @@ OUTPUT { return OUTPUT; } PARAM { return PARAM; } TEMP { yylval->integer = at_temp; return TEMP; } -ABS { return_opcode( 1, VECTOR_OP, ABS, OFF); } -ABS_SAT { return_opcode(require_ARB_fp, VECTOR_OP, ABS, ZERO_ONE); } -ADD { return_opcode( 1, BIN_OP, ADD, OFF); } -ADD_SAT { return_opcode(require_ARB_fp, BIN_OP, ADD, ZERO_ONE); } -ARL { return_opcode(require_ARB_vp, ARL, ARL, OFF); } - -CMP { return_opcode(require_ARB_fp, TRI_OP, CMP, OFF); } -CMP_SAT { return_opcode(require_ARB_fp, TRI_OP, CMP, ZERO_ONE); } -COS { return_opcode(require_ARB_fp, SCALAR_OP, COS, OFF); } -COS_SAT { return_opcode(require_ARB_fp, SCALAR_OP, COS, ZERO_ONE); } - -DDX { return_opcode(require_NV_fp, VECTOR_OP, DDX, OFF); } -DDX_SAT { return_opcode(require_NV_fp, VECTOR_OP, DDX, ZERO_ONE); } -DDY { return_opcode(require_NV_fp, VECTOR_OP, DDY, OFF); } -DDY_SAT { return_opcode(require_NV_fp, VECTOR_OP, DDY, ZERO_ONE); } -DP3 { return_opcode( 1, BIN_OP, DP3, OFF); } -DP3_SAT { return_opcode(require_ARB_fp, BIN_OP, DP3, ZERO_ONE); } -DP4 { return_opcode( 1, BIN_OP, DP4, OFF); } -DP4_SAT { return_opcode(require_ARB_fp, BIN_OP, DP4, ZERO_ONE); } -DPH { return_opcode( 1, BIN_OP, DPH, OFF); } -DPH_SAT { return_opcode(require_ARB_fp, BIN_OP, DPH, ZERO_ONE); } -DST { return_opcode( 1, BIN_OP, DST, OFF); } -DST_SAT { return_opcode(require_ARB_fp, BIN_OP, DST, ZERO_ONE); } - -EX2 { return_opcode( 1, SCALAR_OP, EX2, OFF); } -EX2_SAT { return_opcode(require_ARB_fp, SCALAR_OP, EX2, ZERO_ONE); } -EXP { return_opcode(require_ARB_vp, SCALAR_OP, EXP, OFF); } - -FLR { return_opcode( 1, VECTOR_OP, FLR, OFF); } -FLR_SAT { return_opcode(require_ARB_fp, VECTOR_OP, FLR, ZERO_ONE); } -FRC { return_opcode( 1, VECTOR_OP, FRC, OFF); } -FRC_SAT { return_opcode(require_ARB_fp, VECTOR_OP, FRC, ZERO_ONE); } - -KIL { return_opcode(require_ARB_fp, KIL, KIL, OFF); } - -LIT { return_opcode( 1, VECTOR_OP, LIT, OFF); } -LIT_SAT { return_opcode(require_ARB_fp, VECTOR_OP, LIT, ZERO_ONE); } -LG2 { return_opcode( 1, SCALAR_OP, LG2, OFF); } -LG2_SAT { return_opcode(require_ARB_fp, SCALAR_OP, LG2, ZERO_ONE); } -LOG { return_opcode(require_ARB_vp, SCALAR_OP, LOG, OFF); } -LRP { return_opcode(require_ARB_fp, TRI_OP, LRP, OFF); } -LRP_SAT { return_opcode(require_ARB_fp, TRI_OP, LRP, ZERO_ONE); } - -MAD { return_opcode( 1, TRI_OP, MAD, OFF); } -MAD_SAT { return_opcode(require_ARB_fp, TRI_OP, MAD, ZERO_ONE); } -MAX { return_opcode( 1, BIN_OP, MAX, OFF); } -MAX_SAT { return_opcode(require_ARB_fp, BIN_OP, MAX, ZERO_ONE); } -MIN { return_opcode( 1, BIN_OP, MIN, OFF); } -MIN_SAT { return_opcode(require_ARB_fp, BIN_OP, MIN, ZERO_ONE); } -MOV { return_opcode( 1, VECTOR_OP, MOV, OFF); } -MOV_SAT { return_opcode(require_ARB_fp, VECTOR_OP, MOV, ZERO_ONE); } -MUL { return_opcode( 1, BIN_OP, MUL, OFF); } -MUL_SAT { return_opcode(require_ARB_fp, BIN_OP, MUL, ZERO_ONE); } - -PK2H { return_opcode(require_NV_fp, VECTOR_OP, PK2H, OFF); } -PK2H_SAT { return_opcode(require_NV_fp, VECTOR_OP, PK2H, ZERO_ONE); } -PK2US { return_opcode(require_NV_fp, VECTOR_OP, PK2US, OFF); } -PK2US_SAT { return_opcode(require_NV_fp, VECTOR_OP, PK2US, ZERO_ONE); } -PK4B { return_opcode(require_NV_fp, VECTOR_OP, PK4B, OFF); } -PK4B_SAT { return_opcode(require_NV_fp, VECTOR_OP, PK4B, ZERO_ONE); } -PK4UB { return_opcode(require_NV_fp, VECTOR_OP, PK4UB, OFF); } -PK4UB_SAT { return_opcode(require_NV_fp, VECTOR_OP, PK4UB, ZERO_ONE); } -POW { return_opcode( 1, BINSC_OP, POW, OFF); } -POW_SAT { return_opcode(require_ARB_fp, BINSC_OP, POW, ZERO_ONE); } - -RCP { return_opcode( 1, SCALAR_OP, RCP, OFF); } -RCP_SAT { return_opcode(require_ARB_fp, SCALAR_OP, RCP, ZERO_ONE); } -RFL { return_opcode(require_NV_fp, BIN_OP, RFL, OFF); } -RFL_SAT { return_opcode(require_NV_fp, BIN_OP, RFL, ZERO_ONE); } -RSQ { return_opcode( 1, SCALAR_OP, RSQ, OFF); } -RSQ_SAT { return_opcode(require_ARB_fp, SCALAR_OP, RSQ, ZERO_ONE); } - -SCS { return_opcode(require_ARB_fp, SCALAR_OP, SCS, OFF); } -SCS_SAT { return_opcode(require_ARB_fp, SCALAR_OP, SCS, ZERO_ONE); } -SEQ { return_opcode(require_NV_fp, BIN_OP, SEQ, OFF); } -SEQ_SAT { return_opcode(require_NV_fp, BIN_OP, SEQ, ZERO_ONE); } -SFL { return_opcode(require_NV_fp, BIN_OP, SFL, OFF); } -SFL_SAT { return_opcode(require_NV_fp, BIN_OP, SFL, ZERO_ONE); } -SGE { return_opcode( 1, BIN_OP, SGE, OFF); } -SGE_SAT { return_opcode(require_ARB_fp, BIN_OP, SGE, ZERO_ONE); } -SGT { return_opcode(require_NV_fp, BIN_OP, SGT, OFF); } -SGT_SAT { return_opcode(require_NV_fp, BIN_OP, SGT, ZERO_ONE); } -SIN { return_opcode(require_ARB_fp, SCALAR_OP, SIN, OFF); } -SIN_SAT { return_opcode(require_ARB_fp, SCALAR_OP, SIN, ZERO_ONE); } -SLE { return_opcode(require_NV_fp, BIN_OP, SLE, OFF); } -SLE_SAT { return_opcode(require_NV_fp, BIN_OP, SLE, ZERO_ONE); } -SLT { return_opcode( 1, BIN_OP, SLT, OFF); } -SLT_SAT { return_opcode(require_ARB_fp, BIN_OP, SLT, ZERO_ONE); } -SNE { return_opcode(require_NV_fp, BIN_OP, SNE, OFF); } -SNE_SAT { return_opcode(require_NV_fp, BIN_OP, SNE, ZERO_ONE); } -STR { return_opcode(require_NV_fp, BIN_OP, STR, OFF); } -STR_SAT { return_opcode(require_NV_fp, BIN_OP, STR, ZERO_ONE); } -SUB { return_opcode( 1, BIN_OP, SUB, OFF); } -SUB_SAT { return_opcode(require_ARB_fp, BIN_OP, SUB, ZERO_ONE); } -SWZ { return_opcode( 1, SWZ, SWZ, OFF); } -SWZ_SAT { return_opcode(require_ARB_fp, SWZ, SWZ, ZERO_ONE); } - -TEX { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, OFF); } -TEX_SAT { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, ZERO_ONE); } -TXB { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, OFF); } -TXB_SAT { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, ZERO_ONE); } -TXD { return_opcode(require_NV_fp, TXD_OP, TXD, OFF); } -TXD_SAT { return_opcode(require_NV_fp, TXD_OP, TXD, ZERO_ONE); } -TXP { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, OFF); } -TXP_SAT { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, ZERO_ONE); } - -UP2H { return_opcode(require_NV_fp, SCALAR_OP, UP2H, OFF); } -UP2H_SAT { return_opcode(require_NV_fp, SCALAR_OP, UP2H, ZERO_ONE); } -UP2US { return_opcode(require_NV_fp, SCALAR_OP, UP2US, OFF); } -UP2US_SAT { return_opcode(require_NV_fp, SCALAR_OP, UP2US, ZERO_ONE); } - -X2D { return_opcode(require_NV_fp, TRI_OP, X2D, OFF); } -X2D_SAT { return_opcode(require_NV_fp, TRI_OP, X2D, ZERO_ONE); } -XPD { return_opcode( 1, BIN_OP, XPD, OFF); } -XPD_SAT { return_opcode(require_ARB_fp, BIN_OP, XPD, ZERO_ONE); } +ABS{sz}{cc}{sat} { return_opcode( 1, VECTOR_OP, ABS, 3); } +ADD{sz}{cc}{sat} { return_opcode( 1, BIN_OP, ADD, 3); } +ARL { return_opcode(require_ARB_vp, ARL, ARL, 3); } + +CMP{sat} { return_opcode(require_ARB_fp, TRI_OP, CMP, 3); } +COS{szf}{cc}{sat} { return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); } + +DDX{szf}{cc}{sat} { return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); } +DDY{szf}{cc}{sat} { return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); } +DP3{sz}{cc}{sat} { return_opcode( 1, BIN_OP, DP3, 3); } +DP4{sz}{cc}{sat} { return_opcode( 1, BIN_OP, DP4, 3); } +DPH{sz}{cc}{sat} { return_opcode( 1, BIN_OP, DPH, 3); } +DST{szf}{cc}{sat} { return_opcode( 1, BIN_OP, DST, 3); } + +EX2{szf}{cc}{sat} { return_opcode( 1, SCALAR_OP, EX2, 3); } +EXP { return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); } + +FLR{sz}{cc}{sat} { return_opcode( 1, VECTOR_OP, FLR, 3); } +FRC{sz}{cc}{sat} { return_opcode( 1, VECTOR_OP, FRC, 3); } + +KIL { return_opcode(require_ARB_fp, KIL, KIL, 3); } + +LIT{szf}{cc}{sat} { return_opcode( 1, VECTOR_OP, LIT, 3); } +LG2{szf}{cc}{sat} { return_opcode( 1, SCALAR_OP, LG2, 3); } +LOG { return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); } +LRP{sz}{cc}{sat} { return_opcode(require_ARB_fp, TRI_OP, LRP, 3); } + +MAD{sz}{cc}{sat} { return_opcode( 1, TRI_OP, MAD, 3); } +MAX{sz}{cc}{sat} { return_opcode( 1, BIN_OP, MAX, 3); } +MIN{sz}{cc}{sat} { return_opcode( 1, BIN_OP, MIN, 3); } +MOV{sz}{cc}{sat} { return_opcode( 1, VECTOR_OP, MOV, 3); } +MUL{sz}{cc}{sat} { return_opcode( 1, BIN_OP, MUL, 3); } + +PK2H { return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); } +PK2US { return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); } +PK4B { return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); } +PK4UB { return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); } +POW{szf}{cc}{sat} { return_opcode( 1, BINSC_OP, POW, 3); } + +RCP{szf}{cc}{sat} { return_opcode( 1, SCALAR_OP, RCP, 3); } +RFL{szf}{cc}{sat} { return_opcode(require_NV_fp, BIN_OP, RFL, 3); } +RSQ{szf}{cc}{sat} { return_opcode( 1, SCALAR_OP, RSQ, 3); } + +SCS{sat} { return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); } +SEQ{sz}{cc}{sat} { return_opcode(require_NV_fp, BIN_OP, SEQ, 3); } +SFL{sz}{cc}{sat} { return_opcode(require_NV_fp, BIN_OP, SFL, 3); } +SGE{sz}{cc}{sat} { return_opcode( 1, BIN_OP, SGE, 3); } +SGT{sz}{cc}{sat} { return_opcode(require_NV_fp, BIN_OP, SGT, 3); } +SIN{szf}{cc}{sat} { return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); } +SLE{sz}{cc}{sat} { return_opcode(require_NV_fp, BIN_OP, SLE, 3); } +SLT{sz}{cc}{sat} { return_opcode( 1, BIN_OP, SLT, 3); } +SNE{sz}{cc}{sat} { return_opcode(require_NV_fp, BIN_OP, SNE, 3); } +STR{sz}{cc}{sat} { return_opcode(require_NV_fp, BIN_OP, STR, 3); } +SUB{sz}{cc}{sat} { return_opcode( 1, BIN_OP, SUB, 3); } +SWZ{sat} { return_opcode( 1, SWZ, SWZ, 3); } + +TEX{cc}{sat} { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); } +TXB{cc}{sat} { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); } +TXD{cc}{sat} { return_opcode(require_NV_fp, TXD_OP, TXD, 3); } +TXP{cc}{sat} { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); } + +UP2H{cc}{sat} { return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); } +UP2US{cc}{sat} { return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); } + +X2D{szf}{cc}{sat} { return_opcode(require_NV_fp, TRI_OP, X2D, 3); } +XPD{sat} { return_opcode( 1, BIN_OP, XPD, 3); } vertex { return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } fragment { return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index b9a0e557ada..e741e9a13bd 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -597,16 +597,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 375 +#define YYLAST 383 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 117 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 136 +#define YYNNTS 137 /* YYNRULES -- Number of rules. */ -#define YYNRULES 270 +#define YYNRULES 272 /* YYNRULES -- Number of states. */ -#define YYNSTATES 456 +#define YYNSTATES 458 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -685,11 +685,11 @@ static const yytype_uint16 yyprhs[] = 564, 566, 568, 570, 572, 575, 577, 579, 581, 583, 589, 591, 595, 601, 607, 609, 613, 619, 621, 623, 625, 627, 629, 631, 633, 635, 637, 641, 647, 655, - 665, 668, 671, 673, 675, 676, 677, 681, 682, 686, - 690, 692, 697, 700, 703, 706, 709, 713, 716, 720, - 721, 723, 725, 726, 728, 730, 731, 733, 735, 736, - 738, 740, 741, 745, 746, 750, 751, 755, 757, 759, - 761 + 665, 668, 671, 673, 675, 676, 677, 682, 684, 685, + 686, 690, 694, 696, 702, 705, 708, 711, 714, 718, + 721, 725, 726, 728, 730, 731, 733, 735, 736, 738, + 740, 741, 743, 745, 746, 750, 751, 755, 756, 760, + 762, 764, 766 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -706,7 +706,7 @@ static const yytype_int16 yyrhs[] = 108, 141, -1, 17, 142, 108, 141, 108, 141, 108, 141, -1, 15, 142, 108, 141, 108, 136, 108, 137, -1, 20, 141, -1, 22, 142, 108, 141, 108, 141, - 108, 141, 108, 136, 108, 137, -1, 83, 247, -1, + 108, 141, 108, 136, 108, 137, -1, 83, 248, -1, 84, -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, -1, 93, -1, 94, -1, 95, -1, 21, 142, 108, 147, 108, 144, @@ -715,19 +715,19 @@ static const yytype_int16 yyrhs[] = 147, 160, 109, -1, 148, 161, -1, 156, 158, -1, 145, 108, 145, 108, 145, 108, 145, -1, 233, 146, -1, 23, -1, 99, -1, 99, -1, 164, -1, 149, - 110, 150, 111, -1, 178, -1, 240, -1, 99, -1, + 110, 150, 111, -1, 178, -1, 241, -1, 99, -1, 99, -1, 151, -1, 152, -1, 23, -1, 156, 157, 153, -1, -1, 112, 154, -1, 113, 155, -1, 23, -1, 23, -1, 99, -1, 103, -1, 103, -1, 103, -1, 103, -1, 100, -1, 104, -1, -1, 100, -1, 101, -1, 102, -1, 103, -1, -1, 163, -1, 170, - -1, 234, -1, 236, -1, 239, -1, 252, -1, 7, + -1, 234, -1, 237, -1, 240, -1, 253, -1, 7, 99, 114, 164, -1, 96, 165, -1, 38, 169, -1, - 60, -1, 98, 167, -1, 53, -1, 29, 245, -1, - 37, -1, 74, 246, -1, 50, 110, 168, 111, -1, + 60, -1, 98, 167, -1, 53, -1, 29, 246, -1, + 37, -1, 74, 247, -1, 50, 110, 168, 111, -1, 97, 110, 166, 111, -1, 23, -1, -1, 110, 168, - 111, -1, 23, -1, 60, -1, 29, 245, -1, 37, - -1, 74, 246, -1, 171, -1, 172, -1, 10, 99, + 111, -1, 23, -1, 60, -1, 29, 246, -1, 37, + -1, 74, 247, -1, 171, -1, 172, -1, 10, 99, 174, -1, 10, 99, 110, 173, 111, 175, -1, -1, 23, -1, 114, 177, -1, 114, 115, 176, 116, -1, 179, -1, 176, 108, 179, -1, 181, -1, 217, -1, @@ -736,13 +736,13 @@ static const yytype_int16 yyrhs[] = 182, -1, 73, 184, -1, 73, 187, -1, 73, 189, -1, 73, 195, -1, 73, 191, -1, 73, 198, -1, 73, 200, -1, 73, 202, -1, 73, 204, -1, 73, - 216, -1, 47, 244, 183, -1, 193, -1, 33, -1, + 216, -1, 47, 245, 183, -1, 193, -1, 33, -1, 69, -1, 43, 110, 194, 111, 185, -1, 193, -1, 60, -1, 26, -1, 72, 186, -1, 40, -1, 32, - -1, 44, 188, -1, 25, -1, 244, 67, -1, 45, - 110, 194, 111, 244, 190, -1, 193, -1, 75, 248, + -1, 44, 188, -1, 25, -1, 245, 67, -1, 45, + 110, 194, 111, 245, 190, -1, 193, -1, 75, 249, 192, -1, 29, -1, 25, -1, 31, -1, 71, -1, - 23, -1, 76, 246, 196, 197, -1, 35, -1, 54, + 23, -1, 76, 247, 196, 197, -1, 35, -1, 54, -1, 79, -1, 80, -1, 78, -1, 77, -1, 36, 199, -1, 29, -1, 56, -1, 28, 110, 201, 111, 57, -1, 23, -1, 58, 203, -1, 70, -1, 26, @@ -750,7 +750,7 @@ static const yytype_int16 yyrhs[] = -1, 66, 110, 210, 105, 210, 111, -1, 49, 211, 208, -1, -1, 209, -1, 41, -1, 82, -1, 42, -1, 23, -1, 51, 212, -1, 63, -1, 52, -1, - 81, 246, -1, 55, 110, 214, 111, -1, 48, 110, + 81, 247, -1, 55, 110, 214, 111, -1, 48, 110, 215, 111, -1, -1, 213, -1, 23, -1, 23, -1, 23, -1, 30, 64, -1, 221, -1, 224, -1, 219, -1, 222, -1, 62, 34, 110, 220, 111, -1, 225, @@ -762,16 +762,17 @@ static const yytype_int16 yyrhs[] = -1, 115, 232, 108, 232, 116, -1, 115, 232, 108, 232, 108, 232, 116, -1, 115, 232, 108, 232, 108, 232, 108, 232, 116, -1, 233, 24, -1, 233, 23, - -1, 112, -1, 113, -1, -1, -1, 11, 235, 238, - -1, -1, 5, 237, 238, -1, 238, 108, 99, -1, - 99, -1, 9, 99, 114, 240, -1, 65, 60, -1, - 65, 37, -1, 65, 241, -1, 65, 59, -1, 65, - 74, 246, -1, 65, 30, -1, 29, 242, 243, -1, - -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, - -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, - -1, 110, 249, 111, -1, -1, 110, 250, 111, -1, - -1, 110, 251, 111, -1, 23, -1, 23, -1, 23, - -1, 6, 99, 114, 99, -1 + -1, 112, -1, 113, -1, -1, -1, 236, 11, 235, + 239, -1, 99, -1, -1, -1, 5, 238, 239, -1, + 239, 108, 99, -1, 99, -1, 236, 9, 99, 114, + 241, -1, 65, 60, -1, 65, 37, -1, 65, 242, + -1, 65, 59, -1, 65, 74, 247, -1, 65, 30, + -1, 29, 243, 244, -1, -1, 39, -1, 27, -1, + -1, 61, -1, 68, -1, -1, 39, -1, 27, -1, + -1, 61, -1, 68, -1, -1, 110, 250, 111, -1, + -1, 110, 251, 111, -1, -1, 110, 252, 111, -1, + 23, -1, 23, -1, 23, -1, 6, 99, 114, 99, + -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -800,11 +801,11 @@ static const yytype_uint16 yyrline[] = 1598, 1603, 1616, 1624, 1635, 1643, 1643, 1645, 1645, 1647, 1657, 1662, 1669, 1679, 1688, 1693, 1700, 1710, 1720, 1732, 1732, 1733, 1733, 1735, 1745, 1753, 1763, 1771, 1779, 1788, - 1799, 1803, 1809, 1810, 1811, 1814, 1814, 1817, 1817, 1820, - 1826, 1834, 1847, 1856, 1865, 1869, 1878, 1887, 1898, 1905, - 1910, 1919, 1931, 1934, 1943, 1954, 1955, 1956, 1959, 1960, - 1961, 1964, 1965, 1968, 1969, 1972, 1973, 1976, 1987, 1998, - 2009 + 1799, 1803, 1809, 1810, 1811, 1814, 1814, 1817, 1852, 1856, + 1856, 1859, 1865, 1873, 1886, 1895, 1904, 1908, 1917, 1926, + 1937, 1944, 1949, 1958, 1970, 1973, 1982, 1993, 1994, 1995, + 1998, 1999, 2000, 2003, 2004, 2007, 2008, 2011, 2012, 2015, + 2026, 2037, 2048 }; #endif @@ -866,9 +867,10 @@ static const char *const yytname[] = "progLocalParam", "progEnvParamNum", "progLocalParamNum", "paramConstDecl", "paramConstUse", "paramConstScalarDecl", "paramConstScalarUse", "paramConstVector", "signedFloatConstant", - "optionalSign", "TEMP_statement", "@1", "ADDRESS_statement", "@2", - "varNameList", "OUTPUT_statement", "resultBinding", "resultColBinding", - "optResultFaceType", "optResultColorType", "optFaceType", "optColorType", + "optionalSign", "TEMP_statement", "@1", "optVarSize", + "ADDRESS_statement", "@2", "varNameList", "OUTPUT_statement", + "resultBinding", "resultColBinding", "optResultFaceType", + "optResultColorType", "optFaceType", "optColorType", "optTexCoordUnitNum", "optTexImageUnitNum", "optLegacyTexUnitNum", "texCoordUnitNum", "texImageUnitNum", "legacyTexUnitNum", "ALIAS_statement", 0 @@ -921,11 +923,11 @@ static const yytype_uint8 yyr1[] = 212, 213, 214, 215, 216, 217, 217, 218, 218, 219, 220, 220, 221, 222, 223, 223, 224, 225, 226, 227, 227, 228, 228, 229, 230, 230, 231, 231, 231, 231, - 232, 232, 233, 233, 233, 235, 234, 237, 236, 238, - 238, 239, 240, 240, 240, 240, 240, 240, 241, 242, - 242, 242, 243, 243, 243, 244, 244, 244, 245, 245, - 245, 246, 246, 247, 247, 248, 248, 249, 250, 251, - 252 + 232, 232, 233, 233, 233, 235, 234, 236, 236, 238, + 237, 239, 239, 240, 241, 241, 241, 241, 241, 241, + 242, 243, 243, 243, 244, 244, 244, 245, 245, 245, + 246, 246, 246, 247, 247, 248, 248, 249, 249, 250, + 251, 252, 253 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -954,11 +956,11 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 2, 1, 1, 1, 1, 5, 1, 3, 5, 5, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 7, 9, - 2, 2, 1, 1, 0, 0, 3, 0, 3, 3, - 1, 4, 2, 2, 2, 2, 3, 2, 3, 0, - 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, - 1, 0, 3, 0, 3, 0, 3, 1, 1, 1, - 4 + 2, 2, 1, 1, 0, 0, 4, 1, 0, 0, + 3, 3, 1, 5, 2, 2, 2, 2, 3, 2, + 3, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 3, 0, 3, 0, 3, 1, + 1, 1, 4 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -966,143 +968,143 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 3, 4, 0, 6, 1, 9, 0, 5, 0, - 0, 237, 0, 0, 0, 0, 235, 2, 0, 0, - 0, 0, 0, 0, 0, 234, 0, 0, 8, 0, - 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, - 23, 20, 0, 88, 89, 113, 114, 90, 91, 92, - 93, 7, 0, 0, 0, 0, 0, 0, 0, 64, - 0, 87, 63, 0, 0, 0, 0, 0, 75, 0, - 0, 232, 233, 31, 0, 0, 0, 10, 11, 240, - 238, 0, 0, 0, 117, 234, 115, 236, 249, 247, - 243, 245, 242, 261, 244, 234, 83, 84, 85, 86, - 53, 234, 234, 234, 234, 234, 234, 77, 54, 225, - 224, 0, 0, 0, 0, 59, 0, 234, 82, 0, - 60, 62, 126, 127, 205, 206, 128, 221, 222, 0, - 234, 0, 270, 94, 241, 118, 0, 119, 123, 124, - 125, 219, 220, 223, 0, 251, 250, 252, 0, 246, - 0, 0, 0, 0, 26, 0, 25, 24, 258, 111, - 109, 261, 96, 0, 0, 0, 0, 0, 0, 255, - 0, 255, 0, 0, 265, 261, 134, 135, 136, 137, - 139, 138, 140, 141, 142, 143, 0, 144, 258, 101, - 0, 99, 97, 261, 0, 106, 95, 82, 0, 80, - 79, 81, 51, 0, 0, 0, 239, 0, 231, 230, - 253, 254, 248, 267, 0, 234, 234, 0, 47, 0, - 50, 0, 234, 259, 260, 110, 112, 0, 0, 0, - 204, 175, 176, 174, 0, 157, 257, 256, 156, 0, - 0, 0, 0, 199, 195, 0, 194, 261, 187, 181, - 180, 179, 0, 0, 0, 0, 100, 0, 102, 0, - 0, 98, 0, 234, 226, 68, 0, 66, 67, 0, - 234, 234, 0, 116, 262, 28, 27, 0, 78, 49, - 263, 0, 0, 217, 0, 218, 0, 178, 0, 166, - 0, 158, 0, 163, 164, 147, 148, 165, 145, 146, - 0, 201, 193, 200, 0, 196, 189, 191, 190, 186, - 188, 269, 0, 162, 161, 168, 169, 0, 0, 108, - 0, 105, 0, 0, 52, 0, 61, 76, 70, 46, - 0, 0, 0, 234, 48, 0, 33, 0, 234, 212, - 216, 0, 0, 255, 203, 0, 202, 0, 266, 173, - 172, 170, 171, 167, 192, 0, 103, 104, 107, 234, - 227, 0, 0, 69, 234, 57, 58, 56, 234, 0, - 0, 0, 121, 129, 132, 130, 207, 208, 131, 268, - 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 30, 29, 177, 152, 154, 151, 0, - 149, 150, 0, 198, 197, 182, 0, 73, 71, 74, - 72, 0, 0, 0, 0, 133, 184, 234, 120, 264, - 155, 153, 159, 160, 234, 228, 234, 0, 0, 0, - 0, 183, 122, 0, 0, 0, 0, 210, 0, 214, - 0, 229, 234, 0, 209, 0, 213, 0, 0, 55, - 32, 211, 215, 0, 0, 185 + 0, 3, 4, 0, 6, 1, 9, 0, 5, 238, + 0, 239, 0, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 234, 0, 0, 237, 8, 0, 12, + 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, + 20, 0, 88, 89, 113, 114, 90, 0, 91, 92, + 93, 7, 0, 0, 0, 0, 0, 64, 0, 87, + 63, 0, 0, 0, 0, 0, 75, 0, 0, 232, + 233, 31, 0, 0, 0, 10, 11, 0, 235, 242, + 240, 0, 0, 117, 234, 115, 251, 249, 245, 247, + 244, 263, 246, 234, 83, 84, 85, 86, 53, 234, + 234, 234, 234, 234, 234, 77, 54, 225, 224, 0, + 0, 0, 0, 59, 0, 234, 82, 0, 60, 62, + 126, 127, 205, 206, 128, 221, 222, 0, 234, 0, + 0, 0, 272, 94, 118, 0, 119, 123, 124, 125, + 219, 220, 223, 0, 253, 252, 254, 0, 248, 0, + 0, 0, 0, 26, 0, 25, 24, 260, 111, 109, + 263, 96, 0, 0, 0, 0, 0, 0, 257, 0, + 257, 0, 0, 267, 263, 134, 135, 136, 137, 139, + 138, 140, 141, 142, 143, 0, 144, 260, 101, 0, + 99, 97, 263, 0, 106, 95, 82, 0, 80, 79, + 81, 51, 0, 0, 0, 0, 236, 241, 0, 231, + 230, 255, 256, 250, 269, 0, 234, 234, 0, 47, + 0, 50, 0, 234, 261, 262, 110, 112, 0, 0, + 0, 204, 175, 176, 174, 0, 157, 259, 258, 156, + 0, 0, 0, 0, 199, 195, 0, 194, 263, 187, + 181, 180, 179, 0, 0, 0, 0, 100, 0, 102, + 0, 0, 98, 0, 234, 226, 68, 0, 66, 67, + 0, 234, 234, 243, 0, 116, 264, 28, 27, 0, + 78, 49, 265, 0, 0, 217, 0, 218, 0, 178, + 0, 166, 0, 158, 0, 163, 164, 147, 148, 165, + 145, 146, 0, 201, 193, 200, 0, 196, 189, 191, + 190, 186, 188, 271, 0, 162, 161, 168, 169, 0, + 0, 108, 0, 105, 0, 0, 52, 0, 61, 76, + 70, 46, 0, 0, 0, 234, 48, 0, 33, 0, + 234, 212, 216, 0, 0, 257, 203, 0, 202, 0, + 268, 173, 172, 170, 171, 167, 192, 0, 103, 104, + 107, 234, 227, 0, 0, 69, 234, 57, 58, 56, + 234, 0, 0, 0, 121, 129, 132, 130, 207, 208, + 131, 270, 0, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 30, 29, 177, 152, 154, + 151, 0, 149, 150, 0, 198, 197, 182, 0, 73, + 71, 74, 72, 0, 0, 0, 0, 133, 184, 234, + 120, 266, 155, 153, 159, 160, 234, 228, 234, 0, + 0, 0, 0, 183, 122, 0, 0, 0, 0, 210, + 0, 214, 0, 229, 234, 0, 209, 0, 213, 0, + 0, 55, 32, 211, 215, 0, 0, 185 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 3, 4, 6, 8, 9, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 281, - 393, 41, 151, 218, 73, 60, 69, 329, 330, 367, - 219, 61, 119, 266, 267, 268, 363, 408, 410, 70, - 328, 108, 279, 202, 100, 42, 43, 120, 196, 322, - 261, 320, 162, 44, 45, 46, 136, 86, 273, 371, - 137, 121, 372, 373, 122, 176, 298, 177, 400, 421, - 178, 238, 179, 422, 180, 314, 299, 290, 181, 317, - 353, 182, 233, 183, 288, 184, 251, 185, 415, 431, - 186, 309, 310, 355, 248, 302, 303, 347, 345, 187, - 123, 375, 376, 436, 124, 377, 438, 125, 284, 286, - 378, 126, 141, 127, 128, 143, 74, 47, 57, 48, - 52, 80, 49, 62, 94, 147, 212, 239, 225, 149, - 336, 253, 214, 380, 312, 50 + -1, 3, 4, 6, 8, 9, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 283, + 395, 40, 150, 219, 71, 58, 67, 331, 332, 369, + 220, 59, 117, 267, 268, 269, 365, 410, 412, 68, + 330, 106, 281, 201, 98, 41, 42, 118, 195, 324, + 262, 322, 161, 43, 44, 45, 135, 85, 275, 373, + 136, 119, 374, 375, 120, 175, 300, 176, 402, 423, + 177, 239, 178, 424, 179, 316, 301, 292, 180, 319, + 355, 181, 234, 182, 290, 183, 252, 184, 417, 433, + 185, 311, 312, 357, 249, 304, 305, 349, 347, 186, + 121, 377, 378, 438, 122, 379, 440, 123, 286, 288, + 380, 124, 140, 125, 126, 142, 72, 46, 130, 47, + 48, 52, 80, 49, 60, 92, 146, 213, 240, 226, + 148, 338, 254, 215, 382, 314, 50 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -403 +#define YYPACT_NINF -386 static const yytype_int16 yypact[] = { - 62, -403, -403, 41, -403, -403, 81, -36, -403, 198, - -8, -403, -5, 18, 20, 35, -403, -403, -23, -23, - -23, -23, -23, -23, 45, 131, -23, -23, -403, 58, - -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, - -403, -403, 67, -403, -403, -403, -403, -403, -403, -403, - -403, -403, 63, 86, 92, 128, 84, 63, 99, -403, - 69, 133, -403, 87, 89, 129, 145, 146, -403, 147, - 154, -403, -403, -403, -13, 150, 151, -403, -403, -403, - 152, 162, -14, 197, 240, -34, -403, 152, 98, -403, - -403, -403, -403, 155, -403, 131, -403, -403, -403, -403, - -403, 131, 131, 131, 131, 131, 131, -403, -403, -403, - -403, 72, 105, 77, 17, 156, 12, 131, 68, 157, - -403, -403, -403, -403, -403, -403, -403, -403, -403, 12, - 131, 165, -403, -403, -403, -403, 158, -403, -403, -403, - -403, -403, -403, -403, 223, -403, -403, -16, 245, -403, - 163, 164, -9, 167, -403, 168, -403, -403, 55, -403, - -403, 155, -403, 170, 171, 172, 206, 2, 173, 34, - 174, 127, 112, 1, 175, 155, -403, -403, -403, -403, - -403, -403, -403, -403, -403, -403, 207, -403, 55, -403, - 177, -403, -403, 155, 178, 179, -403, 68, 22, -403, - -403, -403, -403, -6, 169, 182, -403, 180, -403, -403, - -403, -403, -403, -403, 181, 131, 131, 12, -403, 188, - 190, 195, 131, -403, -403, -403, -403, 272, 273, 274, - -403, -403, -403, -403, 275, -403, -403, -403, -403, 232, - 275, 79, 191, 277, -403, 192, -403, 155, 15, -403, - -403, -403, 280, 276, 8, 194, -403, 283, -403, 284, - 283, -403, 199, 131, -403, -403, 200, -403, -403, 209, - 131, 131, 201, -403, -403, -403, -403, 204, -403, -403, - 205, 210, 211, -403, 203, -403, 212, -403, 213, -403, - 214, -403, 215, -403, -403, -403, -403, -403, -403, -403, - 286, -403, -403, -403, 294, -403, -403, -403, -403, -403, - -403, -403, 216, -403, -403, -403, -403, 161, 297, -403, - 217, -403, 218, 219, -403, 76, -403, -403, 139, -403, - 227, -4, 228, 30, -403, 298, -403, 137, 131, -403, - -403, 265, 130, 127, -403, 220, -403, 226, -403, -403, - -403, -403, -403, -403, -403, 229, -403, -403, -403, 131, - -403, 315, 319, -403, 131, -403, -403, -403, 131, 123, - 77, 80, -403, -403, -403, -403, -403, -403, -403, -403, - 233, -403, -403, -403, -403, -403, -403, -403, -403, -403, - -403, -403, -403, -403, -403, -403, -403, -403, -403, 311, - -403, -403, 9, -403, -403, -403, 83, -403, -403, -403, - -403, 237, 238, 239, 241, -403, 281, 30, -403, -403, - -403, -403, -403, -403, 131, -403, 131, 195, 272, 273, - 242, -403, -403, 234, 246, 247, 248, 243, 249, 251, - 297, -403, 131, 137, -403, 272, -403, 273, 36, -403, - -403, -403, -403, 297, 250, -403 + 203, -386, -386, 23, -386, -386, 67, -50, -386, 20, + 16, -386, 21, 37, 48, -386, -19, -19, -19, -19, + -19, -19, 58, 131, -19, -19, -386, -386, 53, -386, + -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, + -386, 64, -386, -386, -386, -386, -386, 229, -386, -386, + -386, -386, 77, 81, 89, 78, 95, -386, 75, 130, + -386, 119, 139, 140, 142, 146, -386, 147, 136, -386, + -386, -386, -14, 148, 149, -386, -386, 159, -386, -386, + 152, 162, -20, 239, -6, -386, 31, -386, -386, -386, + -386, 153, -386, 131, -386, -386, -386, -386, -386, 131, + 131, 131, 131, 131, 131, -386, -386, -386, -386, 28, + 50, 123, 40, 154, 30, 131, 101, 155, -386, -386, + -386, -386, -386, -386, -386, -386, -386, 30, 131, 156, + 77, 167, -386, -386, -386, 158, -386, -386, -386, -386, + -386, -386, -386, 218, -386, -386, 13, 244, -386, 160, + 163, -10, 164, -386, 165, -386, -386, 73, -386, -386, + 153, -386, 166, 168, 169, 210, 42, 170, 91, 171, + 100, 145, 38, 173, 153, -386, -386, -386, -386, -386, + -386, -386, -386, -386, -386, 209, -386, 73, -386, 174, + -386, -386, 153, 175, 176, -386, 101, 57, -386, -386, + -386, -386, -16, 179, 180, 225, 152, -386, 177, -386, + -386, -386, -386, -386, -386, 181, 131, 131, 30, -386, + 190, 191, 212, 131, -386, -386, -386, -386, 273, 274, + 275, -386, -386, -386, -386, 276, -386, -386, -386, -386, + 233, 276, 115, 192, 278, -386, 193, -386, 153, 9, + -386, -386, -386, 281, 277, 25, 195, -386, 284, -386, + 285, 284, -386, 200, 131, -386, -386, 199, -386, -386, + 208, 131, 131, -386, 197, -386, -386, -386, -386, 206, + -386, -386, 207, 205, 211, -386, 213, -386, 214, -386, + 215, -386, 216, -386, 217, -386, -386, -386, -386, -386, + -386, -386, 293, -386, -386, -386, 295, -386, -386, -386, + -386, -386, -386, -386, 219, -386, -386, -386, -386, 157, + 297, -386, 220, -386, 221, 222, -386, 66, -386, -386, + 133, -386, 226, -12, 230, 49, -386, 298, -386, 125, + 131, -386, -386, 265, 118, 100, -386, 228, -386, 232, + -386, -386, -386, -386, -386, -386, -386, 234, -386, -386, + -386, 131, -386, 300, 306, -386, 131, -386, -386, -386, + 131, 129, 123, 69, -386, -386, -386, -386, -386, -386, + -386, -386, 235, -386, -386, -386, -386, -386, -386, -386, + -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, + -386, 308, -386, -386, 41, -386, -386, -386, 86, -386, + -386, -386, -386, 240, 241, 231, 237, -386, 286, 49, + -386, -386, -386, -386, -386, -386, 131, -386, 131, 212, + 273, 274, 243, -386, -386, 238, 242, 247, 245, 246, + 248, 252, 297, -386, 131, 125, -386, 273, -386, 274, + 45, -386, -386, -386, -386, 297, 250, -386 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, - -403, -403, -403, -403, -403, -403, -403, -403, -403, -74, - -81, -403, -98, 141, -82, 160, -403, -403, -358, -403, - -41, -403, -403, -403, -403, -403, -403, -403, -403, 166, - -403, -403, -403, 176, -403, -403, -403, 282, -403, -403, - -403, 103, -403, -403, -403, -403, -403, -403, -403, -403, - -403, -403, -52, -403, -84, -403, -403, -403, -403, -403, - -403, -403, -403, -403, -403, -403, -333, 126, -403, -403, - -403, -403, -403, -403, -403, -403, -403, -403, -403, -403, - -3, -403, -403, -402, -403, -403, -403, -403, -403, -403, - 285, -403, -403, -403, -403, -403, -403, -403, -398, -392, - 287, -403, -403, -145, -83, -114, -85, -403, -403, -403, - -403, 314, -403, 291, -403, -403, -403, -167, 187, -149, - -403, -403, -403, -403, -403, -403 + -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, + -386, -386, -386, -386, -386, -386, -386, -386, -386, -71, + -80, -386, -96, 144, -81, 204, -386, -386, -350, -386, + -17, -386, -386, -386, -386, -386, -386, -386, -386, 161, + -386, -386, -386, 172, -386, -386, -386, 282, -386, -386, + -386, 105, -386, -386, -386, -386, -386, -386, -386, -386, + -386, -386, -52, -386, -83, -386, -386, -386, -386, -386, + -386, -386, -386, -386, -386, -386, -300, 128, -386, -386, + -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, + -2, -386, -386, -327, -386, -386, -386, -386, -386, -386, + 287, -386, -386, -386, -386, -386, -386, -386, -385, -318, + 288, -386, -386, -145, -82, -112, -84, -386, -386, -386, + -386, -386, 249, -386, 178, -386, -386, -386, -166, 186, + -131, -386, -386, -386, -386, -386, -386 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1112,86 +1114,88 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -222 static const yytype_int16 yytable[] = { - 144, 138, 142, 198, 241, 154, 411, 220, 157, 401, - 109, 110, 226, 150, 109, 110, 152, 265, 152, 365, - 153, 152, 155, 156, 111, 111, 254, 249, 112, 111, - 437, 231, 144, 118, 293, 109, 110, 439, 448, 113, - 294, 5, 58, 315, 258, 210, 188, 451, 205, 112, - 111, 454, 211, 112, 189, 452, 306, 307, 232, 235, - 113, 236, 316, 10, 113, 1, 2, 190, 434, 423, - 191, 250, 220, 237, 112, 197, 59, 192, 71, 72, - 297, 117, 114, 114, 449, 113, 115, 114, 204, 7, - 115, 193, 369, 68, 53, 366, 116, 308, 305, 51, - 217, 158, 117, 370, 293, 165, 117, 166, 114, 159, - 294, 115, 295, 167, 194, 195, 223, 54, 276, 55, - 168, 169, 170, 224, 171, 145, 172, 117, 88, 89, - 263, 152, 160, 275, 56, 173, 90, 146, 264, 163, - 282, 453, 71, 72, 68, 117, 161, 405, 296, 325, - 297, 164, 174, 175, 236, 293, 396, 413, 91, 92, - 242, 294, 79, 243, 244, 77, 237, 245, 199, 414, - 397, 200, 201, 93, 78, 246, 402, 95, 144, 63, - 64, 65, 66, 67, 359, 331, 75, 76, 417, 332, - 398, 424, 360, 247, 84, 101, 418, 102, 85, 425, - 81, 297, 399, 11, 12, 13, 82, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 381, 382, 383, 384, 385, 386, 387, 388, 389, - 390, 391, 392, 96, 97, 98, 99, 103, 349, 350, - 351, 352, 83, 71, 72, 406, 208, 209, 144, 374, - 142, 361, 362, 104, 105, 106, 394, 107, 129, 130, - 131, 132, 58, 135, 206, 148, -65, 203, 213, 207, - 230, 215, 216, 255, 144, 221, 222, 270, 280, 331, - 227, 228, 229, 234, 240, 252, 412, 257, 259, 260, - 271, 278, 274, -221, 272, 283, 285, 287, 289, 291, - 301, 300, 304, 311, 318, 313, 319, 321, 324, 344, - 433, 326, 327, 334, 339, 335, 333, 346, 337, 338, - 354, 379, 395, 340, 341, 342, 343, 348, 356, 357, - 358, 403, 144, 374, 142, 364, 368, 404, 407, 144, - 405, 331, 409, 420, 419, 426, 427, 430, 445, 428, - 441, 429, 440, 435, 442, 443, 447, 331, 277, 444, - 446, 455, 450, 323, 133, 432, 292, 416, 0, 269, - 139, 87, 140, 262, 134, 256 + 143, 137, 141, 197, 242, 153, 221, 266, 156, 107, + 108, 367, 149, 107, 108, 151, 413, 151, 109, 152, + 151, 154, 155, 5, 109, 11, 12, 13, 109, 227, + 14, 143, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 255, 403, 439, 56, 204, 110, 10, + 308, 309, 110, 107, 108, 116, 110, 157, 144, 111, + 317, 259, 453, 111, 250, 158, 295, 111, 109, 187, + 145, 232, 296, 221, 211, 7, 112, 188, 436, 318, + 57, 212, 112, 66, 162, 113, 112, 368, 159, 113, + 189, 310, 110, 190, 451, 114, 163, 196, 233, 218, + 191, 115, 160, 111, 425, 115, 69, 70, 251, 115, + 203, 371, 299, 441, 192, 450, 236, 307, 237, 26, + 53, 278, 372, 51, 86, 87, 112, 237, 456, 113, + 238, 454, 88, 151, 224, 277, 54, 193, 194, 238, + 295, 225, 284, 295, 398, 115, 296, 55, 297, 296, + 455, 164, 327, 165, 89, 90, 407, 66, 399, 166, + 75, 69, 70, 415, 115, 264, 167, 168, 169, 91, + 170, 76, 171, 265, 361, 416, 79, 419, 400, 404, + 143, 172, 362, 93, 298, 420, 299, 333, 83, 299, + 401, 334, 84, 243, 426, 81, 244, 245, 173, 174, + 246, 198, 427, 82, 199, 200, 1, 2, 247, 383, + 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 61, 62, 63, 64, 65, 248, 99, 73, 74, + 94, 95, 96, 97, 351, 352, 353, 354, 77, 105, + 78, 209, 210, 69, 70, 363, 364, 100, 101, 408, + 102, 143, 376, 141, 103, 104, 127, 128, 129, 396, + 131, 132, 134, 147, -65, 202, 207, 214, 216, 208, + 205, 217, 222, 223, 231, 256, 228, 143, 229, 230, + 235, 241, 333, 253, 258, 260, 261, 271, 272, 414, + 56, 274, 276, 280, -221, 282, 285, 287, 289, 291, + 293, 303, 302, 306, 313, 320, 315, 321, 323, 326, + 328, 329, 335, 339, 435, 336, 346, 337, 348, 340, + 356, 381, 397, 409, 341, 342, 343, 344, 345, 411, + 350, 358, 359, 360, 366, 143, 376, 141, 370, 405, + 422, 430, 143, 406, 333, 407, 421, 431, 428, 429, + 444, 447, 432, 442, 443, 445, 446, 449, 437, 448, + 333, 457, 279, 270, 133, 452, 325, 434, 263, 294, + 418, 138, 139, 257, 0, 0, 0, 0, 0, 206, + 0, 0, 0, 273 }; static const yytype_int16 yycheck[] = { - 85, 85, 85, 117, 171, 103, 364, 152, 106, 342, - 23, 24, 161, 95, 23, 24, 101, 23, 103, 23, - 102, 106, 104, 105, 38, 38, 175, 26, 62, 38, - 428, 29, 117, 74, 25, 23, 24, 429, 440, 73, - 31, 0, 65, 35, 193, 61, 29, 445, 130, 62, - 38, 453, 68, 62, 37, 447, 41, 42, 56, 25, - 73, 27, 54, 99, 73, 3, 4, 50, 426, 402, - 53, 70, 217, 39, 62, 116, 99, 60, 112, 113, - 71, 115, 96, 96, 442, 73, 99, 96, 129, 8, - 99, 74, 62, 99, 99, 99, 109, 82, 247, 107, - 109, 29, 115, 73, 25, 28, 115, 30, 96, 37, - 31, 99, 33, 36, 97, 98, 61, 99, 216, 99, - 43, 44, 45, 68, 47, 27, 49, 115, 29, 30, - 108, 216, 60, 215, 99, 58, 37, 39, 116, 34, - 222, 105, 112, 113, 99, 115, 74, 111, 69, 263, - 71, 46, 75, 76, 27, 25, 26, 34, 59, 60, - 48, 31, 99, 51, 52, 107, 39, 55, 100, 46, - 40, 103, 104, 74, 107, 63, 343, 108, 263, 19, - 20, 21, 22, 23, 108, 270, 26, 27, 108, 271, - 60, 108, 116, 81, 110, 108, 116, 108, 114, 116, - 114, 71, 72, 5, 6, 7, 114, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 100, 101, 102, 103, 108, 77, 78, - 79, 80, 114, 112, 113, 359, 23, 24, 333, 333, - 333, 112, 113, 108, 108, 108, 338, 103, 108, 108, - 108, 99, 65, 23, 99, 110, 110, 110, 23, 111, - 64, 108, 108, 66, 359, 108, 108, 108, 83, 364, - 110, 110, 110, 110, 110, 110, 368, 110, 110, 110, - 108, 103, 111, 103, 114, 23, 23, 23, 23, 67, - 23, 110, 110, 23, 110, 29, 23, 23, 109, 23, - 424, 111, 103, 109, 111, 110, 115, 23, 108, 108, - 23, 23, 57, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 417, 417, 417, 108, 108, 111, 23, 424, - 111, 426, 23, 32, 111, 108, 108, 66, 105, 110, - 116, 110, 110, 427, 108, 108, 105, 442, 217, 111, - 111, 111, 443, 260, 82, 417, 240, 370, -1, 203, - 85, 57, 85, 197, 83, 188 + 84, 84, 84, 115, 170, 101, 151, 23, 104, 23, + 24, 23, 93, 23, 24, 99, 366, 101, 38, 100, + 104, 102, 103, 0, 38, 5, 6, 7, 38, 160, + 10, 115, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 174, 344, 430, 65, 128, 62, 99, + 41, 42, 62, 23, 24, 72, 62, 29, 27, 73, + 35, 192, 447, 73, 26, 37, 25, 73, 38, 29, + 39, 29, 31, 218, 61, 8, 96, 37, 428, 54, + 99, 68, 96, 99, 34, 99, 96, 99, 60, 99, + 50, 82, 62, 53, 444, 109, 46, 114, 56, 109, + 60, 115, 74, 73, 404, 115, 112, 113, 70, 115, + 127, 62, 71, 431, 74, 442, 25, 248, 27, 99, + 99, 217, 73, 107, 29, 30, 96, 27, 455, 99, + 39, 449, 37, 217, 61, 216, 99, 97, 98, 39, + 25, 68, 223, 25, 26, 115, 31, 99, 33, 31, + 105, 28, 264, 30, 59, 60, 111, 99, 40, 36, + 107, 112, 113, 34, 115, 108, 43, 44, 45, 74, + 47, 107, 49, 116, 108, 46, 99, 108, 60, 345, + 264, 58, 116, 108, 69, 116, 71, 271, 110, 71, + 72, 272, 114, 48, 108, 114, 51, 52, 75, 76, + 55, 100, 116, 114, 103, 104, 3, 4, 63, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 17, 18, 19, 20, 21, 81, 108, 24, 25, + 100, 101, 102, 103, 77, 78, 79, 80, 9, 103, + 11, 23, 24, 112, 113, 112, 113, 108, 108, 361, + 108, 335, 335, 335, 108, 108, 108, 108, 99, 340, + 108, 99, 23, 110, 110, 110, 99, 23, 108, 111, + 114, 108, 108, 108, 64, 66, 110, 361, 110, 110, + 110, 110, 366, 110, 110, 110, 110, 108, 108, 370, + 65, 114, 111, 103, 103, 83, 23, 23, 23, 23, + 67, 23, 110, 110, 23, 110, 29, 23, 23, 109, + 111, 103, 115, 108, 426, 109, 23, 110, 23, 108, + 23, 23, 57, 23, 111, 111, 111, 111, 111, 23, + 111, 111, 111, 111, 108, 419, 419, 419, 108, 111, + 32, 110, 426, 111, 428, 111, 111, 110, 108, 108, + 108, 105, 66, 110, 116, 108, 111, 105, 429, 111, + 444, 111, 218, 202, 82, 445, 261, 419, 196, 241, + 372, 84, 84, 187, -1, -1, -1, -1, -1, 130, + -1, -1, -1, 205 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1199,51 +1203,51 @@ static const yytype_int16 yycheck[] = static const yytype_uint8 yystos[] = { 0, 3, 4, 118, 119, 0, 120, 8, 121, 122, - 99, 5, 6, 7, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 138, 162, 163, 170, 171, 172, 234, 236, 239, - 252, 107, 237, 99, 99, 99, 99, 235, 65, 99, - 142, 148, 240, 142, 142, 142, 142, 142, 99, 143, - 156, 112, 113, 141, 233, 142, 142, 107, 107, 99, - 238, 114, 114, 114, 110, 114, 174, 238, 29, 30, - 37, 59, 60, 74, 241, 108, 100, 101, 102, 103, - 161, 108, 108, 108, 108, 108, 108, 103, 158, 23, - 24, 38, 62, 73, 96, 99, 109, 115, 147, 149, - 164, 178, 181, 217, 221, 224, 228, 230, 231, 108, - 108, 108, 99, 164, 240, 23, 173, 177, 181, 217, - 227, 229, 231, 232, 233, 27, 39, 242, 110, 246, - 141, 139, 233, 141, 139, 141, 141, 139, 29, 37, - 60, 74, 169, 34, 46, 28, 30, 36, 43, 44, - 45, 47, 49, 58, 75, 76, 182, 184, 187, 189, - 191, 195, 198, 200, 202, 204, 207, 216, 29, 37, - 50, 53, 60, 74, 97, 98, 165, 147, 232, 100, - 103, 104, 160, 110, 147, 141, 99, 111, 23, 24, - 61, 68, 243, 23, 249, 108, 108, 109, 140, 147, - 230, 108, 108, 61, 68, 245, 246, 110, 110, 110, - 64, 29, 56, 199, 110, 25, 27, 39, 188, 244, - 110, 244, 48, 51, 52, 55, 63, 81, 211, 26, - 70, 203, 110, 248, 246, 66, 245, 110, 246, 110, - 110, 167, 160, 108, 116, 23, 150, 151, 152, 156, - 108, 108, 114, 175, 111, 141, 139, 140, 103, 159, - 83, 136, 141, 23, 225, 23, 226, 23, 201, 23, - 194, 67, 194, 25, 31, 33, 69, 71, 183, 193, - 110, 23, 212, 213, 110, 246, 41, 42, 82, 208, - 209, 23, 251, 29, 192, 35, 54, 196, 110, 23, - 168, 23, 166, 168, 109, 232, 111, 103, 157, 144, - 145, 233, 141, 115, 109, 110, 247, 108, 108, 111, - 111, 111, 111, 111, 23, 215, 23, 214, 111, 77, - 78, 79, 80, 197, 23, 210, 111, 111, 111, 108, - 116, 112, 113, 153, 108, 23, 99, 146, 108, 62, - 73, 176, 179, 180, 181, 218, 219, 222, 227, 23, - 250, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 137, 141, 57, 26, 40, 60, 72, - 185, 193, 244, 111, 111, 111, 232, 23, 154, 23, - 155, 145, 141, 34, 46, 205, 207, 108, 116, 111, - 32, 186, 190, 193, 108, 116, 108, 108, 110, 110, - 66, 206, 179, 232, 145, 136, 220, 225, 223, 226, - 110, 116, 108, 108, 111, 105, 111, 105, 210, 145, - 137, 225, 226, 105, 210, 111 + 99, 5, 6, 7, 10, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 99, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 138, 162, 163, 170, 171, 172, 234, 236, 237, 240, + 253, 107, 238, 99, 99, 99, 65, 99, 142, 148, + 241, 142, 142, 142, 142, 142, 99, 143, 156, 112, + 113, 141, 233, 142, 142, 107, 107, 9, 11, 99, + 239, 114, 114, 110, 114, 174, 29, 30, 37, 59, + 60, 74, 242, 108, 100, 101, 102, 103, 161, 108, + 108, 108, 108, 108, 108, 103, 158, 23, 24, 38, + 62, 73, 96, 99, 109, 115, 147, 149, 164, 178, + 181, 217, 221, 224, 228, 230, 231, 108, 108, 99, + 235, 108, 99, 164, 23, 173, 177, 181, 217, 227, + 229, 231, 232, 233, 27, 39, 243, 110, 247, 141, + 139, 233, 141, 139, 141, 141, 139, 29, 37, 60, + 74, 169, 34, 46, 28, 30, 36, 43, 44, 45, + 47, 49, 58, 75, 76, 182, 184, 187, 189, 191, + 195, 198, 200, 202, 204, 207, 216, 29, 37, 50, + 53, 60, 74, 97, 98, 165, 147, 232, 100, 103, + 104, 160, 110, 147, 141, 114, 239, 99, 111, 23, + 24, 61, 68, 244, 23, 250, 108, 108, 109, 140, + 147, 230, 108, 108, 61, 68, 246, 247, 110, 110, + 110, 64, 29, 56, 199, 110, 25, 27, 39, 188, + 245, 110, 245, 48, 51, 52, 55, 63, 81, 211, + 26, 70, 203, 110, 249, 247, 66, 246, 110, 247, + 110, 110, 167, 160, 108, 116, 23, 150, 151, 152, + 156, 108, 108, 241, 114, 175, 111, 141, 139, 140, + 103, 159, 83, 136, 141, 23, 225, 23, 226, 23, + 201, 23, 194, 67, 194, 25, 31, 33, 69, 71, + 183, 193, 110, 23, 212, 213, 110, 247, 41, 42, + 82, 208, 209, 23, 252, 29, 192, 35, 54, 196, + 110, 23, 168, 23, 166, 168, 109, 232, 111, 103, + 157, 144, 145, 233, 141, 115, 109, 110, 248, 108, + 108, 111, 111, 111, 111, 111, 23, 215, 23, 214, + 111, 77, 78, 79, 80, 197, 23, 210, 111, 111, + 111, 108, 116, 112, 113, 153, 108, 23, 99, 146, + 108, 62, 73, 176, 179, 180, 181, 218, 219, 222, + 227, 23, 251, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 137, 141, 57, 26, 40, + 60, 72, 185, 193, 245, 111, 111, 111, 232, 23, + 154, 23, 155, 145, 141, 34, 46, 205, 207, 108, + 116, 111, 32, 186, 190, 193, 108, 116, 108, 108, + 110, 110, 66, 206, 179, 232, 145, 136, 220, 225, + 223, 226, 110, 116, 108, 108, 111, 105, 111, 105, + 210, 145, 137, 225, 226, 105, 210, 111 }; #define yyerrok (yyerrstatus = 0) @@ -4350,20 +4354,67 @@ yyreduce: /* Line 1455 of yacc.c */ #line 1814 "program_parse.y" - { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} + { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 237: /* Line 1455 of yacc.c */ -#line 1817 "program_parse.y" - { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} +#line 1818 "program_parse.y" + { + /* NV_fragment_program_option defines the size qualifiers in a + * fairly broken way. "SHORT" or "LONG" can optionally be used + * before TEMP or OUTPUT. However, neither is a reserved word! + * This means that we have to parse it as an identifier, then check + * to make sure it's one of the valid values. *sigh* + * + * In addition, the grammar in the extension spec does *not* allow + * the size specifier to be optional, but all known implementations + * do. + */ + if (!state->option.NV_fragment) { + yyerror(& (yylsp[(1) - (1)]), state, "unexpected IDENTIFIER"); + YYERROR; + } + + if (strcmp("SHORT", (yyvsp[(1) - (1)].string)) == 0) { + } else if (strcmp("LONG", (yyvsp[(1) - (1)].string)) == 0) { + } else { + char *const err_str = + make_error_string("invalid storage size specifier \"%s\"", + (yyvsp[(1) - (1)].string)); + + yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL) + ? err_str : "invalid storage size specifier"); + + if (err_str != NULL) { + _mesa_free(err_str); + } + + YYERROR; + } + ;} + break; + + case 238: + +/* Line 1455 of yacc.c */ +#line 1852 "program_parse.y" + { + ;} break; case 239: /* Line 1455 of yacc.c */ -#line 1821 "program_parse.y" +#line 1856 "program_parse.y" + { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} + break; + + case 241: + +/* Line 1455 of yacc.c */ +#line 1860 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { YYERROR; @@ -4371,10 +4422,10 @@ yyreduce: ;} break; - case 240: + case 242: /* Line 1455 of yacc.c */ -#line 1827 "program_parse.y" +#line 1866 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { YYERROR; @@ -4382,26 +4433,26 @@ yyreduce: ;} break; - case 241: + case 243: /* Line 1455 of yacc.c */ -#line 1835 "program_parse.y" +#line 1874 "program_parse.y" { struct asm_symbol *const s = - declare_variable(state, (yyvsp[(2) - (4)].string), at_output, & (yylsp[(2) - (4)])); + declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)])); if (s == NULL) { YYERROR; } else { - s->output_binding = (yyvsp[(4) - (4)].result); + s->output_binding = (yyvsp[(5) - (5)].result); } ;} break; - case 242: + case 244: /* Line 1455 of yacc.c */ -#line 1848 "program_parse.y" +#line 1887 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4412,10 +4463,10 @@ yyreduce: ;} break; - case 243: + case 245: /* Line 1455 of yacc.c */ -#line 1857 "program_parse.y" +#line 1896 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4426,19 +4477,19 @@ yyreduce: ;} break; - case 244: + case 246: /* Line 1455 of yacc.c */ -#line 1866 "program_parse.y" +#line 1905 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} break; - case 245: + case 247: /* Line 1455 of yacc.c */ -#line 1870 "program_parse.y" +#line 1909 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4449,10 +4500,10 @@ yyreduce: ;} break; - case 246: + case 248: /* Line 1455 of yacc.c */ -#line 1879 "program_parse.y" +#line 1918 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4463,10 +4514,10 @@ yyreduce: ;} break; - case 247: + case 249: /* Line 1455 of yacc.c */ -#line 1888 "program_parse.y" +#line 1927 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4477,19 +4528,19 @@ yyreduce: ;} break; - case 248: + case 250: /* Line 1455 of yacc.c */ -#line 1899 "program_parse.y" +#line 1938 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} break; - case 249: + case 251: /* Line 1455 of yacc.c */ -#line 1905 "program_parse.y" +#line 1944 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4497,10 +4548,10 @@ yyreduce: ;} break; - case 250: + case 252: /* Line 1455 of yacc.c */ -#line 1911 "program_parse.y" +#line 1950 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4511,10 +4562,10 @@ yyreduce: ;} break; - case 251: + case 253: /* Line 1455 of yacc.c */ -#line 1920 "program_parse.y" +#line 1959 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4525,19 +4576,19 @@ yyreduce: ;} break; - case 252: + case 254: /* Line 1455 of yacc.c */ -#line 1931 "program_parse.y" +#line 1970 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 253: + case 255: /* Line 1455 of yacc.c */ -#line 1935 "program_parse.y" +#line 1974 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4548,10 +4599,10 @@ yyreduce: ;} break; - case 254: + case 256: /* Line 1455 of yacc.c */ -#line 1944 "program_parse.y" +#line 1983 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4562,94 +4613,94 @@ yyreduce: ;} break; - case 255: + case 257: /* Line 1455 of yacc.c */ -#line 1954 "program_parse.y" +#line 1993 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 256: + case 258: /* Line 1455 of yacc.c */ -#line 1955 "program_parse.y" +#line 1994 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 257: + case 259: /* Line 1455 of yacc.c */ -#line 1956 "program_parse.y" +#line 1995 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 258: + case 260: /* Line 1455 of yacc.c */ -#line 1959 "program_parse.y" +#line 1998 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 259: + case 261: /* Line 1455 of yacc.c */ -#line 1960 "program_parse.y" +#line 1999 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 260: + case 262: /* Line 1455 of yacc.c */ -#line 1961 "program_parse.y" +#line 2000 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 261: + case 263: /* Line 1455 of yacc.c */ -#line 1964 "program_parse.y" +#line 2003 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 262: + case 264: /* Line 1455 of yacc.c */ -#line 1965 "program_parse.y" +#line 2004 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 263: + case 265: /* Line 1455 of yacc.c */ -#line 1968 "program_parse.y" +#line 2007 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 264: + case 266: /* Line 1455 of yacc.c */ -#line 1969 "program_parse.y" +#line 2008 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 265: + case 267: /* Line 1455 of yacc.c */ -#line 1972 "program_parse.y" +#line 2011 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 266: + case 268: /* Line 1455 of yacc.c */ -#line 1973 "program_parse.y" +#line 2012 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 267: + case 269: /* Line 1455 of yacc.c */ -#line 1977 "program_parse.y" +#line 2016 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4660,10 +4711,10 @@ yyreduce: ;} break; - case 268: + case 270: /* Line 1455 of yacc.c */ -#line 1988 "program_parse.y" +#line 2027 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4674,10 +4725,10 @@ yyreduce: ;} break; - case 269: + case 271: /* Line 1455 of yacc.c */ -#line 1999 "program_parse.y" +#line 2038 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4688,10 +4739,10 @@ yyreduce: ;} break; - case 270: + case 272: /* Line 1455 of yacc.c */ -#line 2010 "program_parse.y" +#line 2049 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4715,7 +4766,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4719 "program_parse.tab.c" +#line 4770 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4934,7 +4985,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 2030 "program_parse.y" +#line 2069 "program_parse.y" void @@ -5004,7 +5055,10 @@ asm_instruction_copy_ctor(const struct prog_instruction *base, if (inst) { _mesa_init_instructions(& inst->Base, 1); inst->Base.Opcode = base->Opcode; + inst->Base.CondUpdate = base->CondUpdate; + inst->Base.CondDst = base->CondDst; inst->Base.SaturateMode = base->SaturateMode; + inst->Base.Precision = base->Precision; asm_instruction_set_operands(inst, dst, src0, src1, src2); } diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 4e2912d1c4d..51cc9f7f119 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -1811,7 +1811,46 @@ optionalSign: '+' { $$ = FALSE; } | { $$ = FALSE; } ; -TEMP_statement: TEMP { $$ = $1; } varNameList +TEMP_statement: optVarSize TEMP { $$ = $2; } varNameList + ; + +optVarSize: IDENTIFIER + { + /* NV_fragment_program_option defines the size qualifiers in a + * fairly broken way. "SHORT" or "LONG" can optionally be used + * before TEMP or OUTPUT. However, neither is a reserved word! + * This means that we have to parse it as an identifier, then check + * to make sure it's one of the valid values. *sigh* + * + * In addition, the grammar in the extension spec does *not* allow + * the size specifier to be optional, but all known implementations + * do. + */ + if (!state->option.NV_fragment) { + yyerror(& @1, state, "unexpected IDENTIFIER"); + YYERROR; + } + + if (strcmp("SHORT", $1) == 0) { + } else if (strcmp("LONG", $1) == 0) { + } else { + char *const err_str = + make_error_string("invalid storage size specifier \"%s\"", + $1); + + yyerror(& @1, state, (err_str != NULL) + ? err_str : "invalid storage size specifier"); + + if (err_str != NULL) { + _mesa_free(err_str); + } + + YYERROR; + } + } + | + { + } ; ADDRESS_statement: ADDRESS { $$ = $1; } varNameList @@ -1831,15 +1870,15 @@ varNameList: varNameList ',' IDENTIFIER } ; -OUTPUT_statement: OUTPUT IDENTIFIER '=' resultBinding +OUTPUT_statement: optVarSize OUTPUT IDENTIFIER '=' resultBinding { struct asm_symbol *const s = - declare_variable(state, $2, at_output, & @2); + declare_variable(state, $3, at_output, & @3); if (s == NULL) { YYERROR; } else { - s->output_binding = $4; + s->output_binding = $5; } } ; @@ -2096,7 +2135,10 @@ asm_instruction_copy_ctor(const struct prog_instruction *base, if (inst) { _mesa_init_instructions(& inst->Base, 1); inst->Base.Opcode = base->Opcode; + inst->Base.CondUpdate = base->CondUpdate; + inst->Base.CondDst = base->CondDst; inst->Base.SaturateMode = base->SaturateMode; + inst->Base.Precision = base->Precision; asm_instruction_set_operands(inst, dst, src0, src1, src2); } diff --git a/src/mesa/shader/program_parse_extra.c b/src/mesa/shader/program_parse_extra.c index 79e80c54d71..cb7b7a5fb27 100644 --- a/src/mesa/shader/program_parse_extra.c +++ b/src/mesa/shader/program_parse_extra.c @@ -33,6 +33,67 @@ * \author Ian Romanick */ +int +_mesa_parse_instruction_suffix(const struct asm_parser_state *state, + const char *suffix, + struct prog_instruction *inst) +{ + inst->CondUpdate = 0; + inst->CondDst = 0; + inst->SaturateMode = SATURATE_OFF; + inst->Precision = FLOAT32; + + + /* The first possible suffix element is the precision specifier from + * NV_fragment_program_option. + */ + if (state->option.NV_fragment) { + switch (suffix[0]) { + case 'H': + inst->Precision = FLOAT16; + suffix++; + break; + case 'R': + inst->Precision = FLOAT32; + suffix++; + break; + case 'X': + inst->Precision = FIXED12; + suffix++; + break; + default: + break; + } + } + + /* The next possible suffix element is the condition code modifier selection + * from NV_fragment_program_option. + */ + if (state->option.NV_fragment) { + if (suffix[0] == 'C') { + inst->CondUpdate = 1; + suffix++; + } + } + + + /* The final possible suffix element is the saturation selector from + * ARB_fragment_program. + */ + if (state->mode == ARB_fragment) { + if (strcmp(suffix, "_SAT") == 0) { + inst->SaturateMode = SATURATE_ZERO_ONE; + suffix += 4; + } + } + + + /* It is an error for all of the suffix string not to be consumed. + */ + return suffix[0] == '\0'; +} + + int _mesa_ARBvp_parse_option(struct asm_parser_state *state, const char *option) { diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h index be32a1bed15..497891f53d8 100644 --- a/src/mesa/shader/program_parser.h +++ b/src/mesa/shader/program_parser.h @@ -264,4 +264,18 @@ extern int _mesa_ARBvp_parse_option(struct asm_parser_state *state, extern int _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option); +/** + * Parses and processes instruction suffixes + * + * Instruction suffixes, such as \c _SAT, are processed. The relevant bits + * are set in \c inst. If suffixes are encountered that are either not known + * or not supported by the modes and options set in \c state, zero will be + * returned. + * + * \return + * Non-zero on success, zero on failure. + */ +extern int _mesa_parse_instruction_suffix(const struct asm_parser_state *state, + const char *suffix, struct prog_instruction *inst); + /*@}*/ -- cgit v1.2.3 From 0e7953366f2a8ab1b0e885d94f6635c7640b3cc7 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 10 Sep 2009 14:35:33 -0700 Subject: ARB prog parser: Differentiate between used and unused names in the lexer The lexer will return IDENTIFIER only when the name does not have an associated symbol. Otherwise USED_IDENTIFIER is returned. --- src/mesa/shader/lex.yy.c | 366 +++++----- src/mesa/shader/program_lexer.l | 20 +- src/mesa/shader/program_parse.tab.c | 1259 ++++++++++++++++++----------------- src/mesa/shader/program_parse.tab.h | 17 +- src/mesa/shader/program_parse.y | 23 +- 5 files changed, 851 insertions(+), 834 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c index d71a13c3bd7..959eb854d62 100644 --- a/src/mesa/shader/lex.yy.c +++ b/src/mesa/shader/lex.yy.c @@ -1052,8 +1052,7 @@ static yyconst flex_int16_t yy_chk[1352] = if (condition) { \ return token; \ } else { \ - yylval->string = strdup(yytext); \ - return IDENTIFIER; \ + return handle_ident(yyextra, yytext, yylval); \ } \ } while (0) @@ -1077,8 +1076,7 @@ static yyconst flex_int16_t yy_chk[1352] = yylval->temp_inst.Opcode = OPCODE_ ## opcode; \ return token; \ } else { \ - yylval->string = strdup(yytext); \ - return IDENTIFIER; \ + return handle_ident(yyextra, yytext, yylval); \ } \ } while (0) @@ -1127,6 +1125,15 @@ swiz_from_char(char c) return 0; } +static int +handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval) +{ + lval->string = strdup(text); + + return (_mesa_symbol_table_find_symbol(state->st, 0, text) == NULL) + ? IDENTIFIER : USED_IDENTIFIER; +} + #define YY_USER_ACTION \ do { \ yylloc->first_column = yylloc->last_column; \ @@ -1140,7 +1147,7 @@ swiz_from_char(char c) } while(0); #define YY_EXTRA_TYPE struct asm_parser_state * -#line 1144 "lex.yy.c" +#line 1151 "lex.yy.c" #define INITIAL 0 @@ -1386,10 +1393,10 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 143 "program_lexer.l" +#line 150 "program_lexer.l" -#line 1393 "lex.yy.c" +#line 1400 "lex.yy.c" yylval = yylval_param; @@ -1478,17 +1485,17 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 145 "program_lexer.l" +#line 152 "program_lexer.l" { return ARBvp_10; } YY_BREAK case 2: YY_RULE_SETUP -#line 146 "program_lexer.l" +#line 153 "program_lexer.l" { return ARBfp_10; } YY_BREAK case 3: YY_RULE_SETUP -#line 147 "program_lexer.l" +#line 154 "program_lexer.l" { yylval->integer = at_address; return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS); @@ -1496,685 +1503,682 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 151 "program_lexer.l" +#line 158 "program_lexer.l" { return ALIAS; } YY_BREAK case 5: YY_RULE_SETUP -#line 152 "program_lexer.l" +#line 159 "program_lexer.l" { return ATTRIB; } YY_BREAK case 6: YY_RULE_SETUP -#line 153 "program_lexer.l" +#line 160 "program_lexer.l" { return END; } YY_BREAK case 7: YY_RULE_SETUP -#line 154 "program_lexer.l" +#line 161 "program_lexer.l" { return OPTION; } YY_BREAK case 8: YY_RULE_SETUP -#line 155 "program_lexer.l" +#line 162 "program_lexer.l" { return OUTPUT; } YY_BREAK case 9: YY_RULE_SETUP -#line 156 "program_lexer.l" +#line 163 "program_lexer.l" { return PARAM; } YY_BREAK case 10: YY_RULE_SETUP -#line 157 "program_lexer.l" +#line 164 "program_lexer.l" { yylval->integer = at_temp; return TEMP; } YY_BREAK case 11: YY_RULE_SETUP -#line 159 "program_lexer.l" +#line 166 "program_lexer.l" { return_opcode( 1, VECTOR_OP, ABS, 3); } YY_BREAK case 12: YY_RULE_SETUP -#line 160 "program_lexer.l" +#line 167 "program_lexer.l" { return_opcode( 1, BIN_OP, ADD, 3); } YY_BREAK case 13: YY_RULE_SETUP -#line 161 "program_lexer.l" +#line 168 "program_lexer.l" { return_opcode(require_ARB_vp, ARL, ARL, 3); } YY_BREAK case 14: YY_RULE_SETUP -#line 163 "program_lexer.l" +#line 170 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, CMP, 3); } YY_BREAK case 15: YY_RULE_SETUP -#line 164 "program_lexer.l" +#line 171 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); } YY_BREAK case 16: YY_RULE_SETUP -#line 166 "program_lexer.l" +#line 173 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); } YY_BREAK case 17: YY_RULE_SETUP -#line 167 "program_lexer.l" +#line 174 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); } YY_BREAK case 18: YY_RULE_SETUP -#line 168 "program_lexer.l" +#line 175 "program_lexer.l" { return_opcode( 1, BIN_OP, DP3, 3); } YY_BREAK case 19: YY_RULE_SETUP -#line 169 "program_lexer.l" +#line 176 "program_lexer.l" { return_opcode( 1, BIN_OP, DP4, 3); } YY_BREAK case 20: YY_RULE_SETUP -#line 170 "program_lexer.l" +#line 177 "program_lexer.l" { return_opcode( 1, BIN_OP, DPH, 3); } YY_BREAK case 21: YY_RULE_SETUP -#line 171 "program_lexer.l" +#line 178 "program_lexer.l" { return_opcode( 1, BIN_OP, DST, 3); } YY_BREAK case 22: YY_RULE_SETUP -#line 173 "program_lexer.l" +#line 180 "program_lexer.l" { return_opcode( 1, SCALAR_OP, EX2, 3); } YY_BREAK case 23: YY_RULE_SETUP -#line 174 "program_lexer.l" +#line 181 "program_lexer.l" { return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); } YY_BREAK case 24: YY_RULE_SETUP -#line 176 "program_lexer.l" +#line 183 "program_lexer.l" { return_opcode( 1, VECTOR_OP, FLR, 3); } YY_BREAK case 25: YY_RULE_SETUP -#line 177 "program_lexer.l" +#line 184 "program_lexer.l" { return_opcode( 1, VECTOR_OP, FRC, 3); } YY_BREAK case 26: YY_RULE_SETUP -#line 179 "program_lexer.l" +#line 186 "program_lexer.l" { return_opcode(require_ARB_fp, KIL, KIL, 3); } YY_BREAK case 27: YY_RULE_SETUP -#line 181 "program_lexer.l" +#line 188 "program_lexer.l" { return_opcode( 1, VECTOR_OP, LIT, 3); } YY_BREAK case 28: YY_RULE_SETUP -#line 182 "program_lexer.l" +#line 189 "program_lexer.l" { return_opcode( 1, SCALAR_OP, LG2, 3); } YY_BREAK case 29: YY_RULE_SETUP -#line 183 "program_lexer.l" +#line 190 "program_lexer.l" { return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); } YY_BREAK case 30: YY_RULE_SETUP -#line 184 "program_lexer.l" +#line 191 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, LRP, 3); } YY_BREAK case 31: YY_RULE_SETUP -#line 186 "program_lexer.l" +#line 193 "program_lexer.l" { return_opcode( 1, TRI_OP, MAD, 3); } YY_BREAK case 32: YY_RULE_SETUP -#line 187 "program_lexer.l" +#line 194 "program_lexer.l" { return_opcode( 1, BIN_OP, MAX, 3); } YY_BREAK case 33: YY_RULE_SETUP -#line 188 "program_lexer.l" +#line 195 "program_lexer.l" { return_opcode( 1, BIN_OP, MIN, 3); } YY_BREAK case 34: YY_RULE_SETUP -#line 189 "program_lexer.l" +#line 196 "program_lexer.l" { return_opcode( 1, VECTOR_OP, MOV, 3); } YY_BREAK case 35: YY_RULE_SETUP -#line 190 "program_lexer.l" +#line 197 "program_lexer.l" { return_opcode( 1, BIN_OP, MUL, 3); } YY_BREAK case 36: YY_RULE_SETUP -#line 192 "program_lexer.l" +#line 199 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); } YY_BREAK case 37: YY_RULE_SETUP -#line 193 "program_lexer.l" +#line 200 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); } YY_BREAK case 38: YY_RULE_SETUP -#line 194 "program_lexer.l" +#line 201 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); } YY_BREAK case 39: YY_RULE_SETUP -#line 195 "program_lexer.l" +#line 202 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); } YY_BREAK case 40: YY_RULE_SETUP -#line 196 "program_lexer.l" +#line 203 "program_lexer.l" { return_opcode( 1, BINSC_OP, POW, 3); } YY_BREAK case 41: YY_RULE_SETUP -#line 198 "program_lexer.l" +#line 205 "program_lexer.l" { return_opcode( 1, SCALAR_OP, RCP, 3); } YY_BREAK case 42: YY_RULE_SETUP -#line 199 "program_lexer.l" +#line 206 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, RFL, 3); } YY_BREAK case 43: YY_RULE_SETUP -#line 200 "program_lexer.l" +#line 207 "program_lexer.l" { return_opcode( 1, SCALAR_OP, RSQ, 3); } YY_BREAK case 44: YY_RULE_SETUP -#line 202 "program_lexer.l" +#line 209 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); } YY_BREAK case 45: YY_RULE_SETUP -#line 203 "program_lexer.l" +#line 210 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SEQ, 3); } YY_BREAK case 46: YY_RULE_SETUP -#line 204 "program_lexer.l" +#line 211 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SFL, 3); } YY_BREAK case 47: YY_RULE_SETUP -#line 205 "program_lexer.l" +#line 212 "program_lexer.l" { return_opcode( 1, BIN_OP, SGE, 3); } YY_BREAK case 48: YY_RULE_SETUP -#line 206 "program_lexer.l" +#line 213 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SGT, 3); } YY_BREAK case 49: YY_RULE_SETUP -#line 207 "program_lexer.l" +#line 214 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); } YY_BREAK case 50: YY_RULE_SETUP -#line 208 "program_lexer.l" +#line 215 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SLE, 3); } YY_BREAK case 51: YY_RULE_SETUP -#line 209 "program_lexer.l" +#line 216 "program_lexer.l" { return_opcode( 1, BIN_OP, SLT, 3); } YY_BREAK case 52: YY_RULE_SETUP -#line 210 "program_lexer.l" +#line 217 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SNE, 3); } YY_BREAK case 53: YY_RULE_SETUP -#line 211 "program_lexer.l" +#line 218 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, STR, 3); } YY_BREAK case 54: YY_RULE_SETUP -#line 212 "program_lexer.l" +#line 219 "program_lexer.l" { return_opcode( 1, BIN_OP, SUB, 3); } YY_BREAK case 55: YY_RULE_SETUP -#line 213 "program_lexer.l" +#line 220 "program_lexer.l" { return_opcode( 1, SWZ, SWZ, 3); } YY_BREAK case 56: YY_RULE_SETUP -#line 215 "program_lexer.l" +#line 222 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); } YY_BREAK case 57: YY_RULE_SETUP -#line 216 "program_lexer.l" +#line 223 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); } YY_BREAK case 58: YY_RULE_SETUP -#line 217 "program_lexer.l" +#line 224 "program_lexer.l" { return_opcode(require_NV_fp, TXD_OP, TXD, 3); } YY_BREAK case 59: YY_RULE_SETUP -#line 218 "program_lexer.l" +#line 225 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); } YY_BREAK case 60: YY_RULE_SETUP -#line 220 "program_lexer.l" +#line 227 "program_lexer.l" { return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); } YY_BREAK case 61: YY_RULE_SETUP -#line 221 "program_lexer.l" +#line 228 "program_lexer.l" { return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); } YY_BREAK case 62: YY_RULE_SETUP -#line 223 "program_lexer.l" +#line 230 "program_lexer.l" { return_opcode(require_NV_fp, TRI_OP, X2D, 3); } YY_BREAK case 63: YY_RULE_SETUP -#line 224 "program_lexer.l" +#line 231 "program_lexer.l" { return_opcode( 1, BIN_OP, XPD, 3); } YY_BREAK case 64: YY_RULE_SETUP -#line 226 "program_lexer.l" +#line 233 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } YY_BREAK case 65: YY_RULE_SETUP -#line 227 "program_lexer.l" +#line 234 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } YY_BREAK case 66: YY_RULE_SETUP -#line 228 "program_lexer.l" +#line 235 "program_lexer.l" { return PROGRAM; } YY_BREAK case 67: YY_RULE_SETUP -#line 229 "program_lexer.l" +#line 236 "program_lexer.l" { return STATE; } YY_BREAK case 68: YY_RULE_SETUP -#line 230 "program_lexer.l" +#line 237 "program_lexer.l" { return RESULT; } YY_BREAK case 69: YY_RULE_SETUP -#line 232 "program_lexer.l" +#line 239 "program_lexer.l" { return AMBIENT; } YY_BREAK case 70: YY_RULE_SETUP -#line 233 "program_lexer.l" +#line 240 "program_lexer.l" { return ATTENUATION; } YY_BREAK case 71: YY_RULE_SETUP -#line 234 "program_lexer.l" +#line 241 "program_lexer.l" { return BACK; } YY_BREAK case 72: YY_RULE_SETUP -#line 235 "program_lexer.l" +#line 242 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, CLIP); } YY_BREAK case 73: YY_RULE_SETUP -#line 236 "program_lexer.l" +#line 243 "program_lexer.l" { return COLOR; } YY_BREAK case 74: YY_RULE_SETUP -#line 237 "program_lexer.l" +#line 244 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, DEPTH); } YY_BREAK case 75: YY_RULE_SETUP -#line 238 "program_lexer.l" +#line 245 "program_lexer.l" { return DIFFUSE; } YY_BREAK case 76: YY_RULE_SETUP -#line 239 "program_lexer.l" +#line 246 "program_lexer.l" { return DIRECTION; } YY_BREAK case 77: YY_RULE_SETUP -#line 240 "program_lexer.l" +#line 247 "program_lexer.l" { return EMISSION; } YY_BREAK case 78: YY_RULE_SETUP -#line 241 "program_lexer.l" +#line 248 "program_lexer.l" { return ENV; } YY_BREAK case 79: YY_RULE_SETUP -#line 242 "program_lexer.l" +#line 249 "program_lexer.l" { return EYE; } YY_BREAK case 80: YY_RULE_SETUP -#line 243 "program_lexer.l" +#line 250 "program_lexer.l" { return FOGCOORD; } YY_BREAK case 81: YY_RULE_SETUP -#line 244 "program_lexer.l" +#line 251 "program_lexer.l" { return FOG; } YY_BREAK case 82: YY_RULE_SETUP -#line 245 "program_lexer.l" +#line 252 "program_lexer.l" { return FRONT; } YY_BREAK case 83: YY_RULE_SETUP -#line 246 "program_lexer.l" +#line 253 "program_lexer.l" { return HALF; } YY_BREAK case 84: YY_RULE_SETUP -#line 247 "program_lexer.l" +#line 254 "program_lexer.l" { return INVERSE; } YY_BREAK case 85: YY_RULE_SETUP -#line 248 "program_lexer.l" +#line 255 "program_lexer.l" { return INVTRANS; } YY_BREAK case 86: YY_RULE_SETUP -#line 249 "program_lexer.l" +#line 256 "program_lexer.l" { return LIGHT; } YY_BREAK case 87: YY_RULE_SETUP -#line 250 "program_lexer.l" +#line 257 "program_lexer.l" { return LIGHTMODEL; } YY_BREAK case 88: YY_RULE_SETUP -#line 251 "program_lexer.l" +#line 258 "program_lexer.l" { return LIGHTPROD; } YY_BREAK case 89: YY_RULE_SETUP -#line 252 "program_lexer.l" +#line 259 "program_lexer.l" { return LOCAL; } YY_BREAK case 90: YY_RULE_SETUP -#line 253 "program_lexer.l" +#line 260 "program_lexer.l" { return MATERIAL; } YY_BREAK case 91: YY_RULE_SETUP -#line 254 "program_lexer.l" +#line 261 "program_lexer.l" { return MAT_PROGRAM; } YY_BREAK case 92: YY_RULE_SETUP -#line 255 "program_lexer.l" +#line 262 "program_lexer.l" { return MATRIX; } YY_BREAK case 93: YY_RULE_SETUP -#line 256 "program_lexer.l" +#line 263 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } YY_BREAK case 94: YY_RULE_SETUP -#line 257 "program_lexer.l" +#line 264 "program_lexer.l" { return MODELVIEW; } YY_BREAK case 95: YY_RULE_SETUP -#line 258 "program_lexer.l" +#line 265 "program_lexer.l" { return MVP; } YY_BREAK case 96: YY_RULE_SETUP -#line 259 "program_lexer.l" +#line 266 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, NORMAL); } YY_BREAK case 97: YY_RULE_SETUP -#line 260 "program_lexer.l" +#line 267 "program_lexer.l" { return OBJECT; } YY_BREAK case 98: YY_RULE_SETUP -#line 261 "program_lexer.l" +#line 268 "program_lexer.l" { return PALETTE; } YY_BREAK case 99: YY_RULE_SETUP -#line 262 "program_lexer.l" +#line 269 "program_lexer.l" { return PARAMS; } YY_BREAK case 100: YY_RULE_SETUP -#line 263 "program_lexer.l" +#line 270 "program_lexer.l" { return PLANE; } YY_BREAK case 101: YY_RULE_SETUP -#line 264 "program_lexer.l" +#line 271 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, POINT); } YY_BREAK case 102: YY_RULE_SETUP -#line 265 "program_lexer.l" +#line 272 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, POINTSIZE); } YY_BREAK case 103: YY_RULE_SETUP -#line 266 "program_lexer.l" +#line 273 "program_lexer.l" { return POSITION; } YY_BREAK case 104: YY_RULE_SETUP -#line 267 "program_lexer.l" +#line 274 "program_lexer.l" { return PRIMARY; } YY_BREAK case 105: YY_RULE_SETUP -#line 268 "program_lexer.l" +#line 275 "program_lexer.l" { return PROJECTION; } YY_BREAK case 106: YY_RULE_SETUP -#line 269 "program_lexer.l" +#line 276 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, RANGE); } YY_BREAK case 107: YY_RULE_SETUP -#line 270 "program_lexer.l" +#line 277 "program_lexer.l" { return ROW; } YY_BREAK case 108: YY_RULE_SETUP -#line 271 "program_lexer.l" +#line 278 "program_lexer.l" { return SCENECOLOR; } YY_BREAK case 109: YY_RULE_SETUP -#line 272 "program_lexer.l" +#line 279 "program_lexer.l" { return SECONDARY; } YY_BREAK case 110: YY_RULE_SETUP -#line 273 "program_lexer.l" +#line 280 "program_lexer.l" { return SHININESS; } YY_BREAK case 111: YY_RULE_SETUP -#line 274 "program_lexer.l" +#line 281 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, SIZE); } YY_BREAK case 112: YY_RULE_SETUP -#line 275 "program_lexer.l" +#line 282 "program_lexer.l" { return SPECULAR; } YY_BREAK case 113: YY_RULE_SETUP -#line 276 "program_lexer.l" +#line 283 "program_lexer.l" { return SPOT; } YY_BREAK case 114: YY_RULE_SETUP -#line 277 "program_lexer.l" +#line 284 "program_lexer.l" { return TEXCOORD; } YY_BREAK case 115: YY_RULE_SETUP -#line 278 "program_lexer.l" +#line 285 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, TEXENV); } YY_BREAK case 116: YY_RULE_SETUP -#line 279 "program_lexer.l" +#line 286 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN); } YY_BREAK case 117: YY_RULE_SETUP -#line 280 "program_lexer.l" +#line 287 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } YY_BREAK case 118: YY_RULE_SETUP -#line 281 "program_lexer.l" +#line 288 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_S); } YY_BREAK case 119: YY_RULE_SETUP -#line 282 "program_lexer.l" +#line 289 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_T); } YY_BREAK case 120: YY_RULE_SETUP -#line 283 "program_lexer.l" +#line 290 "program_lexer.l" { return TEXTURE; } YY_BREAK case 121: YY_RULE_SETUP -#line 284 "program_lexer.l" +#line 291 "program_lexer.l" { return TRANSPOSE; } YY_BREAK case 122: YY_RULE_SETUP -#line 285 "program_lexer.l" +#line 292 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, VTXATTRIB); } YY_BREAK case 123: YY_RULE_SETUP -#line 286 "program_lexer.l" +#line 293 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, WEIGHT); } YY_BREAK case 124: YY_RULE_SETUP -#line 288 "program_lexer.l" +#line 295 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } YY_BREAK case 125: YY_RULE_SETUP -#line 289 "program_lexer.l" +#line 296 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } YY_BREAK case 126: YY_RULE_SETUP -#line 290 "program_lexer.l" +#line 297 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } YY_BREAK case 127: YY_RULE_SETUP -#line 291 "program_lexer.l" +#line 298 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } YY_BREAK case 128: YY_RULE_SETUP -#line 292 "program_lexer.l" +#line 299 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } YY_BREAK case 129: YY_RULE_SETUP -#line 293 "program_lexer.l" +#line 300 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } YY_BREAK case 130: YY_RULE_SETUP -#line 294 "program_lexer.l" +#line 301 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } YY_BREAK case 131: YY_RULE_SETUP -#line 295 "program_lexer.l" +#line 302 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } YY_BREAK case 132: YY_RULE_SETUP -#line 296 "program_lexer.l" +#line 303 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } YY_BREAK case 133: YY_RULE_SETUP -#line 297 "program_lexer.l" +#line 304 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } YY_BREAK case 134: YY_RULE_SETUP -#line 298 "program_lexer.l" +#line 305 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } YY_BREAK case 135: YY_RULE_SETUP -#line 299 "program_lexer.l" +#line 306 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } YY_BREAK case 136: YY_RULE_SETUP -#line 300 "program_lexer.l" +#line 307 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } YY_BREAK case 137: YY_RULE_SETUP -#line 302 "program_lexer.l" -{ - yylval->string = strdup(yytext); - return IDENTIFIER; -} +#line 309 "program_lexer.l" +{ return handle_ident(yyextra, yytext, yylval); } YY_BREAK case 138: YY_RULE_SETUP -#line 307 "program_lexer.l" +#line 311 "program_lexer.l" { return DOT_DOT; } YY_BREAK case 139: YY_RULE_SETUP -#line 309 "program_lexer.l" +#line 313 "program_lexer.l" { yylval->integer = strtol(yytext, NULL, 10); return INTEGER; @@ -2182,7 +2186,7 @@ YY_RULE_SETUP YY_BREAK case 140: YY_RULE_SETUP -#line 313 "program_lexer.l" +#line 317 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2194,7 +2198,7 @@ case 141: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 317 "program_lexer.l" +#line 321 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2202,7 +2206,7 @@ YY_RULE_SETUP YY_BREAK case 142: YY_RULE_SETUP -#line 321 "program_lexer.l" +#line 325 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2210,7 +2214,7 @@ YY_RULE_SETUP YY_BREAK case 143: YY_RULE_SETUP -#line 325 "program_lexer.l" +#line 329 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2218,7 +2222,7 @@ YY_RULE_SETUP YY_BREAK case 144: YY_RULE_SETUP -#line 330 "program_lexer.l" +#line 334 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; @@ -2227,7 +2231,7 @@ YY_RULE_SETUP YY_BREAK case 145: YY_RULE_SETUP -#line 336 "program_lexer.l" +#line 340 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2237,7 +2241,7 @@ YY_RULE_SETUP YY_BREAK case 146: YY_RULE_SETUP -#line 342 "program_lexer.l" +#line 346 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; @@ -2246,7 +2250,7 @@ YY_RULE_SETUP YY_BREAK case 147: YY_RULE_SETUP -#line 347 "program_lexer.l" +#line 351 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; @@ -2255,7 +2259,7 @@ YY_RULE_SETUP YY_BREAK case 148: YY_RULE_SETUP -#line 353 "program_lexer.l" +#line 357 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2265,7 +2269,7 @@ YY_RULE_SETUP YY_BREAK case 149: YY_RULE_SETUP -#line 359 "program_lexer.l" +#line 363 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2275,7 +2279,7 @@ YY_RULE_SETUP YY_BREAK case 150: YY_RULE_SETUP -#line 365 "program_lexer.l" +#line 369 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; @@ -2284,7 +2288,7 @@ YY_RULE_SETUP YY_BREAK case 151: YY_RULE_SETUP -#line 371 "program_lexer.l" +#line 375 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2294,7 +2298,7 @@ YY_RULE_SETUP YY_BREAK case 152: YY_RULE_SETUP -#line 378 "program_lexer.l" +#line 382 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2306,7 +2310,7 @@ YY_RULE_SETUP YY_BREAK case 153: YY_RULE_SETUP -#line 387 "program_lexer.l" +#line 391 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; @@ -2315,7 +2319,7 @@ YY_RULE_SETUP YY_BREAK case 154: YY_RULE_SETUP -#line 393 "program_lexer.l" +#line 397 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2325,7 +2329,7 @@ YY_RULE_SETUP YY_BREAK case 155: YY_RULE_SETUP -#line 399 "program_lexer.l" +#line 403 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; @@ -2334,7 +2338,7 @@ YY_RULE_SETUP YY_BREAK case 156: YY_RULE_SETUP -#line 404 "program_lexer.l" +#line 408 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; @@ -2343,7 +2347,7 @@ YY_RULE_SETUP YY_BREAK case 157: YY_RULE_SETUP -#line 410 "program_lexer.l" +#line 414 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2353,7 +2357,7 @@ YY_RULE_SETUP YY_BREAK case 158: YY_RULE_SETUP -#line 416 "program_lexer.l" +#line 420 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2363,7 +2367,7 @@ YY_RULE_SETUP YY_BREAK case 159: YY_RULE_SETUP -#line 422 "program_lexer.l" +#line 426 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; @@ -2372,7 +2376,7 @@ YY_RULE_SETUP YY_BREAK case 160: YY_RULE_SETUP -#line 428 "program_lexer.l" +#line 432 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2382,7 +2386,7 @@ YY_RULE_SETUP YY_BREAK case 161: YY_RULE_SETUP -#line 436 "program_lexer.l" +#line 440 "program_lexer.l" { if (require_ARB_vp) { return TEXGEN_R; @@ -2396,7 +2400,7 @@ YY_RULE_SETUP YY_BREAK case 162: YY_RULE_SETUP -#line 447 "program_lexer.l" +#line 451 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2408,13 +2412,13 @@ YY_RULE_SETUP YY_BREAK case 163: YY_RULE_SETUP -#line 456 "program_lexer.l" +#line 460 "program_lexer.l" { return DOT; } YY_BREAK case 164: /* rule 164 can match eol */ YY_RULE_SETUP -#line 458 "program_lexer.l" +#line 462 "program_lexer.l" { yylloc->first_line++; yylloc->first_column = 1; @@ -2425,7 +2429,7 @@ YY_RULE_SETUP YY_BREAK case 165: YY_RULE_SETUP -#line 465 "program_lexer.l" +#line 469 "program_lexer.l" /* eat whitespace */ ; YY_BREAK case 166: @@ -2433,20 +2437,20 @@ case 166: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 466 "program_lexer.l" +#line 470 "program_lexer.l" /* eat comments */ ; YY_BREAK case 167: YY_RULE_SETUP -#line 467 "program_lexer.l" +#line 471 "program_lexer.l" { return yytext[0]; } YY_BREAK case 168: YY_RULE_SETUP -#line 468 "program_lexer.l" +#line 472 "program_lexer.l" ECHO; YY_BREAK -#line 2450 "lex.yy.c" +#line 2454 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3621,7 +3625,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 468 "program_lexer.l" +#line 472 "program_lexer.l" diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l index d7493f42fad..9e68c34ac0a 100644 --- a/src/mesa/shader/program_lexer.l +++ b/src/mesa/shader/program_lexer.l @@ -39,8 +39,7 @@ if (condition) { \ return token; \ } else { \ - yylval->string = strdup(yytext); \ - return IDENTIFIER; \ + return handle_ident(yyextra, yytext, yylval); \ } \ } while (0) @@ -64,8 +63,7 @@ yylval->temp_inst.Opcode = OPCODE_ ## opcode; \ return token; \ } else { \ - yylval->string = strdup(yytext); \ - return IDENTIFIER; \ + return handle_ident(yyextra, yytext, yylval); \ } \ } while (0) @@ -114,6 +112,15 @@ swiz_from_char(char c) return 0; } +static int +handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval) +{ + lval->string = strdup(text); + + return (_mesa_symbol_table_find_symbol(state->st, 0, text) == NULL) + ? IDENTIFIER : USED_IDENTIFIER; +} + #define YY_USER_ACTION \ do { \ yylloc->first_column = yylloc->last_column; \ @@ -299,10 +306,7 @@ ARRAY2D { return_token_or_IDENTIFIER(require_ARB_fp && require ARRAYSHADOW1D { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } ARRAYSHADOW2D { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } -[_a-zA-Z$][_a-zA-Z0-9$]* { - yylval->string = strdup(yytext); - return IDENTIFIER; -} +[_a-zA-Z$][_a-zA-Z0-9$]* { return handle_ident(yyextra, yytext, yylval); } ".." { return DOT_DOT; } diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index e741e9a13bd..d37b20ba429 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -303,13 +303,14 @@ static struct asm_instruction *asm_instruction_copy_ctor( VTXATTRIB = 352, WEIGHT = 353, IDENTIFIER = 354, - MASK4 = 355, - MASK3 = 356, - MASK2 = 357, - MASK1 = 358, - SWIZZLE = 359, - DOT_DOT = 360, - DOT = 361 + USED_IDENTIFIER = 355, + MASK4 = 356, + MASK3 = 357, + MASK2 = 358, + MASK1 = 359, + SWIZZLE = 360, + DOT_DOT = 361, + DOT = 362 }; #endif @@ -349,7 +350,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 353 "program_parse.tab.c" +#line 354 "program_parse.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -373,14 +374,14 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ -#line 258 "program_parse.y" +#line 259 "program_parse.y" extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, void *yyscanner); /* Line 264 of yacc.c */ -#line 384 "program_parse.tab.c" +#line 385 "program_parse.tab.c" #ifdef short # undef short @@ -597,20 +598,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 383 +#define YYLAST 393 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 117 +#define YYNTOKENS 118 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 137 +#define YYNNTS 138 /* YYNRULES -- Number of rules. */ -#define YYNRULES 272 +#define YYNRULES 274 /* YYNRULES -- Number of states. */ -#define YYNSTATES 458 +#define YYNSTATES 460 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 361 +#define YYMAXUTOK 362 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -622,15 +623,15 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 112, 108, 113, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 107, - 2, 114, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 113, 109, 114, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 108, + 2, 115, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 110, 2, 111, 2, 2, 2, 2, 2, 2, + 2, 111, 2, 112, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 115, 109, 116, 2, 2, 2, 2, + 2, 2, 2, 116, 110, 117, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -654,7 +655,7 @@ static const yytype_uint8 yytranslate[] = 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106 + 105, 106, 107 }; #if YYDEBUG @@ -689,123 +690,123 @@ static const yytype_uint16 yyprhs[] = 686, 690, 694, 696, 702, 705, 708, 711, 714, 718, 721, 725, 726, 728, 730, 731, 733, 735, 736, 738, 740, 741, 743, 745, 746, 750, 751, 755, 756, 760, - 762, 764, 766 + 762, 764, 766, 771, 773 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 118, 0, -1, 119, 120, 122, 12, -1, 3, -1, - 4, -1, 120, 121, -1, -1, 8, 99, 107, -1, - 122, 123, -1, -1, 124, 107, -1, 162, 107, -1, - 125, -1, 126, -1, 127, -1, 128, -1, 129, -1, - 130, -1, 131, -1, 132, -1, 138, -1, 133, -1, - 134, -1, 135, -1, 19, 143, 108, 139, -1, 18, - 142, 108, 141, -1, 16, 142, 108, 139, -1, 14, - 142, 108, 139, 108, 139, -1, 13, 142, 108, 141, - 108, 141, -1, 17, 142, 108, 141, 108, 141, 108, - 141, -1, 15, 142, 108, 141, 108, 136, 108, 137, - -1, 20, 141, -1, 22, 142, 108, 141, 108, 141, - 108, 141, 108, 136, 108, 137, -1, 83, 248, -1, + 119, 0, -1, 120, 121, 123, 12, -1, 3, -1, + 4, -1, 121, 122, -1, -1, 8, 255, 108, -1, + 123, 124, -1, -1, 125, 108, -1, 163, 108, -1, + 126, -1, 127, -1, 128, -1, 129, -1, 130, -1, + 131, -1, 132, -1, 133, -1, 139, -1, 134, -1, + 135, -1, 136, -1, 19, 144, 109, 140, -1, 18, + 143, 109, 142, -1, 16, 143, 109, 140, -1, 14, + 143, 109, 140, 109, 140, -1, 13, 143, 109, 142, + 109, 142, -1, 17, 143, 109, 142, 109, 142, 109, + 142, -1, 15, 143, 109, 142, 109, 137, 109, 138, + -1, 20, 142, -1, 22, 143, 109, 142, 109, 142, + 109, 142, 109, 137, 109, 138, -1, 83, 249, -1, 84, -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, -1, 93, -1, - 94, -1, 95, -1, 21, 142, 108, 147, 108, 144, - -1, 233, 140, -1, 233, 109, 140, 109, -1, 147, - 159, -1, 230, -1, 233, 147, 160, -1, 233, 109, - 147, 160, 109, -1, 148, 161, -1, 156, 158, -1, - 145, 108, 145, 108, 145, 108, 145, -1, 233, 146, - -1, 23, -1, 99, -1, 99, -1, 164, -1, 149, - 110, 150, 111, -1, 178, -1, 241, -1, 99, -1, - 99, -1, 151, -1, 152, -1, 23, -1, 156, 157, - 153, -1, -1, 112, 154, -1, 113, 155, -1, 23, - -1, 23, -1, 99, -1, 103, -1, 103, -1, 103, - -1, 103, -1, 100, -1, 104, -1, -1, 100, -1, - 101, -1, 102, -1, 103, -1, -1, 163, -1, 170, - -1, 234, -1, 237, -1, 240, -1, 253, -1, 7, - 99, 114, 164, -1, 96, 165, -1, 38, 169, -1, - 60, -1, 98, 167, -1, 53, -1, 29, 246, -1, - 37, -1, 74, 247, -1, 50, 110, 168, 111, -1, - 97, 110, 166, 111, -1, 23, -1, -1, 110, 168, - 111, -1, 23, -1, 60, -1, 29, 246, -1, 37, - -1, 74, 247, -1, 171, -1, 172, -1, 10, 99, - 174, -1, 10, 99, 110, 173, 111, 175, -1, -1, - 23, -1, 114, 177, -1, 114, 115, 176, 116, -1, - 179, -1, 176, 108, 179, -1, 181, -1, 217, -1, - 227, -1, 181, -1, 217, -1, 228, -1, 180, -1, - 218, -1, 227, -1, 181, -1, 73, 205, -1, 73, - 182, -1, 73, 184, -1, 73, 187, -1, 73, 189, - -1, 73, 195, -1, 73, 191, -1, 73, 198, -1, - 73, 200, -1, 73, 202, -1, 73, 204, -1, 73, - 216, -1, 47, 245, 183, -1, 193, -1, 33, -1, - 69, -1, 43, 110, 194, 111, 185, -1, 193, -1, - 60, -1, 26, -1, 72, 186, -1, 40, -1, 32, - -1, 44, 188, -1, 25, -1, 245, 67, -1, 45, - 110, 194, 111, 245, 190, -1, 193, -1, 75, 249, - 192, -1, 29, -1, 25, -1, 31, -1, 71, -1, - 23, -1, 76, 247, 196, 197, -1, 35, -1, 54, + 94, -1, 95, -1, 21, 143, 109, 148, 109, 145, + -1, 234, 141, -1, 234, 110, 141, 110, -1, 148, + 160, -1, 231, -1, 234, 148, 161, -1, 234, 110, + 148, 161, 110, -1, 149, 162, -1, 157, 159, -1, + 146, 109, 146, 109, 146, 109, 146, -1, 234, 147, + -1, 23, -1, 255, -1, 100, -1, 165, -1, 150, + 111, 151, 112, -1, 179, -1, 242, -1, 100, -1, + 100, -1, 152, -1, 153, -1, 23, -1, 157, 158, + 154, -1, -1, 113, 155, -1, 114, 156, -1, 23, + -1, 23, -1, 100, -1, 104, -1, 104, -1, 104, + -1, 104, -1, 101, -1, 105, -1, -1, 101, -1, + 102, -1, 103, -1, 104, -1, -1, 164, -1, 171, + -1, 235, -1, 238, -1, 241, -1, 254, -1, 7, + 99, 115, 165, -1, 96, 166, -1, 38, 170, -1, + 60, -1, 98, 168, -1, 53, -1, 29, 247, -1, + 37, -1, 74, 248, -1, 50, 111, 169, 112, -1, + 97, 111, 167, 112, -1, 23, -1, -1, 111, 169, + 112, -1, 23, -1, 60, -1, 29, 247, -1, 37, + -1, 74, 248, -1, 172, -1, 173, -1, 10, 99, + 175, -1, 10, 99, 111, 174, 112, 176, -1, -1, + 23, -1, 115, 178, -1, 115, 116, 177, 117, -1, + 180, -1, 177, 109, 180, -1, 182, -1, 218, -1, + 228, -1, 182, -1, 218, -1, 229, -1, 181, -1, + 219, -1, 228, -1, 182, -1, 73, 206, -1, 73, + 183, -1, 73, 185, -1, 73, 188, -1, 73, 190, + -1, 73, 196, -1, 73, 192, -1, 73, 199, -1, + 73, 201, -1, 73, 203, -1, 73, 205, -1, 73, + 217, -1, 47, 246, 184, -1, 194, -1, 33, -1, + 69, -1, 43, 111, 195, 112, 186, -1, 194, -1, + 60, -1, 26, -1, 72, 187, -1, 40, -1, 32, + -1, 44, 189, -1, 25, -1, 246, 67, -1, 45, + 111, 195, 112, 246, 191, -1, 194, -1, 75, 250, + 193, -1, 29, -1, 25, -1, 31, -1, 71, -1, + 23, -1, 76, 248, 197, 198, -1, 35, -1, 54, -1, 79, -1, 80, -1, 78, -1, 77, -1, 36, - 199, -1, 29, -1, 56, -1, 28, 110, 201, 111, - 57, -1, 23, -1, 58, 203, -1, 70, -1, 26, - -1, 207, 66, 110, 210, 111, -1, 207, 206, -1, - -1, 66, 110, 210, 105, 210, 111, -1, 49, 211, - 208, -1, -1, 209, -1, 41, -1, 82, -1, 42, - -1, 23, -1, 51, 212, -1, 63, -1, 52, -1, - 81, 247, -1, 55, 110, 214, 111, -1, 48, 110, - 215, 111, -1, -1, 213, -1, 23, -1, 23, -1, - 23, -1, 30, 64, -1, 221, -1, 224, -1, 219, - -1, 222, -1, 62, 34, 110, 220, 111, -1, 225, - -1, 225, 105, 225, -1, 62, 34, 110, 225, 111, - -1, 62, 46, 110, 223, 111, -1, 226, -1, 226, - 105, 226, -1, 62, 46, 110, 226, 111, -1, 23, - -1, 23, -1, 229, -1, 231, -1, 230, -1, 231, - -1, 232, -1, 24, -1, 23, -1, 115, 232, 116, - -1, 115, 232, 108, 232, 116, -1, 115, 232, 108, - 232, 108, 232, 116, -1, 115, 232, 108, 232, 108, - 232, 108, 232, 116, -1, 233, 24, -1, 233, 23, - -1, 112, -1, 113, -1, -1, -1, 236, 11, 235, - 239, -1, 99, -1, -1, -1, 5, 238, 239, -1, - 239, 108, 99, -1, 99, -1, 236, 9, 99, 114, - 241, -1, 65, 60, -1, 65, 37, -1, 65, 242, - -1, 65, 59, -1, 65, 74, 247, -1, 65, 30, - -1, 29, 243, 244, -1, -1, 39, -1, 27, -1, + 200, -1, 29, -1, 56, -1, 28, 111, 202, 112, + 57, -1, 23, -1, 58, 204, -1, 70, -1, 26, + -1, 208, 66, 111, 211, 112, -1, 208, 207, -1, + -1, 66, 111, 211, 106, 211, 112, -1, 49, 212, + 209, -1, -1, 210, -1, 41, -1, 82, -1, 42, + -1, 23, -1, 51, 213, -1, 63, -1, 52, -1, + 81, 248, -1, 55, 111, 215, 112, -1, 48, 111, + 216, 112, -1, -1, 214, -1, 23, -1, 23, -1, + 23, -1, 30, 64, -1, 222, -1, 225, -1, 220, + -1, 223, -1, 62, 34, 111, 221, 112, -1, 226, + -1, 226, 106, 226, -1, 62, 34, 111, 226, 112, + -1, 62, 46, 111, 224, 112, -1, 227, -1, 227, + 106, 227, -1, 62, 46, 111, 227, 112, -1, 23, + -1, 23, -1, 230, -1, 232, -1, 231, -1, 232, + -1, 233, -1, 24, -1, 23, -1, 116, 233, 117, + -1, 116, 233, 109, 233, 117, -1, 116, 233, 109, + 233, 109, 233, 117, -1, 116, 233, 109, 233, 109, + 233, 109, 233, 117, -1, 234, 24, -1, 234, 23, + -1, 113, -1, 114, -1, -1, -1, 237, 11, 236, + 240, -1, 255, -1, -1, -1, 5, 239, 240, -1, + 240, 109, 99, -1, 99, -1, 237, 9, 99, 115, + 242, -1, 65, 60, -1, 65, 37, -1, 65, 243, + -1, 65, 59, -1, 65, 74, 248, -1, 65, 30, + -1, 29, 244, 245, -1, -1, 39, -1, 27, -1, -1, 61, -1, 68, -1, -1, 39, -1, 27, -1, - -1, 61, -1, 68, -1, -1, 110, 250, 111, -1, - -1, 110, 251, 111, -1, -1, 110, 252, 111, -1, - 23, -1, 23, -1, 23, -1, 6, 99, 114, 99, - -1 + -1, 61, -1, 68, -1, -1, 111, 251, 112, -1, + -1, 111, 252, 112, -1, -1, 111, 253, 112, -1, + 23, -1, 23, -1, 23, -1, 6, 99, 115, 100, + -1, 99, -1, 100, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 265, 265, 268, 276, 288, 289, 292, 314, 315, - 318, 333, 336, 341, 348, 349, 350, 351, 352, 353, - 354, 357, 358, 359, 362, 368, 374, 380, 387, 393, - 400, 444, 451, 495, 501, 502, 503, 504, 505, 506, - 507, 508, 509, 510, 511, 512, 515, 527, 535, 552, - 559, 578, 589, 609, 631, 640, 673, 680, 695, 745, - 787, 798, 819, 829, 835, 866, 883, 883, 885, 892, - 904, 905, 906, 909, 921, 933, 951, 962, 974, 976, - 977, 978, 979, 982, 982, 982, 982, 983, 986, 987, - 988, 989, 990, 991, 994, 1012, 1016, 1022, 1026, 1030, - 1034, 1043, 1052, 1056, 1061, 1067, 1078, 1078, 1079, 1081, - 1085, 1089, 1093, 1099, 1099, 1101, 1117, 1140, 1143, 1154, - 1160, 1166, 1167, 1174, 1180, 1186, 1194, 1200, 1206, 1214, - 1220, 1226, 1234, 1235, 1238, 1239, 1240, 1241, 1242, 1243, - 1244, 1245, 1246, 1247, 1248, 1251, 1260, 1264, 1268, 1274, - 1283, 1287, 1291, 1300, 1304, 1310, 1316, 1323, 1328, 1336, - 1346, 1348, 1356, 1362, 1366, 1370, 1376, 1387, 1396, 1400, - 1405, 1409, 1413, 1417, 1423, 1430, 1434, 1440, 1448, 1459, - 1466, 1470, 1476, 1486, 1497, 1501, 1519, 1528, 1531, 1537, - 1541, 1545, 1551, 1562, 1567, 1572, 1577, 1582, 1587, 1595, - 1598, 1603, 1616, 1624, 1635, 1643, 1643, 1645, 1645, 1647, - 1657, 1662, 1669, 1679, 1688, 1693, 1700, 1710, 1720, 1732, - 1732, 1733, 1733, 1735, 1745, 1753, 1763, 1771, 1779, 1788, - 1799, 1803, 1809, 1810, 1811, 1814, 1814, 1817, 1852, 1856, - 1856, 1859, 1865, 1873, 1886, 1895, 1904, 1908, 1917, 1926, - 1937, 1944, 1949, 1958, 1970, 1973, 1982, 1993, 1994, 1995, - 1998, 1999, 2000, 2003, 2004, 2007, 2008, 2011, 2012, 2015, - 2026, 2037, 2048 + 0, 266, 266, 269, 277, 289, 290, 293, 315, 316, + 319, 334, 337, 342, 349, 350, 351, 352, 353, 354, + 355, 358, 359, 360, 363, 369, 375, 381, 388, 394, + 401, 445, 452, 496, 502, 503, 504, 505, 506, 507, + 508, 509, 510, 511, 512, 513, 516, 528, 536, 553, + 560, 579, 590, 610, 632, 641, 674, 681, 696, 746, + 788, 799, 820, 830, 836, 867, 884, 884, 886, 893, + 905, 906, 907, 910, 922, 934, 952, 963, 975, 977, + 978, 979, 980, 983, 983, 983, 983, 984, 987, 988, + 989, 990, 991, 992, 995, 1013, 1017, 1023, 1027, 1031, + 1035, 1044, 1053, 1057, 1062, 1068, 1079, 1079, 1080, 1082, + 1086, 1090, 1094, 1100, 1100, 1102, 1118, 1141, 1144, 1155, + 1161, 1167, 1168, 1175, 1181, 1187, 1195, 1201, 1207, 1215, + 1221, 1227, 1235, 1236, 1239, 1240, 1241, 1242, 1243, 1244, + 1245, 1246, 1247, 1248, 1249, 1252, 1261, 1265, 1269, 1275, + 1284, 1288, 1292, 1301, 1305, 1311, 1317, 1324, 1329, 1337, + 1347, 1349, 1357, 1363, 1367, 1371, 1377, 1388, 1397, 1401, + 1406, 1410, 1414, 1418, 1424, 1431, 1435, 1441, 1449, 1460, + 1467, 1471, 1477, 1487, 1498, 1502, 1520, 1529, 1532, 1538, + 1542, 1546, 1552, 1563, 1568, 1573, 1578, 1583, 1588, 1596, + 1599, 1604, 1617, 1625, 1636, 1644, 1644, 1646, 1646, 1648, + 1658, 1663, 1670, 1680, 1689, 1694, 1701, 1711, 1721, 1733, + 1733, 1734, 1734, 1736, 1746, 1754, 1764, 1772, 1780, 1789, + 1800, 1804, 1810, 1811, 1812, 1815, 1815, 1818, 1853, 1857, + 1857, 1860, 1866, 1874, 1887, 1896, 1905, 1909, 1918, 1927, + 1938, 1945, 1950, 1959, 1971, 1974, 1983, 1994, 1995, 1996, + 1999, 2000, 2001, 2004, 2005, 2008, 2009, 2012, 2013, 2016, + 2027, 2038, 2049, 2070, 2071 }; #endif @@ -830,11 +831,11 @@ static const char *const yytname[] = "TEX_2D", "TEX_3D", "TEX_CUBE", "TEX_RECT", "TEX_SHADOW1D", "TEX_SHADOW2D", "TEX_SHADOWRECT", "TEX_ARRAY1D", "TEX_ARRAY2D", "TEX_ARRAYSHADOW1D", "TEX_ARRAYSHADOW2D", "VERTEX", "VTXATTRIB", - "WEIGHT", "IDENTIFIER", "MASK4", "MASK3", "MASK2", "MASK1", "SWIZZLE", - "DOT_DOT", "DOT", "';'", "','", "'|'", "'['", "']'", "'+'", "'-'", "'='", - "'{'", "'}'", "$accept", "program", "language", "optionSequence", - "option", "statementSequence", "statement", "instruction", - "ALU_instruction", "TexInstruction", "ARL_instruction", + "WEIGHT", "IDENTIFIER", "USED_IDENTIFIER", "MASK4", "MASK3", "MASK2", + "MASK1", "SWIZZLE", "DOT_DOT", "DOT", "';'", "','", "'|'", "'['", "']'", + "'+'", "'-'", "'='", "'{'", "'}'", "$accept", "program", "language", + "optionSequence", "option", "statementSequence", "statement", + "instruction", "ALU_instruction", "TexInstruction", "ARL_instruction", "VECTORop_instruction", "SCALARop_instruction", "BINSCop_instruction", "BINop_instruction", "TRIop_instruction", "SAMPLE_instruction", "KIL_instruction", "TXD_instruction", "texImageUnit", "texTarget", @@ -873,7 +874,7 @@ static const char *const yytname[] = "optResultColorType", "optFaceType", "optColorType", "optTexCoordUnitNum", "optTexImageUnitNum", "optLegacyTexUnitNum", "texCoordUnitNum", "texImageUnitNum", "legacyTexUnitNum", - "ALIAS_statement", 0 + "ALIAS_statement", "string", 0 }; #endif @@ -892,42 +893,42 @@ static const yytype_uint16 yytoknum[] = 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 59, 44, 124, - 91, 93, 43, 45, 61, 123, 125 + 355, 356, 357, 358, 359, 360, 361, 362, 59, 44, + 124, 91, 93, 43, 45, 61, 123, 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 117, 118, 119, 119, 120, 120, 121, 122, 122, - 123, 123, 124, 124, 125, 125, 125, 125, 125, 125, - 125, 126, 126, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 138, 139, 139, 140, - 140, 141, 141, 142, 143, 144, 145, 146, 146, 147, - 147, 147, 147, 148, 148, 149, 150, 150, 151, 152, - 153, 153, 153, 154, 155, 156, 157, 158, 159, 160, - 160, 160, 160, 161, 161, 161, 161, 161, 162, 162, - 162, 162, 162, 162, 163, 164, 164, 165, 165, 165, - 165, 165, 165, 165, 165, 166, 167, 167, 168, 169, - 169, 169, 169, 170, 170, 171, 172, 173, 173, 174, - 175, 176, 176, 177, 177, 177, 178, 178, 178, 179, - 179, 179, 180, 180, 181, 181, 181, 181, 181, 181, - 181, 181, 181, 181, 181, 182, 183, 183, 183, 184, - 185, 185, 185, 185, 185, 186, 187, 188, 188, 189, - 190, 191, 192, 193, 193, 193, 194, 195, 196, 196, - 197, 197, 197, 197, 198, 199, 199, 200, 201, 202, - 203, 203, 204, 205, 206, 206, 207, 208, 208, 209, - 209, 209, 210, 211, 211, 211, 211, 211, 211, 212, - 212, 213, 214, 215, 216, 217, 217, 218, 218, 219, - 220, 220, 221, 222, 223, 223, 224, 225, 226, 227, - 227, 228, 228, 229, 230, 230, 231, 231, 231, 231, - 232, 232, 233, 233, 233, 235, 234, 236, 236, 238, - 237, 239, 239, 240, 241, 241, 241, 241, 241, 241, - 242, 243, 243, 243, 244, 244, 244, 245, 245, 245, - 246, 246, 246, 247, 247, 248, 248, 249, 249, 250, - 251, 252, 253 + 0, 118, 119, 120, 120, 121, 121, 122, 123, 123, + 124, 124, 125, 125, 126, 126, 126, 126, 126, 126, + 126, 127, 127, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 139, 140, 140, 141, + 141, 142, 142, 143, 144, 145, 146, 147, 147, 148, + 148, 148, 148, 149, 149, 150, 151, 151, 152, 153, + 154, 154, 154, 155, 156, 157, 158, 159, 160, 161, + 161, 161, 161, 162, 162, 162, 162, 162, 163, 163, + 163, 163, 163, 163, 164, 165, 165, 166, 166, 166, + 166, 166, 166, 166, 166, 167, 168, 168, 169, 170, + 170, 170, 170, 171, 171, 172, 173, 174, 174, 175, + 176, 177, 177, 178, 178, 178, 179, 179, 179, 180, + 180, 180, 181, 181, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 183, 184, 184, 184, 185, + 186, 186, 186, 186, 186, 187, 188, 189, 189, 190, + 191, 192, 193, 194, 194, 194, 195, 196, 197, 197, + 198, 198, 198, 198, 199, 200, 200, 201, 202, 203, + 204, 204, 205, 206, 207, 207, 208, 209, 209, 210, + 210, 210, 211, 212, 212, 212, 212, 212, 212, 213, + 213, 214, 215, 216, 217, 218, 218, 219, 219, 220, + 221, 221, 222, 223, 224, 224, 225, 226, 227, 228, + 228, 229, 229, 230, 231, 231, 232, 232, 232, 232, + 233, 233, 234, 234, 234, 236, 235, 237, 237, 239, + 238, 240, 240, 241, 242, 242, 242, 242, 242, 242, + 243, 244, 244, 244, 245, 245, 245, 246, 246, 246, + 247, 247, 247, 248, 248, 249, 249, 250, 250, 251, + 252, 253, 254, 255, 255 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -960,7 +961,7 @@ static const yytype_uint8 yyr2[] = 3, 3, 1, 5, 2, 2, 2, 2, 3, 2, 3, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 3, 0, 3, 0, 3, 1, - 1, 1, 4 + 1, 1, 4, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -969,142 +970,142 @@ static const yytype_uint8 yyr2[] = static const yytype_uint16 yydefact[] = { 0, 3, 4, 0, 6, 1, 9, 0, 5, 238, - 0, 239, 0, 0, 0, 2, 0, 0, 0, 0, - 0, 0, 0, 234, 0, 0, 237, 8, 0, 12, - 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, - 20, 0, 88, 89, 113, 114, 90, 0, 91, 92, - 93, 7, 0, 0, 0, 0, 0, 64, 0, 87, - 63, 0, 0, 0, 0, 0, 75, 0, 0, 232, - 233, 31, 0, 0, 0, 10, 11, 0, 235, 242, - 240, 0, 0, 117, 234, 115, 251, 249, 245, 247, - 244, 263, 246, 234, 83, 84, 85, 86, 53, 234, - 234, 234, 234, 234, 234, 77, 54, 225, 224, 0, - 0, 0, 0, 59, 0, 234, 82, 0, 60, 62, - 126, 127, 205, 206, 128, 221, 222, 0, 234, 0, - 0, 0, 272, 94, 118, 0, 119, 123, 124, 125, - 219, 220, 223, 0, 253, 252, 254, 0, 248, 0, - 0, 0, 0, 26, 0, 25, 24, 260, 111, 109, - 263, 96, 0, 0, 0, 0, 0, 0, 257, 0, - 257, 0, 0, 267, 263, 134, 135, 136, 137, 139, - 138, 140, 141, 142, 143, 0, 144, 260, 101, 0, - 99, 97, 263, 0, 106, 95, 82, 0, 80, 79, - 81, 51, 0, 0, 0, 0, 236, 241, 0, 231, - 230, 255, 256, 250, 269, 0, 234, 234, 0, 47, - 0, 50, 0, 234, 261, 262, 110, 112, 0, 0, - 0, 204, 175, 176, 174, 0, 157, 259, 258, 156, - 0, 0, 0, 0, 199, 195, 0, 194, 263, 187, - 181, 180, 179, 0, 0, 0, 0, 100, 0, 102, - 0, 0, 98, 0, 234, 226, 68, 0, 66, 67, - 0, 234, 234, 243, 0, 116, 264, 28, 27, 0, - 78, 49, 265, 0, 0, 217, 0, 218, 0, 178, - 0, 166, 0, 158, 0, 163, 164, 147, 148, 165, - 145, 146, 0, 201, 193, 200, 0, 196, 189, 191, - 190, 186, 188, 271, 0, 162, 161, 168, 169, 0, - 0, 108, 0, 105, 0, 0, 52, 0, 61, 76, - 70, 46, 0, 0, 0, 234, 48, 0, 33, 0, - 234, 212, 216, 0, 0, 257, 203, 0, 202, 0, - 268, 173, 172, 170, 171, 167, 192, 0, 103, 104, - 107, 234, 227, 0, 0, 69, 234, 57, 58, 56, - 234, 0, 0, 0, 121, 129, 132, 130, 207, 208, - 131, 270, 0, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 30, 29, 177, 152, 154, - 151, 0, 149, 150, 0, 198, 197, 182, 0, 73, - 71, 74, 72, 0, 0, 0, 0, 133, 184, 234, - 120, 266, 155, 153, 159, 160, 234, 228, 234, 0, - 0, 0, 0, 183, 122, 0, 0, 0, 0, 210, - 0, 214, 0, 229, 234, 0, 209, 0, 213, 0, - 0, 55, 32, 211, 215, 0, 0, 185 + 273, 274, 0, 239, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 234, 0, 0, 8, 0, + 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, + 23, 20, 0, 88, 89, 113, 114, 90, 0, 91, + 92, 93, 237, 7, 0, 0, 0, 0, 0, 64, + 0, 87, 63, 0, 0, 0, 0, 0, 75, 0, + 0, 232, 233, 31, 0, 0, 0, 10, 11, 0, + 235, 242, 240, 0, 0, 117, 234, 115, 251, 249, + 245, 247, 244, 263, 246, 234, 83, 84, 85, 86, + 53, 234, 234, 234, 234, 234, 234, 77, 54, 225, + 224, 0, 0, 0, 0, 59, 0, 234, 82, 0, + 60, 62, 126, 127, 205, 206, 128, 221, 222, 0, + 234, 0, 0, 0, 272, 94, 118, 0, 119, 123, + 124, 125, 219, 220, 223, 0, 253, 252, 254, 0, + 248, 0, 0, 0, 0, 26, 0, 25, 24, 260, + 111, 109, 263, 96, 0, 0, 0, 0, 0, 0, + 257, 0, 257, 0, 0, 267, 263, 134, 135, 136, + 137, 139, 138, 140, 141, 142, 143, 0, 144, 260, + 101, 0, 99, 97, 263, 0, 106, 95, 82, 0, + 80, 79, 81, 51, 0, 0, 0, 0, 236, 241, + 0, 231, 230, 255, 256, 250, 269, 0, 234, 234, + 0, 47, 0, 50, 0, 234, 261, 262, 110, 112, + 0, 0, 0, 204, 175, 176, 174, 0, 157, 259, + 258, 156, 0, 0, 0, 0, 199, 195, 0, 194, + 263, 187, 181, 180, 179, 0, 0, 0, 0, 100, + 0, 102, 0, 0, 98, 0, 234, 226, 68, 0, + 66, 67, 0, 234, 234, 243, 0, 116, 264, 28, + 27, 0, 78, 49, 265, 0, 0, 217, 0, 218, + 0, 178, 0, 166, 0, 158, 0, 163, 164, 147, + 148, 165, 145, 146, 0, 201, 193, 200, 0, 196, + 189, 191, 190, 186, 188, 271, 0, 162, 161, 168, + 169, 0, 0, 108, 0, 105, 0, 0, 52, 0, + 61, 76, 70, 46, 0, 0, 0, 234, 48, 0, + 33, 0, 234, 212, 216, 0, 0, 257, 203, 0, + 202, 0, 268, 173, 172, 170, 171, 167, 192, 0, + 103, 104, 107, 234, 227, 0, 0, 69, 234, 57, + 56, 58, 234, 0, 0, 0, 121, 129, 132, 130, + 207, 208, 131, 270, 0, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 30, 29, 177, + 152, 154, 151, 0, 149, 150, 0, 198, 197, 182, + 0, 73, 71, 74, 72, 0, 0, 0, 0, 133, + 184, 234, 120, 266, 155, 153, 159, 160, 234, 228, + 234, 0, 0, 0, 0, 183, 122, 0, 0, 0, + 0, 210, 0, 214, 0, 229, 234, 0, 209, 0, + 213, 0, 0, 55, 32, 211, 215, 0, 0, 185 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 3, 4, 6, 8, 9, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 283, - 395, 40, 150, 219, 71, 58, 67, 331, 332, 369, - 220, 59, 117, 267, 268, 269, 365, 410, 412, 68, - 330, 106, 281, 201, 98, 41, 42, 118, 195, 324, - 262, 322, 161, 43, 44, 45, 135, 85, 275, 373, - 136, 119, 374, 375, 120, 175, 300, 176, 402, 423, - 177, 239, 178, 424, 179, 316, 301, 292, 180, 319, - 355, 181, 234, 182, 290, 183, 252, 184, 417, 433, - 185, 311, 312, 357, 249, 304, 305, 349, 347, 186, - 121, 377, 378, 438, 122, 379, 440, 123, 286, 288, - 380, 124, 140, 125, 126, 142, 72, 46, 130, 47, - 48, 52, 80, 49, 60, 92, 146, 213, 240, 226, - 148, 338, 254, 215, 382, 314, 50 + -1, 3, 4, 6, 8, 9, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 285, + 397, 41, 152, 221, 73, 60, 69, 333, 334, 370, + 222, 61, 119, 269, 270, 271, 367, 412, 414, 70, + 332, 108, 283, 203, 100, 42, 43, 120, 197, 326, + 264, 324, 163, 44, 45, 46, 137, 87, 277, 375, + 138, 121, 376, 377, 122, 177, 302, 178, 404, 425, + 179, 241, 180, 426, 181, 318, 303, 294, 182, 321, + 357, 183, 236, 184, 292, 185, 254, 186, 419, 435, + 187, 313, 314, 359, 251, 306, 307, 351, 349, 188, + 123, 379, 380, 440, 124, 381, 442, 125, 288, 290, + 382, 126, 142, 127, 128, 144, 74, 47, 132, 48, + 49, 54, 82, 50, 62, 94, 148, 215, 242, 228, + 150, 340, 256, 217, 384, 316, 51, 12 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -386 +#define YYPACT_NINF -401 static const yytype_int16 yypact[] = { - 203, -386, -386, 23, -386, -386, 67, -50, -386, 20, - 16, -386, 21, 37, 48, -386, -19, -19, -19, -19, - -19, -19, 58, 131, -19, -19, -386, -386, 53, -386, - -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, - -386, 64, -386, -386, -386, -386, -386, 229, -386, -386, - -386, -386, 77, 81, 89, 78, 95, -386, 75, 130, - -386, 119, 139, 140, 142, 146, -386, 147, 136, -386, - -386, -386, -14, 148, 149, -386, -386, 159, -386, -386, - 152, 162, -20, 239, -6, -386, 31, -386, -386, -386, - -386, 153, -386, 131, -386, -386, -386, -386, -386, 131, - 131, 131, 131, 131, 131, -386, -386, -386, -386, 28, - 50, 123, 40, 154, 30, 131, 101, 155, -386, -386, - -386, -386, -386, -386, -386, -386, -386, 30, 131, 156, - 77, 167, -386, -386, -386, 158, -386, -386, -386, -386, - -386, -386, -386, 218, -386, -386, 13, 244, -386, 160, - 163, -10, 164, -386, 165, -386, -386, 73, -386, -386, - 153, -386, 166, 168, 169, 210, 42, 170, 91, 171, - 100, 145, 38, 173, 153, -386, -386, -386, -386, -386, - -386, -386, -386, -386, -386, 209, -386, 73, -386, 174, - -386, -386, 153, 175, 176, -386, 101, 57, -386, -386, - -386, -386, -16, 179, 180, 225, 152, -386, 177, -386, - -386, -386, -386, -386, -386, 181, 131, 131, 30, -386, - 190, 191, 212, 131, -386, -386, -386, -386, 273, 274, - 275, -386, -386, -386, -386, 276, -386, -386, -386, -386, - 233, 276, 115, 192, 278, -386, 193, -386, 153, 9, - -386, -386, -386, 281, 277, 25, 195, -386, 284, -386, - 285, 284, -386, 200, 131, -386, -386, 199, -386, -386, - 208, 131, 131, -386, 197, -386, -386, -386, -386, 206, - -386, -386, 207, 205, 211, -386, 213, -386, 214, -386, - 215, -386, 216, -386, 217, -386, -386, -386, -386, -386, - -386, -386, 293, -386, -386, -386, 295, -386, -386, -386, - -386, -386, -386, -386, 219, -386, -386, -386, -386, 157, - 297, -386, 220, -386, 221, 222, -386, 66, -386, -386, - 133, -386, 226, -12, 230, 49, -386, 298, -386, 125, - 131, -386, -386, 265, 118, 100, -386, 228, -386, 232, - -386, -386, -386, -386, -386, -386, -386, 234, -386, -386, - -386, 131, -386, 300, 306, -386, 131, -386, -386, -386, - 131, 129, 123, 69, -386, -386, -386, -386, -386, -386, - -386, -386, 235, -386, -386, -386, -386, -386, -386, -386, - -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, - -386, 308, -386, -386, 41, -386, -386, -386, 86, -386, - -386, -386, -386, 240, 241, 231, 237, -386, 286, 49, - -386, -386, -386, -386, -386, -386, 131, -386, 131, 212, - 273, 274, 243, -386, -386, 238, 242, 247, 245, 246, - 248, 252, 297, -386, 131, 125, -386, 273, -386, 274, - 45, -386, -386, -386, -386, 297, 250, -386 + 122, -401, -401, 49, -401, -401, 56, 61, -401, 20, + -401, -401, -5, -401, 7, 45, 78, -401, -47, -47, + -47, -47, -47, -47, 79, 85, -47, -47, -401, 99, + -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, + -401, -401, 127, -401, -401, -401, -401, -401, 120, -401, + -401, -401, -401, -401, 135, 133, 134, 25, 129, -401, + 138, 137, -401, 145, 146, 147, 148, 151, -401, 152, + 154, -401, -401, -401, -14, 153, 155, -401, -401, 143, + -401, -401, 156, 163, 14, 243, 32, -401, 31, -401, + -401, -401, -401, 157, -401, 85, -401, -401, -401, -401, + -401, 85, 85, 85, 85, 85, 85, -401, -401, -401, + -401, 112, 149, 126, 54, 158, 27, 85, 132, 159, + -401, -401, -401, -401, -401, -401, -401, -401, -401, 27, + 85, 160, 135, 168, -401, -401, -401, 161, -401, -401, + -401, -401, -401, -401, -401, 198, -401, -401, 89, 248, + -401, 167, 169, 22, 170, -401, 171, -401, -401, 117, + -401, -401, 157, -401, 172, 173, 174, 208, -1, 175, + 53, 176, 165, 142, -3, 177, 157, -401, -401, -401, + -401, -401, -401, -401, -401, -401, -401, 215, -401, 117, + -401, 179, -401, -401, 157, 180, 181, -401, 132, -38, + -401, -401, -401, -401, -10, 184, 185, 209, 156, -401, + 182, -401, -401, -401, -401, -401, -401, 183, 85, 85, + 27, -401, 192, 194, 216, 85, -401, -401, -401, -401, + 277, 278, 279, -401, -401, -401, -401, 280, -401, -401, + -401, -401, 237, 280, 68, 195, 282, -401, 196, -401, + 157, 33, -401, -401, -401, 285, 281, 19, 200, -401, + 286, -401, 289, 286, -401, 203, 85, -401, -401, 202, + -401, -401, 212, 85, 85, -401, 201, -401, -401, -401, + -401, 210, -401, -401, 207, 213, 214, -401, 218, -401, + 219, -401, 220, -401, 221, -401, 222, -401, -401, -401, + -401, -401, -401, -401, 296, -401, -401, -401, 298, -401, + -401, -401, -401, -401, -401, -401, 226, -401, -401, -401, + -401, 166, 301, -401, 227, -401, 228, 229, -401, 46, + -401, -401, 116, -401, 217, -12, 234, 51, -401, 302, + -401, 125, 85, -401, -401, 270, 37, 165, -401, 233, + -401, 235, -401, -401, -401, -401, -401, -401, -401, 236, + -401, -401, -401, 85, -401, 305, 323, -401, 85, -401, + -401, -401, 85, 162, 126, 59, -401, -401, -401, -401, + -401, -401, -401, -401, 238, -401, -401, -401, -401, -401, + -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, + -401, -401, -401, 317, -401, -401, 41, -401, -401, -401, + 65, -401, -401, -401, -401, 242, 244, 241, 245, -401, + 288, 51, -401, -401, -401, -401, -401, -401, 85, -401, + 85, 216, 277, 278, 246, -401, -401, 247, 249, 250, + 251, 255, 253, 256, 301, -401, 85, 125, -401, 277, + -401, 278, 94, -401, -401, -401, -401, 301, 254, -401 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, - -386, -386, -386, -386, -386, -386, -386, -386, -386, -71, - -80, -386, -96, 144, -81, 204, -386, -386, -350, -386, - -17, -386, -386, -386, -386, -386, -386, -386, -386, 161, - -386, -386, -386, 172, -386, -386, -386, 282, -386, -386, - -386, 105, -386, -386, -386, -386, -386, -386, -386, -386, - -386, -386, -52, -386, -83, -386, -386, -386, -386, -386, - -386, -386, -386, -386, -386, -386, -300, 128, -386, -386, - -386, -386, -386, -386, -386, -386, -386, -386, -386, -386, - -2, -386, -386, -327, -386, -386, -386, -386, -386, -386, - 287, -386, -386, -386, -386, -386, -386, -386, -385, -318, - 288, -386, -386, -145, -82, -112, -84, -386, -386, -386, - -386, -386, 249, -386, 178, -386, -386, -386, -166, 186, - -131, -386, -386, -386, -386, -386, -386 + -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, + -401, -401, -401, -401, -401, -401, -401, -401, -401, -76, + -80, -401, -98, 150, -83, 205, -401, -401, -361, -401, + -18, -401, -401, -401, -401, -401, -401, -401, -401, 164, + -401, -401, -401, 178, -401, -401, -401, 287, -401, -401, + -401, 106, -401, -401, -401, -401, -401, -401, -401, -401, + -401, -401, -49, -401, -85, -401, -401, -401, -401, -401, + -401, -401, -401, -401, -401, -401, -330, 130, -401, -401, + -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, + 0, -401, -401, -400, -401, -401, -401, -401, -401, -401, + 291, -401, -401, -401, -401, -401, -401, -401, -302, -317, + 292, -401, -401, -139, -84, -113, -86, -401, -401, -401, + -401, -401, 252, -401, 186, -401, -401, -401, -166, 190, + -133, -401, -401, -401, -401, -401, -401, -6 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -1114,140 +1115,142 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -222 static const yytype_int16 yytable[] = { - 143, 137, 141, 197, 242, 153, 221, 266, 156, 107, - 108, 367, 149, 107, 108, 151, 413, 151, 109, 152, - 151, 154, 155, 5, 109, 11, 12, 13, 109, 227, - 14, 143, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 255, 403, 439, 56, 204, 110, 10, - 308, 309, 110, 107, 108, 116, 110, 157, 144, 111, - 317, 259, 453, 111, 250, 158, 295, 111, 109, 187, - 145, 232, 296, 221, 211, 7, 112, 188, 436, 318, - 57, 212, 112, 66, 162, 113, 112, 368, 159, 113, - 189, 310, 110, 190, 451, 114, 163, 196, 233, 218, - 191, 115, 160, 111, 425, 115, 69, 70, 251, 115, - 203, 371, 299, 441, 192, 450, 236, 307, 237, 26, - 53, 278, 372, 51, 86, 87, 112, 237, 456, 113, - 238, 454, 88, 151, 224, 277, 54, 193, 194, 238, - 295, 225, 284, 295, 398, 115, 296, 55, 297, 296, - 455, 164, 327, 165, 89, 90, 407, 66, 399, 166, - 75, 69, 70, 415, 115, 264, 167, 168, 169, 91, - 170, 76, 171, 265, 361, 416, 79, 419, 400, 404, - 143, 172, 362, 93, 298, 420, 299, 333, 83, 299, - 401, 334, 84, 243, 426, 81, 244, 245, 173, 174, - 246, 198, 427, 82, 199, 200, 1, 2, 247, 383, - 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, - 394, 61, 62, 63, 64, 65, 248, 99, 73, 74, - 94, 95, 96, 97, 351, 352, 353, 354, 77, 105, - 78, 209, 210, 69, 70, 363, 364, 100, 101, 408, - 102, 143, 376, 141, 103, 104, 127, 128, 129, 396, - 131, 132, 134, 147, -65, 202, 207, 214, 216, 208, - 205, 217, 222, 223, 231, 256, 228, 143, 229, 230, - 235, 241, 333, 253, 258, 260, 261, 271, 272, 414, - 56, 274, 276, 280, -221, 282, 285, 287, 289, 291, - 293, 303, 302, 306, 313, 320, 315, 321, 323, 326, - 328, 329, 335, 339, 435, 336, 346, 337, 348, 340, - 356, 381, 397, 409, 341, 342, 343, 344, 345, 411, - 350, 358, 359, 360, 366, 143, 376, 141, 370, 405, - 422, 430, 143, 406, 333, 407, 421, 431, 428, 429, - 444, 447, 432, 442, 443, 445, 446, 449, 437, 448, - 333, 457, 279, 270, 133, 452, 325, 434, 263, 294, - 418, 138, 139, 257, 0, 0, 0, 0, 0, 206, - 0, 0, 0, 273 + 145, 139, 143, 52, 199, 155, 244, 415, 158, 109, + 110, 369, 151, 268, 223, 153, 405, 153, 58, 154, + 153, 156, 157, 252, 111, 13, 14, 15, 234, 229, + 16, 145, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 257, 452, 109, 110, 206, 112, 5, + 109, 110, 111, 59, 319, 235, 118, 458, 146, 113, + 111, 261, 297, 400, 7, 111, 297, 253, 298, 438, + 147, 266, 298, 320, 310, 311, 427, 401, 238, 267, + 239, 223, 114, 189, 112, 453, 115, 10, 11, 112, + 68, 190, 240, 297, 112, 113, 116, 402, 198, 298, + 113, 299, 117, 53, 191, 113, 55, 192, 301, 403, + 114, 205, 301, 373, 193, 312, 443, 309, 114, 10, + 11, 280, 115, 114, 374, 1, 2, 115, 194, 79, + 441, 80, 220, 153, 456, 279, 85, 300, 117, 301, + 86, 159, 286, 117, 56, 71, 72, 455, 117, 160, + 213, 195, 196, 329, 166, 363, 167, 214, 88, 89, + 10, 11, 168, 364, 71, 72, 90, 117, 421, 169, + 170, 171, 161, 172, 428, 173, 422, 57, 226, 68, + 145, 406, 429, 164, 174, 227, 162, 335, 91, 92, + 245, 336, 239, 246, 247, 165, 417, 248, 71, 72, + 457, 175, 176, 93, 240, 249, 409, 77, 418, 385, + 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, + 396, 211, 212, 250, 63, 64, 65, 66, 67, 365, + 366, 75, 76, 200, 81, 78, 201, 202, 96, 97, + 98, 99, 131, 353, 354, 355, 356, 95, 83, 84, + 410, 145, 378, 143, 101, 102, 103, 104, 107, 398, + 105, 106, 129, 134, 130, 133, 136, 209, 149, -65, + 204, 216, 233, 210, 58, 207, 218, 145, 219, 224, + 225, 258, 335, 230, 231, 232, 237, 243, 255, 416, + 260, 262, 263, 273, 274, 278, 282, 276, -221, 284, + 287, 289, 291, 293, 295, 305, 304, 308, 315, 323, + 317, 322, 325, 328, 330, 437, 331, 337, 339, 348, + 338, 350, 341, 342, 358, 383, 368, 399, 411, 371, + 343, 344, 345, 346, 347, 145, 378, 143, 352, 360, + 361, 362, 145, 372, 335, 407, 413, 408, 409, 424, + 423, 430, 432, 431, 434, 439, 433, 444, 446, 447, + 335, 449, 451, 448, 445, 450, 459, 454, 272, 327, + 281, 135, 436, 296, 420, 0, 265, 140, 141, 259, + 0, 0, 0, 0, 208, 0, 0, 0, 0, 0, + 0, 0, 0, 275 }; static const yytype_int16 yycheck[] = { - 84, 84, 84, 115, 170, 101, 151, 23, 104, 23, - 24, 23, 93, 23, 24, 99, 366, 101, 38, 100, - 104, 102, 103, 0, 38, 5, 6, 7, 38, 160, - 10, 115, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 174, 344, 430, 65, 128, 62, 99, - 41, 42, 62, 23, 24, 72, 62, 29, 27, 73, - 35, 192, 447, 73, 26, 37, 25, 73, 38, 29, - 39, 29, 31, 218, 61, 8, 96, 37, 428, 54, - 99, 68, 96, 99, 34, 99, 96, 99, 60, 99, - 50, 82, 62, 53, 444, 109, 46, 114, 56, 109, - 60, 115, 74, 73, 404, 115, 112, 113, 70, 115, - 127, 62, 71, 431, 74, 442, 25, 248, 27, 99, - 99, 217, 73, 107, 29, 30, 96, 27, 455, 99, - 39, 449, 37, 217, 61, 216, 99, 97, 98, 39, - 25, 68, 223, 25, 26, 115, 31, 99, 33, 31, - 105, 28, 264, 30, 59, 60, 111, 99, 40, 36, - 107, 112, 113, 34, 115, 108, 43, 44, 45, 74, - 47, 107, 49, 116, 108, 46, 99, 108, 60, 345, - 264, 58, 116, 108, 69, 116, 71, 271, 110, 71, - 72, 272, 114, 48, 108, 114, 51, 52, 75, 76, - 55, 100, 116, 114, 103, 104, 3, 4, 63, 84, + 86, 86, 86, 9, 117, 103, 172, 368, 106, 23, + 24, 23, 95, 23, 153, 101, 346, 103, 65, 102, + 106, 104, 105, 26, 38, 5, 6, 7, 29, 162, + 10, 117, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 176, 444, 23, 24, 130, 62, 0, + 23, 24, 38, 100, 35, 56, 74, 457, 27, 73, + 38, 194, 25, 26, 8, 38, 25, 70, 31, 430, + 39, 109, 31, 54, 41, 42, 406, 40, 25, 117, + 27, 220, 96, 29, 62, 446, 100, 99, 100, 62, + 100, 37, 39, 25, 62, 73, 110, 60, 116, 31, + 73, 33, 116, 108, 50, 73, 99, 53, 71, 72, + 96, 129, 71, 62, 60, 82, 433, 250, 96, 99, + 100, 219, 100, 96, 73, 3, 4, 100, 74, 9, + 432, 11, 110, 219, 451, 218, 111, 69, 116, 71, + 115, 29, 225, 116, 99, 113, 114, 449, 116, 37, + 61, 97, 98, 266, 28, 109, 30, 68, 29, 30, + 99, 100, 36, 117, 113, 114, 37, 116, 109, 43, + 44, 45, 60, 47, 109, 49, 117, 99, 61, 100, + 266, 347, 117, 34, 58, 68, 74, 273, 59, 60, + 48, 274, 27, 51, 52, 46, 34, 55, 113, 114, + 106, 75, 76, 74, 39, 63, 112, 108, 46, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 17, 18, 19, 20, 21, 81, 108, 24, 25, - 100, 101, 102, 103, 77, 78, 79, 80, 9, 103, - 11, 23, 24, 112, 113, 112, 113, 108, 108, 361, - 108, 335, 335, 335, 108, 108, 108, 108, 99, 340, - 108, 99, 23, 110, 110, 110, 99, 23, 108, 111, - 114, 108, 108, 108, 64, 66, 110, 361, 110, 110, - 110, 110, 366, 110, 110, 110, 110, 108, 108, 370, - 65, 114, 111, 103, 103, 83, 23, 23, 23, 23, - 67, 23, 110, 110, 23, 110, 29, 23, 23, 109, - 111, 103, 115, 108, 426, 109, 23, 110, 23, 108, - 23, 23, 57, 23, 111, 111, 111, 111, 111, 23, - 111, 111, 111, 111, 108, 419, 419, 419, 108, 111, - 32, 110, 426, 111, 428, 111, 111, 110, 108, 108, - 108, 105, 66, 110, 116, 108, 111, 105, 429, 111, - 444, 111, 218, 202, 82, 445, 261, 419, 196, 241, - 372, 84, 84, 187, -1, -1, -1, -1, -1, 130, - -1, -1, -1, 205 + 95, 23, 24, 81, 19, 20, 21, 22, 23, 113, + 114, 26, 27, 101, 99, 108, 104, 105, 101, 102, + 103, 104, 99, 77, 78, 79, 80, 109, 115, 115, + 363, 337, 337, 337, 109, 109, 109, 109, 104, 342, + 109, 109, 109, 100, 109, 109, 23, 99, 111, 111, + 111, 23, 64, 112, 65, 115, 109, 363, 109, 109, + 109, 66, 368, 111, 111, 111, 111, 111, 111, 372, + 111, 111, 111, 109, 109, 112, 104, 115, 104, 83, + 23, 23, 23, 23, 67, 23, 111, 111, 23, 23, + 29, 111, 23, 110, 112, 428, 104, 116, 111, 23, + 110, 23, 109, 109, 23, 23, 109, 57, 23, 335, + 112, 112, 112, 112, 112, 421, 421, 421, 112, 112, + 112, 112, 428, 109, 430, 112, 23, 112, 112, 32, + 112, 109, 111, 109, 66, 431, 111, 111, 109, 109, + 446, 106, 106, 112, 117, 112, 112, 447, 204, 263, + 220, 84, 421, 243, 374, -1, 198, 86, 86, 189, + -1, -1, -1, -1, 132, -1, -1, -1, -1, -1, + -1, -1, -1, 207 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 3, 4, 118, 119, 0, 120, 8, 121, 122, - 99, 5, 6, 7, 10, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 99, 123, 124, 125, + 0, 3, 4, 119, 120, 0, 121, 8, 122, 123, + 99, 100, 255, 5, 6, 7, 10, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 138, 162, 163, 170, 171, 172, 234, 236, 237, 240, - 253, 107, 238, 99, 99, 99, 65, 99, 142, 148, - 241, 142, 142, 142, 142, 142, 99, 143, 156, 112, - 113, 141, 233, 142, 142, 107, 107, 9, 11, 99, - 239, 114, 114, 110, 114, 174, 29, 30, 37, 59, - 60, 74, 242, 108, 100, 101, 102, 103, 161, 108, - 108, 108, 108, 108, 108, 103, 158, 23, 24, 38, - 62, 73, 96, 99, 109, 115, 147, 149, 164, 178, - 181, 217, 221, 224, 228, 230, 231, 108, 108, 99, - 235, 108, 99, 164, 23, 173, 177, 181, 217, 227, - 229, 231, 232, 233, 27, 39, 243, 110, 247, 141, - 139, 233, 141, 139, 141, 141, 139, 29, 37, 60, - 74, 169, 34, 46, 28, 30, 36, 43, 44, 45, - 47, 49, 58, 75, 76, 182, 184, 187, 189, 191, - 195, 198, 200, 202, 204, 207, 216, 29, 37, 50, - 53, 60, 74, 97, 98, 165, 147, 232, 100, 103, - 104, 160, 110, 147, 141, 114, 239, 99, 111, 23, - 24, 61, 68, 244, 23, 250, 108, 108, 109, 140, - 147, 230, 108, 108, 61, 68, 246, 247, 110, 110, - 110, 64, 29, 56, 199, 110, 25, 27, 39, 188, - 245, 110, 245, 48, 51, 52, 55, 63, 81, 211, - 26, 70, 203, 110, 249, 247, 66, 246, 110, 247, - 110, 110, 167, 160, 108, 116, 23, 150, 151, 152, - 156, 108, 108, 241, 114, 175, 111, 141, 139, 140, - 103, 159, 83, 136, 141, 23, 225, 23, 226, 23, - 201, 23, 194, 67, 194, 25, 31, 33, 69, 71, - 183, 193, 110, 23, 212, 213, 110, 247, 41, 42, - 82, 208, 209, 23, 252, 29, 192, 35, 54, 196, - 110, 23, 168, 23, 166, 168, 109, 232, 111, 103, - 157, 144, 145, 233, 141, 115, 109, 110, 248, 108, - 108, 111, 111, 111, 111, 111, 23, 215, 23, 214, - 111, 77, 78, 79, 80, 197, 23, 210, 111, 111, - 111, 108, 116, 112, 113, 153, 108, 23, 99, 146, - 108, 62, 73, 176, 179, 180, 181, 218, 219, 222, - 227, 23, 251, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 137, 141, 57, 26, 40, - 60, 72, 185, 193, 245, 111, 111, 111, 232, 23, - 154, 23, 155, 145, 141, 34, 46, 205, 207, 108, - 116, 111, 32, 186, 190, 193, 108, 116, 108, 108, - 110, 110, 66, 206, 179, 232, 145, 136, 220, 225, - 223, 226, 110, 116, 108, 108, 111, 105, 111, 105, - 210, 145, 137, 225, 226, 105, 210, 111 + 136, 139, 163, 164, 171, 172, 173, 235, 237, 238, + 241, 254, 255, 108, 239, 99, 99, 99, 65, 100, + 143, 149, 242, 143, 143, 143, 143, 143, 100, 144, + 157, 113, 114, 142, 234, 143, 143, 108, 108, 9, + 11, 99, 240, 115, 115, 111, 115, 175, 29, 30, + 37, 59, 60, 74, 243, 109, 101, 102, 103, 104, + 162, 109, 109, 109, 109, 109, 109, 104, 159, 23, + 24, 38, 62, 73, 96, 100, 110, 116, 148, 150, + 165, 179, 182, 218, 222, 225, 229, 231, 232, 109, + 109, 99, 236, 109, 100, 165, 23, 174, 178, 182, + 218, 228, 230, 232, 233, 234, 27, 39, 244, 111, + 248, 142, 140, 234, 142, 140, 142, 142, 140, 29, + 37, 60, 74, 170, 34, 46, 28, 30, 36, 43, + 44, 45, 47, 49, 58, 75, 76, 183, 185, 188, + 190, 192, 196, 199, 201, 203, 205, 208, 217, 29, + 37, 50, 53, 60, 74, 97, 98, 166, 148, 233, + 101, 104, 105, 161, 111, 148, 142, 115, 240, 99, + 112, 23, 24, 61, 68, 245, 23, 251, 109, 109, + 110, 141, 148, 231, 109, 109, 61, 68, 247, 248, + 111, 111, 111, 64, 29, 56, 200, 111, 25, 27, + 39, 189, 246, 111, 246, 48, 51, 52, 55, 63, + 81, 212, 26, 70, 204, 111, 250, 248, 66, 247, + 111, 248, 111, 111, 168, 161, 109, 117, 23, 151, + 152, 153, 157, 109, 109, 242, 115, 176, 112, 142, + 140, 141, 104, 160, 83, 137, 142, 23, 226, 23, + 227, 23, 202, 23, 195, 67, 195, 25, 31, 33, + 69, 71, 184, 194, 111, 23, 213, 214, 111, 248, + 41, 42, 82, 209, 210, 23, 253, 29, 193, 35, + 54, 197, 111, 23, 169, 23, 167, 169, 110, 233, + 112, 104, 158, 145, 146, 234, 142, 116, 110, 111, + 249, 109, 109, 112, 112, 112, 112, 112, 23, 216, + 23, 215, 112, 77, 78, 79, 80, 198, 23, 211, + 112, 112, 112, 109, 117, 113, 114, 154, 109, 23, + 147, 255, 109, 62, 73, 177, 180, 181, 182, 219, + 220, 223, 228, 23, 252, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 138, 142, 57, + 26, 40, 60, 72, 186, 194, 246, 112, 112, 112, + 233, 23, 155, 23, 156, 146, 142, 34, 46, 206, + 208, 109, 117, 112, 32, 187, 191, 194, 109, 117, + 109, 109, 111, 111, 66, 207, 180, 233, 146, 137, + 221, 226, 224, 227, 111, 117, 109, 109, 112, 106, + 112, 106, 211, 146, 138, 226, 227, 106, 211, 112 }; #define yyerrok (yyerrstatus = 0) @@ -2101,7 +2104,7 @@ yyreduce: case 3: /* Line 1455 of yacc.c */ -#line 269 "program_parse.y" +#line 270 "program_parse.y" { if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) { yyerror(& (yylsp[(1) - (1)]), state, "invalid fragment program header"); @@ -2114,7 +2117,7 @@ yyreduce: case 4: /* Line 1455 of yacc.c */ -#line 277 "program_parse.y" +#line 278 "program_parse.y" { if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex program header"); @@ -2129,7 +2132,7 @@ yyreduce: case 7: /* Line 1455 of yacc.c */ -#line 293 "program_parse.y" +#line 294 "program_parse.y" { int valid = 0; @@ -2154,7 +2157,7 @@ yyreduce: case 10: /* Line 1455 of yacc.c */ -#line 319 "program_parse.y" +#line 320 "program_parse.y" { if ((yyvsp[(1) - (2)].inst) != NULL) { if (state->inst_tail == NULL) { @@ -2174,7 +2177,7 @@ yyreduce: case 12: /* Line 1455 of yacc.c */ -#line 337 "program_parse.y" +#line 338 "program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); state->prog->NumAluInstructions++; @@ -2184,7 +2187,7 @@ yyreduce: case 13: /* Line 1455 of yacc.c */ -#line 342 "program_parse.y" +#line 343 "program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); state->prog->NumTexInstructions++; @@ -2194,7 +2197,7 @@ yyreduce: case 24: /* Line 1455 of yacc.c */ -#line 363 "program_parse.y" +#line 364 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2203,7 +2206,7 @@ yyreduce: case 25: /* Line 1455 of yacc.c */ -#line 369 "program_parse.y" +#line 370 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2212,7 +2215,7 @@ yyreduce: case 26: /* Line 1455 of yacc.c */ -#line 375 "program_parse.y" +#line 376 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2221,7 +2224,7 @@ yyreduce: case 27: /* Line 1455 of yacc.c */ -#line 381 "program_parse.y" +#line 382 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); ;} @@ -2230,7 +2233,7 @@ yyreduce: case 28: /* Line 1455 of yacc.c */ -#line 388 "program_parse.y" +#line 389 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); ;} @@ -2239,7 +2242,7 @@ yyreduce: case 29: /* Line 1455 of yacc.c */ -#line 395 "program_parse.y" +#line 396 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg)); ;} @@ -2248,7 +2251,7 @@ yyreduce: case 30: /* Line 1455 of yacc.c */ -#line 401 "program_parse.y" +#line 402 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL); if ((yyval.inst) != NULL) { @@ -2295,7 +2298,7 @@ yyreduce: case 31: /* Line 1455 of yacc.c */ -#line 445 "program_parse.y" +#line 446 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL); state->fragment.UsesKill = 1; @@ -2305,7 +2308,7 @@ yyreduce: case 32: /* Line 1455 of yacc.c */ -#line 452 "program_parse.y" +#line 453 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg)); if ((yyval.inst) != NULL) { @@ -2352,7 +2355,7 @@ yyreduce: case 33: /* Line 1455 of yacc.c */ -#line 496 "program_parse.y" +#line 497 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} @@ -2361,91 +2364,91 @@ yyreduce: case 34: /* Line 1455 of yacc.c */ -#line 501 "program_parse.y" +#line 502 "program_parse.y" { (yyval.integer) = TEXTURE_1D_INDEX; ;} break; case 35: /* Line 1455 of yacc.c */ -#line 502 "program_parse.y" +#line 503 "program_parse.y" { (yyval.integer) = TEXTURE_2D_INDEX; ;} break; case 36: /* Line 1455 of yacc.c */ -#line 503 "program_parse.y" +#line 504 "program_parse.y" { (yyval.integer) = TEXTURE_3D_INDEX; ;} break; case 37: /* Line 1455 of yacc.c */ -#line 504 "program_parse.y" +#line 505 "program_parse.y" { (yyval.integer) = TEXTURE_CUBE_INDEX; ;} break; case 38: /* Line 1455 of yacc.c */ -#line 505 "program_parse.y" +#line 506 "program_parse.y" { (yyval.integer) = TEXTURE_RECT_INDEX; ;} break; case 39: /* Line 1455 of yacc.c */ -#line 506 "program_parse.y" +#line 507 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_INDEX; ;} break; case 40: /* Line 1455 of yacc.c */ -#line 507 "program_parse.y" +#line 508 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_INDEX; ;} break; case 41: /* Line 1455 of yacc.c */ -#line 508 "program_parse.y" +#line 509 "program_parse.y" { (yyval.integer) = -TEXTURE_RECT_INDEX; ;} break; case 42: /* Line 1455 of yacc.c */ -#line 509 "program_parse.y" +#line 510 "program_parse.y" { (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;} break; case 43: /* Line 1455 of yacc.c */ -#line 510 "program_parse.y" +#line 511 "program_parse.y" { (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;} break; case 44: /* Line 1455 of yacc.c */ -#line 511 "program_parse.y" +#line 512 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;} break; case 45: /* Line 1455 of yacc.c */ -#line 512 "program_parse.y" +#line 513 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;} break; case 46: /* Line 1455 of yacc.c */ -#line 516 "program_parse.y" +#line 517 "program_parse.y" { /* FIXME: Is this correct? Should the extenedSwizzle be applied * FIXME: to the existing swizzle? @@ -2460,7 +2463,7 @@ yyreduce: case 47: /* Line 1455 of yacc.c */ -#line 528 "program_parse.y" +#line 529 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (2)].src_reg); @@ -2473,7 +2476,7 @@ yyreduce: case 48: /* Line 1455 of yacc.c */ -#line 536 "program_parse.y" +#line 537 "program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (4)].src_reg); @@ -2493,7 +2496,7 @@ yyreduce: case 49: /* Line 1455 of yacc.c */ -#line 553 "program_parse.y" +#line 554 "program_parse.y" { (yyval.src_reg) = (yyvsp[(1) - (2)].src_reg); @@ -2505,7 +2508,7 @@ yyreduce: case 50: /* Line 1455 of yacc.c */ -#line 560 "program_parse.y" +#line 561 "program_parse.y" { struct asm_symbol temp_sym; @@ -2527,7 +2530,7 @@ yyreduce: case 51: /* Line 1455 of yacc.c */ -#line 579 "program_parse.y" +#line 580 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2543,7 +2546,7 @@ yyreduce: case 52: /* Line 1455 of yacc.c */ -#line 590 "program_parse.y" +#line 591 "program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (5)].src_reg); @@ -2565,7 +2568,7 @@ yyreduce: case 53: /* Line 1455 of yacc.c */ -#line 610 "program_parse.y" +#line 611 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask; @@ -2590,7 +2593,7 @@ yyreduce: case 54: /* Line 1455 of yacc.c */ -#line 632 "program_parse.y" +#line 633 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_ADDRESS; @@ -2602,7 +2605,7 @@ yyreduce: case 55: /* Line 1455 of yacc.c */ -#line 641 "program_parse.y" +#line 642 "program_parse.y" { const unsigned xyzw_valid = ((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0) @@ -2638,7 +2641,7 @@ yyreduce: case 56: /* Line 1455 of yacc.c */ -#line 674 "program_parse.y" +#line 675 "program_parse.y" { (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); (yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0; @@ -2648,7 +2651,7 @@ yyreduce: case 57: /* Line 1455 of yacc.c */ -#line 681 "program_parse.y" +#line 682 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2668,7 +2671,7 @@ yyreduce: case 58: /* Line 1455 of yacc.c */ -#line 696 "program_parse.y" +#line 697 "program_parse.y" { if (strlen((yyvsp[(1) - (1)].string)) > 1) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2721,7 +2724,7 @@ yyreduce: case 59: /* Line 1455 of yacc.c */ -#line 746 "program_parse.y" +#line 747 "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 +2771,7 @@ yyreduce: case 60: /* Line 1455 of yacc.c */ -#line 788 "program_parse.y" +#line 789 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = PROGRAM_INPUT; @@ -2784,7 +2787,7 @@ yyreduce: case 61: /* Line 1455 of yacc.c */ -#line 799 "program_parse.y" +#line 800 "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)) { @@ -2810,7 +2813,7 @@ yyreduce: case 62: /* Line 1455 of yacc.c */ -#line 820 "program_parse.y" +#line 821 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = ((yyvsp[(1) - (1)].temp_sym).name != NULL) @@ -2823,7 +2826,7 @@ yyreduce: case 63: /* Line 1455 of yacc.c */ -#line 830 "program_parse.y" +#line 831 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_OUTPUT; @@ -2834,7 +2837,7 @@ yyreduce: case 64: /* Line 1455 of yacc.c */ -#line 836 "program_parse.y" +#line 837 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2868,7 +2871,7 @@ yyreduce: case 65: /* Line 1455 of yacc.c */ -#line 867 "program_parse.y" +#line 868 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2888,7 +2891,7 @@ yyreduce: case 68: /* Line 1455 of yacc.c */ -#line 886 "program_parse.y" +#line 887 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer); @@ -2898,7 +2901,7 @@ yyreduce: case 69: /* Line 1455 of yacc.c */ -#line 893 "program_parse.y" +#line 894 "program_parse.y" { /* FINISHME: Add support for multiple address registers. */ @@ -2913,28 +2916,28 @@ yyreduce: case 70: /* Line 1455 of yacc.c */ -#line 904 "program_parse.y" +#line 905 "program_parse.y" { (yyval.integer) = 0; ;} break; case 71: /* Line 1455 of yacc.c */ -#line 905 "program_parse.y" +#line 906 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 72: /* Line 1455 of yacc.c */ -#line 906 "program_parse.y" +#line 907 "program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; case 73: /* Line 1455 of yacc.c */ -#line 910 "program_parse.y" +#line 911 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2949,7 +2952,7 @@ yyreduce: case 74: /* Line 1455 of yacc.c */ -#line 922 "program_parse.y" +#line 923 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2964,7 +2967,7 @@ yyreduce: case 75: /* Line 1455 of yacc.c */ -#line 934 "program_parse.y" +#line 935 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2985,7 +2988,7 @@ yyreduce: case 76: /* Line 1455 of yacc.c */ -#line 952 "program_parse.y" +#line 953 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); @@ -2999,7 +3002,7 @@ yyreduce: case 77: /* Line 1455 of yacc.c */ -#line 963 "program_parse.y" +#line 964 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, @@ -3014,21 +3017,21 @@ yyreduce: case 82: /* Line 1455 of yacc.c */ -#line 979 "program_parse.y" +#line 980 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 87: /* Line 1455 of yacc.c */ -#line 983 "program_parse.y" +#line 984 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 94: /* Line 1455 of yacc.c */ -#line 995 "program_parse.y" +#line 996 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); @@ -3049,7 +3052,7 @@ yyreduce: case 95: /* Line 1455 of yacc.c */ -#line 1013 "program_parse.y" +#line 1014 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} @@ -3058,7 +3061,7 @@ yyreduce: case 96: /* Line 1455 of yacc.c */ -#line 1017 "program_parse.y" +#line 1018 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} @@ -3067,7 +3070,7 @@ yyreduce: case 97: /* Line 1455 of yacc.c */ -#line 1023 "program_parse.y" +#line 1024 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; ;} @@ -3076,7 +3079,7 @@ yyreduce: case 98: /* Line 1455 of yacc.c */ -#line 1027 "program_parse.y" +#line 1028 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; ;} @@ -3085,7 +3088,7 @@ yyreduce: case 99: /* Line 1455 of yacc.c */ -#line 1031 "program_parse.y" +#line 1032 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; ;} @@ -3094,7 +3097,7 @@ yyreduce: case 100: /* Line 1455 of yacc.c */ -#line 1035 "program_parse.y" +#line 1036 "program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); @@ -3108,7 +3111,7 @@ yyreduce: case 101: /* Line 1455 of yacc.c */ -#line 1044 "program_parse.y" +#line 1045 "program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); @@ -3122,7 +3125,7 @@ yyreduce: case 102: /* Line 1455 of yacc.c */ -#line 1053 "program_parse.y" +#line 1054 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} @@ -3131,7 +3134,7 @@ yyreduce: case 103: /* Line 1455 of yacc.c */ -#line 1057 "program_parse.y" +#line 1058 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -3141,7 +3144,7 @@ yyreduce: case 104: /* Line 1455 of yacc.c */ -#line 1062 "program_parse.y" +#line 1063 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); ;} @@ -3150,7 +3153,7 @@ yyreduce: case 105: /* Line 1455 of yacc.c */ -#line 1068 "program_parse.y" +#line 1069 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); @@ -3164,7 +3167,7 @@ yyreduce: case 109: /* Line 1455 of yacc.c */ -#line 1082 "program_parse.y" +#line 1083 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; ;} @@ -3173,7 +3176,7 @@ yyreduce: case 110: /* Line 1455 of yacc.c */ -#line 1086 "program_parse.y" +#line 1087 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); ;} @@ -3182,7 +3185,7 @@ yyreduce: case 111: /* Line 1455 of yacc.c */ -#line 1090 "program_parse.y" +#line 1091 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; ;} @@ -3191,7 +3194,7 @@ yyreduce: case 112: /* Line 1455 of yacc.c */ -#line 1094 "program_parse.y" +#line 1095 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} @@ -3200,7 +3203,7 @@ yyreduce: case 115: /* Line 1455 of yacc.c */ -#line 1102 "program_parse.y" +#line 1103 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); @@ -3219,7 +3222,7 @@ yyreduce: case 116: /* Line 1455 of yacc.c */ -#line 1118 "program_parse.y" +#line 1119 "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, @@ -3244,7 +3247,7 @@ yyreduce: case 117: /* Line 1455 of yacc.c */ -#line 1140 "program_parse.y" +#line 1141 "program_parse.y" { (yyval.integer) = 0; ;} @@ -3253,7 +3256,7 @@ yyreduce: case 118: /* Line 1455 of yacc.c */ -#line 1144 "program_parse.y" +#line 1145 "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"); @@ -3267,7 +3270,7 @@ yyreduce: case 119: /* Line 1455 of yacc.c */ -#line 1155 "program_parse.y" +#line 1156 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); ;} @@ -3276,7 +3279,7 @@ yyreduce: case 120: /* Line 1455 of yacc.c */ -#line 1161 "program_parse.y" +#line 1162 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); ;} @@ -3285,7 +3288,7 @@ yyreduce: case 122: /* Line 1455 of yacc.c */ -#line 1168 "program_parse.y" +#line 1169 "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); @@ -3295,7 +3298,7 @@ yyreduce: case 123: /* Line 1455 of yacc.c */ -#line 1175 "program_parse.y" +#line 1176 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3306,7 +3309,7 @@ yyreduce: case 124: /* Line 1455 of yacc.c */ -#line 1181 "program_parse.y" +#line 1182 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3317,7 +3320,7 @@ yyreduce: case 125: /* Line 1455 of yacc.c */ -#line 1187 "program_parse.y" +#line 1188 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3328,7 +3331,7 @@ yyreduce: case 126: /* Line 1455 of yacc.c */ -#line 1195 "program_parse.y" +#line 1196 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3339,7 +3342,7 @@ yyreduce: case 127: /* Line 1455 of yacc.c */ -#line 1201 "program_parse.y" +#line 1202 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3350,7 +3353,7 @@ yyreduce: case 128: /* Line 1455 of yacc.c */ -#line 1207 "program_parse.y" +#line 1208 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3361,7 +3364,7 @@ yyreduce: case 129: /* Line 1455 of yacc.c */ -#line 1215 "program_parse.y" +#line 1216 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3372,7 +3375,7 @@ yyreduce: case 130: /* Line 1455 of yacc.c */ -#line 1221 "program_parse.y" +#line 1222 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3383,7 +3386,7 @@ yyreduce: case 131: /* Line 1455 of yacc.c */ -#line 1227 "program_parse.y" +#line 1228 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3394,98 +3397,98 @@ yyreduce: case 132: /* Line 1455 of yacc.c */ -#line 1234 "program_parse.y" +#line 1235 "program_parse.y" { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; case 133: /* Line 1455 of yacc.c */ -#line 1235 "program_parse.y" +#line 1236 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 134: /* Line 1455 of yacc.c */ -#line 1238 "program_parse.y" +#line 1239 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 135: /* Line 1455 of yacc.c */ -#line 1239 "program_parse.y" +#line 1240 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 136: /* Line 1455 of yacc.c */ -#line 1240 "program_parse.y" +#line 1241 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 137: /* Line 1455 of yacc.c */ -#line 1241 "program_parse.y" +#line 1242 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 138: /* Line 1455 of yacc.c */ -#line 1242 "program_parse.y" +#line 1243 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 139: /* Line 1455 of yacc.c */ -#line 1243 "program_parse.y" +#line 1244 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 140: /* Line 1455 of yacc.c */ -#line 1244 "program_parse.y" +#line 1245 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 141: /* Line 1455 of yacc.c */ -#line 1245 "program_parse.y" +#line 1246 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 142: /* Line 1455 of yacc.c */ -#line 1246 "program_parse.y" +#line 1247 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 143: /* Line 1455 of yacc.c */ -#line 1247 "program_parse.y" +#line 1248 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 144: /* Line 1455 of yacc.c */ -#line 1248 "program_parse.y" +#line 1249 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 145: /* Line 1455 of yacc.c */ -#line 1252 "program_parse.y" +#line 1253 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3497,7 +3500,7 @@ yyreduce: case 146: /* Line 1455 of yacc.c */ -#line 1261 "program_parse.y" +#line 1262 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3506,7 +3509,7 @@ yyreduce: case 147: /* Line 1455 of yacc.c */ -#line 1265 "program_parse.y" +#line 1266 "program_parse.y" { (yyval.integer) = STATE_EMISSION; ;} @@ -3515,7 +3518,7 @@ yyreduce: case 148: /* Line 1455 of yacc.c */ -#line 1269 "program_parse.y" +#line 1270 "program_parse.y" { (yyval.integer) = STATE_SHININESS; ;} @@ -3524,7 +3527,7 @@ yyreduce: case 149: /* Line 1455 of yacc.c */ -#line 1275 "program_parse.y" +#line 1276 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3536,7 +3539,7 @@ yyreduce: case 150: /* Line 1455 of yacc.c */ -#line 1284 "program_parse.y" +#line 1285 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3545,7 +3548,7 @@ yyreduce: case 151: /* Line 1455 of yacc.c */ -#line 1288 "program_parse.y" +#line 1289 "program_parse.y" { (yyval.integer) = STATE_POSITION; ;} @@ -3554,7 +3557,7 @@ yyreduce: case 152: /* Line 1455 of yacc.c */ -#line 1292 "program_parse.y" +#line 1293 "program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); @@ -3568,7 +3571,7 @@ yyreduce: case 153: /* Line 1455 of yacc.c */ -#line 1301 "program_parse.y" +#line 1302 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} @@ -3577,7 +3580,7 @@ yyreduce: case 154: /* Line 1455 of yacc.c */ -#line 1305 "program_parse.y" +#line 1306 "program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; ;} @@ -3586,7 +3589,7 @@ yyreduce: case 155: /* Line 1455 of yacc.c */ -#line 1311 "program_parse.y" +#line 1312 "program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; ;} @@ -3595,7 +3598,7 @@ yyreduce: case 156: /* Line 1455 of yacc.c */ -#line 1317 "program_parse.y" +#line 1318 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; @@ -3605,7 +3608,7 @@ yyreduce: case 157: /* Line 1455 of yacc.c */ -#line 1324 "program_parse.y" +#line 1325 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; @@ -3615,7 +3618,7 @@ yyreduce: case 158: /* Line 1455 of yacc.c */ -#line 1329 "program_parse.y" +#line 1330 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3626,7 +3629,7 @@ yyreduce: case 159: /* Line 1455 of yacc.c */ -#line 1337 "program_parse.y" +#line 1338 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3639,7 +3642,7 @@ yyreduce: case 161: /* Line 1455 of yacc.c */ -#line 1349 "program_parse.y" +#line 1350 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(3) - (3)].integer); @@ -3650,7 +3653,7 @@ yyreduce: case 162: /* Line 1455 of yacc.c */ -#line 1357 "program_parse.y" +#line 1358 "program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; ;} @@ -3659,7 +3662,7 @@ yyreduce: case 163: /* Line 1455 of yacc.c */ -#line 1363 "program_parse.y" +#line 1364 "program_parse.y" { (yyval.integer) = STATE_AMBIENT; ;} @@ -3668,7 +3671,7 @@ yyreduce: case 164: /* Line 1455 of yacc.c */ -#line 1367 "program_parse.y" +#line 1368 "program_parse.y" { (yyval.integer) = STATE_DIFFUSE; ;} @@ -3677,7 +3680,7 @@ yyreduce: case 165: /* Line 1455 of yacc.c */ -#line 1371 "program_parse.y" +#line 1372 "program_parse.y" { (yyval.integer) = STATE_SPECULAR; ;} @@ -3686,7 +3689,7 @@ yyreduce: case 166: /* Line 1455 of yacc.c */ -#line 1377 "program_parse.y" +#line 1378 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); @@ -3700,7 +3703,7 @@ yyreduce: case 167: /* Line 1455 of yacc.c */ -#line 1388 "program_parse.y" +#line 1389 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3712,7 +3715,7 @@ yyreduce: case 168: /* Line 1455 of yacc.c */ -#line 1397 "program_parse.y" +#line 1398 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; ;} @@ -3721,7 +3724,7 @@ yyreduce: case 169: /* Line 1455 of yacc.c */ -#line 1401 "program_parse.y" +#line 1402 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; ;} @@ -3730,7 +3733,7 @@ yyreduce: case 170: /* Line 1455 of yacc.c */ -#line 1406 "program_parse.y" +#line 1407 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; ;} @@ -3739,7 +3742,7 @@ yyreduce: case 171: /* Line 1455 of yacc.c */ -#line 1410 "program_parse.y" +#line 1411 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; ;} @@ -3748,7 +3751,7 @@ yyreduce: case 172: /* Line 1455 of yacc.c */ -#line 1414 "program_parse.y" +#line 1415 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; ;} @@ -3757,7 +3760,7 @@ yyreduce: case 173: /* Line 1455 of yacc.c */ -#line 1418 "program_parse.y" +#line 1419 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; ;} @@ -3766,7 +3769,7 @@ yyreduce: case 174: /* Line 1455 of yacc.c */ -#line 1424 "program_parse.y" +#line 1425 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); @@ -3776,7 +3779,7 @@ yyreduce: case 175: /* Line 1455 of yacc.c */ -#line 1431 "program_parse.y" +#line 1432 "program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; ;} @@ -3785,7 +3788,7 @@ yyreduce: case 176: /* Line 1455 of yacc.c */ -#line 1435 "program_parse.y" +#line 1436 "program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; ;} @@ -3794,7 +3797,7 @@ yyreduce: case 177: /* Line 1455 of yacc.c */ -#line 1441 "program_parse.y" +#line 1442 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3805,7 +3808,7 @@ yyreduce: case 178: /* Line 1455 of yacc.c */ -#line 1449 "program_parse.y" +#line 1450 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); @@ -3819,7 +3822,7 @@ yyreduce: case 179: /* Line 1455 of yacc.c */ -#line 1460 "program_parse.y" +#line 1461 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); @@ -3829,7 +3832,7 @@ yyreduce: case 180: /* Line 1455 of yacc.c */ -#line 1467 "program_parse.y" +#line 1468 "program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; ;} @@ -3838,7 +3841,7 @@ yyreduce: case 181: /* Line 1455 of yacc.c */ -#line 1471 "program_parse.y" +#line 1472 "program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; ;} @@ -3847,7 +3850,7 @@ yyreduce: case 182: /* Line 1455 of yacc.c */ -#line 1477 "program_parse.y" +#line 1478 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; @@ -3860,7 +3863,7 @@ yyreduce: case 183: /* Line 1455 of yacc.c */ -#line 1487 "program_parse.y" +#line 1488 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; @@ -3873,7 +3876,7 @@ yyreduce: case 184: /* Line 1455 of yacc.c */ -#line 1497 "program_parse.y" +#line 1498 "program_parse.y" { (yyval.state)[2] = 0; (yyval.state)[3] = 3; @@ -3883,7 +3886,7 @@ yyreduce: case 185: /* Line 1455 of yacc.c */ -#line 1502 "program_parse.y" +#line 1503 "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). @@ -3904,7 +3907,7 @@ yyreduce: case 186: /* Line 1455 of yacc.c */ -#line 1520 "program_parse.y" +#line 1521 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; @@ -3915,7 +3918,7 @@ yyreduce: case 187: /* Line 1455 of yacc.c */ -#line 1528 "program_parse.y" +#line 1529 "program_parse.y" { (yyval.integer) = 0; ;} @@ -3924,7 +3927,7 @@ yyreduce: case 188: /* Line 1455 of yacc.c */ -#line 1532 "program_parse.y" +#line 1533 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3933,7 +3936,7 @@ yyreduce: case 189: /* Line 1455 of yacc.c */ -#line 1538 "program_parse.y" +#line 1539 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; ;} @@ -3942,7 +3945,7 @@ yyreduce: case 190: /* Line 1455 of yacc.c */ -#line 1542 "program_parse.y" +#line 1543 "program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; ;} @@ -3951,7 +3954,7 @@ yyreduce: case 191: /* Line 1455 of yacc.c */ -#line 1546 "program_parse.y" +#line 1547 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; ;} @@ -3960,7 +3963,7 @@ yyreduce: case 192: /* Line 1455 of yacc.c */ -#line 1552 "program_parse.y" +#line 1553 "program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); @@ -3974,7 +3977,7 @@ yyreduce: case 193: /* Line 1455 of yacc.c */ -#line 1563 "program_parse.y" +#line 1564 "program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); @@ -3984,7 +3987,7 @@ yyreduce: case 194: /* Line 1455 of yacc.c */ -#line 1568 "program_parse.y" +#line 1569 "program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; @@ -3994,7 +3997,7 @@ yyreduce: case 195: /* Line 1455 of yacc.c */ -#line 1573 "program_parse.y" +#line 1574 "program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; @@ -4004,7 +4007,7 @@ yyreduce: case 196: /* Line 1455 of yacc.c */ -#line 1578 "program_parse.y" +#line 1579 "program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); @@ -4014,7 +4017,7 @@ yyreduce: case 197: /* Line 1455 of yacc.c */ -#line 1583 "program_parse.y" +#line 1584 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -4024,7 +4027,7 @@ yyreduce: case 198: /* Line 1455 of yacc.c */ -#line 1588 "program_parse.y" +#line 1589 "program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[(3) - (4)].integer); @@ -4034,7 +4037,7 @@ yyreduce: case 199: /* Line 1455 of yacc.c */ -#line 1595 "program_parse.y" +#line 1596 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4043,7 +4046,7 @@ yyreduce: case 200: /* Line 1455 of yacc.c */ -#line 1599 "program_parse.y" +#line 1600 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -4052,7 +4055,7 @@ yyreduce: case 201: /* Line 1455 of yacc.c */ -#line 1604 "program_parse.y" +#line 1605 "program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -4069,7 +4072,7 @@ yyreduce: case 202: /* Line 1455 of yacc.c */ -#line 1617 "program_parse.y" +#line 1618 "program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -4081,7 +4084,7 @@ yyreduce: case 203: /* Line 1455 of yacc.c */ -#line 1625 "program_parse.y" +#line 1626 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); @@ -4095,7 +4098,7 @@ yyreduce: case 204: /* Line 1455 of yacc.c */ -#line 1636 "program_parse.y" +#line 1637 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; @@ -4105,7 +4108,7 @@ yyreduce: case 209: /* Line 1455 of yacc.c */ -#line 1648 "program_parse.y" +#line 1649 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4118,7 +4121,7 @@ yyreduce: case 210: /* Line 1455 of yacc.c */ -#line 1658 "program_parse.y" +#line 1659 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); @@ -4128,7 +4131,7 @@ yyreduce: case 211: /* Line 1455 of yacc.c */ -#line 1663 "program_parse.y" +#line 1664 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); @@ -4138,7 +4141,7 @@ yyreduce: case 212: /* Line 1455 of yacc.c */ -#line 1670 "program_parse.y" +#line 1671 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4151,7 +4154,7 @@ yyreduce: case 213: /* Line 1455 of yacc.c */ -#line 1680 "program_parse.y" +#line 1681 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4164,7 +4167,7 @@ yyreduce: case 214: /* Line 1455 of yacc.c */ -#line 1689 "program_parse.y" +#line 1690 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); @@ -4174,7 +4177,7 @@ yyreduce: case 215: /* Line 1455 of yacc.c */ -#line 1694 "program_parse.y" +#line 1695 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); @@ -4184,7 +4187,7 @@ yyreduce: case 216: /* Line 1455 of yacc.c */ -#line 1701 "program_parse.y" +#line 1702 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4197,7 +4200,7 @@ yyreduce: case 217: /* Line 1455 of yacc.c */ -#line 1711 "program_parse.y" +#line 1712 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); @@ -4210,7 +4213,7 @@ yyreduce: case 218: /* Line 1455 of yacc.c */ -#line 1721 "program_parse.y" +#line 1722 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); @@ -4223,7 +4226,7 @@ yyreduce: case 223: /* Line 1455 of yacc.c */ -#line 1736 "program_parse.y" +#line 1737 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4236,7 +4239,7 @@ yyreduce: case 224: /* Line 1455 of yacc.c */ -#line 1746 "program_parse.y" +#line 1747 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4249,7 +4252,7 @@ yyreduce: case 225: /* Line 1455 of yacc.c */ -#line 1754 "program_parse.y" +#line 1755 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer); @@ -4262,7 +4265,7 @@ yyreduce: case 226: /* Line 1455 of yacc.c */ -#line 1764 "program_parse.y" +#line 1765 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (3)].real); @@ -4275,7 +4278,7 @@ yyreduce: case 227: /* Line 1455 of yacc.c */ -#line 1772 "program_parse.y" +#line 1773 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (5)].real); @@ -4288,7 +4291,7 @@ yyreduce: case 228: /* Line 1455 of yacc.c */ -#line 1781 "program_parse.y" +#line 1782 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (7)].real); @@ -4301,7 +4304,7 @@ yyreduce: case 229: /* Line 1455 of yacc.c */ -#line 1790 "program_parse.y" +#line 1791 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (9)].real); @@ -4314,7 +4317,7 @@ yyreduce: case 230: /* Line 1455 of yacc.c */ -#line 1800 "program_parse.y" +#line 1801 "program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); ;} @@ -4323,7 +4326,7 @@ yyreduce: case 231: /* Line 1455 of yacc.c */ -#line 1804 "program_parse.y" +#line 1805 "program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); ;} @@ -4332,35 +4335,35 @@ yyreduce: case 232: /* Line 1455 of yacc.c */ -#line 1809 "program_parse.y" +#line 1810 "program_parse.y" { (yyval.negate) = FALSE; ;} break; case 233: /* Line 1455 of yacc.c */ -#line 1810 "program_parse.y" +#line 1811 "program_parse.y" { (yyval.negate) = TRUE; ;} break; case 234: /* Line 1455 of yacc.c */ -#line 1811 "program_parse.y" +#line 1812 "program_parse.y" { (yyval.negate) = FALSE; ;} break; case 235: /* Line 1455 of yacc.c */ -#line 1814 "program_parse.y" +#line 1815 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 237: /* Line 1455 of yacc.c */ -#line 1818 "program_parse.y" +#line 1819 "program_parse.y" { /* NV_fragment_program_option defines the size qualifiers in a * fairly broken way. "SHORT" or "LONG" can optionally be used @@ -4399,7 +4402,7 @@ yyreduce: case 238: /* Line 1455 of yacc.c */ -#line 1852 "program_parse.y" +#line 1853 "program_parse.y" { ;} break; @@ -4407,14 +4410,14 @@ yyreduce: case 239: /* Line 1455 of yacc.c */ -#line 1856 "program_parse.y" +#line 1857 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; case 241: /* Line 1455 of yacc.c */ -#line 1860 "program_parse.y" +#line 1861 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { YYERROR; @@ -4425,7 +4428,7 @@ yyreduce: case 242: /* Line 1455 of yacc.c */ -#line 1866 "program_parse.y" +#line 1867 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { YYERROR; @@ -4436,7 +4439,7 @@ yyreduce: case 243: /* Line 1455 of yacc.c */ -#line 1874 "program_parse.y" +#line 1875 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)])); @@ -4452,7 +4455,7 @@ yyreduce: case 244: /* Line 1455 of yacc.c */ -#line 1887 "program_parse.y" +#line 1888 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4466,7 +4469,7 @@ yyreduce: case 245: /* Line 1455 of yacc.c */ -#line 1896 "program_parse.y" +#line 1897 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4480,7 +4483,7 @@ yyreduce: case 246: /* Line 1455 of yacc.c */ -#line 1905 "program_parse.y" +#line 1906 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} @@ -4489,7 +4492,7 @@ yyreduce: case 247: /* Line 1455 of yacc.c */ -#line 1909 "program_parse.y" +#line 1910 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4503,7 +4506,7 @@ yyreduce: case 248: /* Line 1455 of yacc.c */ -#line 1918 "program_parse.y" +#line 1919 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4517,7 +4520,7 @@ yyreduce: case 249: /* Line 1455 of yacc.c */ -#line 1927 "program_parse.y" +#line 1928 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4531,7 +4534,7 @@ yyreduce: case 250: /* Line 1455 of yacc.c */ -#line 1938 "program_parse.y" +#line 1939 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} @@ -4540,7 +4543,7 @@ yyreduce: case 251: /* Line 1455 of yacc.c */ -#line 1944 "program_parse.y" +#line 1945 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4551,7 +4554,7 @@ yyreduce: case 252: /* Line 1455 of yacc.c */ -#line 1950 "program_parse.y" +#line 1951 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4565,7 +4568,7 @@ yyreduce: case 253: /* Line 1455 of yacc.c */ -#line 1959 "program_parse.y" +#line 1960 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4579,7 +4582,7 @@ yyreduce: case 254: /* Line 1455 of yacc.c */ -#line 1970 "program_parse.y" +#line 1971 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4588,7 +4591,7 @@ yyreduce: case 255: /* Line 1455 of yacc.c */ -#line 1974 "program_parse.y" +#line 1975 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4602,7 +4605,7 @@ yyreduce: case 256: /* Line 1455 of yacc.c */ -#line 1983 "program_parse.y" +#line 1984 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4616,91 +4619,91 @@ yyreduce: case 257: /* Line 1455 of yacc.c */ -#line 1993 "program_parse.y" +#line 1994 "program_parse.y" { (yyval.integer) = 0; ;} break; case 258: /* Line 1455 of yacc.c */ -#line 1994 "program_parse.y" +#line 1995 "program_parse.y" { (yyval.integer) = 0; ;} break; case 259: /* Line 1455 of yacc.c */ -#line 1995 "program_parse.y" +#line 1996 "program_parse.y" { (yyval.integer) = 1; ;} break; case 260: /* Line 1455 of yacc.c */ -#line 1998 "program_parse.y" +#line 1999 "program_parse.y" { (yyval.integer) = 0; ;} break; case 261: /* Line 1455 of yacc.c */ -#line 1999 "program_parse.y" +#line 2000 "program_parse.y" { (yyval.integer) = 0; ;} break; case 262: /* Line 1455 of yacc.c */ -#line 2000 "program_parse.y" +#line 2001 "program_parse.y" { (yyval.integer) = 1; ;} break; case 263: /* Line 1455 of yacc.c */ -#line 2003 "program_parse.y" +#line 2004 "program_parse.y" { (yyval.integer) = 0; ;} break; case 264: /* Line 1455 of yacc.c */ -#line 2004 "program_parse.y" +#line 2005 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 265: /* Line 1455 of yacc.c */ -#line 2007 "program_parse.y" +#line 2008 "program_parse.y" { (yyval.integer) = 0; ;} break; case 266: /* Line 1455 of yacc.c */ -#line 2008 "program_parse.y" +#line 2009 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 267: /* Line 1455 of yacc.c */ -#line 2011 "program_parse.y" +#line 2012 "program_parse.y" { (yyval.integer) = 0; ;} break; case 268: /* Line 1455 of yacc.c */ -#line 2012 "program_parse.y" +#line 2013 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 269: /* Line 1455 of yacc.c */ -#line 2016 "program_parse.y" +#line 2017 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4714,7 +4717,7 @@ yyreduce: case 270: /* Line 1455 of yacc.c */ -#line 2027 "program_parse.y" +#line 2028 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4728,7 +4731,7 @@ yyreduce: case 271: /* Line 1455 of yacc.c */ -#line 2038 "program_parse.y" +#line 2039 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4742,7 +4745,7 @@ yyreduce: case 272: /* Line 1455 of yacc.c */ -#line 2049 "program_parse.y" +#line 2050 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4766,7 +4769,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4770 "program_parse.tab.c" +#line 4773 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4985,7 +4988,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 2069 "program_parse.y" +#line 2074 "program_parse.y" void diff --git a/src/mesa/shader/program_parse.tab.h b/src/mesa/shader/program_parse.tab.h index 5f89532d654..c6ed6c777ea 100644 --- a/src/mesa/shader/program_parse.tab.h +++ b/src/mesa/shader/program_parse.tab.h @@ -136,13 +136,14 @@ VTXATTRIB = 352, WEIGHT = 353, IDENTIFIER = 354, - MASK4 = 355, - MASK3 = 356, - MASK2 = 357, - MASK1 = 358, - SWIZZLE = 359, - DOT_DOT = 360, - DOT = 361 + USED_IDENTIFIER = 355, + MASK4 = 356, + MASK3 = 357, + MASK2 = 358, + MASK1 = 359, + SWIZZLE = 360, + DOT_DOT = 361, + DOT = 362 }; #endif @@ -182,7 +183,7 @@ typedef union YYSTYPE /* Line 1676 of yacc.c */ -#line 186 "program_parse.tab.h" +#line 187 "program_parse.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 51cc9f7f119..d6bac07081c 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -178,7 +178,8 @@ static struct asm_instruction *asm_instruction_copy_ctor( %token VERTEX VTXATTRIB %token WEIGHT -%token IDENTIFIER +%token IDENTIFIER USED_IDENTIFIER +%type string %token MASK4 MASK3 MASK2 MASK1 SWIZZLE %token DOT_DOT %token DOT @@ -289,7 +290,7 @@ optionSequence: optionSequence option | ; -option: OPTION IDENTIFIER ';' +option: OPTION string ';' { int valid = 0; @@ -692,7 +693,7 @@ extSwizSel: INTEGER $$.xyzw_valid = 1; $$.rgba_valid = 1; } - | IDENTIFIER + | string { if (strlen($1) > 1) { yyerror(& @1, state, "invalid extended swizzle selector"); @@ -742,7 +743,7 @@ extSwizSel: INTEGER } ; -srcReg: IDENTIFIER /* temporaryReg | progParamSingle */ +srcReg: USED_IDENTIFIER /* temporaryReg | progParamSingle */ { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, $1); @@ -832,7 +833,7 @@ dstReg: resultBinding $$.File = PROGRAM_OUTPUT; $$.Index = $1; } - | IDENTIFIER /* temporaryReg | vertexResultReg */ + | USED_IDENTIFIER /* temporaryReg | vertexResultReg */ { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, $1); @@ -863,7 +864,7 @@ dstReg: resultBinding } ; -progParamArray: IDENTIFIER +progParamArray: USED_IDENTIFIER { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, $1); @@ -930,7 +931,7 @@ addrRegNegOffset: INTEGER } ; -addrReg: IDENTIFIER +addrReg: USED_IDENTIFIER { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, $1); @@ -1814,7 +1815,7 @@ optionalSign: '+' { $$ = FALSE; } TEMP_statement: optVarSize TEMP { $$ = $2; } varNameList ; -optVarSize: IDENTIFIER +optVarSize: string { /* NV_fragment_program_option defines the size qualifiers in a * fairly broken way. "SHORT" or "LONG" can optionally be used @@ -2045,7 +2046,7 @@ legacyTexUnitNum: INTEGER } ; -ALIAS_statement: ALIAS IDENTIFIER '=' IDENTIFIER +ALIAS_statement: ALIAS IDENTIFIER '=' USED_IDENTIFIER { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, $2); @@ -2066,6 +2067,10 @@ ALIAS_statement: ALIAS IDENTIFIER '=' IDENTIFIER } ; +string: IDENTIFIER + | USED_IDENTIFIER + ; + %% void -- cgit v1.2.3 From cdb719399438194c5e9d5bc1bae3458398fe4e54 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 10 Sep 2009 14:55:36 -0700 Subject: ARB prog lexer: Add missing #include to silence compile warning --- src/mesa/shader/lex.yy.c | 347 ++++++++++++++++++++-------------------- src/mesa/shader/program_lexer.l | 1 + 2 files changed, 175 insertions(+), 173 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c index 959eb854d62..ba3512365e7 100644 --- a/src/mesa/shader/lex.yy.c +++ b/src/mesa/shader/lex.yy.c @@ -1037,6 +1037,7 @@ static yyconst flex_int16_t yy_chk[1352] = #include "main/glheader.h" #include "prog_instruction.h" +#include "symbol_table.h" #include "program_parser.h" #include "program_parse.tab.h" @@ -1147,7 +1148,7 @@ handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval) } while(0); #define YY_EXTRA_TYPE struct asm_parser_state * -#line 1151 "lex.yy.c" +#line 1152 "lex.yy.c" #define INITIAL 0 @@ -1393,10 +1394,10 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 150 "program_lexer.l" +#line 151 "program_lexer.l" -#line 1400 "lex.yy.c" +#line 1401 "lex.yy.c" yylval = yylval_param; @@ -1485,17 +1486,17 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 152 "program_lexer.l" +#line 153 "program_lexer.l" { return ARBvp_10; } YY_BREAK case 2: YY_RULE_SETUP -#line 153 "program_lexer.l" +#line 154 "program_lexer.l" { return ARBfp_10; } YY_BREAK case 3: YY_RULE_SETUP -#line 154 "program_lexer.l" +#line 155 "program_lexer.l" { yylval->integer = at_address; return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS); @@ -1503,682 +1504,682 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 158 "program_lexer.l" +#line 159 "program_lexer.l" { return ALIAS; } YY_BREAK case 5: YY_RULE_SETUP -#line 159 "program_lexer.l" +#line 160 "program_lexer.l" { return ATTRIB; } YY_BREAK case 6: YY_RULE_SETUP -#line 160 "program_lexer.l" +#line 161 "program_lexer.l" { return END; } YY_BREAK case 7: YY_RULE_SETUP -#line 161 "program_lexer.l" +#line 162 "program_lexer.l" { return OPTION; } YY_BREAK case 8: YY_RULE_SETUP -#line 162 "program_lexer.l" +#line 163 "program_lexer.l" { return OUTPUT; } YY_BREAK case 9: YY_RULE_SETUP -#line 163 "program_lexer.l" +#line 164 "program_lexer.l" { return PARAM; } YY_BREAK case 10: YY_RULE_SETUP -#line 164 "program_lexer.l" +#line 165 "program_lexer.l" { yylval->integer = at_temp; return TEMP; } YY_BREAK case 11: YY_RULE_SETUP -#line 166 "program_lexer.l" +#line 167 "program_lexer.l" { return_opcode( 1, VECTOR_OP, ABS, 3); } YY_BREAK case 12: YY_RULE_SETUP -#line 167 "program_lexer.l" +#line 168 "program_lexer.l" { return_opcode( 1, BIN_OP, ADD, 3); } YY_BREAK case 13: YY_RULE_SETUP -#line 168 "program_lexer.l" +#line 169 "program_lexer.l" { return_opcode(require_ARB_vp, ARL, ARL, 3); } YY_BREAK case 14: YY_RULE_SETUP -#line 170 "program_lexer.l" +#line 171 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, CMP, 3); } YY_BREAK case 15: YY_RULE_SETUP -#line 171 "program_lexer.l" +#line 172 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); } YY_BREAK case 16: YY_RULE_SETUP -#line 173 "program_lexer.l" +#line 174 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); } YY_BREAK case 17: YY_RULE_SETUP -#line 174 "program_lexer.l" +#line 175 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); } YY_BREAK case 18: YY_RULE_SETUP -#line 175 "program_lexer.l" +#line 176 "program_lexer.l" { return_opcode( 1, BIN_OP, DP3, 3); } YY_BREAK case 19: YY_RULE_SETUP -#line 176 "program_lexer.l" +#line 177 "program_lexer.l" { return_opcode( 1, BIN_OP, DP4, 3); } YY_BREAK case 20: YY_RULE_SETUP -#line 177 "program_lexer.l" +#line 178 "program_lexer.l" { return_opcode( 1, BIN_OP, DPH, 3); } YY_BREAK case 21: YY_RULE_SETUP -#line 178 "program_lexer.l" +#line 179 "program_lexer.l" { return_opcode( 1, BIN_OP, DST, 3); } YY_BREAK case 22: YY_RULE_SETUP -#line 180 "program_lexer.l" +#line 181 "program_lexer.l" { return_opcode( 1, SCALAR_OP, EX2, 3); } YY_BREAK case 23: YY_RULE_SETUP -#line 181 "program_lexer.l" +#line 182 "program_lexer.l" { return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); } YY_BREAK case 24: YY_RULE_SETUP -#line 183 "program_lexer.l" +#line 184 "program_lexer.l" { return_opcode( 1, VECTOR_OP, FLR, 3); } YY_BREAK case 25: YY_RULE_SETUP -#line 184 "program_lexer.l" +#line 185 "program_lexer.l" { return_opcode( 1, VECTOR_OP, FRC, 3); } YY_BREAK case 26: YY_RULE_SETUP -#line 186 "program_lexer.l" +#line 187 "program_lexer.l" { return_opcode(require_ARB_fp, KIL, KIL, 3); } YY_BREAK case 27: YY_RULE_SETUP -#line 188 "program_lexer.l" +#line 189 "program_lexer.l" { return_opcode( 1, VECTOR_OP, LIT, 3); } YY_BREAK case 28: YY_RULE_SETUP -#line 189 "program_lexer.l" +#line 190 "program_lexer.l" { return_opcode( 1, SCALAR_OP, LG2, 3); } YY_BREAK case 29: YY_RULE_SETUP -#line 190 "program_lexer.l" +#line 191 "program_lexer.l" { return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); } YY_BREAK case 30: YY_RULE_SETUP -#line 191 "program_lexer.l" +#line 192 "program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, LRP, 3); } YY_BREAK case 31: YY_RULE_SETUP -#line 193 "program_lexer.l" +#line 194 "program_lexer.l" { return_opcode( 1, TRI_OP, MAD, 3); } YY_BREAK case 32: YY_RULE_SETUP -#line 194 "program_lexer.l" +#line 195 "program_lexer.l" { return_opcode( 1, BIN_OP, MAX, 3); } YY_BREAK case 33: YY_RULE_SETUP -#line 195 "program_lexer.l" +#line 196 "program_lexer.l" { return_opcode( 1, BIN_OP, MIN, 3); } YY_BREAK case 34: YY_RULE_SETUP -#line 196 "program_lexer.l" +#line 197 "program_lexer.l" { return_opcode( 1, VECTOR_OP, MOV, 3); } YY_BREAK case 35: YY_RULE_SETUP -#line 197 "program_lexer.l" +#line 198 "program_lexer.l" { return_opcode( 1, BIN_OP, MUL, 3); } YY_BREAK case 36: YY_RULE_SETUP -#line 199 "program_lexer.l" +#line 200 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); } YY_BREAK case 37: YY_RULE_SETUP -#line 200 "program_lexer.l" +#line 201 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); } YY_BREAK case 38: YY_RULE_SETUP -#line 201 "program_lexer.l" +#line 202 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); } YY_BREAK case 39: YY_RULE_SETUP -#line 202 "program_lexer.l" +#line 203 "program_lexer.l" { return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); } YY_BREAK case 40: YY_RULE_SETUP -#line 203 "program_lexer.l" +#line 204 "program_lexer.l" { return_opcode( 1, BINSC_OP, POW, 3); } YY_BREAK case 41: YY_RULE_SETUP -#line 205 "program_lexer.l" +#line 206 "program_lexer.l" { return_opcode( 1, SCALAR_OP, RCP, 3); } YY_BREAK case 42: YY_RULE_SETUP -#line 206 "program_lexer.l" +#line 207 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, RFL, 3); } YY_BREAK case 43: YY_RULE_SETUP -#line 207 "program_lexer.l" +#line 208 "program_lexer.l" { return_opcode( 1, SCALAR_OP, RSQ, 3); } YY_BREAK case 44: YY_RULE_SETUP -#line 209 "program_lexer.l" +#line 210 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); } YY_BREAK case 45: YY_RULE_SETUP -#line 210 "program_lexer.l" +#line 211 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SEQ, 3); } YY_BREAK case 46: YY_RULE_SETUP -#line 211 "program_lexer.l" +#line 212 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SFL, 3); } YY_BREAK case 47: YY_RULE_SETUP -#line 212 "program_lexer.l" +#line 213 "program_lexer.l" { return_opcode( 1, BIN_OP, SGE, 3); } YY_BREAK case 48: YY_RULE_SETUP -#line 213 "program_lexer.l" +#line 214 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SGT, 3); } YY_BREAK case 49: YY_RULE_SETUP -#line 214 "program_lexer.l" +#line 215 "program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); } YY_BREAK case 50: YY_RULE_SETUP -#line 215 "program_lexer.l" +#line 216 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SLE, 3); } YY_BREAK case 51: YY_RULE_SETUP -#line 216 "program_lexer.l" +#line 217 "program_lexer.l" { return_opcode( 1, BIN_OP, SLT, 3); } YY_BREAK case 52: YY_RULE_SETUP -#line 217 "program_lexer.l" +#line 218 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, SNE, 3); } YY_BREAK case 53: YY_RULE_SETUP -#line 218 "program_lexer.l" +#line 219 "program_lexer.l" { return_opcode(require_NV_fp, BIN_OP, STR, 3); } YY_BREAK case 54: YY_RULE_SETUP -#line 219 "program_lexer.l" +#line 220 "program_lexer.l" { return_opcode( 1, BIN_OP, SUB, 3); } YY_BREAK case 55: YY_RULE_SETUP -#line 220 "program_lexer.l" +#line 221 "program_lexer.l" { return_opcode( 1, SWZ, SWZ, 3); } YY_BREAK case 56: YY_RULE_SETUP -#line 222 "program_lexer.l" +#line 223 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); } YY_BREAK case 57: YY_RULE_SETUP -#line 223 "program_lexer.l" +#line 224 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); } YY_BREAK case 58: YY_RULE_SETUP -#line 224 "program_lexer.l" +#line 225 "program_lexer.l" { return_opcode(require_NV_fp, TXD_OP, TXD, 3); } YY_BREAK case 59: YY_RULE_SETUP -#line 225 "program_lexer.l" +#line 226 "program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); } YY_BREAK case 60: YY_RULE_SETUP -#line 227 "program_lexer.l" +#line 228 "program_lexer.l" { return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); } YY_BREAK case 61: YY_RULE_SETUP -#line 228 "program_lexer.l" +#line 229 "program_lexer.l" { return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); } YY_BREAK case 62: YY_RULE_SETUP -#line 230 "program_lexer.l" +#line 231 "program_lexer.l" { return_opcode(require_NV_fp, TRI_OP, X2D, 3); } YY_BREAK case 63: YY_RULE_SETUP -#line 231 "program_lexer.l" +#line 232 "program_lexer.l" { return_opcode( 1, BIN_OP, XPD, 3); } YY_BREAK case 64: YY_RULE_SETUP -#line 233 "program_lexer.l" +#line 234 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } YY_BREAK case 65: YY_RULE_SETUP -#line 234 "program_lexer.l" +#line 235 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } YY_BREAK case 66: YY_RULE_SETUP -#line 235 "program_lexer.l" +#line 236 "program_lexer.l" { return PROGRAM; } YY_BREAK case 67: YY_RULE_SETUP -#line 236 "program_lexer.l" +#line 237 "program_lexer.l" { return STATE; } YY_BREAK case 68: YY_RULE_SETUP -#line 237 "program_lexer.l" +#line 238 "program_lexer.l" { return RESULT; } YY_BREAK case 69: YY_RULE_SETUP -#line 239 "program_lexer.l" +#line 240 "program_lexer.l" { return AMBIENT; } YY_BREAK case 70: YY_RULE_SETUP -#line 240 "program_lexer.l" +#line 241 "program_lexer.l" { return ATTENUATION; } YY_BREAK case 71: YY_RULE_SETUP -#line 241 "program_lexer.l" +#line 242 "program_lexer.l" { return BACK; } YY_BREAK case 72: YY_RULE_SETUP -#line 242 "program_lexer.l" +#line 243 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, CLIP); } YY_BREAK case 73: YY_RULE_SETUP -#line 243 "program_lexer.l" +#line 244 "program_lexer.l" { return COLOR; } YY_BREAK case 74: YY_RULE_SETUP -#line 244 "program_lexer.l" +#line 245 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, DEPTH); } YY_BREAK case 75: YY_RULE_SETUP -#line 245 "program_lexer.l" +#line 246 "program_lexer.l" { return DIFFUSE; } YY_BREAK case 76: YY_RULE_SETUP -#line 246 "program_lexer.l" +#line 247 "program_lexer.l" { return DIRECTION; } YY_BREAK case 77: YY_RULE_SETUP -#line 247 "program_lexer.l" +#line 248 "program_lexer.l" { return EMISSION; } YY_BREAK case 78: YY_RULE_SETUP -#line 248 "program_lexer.l" +#line 249 "program_lexer.l" { return ENV; } YY_BREAK case 79: YY_RULE_SETUP -#line 249 "program_lexer.l" +#line 250 "program_lexer.l" { return EYE; } YY_BREAK case 80: YY_RULE_SETUP -#line 250 "program_lexer.l" +#line 251 "program_lexer.l" { return FOGCOORD; } YY_BREAK case 81: YY_RULE_SETUP -#line 251 "program_lexer.l" +#line 252 "program_lexer.l" { return FOG; } YY_BREAK case 82: YY_RULE_SETUP -#line 252 "program_lexer.l" +#line 253 "program_lexer.l" { return FRONT; } YY_BREAK case 83: YY_RULE_SETUP -#line 253 "program_lexer.l" +#line 254 "program_lexer.l" { return HALF; } YY_BREAK case 84: YY_RULE_SETUP -#line 254 "program_lexer.l" +#line 255 "program_lexer.l" { return INVERSE; } YY_BREAK case 85: YY_RULE_SETUP -#line 255 "program_lexer.l" +#line 256 "program_lexer.l" { return INVTRANS; } YY_BREAK case 86: YY_RULE_SETUP -#line 256 "program_lexer.l" +#line 257 "program_lexer.l" { return LIGHT; } YY_BREAK case 87: YY_RULE_SETUP -#line 257 "program_lexer.l" +#line 258 "program_lexer.l" { return LIGHTMODEL; } YY_BREAK case 88: YY_RULE_SETUP -#line 258 "program_lexer.l" +#line 259 "program_lexer.l" { return LIGHTPROD; } YY_BREAK case 89: YY_RULE_SETUP -#line 259 "program_lexer.l" +#line 260 "program_lexer.l" { return LOCAL; } YY_BREAK case 90: YY_RULE_SETUP -#line 260 "program_lexer.l" +#line 261 "program_lexer.l" { return MATERIAL; } YY_BREAK case 91: YY_RULE_SETUP -#line 261 "program_lexer.l" +#line 262 "program_lexer.l" { return MAT_PROGRAM; } YY_BREAK case 92: YY_RULE_SETUP -#line 262 "program_lexer.l" +#line 263 "program_lexer.l" { return MATRIX; } YY_BREAK case 93: YY_RULE_SETUP -#line 263 "program_lexer.l" +#line 264 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } YY_BREAK case 94: YY_RULE_SETUP -#line 264 "program_lexer.l" +#line 265 "program_lexer.l" { return MODELVIEW; } YY_BREAK case 95: YY_RULE_SETUP -#line 265 "program_lexer.l" +#line 266 "program_lexer.l" { return MVP; } YY_BREAK case 96: YY_RULE_SETUP -#line 266 "program_lexer.l" +#line 267 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, NORMAL); } YY_BREAK case 97: YY_RULE_SETUP -#line 267 "program_lexer.l" +#line 268 "program_lexer.l" { return OBJECT; } YY_BREAK case 98: YY_RULE_SETUP -#line 268 "program_lexer.l" +#line 269 "program_lexer.l" { return PALETTE; } YY_BREAK case 99: YY_RULE_SETUP -#line 269 "program_lexer.l" +#line 270 "program_lexer.l" { return PARAMS; } YY_BREAK case 100: YY_RULE_SETUP -#line 270 "program_lexer.l" +#line 271 "program_lexer.l" { return PLANE; } YY_BREAK case 101: YY_RULE_SETUP -#line 271 "program_lexer.l" +#line 272 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, POINT); } YY_BREAK case 102: YY_RULE_SETUP -#line 272 "program_lexer.l" +#line 273 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, POINTSIZE); } YY_BREAK case 103: YY_RULE_SETUP -#line 273 "program_lexer.l" +#line 274 "program_lexer.l" { return POSITION; } YY_BREAK case 104: YY_RULE_SETUP -#line 274 "program_lexer.l" +#line 275 "program_lexer.l" { return PRIMARY; } YY_BREAK case 105: YY_RULE_SETUP -#line 275 "program_lexer.l" +#line 276 "program_lexer.l" { return PROJECTION; } YY_BREAK case 106: YY_RULE_SETUP -#line 276 "program_lexer.l" +#line 277 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, RANGE); } YY_BREAK case 107: YY_RULE_SETUP -#line 277 "program_lexer.l" +#line 278 "program_lexer.l" { return ROW; } YY_BREAK case 108: YY_RULE_SETUP -#line 278 "program_lexer.l" +#line 279 "program_lexer.l" { return SCENECOLOR; } YY_BREAK case 109: YY_RULE_SETUP -#line 279 "program_lexer.l" +#line 280 "program_lexer.l" { return SECONDARY; } YY_BREAK case 110: YY_RULE_SETUP -#line 280 "program_lexer.l" +#line 281 "program_lexer.l" { return SHININESS; } YY_BREAK case 111: YY_RULE_SETUP -#line 281 "program_lexer.l" +#line 282 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, SIZE); } YY_BREAK case 112: YY_RULE_SETUP -#line 282 "program_lexer.l" +#line 283 "program_lexer.l" { return SPECULAR; } YY_BREAK case 113: YY_RULE_SETUP -#line 283 "program_lexer.l" +#line 284 "program_lexer.l" { return SPOT; } YY_BREAK case 114: YY_RULE_SETUP -#line 284 "program_lexer.l" +#line 285 "program_lexer.l" { return TEXCOORD; } YY_BREAK case 115: YY_RULE_SETUP -#line 285 "program_lexer.l" +#line 286 "program_lexer.l" { return_token_or_DOT(require_ARB_fp, TEXENV); } YY_BREAK case 116: YY_RULE_SETUP -#line 286 "program_lexer.l" +#line 287 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN); } YY_BREAK case 117: YY_RULE_SETUP -#line 287 "program_lexer.l" +#line 288 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } YY_BREAK case 118: YY_RULE_SETUP -#line 288 "program_lexer.l" +#line 289 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_S); } YY_BREAK case 119: YY_RULE_SETUP -#line 289 "program_lexer.l" +#line 290 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_T); } YY_BREAK case 120: YY_RULE_SETUP -#line 290 "program_lexer.l" +#line 291 "program_lexer.l" { return TEXTURE; } YY_BREAK case 121: YY_RULE_SETUP -#line 291 "program_lexer.l" +#line 292 "program_lexer.l" { return TRANSPOSE; } YY_BREAK case 122: YY_RULE_SETUP -#line 292 "program_lexer.l" +#line 293 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, VTXATTRIB); } YY_BREAK case 123: YY_RULE_SETUP -#line 293 "program_lexer.l" +#line 294 "program_lexer.l" { return_token_or_DOT(require_ARB_vp, WEIGHT); } YY_BREAK case 124: YY_RULE_SETUP -#line 295 "program_lexer.l" +#line 296 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } YY_BREAK case 125: YY_RULE_SETUP -#line 296 "program_lexer.l" +#line 297 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } YY_BREAK case 126: YY_RULE_SETUP -#line 297 "program_lexer.l" +#line 298 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } YY_BREAK case 127: YY_RULE_SETUP -#line 298 "program_lexer.l" +#line 299 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } YY_BREAK case 128: YY_RULE_SETUP -#line 299 "program_lexer.l" +#line 300 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } YY_BREAK case 129: YY_RULE_SETUP -#line 300 "program_lexer.l" +#line 301 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } YY_BREAK case 130: YY_RULE_SETUP -#line 301 "program_lexer.l" +#line 302 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } YY_BREAK case 131: YY_RULE_SETUP -#line 302 "program_lexer.l" +#line 303 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } YY_BREAK case 132: YY_RULE_SETUP -#line 303 "program_lexer.l" +#line 304 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } YY_BREAK case 133: YY_RULE_SETUP -#line 304 "program_lexer.l" +#line 305 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } YY_BREAK case 134: YY_RULE_SETUP -#line 305 "program_lexer.l" +#line 306 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } YY_BREAK case 135: YY_RULE_SETUP -#line 306 "program_lexer.l" +#line 307 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } YY_BREAK case 136: YY_RULE_SETUP -#line 307 "program_lexer.l" +#line 308 "program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } YY_BREAK case 137: YY_RULE_SETUP -#line 309 "program_lexer.l" +#line 310 "program_lexer.l" { return handle_ident(yyextra, yytext, yylval); } YY_BREAK case 138: YY_RULE_SETUP -#line 311 "program_lexer.l" +#line 312 "program_lexer.l" { return DOT_DOT; } YY_BREAK case 139: YY_RULE_SETUP -#line 313 "program_lexer.l" +#line 314 "program_lexer.l" { yylval->integer = strtol(yytext, NULL, 10); return INTEGER; @@ -2186,7 +2187,7 @@ YY_RULE_SETUP YY_BREAK case 140: YY_RULE_SETUP -#line 317 "program_lexer.l" +#line 318 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2198,7 +2199,7 @@ case 141: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 321 "program_lexer.l" +#line 322 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2206,7 +2207,7 @@ YY_RULE_SETUP YY_BREAK case 142: YY_RULE_SETUP -#line 325 "program_lexer.l" +#line 326 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2214,7 +2215,7 @@ YY_RULE_SETUP YY_BREAK case 143: YY_RULE_SETUP -#line 329 "program_lexer.l" +#line 330 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; @@ -2222,7 +2223,7 @@ YY_RULE_SETUP YY_BREAK case 144: YY_RULE_SETUP -#line 334 "program_lexer.l" +#line 335 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; @@ -2231,7 +2232,7 @@ YY_RULE_SETUP YY_BREAK case 145: YY_RULE_SETUP -#line 340 "program_lexer.l" +#line 341 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2241,7 +2242,7 @@ YY_RULE_SETUP YY_BREAK case 146: YY_RULE_SETUP -#line 346 "program_lexer.l" +#line 347 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; @@ -2250,7 +2251,7 @@ YY_RULE_SETUP YY_BREAK case 147: YY_RULE_SETUP -#line 351 "program_lexer.l" +#line 352 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; @@ -2259,7 +2260,7 @@ YY_RULE_SETUP YY_BREAK case 148: YY_RULE_SETUP -#line 357 "program_lexer.l" +#line 358 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2269,7 +2270,7 @@ YY_RULE_SETUP YY_BREAK case 149: YY_RULE_SETUP -#line 363 "program_lexer.l" +#line 364 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2279,7 +2280,7 @@ YY_RULE_SETUP YY_BREAK case 150: YY_RULE_SETUP -#line 369 "program_lexer.l" +#line 370 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; @@ -2288,7 +2289,7 @@ YY_RULE_SETUP YY_BREAK case 151: YY_RULE_SETUP -#line 375 "program_lexer.l" +#line 376 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2298,7 +2299,7 @@ YY_RULE_SETUP YY_BREAK case 152: YY_RULE_SETUP -#line 382 "program_lexer.l" +#line 383 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2310,7 +2311,7 @@ YY_RULE_SETUP YY_BREAK case 153: YY_RULE_SETUP -#line 391 "program_lexer.l" +#line 392 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; @@ -2319,7 +2320,7 @@ YY_RULE_SETUP YY_BREAK case 154: YY_RULE_SETUP -#line 397 "program_lexer.l" +#line 398 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2329,7 +2330,7 @@ YY_RULE_SETUP YY_BREAK case 155: YY_RULE_SETUP -#line 403 "program_lexer.l" +#line 404 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; @@ -2338,7 +2339,7 @@ YY_RULE_SETUP YY_BREAK case 156: YY_RULE_SETUP -#line 408 "program_lexer.l" +#line 409 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; @@ -2347,7 +2348,7 @@ YY_RULE_SETUP YY_BREAK case 157: YY_RULE_SETUP -#line 414 "program_lexer.l" +#line 415 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2357,7 +2358,7 @@ YY_RULE_SETUP YY_BREAK case 158: YY_RULE_SETUP -#line 420 "program_lexer.l" +#line 421 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2367,7 +2368,7 @@ YY_RULE_SETUP YY_BREAK case 159: YY_RULE_SETUP -#line 426 "program_lexer.l" +#line 427 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; @@ -2376,7 +2377,7 @@ YY_RULE_SETUP YY_BREAK case 160: YY_RULE_SETUP -#line 432 "program_lexer.l" +#line 433 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2386,7 +2387,7 @@ YY_RULE_SETUP YY_BREAK case 161: YY_RULE_SETUP -#line 440 "program_lexer.l" +#line 441 "program_lexer.l" { if (require_ARB_vp) { return TEXGEN_R; @@ -2400,7 +2401,7 @@ YY_RULE_SETUP YY_BREAK case 162: YY_RULE_SETUP -#line 451 "program_lexer.l" +#line 452 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2412,13 +2413,13 @@ YY_RULE_SETUP YY_BREAK case 163: YY_RULE_SETUP -#line 460 "program_lexer.l" +#line 461 "program_lexer.l" { return DOT; } YY_BREAK case 164: /* rule 164 can match eol */ YY_RULE_SETUP -#line 462 "program_lexer.l" +#line 463 "program_lexer.l" { yylloc->first_line++; yylloc->first_column = 1; @@ -2429,7 +2430,7 @@ YY_RULE_SETUP YY_BREAK case 165: YY_RULE_SETUP -#line 469 "program_lexer.l" +#line 470 "program_lexer.l" /* eat whitespace */ ; YY_BREAK case 166: @@ -2437,20 +2438,20 @@ case 166: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 470 "program_lexer.l" +#line 471 "program_lexer.l" /* eat comments */ ; YY_BREAK case 167: YY_RULE_SETUP -#line 471 "program_lexer.l" +#line 472 "program_lexer.l" { return yytext[0]; } YY_BREAK case 168: YY_RULE_SETUP -#line 472 "program_lexer.l" +#line 473 "program_lexer.l" ECHO; YY_BREAK -#line 2454 "lex.yy.c" +#line 2455 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3625,7 +3626,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 472 "program_lexer.l" +#line 473 "program_lexer.l" diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l index 9e68c34ac0a..a0d1af1e07a 100644 --- a/src/mesa/shader/program_lexer.l +++ b/src/mesa/shader/program_lexer.l @@ -24,6 +24,7 @@ #include "main/glheader.h" #include "prog_instruction.h" +#include "symbol_table.h" #include "program_parser.h" #include "program_parse.tab.h" -- cgit v1.2.3 From 81722c5d7e8e93d837510b9e6e5d014ec64cf4b3 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 10 Sep 2009 15:04:24 -0700 Subject: NV fp parser: Add support for condition codes Conditional write masks and the condition-code based KIL instruction are all supported. The specific behavior of KIL in the following shader may or may not match the behavior of other implementations: !!ARBfp1.0 TEMP GT; MOVC GT, fragment.texcoord[0]; KIL GT.x; END Should be it interpreted as 'KIL srcReg' or as 'KIL ccTest'? The current parser will interpret it as 'KIL srcReg'. --- src/mesa/shader/program_parse.tab.c | 1895 ++++++++++++++++++--------------- src/mesa/shader/program_parse.y | 102 +- src/mesa/shader/program_parse_extra.c | 54 + src/mesa/shader/program_parser.h | 13 + 4 files changed, 1183 insertions(+), 881 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index d37b20ba429..33195c0b165 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -374,7 +374,7 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ -#line 259 "program_parse.y" +#line 261 "program_parse.y" extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, void *yyscanner); @@ -598,16 +598,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 393 +#define YYLAST 396 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 118 +#define YYNTOKENS 120 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 138 +#define YYNNTS 143 /* YYNRULES -- Number of rules. */ -#define YYNRULES 274 +#define YYNRULES 282 /* YYNRULES -- Number of states. */ -#define YYNSTATES 460 +#define YYNSTATES 473 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -623,15 +623,15 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 113, 109, 114, 2, 2, 2, 2, + 115, 116, 2, 113, 109, 114, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 108, - 2, 115, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 117, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 111, 2, 112, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 116, 110, 117, 2, 2, 2, 2, + 2, 2, 2, 118, 110, 119, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -666,147 +666,151 @@ static const yytype_uint16 yyprhs[] = 0, 0, 3, 8, 10, 12, 15, 16, 20, 23, 24, 27, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 59, 64, 69, 76, 83, - 92, 101, 104, 117, 120, 122, 124, 126, 128, 130, - 132, 134, 136, 138, 140, 142, 144, 151, 154, 159, - 162, 164, 168, 174, 177, 180, 188, 191, 193, 195, - 197, 199, 204, 206, 208, 210, 212, 214, 216, 218, - 222, 223, 226, 229, 231, 233, 235, 237, 239, 241, - 243, 245, 247, 248, 250, 252, 254, 256, 257, 259, - 261, 263, 265, 267, 269, 274, 277, 280, 282, 285, - 287, 290, 292, 295, 300, 305, 307, 308, 312, 314, - 316, 319, 321, 324, 326, 328, 332, 339, 340, 342, - 345, 350, 352, 356, 358, 360, 362, 364, 366, 368, - 370, 372, 374, 376, 379, 382, 385, 388, 391, 394, - 397, 400, 403, 406, 409, 412, 416, 418, 420, 422, - 428, 430, 432, 434, 437, 439, 441, 444, 446, 449, - 456, 458, 462, 464, 466, 468, 470, 472, 477, 479, - 481, 483, 485, 487, 489, 492, 494, 496, 502, 504, - 507, 509, 511, 517, 520, 521, 528, 532, 533, 535, - 537, 539, 541, 543, 546, 548, 550, 553, 558, 563, - 564, 566, 568, 570, 572, 575, 577, 579, 581, 583, - 589, 591, 595, 601, 607, 609, 613, 619, 621, 623, - 625, 627, 629, 631, 633, 635, 637, 641, 647, 655, - 665, 668, 671, 673, 675, 676, 677, 682, 684, 685, - 686, 690, 694, 696, 702, 705, 708, 711, 714, 718, - 721, 725, 726, 728, 730, 731, 733, 735, 736, 738, - 740, 741, 743, 745, 746, 750, 751, 755, 756, 760, - 762, 764, 766, 771, 773 + 92, 101, 104, 107, 120, 123, 125, 127, 129, 131, + 133, 135, 137, 139, 141, 143, 145, 147, 154, 157, + 162, 165, 167, 171, 177, 181, 184, 192, 195, 197, + 199, 201, 203, 208, 210, 212, 214, 216, 218, 220, + 222, 226, 227, 230, 233, 235, 237, 239, 241, 243, + 245, 247, 249, 251, 252, 254, 256, 258, 260, 261, + 265, 269, 270, 273, 276, 278, 280, 282, 284, 286, + 288, 290, 292, 297, 300, 303, 305, 308, 310, 313, + 315, 318, 323, 328, 330, 331, 335, 337, 339, 342, + 344, 347, 349, 351, 355, 362, 363, 365, 368, 373, + 375, 379, 381, 383, 385, 387, 389, 391, 393, 395, + 397, 399, 402, 405, 408, 411, 414, 417, 420, 423, + 426, 429, 432, 435, 439, 441, 443, 445, 451, 453, + 455, 457, 460, 462, 464, 467, 469, 472, 479, 481, + 485, 487, 489, 491, 493, 495, 500, 502, 504, 506, + 508, 510, 512, 515, 517, 519, 525, 527, 530, 532, + 534, 540, 543, 544, 551, 555, 556, 558, 560, 562, + 564, 566, 569, 571, 573, 576, 581, 586, 587, 589, + 591, 593, 595, 598, 600, 602, 604, 606, 612, 614, + 618, 624, 630, 632, 636, 642, 644, 646, 648, 650, + 652, 654, 656, 658, 660, 664, 670, 678, 688, 691, + 694, 696, 698, 699, 700, 705, 707, 708, 709, 713, + 717, 719, 725, 728, 731, 734, 737, 741, 744, 748, + 749, 751, 753, 754, 756, 758, 759, 761, 763, 764, + 766, 768, 769, 773, 774, 778, 779, 783, 785, 787, + 789, 794, 796 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 119, 0, -1, 120, 121, 123, 12, -1, 3, -1, - 4, -1, 121, 122, -1, -1, 8, 255, 108, -1, - 123, 124, -1, -1, 125, 108, -1, 163, 108, -1, - 126, -1, 127, -1, 128, -1, 129, -1, 130, -1, - 131, -1, 132, -1, 133, -1, 139, -1, 134, -1, - 135, -1, 136, -1, 19, 144, 109, 140, -1, 18, - 143, 109, 142, -1, 16, 143, 109, 140, -1, 14, - 143, 109, 140, 109, 140, -1, 13, 143, 109, 142, - 109, 142, -1, 17, 143, 109, 142, 109, 142, 109, - 142, -1, 15, 143, 109, 142, 109, 137, 109, 138, - -1, 20, 142, -1, 22, 143, 109, 142, 109, 142, - 109, 142, 109, 137, 109, 138, -1, 83, 249, -1, - 84, -1, 85, -1, 86, -1, 87, -1, 88, -1, - 89, -1, 90, -1, 91, -1, 92, -1, 93, -1, - 94, -1, 95, -1, 21, 143, 109, 148, 109, 145, - -1, 234, 141, -1, 234, 110, 141, 110, -1, 148, - 160, -1, 231, -1, 234, 148, 161, -1, 234, 110, - 148, 161, 110, -1, 149, 162, -1, 157, 159, -1, - 146, 109, 146, 109, 146, 109, 146, -1, 234, 147, - -1, 23, -1, 255, -1, 100, -1, 165, -1, 150, - 111, 151, 112, -1, 179, -1, 242, -1, 100, -1, - 100, -1, 152, -1, 153, -1, 23, -1, 157, 158, - 154, -1, -1, 113, 155, -1, 114, 156, -1, 23, - -1, 23, -1, 100, -1, 104, -1, 104, -1, 104, - -1, 104, -1, 101, -1, 105, -1, -1, 101, -1, - 102, -1, 103, -1, 104, -1, -1, 164, -1, 171, - -1, 235, -1, 238, -1, 241, -1, 254, -1, 7, - 99, 115, 165, -1, 96, 166, -1, 38, 170, -1, - 60, -1, 98, 168, -1, 53, -1, 29, 247, -1, - 37, -1, 74, 248, -1, 50, 111, 169, 112, -1, - 97, 111, 167, 112, -1, 23, -1, -1, 111, 169, - 112, -1, 23, -1, 60, -1, 29, 247, -1, 37, - -1, 74, 248, -1, 172, -1, 173, -1, 10, 99, - 175, -1, 10, 99, 111, 174, 112, 176, -1, -1, - 23, -1, 115, 178, -1, 115, 116, 177, 117, -1, - 180, -1, 177, 109, 180, -1, 182, -1, 218, -1, - 228, -1, 182, -1, 218, -1, 229, -1, 181, -1, - 219, -1, 228, -1, 182, -1, 73, 206, -1, 73, - 183, -1, 73, 185, -1, 73, 188, -1, 73, 190, - -1, 73, 196, -1, 73, 192, -1, 73, 199, -1, - 73, 201, -1, 73, 203, -1, 73, 205, -1, 73, - 217, -1, 47, 246, 184, -1, 194, -1, 33, -1, - 69, -1, 43, 111, 195, 112, 186, -1, 194, -1, - 60, -1, 26, -1, 72, 187, -1, 40, -1, 32, - -1, 44, 189, -1, 25, -1, 246, 67, -1, 45, - 111, 195, 112, 246, 191, -1, 194, -1, 75, 250, - 193, -1, 29, -1, 25, -1, 31, -1, 71, -1, - 23, -1, 76, 248, 197, 198, -1, 35, -1, 54, - -1, 79, -1, 80, -1, 78, -1, 77, -1, 36, - 200, -1, 29, -1, 56, -1, 28, 111, 202, 112, - 57, -1, 23, -1, 58, 204, -1, 70, -1, 26, - -1, 208, 66, 111, 211, 112, -1, 208, 207, -1, - -1, 66, 111, 211, 106, 211, 112, -1, 49, 212, - 209, -1, -1, 210, -1, 41, -1, 82, -1, 42, - -1, 23, -1, 51, 213, -1, 63, -1, 52, -1, - 81, 248, -1, 55, 111, 215, 112, -1, 48, 111, - 216, 112, -1, -1, 214, -1, 23, -1, 23, -1, - 23, -1, 30, 64, -1, 222, -1, 225, -1, 220, - -1, 223, -1, 62, 34, 111, 221, 112, -1, 226, - -1, 226, 106, 226, -1, 62, 34, 111, 226, 112, - -1, 62, 46, 111, 224, 112, -1, 227, -1, 227, - 106, 227, -1, 62, 46, 111, 227, 112, -1, 23, - -1, 23, -1, 230, -1, 232, -1, 231, -1, 232, - -1, 233, -1, 24, -1, 23, -1, 116, 233, 117, - -1, 116, 233, 109, 233, 117, -1, 116, 233, 109, - 233, 109, 233, 117, -1, 116, 233, 109, 233, 109, - 233, 109, 233, 117, -1, 234, 24, -1, 234, 23, - -1, 113, -1, 114, -1, -1, -1, 237, 11, 236, - 240, -1, 255, -1, -1, -1, 5, 239, 240, -1, - 240, 109, 99, -1, 99, -1, 237, 9, 99, 115, - 242, -1, 65, 60, -1, 65, 37, -1, 65, 243, - -1, 65, 59, -1, 65, 74, 248, -1, 65, 30, - -1, 29, 244, 245, -1, -1, 39, -1, 27, -1, - -1, 61, -1, 68, -1, -1, 39, -1, 27, -1, - -1, 61, -1, 68, -1, -1, 111, 251, 112, -1, - -1, 111, 252, 112, -1, -1, 111, 253, 112, -1, - 23, -1, 23, -1, 23, -1, 6, 99, 115, 100, - -1, 99, -1, 100, -1 + 121, 0, -1, 122, 123, 125, 12, -1, 3, -1, + 4, -1, 123, 124, -1, -1, 8, 262, 108, -1, + 125, 126, -1, -1, 127, 108, -1, 170, 108, -1, + 128, -1, 129, -1, 130, -1, 131, -1, 132, -1, + 133, -1, 134, -1, 135, -1, 141, -1, 136, -1, + 137, -1, 138, -1, 19, 146, 109, 142, -1, 18, + 145, 109, 144, -1, 16, 145, 109, 142, -1, 14, + 145, 109, 142, 109, 142, -1, 13, 145, 109, 144, + 109, 144, -1, 17, 145, 109, 144, 109, 144, 109, + 144, -1, 15, 145, 109, 144, 109, 139, 109, 140, + -1, 20, 144, -1, 20, 166, -1, 22, 145, 109, + 144, 109, 144, 109, 144, 109, 139, 109, 140, -1, + 83, 256, -1, 84, -1, 85, -1, 86, -1, 87, + -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, + -1, 93, -1, 94, -1, 95, -1, 21, 145, 109, + 150, 109, 147, -1, 241, 143, -1, 241, 110, 143, + 110, -1, 150, 162, -1, 238, -1, 241, 150, 163, + -1, 241, 110, 150, 163, 110, -1, 151, 164, 165, + -1, 159, 161, -1, 148, 109, 148, 109, 148, 109, + 148, -1, 241, 149, -1, 23, -1, 262, -1, 100, + -1, 172, -1, 152, 111, 153, 112, -1, 186, -1, + 249, -1, 100, -1, 100, -1, 154, -1, 155, -1, + 23, -1, 159, 160, 156, -1, -1, 113, 157, -1, + 114, 158, -1, 23, -1, 23, -1, 100, -1, 104, + -1, 104, -1, 104, -1, 104, -1, 101, -1, 105, + -1, -1, 101, -1, 102, -1, 103, -1, 104, -1, + -1, 115, 166, 116, -1, 115, 167, 116, -1, -1, + 168, 163, -1, 169, 163, -1, 99, -1, 100, -1, + 171, -1, 178, -1, 242, -1, 245, -1, 248, -1, + 261, -1, 7, 99, 117, 172, -1, 96, 173, -1, + 38, 177, -1, 60, -1, 98, 175, -1, 53, -1, + 29, 254, -1, 37, -1, 74, 255, -1, 50, 111, + 176, 112, -1, 97, 111, 174, 112, -1, 23, -1, + -1, 111, 176, 112, -1, 23, -1, 60, -1, 29, + 254, -1, 37, -1, 74, 255, -1, 179, -1, 180, + -1, 10, 99, 182, -1, 10, 99, 111, 181, 112, + 183, -1, -1, 23, -1, 117, 185, -1, 117, 118, + 184, 119, -1, 187, -1, 184, 109, 187, -1, 189, + -1, 225, -1, 235, -1, 189, -1, 225, -1, 236, + -1, 188, -1, 226, -1, 235, -1, 189, -1, 73, + 213, -1, 73, 190, -1, 73, 192, -1, 73, 195, + -1, 73, 197, -1, 73, 203, -1, 73, 199, -1, + 73, 206, -1, 73, 208, -1, 73, 210, -1, 73, + 212, -1, 73, 224, -1, 47, 253, 191, -1, 201, + -1, 33, -1, 69, -1, 43, 111, 202, 112, 193, + -1, 201, -1, 60, -1, 26, -1, 72, 194, -1, + 40, -1, 32, -1, 44, 196, -1, 25, -1, 253, + 67, -1, 45, 111, 202, 112, 253, 198, -1, 201, + -1, 75, 257, 200, -1, 29, -1, 25, -1, 31, + -1, 71, -1, 23, -1, 76, 255, 204, 205, -1, + 35, -1, 54, -1, 79, -1, 80, -1, 78, -1, + 77, -1, 36, 207, -1, 29, -1, 56, -1, 28, + 111, 209, 112, 57, -1, 23, -1, 58, 211, -1, + 70, -1, 26, -1, 215, 66, 111, 218, 112, -1, + 215, 214, -1, -1, 66, 111, 218, 106, 218, 112, + -1, 49, 219, 216, -1, -1, 217, -1, 41, -1, + 82, -1, 42, -1, 23, -1, 51, 220, -1, 63, + -1, 52, -1, 81, 255, -1, 55, 111, 222, 112, + -1, 48, 111, 223, 112, -1, -1, 221, -1, 23, + -1, 23, -1, 23, -1, 30, 64, -1, 229, -1, + 232, -1, 227, -1, 230, -1, 62, 34, 111, 228, + 112, -1, 233, -1, 233, 106, 233, -1, 62, 34, + 111, 233, 112, -1, 62, 46, 111, 231, 112, -1, + 234, -1, 234, 106, 234, -1, 62, 46, 111, 234, + 112, -1, 23, -1, 23, -1, 237, -1, 239, -1, + 238, -1, 239, -1, 240, -1, 24, -1, 23, -1, + 118, 240, 119, -1, 118, 240, 109, 240, 119, -1, + 118, 240, 109, 240, 109, 240, 119, -1, 118, 240, + 109, 240, 109, 240, 109, 240, 119, -1, 241, 24, + -1, 241, 23, -1, 113, -1, 114, -1, -1, -1, + 244, 11, 243, 247, -1, 262, -1, -1, -1, 5, + 246, 247, -1, 247, 109, 99, -1, 99, -1, 244, + 9, 99, 117, 249, -1, 65, 60, -1, 65, 37, + -1, 65, 250, -1, 65, 59, -1, 65, 74, 255, + -1, 65, 30, -1, 29, 251, 252, -1, -1, 39, + -1, 27, -1, -1, 61, -1, 68, -1, -1, 39, + -1, 27, -1, -1, 61, -1, 68, -1, -1, 111, + 258, 112, -1, -1, 111, 259, 112, -1, -1, 111, + 260, 112, -1, 23, -1, 23, -1, 23, -1, 6, + 99, 117, 100, -1, 99, -1, 100, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 266, 266, 269, 277, 289, 290, 293, 315, 316, - 319, 334, 337, 342, 349, 350, 351, 352, 353, 354, - 355, 358, 359, 360, 363, 369, 375, 381, 388, 394, - 401, 445, 452, 496, 502, 503, 504, 505, 506, 507, - 508, 509, 510, 511, 512, 513, 516, 528, 536, 553, - 560, 579, 590, 610, 632, 641, 674, 681, 696, 746, - 788, 799, 820, 830, 836, 867, 884, 884, 886, 893, - 905, 906, 907, 910, 922, 934, 952, 963, 975, 977, - 978, 979, 980, 983, 983, 983, 983, 984, 987, 988, - 989, 990, 991, 992, 995, 1013, 1017, 1023, 1027, 1031, - 1035, 1044, 1053, 1057, 1062, 1068, 1079, 1079, 1080, 1082, - 1086, 1090, 1094, 1100, 1100, 1102, 1118, 1141, 1144, 1155, - 1161, 1167, 1168, 1175, 1181, 1187, 1195, 1201, 1207, 1215, - 1221, 1227, 1235, 1236, 1239, 1240, 1241, 1242, 1243, 1244, - 1245, 1246, 1247, 1248, 1249, 1252, 1261, 1265, 1269, 1275, - 1284, 1288, 1292, 1301, 1305, 1311, 1317, 1324, 1329, 1337, - 1347, 1349, 1357, 1363, 1367, 1371, 1377, 1388, 1397, 1401, - 1406, 1410, 1414, 1418, 1424, 1431, 1435, 1441, 1449, 1460, - 1467, 1471, 1477, 1487, 1498, 1502, 1520, 1529, 1532, 1538, - 1542, 1546, 1552, 1563, 1568, 1573, 1578, 1583, 1588, 1596, - 1599, 1604, 1617, 1625, 1636, 1644, 1644, 1646, 1646, 1648, - 1658, 1663, 1670, 1680, 1689, 1694, 1701, 1711, 1721, 1733, - 1733, 1734, 1734, 1736, 1746, 1754, 1764, 1772, 1780, 1789, - 1800, 1804, 1810, 1811, 1812, 1815, 1815, 1818, 1853, 1857, - 1857, 1860, 1866, 1874, 1887, 1896, 1905, 1909, 1918, 1927, - 1938, 1945, 1950, 1959, 1971, 1974, 1983, 1994, 1995, 1996, - 1999, 2000, 2001, 2004, 2005, 2008, 2009, 2012, 2013, 2016, - 2027, 2038, 2049, 2070, 2071 + 0, 268, 268, 271, 279, 291, 292, 295, 317, 318, + 321, 336, 339, 344, 351, 352, 353, 354, 355, 356, + 357, 360, 361, 362, 365, 371, 377, 383, 390, 396, + 403, 447, 452, 462, 506, 512, 513, 514, 515, 516, + 517, 518, 519, 520, 521, 522, 523, 526, 538, 546, + 563, 570, 589, 600, 620, 645, 654, 687, 694, 709, + 759, 801, 812, 833, 843, 849, 880, 897, 897, 899, + 906, 918, 919, 920, 923, 935, 947, 965, 976, 988, + 990, 991, 992, 993, 996, 996, 996, 996, 997, 1000, + 1004, 1009, 1016, 1023, 1030, 1053, 1076, 1077, 1078, 1079, + 1080, 1081, 1084, 1102, 1106, 1112, 1116, 1120, 1124, 1133, + 1142, 1146, 1151, 1157, 1168, 1168, 1169, 1171, 1175, 1179, + 1183, 1189, 1189, 1191, 1207, 1230, 1233, 1244, 1250, 1256, + 1257, 1264, 1270, 1276, 1284, 1290, 1296, 1304, 1310, 1316, + 1324, 1325, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, + 1336, 1337, 1338, 1341, 1350, 1354, 1358, 1364, 1373, 1377, + 1381, 1390, 1394, 1400, 1406, 1413, 1418, 1426, 1436, 1438, + 1446, 1452, 1456, 1460, 1466, 1477, 1486, 1490, 1495, 1499, + 1503, 1507, 1513, 1520, 1524, 1530, 1538, 1549, 1556, 1560, + 1566, 1576, 1587, 1591, 1609, 1618, 1621, 1627, 1631, 1635, + 1641, 1652, 1657, 1662, 1667, 1672, 1677, 1685, 1688, 1693, + 1706, 1714, 1725, 1733, 1733, 1735, 1735, 1737, 1747, 1752, + 1759, 1769, 1778, 1783, 1790, 1800, 1810, 1822, 1822, 1823, + 1823, 1825, 1835, 1843, 1853, 1861, 1869, 1878, 1889, 1893, + 1899, 1900, 1901, 1904, 1904, 1907, 1942, 1946, 1946, 1949, + 1955, 1963, 1976, 1985, 1994, 1998, 2007, 2016, 2027, 2034, + 2039, 2048, 2060, 2063, 2072, 2083, 2084, 2085, 2088, 2089, + 2090, 2093, 2094, 2097, 2098, 2101, 2102, 2105, 2116, 2127, + 2138, 2159, 2160 }; #endif @@ -833,8 +837,8 @@ static const char *const yytname[] = "TEX_ARRAYSHADOW1D", "TEX_ARRAYSHADOW2D", "VERTEX", "VTXATTRIB", "WEIGHT", "IDENTIFIER", "USED_IDENTIFIER", "MASK4", "MASK3", "MASK2", "MASK1", "SWIZZLE", "DOT_DOT", "DOT", "';'", "','", "'|'", "'['", "']'", - "'+'", "'-'", "'='", "'{'", "'}'", "$accept", "program", "language", - "optionSequence", "option", "statementSequence", "statement", + "'+'", "'-'", "'('", "')'", "'='", "'{'", "'}'", "$accept", "program", + "language", "optionSequence", "option", "statementSequence", "statement", "instruction", "ALU_instruction", "TexInstruction", "ARL_instruction", "VECTORop_instruction", "SCALARop_instruction", "BINSCop_instruction", "BINop_instruction", "TRIop_instruction", "SAMPLE_instruction", @@ -845,6 +849,7 @@ static const char *const yytname[] = "progParamArrayAbs", "progParamArrayRel", "addrRegRelOffset", "addrRegPosOffset", "addrRegNegOffset", "addrReg", "addrComponent", "addrWriteMask", "scalarSuffix", "swizzleSuffix", "optionalMask", + "optionalCcMask", "ccTest", "ccTest2", "ccMaskRule", "ccMaskRule2", "namingStatement", "ATTRIB_statement", "attribBinding", "vtxAttribItem", "vtxAttribNum", "vtxOptWeightNum", "vtxWeightNum", "fragAttribItem", "PARAM_statement", "PARAM_singleStmt", "PARAM_multipleStmt", @@ -894,41 +899,42 @@ static const yytype_uint16 yytoknum[] = 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 59, 44, - 124, 91, 93, 43, 45, 61, 123, 125 + 124, 91, 93, 43, 45, 40, 41, 61, 123, 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const yytype_uint16 yyr1[] = { - 0, 118, 119, 120, 120, 121, 121, 122, 123, 123, - 124, 124, 125, 125, 126, 126, 126, 126, 126, 126, - 126, 127, 127, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 139, 140, 140, 141, - 141, 142, 142, 143, 144, 145, 146, 147, 147, 148, - 148, 148, 148, 149, 149, 150, 151, 151, 152, 153, - 154, 154, 154, 155, 156, 157, 158, 159, 160, 161, - 161, 161, 161, 162, 162, 162, 162, 162, 163, 163, - 163, 163, 163, 163, 164, 165, 165, 166, 166, 166, - 166, 166, 166, 166, 166, 167, 168, 168, 169, 170, - 170, 170, 170, 171, 171, 172, 173, 174, 174, 175, - 176, 177, 177, 178, 178, 178, 179, 179, 179, 180, - 180, 180, 181, 181, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 183, 184, 184, 184, 185, - 186, 186, 186, 186, 186, 187, 188, 189, 189, 190, - 191, 192, 193, 194, 194, 194, 195, 196, 197, 197, - 198, 198, 198, 198, 199, 200, 200, 201, 202, 203, - 204, 204, 205, 206, 207, 207, 208, 209, 209, 210, - 210, 210, 211, 212, 212, 212, 212, 212, 212, 213, - 213, 214, 215, 216, 217, 218, 218, 219, 219, 220, - 221, 221, 222, 223, 224, 224, 225, 226, 227, 228, - 228, 229, 229, 230, 231, 231, 232, 232, 232, 232, - 233, 233, 234, 234, 234, 236, 235, 237, 237, 239, - 238, 240, 240, 241, 242, 242, 242, 242, 242, 242, - 243, 244, 244, 244, 245, 245, 245, 246, 246, 246, - 247, 247, 247, 248, 248, 249, 249, 250, 250, 251, - 252, 253, 254, 255, 255 + 0, 120, 121, 122, 122, 123, 123, 124, 125, 125, + 126, 126, 127, 127, 128, 128, 128, 128, 128, 128, + 128, 129, 129, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 137, 138, 139, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 141, 142, 142, + 143, 143, 144, 144, 145, 146, 147, 148, 149, 149, + 150, 150, 150, 150, 151, 151, 152, 153, 153, 154, + 155, 156, 156, 156, 157, 158, 159, 160, 161, 162, + 163, 163, 163, 163, 164, 164, 164, 164, 164, 165, + 165, 165, 166, 167, 168, 169, 170, 170, 170, 170, + 170, 170, 171, 172, 172, 173, 173, 173, 173, 173, + 173, 173, 173, 174, 175, 175, 176, 177, 177, 177, + 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, + 184, 185, 185, 185, 186, 186, 186, 187, 187, 187, + 188, 188, 189, 189, 189, 189, 189, 189, 189, 189, + 189, 189, 189, 190, 191, 191, 191, 192, 193, 193, + 193, 193, 193, 194, 195, 196, 196, 197, 198, 199, + 200, 201, 201, 201, 202, 203, 204, 204, 205, 205, + 205, 205, 206, 207, 207, 208, 209, 210, 211, 211, + 212, 213, 214, 214, 215, 216, 216, 217, 217, 217, + 218, 219, 219, 219, 219, 219, 219, 220, 220, 221, + 222, 223, 224, 225, 225, 226, 226, 227, 228, 228, + 229, 230, 231, 231, 232, 233, 234, 235, 235, 236, + 236, 237, 238, 238, 239, 239, 239, 239, 240, 240, + 241, 241, 241, 243, 242, 244, 244, 246, 245, 247, + 247, 248, 249, 249, 249, 249, 249, 249, 250, 251, + 251, 251, 252, 252, 252, 253, 253, 253, 254, 254, + 254, 255, 255, 256, 256, 257, 257, 258, 259, 260, + 261, 262, 262 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -937,31 +943,32 @@ static const yytype_uint8 yyr2[] = 0, 2, 4, 1, 1, 2, 0, 3, 2, 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 6, 6, 8, - 8, 2, 12, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 6, 2, 4, 2, - 1, 3, 5, 2, 2, 7, 2, 1, 1, 1, - 1, 4, 1, 1, 1, 1, 1, 1, 1, 3, - 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 4, 2, 2, 1, 2, 1, - 2, 1, 2, 4, 4, 1, 0, 3, 1, 1, - 2, 1, 2, 1, 1, 3, 6, 0, 1, 2, - 4, 1, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 3, 1, 1, 1, 5, - 1, 1, 1, 2, 1, 1, 2, 1, 2, 6, - 1, 3, 1, 1, 1, 1, 1, 4, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 5, 1, 2, - 1, 1, 5, 2, 0, 6, 3, 0, 1, 1, - 1, 1, 1, 2, 1, 1, 2, 4, 4, 0, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 5, - 1, 3, 5, 5, 1, 3, 5, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 5, 7, 9, - 2, 2, 1, 1, 0, 0, 4, 1, 0, 0, - 3, 3, 1, 5, 2, 2, 2, 2, 3, 2, - 3, 0, 1, 1, 0, 1, 1, 0, 1, 1, - 0, 1, 1, 0, 3, 0, 3, 0, 3, 1, - 1, 1, 4, 1, 1 + 8, 2, 2, 12, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 6, 2, 4, + 2, 1, 3, 5, 3, 2, 7, 2, 1, 1, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 1, 1, 0, 3, + 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 2, 2, 1, 2, 1, 2, 1, + 2, 4, 4, 1, 0, 3, 1, 1, 2, 1, + 2, 1, 1, 3, 6, 0, 1, 2, 4, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 3, 1, 1, 1, 5, 1, 1, + 1, 2, 1, 1, 2, 1, 2, 6, 1, 3, + 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, + 1, 1, 2, 1, 1, 5, 1, 2, 1, 1, + 5, 2, 0, 6, 3, 0, 1, 1, 1, 1, + 1, 2, 1, 1, 2, 4, 4, 0, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 5, 1, 3, + 5, 5, 1, 3, 5, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 5, 7, 9, 2, 2, + 1, 1, 0, 0, 4, 1, 0, 0, 3, 3, + 1, 5, 2, 2, 2, 2, 3, 2, 3, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 3, 0, 3, 0, 3, 1, 1, 1, + 4, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -969,288 +976,296 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 3, 4, 0, 6, 1, 9, 0, 5, 238, - 273, 274, 0, 239, 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 234, 0, 0, 8, 0, + 0, 3, 4, 0, 6, 1, 9, 0, 5, 246, + 281, 282, 0, 247, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 0, 0, 242, 0, 0, 8, 0, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, - 23, 20, 0, 88, 89, 113, 114, 90, 0, 91, - 92, 93, 237, 7, 0, 0, 0, 0, 0, 64, - 0, 87, 63, 0, 0, 0, 0, 0, 75, 0, - 0, 232, 233, 31, 0, 0, 0, 10, 11, 0, - 235, 242, 240, 0, 0, 117, 234, 115, 251, 249, - 245, 247, 244, 263, 246, 234, 83, 84, 85, 86, - 53, 234, 234, 234, 234, 234, 234, 77, 54, 225, - 224, 0, 0, 0, 0, 59, 0, 234, 82, 0, - 60, 62, 126, 127, 205, 206, 128, 221, 222, 0, - 234, 0, 0, 0, 272, 94, 118, 0, 119, 123, - 124, 125, 219, 220, 223, 0, 253, 252, 254, 0, - 248, 0, 0, 0, 0, 26, 0, 25, 24, 260, - 111, 109, 263, 96, 0, 0, 0, 0, 0, 0, - 257, 0, 257, 0, 0, 267, 263, 134, 135, 136, - 137, 139, 138, 140, 141, 142, 143, 0, 144, 260, - 101, 0, 99, 97, 263, 0, 106, 95, 82, 0, - 80, 79, 81, 51, 0, 0, 0, 0, 236, 241, - 0, 231, 230, 255, 256, 250, 269, 0, 234, 234, - 0, 47, 0, 50, 0, 234, 261, 262, 110, 112, - 0, 0, 0, 204, 175, 176, 174, 0, 157, 259, - 258, 156, 0, 0, 0, 0, 199, 195, 0, 194, - 263, 187, 181, 180, 179, 0, 0, 0, 0, 100, - 0, 102, 0, 0, 98, 0, 234, 226, 68, 0, - 66, 67, 0, 234, 234, 243, 0, 116, 264, 28, - 27, 0, 78, 49, 265, 0, 0, 217, 0, 218, - 0, 178, 0, 166, 0, 158, 0, 163, 164, 147, - 148, 165, 145, 146, 0, 201, 193, 200, 0, 196, - 189, 191, 190, 186, 188, 271, 0, 162, 161, 168, - 169, 0, 0, 108, 0, 105, 0, 0, 52, 0, - 61, 76, 70, 46, 0, 0, 0, 234, 48, 0, - 33, 0, 234, 212, 216, 0, 0, 257, 203, 0, - 202, 0, 268, 173, 172, 170, 171, 167, 192, 0, - 103, 104, 107, 234, 227, 0, 0, 69, 234, 57, - 56, 58, 234, 0, 0, 0, 121, 129, 132, 130, - 207, 208, 131, 270, 0, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 30, 29, 177, - 152, 154, 151, 0, 149, 150, 0, 198, 197, 182, - 0, 73, 71, 74, 72, 0, 0, 0, 0, 133, - 184, 234, 120, 266, 155, 153, 159, 160, 234, 228, - 234, 0, 0, 0, 0, 183, 122, 0, 0, 0, - 0, 210, 0, 214, 0, 229, 234, 0, 209, 0, - 213, 0, 0, 55, 32, 211, 215, 0, 0, 185 + 23, 20, 0, 96, 97, 121, 122, 98, 0, 99, + 100, 101, 245, 7, 0, 0, 0, 0, 0, 65, + 0, 88, 64, 0, 0, 0, 0, 0, 76, 0, + 0, 94, 240, 241, 31, 32, 83, 0, 0, 0, + 10, 11, 0, 243, 250, 248, 0, 0, 125, 242, + 123, 259, 257, 253, 255, 252, 271, 254, 242, 84, + 85, 86, 87, 91, 242, 242, 242, 242, 242, 242, + 78, 55, 81, 80, 82, 92, 233, 232, 0, 0, + 0, 0, 60, 0, 242, 83, 0, 61, 63, 134, + 135, 213, 214, 136, 229, 230, 0, 242, 0, 0, + 0, 280, 102, 126, 0, 127, 131, 132, 133, 227, + 228, 231, 0, 261, 260, 262, 0, 256, 0, 0, + 54, 0, 0, 0, 26, 0, 25, 24, 268, 119, + 117, 271, 104, 0, 0, 0, 0, 0, 0, 265, + 0, 265, 0, 0, 275, 271, 142, 143, 144, 145, + 147, 146, 148, 149, 150, 151, 0, 152, 268, 109, + 0, 107, 105, 271, 0, 114, 103, 83, 0, 52, + 0, 0, 0, 0, 244, 249, 0, 239, 238, 263, + 264, 258, 277, 0, 242, 95, 0, 0, 83, 242, + 0, 48, 0, 51, 0, 242, 269, 270, 118, 120, + 0, 0, 0, 212, 183, 184, 182, 0, 165, 267, + 266, 164, 0, 0, 0, 0, 207, 203, 0, 202, + 271, 195, 189, 188, 187, 0, 0, 0, 0, 108, + 0, 110, 0, 0, 106, 0, 242, 234, 69, 0, + 67, 68, 0, 242, 242, 251, 0, 124, 272, 28, + 89, 90, 93, 27, 0, 79, 50, 273, 0, 0, + 225, 0, 226, 0, 186, 0, 174, 0, 166, 0, + 171, 172, 155, 156, 173, 153, 154, 0, 209, 201, + 208, 0, 204, 197, 199, 198, 194, 196, 279, 0, + 170, 169, 176, 177, 0, 0, 116, 0, 113, 0, + 0, 53, 0, 62, 77, 71, 47, 0, 0, 0, + 242, 49, 0, 34, 0, 242, 220, 224, 0, 0, + 265, 211, 0, 210, 0, 276, 181, 180, 178, 179, + 175, 200, 0, 111, 112, 115, 242, 235, 0, 0, + 70, 242, 58, 57, 59, 242, 0, 0, 0, 129, + 137, 140, 138, 215, 216, 139, 278, 0, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 30, 29, 185, 160, 162, 159, 0, 157, 158, 0, + 206, 205, 190, 0, 74, 72, 75, 73, 0, 0, + 0, 0, 141, 192, 242, 128, 274, 163, 161, 167, + 168, 242, 236, 242, 0, 0, 0, 0, 191, 130, + 0, 0, 0, 0, 218, 0, 222, 0, 237, 242, + 0, 217, 0, 221, 0, 0, 56, 33, 219, 223, + 0, 0, 193 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 3, 4, 6, 8, 9, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 285, - 397, 41, 152, 221, 73, 60, 69, 333, 334, 370, - 222, 61, 119, 269, 270, 271, 367, 412, 414, 70, - 332, 108, 283, 203, 100, 42, 43, 120, 197, 326, - 264, 324, 163, 44, 45, 46, 137, 87, 277, 375, - 138, 121, 376, 377, 122, 177, 302, 178, 404, 425, - 179, 241, 180, 426, 181, 318, 303, 294, 182, 321, - 357, 183, 236, 184, 292, 185, 254, 186, 419, 435, - 187, 313, 314, 359, 251, 306, 307, 351, 349, 188, - 123, 379, 380, 440, 124, 381, 442, 125, 288, 290, - 382, 126, 142, 127, 128, 144, 74, 47, 132, 48, - 49, 54, 82, 50, 62, 94, 148, 215, 242, 228, - 150, 340, 256, 217, 384, 316, 51, 12 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 298, + 410, 41, 161, 231, 74, 60, 69, 346, 347, 383, + 232, 61, 126, 279, 280, 281, 380, 425, 427, 70, + 345, 111, 296, 115, 103, 160, 75, 227, 76, 228, + 42, 43, 127, 206, 339, 274, 337, 172, 44, 45, + 46, 144, 90, 287, 388, 145, 128, 389, 390, 129, + 186, 315, 187, 417, 438, 188, 251, 189, 439, 190, + 331, 316, 307, 191, 334, 370, 192, 246, 193, 305, + 194, 264, 195, 432, 448, 196, 326, 327, 372, 261, + 319, 320, 364, 362, 197, 130, 392, 393, 453, 131, + 394, 455, 132, 301, 303, 395, 133, 149, 134, 135, + 151, 77, 47, 139, 48, 49, 54, 85, 50, 62, + 97, 155, 221, 252, 238, 157, 353, 266, 223, 397, + 329, 51, 12 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -401 +#define YYPACT_NINF -387 static const yytype_int16 yypact[] = { - 122, -401, -401, 49, -401, -401, 56, 61, -401, 20, - -401, -401, -5, -401, 7, 45, 78, -401, -47, -47, - -47, -47, -47, -47, 79, 85, -47, -47, -401, 99, - -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, - -401, -401, 127, -401, -401, -401, -401, -401, 120, -401, - -401, -401, -401, -401, 135, 133, 134, 25, 129, -401, - 138, 137, -401, 145, 146, 147, 148, 151, -401, 152, - 154, -401, -401, -401, -14, 153, 155, -401, -401, 143, - -401, -401, 156, 163, 14, 243, 32, -401, 31, -401, - -401, -401, -401, 157, -401, 85, -401, -401, -401, -401, - -401, 85, 85, 85, 85, 85, 85, -401, -401, -401, - -401, 112, 149, 126, 54, 158, 27, 85, 132, 159, - -401, -401, -401, -401, -401, -401, -401, -401, -401, 27, - 85, 160, 135, 168, -401, -401, -401, 161, -401, -401, - -401, -401, -401, -401, -401, 198, -401, -401, 89, 248, - -401, 167, 169, 22, 170, -401, 171, -401, -401, 117, - -401, -401, 157, -401, 172, 173, 174, 208, -1, 175, - 53, 176, 165, 142, -3, 177, 157, -401, -401, -401, - -401, -401, -401, -401, -401, -401, -401, 215, -401, 117, - -401, 179, -401, -401, 157, 180, 181, -401, 132, -38, - -401, -401, -401, -401, -10, 184, 185, 209, 156, -401, - 182, -401, -401, -401, -401, -401, -401, 183, 85, 85, - 27, -401, 192, 194, 216, 85, -401, -401, -401, -401, - 277, 278, 279, -401, -401, -401, -401, 280, -401, -401, - -401, -401, 237, 280, 68, 195, 282, -401, 196, -401, - 157, 33, -401, -401, -401, 285, 281, 19, 200, -401, - 286, -401, 289, 286, -401, 203, 85, -401, -401, 202, - -401, -401, 212, 85, 85, -401, 201, -401, -401, -401, - -401, 210, -401, -401, 207, 213, 214, -401, 218, -401, - 219, -401, 220, -401, 221, -401, 222, -401, -401, -401, - -401, -401, -401, -401, 296, -401, -401, -401, 298, -401, - -401, -401, -401, -401, -401, -401, 226, -401, -401, -401, - -401, 166, 301, -401, 227, -401, 228, 229, -401, 46, - -401, -401, 116, -401, 217, -12, 234, 51, -401, 302, - -401, 125, 85, -401, -401, 270, 37, 165, -401, 233, - -401, 235, -401, -401, -401, -401, -401, -401, -401, 236, - -401, -401, -401, 85, -401, 305, 323, -401, 85, -401, - -401, -401, 85, 162, 126, 59, -401, -401, -401, -401, - -401, -401, -401, -401, 238, -401, -401, -401, -401, -401, - -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, - -401, -401, -401, 317, -401, -401, 41, -401, -401, -401, - 65, -401, -401, -401, -401, 242, 244, 241, 245, -401, - 288, 51, -401, -401, -401, -401, -401, -401, 85, -401, - 85, 216, 277, 278, 246, -401, -401, 247, 249, 250, - 251, 255, 253, 256, 301, -401, 85, 125, -401, 277, - -401, 278, 94, -401, -401, -401, -401, 301, 254, -401 + 202, -387, -387, 67, -387, -387, 73, -73, -387, 24, + -387, -387, -4, -387, 78, 84, 127, -387, -18, -18, + -18, -18, -18, -18, 66, 44, -18, -18, -387, 138, + -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, + -387, -387, 144, -387, -387, -387, -387, -387, 236, -387, + -387, -387, -387, -387, 154, 140, 141, 10, 133, -387, + 145, 136, -387, 150, 151, 155, 156, 157, -387, 158, + 166, -387, -387, -387, -387, -387, 131, -13, 159, 162, + -387, -387, 173, -387, -387, 165, 175, 23, 232, 0, + -387, 125, -387, -387, -387, -387, 167, -387, 116, -387, + -387, -387, -387, 161, 116, 116, 116, 116, 116, 116, + -387, -387, -387, -387, -387, -387, -387, -387, 105, 98, + 92, 19, 168, 30, 116, 131, 169, -387, -387, -387, + -387, -387, -387, -387, -387, -387, 30, 116, 160, 154, + 174, -387, -387, -387, 170, -387, -387, -387, -387, -387, + -387, -387, 210, -387, -387, 134, 258, -387, 176, 149, + -387, 177, -10, 179, -387, 180, -387, -387, 135, -387, + -387, 167, -387, 172, 182, 183, 220, 46, 184, 106, + 185, 146, 123, 7, 186, 167, -387, -387, -387, -387, + -387, -387, -387, -387, -387, -387, 224, -387, 135, -387, + 187, -387, -387, 167, 189, 190, -387, 131, -45, -387, + 1, 193, 194, 226, 165, -387, 188, -387, -387, -387, + -387, -387, -387, 192, 116, -387, 191, 195, 131, 116, + 30, -387, 204, 205, 223, 116, -387, -387, -387, -387, + 287, 289, 290, -387, -387, -387, -387, 291, -387, -387, + -387, -387, 248, 291, 128, 206, 293, -387, 207, -387, + 167, 16, -387, -387, -387, 296, 294, 45, 209, -387, + 299, -387, 301, 299, -387, 215, 116, -387, -387, 214, + -387, -387, 225, 116, 116, -387, 212, -387, -387, -387, + -387, -387, -387, -387, 217, -387, -387, 221, 219, 222, + -387, 227, -387, 228, -387, 229, -387, 231, -387, 237, + -387, -387, -387, -387, -387, -387, -387, 310, -387, -387, + -387, 311, -387, -387, -387, -387, -387, -387, -387, 238, + -387, -387, -387, -387, 164, 312, -387, 239, -387, 241, + 243, -387, 63, -387, -387, 137, -387, 235, -15, 247, + 33, -387, 313, -387, 124, 116, -387, -387, 280, 129, + 146, -387, 245, -387, 246, -387, -387, -387, -387, -387, + -387, -387, 249, -387, -387, -387, 116, -387, 315, 325, + -387, 116, -387, -387, -387, 116, 142, 92, 71, -387, + -387, -387, -387, -387, -387, -387, -387, 250, -387, -387, + -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, + -387, -387, -387, -387, -387, -387, 327, -387, -387, 40, + -387, -387, -387, 72, -387, -387, -387, -387, 251, 254, + 253, 255, -387, 302, 33, -387, -387, -387, -387, -387, + -387, 116, -387, 116, 223, 287, 289, 256, -387, -387, + 252, 260, 263, 261, 259, 262, 269, 312, -387, 116, + 124, -387, 287, -387, 289, 119, -387, -387, -387, -387, + 312, 264, -387 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, - -401, -401, -401, -401, -401, -401, -401, -401, -401, -76, - -80, -401, -98, 150, -83, 205, -401, -401, -361, -401, - -18, -401, -401, -401, -401, -401, -401, -401, -401, 164, - -401, -401, -401, 178, -401, -401, -401, 287, -401, -401, - -401, 106, -401, -401, -401, -401, -401, -401, -401, -401, - -401, -401, -49, -401, -85, -401, -401, -401, -401, -401, - -401, -401, -401, -401, -401, -401, -330, 130, -401, -401, - -401, -401, -401, -401, -401, -401, -401, -401, -401, -401, - 0, -401, -401, -400, -401, -401, -401, -401, -401, -401, - 291, -401, -401, -401, -401, -401, -401, -401, -302, -317, - 292, -401, -401, -139, -84, -113, -86, -401, -401, -401, - -401, -401, 252, -401, 186, -401, -401, -401, -166, 190, - -133, -401, -401, -401, -401, -401, -401, -6 + -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, + -387, -387, -387, -387, -387, -387, -387, -387, -387, -67, + -82, -387, -100, 152, -86, 201, -387, -387, -365, -387, + -11, -387, -387, -387, -387, -387, -387, -387, -387, 171, + -387, -387, -387, -118, -387, -387, 230, -387, -387, -387, + -387, -387, 292, -387, -387, -387, 107, -387, -387, -387, + -387, -387, -387, -387, -387, -387, -387, -51, -387, -88, + -387, -387, -387, -387, -387, -387, -387, -387, -387, -387, + -387, -304, 132, -387, -387, -387, -387, -387, -387, -387, + -387, -387, -387, -387, -387, -3, -387, -387, -361, -387, + -387, -387, -387, -387, -387, 297, -387, -387, -387, -387, + -387, -387, -387, -386, -376, 298, -387, -387, -139, -87, + -120, -89, -387, -387, -387, -387, -387, 257, -387, 178, + -387, -387, -387, -176, 196, -153, -387, -387, -387, -387, + -387, -387, -6 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -222 +#define YYTABLE_NINF -230 static const yytype_int16 yytable[] = { - 145, 139, 143, 52, 199, 155, 244, 415, 158, 109, - 110, 369, 151, 268, 223, 153, 405, 153, 58, 154, - 153, 156, 157, 252, 111, 13, 14, 15, 234, 229, - 16, 145, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 257, 452, 109, 110, 206, 112, 5, - 109, 110, 111, 59, 319, 235, 118, 458, 146, 113, - 111, 261, 297, 400, 7, 111, 297, 253, 298, 438, - 147, 266, 298, 320, 310, 311, 427, 401, 238, 267, - 239, 223, 114, 189, 112, 453, 115, 10, 11, 112, - 68, 190, 240, 297, 112, 113, 116, 402, 198, 298, - 113, 299, 117, 53, 191, 113, 55, 192, 301, 403, - 114, 205, 301, 373, 193, 312, 443, 309, 114, 10, - 11, 280, 115, 114, 374, 1, 2, 115, 194, 79, - 441, 80, 220, 153, 456, 279, 85, 300, 117, 301, - 86, 159, 286, 117, 56, 71, 72, 455, 117, 160, - 213, 195, 196, 329, 166, 363, 167, 214, 88, 89, - 10, 11, 168, 364, 71, 72, 90, 117, 421, 169, - 170, 171, 161, 172, 428, 173, 422, 57, 226, 68, - 145, 406, 429, 164, 174, 227, 162, 335, 91, 92, - 245, 336, 239, 246, 247, 165, 417, 248, 71, 72, - 457, 175, 176, 93, 240, 249, 409, 77, 418, 385, - 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, - 396, 211, 212, 250, 63, 64, 65, 66, 67, 365, - 366, 75, 76, 200, 81, 78, 201, 202, 96, 97, - 98, 99, 131, 353, 354, 355, 356, 95, 83, 84, - 410, 145, 378, 143, 101, 102, 103, 104, 107, 398, - 105, 106, 129, 134, 130, 133, 136, 209, 149, -65, - 204, 216, 233, 210, 58, 207, 218, 145, 219, 224, - 225, 258, 335, 230, 231, 232, 237, 243, 255, 416, - 260, 262, 263, 273, 274, 278, 282, 276, -221, 284, - 287, 289, 291, 293, 295, 305, 304, 308, 315, 323, - 317, 322, 325, 328, 330, 437, 331, 337, 339, 348, - 338, 350, 341, 342, 358, 383, 368, 399, 411, 371, - 343, 344, 345, 346, 347, 145, 378, 143, 352, 360, - 361, 362, 145, 372, 335, 407, 413, 408, 409, 424, - 423, 430, 432, 431, 434, 439, 433, 444, 446, 447, - 335, 449, 451, 448, 445, 450, 459, 454, 272, 327, - 281, 135, 436, 296, 420, 0, 265, 140, 141, 259, - 0, 0, 0, 0, 208, 0, 0, 0, 0, 0, - 0, 0, 0, 275 + 152, 146, 150, 52, 208, 254, 164, 209, 382, 167, + 116, 117, 158, 116, 117, 162, 428, 162, 239, 163, + 162, 165, 166, 233, 278, 118, 10, 11, 118, 13, + 14, 15, 267, 262, 16, 152, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 58, 198, 119, + 271, 212, 119, 116, 117, 418, 199, 323, 324, 454, + 120, 118, 119, 120, 276, 310, 125, 5, 118, 200, + 456, 311, 201, 120, 277, 244, 468, 263, 451, 202, + 332, 7, 59, 121, 10, 11, 121, 122, 469, 275, + 122, 233, 119, 203, 466, 386, 465, 123, 325, 333, + 230, 68, 245, 120, 53, 124, 387, 322, 124, 471, + 292, 314, 207, 72, 73, 440, 204, 205, 124, 121, + 175, 88, 176, 10, 11, 211, 121, 89, 177, 293, + 122, 248, 173, 249, 168, 178, 179, 180, 289, 181, + 162, 182, 169, 71, 174, 250, 72, 73, 124, 299, + 183, 124, 153, 310, 310, 413, 342, 72, 73, 311, + 311, 312, 91, 92, 154, 170, 68, 184, 185, 414, + 93, 255, 376, 249, 256, 257, 430, 55, 258, 171, + 434, 441, 377, 56, 419, 250, 259, 152, 431, 415, + 435, 442, 94, 95, 348, 219, 236, 313, 349, 314, + 314, 416, 220, 237, 260, 1, 2, 96, 398, 399, + 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, + 63, 64, 65, 66, 67, 470, 57, 78, 79, 72, + 73, 422, 112, 217, 218, 113, 114, 99, 100, 101, + 102, 366, 367, 368, 369, 82, 80, 83, 71, 225, + 378, 379, 81, 84, 98, 143, 423, 86, 87, 104, + 105, 152, 391, 150, 106, 107, 108, 109, 136, 411, + 110, 137, 138, 215, 140, 141, 159, 213, 156, -66, + 210, 222, 216, 240, 243, 224, 229, 152, 234, 235, + 268, 58, 348, 241, 242, 247, 253, 265, 270, 429, + 272, 273, 283, 284, 288, 286, 297, 290, 295, -229, + 300, 291, 302, 304, 306, 308, 318, 317, 321, 328, + 335, 450, 336, 330, 338, 341, 343, 351, 354, 344, + 350, 355, 352, 361, 363, 371, 396, 412, 424, 356, + 357, 358, 384, 359, 381, 152, 391, 150, 426, 360, + 365, 373, 152, 374, 348, 375, 385, 420, 421, 437, + 443, 422, 436, 444, 445, 462, 446, 457, 447, 459, + 348, 458, 460, 461, 463, 464, 472, 452, 467, 142, + 340, 282, 294, 449, 433, 309, 147, 148, 0, 226, + 0, 285, 0, 0, 269, 0, 214 }; static const yytype_int16 yycheck[] = { - 86, 86, 86, 9, 117, 103, 172, 368, 106, 23, - 24, 23, 95, 23, 153, 101, 346, 103, 65, 102, - 106, 104, 105, 26, 38, 5, 6, 7, 29, 162, - 10, 117, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 176, 444, 23, 24, 130, 62, 0, - 23, 24, 38, 100, 35, 56, 74, 457, 27, 73, - 38, 194, 25, 26, 8, 38, 25, 70, 31, 430, - 39, 109, 31, 54, 41, 42, 406, 40, 25, 117, - 27, 220, 96, 29, 62, 446, 100, 99, 100, 62, - 100, 37, 39, 25, 62, 73, 110, 60, 116, 31, - 73, 33, 116, 108, 50, 73, 99, 53, 71, 72, - 96, 129, 71, 62, 60, 82, 433, 250, 96, 99, - 100, 219, 100, 96, 73, 3, 4, 100, 74, 9, - 432, 11, 110, 219, 451, 218, 111, 69, 116, 71, - 115, 29, 225, 116, 99, 113, 114, 449, 116, 37, - 61, 97, 98, 266, 28, 109, 30, 68, 29, 30, - 99, 100, 36, 117, 113, 114, 37, 116, 109, 43, - 44, 45, 60, 47, 109, 49, 117, 99, 61, 100, - 266, 347, 117, 34, 58, 68, 74, 273, 59, 60, - 48, 274, 27, 51, 52, 46, 34, 55, 113, 114, - 106, 75, 76, 74, 39, 63, 112, 108, 46, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 23, 24, 81, 19, 20, 21, 22, 23, 113, - 114, 26, 27, 101, 99, 108, 104, 105, 101, 102, - 103, 104, 99, 77, 78, 79, 80, 109, 115, 115, - 363, 337, 337, 337, 109, 109, 109, 109, 104, 342, - 109, 109, 109, 100, 109, 109, 23, 99, 111, 111, - 111, 23, 64, 112, 65, 115, 109, 363, 109, 109, - 109, 66, 368, 111, 111, 111, 111, 111, 111, 372, - 111, 111, 111, 109, 109, 112, 104, 115, 104, 83, - 23, 23, 23, 23, 67, 23, 111, 111, 23, 23, - 29, 111, 23, 110, 112, 428, 104, 116, 111, 23, - 110, 23, 109, 109, 23, 23, 109, 57, 23, 335, - 112, 112, 112, 112, 112, 421, 421, 421, 112, 112, - 112, 112, 428, 109, 430, 112, 23, 112, 112, 32, - 112, 109, 111, 109, 66, 431, 111, 111, 109, 109, - 446, 106, 106, 112, 117, 112, 112, 447, 204, 263, - 220, 84, 421, 243, 374, -1, 198, 86, 86, 189, - -1, -1, -1, -1, 132, -1, -1, -1, -1, -1, - -1, -1, -1, 207 + 89, 89, 89, 9, 124, 181, 106, 125, 23, 109, + 23, 24, 98, 23, 24, 104, 381, 106, 171, 105, + 109, 107, 108, 162, 23, 38, 99, 100, 38, 5, + 6, 7, 185, 26, 10, 124, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 65, 29, 62, + 203, 137, 62, 23, 24, 359, 37, 41, 42, 445, + 73, 38, 62, 73, 109, 25, 77, 0, 38, 50, + 446, 31, 53, 73, 119, 29, 462, 70, 443, 60, + 35, 8, 100, 96, 99, 100, 96, 100, 464, 207, + 100, 230, 62, 74, 459, 62, 457, 110, 82, 54, + 110, 100, 56, 73, 108, 118, 73, 260, 118, 470, + 228, 71, 123, 113, 114, 419, 97, 98, 118, 96, + 28, 111, 30, 99, 100, 136, 96, 117, 36, 229, + 100, 25, 34, 27, 29, 43, 44, 45, 224, 47, + 229, 49, 37, 99, 46, 39, 113, 114, 118, 235, + 58, 118, 27, 25, 25, 26, 276, 113, 114, 31, + 31, 33, 29, 30, 39, 60, 100, 75, 76, 40, + 37, 48, 109, 27, 51, 52, 34, 99, 55, 74, + 109, 109, 119, 99, 360, 39, 63, 276, 46, 60, + 119, 119, 59, 60, 283, 61, 61, 69, 284, 71, + 71, 72, 68, 68, 81, 3, 4, 74, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 19, 20, 21, 22, 23, 106, 99, 26, 27, 113, + 114, 112, 101, 23, 24, 104, 105, 101, 102, 103, + 104, 77, 78, 79, 80, 9, 108, 11, 99, 100, + 113, 114, 108, 99, 109, 23, 376, 117, 117, 109, + 109, 350, 350, 350, 109, 109, 109, 109, 109, 355, + 104, 109, 99, 99, 109, 100, 115, 117, 111, 111, + 111, 23, 112, 111, 64, 109, 109, 376, 109, 109, + 66, 65, 381, 111, 111, 111, 111, 111, 111, 385, + 111, 111, 109, 109, 112, 117, 83, 116, 104, 104, + 23, 116, 23, 23, 23, 67, 23, 111, 111, 23, + 111, 441, 23, 29, 23, 110, 112, 110, 109, 104, + 118, 109, 111, 23, 23, 23, 23, 57, 23, 112, + 112, 112, 348, 112, 109, 434, 434, 434, 23, 112, + 112, 112, 441, 112, 443, 112, 109, 112, 112, 32, + 109, 112, 112, 109, 111, 106, 111, 111, 66, 109, + 459, 119, 109, 112, 112, 106, 112, 444, 460, 87, + 273, 210, 230, 434, 387, 253, 89, 89, -1, 159, + -1, 213, -1, -1, 198, -1, 139 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const yytype_uint16 yystos[] = { - 0, 3, 4, 119, 120, 0, 121, 8, 122, 123, - 99, 100, 255, 5, 6, 7, 10, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 139, 163, 164, 171, 172, 173, 235, 237, 238, - 241, 254, 255, 108, 239, 99, 99, 99, 65, 100, - 143, 149, 242, 143, 143, 143, 143, 143, 100, 144, - 157, 113, 114, 142, 234, 143, 143, 108, 108, 9, - 11, 99, 240, 115, 115, 111, 115, 175, 29, 30, - 37, 59, 60, 74, 243, 109, 101, 102, 103, 104, - 162, 109, 109, 109, 109, 109, 109, 104, 159, 23, - 24, 38, 62, 73, 96, 100, 110, 116, 148, 150, - 165, 179, 182, 218, 222, 225, 229, 231, 232, 109, - 109, 99, 236, 109, 100, 165, 23, 174, 178, 182, - 218, 228, 230, 232, 233, 234, 27, 39, 244, 111, - 248, 142, 140, 234, 142, 140, 142, 142, 140, 29, - 37, 60, 74, 170, 34, 46, 28, 30, 36, 43, - 44, 45, 47, 49, 58, 75, 76, 183, 185, 188, - 190, 192, 196, 199, 201, 203, 205, 208, 217, 29, - 37, 50, 53, 60, 74, 97, 98, 166, 148, 233, - 101, 104, 105, 161, 111, 148, 142, 115, 240, 99, - 112, 23, 24, 61, 68, 245, 23, 251, 109, 109, - 110, 141, 148, 231, 109, 109, 61, 68, 247, 248, - 111, 111, 111, 64, 29, 56, 200, 111, 25, 27, - 39, 189, 246, 111, 246, 48, 51, 52, 55, 63, - 81, 212, 26, 70, 204, 111, 250, 248, 66, 247, - 111, 248, 111, 111, 168, 161, 109, 117, 23, 151, - 152, 153, 157, 109, 109, 242, 115, 176, 112, 142, - 140, 141, 104, 160, 83, 137, 142, 23, 226, 23, - 227, 23, 202, 23, 195, 67, 195, 25, 31, 33, - 69, 71, 184, 194, 111, 23, 213, 214, 111, 248, - 41, 42, 82, 209, 210, 23, 253, 29, 193, 35, - 54, 197, 111, 23, 169, 23, 167, 169, 110, 233, - 112, 104, 158, 145, 146, 234, 142, 116, 110, 111, - 249, 109, 109, 112, 112, 112, 112, 112, 23, 216, - 23, 215, 112, 77, 78, 79, 80, 198, 23, 211, - 112, 112, 112, 109, 117, 113, 114, 154, 109, 23, - 147, 255, 109, 62, 73, 177, 180, 181, 182, 219, - 220, 223, 228, 23, 252, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 138, 142, 57, - 26, 40, 60, 72, 186, 194, 246, 112, 112, 112, - 233, 23, 155, 23, 156, 146, 142, 34, 46, 206, - 208, 109, 117, 112, 32, 187, 191, 194, 109, 117, - 109, 109, 111, 111, 66, 207, 180, 233, 146, 137, - 221, 226, 224, 227, 111, 117, 109, 109, 112, 106, - 112, 106, 211, 146, 138, 226, 227, 106, 211, 112 + 0, 3, 4, 121, 122, 0, 123, 8, 124, 125, + 99, 100, 262, 5, 6, 7, 10, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 141, 170, 171, 178, 179, 180, 242, 244, 245, + 248, 261, 262, 108, 246, 99, 99, 99, 65, 100, + 145, 151, 249, 145, 145, 145, 145, 145, 100, 146, + 159, 99, 113, 114, 144, 166, 168, 241, 145, 145, + 108, 108, 9, 11, 99, 247, 117, 117, 111, 117, + 182, 29, 30, 37, 59, 60, 74, 250, 109, 101, + 102, 103, 104, 164, 109, 109, 109, 109, 109, 109, + 104, 161, 101, 104, 105, 163, 23, 24, 38, 62, + 73, 96, 100, 110, 118, 150, 152, 172, 186, 189, + 225, 229, 232, 236, 238, 239, 109, 109, 99, 243, + 109, 100, 172, 23, 181, 185, 189, 225, 235, 237, + 239, 240, 241, 27, 39, 251, 111, 255, 144, 115, + 165, 142, 241, 144, 142, 144, 144, 142, 29, 37, + 60, 74, 177, 34, 46, 28, 30, 36, 43, 44, + 45, 47, 49, 58, 75, 76, 190, 192, 195, 197, + 199, 203, 206, 208, 210, 212, 215, 224, 29, 37, + 50, 53, 60, 74, 97, 98, 173, 150, 240, 163, + 111, 150, 144, 117, 247, 99, 112, 23, 24, 61, + 68, 252, 23, 258, 109, 100, 166, 167, 169, 109, + 110, 143, 150, 238, 109, 109, 61, 68, 254, 255, + 111, 111, 111, 64, 29, 56, 207, 111, 25, 27, + 39, 196, 253, 111, 253, 48, 51, 52, 55, 63, + 81, 219, 26, 70, 211, 111, 257, 255, 66, 254, + 111, 255, 111, 111, 175, 163, 109, 119, 23, 153, + 154, 155, 159, 109, 109, 249, 117, 183, 112, 144, + 116, 116, 163, 142, 143, 104, 162, 83, 139, 144, + 23, 233, 23, 234, 23, 209, 23, 202, 67, 202, + 25, 31, 33, 69, 71, 191, 201, 111, 23, 220, + 221, 111, 255, 41, 42, 82, 216, 217, 23, 260, + 29, 200, 35, 54, 204, 111, 23, 176, 23, 174, + 176, 110, 240, 112, 104, 160, 147, 148, 241, 144, + 118, 110, 111, 256, 109, 109, 112, 112, 112, 112, + 112, 23, 223, 23, 222, 112, 77, 78, 79, 80, + 205, 23, 218, 112, 112, 112, 109, 119, 113, 114, + 156, 109, 23, 149, 262, 109, 62, 73, 184, 187, + 188, 189, 226, 227, 230, 235, 23, 259, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 140, 144, 57, 26, 40, 60, 72, 193, 201, 253, + 112, 112, 112, 240, 23, 157, 23, 158, 148, 144, + 34, 46, 213, 215, 109, 119, 112, 32, 194, 198, + 201, 109, 119, 109, 109, 111, 111, 66, 214, 187, + 240, 148, 139, 228, 233, 231, 234, 111, 119, 109, + 109, 112, 106, 112, 106, 218, 148, 140, 233, 234, + 106, 218, 112 }; #define yyerrok (yyerrstatus = 0) @@ -2104,7 +2119,7 @@ yyreduce: case 3: /* Line 1455 of yacc.c */ -#line 270 "program_parse.y" +#line 272 "program_parse.y" { if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) { yyerror(& (yylsp[(1) - (1)]), state, "invalid fragment program header"); @@ -2117,7 +2132,7 @@ yyreduce: case 4: /* Line 1455 of yacc.c */ -#line 278 "program_parse.y" +#line 280 "program_parse.y" { if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex program header"); @@ -2132,7 +2147,7 @@ yyreduce: case 7: /* Line 1455 of yacc.c */ -#line 294 "program_parse.y" +#line 296 "program_parse.y" { int valid = 0; @@ -2157,7 +2172,7 @@ yyreduce: case 10: /* Line 1455 of yacc.c */ -#line 320 "program_parse.y" +#line 322 "program_parse.y" { if ((yyvsp[(1) - (2)].inst) != NULL) { if (state->inst_tail == NULL) { @@ -2177,7 +2192,7 @@ yyreduce: case 12: /* Line 1455 of yacc.c */ -#line 338 "program_parse.y" +#line 340 "program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); state->prog->NumAluInstructions++; @@ -2187,7 +2202,7 @@ yyreduce: case 13: /* Line 1455 of yacc.c */ -#line 343 "program_parse.y" +#line 345 "program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); state->prog->NumTexInstructions++; @@ -2197,7 +2212,7 @@ yyreduce: case 24: /* Line 1455 of yacc.c */ -#line 364 "program_parse.y" +#line 366 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2206,7 +2221,7 @@ yyreduce: case 25: /* Line 1455 of yacc.c */ -#line 370 "program_parse.y" +#line 372 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2215,7 +2230,7 @@ yyreduce: case 26: /* Line 1455 of yacc.c */ -#line 376 "program_parse.y" +#line 378 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2224,7 +2239,7 @@ yyreduce: case 27: /* Line 1455 of yacc.c */ -#line 382 "program_parse.y" +#line 384 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); ;} @@ -2233,7 +2248,7 @@ yyreduce: case 28: /* Line 1455 of yacc.c */ -#line 389 "program_parse.y" +#line 391 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); ;} @@ -2242,7 +2257,7 @@ yyreduce: case 29: /* Line 1455 of yacc.c */ -#line 396 "program_parse.y" +#line 398 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg)); ;} @@ -2251,7 +2266,7 @@ yyreduce: case 30: /* Line 1455 of yacc.c */ -#line 402 "program_parse.y" +#line 404 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL); if ((yyval.inst) != NULL) { @@ -2298,7 +2313,7 @@ yyreduce: case 31: /* Line 1455 of yacc.c */ -#line 446 "program_parse.y" +#line 448 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL); state->fragment.UsesKill = 1; @@ -2309,6 +2324,19 @@ yyreduce: /* Line 1455 of yacc.c */ #line 453 "program_parse.y" + { + (yyval.inst) = asm_instruction_ctor(OPCODE_KIL_NV, NULL, NULL, NULL, NULL); + (yyval.inst)->Base.DstReg.CondMask = (yyvsp[(2) - (2)].dst_reg).CondMask; + (yyval.inst)->Base.DstReg.CondSwizzle = (yyvsp[(2) - (2)].dst_reg).CondSwizzle; + (yyval.inst)->Base.DstReg.CondSrc = (yyvsp[(2) - (2)].dst_reg).CondSrc; + state->fragment.UsesKill = 1; + ;} + break; + + case 33: + +/* Line 1455 of yacc.c */ +#line 463 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg)); if ((yyval.inst) != NULL) { @@ -2352,103 +2380,103 @@ yyreduce: ;} break; - case 33: + case 34: /* Line 1455 of yacc.c */ -#line 497 "program_parse.y" +#line 507 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 34: + case 35: /* Line 1455 of yacc.c */ -#line 502 "program_parse.y" +#line 512 "program_parse.y" { (yyval.integer) = TEXTURE_1D_INDEX; ;} break; - case 35: + case 36: /* Line 1455 of yacc.c */ -#line 503 "program_parse.y" +#line 513 "program_parse.y" { (yyval.integer) = TEXTURE_2D_INDEX; ;} break; - case 36: + case 37: /* Line 1455 of yacc.c */ -#line 504 "program_parse.y" +#line 514 "program_parse.y" { (yyval.integer) = TEXTURE_3D_INDEX; ;} break; - case 37: + case 38: /* Line 1455 of yacc.c */ -#line 505 "program_parse.y" +#line 515 "program_parse.y" { (yyval.integer) = TEXTURE_CUBE_INDEX; ;} break; - case 38: + case 39: /* Line 1455 of yacc.c */ -#line 506 "program_parse.y" +#line 516 "program_parse.y" { (yyval.integer) = TEXTURE_RECT_INDEX; ;} break; - case 39: + case 40: /* Line 1455 of yacc.c */ -#line 507 "program_parse.y" +#line 517 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_INDEX; ;} break; - case 40: + case 41: /* Line 1455 of yacc.c */ -#line 508 "program_parse.y" +#line 518 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_INDEX; ;} break; - case 41: + case 42: /* Line 1455 of yacc.c */ -#line 509 "program_parse.y" +#line 519 "program_parse.y" { (yyval.integer) = -TEXTURE_RECT_INDEX; ;} break; - case 42: + case 43: /* Line 1455 of yacc.c */ -#line 510 "program_parse.y" +#line 520 "program_parse.y" { (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;} break; - case 43: + case 44: /* Line 1455 of yacc.c */ -#line 511 "program_parse.y" +#line 521 "program_parse.y" { (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;} break; - case 44: + case 45: /* Line 1455 of yacc.c */ -#line 512 "program_parse.y" +#line 522 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;} break; - case 45: + case 46: /* Line 1455 of yacc.c */ -#line 513 "program_parse.y" +#line 523 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;} break; - case 46: + case 47: /* Line 1455 of yacc.c */ -#line 517 "program_parse.y" +#line 527 "program_parse.y" { /* FIXME: Is this correct? Should the extenedSwizzle be applied * FIXME: to the existing swizzle? @@ -2460,10 +2488,10 @@ yyreduce: ;} break; - case 47: + case 48: /* Line 1455 of yacc.c */ -#line 529 "program_parse.y" +#line 539 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (2)].src_reg); @@ -2473,10 +2501,10 @@ yyreduce: ;} break; - case 48: + case 49: /* Line 1455 of yacc.c */ -#line 537 "program_parse.y" +#line 547 "program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (4)].src_reg); @@ -2493,10 +2521,10 @@ yyreduce: ;} break; - case 49: + case 50: /* Line 1455 of yacc.c */ -#line 554 "program_parse.y" +#line 564 "program_parse.y" { (yyval.src_reg) = (yyvsp[(1) - (2)].src_reg); @@ -2505,10 +2533,10 @@ yyreduce: ;} break; - case 50: + case 51: /* Line 1455 of yacc.c */ -#line 561 "program_parse.y" +#line 571 "program_parse.y" { struct asm_symbol temp_sym; @@ -2527,10 +2555,10 @@ yyreduce: ;} break; - case 51: + case 52: /* Line 1455 of yacc.c */ -#line 580 "program_parse.y" +#line 590 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2543,10 +2571,10 @@ yyreduce: ;} break; - case 52: + case 53: /* Line 1455 of yacc.c */ -#line 591 "program_parse.y" +#line 601 "program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (5)].src_reg); @@ -2565,13 +2593,16 @@ yyreduce: ;} break; - case 53: + case 54: /* Line 1455 of yacc.c */ -#line 611 "program_parse.y" +#line 621 "program_parse.y" { - (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); - (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask; + (yyval.dst_reg) = (yyvsp[(1) - (3)].dst_reg); + (yyval.dst_reg).WriteMask = (yyvsp[(2) - (3)].swiz_mask).mask; + (yyval.dst_reg).CondMask = (yyvsp[(3) - (3)].dst_reg).CondMask; + (yyval.dst_reg).CondSwizzle = (yyvsp[(3) - (3)].dst_reg).CondSwizzle; + (yyval.dst_reg).CondSrc = (yyvsp[(3) - (3)].dst_reg).CondSrc; if ((yyval.dst_reg).File == PROGRAM_OUTPUT) { /* Technically speaking, this should check that it is in @@ -2580,7 +2611,7 @@ yyreduce: */ if (state->option.PositionInvariant && ((yyval.dst_reg).Index == VERT_RESULT_HPOS)) { - yyerror(& (yylsp[(1) - (2)]), state, "position-invariant programs cannot " + yyerror(& (yylsp[(1) - (3)]), state, "position-invariant programs cannot " "write position"); YYERROR; } @@ -2590,10 +2621,10 @@ yyreduce: ;} break; - case 54: + case 55: /* Line 1455 of yacc.c */ -#line 633 "program_parse.y" +#line 646 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_ADDRESS; @@ -2602,10 +2633,10 @@ yyreduce: ;} break; - case 55: + case 56: /* Line 1455 of yacc.c */ -#line 642 "program_parse.y" +#line 655 "program_parse.y" { const unsigned xyzw_valid = ((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0) @@ -2638,20 +2669,20 @@ yyreduce: ;} break; - case 56: + case 57: /* Line 1455 of yacc.c */ -#line 675 "program_parse.y" +#line 688 "program_parse.y" { (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); (yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0; ;} break; - case 57: + case 58: /* Line 1455 of yacc.c */ -#line 682 "program_parse.y" +#line 695 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2668,10 +2699,10 @@ yyreduce: ;} break; - case 58: + case 59: /* Line 1455 of yacc.c */ -#line 697 "program_parse.y" +#line 710 "program_parse.y" { if (strlen((yyvsp[(1) - (1)].string)) > 1) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2721,10 +2752,10 @@ yyreduce: ;} break; - case 59: + case 60: /* Line 1455 of yacc.c */ -#line 747 "program_parse.y" +#line 760 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2768,10 +2799,10 @@ yyreduce: ;} break; - case 60: + case 61: /* Line 1455 of yacc.c */ -#line 789 "program_parse.y" +#line 802 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = PROGRAM_INPUT; @@ -2784,10 +2815,10 @@ yyreduce: ;} break; - case 61: + case 62: /* Line 1455 of yacc.c */ -#line 800 "program_parse.y" +#line 813 "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)) { @@ -2810,10 +2841,10 @@ yyreduce: ;} break; - case 62: + case 63: /* Line 1455 of yacc.c */ -#line 821 "program_parse.y" +#line 834 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.File = ((yyvsp[(1) - (1)].temp_sym).name != NULL) @@ -2823,10 +2854,10 @@ yyreduce: ;} break; - case 63: + case 64: /* Line 1455 of yacc.c */ -#line 831 "program_parse.y" +#line 844 "program_parse.y" { init_dst_reg(& (yyval.dst_reg)); (yyval.dst_reg).File = PROGRAM_OUTPUT; @@ -2834,10 +2865,10 @@ yyreduce: ;} break; - case 64: + case 65: /* Line 1455 of yacc.c */ -#line 837 "program_parse.y" +#line 850 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2868,10 +2899,10 @@ yyreduce: ;} break; - case 65: + case 66: /* Line 1455 of yacc.c */ -#line 868 "program_parse.y" +#line 881 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2888,20 +2919,20 @@ yyreduce: ;} break; - case 68: + case 69: /* Line 1455 of yacc.c */ -#line 887 "program_parse.y" +#line 900 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer); ;} break; - case 69: + case 70: /* Line 1455 of yacc.c */ -#line 894 "program_parse.y" +#line 907 "program_parse.y" { /* FINISHME: Add support for multiple address registers. */ @@ -2913,31 +2944,31 @@ yyreduce: ;} break; - case 70: + case 71: /* Line 1455 of yacc.c */ -#line 905 "program_parse.y" +#line 918 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 71: + case 72: /* Line 1455 of yacc.c */ -#line 906 "program_parse.y" +#line 919 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 72: + case 73: /* Line 1455 of yacc.c */ -#line 907 "program_parse.y" +#line 920 "program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; - case 73: + case 74: /* Line 1455 of yacc.c */ -#line 911 "program_parse.y" +#line 924 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2949,10 +2980,10 @@ yyreduce: ;} break; - case 74: + case 75: /* Line 1455 of yacc.c */ -#line 923 "program_parse.y" +#line 936 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) { yyerror(& (yylsp[(1) - (1)]), state, @@ -2964,10 +2995,10 @@ yyreduce: ;} break; - case 75: + case 76: /* Line 1455 of yacc.c */ -#line 935 "program_parse.y" +#line 948 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2985,10 +3016,10 @@ yyreduce: ;} break; - case 76: + case 77: /* Line 1455 of yacc.c */ -#line 953 "program_parse.y" +#line 966 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); @@ -2999,10 +3030,10 @@ yyreduce: ;} break; - case 77: + case 78: /* Line 1455 of yacc.c */ -#line 964 "program_parse.y" +#line 977 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, @@ -3014,24 +3045,125 @@ yyreduce: ;} break; - case 82: + case 83: /* Line 1455 of yacc.c */ -#line 980 "program_parse.y" +#line 993 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; - case 87: + case 88: /* Line 1455 of yacc.c */ -#line 984 "program_parse.y" +#line 997 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; + case 89: + +/* Line 1455 of yacc.c */ +#line 1001 "program_parse.y" + { + (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); + ;} + break; + + case 90: + +/* Line 1455 of yacc.c */ +#line 1005 "program_parse.y" + { + (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); + ;} + break; + + case 91: + +/* Line 1455 of yacc.c */ +#line 1009 "program_parse.y" + { + (yyval.dst_reg).CondMask = COND_TR; + (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP; + (yyval.dst_reg).CondSrc = 0; + ;} + break; + + case 92: + +/* Line 1455 of yacc.c */ +#line 1017 "program_parse.y" + { + (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); + (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle; + ;} + break; + + case 93: + +/* Line 1455 of yacc.c */ +#line 1024 "program_parse.y" + { + (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); + (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle; + ;} + break; + case 94: /* Line 1455 of yacc.c */ -#line 996 "program_parse.y" +#line 1031 "program_parse.y" + { + const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); + if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) { + char *const err_str = + make_error_string("invalid condition code \"%s\"", (yyvsp[(1) - (1)].string)); + + yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL) + ? err_str : "invalid condition code"); + + if (err_str != NULL) { + _mesa_free(err_str); + } + + YYERROR; + } + + (yyval.dst_reg).CondMask = cond; + (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP; + (yyval.dst_reg).CondSrc = 0; + ;} + break; + + case 95: + +/* Line 1455 of yacc.c */ +#line 1054 "program_parse.y" + { + const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); + if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) { + char *const err_str = + make_error_string("invalid condition code \"%s\"", (yyvsp[(1) - (1)].string)); + + yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL) + ? err_str : "invalid condition code"); + + if (err_str != NULL) { + _mesa_free(err_str); + } + + YYERROR; + } + + (yyval.dst_reg).CondMask = cond; + (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP; + (yyval.dst_reg).CondSrc = 0; + ;} + break; + + case 102: + +/* Line 1455 of yacc.c */ +#line 1085 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); @@ -3049,55 +3181,55 @@ yyreduce: ;} break; - case 95: + case 103: /* Line 1455 of yacc.c */ -#line 1014 "program_parse.y" +#line 1103 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} break; - case 96: + case 104: /* Line 1455 of yacc.c */ -#line 1018 "program_parse.y" +#line 1107 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} break; - case 97: + case 105: /* Line 1455 of yacc.c */ -#line 1024 "program_parse.y" +#line 1113 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; ;} break; - case 98: + case 106: /* Line 1455 of yacc.c */ -#line 1028 "program_parse.y" +#line 1117 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; ;} break; - case 99: + case 107: /* Line 1455 of yacc.c */ -#line 1032 "program_parse.y" +#line 1121 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; ;} break; - case 100: + case 108: /* Line 1455 of yacc.c */ -#line 1036 "program_parse.y" +#line 1125 "program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); @@ -3108,10 +3240,10 @@ yyreduce: ;} break; - case 101: + case 109: /* Line 1455 of yacc.c */ -#line 1045 "program_parse.y" +#line 1134 "program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); @@ -3122,38 +3254,38 @@ yyreduce: ;} break; - case 102: + case 110: /* Line 1455 of yacc.c */ -#line 1054 "program_parse.y" +#line 1143 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} break; - case 103: + case 111: /* Line 1455 of yacc.c */ -#line 1058 "program_parse.y" +#line 1147 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; ;} break; - case 104: + case 112: /* Line 1455 of yacc.c */ -#line 1063 "program_parse.y" +#line 1152 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); ;} break; - case 105: + case 113: /* Line 1455 of yacc.c */ -#line 1069 "program_parse.y" +#line 1158 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); @@ -3164,46 +3296,46 @@ yyreduce: ;} break; - case 109: + case 117: /* Line 1455 of yacc.c */ -#line 1083 "program_parse.y" +#line 1172 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; ;} break; - case 110: + case 118: /* Line 1455 of yacc.c */ -#line 1087 "program_parse.y" +#line 1176 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); ;} break; - case 111: + case 119: /* Line 1455 of yacc.c */ -#line 1091 "program_parse.y" +#line 1180 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; ;} break; - case 112: + case 120: /* Line 1455 of yacc.c */ -#line 1095 "program_parse.y" +#line 1184 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} break; - case 115: + case 123: /* Line 1455 of yacc.c */ -#line 1103 "program_parse.y" +#line 1192 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); @@ -3219,10 +3351,10 @@ yyreduce: ;} break; - case 116: + case 124: /* Line 1455 of yacc.c */ -#line 1119 "program_parse.y" +#line 1208 "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, @@ -3244,19 +3376,19 @@ yyreduce: ;} break; - case 117: + case 125: /* Line 1455 of yacc.c */ -#line 1141 "program_parse.y" +#line 1230 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 118: + case 126: /* Line 1455 of yacc.c */ -#line 1145 "program_parse.y" +#line 1234 "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"); @@ -3267,38 +3399,38 @@ yyreduce: ;} break; - case 119: + case 127: /* Line 1455 of yacc.c */ -#line 1156 "program_parse.y" +#line 1245 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); ;} break; - case 120: + case 128: /* Line 1455 of yacc.c */ -#line 1162 "program_parse.y" +#line 1251 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); ;} break; - case 122: + case 130: /* Line 1455 of yacc.c */ -#line 1169 "program_parse.y" +#line 1258 "program_parse.y" { (yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length; (yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym); ;} break; - case 123: + case 131: /* Line 1455 of yacc.c */ -#line 1176 "program_parse.y" +#line 1265 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3306,10 +3438,10 @@ yyreduce: ;} break; - case 124: + case 132: /* Line 1455 of yacc.c */ -#line 1182 "program_parse.y" +#line 1271 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3317,10 +3449,10 @@ yyreduce: ;} break; - case 125: + case 133: /* Line 1455 of yacc.c */ -#line 1188 "program_parse.y" +#line 1277 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3328,10 +3460,10 @@ yyreduce: ;} break; - case 126: + case 134: /* Line 1455 of yacc.c */ -#line 1196 "program_parse.y" +#line 1285 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3339,10 +3471,10 @@ yyreduce: ;} break; - case 127: + case 135: /* Line 1455 of yacc.c */ -#line 1202 "program_parse.y" +#line 1291 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3350,10 +3482,10 @@ yyreduce: ;} break; - case 128: + case 136: /* Line 1455 of yacc.c */ -#line 1208 "program_parse.y" +#line 1297 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3361,10 +3493,10 @@ yyreduce: ;} break; - case 129: + case 137: /* Line 1455 of yacc.c */ -#line 1216 "program_parse.y" +#line 1305 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3372,10 +3504,10 @@ yyreduce: ;} break; - case 130: + case 138: /* Line 1455 of yacc.c */ -#line 1222 "program_parse.y" +#line 1311 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3383,10 +3515,10 @@ yyreduce: ;} break; - case 131: + case 139: /* Line 1455 of yacc.c */ -#line 1228 "program_parse.y" +#line 1317 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3394,101 +3526,101 @@ yyreduce: ;} break; - case 132: + case 140: /* Line 1455 of yacc.c */ -#line 1235 "program_parse.y" +#line 1324 "program_parse.y" { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; - case 133: + case 141: /* Line 1455 of yacc.c */ -#line 1236 "program_parse.y" +#line 1325 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 134: + case 142: /* Line 1455 of yacc.c */ -#line 1239 "program_parse.y" +#line 1328 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 135: + case 143: /* Line 1455 of yacc.c */ -#line 1240 "program_parse.y" +#line 1329 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 136: + case 144: /* Line 1455 of yacc.c */ -#line 1241 "program_parse.y" +#line 1330 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 137: + case 145: /* Line 1455 of yacc.c */ -#line 1242 "program_parse.y" +#line 1331 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 138: + case 146: /* Line 1455 of yacc.c */ -#line 1243 "program_parse.y" +#line 1332 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 139: + case 147: /* Line 1455 of yacc.c */ -#line 1244 "program_parse.y" +#line 1333 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 140: + case 148: /* Line 1455 of yacc.c */ -#line 1245 "program_parse.y" +#line 1334 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 141: + case 149: /* Line 1455 of yacc.c */ -#line 1246 "program_parse.y" +#line 1335 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 142: + case 150: /* Line 1455 of yacc.c */ -#line 1247 "program_parse.y" +#line 1336 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 143: + case 151: /* Line 1455 of yacc.c */ -#line 1248 "program_parse.y" +#line 1337 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 144: + case 152: /* Line 1455 of yacc.c */ -#line 1249 "program_parse.y" +#line 1338 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; - case 145: + case 153: /* Line 1455 of yacc.c */ -#line 1253 "program_parse.y" +#line 1342 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3497,37 +3629,37 @@ yyreduce: ;} break; - case 146: + case 154: /* Line 1455 of yacc.c */ -#line 1262 "program_parse.y" +#line 1351 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 147: + case 155: /* Line 1455 of yacc.c */ -#line 1266 "program_parse.y" +#line 1355 "program_parse.y" { (yyval.integer) = STATE_EMISSION; ;} break; - case 148: + case 156: /* Line 1455 of yacc.c */ -#line 1270 "program_parse.y" +#line 1359 "program_parse.y" { (yyval.integer) = STATE_SHININESS; ;} break; - case 149: + case 157: /* Line 1455 of yacc.c */ -#line 1276 "program_parse.y" +#line 1365 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3536,28 +3668,28 @@ yyreduce: ;} break; - case 150: + case 158: /* Line 1455 of yacc.c */ -#line 1285 "program_parse.y" +#line 1374 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 151: + case 159: /* Line 1455 of yacc.c */ -#line 1289 "program_parse.y" +#line 1378 "program_parse.y" { (yyval.integer) = STATE_POSITION; ;} break; - case 152: + case 160: /* Line 1455 of yacc.c */ -#line 1293 "program_parse.y" +#line 1382 "program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); @@ -3568,57 +3700,57 @@ yyreduce: ;} break; - case 153: + case 161: /* Line 1455 of yacc.c */ -#line 1302 "program_parse.y" +#line 1391 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 154: + case 162: /* Line 1455 of yacc.c */ -#line 1306 "program_parse.y" +#line 1395 "program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; ;} break; - case 155: + case 163: /* Line 1455 of yacc.c */ -#line 1312 "program_parse.y" +#line 1401 "program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; ;} break; - case 156: + case 164: /* Line 1455 of yacc.c */ -#line 1318 "program_parse.y" +#line 1407 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; ;} break; - case 157: + case 165: /* Line 1455 of yacc.c */ -#line 1325 "program_parse.y" +#line 1414 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; ;} break; - case 158: + case 166: /* Line 1455 of yacc.c */ -#line 1330 "program_parse.y" +#line 1419 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3626,10 +3758,10 @@ yyreduce: ;} break; - case 159: + case 167: /* Line 1455 of yacc.c */ -#line 1338 "program_parse.y" +#line 1427 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3639,10 +3771,10 @@ yyreduce: ;} break; - case 161: + case 169: /* Line 1455 of yacc.c */ -#line 1350 "program_parse.y" +#line 1439 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(3) - (3)].integer); @@ -3650,46 +3782,46 @@ yyreduce: ;} break; - case 162: + case 170: /* Line 1455 of yacc.c */ -#line 1358 "program_parse.y" +#line 1447 "program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; ;} break; - case 163: + case 171: /* Line 1455 of yacc.c */ -#line 1364 "program_parse.y" +#line 1453 "program_parse.y" { (yyval.integer) = STATE_AMBIENT; ;} break; - case 164: + case 172: /* Line 1455 of yacc.c */ -#line 1368 "program_parse.y" +#line 1457 "program_parse.y" { (yyval.integer) = STATE_DIFFUSE; ;} break; - case 165: + case 173: /* Line 1455 of yacc.c */ -#line 1372 "program_parse.y" +#line 1461 "program_parse.y" { (yyval.integer) = STATE_SPECULAR; ;} break; - case 166: + case 174: /* Line 1455 of yacc.c */ -#line 1378 "program_parse.y" +#line 1467 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); @@ -3700,10 +3832,10 @@ yyreduce: ;} break; - case 167: + case 175: /* Line 1455 of yacc.c */ -#line 1389 "program_parse.y" +#line 1478 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3712,92 +3844,92 @@ yyreduce: ;} break; - case 168: + case 176: /* Line 1455 of yacc.c */ -#line 1398 "program_parse.y" +#line 1487 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; ;} break; - case 169: + case 177: /* Line 1455 of yacc.c */ -#line 1402 "program_parse.y" +#line 1491 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; ;} break; - case 170: + case 178: /* Line 1455 of yacc.c */ -#line 1407 "program_parse.y" +#line 1496 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; ;} break; - case 171: + case 179: /* Line 1455 of yacc.c */ -#line 1411 "program_parse.y" +#line 1500 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; ;} break; - case 172: + case 180: /* Line 1455 of yacc.c */ -#line 1415 "program_parse.y" +#line 1504 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; ;} break; - case 173: + case 181: /* Line 1455 of yacc.c */ -#line 1419 "program_parse.y" +#line 1508 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; ;} break; - case 174: + case 182: /* Line 1455 of yacc.c */ -#line 1425 "program_parse.y" +#line 1514 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); ;} break; - case 175: + case 183: /* Line 1455 of yacc.c */ -#line 1432 "program_parse.y" +#line 1521 "program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; ;} break; - case 176: + case 184: /* Line 1455 of yacc.c */ -#line 1436 "program_parse.y" +#line 1525 "program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; ;} break; - case 177: + case 185: /* Line 1455 of yacc.c */ -#line 1442 "program_parse.y" +#line 1531 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3805,10 +3937,10 @@ yyreduce: ;} break; - case 178: + case 186: /* Line 1455 of yacc.c */ -#line 1450 "program_parse.y" +#line 1539 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); @@ -3819,38 +3951,38 @@ yyreduce: ;} break; - case 179: + case 187: /* Line 1455 of yacc.c */ -#line 1461 "program_parse.y" +#line 1550 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); ;} break; - case 180: + case 188: /* Line 1455 of yacc.c */ -#line 1468 "program_parse.y" +#line 1557 "program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; ;} break; - case 181: + case 189: /* Line 1455 of yacc.c */ -#line 1472 "program_parse.y" +#line 1561 "program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; ;} break; - case 182: + case 190: /* Line 1455 of yacc.c */ -#line 1478 "program_parse.y" +#line 1567 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; @@ -3860,10 +3992,10 @@ yyreduce: ;} break; - case 183: + case 191: /* Line 1455 of yacc.c */ -#line 1488 "program_parse.y" +#line 1577 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; @@ -3873,20 +4005,20 @@ yyreduce: ;} break; - case 184: + case 192: /* Line 1455 of yacc.c */ -#line 1498 "program_parse.y" +#line 1587 "program_parse.y" { (yyval.state)[2] = 0; (yyval.state)[3] = 3; ;} break; - case 185: + case 193: /* Line 1455 of yacc.c */ -#line 1503 "program_parse.y" +#line 1592 "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). @@ -3904,10 +4036,10 @@ yyreduce: ;} break; - case 186: + case 194: /* Line 1455 of yacc.c */ -#line 1521 "program_parse.y" +#line 1610 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; @@ -3915,55 +4047,55 @@ yyreduce: ;} break; - case 187: + case 195: /* Line 1455 of yacc.c */ -#line 1529 "program_parse.y" +#line 1618 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 188: + case 196: /* Line 1455 of yacc.c */ -#line 1533 "program_parse.y" +#line 1622 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 189: + case 197: /* Line 1455 of yacc.c */ -#line 1539 "program_parse.y" +#line 1628 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; ;} break; - case 190: + case 198: /* Line 1455 of yacc.c */ -#line 1543 "program_parse.y" +#line 1632 "program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; ;} break; - case 191: + case 199: /* Line 1455 of yacc.c */ -#line 1547 "program_parse.y" +#line 1636 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; ;} break; - case 192: + case 200: /* Line 1455 of yacc.c */ -#line 1553 "program_parse.y" +#line 1642 "program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); @@ -3974,88 +4106,88 @@ yyreduce: ;} break; - case 193: + case 201: /* Line 1455 of yacc.c */ -#line 1564 "program_parse.y" +#line 1653 "program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); ;} break; - case 194: + case 202: /* Line 1455 of yacc.c */ -#line 1569 "program_parse.y" +#line 1658 "program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; ;} break; - case 195: + case 203: /* Line 1455 of yacc.c */ -#line 1574 "program_parse.y" +#line 1663 "program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; ;} break; - case 196: + case 204: /* Line 1455 of yacc.c */ -#line 1579 "program_parse.y" +#line 1668 "program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); ;} break; - case 197: + case 205: /* Line 1455 of yacc.c */ -#line 1584 "program_parse.y" +#line 1673 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; ;} break; - case 198: + case 206: /* Line 1455 of yacc.c */ -#line 1589 "program_parse.y" +#line 1678 "program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[(3) - (4)].integer); ;} break; - case 199: + case 207: /* Line 1455 of yacc.c */ -#line 1596 "program_parse.y" +#line 1685 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 200: + case 208: /* Line 1455 of yacc.c */ -#line 1600 "program_parse.y" +#line 1689 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 201: + case 209: /* Line 1455 of yacc.c */ -#line 1605 "program_parse.y" +#line 1694 "program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -4069,10 +4201,10 @@ yyreduce: ;} break; - case 202: + case 210: /* Line 1455 of yacc.c */ -#line 1618 "program_parse.y" +#line 1707 "program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -4081,10 +4213,10 @@ yyreduce: ;} break; - case 203: + case 211: /* Line 1455 of yacc.c */ -#line 1626 "program_parse.y" +#line 1715 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); @@ -4095,20 +4227,20 @@ yyreduce: ;} break; - case 204: + case 212: /* Line 1455 of yacc.c */ -#line 1637 "program_parse.y" +#line 1726 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; ;} break; - case 209: + case 217: /* Line 1455 of yacc.c */ -#line 1649 "program_parse.y" +#line 1738 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4118,30 +4250,30 @@ yyreduce: ;} break; - case 210: + case 218: /* Line 1455 of yacc.c */ -#line 1659 "program_parse.y" +#line 1748 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); ;} break; - case 211: + case 219: /* Line 1455 of yacc.c */ -#line 1664 "program_parse.y" +#line 1753 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); ;} break; - case 212: + case 220: /* Line 1455 of yacc.c */ -#line 1671 "program_parse.y" +#line 1760 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4151,10 +4283,10 @@ yyreduce: ;} break; - case 213: + case 221: /* Line 1455 of yacc.c */ -#line 1681 "program_parse.y" +#line 1770 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4164,30 +4296,30 @@ yyreduce: ;} break; - case 214: + case 222: /* Line 1455 of yacc.c */ -#line 1690 "program_parse.y" +#line 1779 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); ;} break; - case 215: + case 223: /* Line 1455 of yacc.c */ -#line 1695 "program_parse.y" +#line 1784 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); ;} break; - case 216: + case 224: /* Line 1455 of yacc.c */ -#line 1702 "program_parse.y" +#line 1791 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4197,10 +4329,10 @@ yyreduce: ;} break; - case 217: + case 225: /* Line 1455 of yacc.c */ -#line 1712 "program_parse.y" +#line 1801 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); @@ -4210,10 +4342,10 @@ yyreduce: ;} break; - case 218: + case 226: /* Line 1455 of yacc.c */ -#line 1722 "program_parse.y" +#line 1811 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); @@ -4223,10 +4355,10 @@ yyreduce: ;} break; - case 223: + case 231: /* Line 1455 of yacc.c */ -#line 1737 "program_parse.y" +#line 1826 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4236,10 +4368,10 @@ yyreduce: ;} break; - case 224: + case 232: /* Line 1455 of yacc.c */ -#line 1747 "program_parse.y" +#line 1836 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4249,10 +4381,10 @@ yyreduce: ;} break; - case 225: + case 233: /* Line 1455 of yacc.c */ -#line 1755 "program_parse.y" +#line 1844 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer); @@ -4262,10 +4394,10 @@ yyreduce: ;} break; - case 226: + case 234: /* Line 1455 of yacc.c */ -#line 1765 "program_parse.y" +#line 1854 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (3)].real); @@ -4275,10 +4407,10 @@ yyreduce: ;} break; - case 227: + case 235: /* Line 1455 of yacc.c */ -#line 1773 "program_parse.y" +#line 1862 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (5)].real); @@ -4288,10 +4420,10 @@ yyreduce: ;} break; - case 228: + case 236: /* Line 1455 of yacc.c */ -#line 1782 "program_parse.y" +#line 1871 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (7)].real); @@ -4301,10 +4433,10 @@ yyreduce: ;} break; - case 229: + case 237: /* Line 1455 of yacc.c */ -#line 1791 "program_parse.y" +#line 1880 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (9)].real); @@ -4314,56 +4446,56 @@ yyreduce: ;} break; - case 230: + case 238: /* Line 1455 of yacc.c */ -#line 1801 "program_parse.y" +#line 1890 "program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); ;} break; - case 231: + case 239: /* Line 1455 of yacc.c */ -#line 1805 "program_parse.y" +#line 1894 "program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); ;} break; - case 232: + case 240: /* Line 1455 of yacc.c */ -#line 1810 "program_parse.y" +#line 1899 "program_parse.y" { (yyval.negate) = FALSE; ;} break; - case 233: + case 241: /* Line 1455 of yacc.c */ -#line 1811 "program_parse.y" +#line 1900 "program_parse.y" { (yyval.negate) = TRUE; ;} break; - case 234: + case 242: /* Line 1455 of yacc.c */ -#line 1812 "program_parse.y" +#line 1901 "program_parse.y" { (yyval.negate) = FALSE; ;} break; - case 235: + case 243: /* Line 1455 of yacc.c */ -#line 1815 "program_parse.y" +#line 1904 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; - case 237: + case 245: /* Line 1455 of yacc.c */ -#line 1819 "program_parse.y" +#line 1908 "program_parse.y" { /* NV_fragment_program_option defines the size qualifiers in a * fairly broken way. "SHORT" or "LONG" can optionally be used @@ -4399,25 +4531,25 @@ yyreduce: ;} break; - case 238: + case 246: /* Line 1455 of yacc.c */ -#line 1853 "program_parse.y" +#line 1942 "program_parse.y" { ;} break; - case 239: + case 247: /* Line 1455 of yacc.c */ -#line 1857 "program_parse.y" +#line 1946 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; - case 241: + case 249: /* Line 1455 of yacc.c */ -#line 1861 "program_parse.y" +#line 1950 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { YYERROR; @@ -4425,10 +4557,10 @@ yyreduce: ;} break; - case 242: + case 250: /* Line 1455 of yacc.c */ -#line 1867 "program_parse.y" +#line 1956 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { YYERROR; @@ -4436,10 +4568,10 @@ yyreduce: ;} break; - case 243: + case 251: /* Line 1455 of yacc.c */ -#line 1875 "program_parse.y" +#line 1964 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)])); @@ -4452,10 +4584,10 @@ yyreduce: ;} break; - case 244: + case 252: /* Line 1455 of yacc.c */ -#line 1888 "program_parse.y" +#line 1977 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4466,10 +4598,10 @@ yyreduce: ;} break; - case 245: + case 253: /* Line 1455 of yacc.c */ -#line 1897 "program_parse.y" +#line 1986 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4480,19 +4612,19 @@ yyreduce: ;} break; - case 246: + case 254: /* Line 1455 of yacc.c */ -#line 1906 "program_parse.y" +#line 1995 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} break; - case 247: + case 255: /* Line 1455 of yacc.c */ -#line 1910 "program_parse.y" +#line 1999 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4503,10 +4635,10 @@ yyreduce: ;} break; - case 248: + case 256: /* Line 1455 of yacc.c */ -#line 1919 "program_parse.y" +#line 2008 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4517,10 +4649,10 @@ yyreduce: ;} break; - case 249: + case 257: /* Line 1455 of yacc.c */ -#line 1928 "program_parse.y" +#line 2017 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4531,19 +4663,19 @@ yyreduce: ;} break; - case 250: + case 258: /* Line 1455 of yacc.c */ -#line 1939 "program_parse.y" +#line 2028 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} break; - case 251: + case 259: /* Line 1455 of yacc.c */ -#line 1945 "program_parse.y" +#line 2034 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4551,10 +4683,10 @@ yyreduce: ;} break; - case 252: + case 260: /* Line 1455 of yacc.c */ -#line 1951 "program_parse.y" +#line 2040 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4565,10 +4697,10 @@ yyreduce: ;} break; - case 253: + case 261: /* Line 1455 of yacc.c */ -#line 1960 "program_parse.y" +#line 2049 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4579,19 +4711,19 @@ yyreduce: ;} break; - case 254: + case 262: /* Line 1455 of yacc.c */ -#line 1971 "program_parse.y" +#line 2060 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 255: + case 263: /* Line 1455 of yacc.c */ -#line 1975 "program_parse.y" +#line 2064 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4602,10 +4734,10 @@ yyreduce: ;} break; - case 256: + case 264: /* Line 1455 of yacc.c */ -#line 1984 "program_parse.y" +#line 2073 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4616,94 +4748,94 @@ yyreduce: ;} break; - case 257: + case 265: /* Line 1455 of yacc.c */ -#line 1994 "program_parse.y" +#line 2083 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 258: + case 266: /* Line 1455 of yacc.c */ -#line 1995 "program_parse.y" +#line 2084 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 259: + case 267: /* Line 1455 of yacc.c */ -#line 1996 "program_parse.y" +#line 2085 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 260: + case 268: /* Line 1455 of yacc.c */ -#line 1999 "program_parse.y" +#line 2088 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 261: + case 269: /* Line 1455 of yacc.c */ -#line 2000 "program_parse.y" +#line 2089 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 262: + case 270: /* Line 1455 of yacc.c */ -#line 2001 "program_parse.y" +#line 2090 "program_parse.y" { (yyval.integer) = 1; ;} break; - case 263: + case 271: /* Line 1455 of yacc.c */ -#line 2004 "program_parse.y" +#line 2093 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 264: + case 272: /* Line 1455 of yacc.c */ -#line 2005 "program_parse.y" +#line 2094 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 265: + case 273: /* Line 1455 of yacc.c */ -#line 2008 "program_parse.y" +#line 2097 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 266: + case 274: /* Line 1455 of yacc.c */ -#line 2009 "program_parse.y" +#line 2098 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 267: + case 275: /* Line 1455 of yacc.c */ -#line 2012 "program_parse.y" +#line 2101 "program_parse.y" { (yyval.integer) = 0; ;} break; - case 268: + case 276: /* Line 1455 of yacc.c */ -#line 2013 "program_parse.y" +#line 2102 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; - case 269: + case 277: /* Line 1455 of yacc.c */ -#line 2017 "program_parse.y" +#line 2106 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4714,10 +4846,10 @@ yyreduce: ;} break; - case 270: + case 278: /* Line 1455 of yacc.c */ -#line 2028 "program_parse.y" +#line 2117 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4728,10 +4860,10 @@ yyreduce: ;} break; - case 271: + case 279: /* Line 1455 of yacc.c */ -#line 2039 "program_parse.y" +#line 2128 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4742,10 +4874,10 @@ yyreduce: ;} break; - case 272: + case 280: /* Line 1455 of yacc.c */ -#line 2050 "program_parse.y" +#line 2139 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4769,7 +4901,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4773 "program_parse.tab.c" +#line 4905 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4988,7 +5120,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 2074 "program_parse.y" +#line 2163 "program_parse.y" void @@ -5007,8 +5139,15 @@ asm_instruction_set_operands(struct asm_instruction *inst, inst->Base.DstReg = *dst; } - inst->Base.SrcReg[0] = src0->Base; - inst->SrcReg[0] = *src0; + /* The only instruction that doesn't have any source registers is the + * condition-code based KIL instruction added by NV_fragment_program_option. + */ + if (src0 != NULL) { + inst->Base.SrcReg[0] = src0->Base; + inst->SrcReg[0] = *src0; + } else { + init_src_reg(& inst->SrcReg[0]); + } if (src1 != NULL) { inst->Base.SrcReg[1] = src1->Base; diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index d6bac07081c..3021ae83f36 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -202,6 +202,8 @@ static struct asm_instruction *asm_instruction_copy_ctor( %type addrReg %type addrComponent addrWriteMask +%type ccMaskRule ccTest ccMaskRule2 ccTest2 optionalCcMask + %type resultBinding resultColBinding %type optFaceType optColorType %type optResultFaceType optResultColorType @@ -447,6 +449,14 @@ KIL_instruction: KIL swizzleSrcReg $$ = asm_instruction_ctor(OPCODE_KIL, NULL, & $2, NULL, NULL); state->fragment.UsesKill = 1; } + | KIL ccTest + { + $$ = asm_instruction_ctor(OPCODE_KIL_NV, NULL, NULL, NULL, NULL); + $$->Base.DstReg.CondMask = $2.CondMask; + $$->Base.DstReg.CondSwizzle = $2.CondSwizzle; + $$->Base.DstReg.CondSrc = $2.CondSrc; + state->fragment.UsesKill = 1; + } ; TXD_instruction: TXD_OP maskedDstReg ',' swizzleSrcReg ',' swizzleSrcReg ',' swizzleSrcReg ',' texImageUnit ',' texTarget @@ -607,10 +617,13 @@ swizzleSrcReg: optionalSign srcReg swizzleSuffix ; -maskedDstReg: dstReg optionalMask +maskedDstReg: dstReg optionalMask optionalCcMask { $$ = $1; $$.WriteMask = $2.mask; + $$.CondMask = $3.CondMask; + $$.CondSwizzle = $3.CondSwizzle; + $$.CondSrc = $3.CondSrc; if ($$.File == PROGRAM_OUTPUT) { /* Technically speaking, this should check that it is in @@ -984,6 +997,82 @@ optionalMask: MASK4 | MASK3 | MASK2 | MASK1 | { $$.swizzle = SWIZZLE_NOOP; $$.mask = WRITEMASK_XYZW; } ; +optionalCcMask: '(' ccTest ')' + { + $$ = $2; + } + | '(' ccTest2 ')' + { + $$ = $2; + } + | + { + $$.CondMask = COND_TR; + $$.CondSwizzle = SWIZZLE_NOOP; + $$.CondSrc = 0; + } + ; + +ccTest: ccMaskRule swizzleSuffix + { + $$ = $1; + $$.CondSwizzle = $2.swizzle; + } + ; + +ccTest2: ccMaskRule2 swizzleSuffix + { + $$ = $1; + $$.CondSwizzle = $2.swizzle; + } + ; + +ccMaskRule: IDENTIFIER + { + const int cond = _mesa_parse_cc($1); + if ((cond == 0) || ($1[2] != '\0')) { + char *const err_str = + make_error_string("invalid condition code \"%s\"", $1); + + yyerror(& @1, state, (err_str != NULL) + ? err_str : "invalid condition code"); + + if (err_str != NULL) { + _mesa_free(err_str); + } + + YYERROR; + } + + $$.CondMask = cond; + $$.CondSwizzle = SWIZZLE_NOOP; + $$.CondSrc = 0; + } + ; + +ccMaskRule2: USED_IDENTIFIER + { + const int cond = _mesa_parse_cc($1); + if ((cond == 0) || ($1[2] != '\0')) { + char *const err_str = + make_error_string("invalid condition code \"%s\"", $1); + + yyerror(& @1, state, (err_str != NULL) + ? err_str : "invalid condition code"); + + if (err_str != NULL) { + _mesa_free(err_str); + } + + YYERROR; + } + + $$.CondMask = cond; + $$.CondSwizzle = SWIZZLE_NOOP; + $$.CondSrc = 0; + } + ; + namingStatement: ATTRIB_statement | PARAM_statement | TEMP_statement @@ -2089,8 +2178,15 @@ asm_instruction_set_operands(struct asm_instruction *inst, inst->Base.DstReg = *dst; } - inst->Base.SrcReg[0] = src0->Base; - inst->SrcReg[0] = *src0; + /* The only instruction that doesn't have any source registers is the + * condition-code based KIL instruction added by NV_fragment_program_option. + */ + if (src0 != NULL) { + inst->Base.SrcReg[0] = src0->Base; + inst->SrcReg[0] = *src0; + } else { + init_src_reg(& inst->SrcReg[0]); + } if (src1 != NULL) { inst->Base.SrcReg[1] = src1->Base; diff --git a/src/mesa/shader/program_parse_extra.c b/src/mesa/shader/program_parse_extra.c index cb7b7a5fb27..0656c5eaa8e 100644 --- a/src/mesa/shader/program_parse_extra.c +++ b/src/mesa/shader/program_parse_extra.c @@ -94,6 +94,60 @@ _mesa_parse_instruction_suffix(const struct asm_parser_state *state, } +int +_mesa_parse_cc(const char *s) +{ + int cond = 0; + + switch (s[0]) { + case 'E': + if (s[1] == 'Q') { + cond = COND_EQ; + } + break; + + case 'F': + if (s[1] == 'L') { + cond = COND_FL; + } + break; + + case 'G': + if (s[1] == 'E') { + cond = COND_GE; + } else if (s[1] == 'T') { + cond = COND_GT; + } + break; + + case 'L': + if (s[1] == 'E') { + cond = COND_LE; + } else if (s[1] == 'T') { + cond = COND_LT; + } + break; + + case 'N': + if (s[1] == 'E') { + cond = COND_NE; + } + break; + + case 'T': + if (s[1] == 'R') { + cond = COND_TR; + } + break; + + default: + break; + } + + return ((cond == 0) || (s[2] != '\0')) ? 0 : cond; +} + + int _mesa_ARBvp_parse_option(struct asm_parser_state *state, const char *option) { diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h index 497891f53d8..bce6041381f 100644 --- a/src/mesa/shader/program_parser.h +++ b/src/mesa/shader/program_parser.h @@ -278,4 +278,17 @@ extern int _mesa_ARBfp_parse_option(struct asm_parser_state *state, extern int _mesa_parse_instruction_suffix(const struct asm_parser_state *state, const char *suffix, struct prog_instruction *inst); +/** + * Parses a condition code name + * + * The condition code names (e.g., \c LT, \c GT, \c NE) were added to assembly + * shaders with the \c GL_NV_fragment_program_option extension. This function + * converts a string representation into one of the \c COND_ macros. + * + * \return + * One of the \c COND_ macros defined in prog_instruction.h on success or zero + * on failure. + */ +extern int _mesa_parse_cc(const char *s); + /*@}*/ -- cgit v1.2.3 From 2d729e6e3bcb0af84790cafb9824a3937954e078 Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Mon, 21 Sep 2009 10:14:25 -0400 Subject: r600: fix some issues with LIT instruction - MUL_LIT is ALU.Trans instruction - some Trans instructions can take 3 arguments - don't clobber dst.x, use dst.z as temp, it'll get written correct value in last insn - respect source swizzles --- src/mesa/drivers/dri/r600/r700_assembler.c | 69 ++++++++++++++++-------------- 1 file changed, 36 insertions(+), 33 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index efeccb25f1e..f46bc322011 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -2024,7 +2024,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm) return GL_FALSE; } - if (pAsm->D.dst.math == 0) + if (uNumSrc > 1) { // Process source 1 current_source_index = 1; @@ -2880,6 +2880,11 @@ GLboolean assemble_LIT(r700_AssemblerBase *pAsm) return GL_FALSE; } + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + /* dst.y = max(src.x, 0.0) */ pAsm->D.dst.opcode = SQ_OP2_INST_MAX; pAsm->D.dst.rtype = dstType; @@ -2891,11 +2896,6 @@ GLboolean assemble_LIT(r700_AssemblerBase *pAsm) pAsm->S[0].src.rtype = srcType; pAsm->S[0].src.reg = srcReg; setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); - noneg_PVSSRC(&(pAsm->S[0].src)); - pAsm->S[0].src.swizzlex = SQ_SEL_X; - pAsm->S[0].src.swizzley = SQ_SEL_X; - pAsm->S[0].src.swizzlez = SQ_SEL_X; - pAsm->S[0].src.swizzlew = SQ_SEL_X; pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; pAsm->S[1].src.reg = tmp; setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); @@ -2909,34 +2909,47 @@ GLboolean assemble_LIT(r700_AssemblerBase *pAsm) return GL_FALSE; } - /* before: dst.w = log(src.y) - * after : dst.x = log(src.y) - * why change dest register is that dst.w has been initialized as 1 before - */ + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + + swizzleagain_PVSSRC(&(pAsm->S[0].src), SQ_SEL_Y, SQ_SEL_Y, SQ_SEL_Y, SQ_SEL_Y); + + /* dst.z = log(src.y) */ pAsm->D.dst.opcode = SQ_OP2_INST_LOG_CLAMPED; pAsm->D.dst.math = 1; pAsm->D.dst.rtype = dstType; pAsm->D.dst.reg = dstReg; - pAsm->D.dst.writex = 1; + pAsm->D.dst.writex = 0; pAsm->D.dst.writey = 0; - pAsm->D.dst.writez = 0; + pAsm->D.dst.writez = 1; pAsm->D.dst.writew = 0; pAsm->S[0].src.rtype = srcType; pAsm->S[0].src.reg = srcReg; setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); - noneg_PVSSRC(&(pAsm->S[0].src)); - pAsm->S[0].src.swizzlex = SQ_SEL_Y; - pAsm->S[0].src.swizzley = SQ_SEL_Y; - pAsm->S[0].src.swizzlez = SQ_SEL_Y; - pAsm->S[0].src.swizzlew = SQ_SEL_Y; if( GL_FALSE == next_ins(pAsm) ) { return GL_FALSE; } - /* before: tmp.x = amd MUL_LIT(src.w, dst.w, src.x ) */ - /* after : tmp.x = amd MUL_LIT(src.w, dst.x, src.x ) */ + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + + if( GL_FALSE == assemble_src(pAsm, 0, 2) ) + { + return GL_FALSE; + } + + swizzleagain_PVSSRC(&(pAsm->S[0].src), SQ_SEL_W, SQ_SEL_W, SQ_SEL_W, SQ_SEL_W); + + swizzleagain_PVSSRC(&(pAsm->S[2].src), SQ_SEL_X, SQ_SEL_X, SQ_SEL_X, SQ_SEL_X); + + /* tmp.x = amd MUL_LIT(src.w, dst.z, src.x ) */ pAsm->D.dst.opcode = SQ_OP3_INST_MUL_LIT; + pAsm->D.dst.math = 1; pAsm->D.dst.op3 = 1; pAsm->D.dst.rtype = DST_REG_TEMPORARY; pAsm->D.dst.reg = tmp; @@ -2948,29 +2961,19 @@ GLboolean assemble_LIT(r700_AssemblerBase *pAsm) pAsm->S[0].src.rtype = srcType; pAsm->S[0].src.reg = srcReg; setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); - noneg_PVSSRC(&(pAsm->S[0].src)); - pAsm->S[0].src.swizzlex = SQ_SEL_W; - pAsm->S[0].src.swizzley = SQ_SEL_W; - pAsm->S[0].src.swizzlez = SQ_SEL_W; - pAsm->S[0].src.swizzlew = SQ_SEL_W; pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; pAsm->S[1].src.reg = dstReg; setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); noneg_PVSSRC(&(pAsm->S[1].src)); - pAsm->S[1].src.swizzlex = SQ_SEL_X; - pAsm->S[1].src.swizzley = SQ_SEL_X; - pAsm->S[1].src.swizzlez = SQ_SEL_X; - pAsm->S[1].src.swizzlew = SQ_SEL_X; + pAsm->S[1].src.swizzlex = SQ_SEL_Z; + pAsm->S[1].src.swizzley = SQ_SEL_Z; + pAsm->S[1].src.swizzlez = SQ_SEL_Z; + pAsm->S[1].src.swizzlew = SQ_SEL_Z; pAsm->S[2].src.rtype = srcType; pAsm->S[2].src.reg = srcReg; setaddrmode_PVSSRC(&(pAsm->S[2].src), ADDR_ABSOLUTE); - noneg_PVSSRC(&(pAsm->S[2].src)); - pAsm->S[2].src.swizzlex = SQ_SEL_X; - pAsm->S[2].src.swizzley = SQ_SEL_X; - pAsm->S[2].src.swizzlez = SQ_SEL_X; - pAsm->S[2].src.swizzlew = SQ_SEL_X; if( GL_FALSE == next_ins(pAsm) ) { -- cgit v1.2.3 From 077e3de98977ca0046d4f09eb7936f6006719739 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 08:32:43 -0600 Subject: swrast: fix cube face selection If arx and ary are equal, we still want to choose from one of them, and not arz. This is the same as Michal's softpipe fix. --- src/mesa/swrast/s_texfilter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index dd59314cd96..ea749c01137 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1863,7 +1863,7 @@ choose_cube_face(const struct gl_texture_object *texObj, GLuint face; GLfloat sc, tc, ma; - if (arx > ary && arx > arz) { + if (arx >= ary && arx >= arz) { if (rx >= 0.0F) { face = FACE_POS_X; sc = -rz; @@ -1877,7 +1877,7 @@ choose_cube_face(const struct gl_texture_object *texObj, ma = arx; } } - else if (ary > arx && ary > arz) { + else if (ary >= arx && ary >= arz) { if (ry >= 0.0F) { face = FACE_POS_Y; sc = rx; -- cgit v1.2.3 From 2b83483fb43386bd4b8d199d371a3e513828695f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 20 May 2009 14:05:03 -0700 Subject: intel: Mark the FBO as incomplete if there's no intel_renderbuffer for it. This happens to rendering with textures with a border, which had resulted in a segfault on dereferencing the irb. (cherry-picked from commit 8bba183b9eeb162661a287bf2e118c6dd419dd24) --- src/mesa/drivers/dri/intel/intel_fbo.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 30f58b1f44a..ed7c78e06c4 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -680,6 +680,11 @@ intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) if (rb == NULL) continue; + if (irb == NULL) { + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT; + continue; + } + switch (irb->texformat->MesaFormat) { case MESA_FORMAT_ARGB8888: case MESA_FORMAT_RGB565: -- cgit v1.2.3 From 734a498ed47b35c9e8e7172d19465aca640fa323 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 21 Sep 2009 19:57:57 +0100 Subject: mesa: Ensure TGSI tokens are freed with gallium's free. To avoid breaking the gallium's builtin malloc debugging. --- src/mesa/state_tracker/st_cb_program.c | 9 +++++---- src/mesa/state_tracker/st_mesa_to_tgsi.c | 11 +++++++++++ src/mesa/state_tracker/st_mesa_to_tgsi.h | 3 +++ src/mesa/state_tracker/st_program.c | 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index 4398ab28392..b2d5c39a3a0 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -45,6 +45,7 @@ #include "st_context.h" #include "st_program.h" #include "st_atom_shader.h" +#include "st_mesa_to_tgsi.h" #include "st_cb_program.h" @@ -152,7 +153,7 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog) } if (stvp->state.tokens) { - _mesa_free((void *) stvp->state.tokens); + st_free_tokens(stvp->state.tokens); stvp->state.tokens = NULL; } } @@ -167,7 +168,7 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog) } if (stfp->state.tokens) { - _mesa_free((void *) stfp->state.tokens); + st_free_tokens(stfp->state.tokens); stfp->state.tokens = NULL; } @@ -214,7 +215,7 @@ static void st_program_string_notify( GLcontext *ctx, } if (stfp->state.tokens) { - _mesa_free((void *) stfp->state.tokens); + st_free_tokens(stfp->state.tokens); stfp->state.tokens = NULL; } @@ -242,7 +243,7 @@ static void st_program_string_notify( GLcontext *ctx, } if (stvp->state.tokens) { - _mesa_free((void *) stvp->state.tokens); + st_free_tokens(stvp->state.tokens); stvp->state.tokens = NULL; } diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 04be57f8ffa..b0a1b529f1e 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -869,3 +869,14 @@ out: return tokens; } + + +/** + * Tokens cannot be free with _mesa_free otherwise the builtin gallium + * malloc debugging will get confused. + */ +void +st_free_tokens(const struct tgsi_token *tokens) +{ + FREE((void *)tokens); +} diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h index 679d0ddd41b..c0d1ff59e1f 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.h +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h @@ -56,6 +56,9 @@ st_translate_mesa_program( const ubyte outputSemanticIndex[], const GLbitfield outputFlags[] ); +void +st_free_tokens(const struct tgsi_token *tokens); + #if defined __cplusplus } /* extern "C" */ diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 5f9d2a6dad9..927f60cc7e9 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -317,7 +317,7 @@ st_translate_vertex_program(struct st_context *st, /* free old shader state, if any */ if (stvp->state.tokens) { - _mesa_free((void *) stvp->state.tokens); + st_free_tokens(stvp->state.tokens); stvp->state.tokens = NULL; } if (stvp->driver_shader) { -- cgit v1.2.3 From ab4ec85f6c04fdb5fabb0c74593643c31f630ac3 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sat, 19 Sep 2009 18:46:51 +0200 Subject: r300: fix a typo --- src/mesa/drivers/dri/r300/r300_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index b5ddfdc9f82..3cd38753b8a 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -475,7 +475,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode) /* update only if we have disabled all tcl fallbacks */ if (rmesa->options.hw_tcl_enabled) { - if ((old_fallback & R300_RASTER_FALLBACK_MASK) == bit) { + if ((old_fallback & R300_TCL_FALLBACK_MASK) == bit) { R300_STATECHANGE(rmesa, vap_cntl_status); rmesa->hw.vap_cntl_status.cmd[1] &= ~R300_VAP_TCL_BYPASS; } -- cgit v1.2.3 From db928a5e9155001fd441a32aa5af7d59af02ca5d Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sat, 19 Sep 2009 18:47:36 +0200 Subject: mesa: add some debug info to teximage.c --- src/mesa/main/teximage.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 82283030409..a8160c27357 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -36,6 +36,7 @@ #if FEATURE_convolve #include "convolve.h" #endif +#include "enums.h" #include "fbobject.h" #include "framebuffer.h" #include "hash.h" @@ -2131,6 +2132,13 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage1D %s %d %s %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, border, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, 1); #if FEATURE_convolve @@ -2230,6 +2238,13 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage2D %s %d %s %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, height, + border, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, height); #if FEATURE_convolve @@ -2346,6 +2361,13 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage3D %s %d %s %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, height, + depth, border, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, height); if (target == GL_TEXTURE_3D || @@ -2455,6 +2477,12 @@ _mesa_TexSubImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage1D %s %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, width, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2515,6 +2543,13 @@ _mesa_TexSubImage2D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage2D %s %d %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, yoffset, width, height, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2575,6 +2610,13 @@ _mesa_TexSubImage3D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage3D %s %d %d %d %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, yoffset, zoffset, width, height, depth, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2631,6 +2673,12 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexImage1D %s %d %s %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + x, y, width, border); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2696,6 +2744,12 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexImage2D %s %d %s %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + x, y, width, height, border); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2764,6 +2818,11 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage1D %s %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, x, y, width); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2819,6 +2878,11 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage2D %s %d %d %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, yoffset, x, y, width, height); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2874,6 +2938,11 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage3D %s %d %d %d %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, yoffset, zoffset, x, y, width, height); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -3122,6 +3191,12 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage1DARB %s %d %s %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, border, imageSize, data); + if (target == GL_TEXTURE_1D) { /* non-proxy target */ struct gl_texture_unit *texUnit; @@ -3216,6 +3291,12 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage2DARB %s %d %s %d %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, height, border, imageSize, data); + if (target == GL_TEXTURE_2D || (ctx->Extensions.ARB_texture_cube_map && target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && @@ -3315,6 +3396,12 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage3DARB %s %d %s %d %d %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, height, depth, border, imageSize, data); + if (target == GL_TEXTURE_3D) { /* non-proxy target */ struct gl_texture_unit *texUnit; -- cgit v1.2.3 From ff5535c5219047fc56f89c55ee44899d218dc234 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sun, 20 Sep 2009 13:54:59 +0200 Subject: radeon: update buffer map/unmap code for changes introduced in 92033a9516942d7272ce4bf36ecd422009bbaf60 and 822c7964819ca1fcc270880d4ca8b3de8a4276d0 --- src/mesa/drivers/dri/radeon/radeon_buffer_objects.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c index a24b6dac265..8fac5c6c512 100644 --- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c +++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c @@ -187,7 +187,11 @@ radeonMapBuffer(GLcontext * ctx, radeon_bo_map(radeon_obj->bo, access == GL_WRITE_ONLY_ARB); - return obj->Pointer = radeon_obj->bo->ptr; + obj->Pointer = radeon_obj->bo->ptr; + obj->Length = obj->Size; + obj->Offset = 0; + + return obj->Pointer; } @@ -203,9 +207,12 @@ radeonUnmapBuffer(GLcontext * ctx, if (radeon_obj->bo != NULL) { radeon_bo_unmap(radeon_obj->bo); - obj->Pointer = NULL; } + obj->Pointer = NULL; + obj->Offset = 0; + obj->Length = 0; + return GL_TRUE; } -- cgit v1.2.3 From 44d260329efaea2bc844afa42fb1b4f882ab74fd Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 14:07:35 -0600 Subject: mesa: make max_buffer_index() a non-static function --- src/mesa/main/api_validate.c | 16 ++++++++-------- src/mesa/main/api_validate.h | 6 ++++++ 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 2df4f173893..507e21fe81e 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -54,10 +54,10 @@ index_bytes(GLenum type, GLsizei count) /** * Find the max index in the given element/index buffer */ -static GLuint -max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, - const void *indices, - struct gl_buffer_object *elementBuf) +GLuint +_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, + const void *indices, + struct gl_buffer_object *elementBuf) { const GLubyte *map = NULL; GLuint max = 0; @@ -179,8 +179,8 @@ _mesa_validate_DrawElements(GLcontext *ctx, if (ctx->Const.CheckArrayBounds) { /* find max array index */ - GLuint max = max_buffer_index(ctx, count, type, indices, - ctx->Array.ElementArrayBufferObj); + GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, + ctx->Array.ElementArrayBufferObj); if (max >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDrawElements() index=%u is " @@ -251,8 +251,8 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, } if (ctx->Const.CheckArrayBounds) { - GLuint max = max_buffer_index(ctx, count, type, indices, - ctx->Array.ElementArrayBufferObj); + GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, + ctx->Array.ElementArrayBufferObj); if (max >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ return GL_FALSE; diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h index 10f0c34e663..ff82a2966ca 100644 --- a/src/mesa/main/api_validate.h +++ b/src/mesa/main/api_validate.h @@ -30,6 +30,12 @@ #include "mtypes.h" + +extern GLuint +_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, + const void *indices, + struct gl_buffer_object *elementBuf); + extern GLboolean _mesa_validate_DrawArrays(GLcontext *ctx, GLenum mode, GLint start, GLsizei count); -- cgit v1.2.3 From 2655d437569c5bce7c56782792cbd4460b9f758b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 14:23:07 -0600 Subject: mesa: refine the error checking vbo_exec_DrawRangeElements() If the 'end' index is out of bounds issue a warning as before. But instead of just no-op'ing the draw call, examine the actual array indices to see if they're OK. If the max array index is out of bounds, issue another warning and no-op the draw call. Otherwise, draw normally. This is a debug build-only feature since it could impact performance. This "fixes" the missing torus in the OGL Distilled / Picking demo. --- src/mesa/vbo/vbo_exec_array.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 12911f5750c..3f0656a816c 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -677,9 +677,10 @@ vbo_exec_DrawRangeElements(GLenum mode, /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, " "type 0x%x, indices=%p)\n" - "\tindex=%u is out of bounds (max=%u) " - "Element Buffer %u (size %d)", - start, end, count, type, indices, end, + "\tend is out of bounds (max=%u) " + "Element Buffer %u (size %d)\n" + "\tThis should probably be fixed in the application.", + start, end, count, type, indices, ctx->Array.ArrayObj->_MaxElement - 1, ctx->Array.ElementArrayBufferObj->Name, ctx->Array.ElementArrayBufferObj->Size); @@ -689,7 +690,33 @@ vbo_exec_DrawRangeElements(GLenum mode, if (0) _mesa_print_arrays(ctx); - return; + +#ifdef DEBUG + /* 'end' was out of bounds, but now let's check the actual array + * indexes to see if any of them are out of bounds. If so, warn + * and skip the draw to avoid potential segfault, etc. + */ + { + GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, + ctx->Array.ElementArrayBufferObj); + if (max >= ctx->Array.ArrayObj->_MaxElement) { + _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, " + "count %d, type 0x%x, indices=%p)\n" + "\tindex=%u is out of bounds (max=%u) " + "Element Buffer %u (size %d)\n" + "\tSkipping the glDrawRangeElements() call", + start, end, count, type, indices, max, + ctx->Array.ArrayObj->_MaxElement - 1, + ctx->Array.ElementArrayBufferObj->Name, + ctx->Array.ElementArrayBufferObj->Size); + return; + } + /* XXX we could also find the min index and compare to 'start' + * to see if start is correct. But it's more likely to get the + * upper bound wrong. + */ + } +#endif } else if (0) { _mesa_printf("glDraw[Range]Elements" -- cgit v1.2.3 From 1869bdabbac0926c7da8bfd9e22616cab9457126 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 21 Sep 2009 16:30:14 -0400 Subject: r600: various cleanups - max texture size is 8k, but mesa doesn't support that at the moment. - attempt to set shader limits to what the hw actually supports - clean up some old r300 cruft - no need to explicitly disable irqs. This is fixed in the drm now. Signed-off-by: Alex Deucher --- src/mesa/drivers/dri/r600/r600_context.c | 43 +++++++++++----------- src/mesa/drivers/dri/r600/r600_context.h | 19 ---------- .../drivers/dri/radeon/radeon_common_context.c | 7 +--- 3 files changed, 24 insertions(+), 45 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index f8fd9c13d77..6a90a5bcd19 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -284,8 +284,8 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, ctx->Const.MaxTextureMaxAnisotropy = 16.0; ctx->Const.MaxTextureLodBias = 16.0; - ctx->Const.MaxTextureLevels = 13; - ctx->Const.MaxTextureRectSize = 4096; + ctx->Const.MaxTextureLevels = 13; /* hw support 14 */ + ctx->Const.MaxTextureRectSize = 4096; /* hw support 8192 */ ctx->Const.MinPointSize = 0x0001 / 8.0; ctx->Const.MinPointSizeAA = 0x0001 / 8.0; @@ -331,25 +331,26 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, _tnl_allow_vertex_fog(ctx, GL_TRUE); /* currently bogus data */ - ctx->Const.VertexProgram.MaxInstructions = VSF_MAX_FRAGMENT_LENGTH / 4; - ctx->Const.VertexProgram.MaxNativeInstructions = - VSF_MAX_FRAGMENT_LENGTH / 4; - ctx->Const.VertexProgram.MaxNativeAttribs = 16; /* r420 */ - ctx->Const.VertexProgram.MaxTemps = 32; - ctx->Const.VertexProgram.MaxNativeTemps = - /*VSF_MAX_FRAGMENT_TEMPS */ 32; - ctx->Const.VertexProgram.MaxNativeParameters = 256; /* r420 */ - ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; - - ctx->Const.FragmentProgram.MaxNativeTemps = PFS_NUM_TEMP_REGS; - ctx->Const.FragmentProgram.MaxNativeAttribs = 11; /* copy i915... */ - ctx->Const.FragmentProgram.MaxNativeParameters = PFS_NUM_CONST_REGS; - ctx->Const.FragmentProgram.MaxNativeAluInstructions = PFS_MAX_ALU_INST; - ctx->Const.FragmentProgram.MaxNativeTexInstructions = PFS_MAX_TEX_INST; - ctx->Const.FragmentProgram.MaxNativeInstructions = - PFS_MAX_ALU_INST + PFS_MAX_TEX_INST; - ctx->Const.FragmentProgram.MaxNativeTexIndirections = - PFS_MAX_TEX_INDIRECT; + ctx->Const.VertexProgram.MaxInstructions = 8192; /* in theory no limit */ + ctx->Const.VertexProgram.MaxNativeInstructions = 8192; + ctx->Const.VertexProgram.MaxNativeAttribs = 160; + ctx->Const.VertexProgram.MaxTemps = 256; /* 256 for reg-based constants, inline consts also supported */ + ctx->Const.VertexProgram.MaxNativeTemps = 256; + ctx->Const.VertexProgram.MaxNativeParameters = 256; /* ??? */ + ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; /* ??? */ + + ctx->Const.FragmentProgram.MaxNativeTemps = 256; + ctx->Const.FragmentProgram.MaxNativeAttribs = 32; + ctx->Const.FragmentProgram.MaxNativeParameters = 256; + ctx->Const.FragmentProgram.MaxNativeAluInstructions = 8192; + /* 8 per clause on r6xx, 16 on rv670/r7xx */ + if ((screen->chip_family == CHIP_FAMILY_RV670) || + (screen->chip_family >= CHIP_FAMILY_RV770)) + ctx->Const.FragmentProgram.MaxNativeTexInstructions = 16; + else + ctx->Const.FragmentProgram.MaxNativeTexInstructions = 8; + ctx->Const.FragmentProgram.MaxNativeInstructions = 8192; + ctx->Const.FragmentProgram.MaxNativeTexIndirections = 8; /* ??? */ ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* and these are?? */ ctx->VertexProgram._MaintainTnlProgram = GL_TRUE; ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h index c59df7505af..9397ecde81b 100644 --- a/src/mesa/drivers/dri/r600/r600_context.h +++ b/src/mesa/drivers/dri/r600/r600_context.h @@ -86,29 +86,10 @@ extern int hw_tcl_on; #include "tnl_dd/t_dd_vertex.h" #undef TAG -#define PFS_MAX_ALU_INST 64 -#define PFS_MAX_TEX_INST 64 -#define PFS_MAX_TEX_INDIRECT 4 -#define PFS_NUM_TEMP_REGS 32 -#define PFS_NUM_CONST_REGS 16 - -#define R600_MAX_AOS_ARRAYS 16 - -#define REG_COORDS 0 -#define REG_COLOR0 1 -#define REG_TEX0 2 - #define R600_FALLBACK_NONE 0 #define R600_FALLBACK_TCL 1 #define R600_FALLBACK_RAST 2 -enum -{ - NO_SHIFT = 0, - LEFT_SHIFT = 1, - RIGHT_SHIFT = 2, -}; - struct r600_hw_state { struct radeon_state_atom sq; struct radeon_state_atom db; diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index 1c53c04da77..6b9b1e3c5e4 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -227,11 +227,8 @@ GLboolean radeonInitContext(radeonContextPtr radeon, fthrottle_mode = driQueryOptioni(&radeon->optionCache, "fthrottle_mode"); radeon->iw.irq_seq = -1; radeon->irqsEmitted = 0; - if (IS_R600_CLASS(radeon->radeonScreen)) - radeon->do_irqs = 0; - else - radeon->do_irqs = (fthrottle_mode == DRI_CONF_FTHROTTLE_IRQS && - radeon->radeonScreen->irq); + radeon->do_irqs = (fthrottle_mode == DRI_CONF_FTHROTTLE_IRQS && + radeon->radeonScreen->irq); radeon->do_usleeps = (fthrottle_mode == DRI_CONF_FTHROTTLE_USLEEPS); -- cgit v1.2.3 From c63e78b3e583e39ef296f1c2c9a34c90eb221503 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 21 Sep 2009 16:48:55 -0400 Subject: r600: fix typo in the last commit 128 gprs, 256 reg-based consts --- src/mesa/drivers/dri/r600/r600_context.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index 6a90a5bcd19..354b263f5cb 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -330,16 +330,16 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, _tnl_allow_pixel_fog(ctx, GL_FALSE); _tnl_allow_vertex_fog(ctx, GL_TRUE); - /* currently bogus data */ + /* 256 for reg-based consts, inline consts also supported */ ctx->Const.VertexProgram.MaxInstructions = 8192; /* in theory no limit */ ctx->Const.VertexProgram.MaxNativeInstructions = 8192; ctx->Const.VertexProgram.MaxNativeAttribs = 160; - ctx->Const.VertexProgram.MaxTemps = 256; /* 256 for reg-based constants, inline consts also supported */ - ctx->Const.VertexProgram.MaxNativeTemps = 256; - ctx->Const.VertexProgram.MaxNativeParameters = 256; /* ??? */ + ctx->Const.VertexProgram.MaxTemps = 128; + ctx->Const.VertexProgram.MaxNativeTemps = 128; + ctx->Const.VertexProgram.MaxNativeParameters = 256; ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; /* ??? */ - ctx->Const.FragmentProgram.MaxNativeTemps = 256; + ctx->Const.FragmentProgram.MaxNativeTemps = 128; ctx->Const.FragmentProgram.MaxNativeAttribs = 32; ctx->Const.FragmentProgram.MaxNativeParameters = 256; ctx->Const.FragmentProgram.MaxNativeAluInstructions = 8192; -- cgit v1.2.3 From d504a7669d7b71229c2d15503a095d71ee1584e6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 08:32:43 -0600 Subject: swrast: fix cube face selection If arx and ary are equal, we still want to choose from one of them, and not arz. This is the same as Michal's softpipe fix. --- src/mesa/swrast/s_texfilter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c index 6b1f9346475..efe6f234740 100644 --- a/src/mesa/swrast/s_texfilter.c +++ b/src/mesa/swrast/s_texfilter.c @@ -1862,7 +1862,7 @@ choose_cube_face(const struct gl_texture_object *texObj, GLuint face; GLfloat sc, tc, ma; - if (arx > ary && arx > arz) { + if (arx >= ary && arx >= arz) { if (rx >= 0.0F) { face = FACE_POS_X; sc = -rz; @@ -1876,7 +1876,7 @@ choose_cube_face(const struct gl_texture_object *texObj, ma = arx; } } - else if (ary > arx && ary > arz) { + else if (ary >= arx && ary >= arz) { if (ry >= 0.0F) { face = FACE_POS_Y; sc = rx; -- cgit v1.2.3 From b1c9c5a800a485e3e066312f5736c93ef2774c9b Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sat, 19 Sep 2009 18:46:51 +0200 Subject: r300: fix a typo --- src/mesa/drivers/dri/r300/r300_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index b5ddfdc9f82..3cd38753b8a 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -475,7 +475,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode) /* update only if we have disabled all tcl fallbacks */ if (rmesa->options.hw_tcl_enabled) { - if ((old_fallback & R300_RASTER_FALLBACK_MASK) == bit) { + if ((old_fallback & R300_TCL_FALLBACK_MASK) == bit) { R300_STATECHANGE(rmesa, vap_cntl_status); rmesa->hw.vap_cntl_status.cmd[1] &= ~R300_VAP_TCL_BYPASS; } -- cgit v1.2.3 From d100cbf721010f4eacc87507cc87c5314150d493 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sat, 19 Sep 2009 18:47:36 +0200 Subject: mesa: add some debug info to teximage.c --- src/mesa/main/teximage.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b0aa04e9aa4..b555624d882 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -36,6 +36,7 @@ #if FEATURE_convolve #include "convolve.h" #endif +#include "enums.h" #include "fbobject.h" #include "framebuffer.h" #include "hash.h" @@ -2148,6 +2149,13 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage1D %s %d %s %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, border, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, 1); #if FEATURE_convolve @@ -2247,6 +2255,13 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage2D %s %d %s %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, height, + border, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, height); #if FEATURE_convolve @@ -2363,6 +2378,13 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage3D %s %d %s %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, height, + depth, border, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, height); if (target == GL_TEXTURE_3D || @@ -2472,6 +2494,12 @@ _mesa_TexSubImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage1D %s %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, width, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2533,6 +2561,13 @@ _mesa_TexSubImage2D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage2D %s %d %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, yoffset, width, height, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2594,6 +2629,13 @@ _mesa_TexSubImage3D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage3D %s %d %d %d %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, yoffset, zoffset, width, height, depth, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2652,6 +2694,12 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexImage1D %s %d %s %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + x, y, width, border); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2718,6 +2766,12 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexImage2D %s %d %s %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + x, y, width, height, border); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2787,6 +2841,11 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage1D %s %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, x, y, width); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2844,6 +2903,11 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage2D %s %d %d %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, yoffset, x, y, width, height); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2904,6 +2968,11 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage3D %s %d %d %d %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, yoffset, zoffset, x, y, width, height); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -3155,6 +3224,12 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage1DARB %s %d %s %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, border, imageSize, data); + if (target == GL_TEXTURE_1D) { /* non-proxy target */ struct gl_texture_unit *texUnit; @@ -3250,6 +3325,12 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage2DARB %s %d %s %d %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, height, border, imageSize, data); + if (target == GL_TEXTURE_2D || (ctx->Extensions.ARB_texture_cube_map && target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && @@ -3350,6 +3431,12 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage3DARB %s %d %s %d %d %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, height, depth, border, imageSize, data); + if (target == GL_TEXTURE_3D) { /* non-proxy target */ struct gl_texture_unit *texUnit; -- cgit v1.2.3 From 4916a5a2e72b05c176809dd0db5066a966a45b80 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sun, 20 Sep 2009 13:54:59 +0200 Subject: radeon: update buffer map/unmap code for changes introduced in 92033a9516942d7272ce4bf36ecd422009bbaf60 and 822c7964819ca1fcc270880d4ca8b3de8a4276d0 --- src/mesa/drivers/dri/radeon/radeon_buffer_objects.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c index a24b6dac265..8fac5c6c512 100644 --- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c +++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c @@ -187,7 +187,11 @@ radeonMapBuffer(GLcontext * ctx, radeon_bo_map(radeon_obj->bo, access == GL_WRITE_ONLY_ARB); - return obj->Pointer = radeon_obj->bo->ptr; + obj->Pointer = radeon_obj->bo->ptr; + obj->Length = obj->Size; + obj->Offset = 0; + + return obj->Pointer; } @@ -203,9 +207,12 @@ radeonUnmapBuffer(GLcontext * ctx, if (radeon_obj->bo != NULL) { radeon_bo_unmap(radeon_obj->bo); - obj->Pointer = NULL; } + obj->Pointer = NULL; + obj->Offset = 0; + obj->Length = 0; + return GL_TRUE; } -- cgit v1.2.3 From e5d29ebb5e5dd923c9c60972170d072120007aab Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 14:07:35 -0600 Subject: mesa: make max_buffer_index() a non-static function --- src/mesa/main/api_validate.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ src/mesa/main/api_validate.h | 6 ++++++ 2 files changed, 51 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 4a1448deee6..e71e5a6ce86 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -51,6 +51,51 @@ index_bytes(GLenum type, GLsizei count) } +/** + * Find the max index in the given element/index buffer + */ +GLuint +_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, + const void *indices, + struct gl_buffer_object *elementBuf) +{ + const GLubyte *map = NULL; + GLuint max = 0; + GLuint i; + + if (_mesa_is_bufferobj(elementBuf)) { + /* elements are in a user-defined buffer object. need to map it */ + map = ctx->Driver.MapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, + GL_READ_ONLY, elementBuf); + /* Actual address is the sum of pointers */ + indices = (const GLvoid *) ADD_POINTERS(map, (const GLubyte *) indices); + } + + if (type == GL_UNSIGNED_INT) { + for (i = 0; i < count; i++) + if (((GLuint *) indices)[i] > max) + max = ((GLuint *) indices)[i]; + } + else if (type == GL_UNSIGNED_SHORT) { + for (i = 0; i < count; i++) + if (((GLushort *) indices)[i] > max) + max = ((GLushort *) indices)[i]; + } + else { + ASSERT(type == GL_UNSIGNED_BYTE); + for (i = 0; i < count; i++) + if (((GLubyte *) indices)[i] > max) + max = ((GLubyte *) indices)[i]; + } + + if (map) { + ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, elementBuf); + } + + return max; +} + + /** * Check if OK to draw arrays/elements. */ diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h index 1d3ae157d73..6064d15fe6c 100644 --- a/src/mesa/main/api_validate.h +++ b/src/mesa/main/api_validate.h @@ -30,6 +30,12 @@ #include "mtypes.h" + +extern GLuint +_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, + const void *indices, + struct gl_buffer_object *elementBuf); + extern GLboolean _mesa_validate_DrawArrays(GLcontext *ctx, GLenum mode, GLint start, GLsizei count); -- cgit v1.2.3 From 40603526f478a59b89a4c0a07c75a97dfe56b8c3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 14:23:07 -0600 Subject: mesa: refine the error checking vbo_exec_DrawRangeElements() If the 'end' index is out of bounds issue a warning as before. But instead of just no-op'ing the draw call, examine the actual array indices to see if they're OK. If the max array index is out of bounds, issue another warning and no-op the draw call. Otherwise, draw normally. This is a debug build-only feature since it could impact performance. This "fixes" the missing torus in the OGL Distilled / Picking demo. --- src/mesa/vbo/vbo_exec_array.c | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index b9550d6106c..7eca7f50577 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -680,11 +680,12 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, if (end >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ - _mesa_warning(ctx, "glDraw[Range]Elements{,BaseVertex}(start %u, end %u, " - "count %d, type 0x%x, indices=%p, base=%d)\n" - "\tindex=%u is out of bounds (max=%u) " - "Element Buffer %u (size %d)", - start, end, count, type, indices, end, basevertex, + _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, " + "type 0x%x, indices=%p)\n" + "\tend is out of bounds (max=%u) " + "Element Buffer %u (size %d)\n" + "\tThis should probably be fixed in the application.", + start, end, count, type, indices, ctx->Array.ArrayObj->_MaxElement - 1, ctx->Array.ElementArrayBufferObj->Name, ctx->Array.ElementArrayBufferObj->Size); @@ -694,7 +695,33 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, if (0) _mesa_print_arrays(ctx); - return; + +#ifdef DEBUG + /* 'end' was out of bounds, but now let's check the actual array + * indexes to see if any of them are out of bounds. If so, warn + * and skip the draw to avoid potential segfault, etc. + */ + { + GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, + ctx->Array.ElementArrayBufferObj); + if (max >= ctx->Array.ArrayObj->_MaxElement) { + _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, " + "count %d, type 0x%x, indices=%p)\n" + "\tindex=%u is out of bounds (max=%u) " + "Element Buffer %u (size %d)\n" + "\tSkipping the glDrawRangeElements() call", + start, end, count, type, indices, max, + ctx->Array.ArrayObj->_MaxElement - 1, + ctx->Array.ElementArrayBufferObj->Name, + ctx->Array.ElementArrayBufferObj->Size); + return; + } + /* XXX we could also find the min index and compare to 'start' + * to see if start is correct. But it's more likely to get the + * upper bound wrong. + */ + } +#endif } else if (0) { _mesa_printf("glDraw[Range]Elements{,BaseVertex}" -- cgit v1.2.3 From 83019ffc0708708af7ee1ddbf3cbf949bcf076bd Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 21 Sep 2009 17:03:58 -0400 Subject: selinux: Fix mmap() return value check --- src/mesa/main/execmem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c index 57c1e117c89..4c6139985fe 100644 --- a/src/mesa/main/execmem.c +++ b/src/mesa/main/execmem.c @@ -80,11 +80,10 @@ init_heap(void) exec_heap = mmInit( 0, EXEC_HEAP_SIZE ); if (!exec_mem) - exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE, - PROT_EXEC | PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + exec_mem = mmap(NULL, EXEC_HEAP_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - return (exec_mem != NULL); + return (exec_mem != MAP_FAILED); } -- cgit v1.2.3 From 972e995b148c220d32f2bf8c0a17c138deec6506 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 16:07:14 -0600 Subject: vbo: disable the GL_ARB_draw_elements_base_vertex rebase path This was introduced with commit 92d7ed8a20d4a018ce5324e6537ae7b478b9e5bf. It causes rendering of stray polygons (with sw rendering at least) when running the OGL Distilled / Picking demo (click on an object). This needs additional debugging to fix/restore. Found one suspect thing: in _tnl_draw_prims() there's some mixed signed/ unsigned arithmetic/comparing at line 422 that may be incorrect. --- src/mesa/vbo/vbo_rebase.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c index 799a25fc1cb..55a82ee369e 100644 --- a/src/mesa/vbo/vbo_rebase.c +++ b/src/mesa/vbo/vbo_rebase.c @@ -127,7 +127,10 @@ void vbo_rebase_prims( GLcontext *ctx, _mesa_printf("%s %d..%d\n", __FUNCTION__, min_index, max_index); - if (ib && ctx->Extensions.ARB_draw_elements_base_vertex) { + /* XXX this path is disabled for now. + * There's rendering corruption in some apps when it's enabled. + */ + if (0 && ib && ctx->Extensions.ARB_draw_elements_base_vertex) { /* If we can just tell the hardware or the TNL to interpret our * indices with a different base, do so. */ -- cgit v1.2.3 From 9a3333f43600ed4b9a17e49f79004f0c8d289378 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 16:51:34 -0600 Subject: vbo: restore some lost warning output --- src/mesa/vbo/vbo_exec_array.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 7eca7f50577..ee37eeb9378 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -681,11 +681,11 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, if (end >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, " - "type 0x%x, indices=%p)\n" + "type 0x%x, indices %p, base %d)\n" "\tend is out of bounds (max=%u) " "Element Buffer %u (size %d)\n" "\tThis should probably be fixed in the application.", - start, end, count, type, indices, + start, end, count, type, indices, basevertex, ctx->Array.ArrayObj->_MaxElement - 1, ctx->Array.ElementArrayBufferObj->Name, ctx->Array.ElementArrayBufferObj->Size); @@ -706,11 +706,12 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, ctx->Array.ElementArrayBufferObj); if (max >= ctx->Array.ArrayObj->_MaxElement) { _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, " - "count %d, type 0x%x, indices=%p)\n" + "count %d, type 0x%x, indices %p, base %p)\n" "\tindex=%u is out of bounds (max=%u) " "Element Buffer %u (size %d)\n" "\tSkipping the glDrawRangeElements() call", - start, end, count, type, indices, max, + start, end, count, type, indices, basevertex, + max, ctx->Array.ArrayObj->_MaxElement - 1, ctx->Array.ElementArrayBufferObj->Name, ctx->Array.ElementArrayBufferObj->Size); -- cgit v1.2.3 From 94a020cfe6cb1da04695897eed38b530af31f524 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 21 Sep 2009 16:54:35 -0600 Subject: vbo: added comment about max array index --- src/mesa/vbo/vbo_exec_array.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index ee37eeb9378..668dc6eb24c 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -678,6 +678,12 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, type, indices, basevertex )) return; + /* NOTE: It's important that 'end' is a reasonable value. + * in _tnl_draw_prims(), we use end to determine how many vertices + * to transform. If it's too large, we can unnecessarily split prims + * or we can read/write out of memory in several different places! + */ + if (end >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, " -- cgit v1.2.3 From 8cc12ffb34769a84050be034d19921af811a3406 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Tue, 22 Sep 2009 20:57:05 +0200 Subject: r300: Fix crash reported in bug #24066 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolai Hähnle --- src/mesa/drivers/dri/r300/r300_vertprog.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 0cb7dde985b..2f7b67c1431 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -43,6 +43,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "compiler/radeon_compiler.h" #include "compiler/radeon_nqssadce.h" #include "r300_context.h" +#include "r300_fragprog_common.h" #include "r300_state.h" /** @@ -298,6 +299,20 @@ struct r300_vertex_program * r300SelectAndTranslateVertexShader(GLcontext *ctx) struct r300_vertex_program *vp; vpc = (struct r300_vertex_program_cont *)ctx->VertexProgram._Current; + + if (!r300->selected_fp) { + /* This can happen when GetProgramiv is called to check + * whether the program runs natively. + * + * To be honest, this is not a very good solution, + * but solving the problem of reporting good values + * for those queries is tough anyway considering that + * we recompile vertex programs based on the precise + * fragment program that is in use. + */ + r300SelectAndTranslateFragmentShader(ctx); + } + wanted_key.FpReads = r300->selected_fp->InputsRead; wanted_key.FogAttr = r300->selected_fp->fog_attr; wanted_key.WPosAttr = r300->selected_fp->wpos_attr; -- cgit v1.2.3 From 52cadf7592c980eb9cebb1e2b50b552bb61d9f21 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 22 Sep 2009 13:14:55 -0600 Subject: mesa: fix error message text --- src/mesa/main/bufferobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index c8d160baa9a..2d1be5b7760 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1040,7 +1040,7 @@ _mesa_MapBufferARB(GLenum target, GLenum access) ASSERT(ctx->Driver.MapBuffer); bufObj->Pointer = ctx->Driver.MapBuffer( ctx, target, access, bufObj ); if (!bufObj->Pointer) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(access)"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(map failed)"); } bufObj->Access = access; -- cgit v1.2.3 From f338de4018f2cfcb462f98c7d76bf6cc36ab6f47 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 22 Sep 2009 13:47:49 -0600 Subject: mesa: fix more buffer object error messages --- src/mesa/main/bufferobj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index b95e00af5bb..189b5e16558 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1173,7 +1173,7 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size, ASSERT(ctx->Driver.BufferData); if (!ctx->Driver.BufferData( ctx, target, size, data, usage, bufObj )) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBufferDataARB(access)"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBufferDataARB()"); } } @@ -1262,7 +1262,7 @@ _mesa_MapBufferARB(GLenum target, GLenum access) ASSERT(ctx->Driver.MapBuffer); map = ctx->Driver.MapBuffer( ctx, target, access, bufObj ); if (!map) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(access)"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(map failed)"); return NULL; } else { @@ -1593,7 +1593,7 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, map = ctx->Driver.MapBufferRange(ctx, target, offset, length, access, bufObj); if (!map) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(access)"); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(map failed)"); } else { /* The driver callback should have set all these fields. -- cgit v1.2.3 From 81283b0bf0a8f7b31517adc224c20531e27fab42 Mon Sep 17 00:00:00 2001 From: Richard Li Date: Tue, 22 Sep 2009 16:39:11 -0400 Subject: r600 : add draw_prim support. --- src/mesa/drivers/dri/r600/Makefile | 1 + src/mesa/drivers/dri/r600/r600_context.c | 3 + src/mesa/drivers/dri/r600/r600_context.h | 32 ++ src/mesa/drivers/dri/r600/r700_assembler.c | 127 ++++ src/mesa/drivers/dri/r600/r700_assembler.h | 8 + src/mesa/drivers/dri/r600/r700_chip.c | 100 +++- src/mesa/drivers/dri/r600/r700_render.c | 667 +++++++++++++++++++++- src/mesa/drivers/dri/r600/r700_shader.c | 90 +++ src/mesa/drivers/dri/r600/r700_shader.h | 1 + src/mesa/drivers/dri/r600/r700_state.c | 20 +- src/mesa/drivers/dri/r600/r700_state.h | 1 + src/mesa/drivers/dri/r600/r700_vertprog.c | 195 ++++++- src/mesa/drivers/dri/r600/r700_vertprog.h | 17 +- src/mesa/drivers/dri/r600/radeon_buffer_objects.c | 1 + src/mesa/drivers/dri/r600/radeon_buffer_objects.h | 1 + 15 files changed, 1217 insertions(+), 47 deletions(-) create mode 120000 src/mesa/drivers/dri/r600/radeon_buffer_objects.c create mode 120000 src/mesa/drivers/dri/r600/radeon_buffer_objects.h (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/Makefile b/src/mesa/drivers/dri/r600/Makefile index 36bf773c054..7d5a7b1ab6f 100644 --- a/src/mesa/drivers/dri/r600/Makefile +++ b/src/mesa/drivers/dri/r600/Makefile @@ -29,6 +29,7 @@ COMMON_SOURCES = \ RADEON_COMMON_SOURCES = \ radeon_bo_legacy.c \ radeon_common_context.c \ + radeon_buffer_objects.c \ radeon_common.c \ radeon_cs_legacy.c \ radeon_dma.c \ diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index 354b263f5cb..6fc6d9d7bfa 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -257,6 +257,7 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, r600InitTextureFuncs(&functions); r700InitShaderFuncs(&functions); r700InitIoctlFuncs(&functions); + radeonInitBufferObjectFuncs(&functions); if (!radeonInitContext(&r600->radeon, &functions, glVisual, driContextPriv, @@ -375,6 +376,8 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc"); } + r700InitDraw(ctx); + radeon_fbo_init(&r600->radeon); radeonInitSpanFuncs( ctx ); diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h index 9397ecde81b..a296ea23fa4 100644 --- a/src/mesa/drivers/dri/r600/r600_context.h +++ b/src/mesa/drivers/dri/r600/r600_context.h @@ -126,6 +126,34 @@ struct r600_hw_state { struct radeon_state_atom tx_brdr_clr; }; +typedef struct StreamDesc +{ + GLint size; //number of data element + GLenum type; //data element type + GLsizei stride; + + struct radeon_bo *bo; + GLint bo_offset; + + GLuint dwords; + GLuint dst_loc; + GLuint _signed; + GLboolean normalize; + GLboolean is_named_bo; + GLubyte element; +} StreamDesc; + +typedef struct r700_index_buffer +{ + struct radeon_bo *bo; + int bo_offset; + + GLboolean is_32bit; + GLuint count; + + GLboolean bHostIb; +} r700_index_buffer; + /** * \brief R600 context structure. */ @@ -144,6 +172,9 @@ struct r600_context { GLvector4f dummy_attrib[_TNL_ATTRIB_MAX]; GLvector4f *temp_attrib[_TNL_ATTRIB_MAX]; + GLint nNumActiveAos; + StreamDesc stream_desc[VERT_ATTRIB_MAX]; + struct r700_index_buffer ind_buf; }; #define R700_CONTEXT(ctx) ((context_t *)(ctx->DriverCtx)) @@ -177,6 +208,7 @@ extern GLboolean r700SyncSurf(context_t *context, extern void r700SetupStreams(GLcontext * ctx); extern void r700Start3D(context_t *context); extern void r600InitAtoms(context_t *context); +extern void r700InitDraw(GLcontext *ctx); #define RADEON_D_CAPTURE 0 #define RADEON_D_PLAYBACK 1 diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index f46bc322011..81269350e43 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -786,6 +786,133 @@ GLboolean assemble_vfetch_instruction(r700_AssemblerBase* pAsm, return GL_TRUE; } +GLboolean assemble_vfetch_instruction2(r700_AssemblerBase* pAsm, + GLuint destination_register, + GLenum type, + GLint size, + GLubyte element, + GLuint _signed, + GLboolean normalize, + VTX_FETCH_METHOD * pFetchMethod) +{ + GLuint client_size_inbyte; + GLuint data_format; + GLuint mega_fetch_count; + GLuint is_mega_fetch_flag; + + R700VertexGenericFetch* vfetch_instruction_ptr; + R700VertexGenericFetch* assembled_vfetch_instruction_ptr + = pAsm->vfetch_instruction_ptr_array[element]; + + if (assembled_vfetch_instruction_ptr == NULL) + { + vfetch_instruction_ptr = (R700VertexGenericFetch*) CALLOC_STRUCT(R700VertexGenericFetch); + if (vfetch_instruction_ptr == NULL) + { + return GL_FALSE; + } + Init_R700VertexGenericFetch(vfetch_instruction_ptr); + } + else + { + vfetch_instruction_ptr = assembled_vfetch_instruction_ptr; + } + + data_format = GetSurfaceFormat(type, size, &client_size_inbyte); + + if(GL_TRUE == pFetchMethod->bEnableMini) //More conditions here + { + //TODO : mini fetch + } + else + { + mega_fetch_count = MEGA_FETCH_BYTES - 1; + is_mega_fetch_flag = 0x1; + pFetchMethod->mega_fetch_remainder = MEGA_FETCH_BYTES - client_size_inbyte; + } + + vfetch_instruction_ptr->m_Word0.f.vtx_inst = SQ_VTX_INST_FETCH; + vfetch_instruction_ptr->m_Word0.f.fetch_type = SQ_VTX_FETCH_VERTEX_DATA; + vfetch_instruction_ptr->m_Word0.f.fetch_whole_quad = 0x0; + + vfetch_instruction_ptr->m_Word0.f.buffer_id = element; + vfetch_instruction_ptr->m_Word0.f.src_gpr = 0x0; + vfetch_instruction_ptr->m_Word0.f.src_rel = SQ_ABSOLUTE; + vfetch_instruction_ptr->m_Word0.f.src_sel_x = SQ_SEL_X; + vfetch_instruction_ptr->m_Word0.f.mega_fetch_count = mega_fetch_count; + + vfetch_instruction_ptr->m_Word1.f.dst_sel_x = (size < 1) ? SQ_SEL_0 : SQ_SEL_X; + vfetch_instruction_ptr->m_Word1.f.dst_sel_y = (size < 2) ? SQ_SEL_0 : SQ_SEL_Y; + vfetch_instruction_ptr->m_Word1.f.dst_sel_z = (size < 3) ? SQ_SEL_0 : SQ_SEL_Z; + vfetch_instruction_ptr->m_Word1.f.dst_sel_w = (size < 4) ? SQ_SEL_1 : SQ_SEL_W; + + vfetch_instruction_ptr->m_Word1.f.use_const_fields = 1; + vfetch_instruction_ptr->m_Word1.f.data_format = data_format; + vfetch_instruction_ptr->m_Word2.f.endian_swap = SQ_ENDIAN_NONE; + + if(1 == _signed) + { + vfetch_instruction_ptr->m_Word1.f.format_comp_all = SQ_FORMAT_COMP_SIGNED; + } + else + { + vfetch_instruction_ptr->m_Word1.f.format_comp_all = SQ_FORMAT_COMP_UNSIGNED; + } + + if(GL_TRUE == normalize) + { + vfetch_instruction_ptr->m_Word1.f.num_format_all = SQ_NUM_FORMAT_NORM; + } + else + { + vfetch_instruction_ptr->m_Word1.f.num_format_all = SQ_NUM_FORMAT_INT; + } + + // Destination register + vfetch_instruction_ptr->m_Word1_GPR.f.dst_gpr = destination_register; + vfetch_instruction_ptr->m_Word1_GPR.f.dst_rel = SQ_ABSOLUTE; + + vfetch_instruction_ptr->m_Word2.f.offset = 0; + vfetch_instruction_ptr->m_Word2.f.const_buf_no_stride = 0x0; + + vfetch_instruction_ptr->m_Word2.f.mega_fetch = is_mega_fetch_flag; + + if (assembled_vfetch_instruction_ptr == NULL) + { + if ( GL_FALSE == add_vfetch_instruction(pAsm, (R700VertexInstruction *)vfetch_instruction_ptr) ) + { + return GL_FALSE; + } + + if (pAsm->vfetch_instruction_ptr_array[element] != NULL) + { + return GL_FALSE; + } + else + { + pAsm->vfetch_instruction_ptr_array[element] = vfetch_instruction_ptr; + } + } + + return GL_TRUE; +} + +GLboolean cleanup_vfetch_instructions(r700_AssemblerBase* pAsm) +{ + GLint i; + pAsm->cf_current_clause_type = CF_EMPTY_CLAUSE; + pAsm->cf_current_vtx_clause_ptr = NULL; + + for (i=0; ivfetch_instruction_ptr_array[ i ] = NULL; + } + + cleanup_vfetch_shaderinst(pAsm->pR700Shader); + + return GL_TRUE; +} + GLuint gethelpr(r700_AssemblerBase* pAsm) { GLuint r = pAsm->uHelpReg; diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h index f9c4d849c65..4e6e20011ad 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.h +++ b/src/mesa/drivers/dri/r600/r700_assembler.h @@ -411,6 +411,14 @@ GLboolean assemble_vfetch_instruction(r700_AssemblerBase* pAsm, GLuint number_of_elements, GLenum dataElementType, VTX_FETCH_METHOD* pFetchMethod); +GLboolean assemble_vfetch_instruction2(r700_AssemblerBase* pAsm, + GLuint destination_register, + GLenum type, + GLint size, + GLubyte element, + GLuint _signed, + GLboolean normalize, + VTX_FETCH_METHOD * pFetchMethod); GLuint gethelpr(r700_AssemblerBase* pAsm); void resethelpr(r700_AssemblerBase* pAsm); void checkop_init(r700_AssemblerBase* pAsm); diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c index 06d7e9c9ab1..783427a94c9 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.c +++ b/src/mesa/drivers/dri/r600/r700_chip.c @@ -208,6 +208,80 @@ static void r700SetupVTXConstants(GLcontext * ctx, } +extern int getTypeSize(GLenum type); +static void r700SetupVTXConstants2(GLcontext * ctx, + void * pAos, + StreamDesc * pStreamDesc) +{ + context_t *context = R700_CONTEXT(ctx); + struct radeon_aos * paos = (struct radeon_aos *)pAos; + unsigned int nVBsize; + BATCH_LOCALS(&context->radeon); + + unsigned int uSQ_VTX_CONSTANT_WORD0_0; + unsigned int uSQ_VTX_CONSTANT_WORD1_0; + unsigned int uSQ_VTX_CONSTANT_WORD2_0 = 0; + unsigned int uSQ_VTX_CONSTANT_WORD3_0 = 0; + unsigned int uSQ_VTX_CONSTANT_WORD6_0 = 0; + + if (!paos->bo) + return; + + if ((context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV610) || + (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV620) || + (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RS780) || + (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RS880) || + (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV710)) + r700SyncSurf(context, paos->bo, RADEON_GEM_DOMAIN_GTT, 0, TC_ACTION_ENA_bit); + else + r700SyncSurf(context, paos->bo, RADEON_GEM_DOMAIN_GTT, 0, VC_ACTION_ENA_bit); + + if(0 == pStreamDesc->stride) + { + nVBsize = paos->count * pStreamDesc->size * getTypeSize(pStreamDesc->type); + } + else + { + nVBsize = paos->count * pStreamDesc->stride; + } + + uSQ_VTX_CONSTANT_WORD0_0 = paos->offset; + uSQ_VTX_CONSTANT_WORD1_0 = nVBsize - 1; + + SETfield(uSQ_VTX_CONSTANT_WORD2_0, 0, BASE_ADDRESS_HI_shift, BASE_ADDRESS_HI_mask); /* TODO */ + SETfield(uSQ_VTX_CONSTANT_WORD2_0, pStreamDesc->stride, SQ_VTX_CONSTANT_WORD2_0__STRIDE_shift, + SQ_VTX_CONSTANT_WORD2_0__STRIDE_mask); + SETfield(uSQ_VTX_CONSTANT_WORD2_0, GetSurfaceFormat(pStreamDesc->type, pStreamDesc->size, NULL), + SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_shift, + SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask); /* TODO : trace back api for initial data type, not only GL_FLOAT */ + SETfield(uSQ_VTX_CONSTANT_WORD2_0, SQ_NUM_FORMAT_SCALED, + SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask); + SETbit(uSQ_VTX_CONSTANT_WORD2_0, SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit); + + SETfield(uSQ_VTX_CONSTANT_WORD3_0, 1, MEM_REQUEST_SIZE_shift, MEM_REQUEST_SIZE_mask); + SETfield(uSQ_VTX_CONSTANT_WORD6_0, SQ_TEX_VTX_VALID_BUFFER, + SQ_TEX_RESOURCE_WORD6_0__TYPE_shift, SQ_TEX_RESOURCE_WORD6_0__TYPE_mask); + + BEGIN_BATCH_NO_AUTOSTATE(9 + 2); + + R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_RESOURCE, 7)); + R600_OUT_BATCH((pStreamDesc->element + SQ_FETCH_RESOURCE_VS_OFFSET) * FETCH_RESOURCE_STRIDE); + R600_OUT_BATCH(uSQ_VTX_CONSTANT_WORD0_0); + R600_OUT_BATCH(uSQ_VTX_CONSTANT_WORD1_0); + R600_OUT_BATCH(uSQ_VTX_CONSTANT_WORD2_0); + R600_OUT_BATCH(uSQ_VTX_CONSTANT_WORD3_0); + R600_OUT_BATCH(0); + R600_OUT_BATCH(0); + R600_OUT_BATCH(uSQ_VTX_CONSTANT_WORD6_0); + R600_OUT_BATCH_RELOC(uSQ_VTX_CONSTANT_WORD0_0, + paos->bo, + uSQ_VTX_CONSTANT_WORD0_0, + RADEON_GEM_DOMAIN_GTT, 0, 0); + END_BATCH(); + COMMIT_BATCH(); + +} + void r700SetupStreams(GLcontext *ctx) { context_t *context = R700_CONTEXT(ctx); @@ -256,14 +330,24 @@ static void r700SendVTXState(GLcontext *ctx, struct radeon_state_atom *atom) COMMIT_BATCH(); for(i=0; imesa_program->Base.InputsRead & (1 << i)) { - /* currently aos are packed */ - r700SetupVTXConstants(ctx, - i, - (void*)(&context->radeon.tcl.aos[j]), - (unsigned int)context->radeon.tcl.aos[j].components, - (unsigned int)context->radeon.tcl.aos[j].stride * 4, - (unsigned int)context->radeon.tcl.aos[j].count); + if(vp->mesa_program->Base.InputsRead & (1 << i)) + { + if(1 == context->selected_vp->uiVersion) + { + /* currently aos are packed */ + r700SetupVTXConstants(ctx, + i, + (void*)(&context->radeon.tcl.aos[j]), + (unsigned int)context->radeon.tcl.aos[j].components, + (unsigned int)context->radeon.tcl.aos[j].stride * 4, + (unsigned int)context->radeon.tcl.aos[j].count); + } + else + { /* context->selected_vp->uiVersion == 2 : aos not always packed */ + r700SetupVTXConstants2(ctx, + (void*)(&context->radeon.tcl.aos[j]), + &(context->stream_desc[j])); + } j++; } } diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index b1c3648ca56..b58859b6ba3 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -43,6 +43,7 @@ #include "tnl/t_context.h" #include "tnl/t_vertex.h" #include "tnl/t_pipeline.h" +#include "vbo/vbo_context.h" #include "r600_context.h" #include "r600_cmdbuf.h" @@ -53,6 +54,7 @@ #include "r700_fragprog.h" #include "r700_state.h" +#include "radeon_buffer_objects.h" #include "radeon_common_context.h" void r700WaitForIdle(context_t *context); @@ -270,46 +272,82 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim if (type < 0 || num_indices <= 0) return; - total_emit = 3 /* VGT_PRIMITIVE_TYPE */ - + 2 /* VGT_INDEX_TYPE */ - + 2 /* NUM_INSTANCES */ - + num_indices + 3; /* DRAW_INDEX_IMMD */ + total_emit = 3 /* VGT_PRIMITIVE_TYPE */ + + 2 /* VGT_INDEX_TYPE */ + + 2 /* NUM_INSTANCES */ + + num_indices + 3; /* DRAW_INDEX_IMMD */ - BEGIN_BATCH_NO_AUTOSTATE(total_emit); + BEGIN_BATCH_NO_AUTOSTATE(total_emit); // prim - SETfield(vgt_primitive_type, type, - VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask); - R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_CONFIG_REG, 1)); - R600_OUT_BATCH(mmVGT_PRIMITIVE_TYPE - ASIC_CONFIG_BASE_INDEX); - R600_OUT_BATCH(vgt_primitive_type); + SETfield(vgt_primitive_type, type, + VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask); + R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_CONFIG_REG, 1)); + R600_OUT_BATCH(mmVGT_PRIMITIVE_TYPE - ASIC_CONFIG_BASE_INDEX); + R600_OUT_BATCH(vgt_primitive_type); // index type - SETfield(vgt_index_type, DI_INDEX_SIZE_32_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask); - R600_OUT_BATCH(CP_PACKET3(R600_IT_INDEX_TYPE, 0)); - R600_OUT_BATCH(vgt_index_type); + SETfield(vgt_index_type, DI_INDEX_SIZE_32_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask); + R600_OUT_BATCH(CP_PACKET3(R600_IT_INDEX_TYPE, 0)); + R600_OUT_BATCH(vgt_index_type); // num instances R600_OUT_BATCH(CP_PACKET3(R600_IT_NUM_INSTANCES, 0)); R600_OUT_BATCH(1); // draw packet - vgt_num_indices = num_indices; - SETfield(vgt_draw_initiator, DI_SRC_SEL_IMMEDIATE, SOURCE_SELECT_shift, SOURCE_SELECT_mask); + vgt_num_indices = num_indices; + SETfield(vgt_draw_initiator, DI_SRC_SEL_IMMEDIATE, SOURCE_SELECT_shift, SOURCE_SELECT_mask); SETfield(vgt_draw_initiator, DI_MAJOR_MODE_0, MAJOR_MODE_shift, MAJOR_MODE_mask); - R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_IMMD, (num_indices + 1))); - R600_OUT_BATCH(vgt_num_indices); - R600_OUT_BATCH(vgt_draw_initiator); + R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_IMMD, (num_indices + 1))); + R600_OUT_BATCH(vgt_num_indices); + R600_OUT_BATCH(vgt_draw_initiator); + if(NULL == context->ind_buf.bo) + { for (i = start; i < (start + num_indices); i++) { - if(vb->Elts) - R600_OUT_BATCH(vb->Elts[i]); - else - R600_OUT_BATCH(i); + if(vb->Elts) + { + R600_OUT_BATCH(vb->Elts[i]); + } + else + R600_OUT_BATCH(i); } - END_BATCH(); - COMMIT_BATCH(); + } + else + { + if(GL_TRUE == context->ind_buf.bHostIb) + { + if(GL_TRUE != context->ind_buf.is_32bit) + { + GLushort * pIndex = (GLushort*)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); + pIndex += start; + for (i = 0; i < num_indices; i++) + { + R600_OUT_BATCH(*pIndex); + pIndex++; + } + } + else + { + GLuint * pIndex = (GLuint*)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); + pIndex += start; + + for (i = 0; i < num_indices; i++) + { + R600_OUT_BATCH(*pIndex); + pIndex++; + } + } + } + else + { + /* TODO : hw ib draw */ + } + } + END_BATCH(); + COMMIT_BATCH(); } /* start 3d, idle, cb/db flush */ @@ -477,4 +515,585 @@ const struct tnl_pipeline_stage *r700_pipeline[] = 0, }; +#define CONVERT( TYPE, MACRO ) do { \ + GLuint i, j, sz; \ + sz = input->Size; \ + if (input->Normalized) { \ + for (i = 0; i < count; i++) { \ + const TYPE *in = (TYPE *)src_ptr; \ + for (j = 0; j < sz; j++) { \ + *dst_ptr++ = MACRO(*in); \ + in++; \ + } \ + src_ptr += stride; \ + } \ + } else { \ + for (i = 0; i < count; i++) { \ + const TYPE *in = (TYPE *)src_ptr; \ + for (j = 0; j < sz; j++) { \ + *dst_ptr++ = (GLfloat)(*in); \ + in++; \ + } \ + src_ptr += stride; \ + } \ + } \ +} while (0) + +/** + * Convert attribute data type to float + * If the attribute uses named buffer object replace the bo with newly allocated bo + */ +static void r700ConvertAttrib(GLcontext *ctx, int count, + const struct gl_client_array *input, + struct StreamDesc *attr) +{ + context_t *context = R700_CONTEXT(ctx); + const GLvoid *src_ptr; + GLboolean mapped_named_bo = GL_FALSE; + GLfloat *dst_ptr; + GLuint stride; + + stride = (input->StrideB == 0) ? getTypeSize(input->Type) * input->Size : input->StrideB; + + /* Convert value for first element only */ + if (input->StrideB == 0) + { + count = 1; + } + + if (input->BufferObj->Name) + { + if (!input->BufferObj->Pointer) + { + ctx->Driver.MapBuffer(ctx, GL_ARRAY_BUFFER, GL_READ_ONLY_ARB, input->BufferObj); + mapped_named_bo = GL_TRUE; + } + + src_ptr = ADD_POINTERS(input->BufferObj->Pointer, input->Ptr); + } + else + { + src_ptr = input->Ptr; + } + + radeonAllocDmaRegion(&context->radeon, &attr->bo, &attr->bo_offset, + sizeof(GLfloat) * input->Size * count, 32); + dst_ptr = (GLfloat *)ADD_POINTERS(attr->bo->ptr, attr->bo_offset); + + assert(src_ptr != NULL); + + switch (input->Type) + { + case GL_DOUBLE: + CONVERT(GLdouble, (GLfloat)); + break; + case GL_UNSIGNED_INT: + CONVERT(GLuint, UINT_TO_FLOAT); + break; + case GL_INT: + CONVERT(GLint, INT_TO_FLOAT); + break; + case GL_UNSIGNED_SHORT: + CONVERT(GLushort, USHORT_TO_FLOAT); + break; + case GL_SHORT: + CONVERT(GLshort, SHORT_TO_FLOAT); + break; + case GL_UNSIGNED_BYTE: + assert(input->Format != GL_BGRA); + CONVERT(GLubyte, UBYTE_TO_FLOAT); + break; + case GL_BYTE: + CONVERT(GLbyte, BYTE_TO_FLOAT); + break; + default: + assert(0); + break; + } + + if (mapped_named_bo) + { + ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj); + } +} + +static void r700AlignDataToDword(GLcontext *ctx, + const struct gl_client_array *input, + int count, + struct StreamDesc *attr) +{ + context_t *context = R700_CONTEXT(ctx); + const int dst_stride = (input->StrideB + 3) & ~3; + const int size = getTypeSize(input->Type) * input->Size * count; + GLboolean mapped_named_bo = GL_FALSE; + + radeonAllocDmaRegion(&context->radeon, &attr->bo, &attr->bo_offset, size, 32); + + if (!input->BufferObj->Pointer) + { + ctx->Driver.MapBuffer(ctx, GL_ARRAY_BUFFER, GL_READ_ONLY_ARB, input->BufferObj); + mapped_named_bo = GL_TRUE; + } + + { + GLvoid *src_ptr = ADD_POINTERS(input->BufferObj->Pointer, input->Ptr); + GLvoid *dst_ptr = ADD_POINTERS(attr->bo->ptr, attr->bo_offset); + int i; + + for (i = 0; i < count; ++i) + { + _mesa_memcpy(dst_ptr, src_ptr, input->StrideB); + src_ptr += input->StrideB; + dst_ptr += dst_stride; + } + } + + if (mapped_named_bo) + { + ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj); + } + + attr->stride = dst_stride; +} + +static void r700SetupStreams2(GLcontext *ctx, const struct gl_client_array *input[], int count) +{ + context_t *context = R700_CONTEXT(ctx); + GLuint stride; + int ret; + int i, index; + + R600_STATECHANGE(context, vtx); + + for(index = 0; index < context->nNumActiveAos; index++) + { + struct radeon_aos *aos = &context->radeon.tcl.aos[index]; + i = context->stream_desc[index].element; + + stride = (input[i]->StrideB == 0) ? getTypeSize(input[i]->Type) * input[i]->Size : input[i]->StrideB; + + if (input[i]->Type == GL_DOUBLE || input[i]->Type == GL_UNSIGNED_INT || input[i]->Type == GL_INT || +#if MESA_BIG_ENDIAN + getTypeSize(input[i]->Type) != 4 || +#endif + stride < 4) + { + r700ConvertAttrib(ctx, count, input[i], &context->stream_desc[index]); + } + else + { + if (input[i]->BufferObj->Name) + { + if (stride % 4 != 0) + { + assert(((intptr_t) input[i]->Ptr) % input[i]->StrideB == 0); + r700AlignDataToDword(ctx, input[i], count, &context->stream_desc[index]); + context->stream_desc[index].is_named_bo = GL_FALSE; + } + else + { + context->stream_desc[index].stride = input[i]->StrideB; + context->stream_desc[index].bo_offset = (intptr_t) input[i]->Ptr; + context->stream_desc[index].bo = get_radeon_buffer_object(input[i]->BufferObj)->bo; + context->stream_desc[index].is_named_bo = GL_TRUE; + } + } + else + { + int size; + int local_count = count; + uint32_t *dst; + + if (input[i]->StrideB == 0) + { + size = getTypeSize(input[i]->Type) * input[i]->Size; + local_count = 1; + } + else + { + size = getTypeSize(input[i]->Type) * input[i]->Size * local_count; + } + + radeonAllocDmaRegion(&context->radeon, &context->stream_desc[index].bo, + &context->stream_desc[index].bo_offset, size, 32); + assert(context->stream_desc[index].bo->ptr != NULL); + dst = (uint32_t *)ADD_POINTERS(context->stream_desc[index].bo->ptr, + context->stream_desc[index].bo_offset); + + switch (context->stream_desc[index].dwords) + { + case 1: + radeonEmitVec4(dst, input[i]->Ptr, input[i]->StrideB, local_count); + context->stream_desc[index].stride = 4; + break; + case 2: + radeonEmitVec8(dst, input[i]->Ptr, input[i]->StrideB, local_count); + context->stream_desc[index].stride = 8; + break; + case 3: + radeonEmitVec12(dst, input[i]->Ptr, input[i]->StrideB, local_count); + context->stream_desc[index].stride = 12; + break; + case 4: + radeonEmitVec16(dst, input[i]->Ptr, input[i]->StrideB, local_count); + context->stream_desc[index].stride = 16; + break; + default: + assert(0); + break; + } + } + } + + aos->count = context->stream_desc[index].stride == 0 ? 1 : count; + aos->stride = context->stream_desc[index].stride / sizeof(float); + aos->components = context->stream_desc[index].dwords; + aos->bo = context->stream_desc[index].bo; + aos->offset = context->stream_desc[index].bo_offset; + + if(context->stream_desc[index].is_named_bo) + { + radeon_cs_space_add_persistent_bo(context->radeon.cmdbuf.cs, + context->stream_desc[index].bo, + RADEON_GEM_DOMAIN_GTT, 0); + } + } + + context->radeon.tcl.aos_count = context->nNumActiveAos; + ret = radeon_cs_space_check_with_bo(context->radeon.cmdbuf.cs, + first_elem(&context->radeon.dma.reserved)->bo, + RADEON_GEM_DOMAIN_GTT, 0); +} + +static void r700FreeData(GLcontext *ctx) +{ + /* Need to zero tcl.aos[n].bo and tcl.elt_dma_bo + * to prevent double unref in radeonReleaseArrays + * called during context destroy + */ + context_t *context = R700_CONTEXT(ctx); + + int i; + + for (i = 0; i < context->nNumActiveAos; i++) + { + if (!context->stream_desc[i].is_named_bo) + { + radeon_bo_unref(context->stream_desc[i].bo); + } + context->radeon.tcl.aos[i].bo = NULL; + } + + if (context->ind_buf.bo != NULL) + { + if(context->ind_buf.bHostIb != GL_TRUE) + { + radeon_bo_unref(context->ind_buf.bo); + } + else + { + FREE(context->ind_buf.bo->ptr); + FREE(context->ind_buf.bo); + context->ind_buf.bo = NULL; + } + } +} + +static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer *mesa_ind_buf) +{ + context_t *context = R700_CONTEXT(ctx); + GLvoid *src_ptr; + GLuint *out; + int i; + GLboolean mapped_named_bo = GL_FALSE; + + if (mesa_ind_buf->obj->Name && !mesa_ind_buf->obj->Pointer) + { + ctx->Driver.MapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, GL_READ_ONLY_ARB, mesa_ind_buf->obj); + mapped_named_bo = GL_TRUE; + assert(mesa_ind_buf->obj->Pointer != NULL); + } + src_ptr = ADD_POINTERS(mesa_ind_buf->obj->Pointer, mesa_ind_buf->ptr); + + if (mesa_ind_buf->type == GL_UNSIGNED_BYTE) + { + GLuint size = sizeof(GLushort) * ((mesa_ind_buf->count + 1) & ~1); + GLubyte *in = (GLubyte *)src_ptr; + + if(context->ind_buf.bHostIb != GL_TRUE) + { + radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, + &context->ind_buf.bo_offset, size, 4); + + assert(context->ind_buf.bo->ptr != NULL); + out = (GLuint *)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); + } + else + { + context->ind_buf.bo = MALLOC_STRUCT(radeon_bo); + context->ind_buf.bo->ptr = ALIGN_MALLOC(size, 4); + context->ind_buf.bo_offset = 0; + out = (GLuint *)context->ind_buf.bo->ptr; + } + + for (i = 0; i + 1 < mesa_ind_buf->count; i += 2) + { + *out++ = in[i] | in[i + 1] << 16; + } + + if (i < mesa_ind_buf->count) + { + *out++ = in[i]; + } + +#if MESA_BIG_ENDIAN + } + else + { /* if (mesa_ind_buf->type == GL_UNSIGNED_SHORT) */ + GLushort *in = (GLushort *)src_ptr; + GLuint size = sizeof(GLushort) * ((mesa_ind_buf->count + 1) & ~1); + + if(context->ind_buf.bHostIb != GL_TRUE) + { + radeonAllocDmaRegion(&context->radeon, &r300->ind_buf.bo, + &context->ind_buf.bo_offset, size, 4); + + assert(context->ind_buf.bo->ptr != NULL); + out = (GLuint *)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); + } + else + { + context->ind_buf.bo = MALLOC_STRUCT(radeon_bo); + context->ind_buf.bo->ptr = ALIGN_MALLOC(size, 4); + context->ind_buf.bo_offset = 0; + out = (GLuint *)context->ind_buf.bo->ptr; + } + + for (i = 0; i + 1 < mesa_ind_buf->count; i += 2) + { + *out++ = in[i] | in[i + 1] << 16; + } + + if (i < mesa_ind_buf->count) + { + *out++ = in[i]; + } +#endif + } + + context->ind_buf.is_32bit = GL_FALSE; + context->ind_buf.count = mesa_ind_buf->count; + + if (mapped_named_bo) + { + ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); + } +} + +static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer *mesa_ind_buf) +{ + context_t *context = R700_CONTEXT(ctx); + + if (!mesa_ind_buf) { + context->ind_buf.bo = NULL; + return; + } + + context->ind_buf.bHostIb = GL_TRUE; + +#if MESA_BIG_ENDIAN + if (mesa_ind_buf->type == GL_UNSIGNED_INT) + { +#else + if (mesa_ind_buf->type != GL_UNSIGNED_BYTE) + { +#endif + const GLvoid *src_ptr; + GLvoid *dst_ptr; + GLboolean mapped_named_bo = GL_FALSE; + + if (mesa_ind_buf->obj->Name && !mesa_ind_buf->obj->Pointer) + { + ctx->Driver.MapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, GL_READ_ONLY_ARB, mesa_ind_buf->obj); + assert(mesa_ind_buf->obj->Pointer != NULL); + mapped_named_bo = GL_TRUE; + } + + src_ptr = ADD_POINTERS(mesa_ind_buf->obj->Pointer, mesa_ind_buf->ptr); + + const GLuint size = mesa_ind_buf->count * getTypeSize(mesa_ind_buf->type); + + if(context->ind_buf.bHostIb != GL_TRUE) + { + radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, + &context->ind_buf.bo_offset, size, 4); + assert(context->ind_buf.bo->ptr != NULL); + dst_ptr = ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); + } + else + { + context->ind_buf.bo = MALLOC_STRUCT(radeon_bo); + context->ind_buf.bo->ptr = ALIGN_MALLOC(size, 4); + context->ind_buf.bo_offset = 0; + dst_ptr = context->ind_buf.bo->ptr; + } + + _mesa_memcpy(dst_ptr, src_ptr, size); + + context->ind_buf.is_32bit = (mesa_ind_buf->type == GL_UNSIGNED_INT); + context->ind_buf.count = mesa_ind_buf->count; + + if (mapped_named_bo) + { + ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); + } + } + else + { + r700FixupIndexBuffer(ctx, mesa_ind_buf); + } +} + +static GLboolean r700TryDrawPrims(GLcontext *ctx, + const struct gl_client_array *arrays[], + const struct _mesa_prim *prim, + GLuint nr_prims, + const struct _mesa_index_buffer *ib, + GLuint min_index, + GLuint max_index ) +{ + context_t *context = R700_CONTEXT(ctx); + radeonContextPtr radeon = &context->radeon; + GLuint i, id = 0; + GLboolean bValidedbuffer; + struct radeon_renderbuffer *rrb; + + if (ctx->NewState) + { + _mesa_update_state( ctx ); + } + + bValidedbuffer = r600ValidateBuffers(ctx); + + /* always emit CB base to prevent + * lock ups on some chips. + */ + R600_STATECHANGE(context, cb_target); + /* mark vtx as dirty since it changes per-draw */ + R600_STATECHANGE(context, vtx); + + _tnl_UpdateFixedFunctionProgram(ctx); + r700SetVertexFormat(ctx, arrays, max_index + 1); + r700SetupStreams2(ctx, arrays, max_index + 1); + r700UpdateShaders2(ctx); + + r700SetScissor(context); + + r700SetupVertexProgram(ctx); + + r700SetupFragmentProgram(ctx); + + r600UpdateTextureState(ctx); + + GLuint emit_end = r700PredictRenderSize(ctx) + + context->radeon.cmdbuf.cs->cdw; + + r700SetupIndexBuffer(ctx, ib); + + radeonEmitState(radeon); + + for (i = 0; i < nr_prims; ++i) + { + r700RunRenderPrimitive(ctx, + prim[i].start, + prim[i].start + prim[i].count, + prim[i].mode); + } + + /* Flush render op cached for last several quads. */ + r700WaitForIdleClean(context); + + rrb = radeon_get_colorbuffer(&context->radeon); + if (rrb && rrb->bo) + r700SyncSurf(context, rrb->bo, 0, RADEON_GEM_DOMAIN_VRAM, + CB_ACTION_ENA_bit | (1 << (id + 6))); + + rrb = radeon_get_depthbuffer(&context->radeon); + if (rrb && rrb->bo) + r700SyncSurf(context, rrb->bo, 0, RADEON_GEM_DOMAIN_VRAM, + DB_ACTION_ENA_bit | DB_DEST_BASE_ENA_bit); + + r700FreeData(ctx); + + if (emit_end < context->radeon.cmdbuf.cs->cdw) + { + WARN_ONCE("Rendering was %d commands larger than predicted size." + " We might overflow command buffer.\n", context->radeon.cmdbuf.cs->cdw - emit_end); + } + + return GL_TRUE; +} + +static void r700DrawPrimsRe(GLcontext *ctx, + const struct gl_client_array *arrays[], + const struct _mesa_prim *prim, + GLuint nr_prims, + const struct _mesa_index_buffer *ib, + GLboolean index_bounds_valid, + GLuint min_index, + GLuint max_index) +{ + GLboolean retval = GL_FALSE; + + /* This check should get folded into just the places that + * min/max index are really needed. + */ + if (!index_bounds_valid) { + vbo_get_minmax_index(ctx, prim, ib, &min_index, &max_index); + } + + if (min_index) { + vbo_rebase_prims( ctx, arrays, prim, nr_prims, ib, min_index, max_index, r700DrawPrimsRe ); + return; + } + + /* Make an attempt at drawing */ + retval = r700TryDrawPrims(ctx, arrays, prim, nr_prims, ib, min_index, max_index); + + /* If failed run tnl pipeline - it should take care of fallbacks */ + if (!retval) + _tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index); +} + +static void r700DrawPrims(GLcontext *ctx, + const struct gl_client_array *arrays[], + const struct _mesa_prim *prim, + GLuint nr_prims, + const struct _mesa_index_buffer *ib, + GLboolean index_bounds_valid, + GLuint min_index, + GLuint max_index) +{ + context_t *context = R700_CONTEXT(ctx); + + /* For non indexed drawing, using tnl pipe. */ + if(!ib) + { + context->ind_buf.bo = NULL; + + _tnl_vbo_draw_prims(ctx, arrays, prim, nr_prims, ib, + index_bounds_valid, min_index, max_index); + return; + } + + r700DrawPrimsRe(ctx, arrays, prim, nr_prims, ib, index_bounds_valid, min_index, max_index); +} + +void r700InitDraw(GLcontext *ctx) +{ + struct vbo_context *vbo = vbo_context(ctx); + + vbo->draw_prims = r700DrawPrims; +} + diff --git a/src/mesa/drivers/dri/r600/r700_shader.c b/src/mesa/drivers/dri/r600/r700_shader.c index b4fd51c1370..955ea4e4e1d 100644 --- a/src/mesa/drivers/dri/r600/r700_shader.c +++ b/src/mesa/drivers/dri/r600/r700_shader.c @@ -60,6 +60,55 @@ void AddInstToList(TypedShaderList * plstCFInstructions, R700ShaderInstruction * plstCFInstructions->uNumOfNode++; } +void TakeInstOutFromList(TypedShaderList * plstCFInstructions, R700ShaderInstruction * pInst) +{ + GLuint ulIndex = 0; + GLboolean bFound = GL_FALSE; + R700ShaderInstruction * pPrevInst = NULL; + R700ShaderInstruction * pCurInst = plstCFInstructions->pHead; + + /* Need go thro list to make sure pInst is there. */ + while(NULL != pCurInst) + { + if(pCurInst == pInst) + { + bFound = GL_TRUE; + break; + } + + pPrevInst = pCurInst; + pCurInst = pCurInst->pNextInst; + } + if(GL_TRUE == bFound) + { + plstCFInstructions->uNumOfNode--; + + pCurInst = pInst->pNextInst; + ulIndex = pInst->m_uIndex; + while(NULL != pCurInst) + { + pCurInst->m_uIndex = ulIndex; + ulIndex++; + pCurInst = pCurInst->pNextInst; + } + + if(plstCFInstructions->pHead == pInst) + { + plstCFInstructions->pHead = pInst->pNextInst; + } + if(plstCFInstructions->pTail == pInst) + { + plstCFInstructions->pTail = pPrevInst; + } + if(NULL != pPrevInst) + { + pPrevInst->pNextInst = pInst->pNextInst; + } + + FREE(pInst); + } +} + void Init_R700_Shader(R700_Shader * pShader) { pShader->Type = R700_SHADER_INVALID; @@ -488,6 +537,47 @@ void DebugPrint(void) { } +void cleanup_vfetch_shaderinst(R700_Shader *pShader) +{ + R700ShaderInstruction *pInst; + R700ShaderInstruction *pInstToFree; + R700VertexInstruction *pVTXInst; + R700ControlFlowInstruction *pCFInst; + + pInst = pShader->lstVTXInstructions.pHead; + while(NULL != pInst) + { + pVTXInst = (R700VertexInstruction *)pInst; + pShader->uShaderBinaryDWORDSize -= GetInstructionSize(pVTXInst->m_ShaderInstType); + + if(NULL != pVTXInst->m_pLinkedGenericClause) + { + pCFInst = (R700ControlFlowInstruction*)(pVTXInst->m_pLinkedGenericClause); + + TakeInstOutFromList(&(pShader->lstCFInstructions), + (R700ShaderInstruction*)pCFInst); + + pShader->uShaderBinaryDWORDSize -= GetInstructionSize(pCFInst->m_ShaderInstType); + } + + pInst = pInst->pNextInst; + }; + + //destroy each item in pShader->lstVTXInstructions; + pInst = pShader->lstVTXInstructions.pHead; + while(NULL != pInst) + { + pInstToFree = pInst; + pInst = pInst->pNextInst; + FREE(pInstToFree); + }; + + //set NULL pShader->lstVTXInstructions + pShader->lstVTXInstructions.pHead=NULL; + pShader->lstVTXInstructions.pTail=NULL; + pShader->lstVTXInstructions.uNumOfNode=0; +} + void Clean_Up_Shader(R700_Shader *pShader) { FREE(pShader->pProgram); diff --git a/src/mesa/drivers/dri/r600/r700_shader.h b/src/mesa/drivers/dri/r600/r700_shader.h index bfd01e1a93a..997cb05aaf8 100644 --- a/src/mesa/drivers/dri/r600/r700_shader.h +++ b/src/mesa/drivers/dri/r600/r700_shader.h @@ -143,6 +143,7 @@ void LoadProgram(R700_Shader *pShader); void UpdateShaderRegisters(R700_Shader *pShader); void DeleteInstructions(R700_Shader *pShader); void DebugPrint(void); +void cleanup_vfetch_shaderinst(R700_Shader *pShader); void Clean_Up_Shader(R700_Shader *pShader); diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index fc0b5116843..1043eabb149 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -92,7 +92,25 @@ void r700UpdateShaders (GLcontext * ctx) //---------------------------------- } } - r700SelectVertexShader(ctx); + r700SelectVertexShader(ctx, 1); + r700UpdateStateParameters(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS); + context->radeon.NewGLState = 0; +} + +void r700UpdateShaders2(GLcontext * ctx) +{ + context_t *context = R700_CONTEXT(ctx); + + /* should only happenen once, just after context is created */ + /* TODO: shouldn't we fallback to sw here? */ + if (!ctx->FragmentProgram._Current) { + _mesa_fprintf(stderr, "No ctx->FragmentProgram._Current!!\n"); + return; + } + + r700SelectFragmentShader(ctx); + + r700SelectVertexShader(ctx, 2); r700UpdateStateParameters(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS); context->radeon.NewGLState = 0; } diff --git a/src/mesa/drivers/dri/r600/r700_state.h b/src/mesa/drivers/dri/r600/r700_state.h index 0f53d5b4c59..209189d8d72 100644 --- a/src/mesa/drivers/dri/r600/r700_state.h +++ b/src/mesa/drivers/dri/r600/r700_state.h @@ -35,6 +35,7 @@ extern void r700UpdateStateParameters(GLcontext * ctx, GLuint new_state); extern void r700UpdateShaders (GLcontext * ctx); +extern void r700UpdateShaders2(GLcontext * ctx); extern void r700UpdateViewportOffset(GLcontext * ctx); diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c index 9ee26286d9b..e7a209be9d8 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.c +++ b/src/mesa/drivers/dri/r600/r700_vertprog.c @@ -159,7 +159,35 @@ GLboolean Process_Vertex_Program_Vfetch_Instructions( return GL_TRUE; } -void Map_Vertex_Program(struct r700_vertex_program *vp, +GLboolean Process_Vertex_Program_Vfetch_Instructions2( + GLcontext *ctx, + struct r700_vertex_program *vp, + struct gl_vertex_program *mesa_vp) +{ + int i; + context_t *context = R700_CONTEXT(ctx); + + VTX_FETCH_METHOD vtxFetchMethod; + vtxFetchMethod.bEnableMini = GL_FALSE; + vtxFetchMethod.mega_fetch_remainder = 0; + + for(i=0; inNumActiveAos; i++) + { + assemble_vfetch_instruction2(&vp->r700AsmCode, + vp->r700AsmCode.ucVP_AttributeMap[context->stream_desc[i].element], + context->stream_desc[i].type, + context->stream_desc[i].size, + context->stream_desc[i].element, + context->stream_desc[i]._signed, + context->stream_desc[i].normalize, + &vtxFetchMethod); + } + + return GL_TRUE; +} + +void Map_Vertex_Program(GLcontext *ctx, + struct r700_vertex_program *vp, struct gl_vertex_program *mesa_vp) { GLuint ui; @@ -175,11 +203,22 @@ void Map_Vertex_Program(struct r700_vertex_program *vp, pAsm->number_used_registers += num_inputs; // Create VFETCH instructions for inputs - if (GL_TRUE != Process_Vertex_Program_Vfetch_Instructions(vp, mesa_vp) ) - { - radeon_error("Calling Process_Vertex_Program_Vfetch_Instructions return error. \n"); - return; //error - } + if(1 == vp->uiVersion) + { + if (GL_TRUE != Process_Vertex_Program_Vfetch_Instructions(vp, mesa_vp) ) + { + radeon_error("Calling Process_Vertex_Program_Vfetch_Instructions return error. \n"); + return; + } + } + else + { + if (GL_TRUE != Process_Vertex_Program_Vfetch_Instructions2(ctx, vp, mesa_vp) ) + { + radeon_error("Calling Process_Vertex_Program_Vfetch_Instructions2 return error. \n"); + return; + } + } // Map Outputs pAsm->number_of_exports = Map_Vertex_Output(pAsm, mesa_vp, pAsm->number_used_registers); @@ -261,7 +300,8 @@ GLboolean Find_Instruction_Dependencies_vp(struct r700_vertex_program *vp, } struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, - struct gl_vertex_program *mesa_vp) + struct gl_vertex_program *mesa_vp, + GLint nVer) { context_t *context = R700_CONTEXT(ctx); struct r700_vertex_program *vp; @@ -271,6 +311,7 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, unsigned int i; vp = _mesa_calloc(sizeof(*vp)); + vp->uiVersion = nVer; vp->mesa_program = (struct gl_vertex_program *)_mesa_clone_program(ctx, &mesa_vp->Base); if (mesa_vp->IsPositionInvariant) @@ -296,7 +337,7 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, //Init_Program Init_r700_AssemblerBase(SPT_VP, &(vp->r700AsmCode), &(vp->r700Shader) ); - Map_Vertex_Program( vp, vp->mesa_program ); + Map_Vertex_Program(ctx, vp, vp->mesa_program ); if(GL_FALSE == Find_Instruction_Dependencies_vp(vp, vp->mesa_program)) { @@ -325,7 +366,7 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, return vp; } -void r700SelectVertexShader(GLcontext *ctx) +void r700SelectVertexShader(GLcontext *ctx, GLint nVersion) { context_t *context = R700_CONTEXT(ctx); struct r700_vertex_program_cont *vpc; @@ -365,7 +406,7 @@ void r700SelectVertexShader(GLcontext *ctx) } } - vp = r700TranslateVertexShader(ctx, &(vpc->mesa_program) ); + vp = r700TranslateVertexShader(ctx, &(vpc->mesa_program), nVersion); if(!vp) { radeon_error("Failed to translate vertex shader. \n"); @@ -377,6 +418,140 @@ void r700SelectVertexShader(GLcontext *ctx) return; } +int getTypeSize(GLenum type) +{ + switch (type) + { + case GL_DOUBLE: + return sizeof(GLdouble); + case GL_FLOAT: + return sizeof(GLfloat); + case GL_INT: + return sizeof(GLint); + case GL_UNSIGNED_INT: + return sizeof(GLuint); + case GL_SHORT: + return sizeof(GLshort); + case GL_UNSIGNED_SHORT: + return sizeof(GLushort); + case GL_BYTE: + return sizeof(GLbyte); + case GL_UNSIGNED_BYTE: + return sizeof(GLubyte); + default: + assert(0); + return 0; + } +} + +static void r700TranslateAttrib(GLcontext *ctx, GLuint unLoc, int count, const struct gl_client_array *input) +{ + context_t *context = R700_CONTEXT(ctx); + + StreamDesc * pStreamDesc = &(context->stream_desc[context->nNumActiveAos]); + + GLuint stride; + + stride = (input->StrideB == 0) ? getTypeSize(input->Type) * input->Size + : input->StrideB; + + if (input->Type == GL_DOUBLE || input->Type == GL_UNSIGNED_INT || input->Type == GL_INT || +#if MESA_BIG_ENDIAN + getTypeSize(input->Type) != 4 || +#endif + stride < 4) + { + pStreamDesc->type = GL_FLOAT; + + if (input->StrideB == 0) + { + pStreamDesc->stride = 0; + } + else + { + pStreamDesc->stride = sizeof(GLfloat) * input->Size; + } + pStreamDesc->dwords = input->Size; + pStreamDesc->is_named_bo = GL_FALSE; + } + else + { + pStreamDesc->type = input->Type; + pStreamDesc->dwords = (getTypeSize(input->Type) * input->Size + 3)/ 4; + if (!input->BufferObj->Name) + { + if (input->StrideB == 0) + { + pStreamDesc->stride = 0; + } + else + { + pStreamDesc->stride = (getTypeSize(pStreamDesc->type) * input->Size + 3) & ~3; + } + + pStreamDesc->is_named_bo = GL_FALSE; + } + } + + pStreamDesc->size = input->Size; + pStreamDesc->dst_loc = context->nNumActiveAos; + pStreamDesc->element = unLoc; + + switch (pStreamDesc->type) + { //GetSurfaceFormat + case GL_FLOAT: + pStreamDesc->_signed = 0; + pStreamDesc->normalize = GL_FALSE; + break; + case GL_SHORT: + pStreamDesc->_signed = 1; + pStreamDesc->normalize = input->Normalized; + break; + case GL_BYTE: + pStreamDesc->_signed = 1; + pStreamDesc->normalize = input->Normalized; + break; + case GL_UNSIGNED_SHORT: + pStreamDesc->_signed = 0; + pStreamDesc->normalize = input->Normalized; + break; + case GL_UNSIGNED_BYTE: + pStreamDesc->_signed = 0; + pStreamDesc->normalize = input->Normalized; + break; + default: + case GL_INT: + case GL_UNSIGNED_INT: + case GL_DOUBLE: + assert(0); + break; + } + context->nNumActiveAos++; +} + +void r700SetVertexFormat(GLcontext *ctx, const struct gl_client_array *arrays[], int count) +{ + context_t *context = R700_CONTEXT(ctx); + struct r700_vertex_program *vpc + = (struct r700_vertex_program *)ctx->VertexProgram._Current; + + struct gl_vertex_program * mesa_vp = (struct gl_vertex_program *)&(vpc->mesa_program); + unsigned int unLoc = 0; + unsigned int unBit = mesa_vp->Base.InputsRead; + context->nNumActiveAos = 0; + + while(unBit) + { + if(unBit & 1) + { + r700TranslateAttrib(ctx, unLoc, count, arrays[unLoc]); + } + + unBit >>= 1; + ++unLoc; + } +} + void * r700GetActiveVpShaderBo(GLcontext * ctx) { context_t *context = R700_CONTEXT(ctx); diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.h b/src/mesa/drivers/dri/r600/r700_vertprog.h index c48764c43ba..f9a3e395ee9 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.h +++ b/src/mesa/drivers/dri/r600/r700_vertprog.h @@ -52,7 +52,7 @@ struct r700_vertex_program GLboolean translated; GLboolean loaded; - GLboolean needUpdateVF; + GLint uiVersion; void * shaderbo; @@ -76,19 +76,28 @@ unsigned int Map_Vertex_Input(r700_AssemblerBase *pAsm, GLboolean Process_Vertex_Program_Vfetch_Instructions( struct r700_vertex_program *vp, struct gl_vertex_program *mesa_vp); -void Map_Vertex_Program(struct r700_vertex_program *vp, +GLboolean Process_Vertex_Program_Vfetch_Instructions2( + GLcontext *ctx, + struct r700_vertex_program *vp, + struct gl_vertex_program *mesa_vp); +void Map_Vertex_Program(GLcontext *ctx, + struct r700_vertex_program *vp, struct gl_vertex_program *mesa_vp); GLboolean Find_Instruction_Dependencies_vp(struct r700_vertex_program *vp, struct gl_vertex_program *mesa_vp); struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, - struct gl_vertex_program *mesa_vp); + struct gl_vertex_program *mesa_vp, + GLint nVer); /* Interface */ -extern void r700SelectVertexShader(GLcontext *ctx); +extern void r700SelectVertexShader(GLcontext *ctx, GLint nVersion); +extern void r700SetVertexFormat(GLcontext *ctx, const struct gl_client_array *arrays[], int count); extern GLboolean r700SetupVertexProgram(GLcontext * ctx); extern void * r700GetActiveVpShaderBo(GLcontext * ctx); +extern int getTypeSize(GLenum type); + #endif /* _R700_VERTPROG_H_ */ diff --git a/src/mesa/drivers/dri/r600/radeon_buffer_objects.c b/src/mesa/drivers/dri/r600/radeon_buffer_objects.c new file mode 120000 index 00000000000..f6a5f664701 --- /dev/null +++ b/src/mesa/drivers/dri/r600/radeon_buffer_objects.c @@ -0,0 +1 @@ +../radeon/radeon_buffer_objects.c \ No newline at end of file diff --git a/src/mesa/drivers/dri/r600/radeon_buffer_objects.h b/src/mesa/drivers/dri/r600/radeon_buffer_objects.h new file mode 120000 index 00000000000..2f134fd17b8 --- /dev/null +++ b/src/mesa/drivers/dri/r600/radeon_buffer_objects.h @@ -0,0 +1 @@ +../radeon/radeon_buffer_objects.h \ No newline at end of file -- cgit v1.2.3 From 98d5ec10d0918f6619e7b2285278b83e9de6d86f Mon Sep 17 00:00:00 2001 From: Richard Li Date: Tue, 22 Sep 2009 17:26:23 -0400 Subject: r600 : add draw_prim support, make up one lost change. --- src/mesa/drivers/dri/r600/r600_context.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index 6fc6d9d7bfa..969144ba123 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -59,6 +59,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "radeon_debug.h" #include "r600_context.h" #include "radeon_common_context.h" +#include "radeon_buffer_objects.h" #include "radeon_span.h" #include "r600_cmdbuf.h" #include "r600_emit.h" -- cgit v1.2.3 From 926b965ed53efc06a9d7cc6e07eff853b263960a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 22 Sep 2009 15:58:12 -0600 Subject: mesa: don't re-use the meta glDrawPixels VBO; create a new one each time This should help to work around bugs 24083 and 23670. --- src/mesa/drivers/common/meta.c | 52 ++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 30 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index ddd476eba1c..2741a41bf39 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -174,7 +174,6 @@ struct copypix_state struct drawpix_state { GLuint ArrayObj; - GLuint VBO; GLuint StencilFP; /**< Fragment program for drawing stencil images */ GLuint DepthFP; /**< Fragment program for drawing depth images */ @@ -262,7 +261,6 @@ _mesa_meta_free(GLcontext *ctx) _mesa_DeleteVertexArraysAPPLE(1, &meta->CopyPix.ArrayObj); /* glDrawPixels */ - _mesa_DeleteBuffersARB(1, & meta->DrawPix.VBO); _mesa_DeleteVertexArraysAPPLE(1, &meta->DrawPix.ArrayObj); _mesa_DeletePrograms(1, &meta->DrawPix.DepthFP); _mesa_DeletePrograms(1, &meta->DrawPix.StencilFP); @@ -1430,6 +1428,7 @@ _mesa_meta_draw_pixels(GLcontext *ctx, GLenum texIntFormat; GLboolean fallback, newTex; GLbitfield metaExtraSave = 0x0; + GLuint vbo; /* * Determine if we can do the glDrawPixels with texture mapping. @@ -1509,32 +1508,6 @@ _mesa_meta_draw_pixels(GLcontext *ctx, META_VIEWPORT | metaExtraSave)); - if (drawpix->ArrayObj == 0) { - /* one-time setup */ - - /* create vertex array object */ - _mesa_GenVertexArrays(1, &drawpix->ArrayObj); - _mesa_BindVertexArray(drawpix->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &drawpix->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, drawpix->VBO); - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), - NULL, GL_DYNAMIC_DRAW_ARB); - - /* setup vertex arrays */ - _mesa_VertexPointer(3, GL_FLOAT, sizeof(verts[0]), - (void *) (0 * sizeof(GLfloat))); - _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(verts[0]), - (void *) (3 * sizeof(GLfloat))); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); - } - else { - _mesa_BindVertexArray(drawpix->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, drawpix->VBO); - } - newTex = alloc_texture(tex, width, height, texIntFormat); /* vertex positions, texcoords (after texture allocation!) */ @@ -1565,10 +1538,27 @@ _mesa_meta_draw_pixels(GLcontext *ctx, verts[3][2] = z; verts[3][3] = 0.0F; verts[3][4] = tex->Ttop; + } - /* upload new vertex data */ - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); + if (drawpix->ArrayObj == 0) { + /* one-time setup: create vertex array object */ + _mesa_GenVertexArrays(1, &drawpix->ArrayObj); } + _mesa_BindVertexArray(drawpix->ArrayObj); + + /* create vertex array buffer */ + _mesa_GenBuffersARB(1, &vbo); + _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, vbo); + _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), + verts, GL_DYNAMIC_DRAW_ARB); + + /* setup vertex arrays */ + _mesa_VertexPointer(3, GL_FLOAT, sizeof(verts[0]), + (void *) (0 * sizeof(GLfloat))); + _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(verts[0]), + (void *) (3 * sizeof(GLfloat))); + _mesa_EnableClientState(GL_VERTEX_ARRAY); + _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); /* set given unpack params */ ctx->Unpack = *unpack; @@ -1639,6 +1629,8 @@ _mesa_meta_draw_pixels(GLcontext *ctx, _mesa_Disable(tex->Target); + _mesa_DeleteBuffersARB(1, &vbo); + /* restore unpack params */ ctx->Unpack = unpackSave; -- cgit v1.2.3 From be66ff51ec98cf583044b3e53a49c41edd803134 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 23 Sep 2009 14:40:45 +0100 Subject: st/mesa: trim calculated userbuffer size In get_array_bounds we were previously defining a user buffer sized as (nr_vertices * stride). The trouble is that if the vertex data occupies less than stride bytes, the extra tailing (stride - size) bytes may extend outside the memory actually allocated by the app and caused a segfault. To fix this, define a the buffer bounds to be: ptr .. ptr + (nr-1)*stride + element_size --- src/mesa/state_tracker/st_draw.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 225541a30ba..11699d5b1ba 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -317,23 +317,29 @@ get_arrays_bounds(const struct st_vertex_program *vp, const GLubyte **low, const GLubyte **high) { const GLubyte *low_addr = NULL; + const GLubyte *high_addr = NULL; GLuint attr; - GLint stride; for (attr = 0; attr < vp->num_inputs; attr++) { const GLuint mesaAttr = vp->index_to_input[attr]; + const GLint stride = arrays[mesaAttr]->StrideB; const GLubyte *start = arrays[mesaAttr]->Ptr; - stride = arrays[mesaAttr]->StrideB; + const unsigned sz = (arrays[mesaAttr]->Size * + _mesa_sizeof_type(arrays[mesaAttr]->Type)); + const GLubyte *end = start + (max_index * stride) + sz; + if (attr == 0) { low_addr = start; + high_addr = end; } else { low_addr = MIN2(low_addr, start); + high_addr = MAX2(high_addr, end); } } *low = low_addr; - *high = low_addr + (max_index + 1) * stride; + *high = high_addr; } -- cgit v1.2.3 From 2d2f49c91952e18f3362346e19b45c72b1f6db32 Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Wed, 23 Sep 2009 14:20:59 +0300 Subject: r600: add support for CUBE textures, also TXP seems to work here ... --- src/mesa/drivers/dri/r600/r700_assembler.c | 306 ++++++++++++++++++++++++----- src/mesa/drivers/dri/r600/r700_assembler.h | 4 + 2 files changed, 263 insertions(+), 47 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index 81269350e43..dc25f3b418b 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -213,7 +213,7 @@ GLboolean is_reduction_opcode(PVSDWORD* dest) { if (dest->dst.op3 == 0) { - if ( (dest->dst.opcode == SQ_OP2_INST_DOT4 || dest->dst.opcode == SQ_OP2_INST_DOT4_IEEE) ) + if ( (dest->dst.opcode == SQ_OP2_INST_DOT4 || dest->dst.opcode == SQ_OP2_INST_DOT4_IEEE || dest->dst.opcode == SQ_OP2_INST_CUBE) ) { return GL_TRUE; } @@ -350,6 +350,7 @@ unsigned int r700GetNumOperands(r700_AssemblerBase* pAsm) case SQ_OP2_INST_PRED_SETNE: case SQ_OP2_INST_DOT4: case SQ_OP2_INST_DOT4_IEEE: + case SQ_OP2_INST_CUBE: return 2; case SQ_OP2_INST_MOV: @@ -469,6 +470,9 @@ int Init_r700_AssemblerBase(SHADER_PIPE_TYPE spt, r700_AssemblerBase* pAsm, R700 pAsm->number_of_inputs = 0; + pAsm->is_tex = GL_FALSE; + pAsm->need_tex_barrier = GL_FALSE; + return 0; } @@ -682,7 +686,7 @@ GLboolean add_tex_instruction(r700_AssemblerBase* pAsm, // If this clause constains any TEX instruction that is dependent on a previous instruction, // set the barrier bit - if( pAsm->pInstDeps[pAsm->uiCurInst].nDstDep > (-1) ) + if( pAsm->pInstDeps[pAsm->uiCurInst].nDstDep > (-1) || pAsm->need_tex_barrier == GL_TRUE ) { pAsm->cf_current_tex_clause_ptr->m_Word1.f.barrier = 0x1; } @@ -1279,42 +1283,48 @@ GLboolean tex_src(r700_AssemblerBase *pAsm) GLboolean bValidTexCoord = GL_FALSE; + if(pAsm->aArgSubst[1] >= 0) + { + bValidTexCoord = GL_TRUE; + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = pAsm->aArgSubst[1]; + } + else + { switch (pILInst->SrcReg[0].File) { - case PROGRAM_CONSTANT: - case PROGRAM_LOCAL_PARAM: - case PROGRAM_ENV_PARAM: - case PROGRAM_STATE_VAR: - bValidTexCoord = GL_TRUE; - setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); - pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; - pAsm->S[0].src.reg = pAsm->aArgSubst[1]; - break; - case PROGRAM_TEMPORARY: - bValidTexCoord = GL_TRUE; - pAsm->S[0].src.reg = pILInst->SrcReg[0].Index + - pAsm->starting_temp_register_number; - pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; - break; - case PROGRAM_INPUT: - switch (pILInst->SrcReg[0].Index) - { - case FRAG_ATTRIB_COL0: - case FRAG_ATTRIB_COL1: - case FRAG_ATTRIB_TEX0: - case FRAG_ATTRIB_TEX1: - case FRAG_ATTRIB_TEX2: - case FRAG_ATTRIB_TEX3: - case FRAG_ATTRIB_TEX4: - case FRAG_ATTRIB_TEX5: - case FRAG_ATTRIB_TEX6: - case FRAG_ATTRIB_TEX7: - bValidTexCoord = GL_TRUE; - pAsm->S[0].src.reg = - pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index]; - pAsm->S[0].src.rtype = SRC_REG_INPUT; - break; - } - break; + case PROGRAM_CONSTANT: + case PROGRAM_LOCAL_PARAM: + case PROGRAM_ENV_PARAM: + case PROGRAM_STATE_VAR: + break; + case PROGRAM_TEMPORARY: + bValidTexCoord = GL_TRUE; + pAsm->S[0].src.reg = pILInst->SrcReg[0].Index + + pAsm->starting_temp_register_number; + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + break; + case PROGRAM_INPUT: + switch (pILInst->SrcReg[0].Index) + { + case FRAG_ATTRIB_COL0: + case FRAG_ATTRIB_COL1: + case FRAG_ATTRIB_TEX0: + case FRAG_ATTRIB_TEX1: + case FRAG_ATTRIB_TEX2: + case FRAG_ATTRIB_TEX3: + case FRAG_ATTRIB_TEX4: + case FRAG_ATTRIB_TEX5: + case FRAG_ATTRIB_TEX6: + case FRAG_ATTRIB_TEX7: + bValidTexCoord = GL_TRUE; + pAsm->S[0].src.reg = + pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index]; + pAsm->S[0].src.rtype = SRC_REG_INPUT; + break; + } + break; + } } if(GL_TRUE == bValidTexCoord) @@ -2082,7 +2092,9 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm) { is_single_scalar_operation = GL_FALSE; number_of_scalar_operations = 4; - + +/* current assembler doesn't do more than 1 register per source */ +#if 0 /* check read port, only very preliminary algorithm, not count in src0/1 same comp case and prev slot repeat case; also not count relative addressing. TODO: improve performance. */ @@ -2117,6 +2129,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm) { bSplitInst = GL_TRUE; } +#endif } contiguous_slots_needed = 0; @@ -2337,9 +2350,7 @@ GLboolean next_ins(r700_AssemblerBase *pAsm) { struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]); - if( GL_TRUE == IsTex(pILInst->Opcode) && - /* handle const moves to temp register */ - !(pAsm->D.dst.opcode == SQ_OP2_INST_MOV) ) + if( GL_TRUE == pAsm->is_tex ) { if (pILInst->TexSrcTarget == TEXTURE_RECT_INDEX) { if( GL_FALSE == assemble_tex_instruction(pAsm, GL_FALSE) ) @@ -2383,7 +2394,8 @@ GLboolean next_ins(r700_AssemblerBase *pAsm) pAsm->S[0].bits = 0; pAsm->S[1].bits = 0; pAsm->S[2].bits = 0; - + pAsm->is_tex = GL_FALSE; + pAsm->need_tex_barrier = GL_FALSE; return GL_TRUE; } @@ -3506,7 +3518,10 @@ GLboolean assemble_STP(r700_AssemblerBase *pAsm) GLboolean assemble_TEX(r700_AssemblerBase *pAsm) { GLboolean src_const; + GLboolean need_barrier = GL_FALSE; + checkop1(pAsm); + switch (pAsm->pILInst[pAsm->uiCurInst].SrcReg[0].File) { case PROGRAM_CONSTANT: @@ -3526,20 +3541,18 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) { if ( GL_FALSE == mov_temp(pAsm, 0) ) return GL_FALSE; + need_barrier = GL_TRUE; } switch (pAsm->pILInst[pAsm->uiCurInst].Opcode) { case OPCODE_TEX: - pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; break; case OPCODE_TXB: radeon_error("do not support TXB yet\n"); return GL_FALSE; break; case OPCODE_TXP: - /* TODO : tex proj version : divid first 3 components by 4th */ - pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; break; default: radeon_error("Internal error: bad texture op (not TEX)\n"); @@ -3547,6 +3560,190 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) break; } + if (pAsm->pILInst[pAsm->uiCurInst].Opcode == OPCODE_TXP) + { + GLuint tmp = gethelpr(pAsm); + pAsm->D.dst.opcode = SQ_OP2_INST_RECIP_IEEE; + pAsm->D.dst.math = 1; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp; + pAsm->D.dst.writew = 1; + + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + swizzleagain_PVSSRC(&(pAsm->S[0].src), SQ_SEL_W, SQ_SEL_W, SQ_SEL_W, SQ_SEL_W); + if( GL_FALSE == next_ins(pAsm) ) + { + return GL_FALSE; + } + + pAsm->D.dst.opcode = SQ_OP2_INST_MUL; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp; + pAsm->D.dst.writex = 1; + pAsm->D.dst.writey = 1; + pAsm->D.dst.writez = 1; + pAsm->D.dst.writew = 0; + + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); + pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[1].src.reg = tmp; + setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_W); + + if( GL_FALSE == next_ins(pAsm) ) + { + return GL_FALSE; + } + + pAsm->aArgSubst[1] = tmp; + need_barrier = GL_TRUE; + } + + if (pAsm->pILInst[pAsm->uiCurInst].TexSrcTarget == TEXTURE_CUBE_INDEX ) + { + GLuint tmp1 = gethelpr(pAsm); + GLuint tmp2 = gethelpr(pAsm); + + /* tmp1.xyzw = CUBE(R0.zzxy, R0.yxzz) */ + pAsm->D.dst.opcode = SQ_OP2_INST_CUBE; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp1; + nomask_PVSDST(&(pAsm->D.dst)); + + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + + if( GL_FALSE == assemble_src(pAsm, 0, 1) ) + { + return GL_FALSE; + } + + swizzleagain_PVSSRC(&(pAsm->S[0].src), SQ_SEL_Z, SQ_SEL_Z, SQ_SEL_X, SQ_SEL_Y); + swizzleagain_PVSSRC(&(pAsm->S[1].src), SQ_SEL_Y, SQ_SEL_X, SQ_SEL_Z, SQ_SEL_Z); + + if( GL_FALSE == next_ins(pAsm) ) + { + return GL_FALSE; + } + + /* tmp1.z = ABS(tmp1.z) dont have abs support in assembler currently + * have to do explicit instruction + */ + pAsm->D.dst.opcode = SQ_OP2_INST_MAX; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp1; + pAsm->D.dst.writez = 1; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp1; + noswizzle_PVSSRC(&(pAsm->S[0].src)); + pAsm->S[1].bits = pAsm->S[0].bits; + flipneg_PVSSRC(&(pAsm->S[1].src)); + + next_ins(pAsm); + + /* tmp1.z = RCP_e(|tmp1.z|) */ + pAsm->D.dst.opcode = SQ_OP2_INST_RECIP_IEEE; + pAsm->D.dst.math = 1; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp1; + pAsm->D.dst.writez = 1; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp1; + pAsm->S[0].src.swizzlex = SQ_SEL_Z; + + next_ins(pAsm); + + /* MULADD R0.x, R0.x, PS1, (0x3FC00000, 1.5f).x + * MULADD R0.y, R0.y, PS1, (0x3FC00000, 1.5f).x + * muladd has no writemask, have to use another temp + * also no support for imm constants, so add 1 here + */ + pAsm->D.dst.opcode = SQ_OP3_INST_MULADD; + pAsm->D.dst.op3 = 1; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp2; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp1; + noswizzle_PVSSRC(&(pAsm->S[0].src)); + setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); + pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[1].src.reg = tmp1; + setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_Z); + setaddrmode_PVSSRC(&(pAsm->S[2].src), ADDR_ABSOLUTE); + pAsm->S[2].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[2].src.reg = tmp1; + setswizzle_PVSSRC(&(pAsm->S[2].src), SQ_SEL_1); + + next_ins(pAsm); + + /* ADD the remaining .5 */ + pAsm->D.dst.opcode = SQ_OP2_INST_ADD; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp2; + pAsm->D.dst.writex = 1; + pAsm->D.dst.writey = 1; + pAsm->D.dst.writez = 0; + pAsm->D.dst.writew = 0; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp2; + noswizzle_PVSSRC(&(pAsm->S[0].src)); + setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); + pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[1].src.reg = 252; // SQ_ALU_SRC_0_5 + noswizzle_PVSSRC(&(pAsm->S[1].src)); + + next_ins(pAsm); + + /* tmp1.xy = temp2.xy */ + pAsm->D.dst.opcode = SQ_OP2_INST_MOV; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp1; + pAsm->D.dst.writex = 1; + pAsm->D.dst.writey = 1; + pAsm->D.dst.writez = 0; + pAsm->D.dst.writew = 0; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp2; + noswizzle_PVSSRC(&(pAsm->S[0].src)); + + next_ins(pAsm); + pAsm->aArgSubst[1] = tmp1; + need_barrier = GL_TRUE; + + } + + pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; + pAsm->is_tex = GL_TRUE; + if ( GL_TRUE == need_barrier ) + { + pAsm->need_tex_barrier = GL_TRUE; + } // Set src1 to tex unit id pAsm->S[1].src.reg = pAsm->pILInst[pAsm->uiCurInst].TexSrcUnit; pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; @@ -3567,10 +3764,25 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) return GL_FALSE; } - if ( GL_FALSE == next_ins(pAsm) ) + if(pAsm->pILInst[pAsm->uiCurInst].Opcode == OPCODE_TXP) { - return GL_FALSE; + /* hopefully did swizzles before */ + noswizzle_PVSSRC(&(pAsm->S[0].src)); } + + if(pAsm->pILInst[pAsm->uiCurInst].TexSrcTarget == TEXTURE_CUBE_INDEX) + { + /* SAMPLE dst, tmp.yxwy, CUBE */ + pAsm->S[0].src.swizzlex = SQ_SEL_Y; + pAsm->S[0].src.swizzley = SQ_SEL_X; + pAsm->S[0].src.swizzlez = SQ_SEL_W; + pAsm->S[0].src.swizzlew = SQ_SEL_Y; + } + + if ( GL_FALSE == next_ins(pAsm) ) + { + return GL_FALSE; + } return GL_TRUE; } diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h index 4e6e20011ad..bd6df94ff95 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.h +++ b/src/mesa/drivers/dri/r600/r700_assembler.h @@ -374,6 +374,10 @@ typedef struct r700_AssemblerBase struct prog_instruction * pILInst; GLuint uiCurInst; GLboolean bR6xx; + /* helper to decide which type of instruction to assemble */ + GLboolean is_tex; + /* we inserted helper intructions and need barrier on next TEX ins */ + GLboolean need_tex_barrier; } r700_AssemblerBase; //Internal use -- cgit v1.2.3 From ec205bbd577a2619e4b1910527e5e5d1d7426ddb Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 23 Sep 2009 14:56:56 -0400 Subject: r600: fix some warnings --- src/mesa/drivers/dri/r600/r700_assembler.c | 6 +++--- src/mesa/drivers/dri/r600/r700_assembler.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index dc25f3b418b..903b6968be1 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -2078,9 +2078,9 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm) GLuint contiguous_slots_needed; GLuint uNumSrc = r700GetNumOperands(pAsm); - GLuint channel_swizzle, j; - GLuint chan_counter[4] = {0, 0, 0, 0}; - PVSSRC * pSource[3]; + //GLuint channel_swizzle, j; + //GLuint chan_counter[4] = {0, 0, 0, 0}; + //PVSSRC * pSource[3]; GLboolean bSplitInst = GL_FALSE; if (1 == pAsm->D.dst.math) diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h index bd6df94ff95..0d4283e4bad 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.h +++ b/src/mesa/drivers/dri/r600/r700_assembler.h @@ -423,6 +423,7 @@ GLboolean assemble_vfetch_instruction2(r700_AssemblerBase* pAsm, GLuint _signed, GLboolean normalize, VTX_FETCH_METHOD * pFetchMethod); +GLboolean cleanup_vfetch_instructions(r700_AssemblerBase* pAsm); GLuint gethelpr(r700_AssemblerBase* pAsm); void resethelpr(r700_AssemblerBase* pAsm); void checkop_init(r700_AssemblerBase* pAsm); -- cgit v1.2.3 From 53051b8cb5b4804e3eab21262c91ea59f1ea24b8 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 23 Sep 2009 15:02:19 -0400 Subject: r600: fix copy/paste typo --- src/mesa/drivers/dri/r600/r700_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index b58859b6ba3..daa05f653dc 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -855,7 +855,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer if(context->ind_buf.bHostIb != GL_TRUE) { - radeonAllocDmaRegion(&context->radeon, &r300->ind_buf.bo, + radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, &context->ind_buf.bo_offset, size, 4); assert(context->ind_buf.bo->ptr != NULL); -- cgit v1.2.3 From 8abe77a75a681637cb00017711f5009601bcd348 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 23 Sep 2009 15:22:19 -0400 Subject: Finish removing glcore --- src/mesa/drivers/dri/glcore/Makefile | 84 ------------------------------------ 1 file changed, 84 deletions(-) delete mode 100644 src/mesa/drivers/dri/glcore/Makefile (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/glcore/Makefile b/src/mesa/drivers/dri/glcore/Makefile deleted file mode 100644 index ac7e1de9285..00000000000 --- a/src/mesa/drivers/dri/glcore/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# src/mesa/drivers/dri/glcore/Makefile - -TOP = ../../../../.. -include $(TOP)/configs/current - -LIBNAME = glcore_dri.so - -DRIVER_SOURCES = glcore_driver.c \ - $(TOP)/src/mesa/drivers/common/driverfuncs.c \ - ../common/dri_util.c - -C_SOURCES = \ - $(DRIVER_SOURCES) \ - $(DRI_SOURCES) - - -# Include directories -INCLUDE_DIRS = \ - -I. \ - -I../common \ - -I../dri_client \ - -I../dri_client/imports \ - -Iserver \ - -I$(TOP)/include \ - -I$(DRM_SOURCE_PATH)/shared-core \ - -I$(TOP)/src/mesa \ - -I$(TOP)/src/mesa/main \ - -I$(TOP)/src/mesa/glapi \ - -I$(TOP)/src/mesa/math \ - -I$(TOP)/src/mesa/transform \ - -I$(TOP)/src/mesa/shader \ - -I$(TOP)/src/mesa/swrast \ - -I$(TOP)/src/mesa/swrast_setup - -# Core Mesa objects -MESA_MODULES = $(TOP)/src/mesa/libmesa.a - -# Libraries that the driver shared lib depends on -LIB_DEPS = -lm -lpthread -lc -# LIB_DEPS = -lGL -lm -lpthread -lc - - -ASM_SOURCES = - -OBJECTS = $(C_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) - - -##### RULES ##### - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@ - - -##### TARGETS ##### - -default: depend $(TOP)/$(LIB_DIR)/$(LIBNAME) - - -$(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile - CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(TOP)/$(LIB_DIR) \ - $(OBJECTS) $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) - - -depend: $(C_SOURCES) $(ASM_SOURCES) - rm -f depend - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \ - > /dev/null - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find ../include` - - -clean: - -rm -f *.o server/*.o - - -include depend -- cgit v1.2.3 From ad935c3f4708417641dd3c257912ccce11485acc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 23 Sep 2009 12:54:14 -0600 Subject: swrast: fix typo in partial derivatives parameter passing --- src/mesa/swrast/s_fragprog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index b71fb9eae97..144f78b024a 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -108,7 +108,7 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4], lambda = _swrast_compute_lambda(texdx[0], texdy[0], /* ds/dx, ds/dy */ texdx[1], texdy[1], /* dt/dx, dt/dy */ - texdx[3], texdy[2], /* dq/dx, dq/dy */ + texdx[3], texdy[3], /* dq/dx, dq/dy */ texW, texH, texcoord[0], texcoord[1], texcoord[3], 1.0F / texcoord[3]) + lodBias; -- cgit v1.2.3 From 890f37d4d96471a5c3d8ae286dfc13ad18ff78e5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 23 Sep 2009 13:34:30 -0600 Subject: mesa: don't bias LOD in shader interpreter; do it in swrast --- src/mesa/shader/prog_execute.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 68a59350a13..7cb463cd07f 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -1527,17 +1527,12 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_TXB: /* GL_ARB_fragment_program only */ /* Texel lookup with LOD bias */ { - const GLuint unit = machine->Samplers[inst->TexSrcUnit]; - const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; GLfloat texcoord[4], color[4], lodBias; fetch_vector4(&inst->SrcReg[0], machine, texcoord); /* texcoord[3] is the bias to add to lambda */ - lodBias = texUnit->LodBias + texcoord[3]; - if (texUnit->_Current) { - lodBias += texUnit->_Current->LodBias; - } + lodBias = texcoord[3]; fetch_texel(ctx, machine, inst, texcoord, lodBias, color); -- cgit v1.2.3 From 2acd5de22651a3461c0576107c8e8fab1f01469a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 23 Sep 2009 13:35:03 -0600 Subject: swrast: add lod bias when texture sampling Mostly fixes progs/demos/lodbias when MESA_TEX_PROG=1. But the LOD still seems off by -1 or so. May be an issue with the params passed to _swrast_compute_lambda() --- src/mesa/swrast/s_fragprog.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 144f78b024a..b326acf3e3c 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -89,6 +89,8 @@ fetch_texel_lod( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, * Fetch a texel with the given partial derivatives to compute a level * of detail in the mipmap. * Called via machine->FetchTexelDeriv() + * \param lodBias the lod bias which may be specified by a TXB instruction, + * otherwise zero. */ static void fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4], @@ -96,7 +98,8 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lodBias, GLuint unit, GLfloat color[4] ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); - const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + const struct gl_texture_object *texObj = texUnit->_Current; if (texObj) { const struct gl_texture_image *texImg = @@ -111,7 +114,9 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4], texdx[3], texdy[3], /* dq/dx, dq/dy */ texW, texH, texcoord[0], texcoord[1], texcoord[3], - 1.0F / texcoord[3]) + lodBias; + 1.0F / texcoord[3]); + + lambda += lodBias + texUnit->LodBias + texObj->LodBias; lambda = CLAMP(lambda, texObj->MinLod, texObj->MaxLod); -- cgit v1.2.3 From 8a2b0f6415654c03cd399e59b0946ab90dc44331 Mon Sep 17 00:00:00 2001 From: Richard Li Date: Wed, 23 Sep 2009 16:10:20 -0400 Subject: r600 : add hw index buffer draw support. --- src/mesa/drivers/dri/r600/r700_render.c | 73 +++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 12 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index daa05f653dc..1f7a76e538c 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -262,6 +262,16 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *vb = &tnl->vb; + GLboolean bUseDrawIndex; + if( (NULL != context->ind_buf.bo) && (GL_TRUE != context->ind_buf.bHostIb) ) + { + bUseDrawIndex = GL_TRUE; + } + else + { + bUseDrawIndex = GL_FALSE; + } + type = r700PrimitiveType(prim); num_indices = r700NumVerts(end - start, prim); @@ -272,10 +282,20 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim if (type < 0 || num_indices <= 0) return; - total_emit = 3 /* VGT_PRIMITIVE_TYPE */ - + 2 /* VGT_INDEX_TYPE */ - + 2 /* NUM_INSTANCES */ + if(GL_TRUE == bUseDrawIndex) + { + total_emit = 3 /* VGT_PRIMITIVE_TYPE */ + + 2 /* VGT_INDEX_TYPE */ + + 2 /* NUM_INSTANCES */ + + 5+2; /* DRAW_INDEX */ + } + else + { + total_emit = 3 /* VGT_PRIMITIVE_TYPE */ + + 2 /* VGT_INDEX_TYPE */ + + 2 /* NUM_INSTANCES */ + num_indices + 3; /* DRAW_INDEX_IMMD */ + } BEGIN_BATCH_NO_AUTOSTATE(total_emit); // prim @@ -287,6 +307,15 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim // index type SETfield(vgt_index_type, DI_INDEX_SIZE_32_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask); + + if(GL_TRUE == bUseDrawIndex) + { + if(GL_TRUE != context->ind_buf.is_32bit) + { + SETfield(vgt_index_type, DI_INDEX_SIZE_16_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask); + } + } + R600_OUT_BATCH(CP_PACKET3(R600_IT_INDEX_TYPE, 0)); R600_OUT_BATCH(vgt_index_type); @@ -296,12 +325,36 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim // draw packet vgt_num_indices = num_indices; - SETfield(vgt_draw_initiator, DI_SRC_SEL_IMMEDIATE, SOURCE_SELECT_shift, SOURCE_SELECT_mask); + + if(GL_TRUE == bUseDrawIndex) + { + SETfield(vgt_draw_initiator, DI_SRC_SEL_DMA, SOURCE_SELECT_shift, SOURCE_SELECT_mask); + } + else + { + SETfield(vgt_draw_initiator, DI_SRC_SEL_IMMEDIATE, SOURCE_SELECT_shift, SOURCE_SELECT_mask); + } + SETfield(vgt_draw_initiator, DI_MAJOR_MODE_0, MAJOR_MODE_shift, MAJOR_MODE_mask); - R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_IMMD, (num_indices + 1))); - R600_OUT_BATCH(vgt_num_indices); - R600_OUT_BATCH(vgt_draw_initiator); + if(GL_TRUE == bUseDrawIndex) + { + R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX, 3)); + R600_OUT_BATCH(context->ind_buf.bo_offset); + R600_OUT_BATCH(0); + R600_OUT_BATCH(vgt_num_indices); + R600_OUT_BATCH(vgt_draw_initiator); + R600_OUT_BATCH_RELOC(context->ind_buf.bo_offset, + context->ind_buf.bo, + context->ind_buf.bo_offset, + RADEON_GEM_DOMAIN_GTT, 0, 0); + } + else + { + R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_IMMD, (num_indices + 1))); + R600_OUT_BATCH(vgt_num_indices); + R600_OUT_BATCH(vgt_draw_initiator); + } if(NULL == context->ind_buf.bo) { @@ -340,10 +393,6 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim } } } - else - { - /* TODO : hw ib draw */ - } } END_BATCH(); @@ -899,7 +948,7 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer return; } - context->ind_buf.bHostIb = GL_TRUE; + context->ind_buf.bHostIb = GL_FALSE; #if MESA_BIG_ENDIAN if (mesa_ind_buf->type == GL_UNSIGNED_INT) -- cgit v1.2.3 From 20e77382935b24e9e2be89cd2b686fa2f1f67635 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 23 Sep 2009 16:54:12 -0400 Subject: r600: fix r700PredictRenderSize for draw prims path --- src/mesa/drivers/dri/r600/r700_render.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 1f7a76e538c..bdf0bfc0e43 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -402,12 +402,10 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim /* start 3d, idle, cb/db flush */ #define PRE_EMIT_STATE_BUFSZ 10 + 5 + 14 -static GLuint r700PredictRenderSize(GLcontext* ctx) +static GLuint r700PredictRenderSize(GLcontext* ctx, GLuint nr_prims) { context_t *context = R700_CONTEXT(ctx); - TNLcontext *tnl = TNL_CONTEXT(ctx); struct r700_vertex_program *vp = context->selected_vp; - struct vertex_buffer *vb = &tnl->vb; GLboolean flushed; GLuint dwords, i; GLuint state_size; @@ -415,8 +413,15 @@ static GLuint r700PredictRenderSize(GLcontext* ctx) context->radeon.tcl.aos_count = _mesa_bitcount(vp->mesa_program->Base.InputsRead); dwords = PRE_EMIT_STATE_BUFSZ; - for (i = 0; i < vb->PrimitiveCount; i++) - dwords += vb->Primitive[i].count + 10; + if (nr_prims) + dwords += nr_prims * 14; + else { + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *vb = &tnl->vb; + + for (i = 0; i < vb->PrimitiveCount; i++) + dwords += vb->Primitive[i].count + 10; + } state_size = radeonCountStateEmitSize(&context->radeon); flushed = rcommonEnsureCmdBufSpace(&context->radeon, dwords + state_size, __FUNCTION__); @@ -456,7 +461,7 @@ static GLboolean r700RunRender(GLcontext * ctx, r700SetupFragmentProgram(ctx); r600UpdateTextureState(ctx); - GLuint emit_end = r700PredictRenderSize(ctx) + GLuint emit_end = r700PredictRenderSize(ctx, 0) + context->radeon.cmdbuf.cs->cdw; r700SetupStreams(ctx); @@ -1044,7 +1049,7 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx, r600UpdateTextureState(ctx); - GLuint emit_end = r700PredictRenderSize(ctx) + GLuint emit_end = r700PredictRenderSize(ctx, nr_prims) + context->radeon.cmdbuf.cs->cdw; r700SetupIndexBuffer(ctx, ib); -- cgit v1.2.3 From 84c7afd9e0f2df72d90dd82d38384c4f2f45173e Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sat, 19 Sep 2009 18:45:59 +0200 Subject: r300: fallback to software rendering if we are out of free texcoords Fixes #22741 --- src/mesa/drivers/dri/r300/r300_fragprog_common.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c index 469c278b510..0bdc90b4a84 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c @@ -99,8 +99,8 @@ static void insert_WPOS_trailer(struct r300_fragment_program_compiler *compiler, { int i; + fp->wpos_attr = FRAG_ATTRIB_MAX; if (!(compiler->Base.Program.InputsRead & FRAG_BIT_WPOS)) { - fp->wpos_attr = FRAG_ATTRIB_MAX; return; } @@ -112,6 +112,13 @@ static void insert_WPOS_trailer(struct r300_fragment_program_compiler *compiler, } } + /* No free texcoord found, fall-back to software rendering */ + if (fp->wpos_attr == FRAG_ATTRIB_MAX) + { + compiler->Base.Error = 1; + return; + } + rc_transform_fragment_wpos(&compiler->Base, FRAG_ATTRIB_WPOS, fp->wpos_attr); } @@ -127,8 +134,8 @@ static void rewriteFog(struct r300_fragment_program_compiler *compiler, struct r struct prog_src_register src; int i; + fp->fog_attr = FRAG_ATTRIB_MAX; if (!(compiler->Base.Program.InputsRead & FRAG_BIT_FOGC)) { - fp->fog_attr = FRAG_ATTRIB_MAX; return; } @@ -140,6 +147,13 @@ static void rewriteFog(struct r300_fragment_program_compiler *compiler, struct r } } + /* No free texcoord found, fall-back to software rendering */ + if (fp->fog_attr == FRAG_ATTRIB_MAX) + { + compiler->Base.Error = 1; + return; + } + memset(&src, 0, sizeof(src)); src.File = PROGRAM_INPUT; src.Index = fp->fog_attr; -- cgit v1.2.3 From 1bf0651d9b58a5c150fcf37016ae1bda425bb05a Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 23 Sep 2009 19:42:07 -0400 Subject: r600: fix up ordering of functions in draw prims path Shaders and IB need to be updated and allocated before calling validatebuffers. --- src/mesa/drivers/dri/r600/r700_render.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index bdf0bfc0e43..bbe364bc6aa 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -1019,7 +1019,6 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx, context_t *context = R700_CONTEXT(ctx); radeonContextPtr radeon = &context->radeon; GLuint i, id = 0; - GLboolean bValidedbuffer; struct radeon_renderbuffer *rrb; if (ctx->NewState) @@ -1027,7 +1026,13 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx, _mesa_update_state( ctx ); } - bValidedbuffer = r600ValidateBuffers(ctx); + _tnl_UpdateFixedFunctionProgram(ctx); + r700SetVertexFormat(ctx, arrays, max_index + 1); + r700SetupIndexBuffer(ctx, ib); + /* shaders need to be updated before buffers are validated */ + r700UpdateShaders2(ctx); + if (!r600ValidateBuffers(ctx)) + return GL_FALSE; /* always emit CB base to prevent * lock ups on some chips. @@ -1036,34 +1041,28 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx, /* mark vtx as dirty since it changes per-draw */ R600_STATECHANGE(context, vtx); - _tnl_UpdateFixedFunctionProgram(ctx); - r700SetVertexFormat(ctx, arrays, max_index + 1); - r700SetupStreams2(ctx, arrays, max_index + 1); - r700UpdateShaders2(ctx); - r700SetScissor(context); - r700SetupVertexProgram(ctx); - r700SetupFragmentProgram(ctx); - r600UpdateTextureState(ctx); GLuint emit_end = r700PredictRenderSize(ctx, nr_prims) + context->radeon.cmdbuf.cs->cdw; - r700SetupIndexBuffer(ctx, ib); + r700SetupStreams2(ctx, arrays, max_index + 1); radeonEmitState(radeon); - for (i = 0; i < nr_prims; ++i) + radeon_debug_add_indent(); + for (i = 0; i < nr_prims; ++i) { - r700RunRenderPrimitive(ctx, - prim[i].start, - prim[i].start + prim[i].count, + r700RunRenderPrimitive(ctx, + prim[i].start, + prim[i].start + prim[i].count, prim[i].mode); } - + radeon_debug_remove_indent(); + /* Flush render op cached for last several quads. */ r700WaitForIdleClean(context); -- cgit v1.2.3 From 622bdecabd73167d2f2f3aff0e223a8c64433f99 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 24 Sep 2009 12:36:11 +0100 Subject: mesa: Fix missing finite symbol error on Windows. Caused by some weird logic regarding the __WIN32__ define which made the finite definition dependent on the header include order. --- src/mesa/main/compiler.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 9319505a75d..380663ec971 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -107,8 +107,7 @@ extern "C" { /** * finite macro. */ -#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP) -# define __WIN32__ +#if defined(_MSC_VER) # define finite _finite #elif defined(__WATCOMC__) # define finite _finite -- cgit v1.2.3 From cbab3d7f2a77f187fb688593c17396d4967c75b5 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 8 Sep 2009 16:03:25 -0400 Subject: r600: fix dri2 clipping --- src/mesa/drivers/dri/r600/r700_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index 1f4724e8384..2a0b4192562 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -1272,8 +1272,8 @@ void r700SetScissor(context_t *context) //--------------- if (context->radeon.radeonScreen->driScreen->dri2.enabled) { x1 = 0; y1 = 0; - x2 = rrb->base.Width - 1; - y2 = rrb->base.Height - 1; + x2 = rrb->base.Width; + y2 = rrb->base.Height; } else { x1 = rrb->dPriv->x; y1 = rrb->dPriv->y; -- cgit v1.2.3 From b1e417413f2da8aad1872fa009949da101156431 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 9 Sep 2009 15:02:16 +1000 Subject: r600: don't setup hardware state if TFP if we have a BO here it means TFP and we should have set it up already. tested by b0le on #radeon --- src/mesa/drivers/dri/r600/r600_texstate.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c index 49b603b65e1..6436a5d7e9b 100644 --- a/src/mesa/drivers/dri/r600/r600_texstate.c +++ b/src/mesa/drivers/dri/r600/r600_texstate.c @@ -565,6 +565,10 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex int firstlevel = t->mt ? t->mt->firstLevel : 0; GLuint uTexelPitch, row_align; + if ( t->bo ) { + return GL_TRUE; + } + firstImage = t->base.Image[0][firstlevel]; if (!t->image_override) { -- cgit v1.2.3 From 65b01d449cc594e1c7e1a44c5d87fdc698300e9a Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 9 Sep 2009 01:41:46 -0400 Subject: r600: fix ftp for dri1 We use t->bo for dri1 since r600 uses CS for dri1. --- src/mesa/drivers/dri/r600/r600_texstate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c index 6436a5d7e9b..f30dd112301 100644 --- a/src/mesa/drivers/dri/r600/r600_texstate.c +++ b/src/mesa/drivers/dri/r600/r600_texstate.c @@ -565,9 +565,10 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex int firstlevel = t->mt ? t->mt->firstLevel : 0; GLuint uTexelPitch, row_align; - if ( t->bo ) { - return GL_TRUE; - } + if (rmesa->radeon.radeonScreen->driScreen->dri2.enabled && + t->image_override && + t->bo) + return; firstImage = t->base.Image[0][firstlevel]; -- cgit v1.2.3 From 6552a103f903a2b767464cd2d267f706a6baf7d5 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 9 Sep 2009 11:14:17 -0400 Subject: r600: check if textures are actually enabled before submission noticed by taiu on IRC. --- src/mesa/drivers/dri/r600/r600_texstate.c | 2 +- src/mesa/drivers/dri/r600/r700_chip.c | 118 ++++++++++++++++-------------- 2 files changed, 64 insertions(+), 56 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c index f30dd112301..bcb8d7c73d7 100644 --- a/src/mesa/drivers/dri/r600/r600_texstate.c +++ b/src/mesa/drivers/dri/r600/r600_texstate.c @@ -69,7 +69,7 @@ void r600UpdateTextureState(GLcontext * ctx) for (unit = 0; unit < R700_MAX_TEXTURE_UNITS; unit++) { texUnit = &ctx->Texture.Unit[unit]; t = radeon_tex_obj(ctx->Texture.Unit[unit]._Current); - + r700->textures[unit] = NULL; if (texUnit->_ReallyEnabled) { if (!t) continue; diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c index 37bff56f5a9..312cacffda3 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.c +++ b/src/mesa/drivers/dri/r600/r700_chip.c @@ -52,38 +52,40 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom) radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__); for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) { - radeonTexObj *t = r700->textures[i]; - if (t) { - if (!t->image_override) - bo = t->mt->bo; - else - bo = t->bo; - if (bo) { - - r700SyncSurf(context, bo, - RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, - 0, TC_ACTION_ENA_bit); - - BEGIN_BATCH_NO_AUTOSTATE(9 + 4); - R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_RESOURCE, 7)); - R600_OUT_BATCH(i * 7); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE0); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE1); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE2); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE3); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE4); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE5); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE6); - R600_OUT_BATCH_RELOC(r700->textures[i]->SQ_TEX_RESOURCE2, - bo, - 0, - RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0); - R600_OUT_BATCH_RELOC(r700->textures[i]->SQ_TEX_RESOURCE3, - bo, - r700->textures[i]->SQ_TEX_RESOURCE3, - RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0); - END_BATCH(); - COMMIT_BATCH(); + if (ctx->Texture.Unit[i]._ReallyEnabled) { + radeonTexObj *t = r700->textures[i]; + if (t) { + if (!t->image_override) + bo = t->mt->bo; + else + bo = t->bo; + if (bo) { + + r700SyncSurf(context, bo, + RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, + 0, TC_ACTION_ENA_bit); + + BEGIN_BATCH_NO_AUTOSTATE(9 + 4); + R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_RESOURCE, 7)); + R600_OUT_BATCH(i * 7); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE0); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE1); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE2); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE3); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE4); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE5); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE6); + R600_OUT_BATCH_RELOC(r700->textures[i]->SQ_TEX_RESOURCE2, + bo, + 0, + RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0); + R600_OUT_BATCH_RELOC(r700->textures[i]->SQ_TEX_RESOURCE3, + bo, + r700->textures[i]->SQ_TEX_RESOURCE3, + RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0); + END_BATCH(); + COMMIT_BATCH(); + } } } } @@ -98,16 +100,18 @@ static void r700SendTexSamplerState(GLcontext *ctx, struct radeon_state_atom *at radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__); for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) { - radeonTexObj *t = r700->textures[i]; - if (t) { - BEGIN_BATCH_NO_AUTOSTATE(5); - R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_SAMPLER, 3)); - R600_OUT_BATCH(i * 3); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER0); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER1); - R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER2); - END_BATCH(); - COMMIT_BATCH(); + if (ctx->Texture.Unit[i]._ReallyEnabled) { + radeonTexObj *t = r700->textures[i]; + if (t) { + BEGIN_BATCH_NO_AUTOSTATE(5); + R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_SAMPLER, 3)); + R600_OUT_BATCH(i * 3); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER0); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER1); + R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER2); + END_BATCH(); + COMMIT_BATCH(); + } } } } @@ -121,16 +125,18 @@ static void r700SendTexBorderColorState(GLcontext *ctx, struct radeon_state_atom radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__); for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) { - radeonTexObj *t = r700->textures[i]; - if (t) { - BEGIN_BATCH_NO_AUTOSTATE(2 + 4); - R600_OUT_BATCH_REGSEQ((TD_PS_SAMPLER0_BORDER_RED + (i * 16)), 4); - R600_OUT_BATCH(r700->textures[i]->TD_PS_SAMPLER0_BORDER_RED); - R600_OUT_BATCH(r700->textures[i]->TD_PS_SAMPLER0_BORDER_GREEN); - R600_OUT_BATCH(r700->textures[i]->TD_PS_SAMPLER0_BORDER_BLUE); - R600_OUT_BATCH(r700->textures[i]->TD_PS_SAMPLER0_BORDER_ALPHA); - END_BATCH(); - COMMIT_BATCH(); + if (ctx->Texture.Unit[i]._ReallyEnabled) { + radeonTexObj *t = r700->textures[i]; + if (t) { + BEGIN_BATCH_NO_AUTOSTATE(2 + 4); + R600_OUT_BATCH_REGSEQ((TD_PS_SAMPLER0_BORDER_RED + (i * 16)), 4); + R600_OUT_BATCH(r700->textures[i]->TD_PS_SAMPLER0_BORDER_RED); + R600_OUT_BATCH(r700->textures[i]->TD_PS_SAMPLER0_BORDER_GREEN); + R600_OUT_BATCH(r700->textures[i]->TD_PS_SAMPLER0_BORDER_BLUE); + R600_OUT_BATCH(r700->textures[i]->TD_PS_SAMPLER0_BORDER_ALPHA); + END_BATCH(); + COMMIT_BATCH(); + } } } } @@ -1176,9 +1182,11 @@ static int check_tx(GLcontext *ctx, struct radeon_state_atom *atom) R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) { - radeonTexObj *t = r700->textures[i]; - if (t) - count++; + if (ctx->Texture.Unit[i]._ReallyEnabled) { + radeonTexObj *t = r700->textures[i]; + if (t) + count++; + } } radeon_print(RADEON_STATE, RADEON_TRACE, "%s %d\n", __func__, count); return count * 31; -- cgit v1.2.3 From 9edd1a441c3c0c3f018ae561cd5711398ca56f95 Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Fri, 11 Sep 2009 10:59:05 -0400 Subject: r600: enable caching of vertex programs --- src/mesa/drivers/dri/r600/r600_context.h | 3 + src/mesa/drivers/dri/r600/r700_chip.c | 10 ++- src/mesa/drivers/dri/r600/r700_oglprog.c | 36 ++++++----- src/mesa/drivers/dri/r600/r700_render.c | 9 +-- src/mesa/drivers/dri/r600/r700_vertprog.c | 103 ++++++++++++++++++++---------- src/mesa/drivers/dri/r600/r700_vertprog.h | 11 +++- 6 files changed, 110 insertions(+), 62 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h index 8ae05a301c7..c59df7505af 100644 --- a/src/mesa/drivers/dri/r600/r600_context.h +++ b/src/mesa/drivers/dri/r600/r600_context.h @@ -51,6 +51,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r700_chip.h" #include "r600_tex.h" #include "r700_oglprog.h" +#include "r700_vertprog.h" struct r600_context; typedef struct r600_context context_t; @@ -155,6 +156,8 @@ struct r600_context { struct r600_hw_state atoms; + struct r700_vertex_program *selected_vp; + /* Vertex buffers */ GLvector4f dummy_attrib[_TNL_ATTRIB_MAX]; diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c index 312cacffda3..1b560591974 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.c +++ b/src/mesa/drivers/dri/r600/r700_chip.c @@ -211,8 +211,7 @@ static void r700SetupVTXConstants(GLcontext * ctx, void r700SetupStreams(GLcontext *ctx) { context_t *context = R700_CONTEXT(ctx); - struct r700_vertex_program *vpc - = (struct r700_vertex_program *)ctx->VertexProgram._Current; + struct r700_vertex_program *vp = context->selected_vp; TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *vb = &tnl->vb; unsigned int i, j = 0; @@ -221,7 +220,7 @@ void r700SetupStreams(GLcontext *ctx) R600_STATECHANGE(context, vtx); for(i=0; imesa_program.Base.InputsRead & (1 << i)) { + if(vp->mesa_program->Base.InputsRead & (1 << i)) { rcommon_emit_vector(ctx, &context->radeon.tcl.aos[j], vb->AttribPtr[i]->data, @@ -237,8 +236,7 @@ void r700SetupStreams(GLcontext *ctx) static void r700SendVTXState(GLcontext *ctx, struct radeon_state_atom *atom) { context_t *context = R700_CONTEXT(ctx); - struct r700_vertex_program *vpc - = (struct r700_vertex_program *)ctx->VertexProgram._Current; + struct r700_vertex_program *vp = context->selected_vp; unsigned int i, j = 0; BATCH_LOCALS(&context->radeon); radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__); @@ -258,7 +256,7 @@ static void r700SendVTXState(GLcontext *ctx, struct radeon_state_atom *atom) COMMIT_BATCH(); for(i=0; imesa_program.Base.InputsRead & (1 << i)) { + if(vp->mesa_program->Base.InputsRead & (1 << i)) { /* currently aos are packed */ r700SetupVTXConstants(ctx, i, diff --git a/src/mesa/drivers/dri/r600/r700_oglprog.c b/src/mesa/drivers/dri/r600/r700_oglprog.c index 3c8c1fd7a34..5290ef31be3 100644 --- a/src/mesa/drivers/dri/r600/r700_oglprog.c +++ b/src/mesa/drivers/dri/r600/r700_oglprog.c @@ -46,7 +46,7 @@ static struct gl_program *r700NewProgram(GLcontext * ctx, { struct gl_program *pProgram = NULL; - struct r700_vertex_program *vp; + struct r700_vertex_program_cont *vpc; struct r700_fragment_program *fp; radeon_print(RADEON_SHADER, RADEON_VERBOSE, @@ -56,16 +56,11 @@ static struct gl_program *r700NewProgram(GLcontext * ctx, { case GL_VERTEX_STATE_PROGRAM_NV: case GL_VERTEX_PROGRAM_ARB: - vp = CALLOC_STRUCT(r700_vertex_program); + vpc = CALLOC_STRUCT(r700_vertex_program_cont); pProgram = _mesa_init_vertex_program(ctx, - &vp->mesa_program, + &vpc->mesa_program, target, id); - vp->translated = GL_FALSE; - vp->loaded = GL_FALSE; - - vp->shaderbo = NULL; - break; case GL_FRAGMENT_PROGRAM_NV: case GL_FRAGMENT_PROGRAM_ARB: @@ -89,7 +84,8 @@ static struct gl_program *r700NewProgram(GLcontext * ctx, static void r700DeleteProgram(GLcontext * ctx, struct gl_program *prog) { - struct r700_vertex_program * vp; + struct r700_vertex_program_cont * vpc; + struct r700_vertex_program *vp, *tmp; struct r700_fragment_program * fp; radeon_print(RADEON_SHADER, RADEON_VERBOSE, @@ -99,14 +95,20 @@ static void r700DeleteProgram(GLcontext * ctx, struct gl_program *prog) { case GL_VERTEX_STATE_PROGRAM_NV: case GL_VERTEX_PROGRAM_ARB: - vp = (struct r700_vertex_program*)prog; - /* Release DMA region */ - - r600DeleteShader(ctx, vp->shaderbo); - - /* Clean up */ - Clean_Up_Assembler(&(vp->r700AsmCode)); - Clean_Up_Shader(&(vp->r700Shader)); + vpc = (struct r700_vertex_program_cont*)prog; + vp = vpc->progs; + while (vp) { + tmp = vp->next; + /* Release DMA region */ + + r600DeleteShader(ctx, vp->shaderbo); + + /* Clean up */ + Clean_Up_Assembler(&(vp->r700AsmCode)); + Clean_Up_Shader(&(vp->r700Shader)); + _mesa_free(vp); + vp = tmp; + } break; case GL_FRAGMENT_PROGRAM_NV: case GL_FRAGMENT_PROGRAM_ARB: diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 3566bf3ca78..b1c3648ca56 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -319,14 +319,13 @@ static GLuint r700PredictRenderSize(GLcontext* ctx) { context_t *context = R700_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); - struct r700_vertex_program *vpc - = (struct r700_vertex_program *)ctx->VertexProgram._Current; + struct r700_vertex_program *vp = context->selected_vp; struct vertex_buffer *vb = &tnl->vb; GLboolean flushed; GLuint dwords, i; GLuint state_size; /* pre calculate aos count so state prediction works */ - context->radeon.tcl.aos_count = _mesa_bitcount(vpc->mesa_program.Base.InputsRead); + context->radeon.tcl.aos_count = _mesa_bitcount(vp->mesa_program->Base.InputsRead); dwords = PRE_EMIT_STATE_BUFSZ; for (i = 0; i < vb->PrimitiveCount; i++) @@ -365,7 +364,6 @@ static GLboolean r700RunRender(GLcontext * ctx, /* mark vtx as dirty since it changes per-draw */ R600_STATECHANGE(context, vtx); - r700UpdateShaders(ctx); r700SetScissor(context); r700SetupVertexProgram(ctx); r700SetupFragmentProgram(ctx); @@ -427,7 +425,10 @@ static GLboolean r700RunTCLRender(GLcontext * ctx, /*----------------------*/ /* TODO : sw fallback */ + /* Need shader bo's setup before bo check */ + r700UpdateShaders(ctx); /** + * Ensure all enabled and complete textures are uploaded along with any buffers being used. */ if(!r600ValidateBuffers(ctx)) diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c index d107f99e7ba..8c2b0071df9 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.c +++ b/src/mesa/drivers/dri/r600/r700_vertprog.c @@ -35,6 +35,7 @@ #include "main/mtypes.h" #include "tnl/t_context.h" +#include "shader/program.h" #include "shader/prog_parameter.h" #include "shader/prog_statevars.h" @@ -258,28 +259,54 @@ GLboolean Find_Instruction_Dependencies_vp(struct r700_vertex_program *vp, return GL_TRUE; } -GLboolean r700TranslateVertexShader(struct r700_vertex_program *vp, - struct gl_vertex_program *mesa_vp) +struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, + struct gl_vertex_program *mesa_vp) { + context_t *context = R700_CONTEXT(ctx); + struct r700_vertex_program *vp; + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *vb = &tnl->vb; + unsigned int unBit; + unsigned int i; + + vp = _mesa_calloc(sizeof(*vp)); + vp->mesa_program = (struct gl_vertex_program *)_mesa_clone_program(ctx, &mesa_vp->Base); + + for(i=0; imesa_program->Base.InputsRead & unBit) /* ctx->Array.ArrayObj->xxxxxxx */ + { + vp->aos_desc[i].size = vb->AttribPtr[i]->size; + vp->aos_desc[i].stride = vb->AttribPtr[i]->size * sizeof(GL_FLOAT);/* when emit array, data is packed. vb->AttribPtr[i]->stride;*/ + vp->aos_desc[i].type = GL_FLOAT; + } + } + + if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770) + { + vp->r700AsmCode.bR6xx = 1; + } + //Init_Program Init_r700_AssemblerBase(SPT_VP, &(vp->r700AsmCode), &(vp->r700Shader) ); Map_Vertex_Program( vp, mesa_vp ); if(GL_FALSE == Find_Instruction_Dependencies_vp(vp, mesa_vp)) { - return GL_FALSE; + return NULL; } if(GL_FALSE == AssembleInstr(mesa_vp->Base.NumInstructions, &(mesa_vp->Base.Instructions[0]), &(vp->r700AsmCode)) ) { - return GL_FALSE; + return NULL; } if(GL_FALSE == Process_Vertex_Exports(&(vp->r700AsmCode), mesa_vp->Base.OutputsWritten) ) { - return GL_FALSE; + return NULL; } vp->r700Shader.nRegs = (vp->r700AsmCode.number_used_registers == 0) ? 0 @@ -289,72 +316,82 @@ GLboolean r700TranslateVertexShader(struct r700_vertex_program *vp, vp->translated = GL_TRUE; - return GL_TRUE; + return vp; } void r700SelectVertexShader(GLcontext *ctx) { context_t *context = R700_CONTEXT(ctx); - struct r700_vertex_program *vpc - = (struct r700_vertex_program *)ctx->VertexProgram._Current; + struct r700_vertex_program_cont *vpc; + struct r700_vertex_program *vp; TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *vb = &tnl->vb; unsigned int unBit; unsigned int i; + GLboolean match; + vpc = (struct r700_vertex_program_cont *)ctx->VertexProgram._Current; + +#if 0 if (context->radeon.NewGLState & (_NEW_PROGRAM_CONSTANTS|_NEW_PROGRAM)) { vpc->needUpdateVF = 1; } +#endif - if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770) + for (vp = vpc->progs; vp; vp = vp->next) { - vpc->r700AsmCode.bR6xx = 1; - } - + match = GL_TRUE; for(i=0; imesa_program.Base.InputsRead & unBit) /* ctx->Array.ArrayObj->xxxxxxx */ + if(vpc->mesa_program.Base.InputsRead & unBit) { - vpc->aos_desc[i].size = vb->AttribPtr[i]->size; - vpc->aos_desc[i].stride = vb->AttribPtr[i]->size * sizeof(GL_FLOAT);/* when emit array, data is packed. vb->AttribPtr[i]->stride;*/ - vpc->aos_desc[i].type = GL_FLOAT; + if (vp->aos_desc[i].size != vb->AttribPtr[i]->size) + match = GL_FALSE; + break; } } - - if(GL_FALSE == vpc->translated) { - r700TranslateVertexShader(vpc, &(vpc->mesa_program) ); + if (match) + { + context->selected_vp = vp; + return; } + } + + vp = r700TranslateVertexShader(ctx, &(vpc->mesa_program) ); + if(!vp) + { + radeon_error("Failed to translate vertex shader. \n"); + return; + } + vp->next = vpc->progs; + vpc->progs = vp; + context->selected_vp = vp; + return; } void * r700GetActiveVpShaderBo(GLcontext * ctx) { - struct r700_vertex_program *vp - = (struct r700_vertex_program *)ctx->VertexProgram._Current; + context_t *context = R700_CONTEXT(ctx); + struct r700_vertex_program *vp = context->selected_vp;; - return vp->shaderbo; + if (vp) + return vp->shaderbo; + else + return NULL; } GLboolean r700SetupVertexProgram(GLcontext * ctx) { context_t *context = R700_CONTEXT(ctx); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); - struct r700_vertex_program *vp - = (struct r700_vertex_program *)ctx->VertexProgram._Current; + struct r700_vertex_program *vp = context->selected_vp; struct gl_program_parameter_list *paramList; unsigned int unNumParamData; unsigned int ui; - if (vp->needUpdateVF) - { - vp->loaded = GL_FALSE; - vp->r700Shader.bNeedsAssembly = GL_TRUE; - Process_Vertex_Program_Vfetch_Instructions(vp, &(vp->mesa_program)); - r600DeleteShader(ctx, vp->shaderbo); - } - if(GL_FALSE == vp->loaded) { if(vp->r700Shader.bNeedsAssembly == GL_TRUE) @@ -410,7 +447,7 @@ GLboolean r700SetupVertexProgram(GLcontext * ctx) */ /* sent out shader constants. */ - paramList = vp->mesa_program.Base.Parameters; + paramList = vp->mesa_program->Base.Parameters; if(NULL != paramList) { _mesa_load_state_parameters(ctx, paramList); diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.h b/src/mesa/drivers/dri/r600/r700_vertprog.h index e2e65021fd3..c48764c43ba 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.h +++ b/src/mesa/drivers/dri/r600/r700_vertprog.h @@ -43,7 +43,7 @@ typedef struct ArrayDesc //TEMP struct r700_vertex_program { - struct gl_vertex_program mesa_program; /* Must be first */ + struct gl_vertex_program *mesa_program; /* Must be first */ struct r700_vertex_program *next; @@ -59,6 +59,13 @@ struct r700_vertex_program ArrayDesc aos_desc[VERT_ATTRIB_MAX]; }; +struct r700_vertex_program_cont +{ + struct gl_vertex_program mesa_program; + + struct r700_vertex_program *progs; +}; + //Internal unsigned int Map_Vertex_Output(r700_AssemblerBase *pAsm, struct gl_vertex_program *mesa_vp, @@ -74,7 +81,7 @@ void Map_Vertex_Program(struct r700_vertex_program *vp, GLboolean Find_Instruction_Dependencies_vp(struct r700_vertex_program *vp, struct gl_vertex_program *mesa_vp); -GLboolean r700TranslateVertexShader(struct r700_vertex_program *vp, +struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, struct gl_vertex_program *mesa_vp); /* Interface */ -- cgit v1.2.3 From 7f5a958c80f0fcd7681d515fd1c1b8bc00524a7a Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Fri, 11 Sep 2009 15:59:55 -0400 Subject: r600: fix texcoords from constants with some minor updates from Richard. --- src/mesa/drivers/dri/r600/r700_assembler.c | 92 +++++++++++++++++------------- 1 file changed, 52 insertions(+), 40 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index 2d8480daaf7..fda66927253 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -1149,41 +1149,49 @@ GLboolean tex_dst(r700_AssemblerBase *pAsm) GLboolean tex_src(r700_AssemblerBase *pAsm) { struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]); - + GLboolean bValidTexCoord = GL_FALSE; - switch (pILInst->SrcReg[0].File) - { + switch (pILInst->SrcReg[0].File) { + case PROGRAM_CONSTANT: + case PROGRAM_LOCAL_PARAM: + case PROGRAM_ENV_PARAM: + case PROGRAM_STATE_VAR: + bValidTexCoord = GL_TRUE; + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = pAsm->aArgSubst[1]; + break; case PROGRAM_TEMPORARY: - bValidTexCoord = GL_TRUE; - - pAsm->S[0].src.reg = pILInst->SrcReg[0].Index + pAsm->starting_temp_register_number; - pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; - - break; + bValidTexCoord = GL_TRUE; + pAsm->S[0].src.reg = pILInst->SrcReg[0].Index + + pAsm->starting_temp_register_number; + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + break; case PROGRAM_INPUT: - switch (pILInst->SrcReg[0].Index) - { - case FRAG_ATTRIB_COL0: - case FRAG_ATTRIB_COL1: - case FRAG_ATTRIB_TEX0: - case FRAG_ATTRIB_TEX1: - case FRAG_ATTRIB_TEX2: - case FRAG_ATTRIB_TEX3: - case FRAG_ATTRIB_TEX4: - case FRAG_ATTRIB_TEX5: - case FRAG_ATTRIB_TEX6: - case FRAG_ATTRIB_TEX7: - bValidTexCoord = GL_TRUE; - - pAsm->S[0].src.reg = pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index]; - pAsm->S[0].src.rtype = SRC_REG_INPUT; - } - break; + switch (pILInst->SrcReg[0].Index) + { + case FRAG_ATTRIB_COL0: + case FRAG_ATTRIB_COL1: + case FRAG_ATTRIB_TEX0: + case FRAG_ATTRIB_TEX1: + case FRAG_ATTRIB_TEX2: + case FRAG_ATTRIB_TEX3: + case FRAG_ATTRIB_TEX4: + case FRAG_ATTRIB_TEX5: + case FRAG_ATTRIB_TEX6: + case FRAG_ATTRIB_TEX7: + bValidTexCoord = GL_TRUE; + pAsm->S[0].src.reg = + pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index]; + pAsm->S[0].src.rtype = SRC_REG_INPUT; + break; + } + break; } if(GL_TRUE == bValidTexCoord) - { + { setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); } else @@ -1201,7 +1209,7 @@ GLboolean tex_src(r700_AssemblerBase *pAsm) pAsm->S[0].src.negy = (pILInst->SrcReg[0].Negate >> 1) & 0x1; pAsm->S[0].src.negz = (pILInst->SrcReg[0].Negate >> 2) & 0x1; pAsm->S[0].src.negw = (pILInst->SrcReg[0].Negate >> 3) & 0x1; - + return GL_TRUE; } @@ -2202,7 +2210,9 @@ GLboolean next_ins(r700_AssemblerBase *pAsm) { struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]); - if( GL_TRUE == IsTex(pILInst->Opcode) ) + if( GL_TRUE == IsTex(pILInst->Opcode) && + /* handle const moves to temp register */ + !(pAsm->D.dst.opcode == SQ_OP2_INST_MOV) ) { if (pILInst->TexSrcTarget == TEXTURE_RECT_INDEX) { if( GL_FALSE == assemble_tex_instruction(pAsm, GL_FALSE) ) @@ -3374,28 +3384,30 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) case PROGRAM_ENV_PARAM: case PROGRAM_STATE_VAR: src_const = GL_TRUE; + break; case PROGRAM_TEMPORARY: case PROGRAM_INPUT: src_const = GL_FALSE; + break; } - if (GL_TRUE == src_const) + if (GL_TRUE == src_const) { - radeon_error("TODO: Texture coordinates from a constant register not supported.\n"); - return GL_FALSE; + if ( GL_FALSE == mov_temp(pAsm, 0) ) + return GL_FALSE; } - switch (pAsm->pILInst[pAsm->uiCurInst].Opcode) + switch (pAsm->pILInst[pAsm->uiCurInst].Opcode) { case OPCODE_TEX: - pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; + pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; break; - case OPCODE_TXB: + case OPCODE_TXB: radeon_error("do not support TXB yet\n"); return GL_FALSE; break; - case OPCODE_TXP: - /* TODO : tex proj version : divid first 3 components by 4th */ + case OPCODE_TXP: + /* TODO : tex proj version : divid first 3 components by 4th */ pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; break; default: @@ -3418,13 +3430,13 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) { return GL_FALSE; } - + if( GL_FALSE == tex_src(pAsm) ) { return GL_FALSE; } - if ( GL_FALSE == next_ins(pAsm) ) + if ( GL_FALSE == next_ins(pAsm) ) { return GL_FALSE; } -- cgit v1.2.3 From 93a7ea6ba0d5700e18b28c23da226e055f7c2fa1 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 14 Sep 2009 17:08:26 -0400 Subject: r600: fix warning Noticed by rnoland on IRC. --- src/mesa/drivers/dri/r600/r700_assembler.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index fda66927253..efeccb25f1e 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -3387,6 +3387,7 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) break; case PROGRAM_TEMPORARY: case PROGRAM_INPUT: + default: src_const = GL_FALSE; break; } -- cgit v1.2.3 From 9437ac9bccd294bd5a8b838e7ca7597e5dc6d5b0 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 14 Sep 2009 18:05:15 -0400 Subject: r600: add span support for 1D tiles 1D tile span support for depth/stencil/color/textures Z and stencil buffers are always tiled, so this fixes sw access to Z and stencil buffers. color and textures are currently linear, but this adds span support when we implement 1D tiling. This fixes the text in progs/demos/engine and progs/tests/z* --- src/mesa/drivers/dri/r600/r600_reg_auto_r6xx.h | 2 + src/mesa/drivers/dri/r600/r700_chip.c | 2 +- src/mesa/drivers/dri/radeon/radeon_span.c | 220 +++++++++++++++++++++++++ 3 files changed, 223 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_reg_auto_r6xx.h b/src/mesa/drivers/dri/r600/r600_reg_auto_r6xx.h index 9d5aa3c7e49..edd85b0facc 100644 --- a/src/mesa/drivers/dri/r600/r600_reg_auto_r6xx.h +++ b/src/mesa/drivers/dri/r600/r600_reg_auto_r6xx.h @@ -1366,6 +1366,7 @@ enum { DB_DEPTH_INFO__READ_SIZE_bit = 1 << 3, DB_DEPTH_INFO__ARRAY_MODE_mask = 0x0f << 15, DB_DEPTH_INFO__ARRAY_MODE_shift = 15, + ARRAY_1D_TILED_THIN1 = 0x02, ARRAY_2D_TILED_THIN1 = 0x04, TILE_SURFACE_ENABLE_bit = 1 << 25, TILE_COMPACT_bit = 1 << 26, @@ -1449,6 +1450,7 @@ enum { CB_COLOR0_INFO__ARRAY_MODE_shift = 8, ARRAY_LINEAR_GENERAL = 0x00, ARRAY_LINEAR_ALIGNED = 0x01, +/* ARRAY_1D_TILED_THIN1 = 0x02, */ /* ARRAY_2D_TILED_THIN1 = 0x04, */ NUMBER_TYPE_mask = 0x07 << 12, NUMBER_TYPE_shift = 12, diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c index 1b560591974..06d7e9c9ab1 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.c +++ b/src/mesa/drivers/dri/r600/r700_chip.c @@ -351,7 +351,7 @@ static void r700SetDepthTarget(context_t *context) SETfield(r700->DB_DEPTH_INFO.u32All, DEPTH_16, DB_DEPTH_INFO__FORMAT_shift, DB_DEPTH_INFO__FORMAT_mask); } - SETfield(r700->DB_DEPTH_INFO.u32All, ARRAY_2D_TILED_THIN1, + SETfield(r700->DB_DEPTH_INFO.u32All, ARRAY_1D_TILED_THIN1, DB_DEPTH_INFO__ARRAY_MODE_shift, DB_DEPTH_INFO__ARRAY_MODE_mask); /* r700->DB_PREFETCH_LIMIT.bits.DEPTH_HEIGHT_TILE_MAX = (context->currentDraw->h >> 3) - 1; */ /* z buffer sie may much bigger than what need, so use actual used h. */ } diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index 4e100d854ed..aa2035338c2 100644 --- a/src/mesa/drivers/dri/radeon/radeon_span.c +++ b/src/mesa/drivers/dri/radeon/radeon_span.c @@ -106,6 +106,142 @@ static GLubyte *r200_depth_4byte(const struct radeon_renderbuffer * rrb, } #endif +/* r600 tiling + * two main types: + * - 1D (akin to macro-linear/micro-tiled on older asics) + * - 2D (akin to macro-tiled/micro-tiled on older asics) + * only 1D tiling is implemented below + */ +#if defined(RADEON_COMMON_FOR_R600) +static GLint r600_1d_tile_helper(const struct radeon_renderbuffer * rrb, + GLint x, GLint y, GLint is_depth, GLint is_stencil) +{ + GLint element_bytes = rrb->cpp; + GLint num_samples = 1; + GLint tile_width = 8; + GLint tile_height = 8; + GLint tile_thickness = 1; + GLint pitch_elements = rrb->pitch / element_bytes; + GLint height = rrb->base.Height; + GLint z = 0; + GLint sample_number = 0; + /* */ + GLint tile_bytes; + GLint tiles_per_row; + GLint tiles_per_slice; + GLint slice_offset; + GLint tile_row_index; + GLint tile_column_index; + GLint tile_offset; + GLint pixel_number = 0; + GLint element_offset; + GLint offset = 0; + + tile_bytes = tile_width * tile_height * tile_thickness * element_bytes * num_samples; + tiles_per_row = pitch_elements /tile_width; + tiles_per_slice = tiles_per_row * (height / tile_height); + slice_offset = (z / tile_thickness) * tiles_per_slice * tile_bytes; + tile_row_index = y / tile_height; + tile_column_index = x / tile_width; + tile_offset = ((tile_row_index * tiles_per_row) + tile_column_index) * tile_bytes; + + if (is_depth) { + GLint pixel_offset = 0; + + pixel_number |= ((x >> 0) & 1) << 0; // pn[0] = x[0] + pixel_number |= ((y >> 0) & 1) << 1; // pn[1] = y[0] + pixel_number |= ((x >> 1) & 1) << 2; // pn[2] = x[1] + pixel_number |= ((y >> 1) & 1) << 3; // pn[3] = y[1] + pixel_number |= ((x >> 2) & 1) << 4; // pn[4] = x[2] + pixel_number |= ((y >> 2) & 1) << 5; // pn[5] = y[2] + switch (element_bytes) { + case 2: + pixel_offset = pixel_number * element_bytes * num_samples; + element_offset = pixel_offset + (sample_number * element_bytes); + break; + case 4: + /* stencil and depth data are stored separately within a tile. + * stencil is stored in a contiguous tile before the depth tile. + * stencil element is 1 byte, depth element is 3 bytes. + * stencil tile is 64 bytes. + */ + if (is_stencil) + pixel_offset = pixel_number * 1 * num_samples; + else + pixel_offset = (pixel_number * 3 * num_samples) + 64; + break; + } + element_offset = pixel_offset + (sample_number * element_bytes); + } else { + GLint sample_offset; + + switch (element_bytes) { + case 1: + pixel_number |= ((x >> 0) & 1) << 0; // pn[0] = x[0] + pixel_number |= ((x >> 1) & 1) << 1; // pn[1] = x[1] + pixel_number |= ((x >> 2) & 1) << 2; // pn[2] = x[2] + pixel_number |= ((y >> 1) & 1) << 3; // pn[3] = y[1] + pixel_number |= ((y >> 0) & 1) << 4; // pn[4] = y[0] + pixel_number |= ((y >> 2) & 1) << 5; // pn[5] = y[2] + break; + case 2: + pixel_number |= ((x >> 0) & 1) << 0; // pn[0] = x[0] + pixel_number |= ((x >> 1) & 1) << 1; // pn[1] = x[1] + pixel_number |= ((x >> 2) & 1) << 2; // pn[2] = x[2] + pixel_number |= ((y >> 0) & 1) << 3; // pn[3] = y[0] + pixel_number |= ((y >> 1) & 1) << 4; // pn[4] = y[1] + pixel_number |= ((y >> 2) & 1) << 5; // pn[5] = y[2] + break; + case 4: + pixel_number |= ((x >> 0) & 1) << 0; // pn[0] = x[0] + pixel_number |= ((x >> 1) & 1) << 1; // pn[1] = x[1] + pixel_number |= ((y >> 0) & 1) << 2; // pn[2] = y[0] + pixel_number |= ((x >> 2) & 1) << 3; // pn[3] = x[2] + pixel_number |= ((y >> 1) & 1) << 4; // pn[4] = y[1] + pixel_number |= ((y >> 2) & 1) << 5; // pn[5] = y[2] + break; + } + sample_offset = sample_number * (tile_bytes / num_samples); + element_offset = sample_offset + (pixel_number * element_bytes); + } + offset = slice_offset + tile_offset + element_offset; + return offset; +} + +/* depth buffers */ +static GLubyte *r600_ptr_depth(const struct radeon_renderbuffer * rrb, + GLint x, GLint y) +{ + GLubyte *ptr = rrb->bo->ptr; + GLint offset = r600_1d_tile_helper(rrb, x, y, 1, 0); + return &ptr[offset]; +} + +static GLubyte *r600_ptr_stencil(const struct radeon_renderbuffer * rrb, + GLint x, GLint y) +{ + GLubyte *ptr = rrb->bo->ptr; + GLint offset = r600_1d_tile_helper(rrb, x, y, 1, 1); + return &ptr[offset]; +} + +static GLubyte *r600_ptr_color(const struct radeon_renderbuffer * rrb, + GLint x, GLint y) +{ + GLubyte *ptr = rrb->bo->ptr; + uint32_t mask = RADEON_BO_FLAGS_MACRO_TILE | RADEON_BO_FLAGS_MICRO_TILE; + GLint offset; + + if (rrb->has_surface || !(rrb->bo->flags & mask)) { + offset = x * rrb->cpp + y * rrb->pitch; + } else { + offset = r600_1d_tile_helper(rrb, x, y, 0, 0); + } + return &ptr[offset]; +} + +#endif + /* radeon tiling on r300-r500 has 4 states, macro-linear/micro-linear macro-linear/micro-tiled @@ -270,7 +406,11 @@ s8z24_to_z24s8(uint32_t val) #define TAG(x) radeon##x##_RGB565 #define TAG2(x,y) radeon##x##_RGB565##y +#if defined(RADEON_COMMON_FOR_R600) +#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off) +#else #define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off) +#endif #include "spantmp2.h" /* 16 bit, ARGB1555 color spanline and pixel functions @@ -280,7 +420,11 @@ s8z24_to_z24s8(uint32_t val) #define TAG(x) radeon##x##_ARGB1555 #define TAG2(x,y) radeon##x##_ARGB1555##y +#if defined(RADEON_COMMON_FOR_R600) +#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off) +#else #define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off) +#endif #include "spantmp2.h" /* 16 bit, RGBA4 color spanline and pixel functions @@ -290,7 +434,11 @@ s8z24_to_z24s8(uint32_t val) #define TAG(x) radeon##x##_ARGB4444 #define TAG2(x,y) radeon##x##_ARGB4444##y +#if defined(RADEON_COMMON_FOR_R600) +#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off) +#else #define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off) +#endif #include "spantmp2.h" /* 32 bit, xRGB8888 color spanline and pixel functions @@ -300,11 +448,19 @@ s8z24_to_z24s8(uint32_t val) #define TAG(x) radeon##x##_xRGB8888 #define TAG2(x,y) radeon##x##_xRGB8888##y +#if defined(RADEON_COMMON_FOR_R600) +#define GET_VALUE(_x, _y) ((*(GLuint*)(r600_ptr_color(rrb, _x + x_off, _y + y_off)) | 0xff000000)) +#define PUT_VALUE(_x, _y, d) { \ + GLuint *_ptr = (GLuint*)r600_ptr_color( rrb, _x + x_off, _y + y_off ); \ + *_ptr = d; \ +} while (0) +#else #define GET_VALUE(_x, _y) ((*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off)) | 0xff000000)) #define PUT_VALUE(_x, _y, d) { \ GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \ *_ptr = d; \ } while (0) +#endif #include "spantmp2.h" /* 32 bit, ARGB8888 color spanline and pixel functions @@ -314,11 +470,19 @@ s8z24_to_z24s8(uint32_t val) #define TAG(x) radeon##x##_ARGB8888 #define TAG2(x,y) radeon##x##_ARGB8888##y +#if defined(RADEON_COMMON_FOR_R600) +#define GET_VALUE(_x, _y) (*(GLuint*)(r600_ptr_color(rrb, _x + x_off, _y + y_off))) +#define PUT_VALUE(_x, _y, d) { \ + GLuint *_ptr = (GLuint*)r600_ptr_color( rrb, _x + x_off, _y + y_off ); \ + *_ptr = d; \ +} while (0) +#else #define GET_VALUE(_x, _y) (*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off))) #define PUT_VALUE(_x, _y, d) { \ GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \ *_ptr = d; \ } while (0) +#endif #include "spantmp2.h" /* ================================================================ @@ -342,6 +506,9 @@ s8z24_to_z24s8(uint32_t val) #if defined(RADEON_COMMON_FOR_R200) #define WRITE_DEPTH( _x, _y, d ) \ *(GLushort *)r200_depth_2byte(rrb, _x + x_off, _y + y_off) = d +#elif defined(RADEON_COMMON_FOR_R600) +#define WRITE_DEPTH( _x, _y, d ) \ + *(GLushort *)r600_ptr_depth(rrb, _x + x_off, _y + y_off) = d #else #define WRITE_DEPTH( _x, _y, d ) \ *(GLushort *)radeon_ptr_2byte_8x2(rrb, _x + x_off, _y + y_off) = d @@ -350,6 +517,9 @@ s8z24_to_z24s8(uint32_t val) #if defined(RADEON_COMMON_FOR_R200) #define READ_DEPTH( d, _x, _y ) \ d = *(GLushort *)r200_depth_2byte(rrb, _x + x_off, _y + y_off) +#elif defined(RADEON_COMMON_FOR_R600) +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLushort *)r600_ptr_depth(rrb, _x + x_off, _y + y_off) #else #define READ_DEPTH( d, _x, _y ) \ d = *(GLushort *)radeon_ptr_2byte_8x2(rrb, _x + x_off, _y + y_off) @@ -374,6 +544,15 @@ do { \ tmp |= ((d << 8) & 0xffffff00); \ *_ptr = tmp; \ } while (0) +#elif defined(RADEON_COMMON_FOR_R600) +#define WRITE_DEPTH( _x, _y, d ) \ +do { \ + GLuint *_ptr = (GLuint*)r600_ptr_depth( rrb, _x + x_off, _y + y_off ); \ + GLuint tmp = *_ptr; \ + tmp &= 0xff000000; \ + tmp |= ((d) & 0x00ffffff); \ + *_ptr = tmp; \ +} while (0) #elif defined(RADEON_COMMON_FOR_R200) #define WRITE_DEPTH( _x, _y, d ) \ do { \ @@ -399,6 +578,11 @@ do { \ do { \ d = (*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off)) & 0xffffff00) >> 8; \ }while(0) +#elif defined(RADEON_COMMON_FOR_R600) +#define READ_DEPTH( d, _x, _y ) \ + do { \ + d = (*(GLuint*)(r600_ptr_depth(rrb, _x + x_off, _y + y_off)) & 0x00ffffff); \ + }while(0) #elif defined(RADEON_COMMON_FOR_R200) #define READ_DEPTH( d, _x, _y ) \ do { \ @@ -426,6 +610,20 @@ do { \ GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \ *_ptr = d; \ } while (0) +#elif defined(RADEON_COMMON_FOR_R600) +#define WRITE_DEPTH( _x, _y, d ) \ +do { \ + GLuint *_ptr = (GLuint*)r600_ptr_depth( rrb, _x + x_off, _y + y_off ); \ + GLuint tmp = *_ptr; \ + tmp &= 0xff000000; \ + tmp |= (((d) >> 8) & 0x00ffffff); \ + *_ptr = tmp; \ + _ptr = (GLuint*)r600_ptr_stencil(rrb, _x + x_off, _y + y_off); \ + tmp = *_ptr; \ + tmp &= 0xffffff00; \ + tmp |= (d) & 0xff; \ + *_ptr = tmp; \ +} while (0) #elif defined(RADEON_COMMON_FOR_R200) #define WRITE_DEPTH( _x, _y, d ) \ do { \ @@ -447,6 +645,12 @@ do { \ do { \ d = (*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off))); \ }while(0) +#elif defined(RADEON_COMMON_FOR_R600) +#define READ_DEPTH( d, _x, _y ) \ + do { \ + d = ((*(GLuint*)(r600_ptr_depth(rrb, _x + x_off, _y + y_off))) << 8) & 0xffffff00; \ + d |= (*(GLuint*)(r600_ptr_stencil(rrb, _x + x_off, _y + y_off))) & 0x000000ff; \ + }while(0) #elif defined(RADEON_COMMON_FOR_R200) #define READ_DEPTH( d, _x, _y ) \ do { \ @@ -476,6 +680,15 @@ do { \ tmp |= (d) & 0xff; \ *_ptr = tmp; \ } while (0) +#elif defined(RADEON_COMMON_FOR_R600) +#define WRITE_STENCIL( _x, _y, d ) \ +do { \ + GLuint *_ptr = (GLuint*)r600_ptr_stencil(rrb, _x + x_off, _y + y_off); \ + GLuint tmp = *_ptr; \ + tmp &= 0xffffff00; \ + tmp |= (d) & 0xff; \ + *_ptr = tmp; \ +} while (0) #elif defined(RADEON_COMMON_FOR_R200) #define WRITE_STENCIL( _x, _y, d ) \ do { \ @@ -503,6 +716,13 @@ do { \ GLuint tmp = *_ptr; \ d = tmp & 0x000000ff; \ } while (0) +#elif defined(RADEON_COMMON_FOR_R600) +#define READ_STENCIL( d, _x, _y ) \ +do { \ + GLuint *_ptr = (GLuint*)r600_ptr_stencil( rrb, _x + x_off, _y + y_off ); \ + GLuint tmp = *_ptr; \ + d = tmp & 0x000000ff; \ +} while (0) #elif defined(RADEON_COMMON_FOR_R200) #define READ_STENCIL( d, _x, _y ) \ do { \ -- cgit v1.2.3 From 2cd2dc34ac93dd929ec8f01cf1f7f8dfa6b34d0d Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Tue, 15 Sep 2009 11:27:51 -0400 Subject: r600: support position_invariant programs --- src/mesa/drivers/dri/r600/r700_vertprog.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c index 8c2b0071df9..9ee26286d9b 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.c +++ b/src/mesa/drivers/dri/r600/r700_vertprog.c @@ -42,6 +42,7 @@ #include "radeon_debug.h" #include "r600_context.h" #include "r600_cmdbuf.h" +#include "shader/programopt.c" #include "r700_debug.h" #include "r700_vertprog.h" @@ -272,6 +273,11 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, vp = _mesa_calloc(sizeof(*vp)); vp->mesa_program = (struct gl_vertex_program *)_mesa_clone_program(ctx, &mesa_vp->Base); + if (mesa_vp->IsPositionInvariant) + { + _mesa_insert_mvp_code(ctx, vp->mesa_program); + } + for(i=0; ir700AsmCode), &(vp->r700Shader) ); - Map_Vertex_Program( vp, mesa_vp ); + Map_Vertex_Program( vp, vp->mesa_program ); - if(GL_FALSE == Find_Instruction_Dependencies_vp(vp, mesa_vp)) + if(GL_FALSE == Find_Instruction_Dependencies_vp(vp, vp->mesa_program)) { return NULL; } - if(GL_FALSE == AssembleInstr(mesa_vp->Base.NumInstructions, - &(mesa_vp->Base.Instructions[0]), + if(GL_FALSE == AssembleInstr(vp->mesa_program->Base.NumInstructions, + &(vp->mesa_program->Base.Instructions[0]), &(vp->r700AsmCode)) ) { return NULL; } - if(GL_FALSE == Process_Vertex_Exports(&(vp->r700AsmCode), mesa_vp->Base.OutputsWritten) ) + if(GL_FALSE == Process_Vertex_Exports(&(vp->r700AsmCode), vp->mesa_program->Base.OutputsWritten) ) { return NULL; } @@ -329,23 +335,23 @@ void r700SelectVertexShader(GLcontext *ctx) unsigned int unBit; unsigned int i; GLboolean match; + GLbitfield InputsRead; vpc = (struct r700_vertex_program_cont *)ctx->VertexProgram._Current; -#if 0 - if (context->radeon.NewGLState & (_NEW_PROGRAM_CONSTANTS|_NEW_PROGRAM)) + InputsRead = vpc->mesa_program.Base.InputsRead; + if (vpc->mesa_program.IsPositionInvariant) { - vpc->needUpdateVF = 1; - } -#endif - + InputsRead |= VERT_BIT_POS; + } + for (vp = vpc->progs; vp; vp = vp->next) { match = GL_TRUE; for(i=0; imesa_program.Base.InputsRead & unBit) + if(InputsRead & unBit) { if (vp->aos_desc[i].size != vb->AttribPtr[i]->size) match = GL_FALSE; -- cgit v1.2.3 From dbec27be856584bc5205c7eeeca2b7e98299d4cb Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 15 Sep 2009 16:58:37 -0400 Subject: r600: minor span cleanups --- src/mesa/drivers/dri/radeon/radeon_span.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index aa2035338c2..9959da011e4 100644 --- a/src/mesa/drivers/dri/radeon/radeon_span.c +++ b/src/mesa/drivers/dri/radeon/radeon_span.c @@ -113,8 +113,8 @@ static GLubyte *r200_depth_4byte(const struct radeon_renderbuffer * rrb, * only 1D tiling is implemented below */ #if defined(RADEON_COMMON_FOR_R600) -static GLint r600_1d_tile_helper(const struct radeon_renderbuffer * rrb, - GLint x, GLint y, GLint is_depth, GLint is_stencil) +static inline GLint r600_1d_tile_helper(const struct radeon_renderbuffer * rrb, + GLint x, GLint y, GLint is_depth, GLint is_stencil) { GLint element_bytes = rrb->cpp; GLint num_samples = 1; @@ -138,7 +138,7 @@ static GLint r600_1d_tile_helper(const struct radeon_renderbuffer * rrb, GLint offset = 0; tile_bytes = tile_width * tile_height * tile_thickness * element_bytes * num_samples; - tiles_per_row = pitch_elements /tile_width; + tiles_per_row = pitch_elements / tile_width; tiles_per_slice = tiles_per_row * (height / tile_height); slice_offset = (z / tile_thickness) * tiles_per_slice * tile_bytes; tile_row_index = y / tile_height; @@ -157,7 +157,6 @@ static GLint r600_1d_tile_helper(const struct radeon_renderbuffer * rrb, switch (element_bytes) { case 2: pixel_offset = pixel_number * element_bytes * num_samples; - element_offset = pixel_offset + (sample_number * element_bytes); break; case 4: /* stencil and depth data are stored separately within a tile. -- cgit v1.2.3 From ec14d59afa952b4e53ad268971098584686a6fca Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 15 Sep 2009 17:12:03 -0400 Subject: radeon: don't build non-r600 span code on r600 --- src/mesa/drivers/dri/radeon/radeon_span.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index 9959da011e4..d603f52df7b 100644 --- a/src/mesa/drivers/dri/radeon/radeon_span.c +++ b/src/mesa/drivers/dri/radeon/radeon_span.c @@ -239,7 +239,7 @@ static GLubyte *r600_ptr_color(const struct radeon_renderbuffer * rrb, return &ptr[offset]; } -#endif +#else /* radeon tiling on r300-r500 has 4 states, macro-linear/micro-linear @@ -332,7 +332,10 @@ static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb, return &ptr[offset]; } +#endif + #ifndef COMPILE_R300 +#ifndef COMPILE_R600 static uint32_t z24s8_to_s8z24(uint32_t val) { @@ -345,6 +348,7 @@ s8z24_to_z24s8(uint32_t val) return (val >> 24) | (val << 8); } #endif +#endif /* * Note that all information needed to access pixels in a renderbuffer -- cgit v1.2.3 From 095db818c6c7ed5706b5f31d17d0cb19c03cb67a Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Sat, 19 Sep 2009 14:46:06 -0400 Subject: r600: fix polygon offset --- src/mesa/drivers/dri/r600/r700_state.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index 2a0b4192562..d8190efe473 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -1122,20 +1122,25 @@ static void r700PolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units) // context_t *context = R700_CONTEXT(ctx); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); GLfloat constant = units; + GLchar depth = 0; + + R600_STATECHANGE(context, poly); switch (ctx->Visual.depthBits) { case 16: constant *= 4.0; + depth = -16; break; case 24: constant *= 2.0; + depth = -24; break; } factor *= 12.0; - - R600_STATECHANGE(context, poly); - + SETfield(r700->PA_SU_POLY_OFFSET_DB_FMT_CNTL.u32All, depth, + POLY_OFFSET_NEG_NUM_DB_BITS_shift, POLY_OFFSET_NEG_NUM_DB_BITS_mask); + //r700->PA_SU_POLY_OFFSET_CLAMP.f32All = constant; //??? r700->PA_SU_POLY_OFFSET_FRONT_SCALE.f32All = factor; r700->PA_SU_POLY_OFFSET_FRONT_OFFSET.f32All = constant; r700->PA_SU_POLY_OFFSET_BACK_SCALE.f32All = factor; -- cgit v1.2.3 From 48559c76056e09ca4f9e4f39e9008f6d32ecd5b0 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Sat, 19 Sep 2009 15:18:42 -0400 Subject: r600: fix point sizes registers takes radius --- src/mesa/drivers/dri/r600/r700_state.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index d8190efe473..8571563149e 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -837,9 +837,9 @@ static void r700PointSize(GLcontext * ctx, GLfloat size) size = CLAMP(size, ctx->Const.MinPointSize, ctx->Const.MaxPointSize); /* format is 12.4 fixed point */ - SETfield(r700->PA_SU_POINT_SIZE.u32All, (int)(size * 16), + SETfield(r700->PA_SU_POINT_SIZE.u32All, (int)(size * 8.0), PA_SU_POINT_SIZE__HEIGHT_shift, PA_SU_POINT_SIZE__HEIGHT_mask); - SETfield(r700->PA_SU_POINT_SIZE.u32All, (int)(size * 16), + SETfield(r700->PA_SU_POINT_SIZE.u32All, (int)(size * 8.0), PA_SU_POINT_SIZE__WIDTH_shift, PA_SU_POINT_SIZE__WIDTH_mask); } @@ -854,11 +854,11 @@ static void r700PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * pa /* format is 12.4 fixed point */ switch (pname) { case GL_POINT_SIZE_MIN: - SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MinSize * 16.0), + SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MinSize * 8.0), MIN_SIZE_shift, MIN_SIZE_mask); break; case GL_POINT_SIZE_MAX: - SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MaxSize * 16.0), + SETfield(r700->PA_SU_POINT_MINMAX.u32All, (int)(ctx->Point.MaxSize * 8.0), MAX_SIZE_shift, MAX_SIZE_mask); break; case GL_POINT_DISTANCE_ATTENUATION: -- cgit v1.2.3 From ed91d103477d563f73be3555d1022ec9af073467 Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Mon, 21 Sep 2009 10:14:25 -0400 Subject: r600: fix some issues with LIT instruction - MUL_LIT is ALU.Trans instruction - some Trans instructions can take 3 arguments - don't clobber dst.x, use dst.z as temp, it'll get written correct value in last insn - respect source swizzles --- src/mesa/drivers/dri/r600/r700_assembler.c | 69 ++++++++++++++++-------------- 1 file changed, 36 insertions(+), 33 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index efeccb25f1e..f46bc322011 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -2024,7 +2024,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm) return GL_FALSE; } - if (pAsm->D.dst.math == 0) + if (uNumSrc > 1) { // Process source 1 current_source_index = 1; @@ -2880,6 +2880,11 @@ GLboolean assemble_LIT(r700_AssemblerBase *pAsm) return GL_FALSE; } + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + /* dst.y = max(src.x, 0.0) */ pAsm->D.dst.opcode = SQ_OP2_INST_MAX; pAsm->D.dst.rtype = dstType; @@ -2891,11 +2896,6 @@ GLboolean assemble_LIT(r700_AssemblerBase *pAsm) pAsm->S[0].src.rtype = srcType; pAsm->S[0].src.reg = srcReg; setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); - noneg_PVSSRC(&(pAsm->S[0].src)); - pAsm->S[0].src.swizzlex = SQ_SEL_X; - pAsm->S[0].src.swizzley = SQ_SEL_X; - pAsm->S[0].src.swizzlez = SQ_SEL_X; - pAsm->S[0].src.swizzlew = SQ_SEL_X; pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; pAsm->S[1].src.reg = tmp; setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); @@ -2909,34 +2909,47 @@ GLboolean assemble_LIT(r700_AssemblerBase *pAsm) return GL_FALSE; } - /* before: dst.w = log(src.y) - * after : dst.x = log(src.y) - * why change dest register is that dst.w has been initialized as 1 before - */ + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + + swizzleagain_PVSSRC(&(pAsm->S[0].src), SQ_SEL_Y, SQ_SEL_Y, SQ_SEL_Y, SQ_SEL_Y); + + /* dst.z = log(src.y) */ pAsm->D.dst.opcode = SQ_OP2_INST_LOG_CLAMPED; pAsm->D.dst.math = 1; pAsm->D.dst.rtype = dstType; pAsm->D.dst.reg = dstReg; - pAsm->D.dst.writex = 1; + pAsm->D.dst.writex = 0; pAsm->D.dst.writey = 0; - pAsm->D.dst.writez = 0; + pAsm->D.dst.writez = 1; pAsm->D.dst.writew = 0; pAsm->S[0].src.rtype = srcType; pAsm->S[0].src.reg = srcReg; setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); - noneg_PVSSRC(&(pAsm->S[0].src)); - pAsm->S[0].src.swizzlex = SQ_SEL_Y; - pAsm->S[0].src.swizzley = SQ_SEL_Y; - pAsm->S[0].src.swizzlez = SQ_SEL_Y; - pAsm->S[0].src.swizzlew = SQ_SEL_Y; if( GL_FALSE == next_ins(pAsm) ) { return GL_FALSE; } - /* before: tmp.x = amd MUL_LIT(src.w, dst.w, src.x ) */ - /* after : tmp.x = amd MUL_LIT(src.w, dst.x, src.x ) */ + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + + if( GL_FALSE == assemble_src(pAsm, 0, 2) ) + { + return GL_FALSE; + } + + swizzleagain_PVSSRC(&(pAsm->S[0].src), SQ_SEL_W, SQ_SEL_W, SQ_SEL_W, SQ_SEL_W); + + swizzleagain_PVSSRC(&(pAsm->S[2].src), SQ_SEL_X, SQ_SEL_X, SQ_SEL_X, SQ_SEL_X); + + /* tmp.x = amd MUL_LIT(src.w, dst.z, src.x ) */ pAsm->D.dst.opcode = SQ_OP3_INST_MUL_LIT; + pAsm->D.dst.math = 1; pAsm->D.dst.op3 = 1; pAsm->D.dst.rtype = DST_REG_TEMPORARY; pAsm->D.dst.reg = tmp; @@ -2948,29 +2961,19 @@ GLboolean assemble_LIT(r700_AssemblerBase *pAsm) pAsm->S[0].src.rtype = srcType; pAsm->S[0].src.reg = srcReg; setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); - noneg_PVSSRC(&(pAsm->S[0].src)); - pAsm->S[0].src.swizzlex = SQ_SEL_W; - pAsm->S[0].src.swizzley = SQ_SEL_W; - pAsm->S[0].src.swizzlez = SQ_SEL_W; - pAsm->S[0].src.swizzlew = SQ_SEL_W; pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; pAsm->S[1].src.reg = dstReg; setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); noneg_PVSSRC(&(pAsm->S[1].src)); - pAsm->S[1].src.swizzlex = SQ_SEL_X; - pAsm->S[1].src.swizzley = SQ_SEL_X; - pAsm->S[1].src.swizzlez = SQ_SEL_X; - pAsm->S[1].src.swizzlew = SQ_SEL_X; + pAsm->S[1].src.swizzlex = SQ_SEL_Z; + pAsm->S[1].src.swizzley = SQ_SEL_Z; + pAsm->S[1].src.swizzlez = SQ_SEL_Z; + pAsm->S[1].src.swizzlew = SQ_SEL_Z; pAsm->S[2].src.rtype = srcType; pAsm->S[2].src.reg = srcReg; setaddrmode_PVSSRC(&(pAsm->S[2].src), ADDR_ABSOLUTE); - noneg_PVSSRC(&(pAsm->S[2].src)); - pAsm->S[2].src.swizzlex = SQ_SEL_X; - pAsm->S[2].src.swizzley = SQ_SEL_X; - pAsm->S[2].src.swizzlez = SQ_SEL_X; - pAsm->S[2].src.swizzlew = SQ_SEL_X; if( GL_FALSE == next_ins(pAsm) ) { -- cgit v1.2.3 From 28308c92605229129a12a2273dda47c6a2ca4790 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 21 Sep 2009 16:30:14 -0400 Subject: r600: various cleanups - max texture size is 8k, but mesa doesn't support that at the moment. - attempt to set shader limits to what the hw actually supports - clean up some old r300 cruft - no need to explicitly disable irqs. This is fixed in the drm now. Signed-off-by: Alex Deucher --- src/mesa/drivers/dri/r600/r600_context.c | 43 +++++++++++----------- src/mesa/drivers/dri/r600/r600_context.h | 19 ---------- .../drivers/dri/radeon/radeon_common_context.c | 7 +--- 3 files changed, 24 insertions(+), 45 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index 251c124cbf4..414c5aec594 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -281,8 +281,8 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, ctx->Const.MaxTextureMaxAnisotropy = 16.0; ctx->Const.MaxTextureLodBias = 16.0; - ctx->Const.MaxTextureLevels = 13; - ctx->Const.MaxTextureRectSize = 4096; + ctx->Const.MaxTextureLevels = 13; /* hw support 14 */ + ctx->Const.MaxTextureRectSize = 4096; /* hw support 8192 */ ctx->Const.MinPointSize = 0x0001 / 8.0; ctx->Const.MinPointSizeAA = 0x0001 / 8.0; @@ -328,25 +328,26 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, _tnl_allow_vertex_fog(ctx, GL_TRUE); /* currently bogus data */ - ctx->Const.VertexProgram.MaxInstructions = VSF_MAX_FRAGMENT_LENGTH / 4; - ctx->Const.VertexProgram.MaxNativeInstructions = - VSF_MAX_FRAGMENT_LENGTH / 4; - ctx->Const.VertexProgram.MaxNativeAttribs = 16; /* r420 */ - ctx->Const.VertexProgram.MaxTemps = 32; - ctx->Const.VertexProgram.MaxNativeTemps = - /*VSF_MAX_FRAGMENT_TEMPS */ 32; - ctx->Const.VertexProgram.MaxNativeParameters = 256; /* r420 */ - ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; - - ctx->Const.FragmentProgram.MaxNativeTemps = PFS_NUM_TEMP_REGS; - ctx->Const.FragmentProgram.MaxNativeAttribs = 11; /* copy i915... */ - ctx->Const.FragmentProgram.MaxNativeParameters = PFS_NUM_CONST_REGS; - ctx->Const.FragmentProgram.MaxNativeAluInstructions = PFS_MAX_ALU_INST; - ctx->Const.FragmentProgram.MaxNativeTexInstructions = PFS_MAX_TEX_INST; - ctx->Const.FragmentProgram.MaxNativeInstructions = - PFS_MAX_ALU_INST + PFS_MAX_TEX_INST; - ctx->Const.FragmentProgram.MaxNativeTexIndirections = - PFS_MAX_TEX_INDIRECT; + ctx->Const.VertexProgram.MaxInstructions = 8192; /* in theory no limit */ + ctx->Const.VertexProgram.MaxNativeInstructions = 8192; + ctx->Const.VertexProgram.MaxNativeAttribs = 160; + ctx->Const.VertexProgram.MaxTemps = 256; /* 256 for reg-based constants, inline consts also supported */ + ctx->Const.VertexProgram.MaxNativeTemps = 256; + ctx->Const.VertexProgram.MaxNativeParameters = 256; /* ??? */ + ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; /* ??? */ + + ctx->Const.FragmentProgram.MaxNativeTemps = 256; + ctx->Const.FragmentProgram.MaxNativeAttribs = 32; + ctx->Const.FragmentProgram.MaxNativeParameters = 256; + ctx->Const.FragmentProgram.MaxNativeAluInstructions = 8192; + /* 8 per clause on r6xx, 16 on rv670/r7xx */ + if ((screen->chip_family == CHIP_FAMILY_RV670) || + (screen->chip_family >= CHIP_FAMILY_RV770)) + ctx->Const.FragmentProgram.MaxNativeTexInstructions = 16; + else + ctx->Const.FragmentProgram.MaxNativeTexInstructions = 8; + ctx->Const.FragmentProgram.MaxNativeInstructions = 8192; + ctx->Const.FragmentProgram.MaxNativeTexIndirections = 8; /* ??? */ ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* and these are?? */ ctx->VertexProgram._MaintainTnlProgram = GL_TRUE; ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h index c59df7505af..9397ecde81b 100644 --- a/src/mesa/drivers/dri/r600/r600_context.h +++ b/src/mesa/drivers/dri/r600/r600_context.h @@ -86,29 +86,10 @@ extern int hw_tcl_on; #include "tnl_dd/t_dd_vertex.h" #undef TAG -#define PFS_MAX_ALU_INST 64 -#define PFS_MAX_TEX_INST 64 -#define PFS_MAX_TEX_INDIRECT 4 -#define PFS_NUM_TEMP_REGS 32 -#define PFS_NUM_CONST_REGS 16 - -#define R600_MAX_AOS_ARRAYS 16 - -#define REG_COORDS 0 -#define REG_COLOR0 1 -#define REG_TEX0 2 - #define R600_FALLBACK_NONE 0 #define R600_FALLBACK_TCL 1 #define R600_FALLBACK_RAST 2 -enum -{ - NO_SHIFT = 0, - LEFT_SHIFT = 1, - RIGHT_SHIFT = 2, -}; - struct r600_hw_state { struct radeon_state_atom sq; struct radeon_state_atom db; diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index 71ee06d9a79..330721acee2 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -227,11 +227,8 @@ GLboolean radeonInitContext(radeonContextPtr radeon, fthrottle_mode = driQueryOptioni(&radeon->optionCache, "fthrottle_mode"); radeon->iw.irq_seq = -1; radeon->irqsEmitted = 0; - if (IS_R600_CLASS(radeon->radeonScreen)) - radeon->do_irqs = 0; - else - radeon->do_irqs = (fthrottle_mode == DRI_CONF_FTHROTTLE_IRQS && - radeon->radeonScreen->irq); + radeon->do_irqs = (fthrottle_mode == DRI_CONF_FTHROTTLE_IRQS && + radeon->radeonScreen->irq); radeon->do_usleeps = (fthrottle_mode == DRI_CONF_FTHROTTLE_USLEEPS); -- cgit v1.2.3 From 639fb1472d09281a8df3792c9bcbc59cd4424688 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 21 Sep 2009 16:48:55 -0400 Subject: r600: fix typo in the last commit 128 gprs, 256 reg-based consts --- src/mesa/drivers/dri/r600/r600_context.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index 414c5aec594..e0b77d43850 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -327,16 +327,16 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual, _tnl_allow_pixel_fog(ctx, GL_FALSE); _tnl_allow_vertex_fog(ctx, GL_TRUE); - /* currently bogus data */ + /* 256 for reg-based consts, inline consts also supported */ ctx->Const.VertexProgram.MaxInstructions = 8192; /* in theory no limit */ ctx->Const.VertexProgram.MaxNativeInstructions = 8192; ctx->Const.VertexProgram.MaxNativeAttribs = 160; - ctx->Const.VertexProgram.MaxTemps = 256; /* 256 for reg-based constants, inline consts also supported */ - ctx->Const.VertexProgram.MaxNativeTemps = 256; - ctx->Const.VertexProgram.MaxNativeParameters = 256; /* ??? */ + ctx->Const.VertexProgram.MaxTemps = 128; + ctx->Const.VertexProgram.MaxNativeTemps = 128; + ctx->Const.VertexProgram.MaxNativeParameters = 256; ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; /* ??? */ - ctx->Const.FragmentProgram.MaxNativeTemps = 256; + ctx->Const.FragmentProgram.MaxNativeTemps = 128; ctx->Const.FragmentProgram.MaxNativeAttribs = 32; ctx->Const.FragmentProgram.MaxNativeParameters = 256; ctx->Const.FragmentProgram.MaxNativeAluInstructions = 8192; -- cgit v1.2.3 From 2058dfaa47704abc62aa5aa9719013624f26764d Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Wed, 23 Sep 2009 14:20:59 +0300 Subject: r600: add support for CUBE textures, also TXP seems to work here ... --- src/mesa/drivers/dri/r600/r700_assembler.c | 306 ++++++++++++++++++++++++----- src/mesa/drivers/dri/r600/r700_assembler.h | 4 + 2 files changed, 263 insertions(+), 47 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index f46bc322011..00eda544d4c 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -213,7 +213,7 @@ GLboolean is_reduction_opcode(PVSDWORD* dest) { if (dest->dst.op3 == 0) { - if ( (dest->dst.opcode == SQ_OP2_INST_DOT4 || dest->dst.opcode == SQ_OP2_INST_DOT4_IEEE) ) + if ( (dest->dst.opcode == SQ_OP2_INST_DOT4 || dest->dst.opcode == SQ_OP2_INST_DOT4_IEEE || dest->dst.opcode == SQ_OP2_INST_CUBE) ) { return GL_TRUE; } @@ -350,6 +350,7 @@ unsigned int r700GetNumOperands(r700_AssemblerBase* pAsm) case SQ_OP2_INST_PRED_SETNE: case SQ_OP2_INST_DOT4: case SQ_OP2_INST_DOT4_IEEE: + case SQ_OP2_INST_CUBE: return 2; case SQ_OP2_INST_MOV: @@ -469,6 +470,9 @@ int Init_r700_AssemblerBase(SHADER_PIPE_TYPE spt, r700_AssemblerBase* pAsm, R700 pAsm->number_of_inputs = 0; + pAsm->is_tex = GL_FALSE; + pAsm->need_tex_barrier = GL_FALSE; + return 0; } @@ -682,7 +686,7 @@ GLboolean add_tex_instruction(r700_AssemblerBase* pAsm, // If this clause constains any TEX instruction that is dependent on a previous instruction, // set the barrier bit - if( pAsm->pInstDeps[pAsm->uiCurInst].nDstDep > (-1) ) + if( pAsm->pInstDeps[pAsm->uiCurInst].nDstDep > (-1) || pAsm->need_tex_barrier == GL_TRUE ) { pAsm->cf_current_tex_clause_ptr->m_Word1.f.barrier = 0x1; } @@ -1152,42 +1156,48 @@ GLboolean tex_src(r700_AssemblerBase *pAsm) GLboolean bValidTexCoord = GL_FALSE; + if(pAsm->aArgSubst[1] >= 0) + { + bValidTexCoord = GL_TRUE; + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = pAsm->aArgSubst[1]; + } + else + { switch (pILInst->SrcReg[0].File) { - case PROGRAM_CONSTANT: - case PROGRAM_LOCAL_PARAM: - case PROGRAM_ENV_PARAM: - case PROGRAM_STATE_VAR: - bValidTexCoord = GL_TRUE; - setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); - pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; - pAsm->S[0].src.reg = pAsm->aArgSubst[1]; - break; - case PROGRAM_TEMPORARY: - bValidTexCoord = GL_TRUE; - pAsm->S[0].src.reg = pILInst->SrcReg[0].Index + - pAsm->starting_temp_register_number; - pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; - break; - case PROGRAM_INPUT: - switch (pILInst->SrcReg[0].Index) - { - case FRAG_ATTRIB_COL0: - case FRAG_ATTRIB_COL1: - case FRAG_ATTRIB_TEX0: - case FRAG_ATTRIB_TEX1: - case FRAG_ATTRIB_TEX2: - case FRAG_ATTRIB_TEX3: - case FRAG_ATTRIB_TEX4: - case FRAG_ATTRIB_TEX5: - case FRAG_ATTRIB_TEX6: - case FRAG_ATTRIB_TEX7: - bValidTexCoord = GL_TRUE; - pAsm->S[0].src.reg = - pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index]; - pAsm->S[0].src.rtype = SRC_REG_INPUT; - break; - } - break; + case PROGRAM_CONSTANT: + case PROGRAM_LOCAL_PARAM: + case PROGRAM_ENV_PARAM: + case PROGRAM_STATE_VAR: + break; + case PROGRAM_TEMPORARY: + bValidTexCoord = GL_TRUE; + pAsm->S[0].src.reg = pILInst->SrcReg[0].Index + + pAsm->starting_temp_register_number; + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + break; + case PROGRAM_INPUT: + switch (pILInst->SrcReg[0].Index) + { + case FRAG_ATTRIB_COL0: + case FRAG_ATTRIB_COL1: + case FRAG_ATTRIB_TEX0: + case FRAG_ATTRIB_TEX1: + case FRAG_ATTRIB_TEX2: + case FRAG_ATTRIB_TEX3: + case FRAG_ATTRIB_TEX4: + case FRAG_ATTRIB_TEX5: + case FRAG_ATTRIB_TEX6: + case FRAG_ATTRIB_TEX7: + bValidTexCoord = GL_TRUE; + pAsm->S[0].src.reg = + pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index]; + pAsm->S[0].src.rtype = SRC_REG_INPUT; + break; + } + break; + } } if(GL_TRUE == bValidTexCoord) @@ -1955,7 +1965,9 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm) { is_single_scalar_operation = GL_FALSE; number_of_scalar_operations = 4; - + +/* current assembler doesn't do more than 1 register per source */ +#if 0 /* check read port, only very preliminary algorithm, not count in src0/1 same comp case and prev slot repeat case; also not count relative addressing. TODO: improve performance. */ @@ -1990,6 +2002,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm) { bSplitInst = GL_TRUE; } +#endif } contiguous_slots_needed = 0; @@ -2210,9 +2223,7 @@ GLboolean next_ins(r700_AssemblerBase *pAsm) { struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]); - if( GL_TRUE == IsTex(pILInst->Opcode) && - /* handle const moves to temp register */ - !(pAsm->D.dst.opcode == SQ_OP2_INST_MOV) ) + if( GL_TRUE == pAsm->is_tex ) { if (pILInst->TexSrcTarget == TEXTURE_RECT_INDEX) { if( GL_FALSE == assemble_tex_instruction(pAsm, GL_FALSE) ) @@ -2256,7 +2267,8 @@ GLboolean next_ins(r700_AssemblerBase *pAsm) pAsm->S[0].bits = 0; pAsm->S[1].bits = 0; pAsm->S[2].bits = 0; - + pAsm->is_tex = GL_FALSE; + pAsm->need_tex_barrier = GL_FALSE; return GL_TRUE; } @@ -3379,7 +3391,10 @@ GLboolean assemble_STP(r700_AssemblerBase *pAsm) GLboolean assemble_TEX(r700_AssemblerBase *pAsm) { GLboolean src_const; + GLboolean need_barrier = GL_FALSE; + checkop1(pAsm); + switch (pAsm->pILInst[pAsm->uiCurInst].SrcReg[0].File) { case PROGRAM_CONSTANT: @@ -3399,20 +3414,18 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) { if ( GL_FALSE == mov_temp(pAsm, 0) ) return GL_FALSE; + need_barrier = GL_TRUE; } switch (pAsm->pILInst[pAsm->uiCurInst].Opcode) { case OPCODE_TEX: - pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; break; case OPCODE_TXB: radeon_error("do not support TXB yet\n"); return GL_FALSE; break; case OPCODE_TXP: - /* TODO : tex proj version : divid first 3 components by 4th */ - pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; break; default: radeon_error("Internal error: bad texture op (not TEX)\n"); @@ -3420,6 +3433,190 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) break; } + if (pAsm->pILInst[pAsm->uiCurInst].Opcode == OPCODE_TXP) + { + GLuint tmp = gethelpr(pAsm); + pAsm->D.dst.opcode = SQ_OP2_INST_RECIP_IEEE; + pAsm->D.dst.math = 1; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp; + pAsm->D.dst.writew = 1; + + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + swizzleagain_PVSSRC(&(pAsm->S[0].src), SQ_SEL_W, SQ_SEL_W, SQ_SEL_W, SQ_SEL_W); + if( GL_FALSE == next_ins(pAsm) ) + { + return GL_FALSE; + } + + pAsm->D.dst.opcode = SQ_OP2_INST_MUL; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp; + pAsm->D.dst.writex = 1; + pAsm->D.dst.writey = 1; + pAsm->D.dst.writez = 1; + pAsm->D.dst.writew = 0; + + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); + pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[1].src.reg = tmp; + setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_W); + + if( GL_FALSE == next_ins(pAsm) ) + { + return GL_FALSE; + } + + pAsm->aArgSubst[1] = tmp; + need_barrier = GL_TRUE; + } + + if (pAsm->pILInst[pAsm->uiCurInst].TexSrcTarget == TEXTURE_CUBE_INDEX ) + { + GLuint tmp1 = gethelpr(pAsm); + GLuint tmp2 = gethelpr(pAsm); + + /* tmp1.xyzw = CUBE(R0.zzxy, R0.yxzz) */ + pAsm->D.dst.opcode = SQ_OP2_INST_CUBE; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp1; + nomask_PVSDST(&(pAsm->D.dst)); + + if( GL_FALSE == assemble_src(pAsm, 0, -1) ) + { + return GL_FALSE; + } + + if( GL_FALSE == assemble_src(pAsm, 0, 1) ) + { + return GL_FALSE; + } + + swizzleagain_PVSSRC(&(pAsm->S[0].src), SQ_SEL_Z, SQ_SEL_Z, SQ_SEL_X, SQ_SEL_Y); + swizzleagain_PVSSRC(&(pAsm->S[1].src), SQ_SEL_Y, SQ_SEL_X, SQ_SEL_Z, SQ_SEL_Z); + + if( GL_FALSE == next_ins(pAsm) ) + { + return GL_FALSE; + } + + /* tmp1.z = ABS(tmp1.z) dont have abs support in assembler currently + * have to do explicit instruction + */ + pAsm->D.dst.opcode = SQ_OP2_INST_MAX; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp1; + pAsm->D.dst.writez = 1; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp1; + noswizzle_PVSSRC(&(pAsm->S[0].src)); + pAsm->S[1].bits = pAsm->S[0].bits; + flipneg_PVSSRC(&(pAsm->S[1].src)); + + next_ins(pAsm); + + /* tmp1.z = RCP_e(|tmp1.z|) */ + pAsm->D.dst.opcode = SQ_OP2_INST_RECIP_IEEE; + pAsm->D.dst.math = 1; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp1; + pAsm->D.dst.writez = 1; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp1; + pAsm->S[0].src.swizzlex = SQ_SEL_Z; + + next_ins(pAsm); + + /* MULADD R0.x, R0.x, PS1, (0x3FC00000, 1.5f).x + * MULADD R0.y, R0.y, PS1, (0x3FC00000, 1.5f).x + * muladd has no writemask, have to use another temp + * also no support for imm constants, so add 1 here + */ + pAsm->D.dst.opcode = SQ_OP3_INST_MULADD; + pAsm->D.dst.op3 = 1; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp2; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp1; + noswizzle_PVSSRC(&(pAsm->S[0].src)); + setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); + pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[1].src.reg = tmp1; + setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_Z); + setaddrmode_PVSSRC(&(pAsm->S[2].src), ADDR_ABSOLUTE); + pAsm->S[2].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[2].src.reg = tmp1; + setswizzle_PVSSRC(&(pAsm->S[2].src), SQ_SEL_1); + + next_ins(pAsm); + + /* ADD the remaining .5 */ + pAsm->D.dst.opcode = SQ_OP2_INST_ADD; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp2; + pAsm->D.dst.writex = 1; + pAsm->D.dst.writey = 1; + pAsm->D.dst.writez = 0; + pAsm->D.dst.writew = 0; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp2; + noswizzle_PVSSRC(&(pAsm->S[0].src)); + setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE); + pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[1].src.reg = 252; // SQ_ALU_SRC_0_5 + noswizzle_PVSSRC(&(pAsm->S[1].src)); + + next_ins(pAsm); + + /* tmp1.xy = temp2.xy */ + pAsm->D.dst.opcode = SQ_OP2_INST_MOV; + setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE); + pAsm->D.dst.rtype = DST_REG_TEMPORARY; + pAsm->D.dst.reg = tmp1; + pAsm->D.dst.writex = 1; + pAsm->D.dst.writey = 1; + pAsm->D.dst.writez = 0; + pAsm->D.dst.writew = 0; + + setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE); + pAsm->S[0].src.rtype = SRC_REG_TEMPORARY; + pAsm->S[0].src.reg = tmp2; + noswizzle_PVSSRC(&(pAsm->S[0].src)); + + next_ins(pAsm); + pAsm->aArgSubst[1] = tmp1; + need_barrier = GL_TRUE; + + } + + pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE; + pAsm->is_tex = GL_TRUE; + if ( GL_TRUE == need_barrier ) + { + pAsm->need_tex_barrier = GL_TRUE; + } // Set src1 to tex unit id pAsm->S[1].src.reg = pAsm->pILInst[pAsm->uiCurInst].TexSrcUnit; pAsm->S[1].src.rtype = SRC_REG_TEMPORARY; @@ -3440,10 +3637,25 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm) return GL_FALSE; } - if ( GL_FALSE == next_ins(pAsm) ) + if(pAsm->pILInst[pAsm->uiCurInst].Opcode == OPCODE_TXP) { - return GL_FALSE; + /* hopefully did swizzles before */ + noswizzle_PVSSRC(&(pAsm->S[0].src)); } + + if(pAsm->pILInst[pAsm->uiCurInst].TexSrcTarget == TEXTURE_CUBE_INDEX) + { + /* SAMPLE dst, tmp.yxwy, CUBE */ + pAsm->S[0].src.swizzlex = SQ_SEL_Y; + pAsm->S[0].src.swizzley = SQ_SEL_X; + pAsm->S[0].src.swizzlez = SQ_SEL_W; + pAsm->S[0].src.swizzlew = SQ_SEL_Y; + } + + if ( GL_FALSE == next_ins(pAsm) ) + { + return GL_FALSE; + } return GL_TRUE; } diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h index f9c4d849c65..73bb8bac55d 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.h +++ b/src/mesa/drivers/dri/r600/r700_assembler.h @@ -374,6 +374,10 @@ typedef struct r700_AssemblerBase struct prog_instruction * pILInst; GLuint uiCurInst; GLboolean bR6xx; + /* helper to decide which type of instruction to assemble */ + GLboolean is_tex; + /* we inserted helper intructions and need barrier on next TEX ins */ + GLboolean need_tex_barrier; } r700_AssemblerBase; //Internal use -- cgit v1.2.3 From 41c5f113b5d41649db2027c3f32deaf4d38035ce Mon Sep 17 00:00:00 2001 From: Richard Li Date: Thu, 24 Sep 2009 10:12:40 -0400 Subject: r600 : disable draw_prim for now. --- src/mesa/drivers/dri/r600/r700_render.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index bbe364bc6aa..5627984cf96 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -1145,8 +1145,11 @@ static void r700DrawPrims(GLcontext *ctx, void r700InitDraw(GLcontext *ctx) { struct vbo_context *vbo = vbo_context(ctx); - + + /* to be enabled */ + /* vbo->draw_prims = r700DrawPrims; + */ } -- cgit v1.2.3 From 5f06064b616099712dbb2854351d0740c1dbfc60 Mon Sep 17 00:00:00 2001 From: Richard Li Date: Thu, 24 Sep 2009 11:26:15 -0400 Subject: r600 : fix draw_prim bug: vertex fetcher setting. --- src/mesa/drivers/dri/r600/r700_chip.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c index 783427a94c9..e3b8a4081a5 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.c +++ b/src/mesa/drivers/dri/r600/r700_chip.c @@ -254,9 +254,22 @@ static void r700SetupVTXConstants2(GLcontext * ctx, SETfield(uSQ_VTX_CONSTANT_WORD2_0, GetSurfaceFormat(pStreamDesc->type, pStreamDesc->size, NULL), SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_shift, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask); /* TODO : trace back api for initial data type, not only GL_FLOAT */ - SETfield(uSQ_VTX_CONSTANT_WORD2_0, SQ_NUM_FORMAT_SCALED, - SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask); - SETbit(uSQ_VTX_CONSTANT_WORD2_0, SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit); + + if(GL_TRUE == pStreamDesc->normalize) + { + SETfield(uSQ_VTX_CONSTANT_WORD2_0, SQ_NUM_FORMAT_NORM, + SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask); + } + //else + //{ + // SETfield(uSQ_VTX_CONSTANT_WORD2_0, SQ_NUM_FORMAT_INT, + // SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask); + //} + + if(1 == pStreamDesc->_signed) + { + SETbit(uSQ_VTX_CONSTANT_WORD2_0, SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit); + } SETfield(uSQ_VTX_CONSTANT_WORD3_0, 1, MEM_REQUEST_SIZE_shift, MEM_REQUEST_SIZE_mask); SETfield(uSQ_VTX_CONSTANT_WORD6_0, SQ_TEX_VTX_VALID_BUFFER, -- cgit v1.2.3 From e44c084be536c021985a8908db4300c764c63bbc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 23 Sep 2009 15:44:02 -0600 Subject: glsl: fix missing initializers warning --- src/mesa/shader/slang/slang_builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index bef0f856534..e5809509c93 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -741,7 +741,7 @@ static const struct input_info vertInputs[] = { { "gl_MultiTexCoord5", VERT_ATTRIB_TEX5, GL_FLOAT_VEC4, SWIZZLE_NOOP }, { "gl_MultiTexCoord6", VERT_ATTRIB_TEX6, GL_FLOAT_VEC4, SWIZZLE_NOOP }, { "gl_MultiTexCoord7", VERT_ATTRIB_TEX7, GL_FLOAT_VEC4, SWIZZLE_NOOP }, - { NULL, 0, SWIZZLE_NOOP } + { NULL, 0, GL_NONE, SWIZZLE_NOOP } }; /** Predefined fragment shader inputs */ @@ -754,7 +754,7 @@ static const struct input_info fragInputs[] = { { "gl_FogFragCoord", FRAG_ATTRIB_FOGC, GL_FLOAT, SWIZZLE_XXXX }, { "gl_FrontFacing", FRAG_ATTRIB_FACE, GL_FLOAT, SWIZZLE_XXXX }, { "gl_PointCoord", FRAG_ATTRIB_PNTC, GL_FLOAT_VEC2, SWIZZLE_XYZW }, - { NULL, 0, SWIZZLE_NOOP } + { NULL, 0, GL_NONE, SWIZZLE_NOOP } }; -- cgit v1.2.3 From 00ddd4f9e9680132872f98f2d18b52dfc30c6f2f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 23 Sep 2009 15:44:18 -0600 Subject: glsl: init var to silence warning --- src/mesa/shader/slang/slang_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 349f432deca..703af9f8740 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2775,7 +2775,7 @@ _slang_gen_while(slang_assemble_ctx * A, slang_operation *oper) * body code (child[1]) */ slang_ir_node *loop, *breakIf, *body; - GLboolean isConst, constTrue; + GLboolean isConst, constTrue = GL_FALSE; if (!A->EmitContReturn) { /* We don't want to emit CONT instructions. If this while-loop has -- cgit v1.2.3 From a491e25b1fa8683f538ed0d67a6389f2cdf7e4bc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 23 Sep 2009 15:44:37 -0600 Subject: mesa: added default case return to silence warning --- src/mesa/main/texenvprogram.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 2f3e47e69ec..d7e77e759e0 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -276,6 +276,7 @@ need_saturate( GLuint mode ) return GL_TRUE; default: assert(0); + return GL_FALSE; } } -- cgit v1.2.3 From 1d2dca194cebe6e25735b6820f85b8d1231aae63 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Thu, 24 Sep 2009 19:58:09 +0300 Subject: radeon: Fix scissors for r600 KMS. Radeon generic scissors code had problem that some of code was using exclusive and some inclusive bottom right corner. Only r600 driver is using exclusive coordinate so changed generic code to pass inclusive coordinate and r600 driver changes BR coordinate to be exclusive. --- src/mesa/drivers/dri/r600/r700_state.c | 5 +++-- src/mesa/drivers/dri/radeon/radeon_common.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index 8571563149e..124469b5a69 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -1269,10 +1269,11 @@ void r700SetScissor(context_t *context) //--------------- return; } if (context->radeon.state.scissor.enabled) { + /* r600 has exclusive scissors */ x1 = context->radeon.state.scissor.rect.x1; y1 = context->radeon.state.scissor.rect.y1; - x2 = context->radeon.state.scissor.rect.x2; - y2 = context->radeon.state.scissor.rect.y2; + x2 = context->radeon.state.scissor.rect.x2 + 1; + y2 = context->radeon.state.scissor.rect.y2 + 1; } else { if (context->radeon.radeonScreen->driScreen->dri2.enabled) { x1 = 0; diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index a4c7b40798a..9817ff856b9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -232,13 +232,13 @@ void radeonUpdateScissor( GLcontext *ctx ) __DRIdrawablePrivate *dPriv = radeon_get_drawable(rmesa); x1 += dPriv->x; - x2 += dPriv->x + 1; + x2 += dPriv->x; min_x += dPriv->x; - max_x += dPriv->x + 1; + max_x += dPriv->x; y1 += dPriv->y; - y2 += dPriv->y + 1; + y2 += dPriv->y; min_y += dPriv->y; - max_y += dPriv->y + 1; + max_y += dPriv->y; } rmesa->state.scissor.rect.x1 = CLAMP(x1, min_x, max_x); -- cgit v1.2.3 From 1a816117258e594a073f6925edfcd2387071904d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 12:35:51 -0600 Subject: vbo: limit number of warnings to 10 Otherwise some apps will emit tons of warnings. --- src/mesa/vbo/vbo_exec_array.c | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 3f0656a816c..39c2957631a 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -667,6 +667,7 @@ vbo_exec_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) { + static GLuint warnCount = 0; GET_CURRENT_CONTEXT(ctx); if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count, @@ -675,15 +676,19 @@ vbo_exec_DrawRangeElements(GLenum mode, if (end >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ - _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, " - "type 0x%x, indices=%p)\n" - "\tend is out of bounds (max=%u) " - "Element Buffer %u (size %d)\n" - "\tThis should probably be fixed in the application.", - start, end, count, type, indices, - ctx->Array.ArrayObj->_MaxElement - 1, - ctx->Array.ElementArrayBufferObj->Name, - ctx->Array.ElementArrayBufferObj->Size); + warnCount++; + + if (warnCount < 10) { + _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, " + "type 0x%x, indices=%p)\n" + "\tend is out of bounds (max=%u) " + "Element Buffer %u (size %d)\n" + "\tThis should probably be fixed in the application.", + start, end, count, type, indices, + ctx->Array.ArrayObj->_MaxElement - 1, + ctx->Array.ElementArrayBufferObj->Name, + ctx->Array.ElementArrayBufferObj->Size); + } if (0) dump_element_buffer(ctx, type); @@ -700,15 +705,17 @@ vbo_exec_DrawRangeElements(GLenum mode, GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, ctx->Array.ElementArrayBufferObj); if (max >= ctx->Array.ArrayObj->_MaxElement) { - _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, " - "count %d, type 0x%x, indices=%p)\n" - "\tindex=%u is out of bounds (max=%u) " - "Element Buffer %u (size %d)\n" - "\tSkipping the glDrawRangeElements() call", - start, end, count, type, indices, max, - ctx->Array.ArrayObj->_MaxElement - 1, - ctx->Array.ElementArrayBufferObj->Name, - ctx->Array.ElementArrayBufferObj->Size); + if (warnCount < 10) { + _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, " + "count %d, type 0x%x, indices=%p)\n" + "\tindex=%u is out of bounds (max=%u) " + "Element Buffer %u (size %d)\n" + "\tSkipping the glDrawRangeElements() call", + start, end, count, type, indices, max, + ctx->Array.ArrayObj->_MaxElement - 1, + ctx->Array.ElementArrayBufferObj->Name, + ctx->Array.ElementArrayBufferObj->Size); + } return; } /* XXX we could also find the min index and compare to 'start' -- cgit v1.2.3 From 964792b0250ece9fe585a4a02544f0e9c4d453a0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 12:37:06 -0600 Subject: mesa: added comment --- src/mesa/shader/prog_parameter.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 6b9e73b2cbd..2f029b02e50 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -100,6 +100,7 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) * \param type type of parameter, such as * \param name the parameter name, will be duplicated/copied! * \param size number of elements in 'values' vector (1..4, or more) + * \param datatype GL_FLOAT, GL_FLOAT_VECx, GL_INT, GL_INT_VECx or GL_NONE. * \param values initial parameter value, up to 4 GLfloats, or NULL * \param state state indexes, or NULL * \return index of new parameter in the list, or -1 if error (out of mem) -- cgit v1.2.3 From f0339f502cf96499bc5cac8c0611f76f3fd39461 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 12:37:34 -0600 Subject: mesa: replace assertion with no-op function assignment --- src/mesa/main/texrender.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c index cc74d58fbd1..53be83b05ce 100644 --- a/src/mesa/main/texrender.c +++ b/src/mesa/main/texrender.c @@ -397,6 +397,14 @@ texture_put_mono_values(GLcontext *ctx, struct gl_renderbuffer *rb, } +static void +store_nop(struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + const void *texel) +{ +} + + static void delete_texture_wrapper(struct gl_renderbuffer *rb) { @@ -462,7 +470,10 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att) ASSERT(trb->TexImage); trb->Store = trb->TexImage->TexFormat->StoreTexel; - ASSERT(trb->Store); + if (!trb->Store) { + /* we'll never draw into some textures (compressed formats) */ + trb->Store = store_nop; + } if (att->Texture->Target == GL_TEXTURE_1D_ARRAY_EXT) { trb->Yoffset = att->Zoffset; -- cgit v1.2.3 From b849c6f1b3b38a68fae32d4dea16dd7431e41b6e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 12:41:14 -0600 Subject: intel: use default array/element buffers in intel_generate_mipmap() If there happened to be a bound VBO when intel_generate_mipmap() was called we blew up because of a bad vertex array pointer. Fixes regnumonline, bug 23859. --- src/mesa/drivers/dri/intel/intel_generatemipmap.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_generatemipmap.c b/src/mesa/drivers/dri/intel/intel_generatemipmap.c index fe986092db6..12059e122ca 100644 --- a/src/mesa/drivers/dri/intel/intel_generatemipmap.c +++ b/src/mesa/drivers/dri/intel/intel_generatemipmap.c @@ -125,6 +125,8 @@ intel_generate_mipmap_2d(GLcontext *ctx, GLuint fb_name; GLboolean success = GL_FALSE; struct gl_framebuffer *saved_fbo = NULL; + struct gl_buffer_object *saved_array_buffer = NULL; + struct gl_buffer_object *saved_element_buffer = NULL; _mesa_PushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_CURRENT_BIT | GL_COLOR_BUFFER_BIT | @@ -133,6 +135,16 @@ intel_generate_mipmap_2d(GLcontext *ctx, old_active_texture = ctx->Texture.CurrentUnit; _mesa_reference_framebuffer(&saved_fbo, ctx->DrawBuffer); + /* use default array/index buffers */ + _mesa_reference_buffer_object(ctx, &saved_array_buffer, + ctx->Array.ArrayBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, + ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &saved_element_buffer, + ctx->Array.ElementArrayBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, + ctx->Shared->NullBufferObj); + _mesa_Disable(GL_POLYGON_STIPPLE); _mesa_Disable(GL_DEPTH_TEST); _mesa_Disable(GL_STENCIL_TEST); @@ -205,6 +217,15 @@ fail: meta_restore_fragment_program(&intel->meta); meta_restore_vertex_program(&intel->meta); + /* restore array/index buffers */ + _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, + saved_array_buffer); + _mesa_reference_buffer_object(ctx, &saved_array_buffer, NULL); + _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, + saved_element_buffer); + _mesa_reference_buffer_object(ctx, &saved_element_buffer, NULL); + + _mesa_DeleteFramebuffersEXT(1, &fb_name); _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + old_active_texture); if (saved_fbo) -- cgit v1.2.3 From adfa778c8ea436d6e62c37327b44f6ff359ed63f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 14:19:06 -0600 Subject: mesa: remove rgbMode check in enable_texture() If the currently bound FBO isn't yet validated it's possible for rgbMode to be zero so we'll lose the texture enable. This could fix some FBO rendering glitches, but I don't know of any specific instances. --- src/mesa/main/enable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index f432be183cb..47d19ab932b 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -231,7 +231,7 @@ enable_texture(GLcontext *ctx, GLboolean state, GLbitfield bit) const GLuint newenabled = (!state) ? (texUnit->Enabled & ~bit) : (texUnit->Enabled | bit); - if (!ctx->DrawBuffer->Visual.rgbMode || texUnit->Enabled == newenabled) + if (texUnit->Enabled == newenabled) return GL_FALSE; FLUSH_VERTICES(ctx, _NEW_TEXTURE); -- cgit v1.2.3 From 60b152a1b366b1c9b9326dda1d91ab600fbb0d86 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 14:24:14 -0600 Subject: mesa: remove glEnable(GL_DEPTH_BOUNDS_TEST_EXT) check/warning At the time of the enable there may not be a Z buffer, but one may be attached to the FBO later. --- src/mesa/main/enable.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 47d19ab932b..d1b21756fe1 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -933,11 +933,6 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state) /* GL_EXT_depth_bounds_test */ case GL_DEPTH_BOUNDS_TEST_EXT: CHECK_EXTENSION(EXT_depth_bounds_test, cap); - if (state && ctx->DrawBuffer->Visual.depthBits == 0) { - _mesa_warning(ctx, - "glEnable(GL_DEPTH_BOUNDS_TEST_EXT) but no depth buffer"); - return; - } if (ctx->Depth.BoundsTest == state) return; FLUSH_VERTICES(ctx, _NEW_DEPTH); -- cgit v1.2.3 From 601769a2c0071e23ade32de4e8911d75d7f324d2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 23 Sep 2009 16:49:52 -0700 Subject: mesa: Initialize NV_vertex_program fields for the parameter lists and such. This helps let drivers treat NV_vp like ARB_vp. --- src/mesa/shader/nvprogram.c | 28 ++++++++++++++++++++++++++++ src/mesa/shader/nvprogram.h | 2 ++ src/mesa/shader/nvvertparse.c | 25 +++++++++++++++++++++++++ 3 files changed, 55 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index d6469b17bea..fdb2f4210ad 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -511,6 +511,34 @@ _mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer) +void +_mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program) +{ + int i; + + program->NumTemporaries = 0; + for (i = 0; i < program->NumInstructions; i++) { + struct prog_instruction *inst = &program->Instructions[i]; + + if (inst->DstReg.File == PROGRAM_TEMPORARY) { + program->NumTemporaries = MAX2(program->NumTemporaries, + inst->DstReg.Index + 1); + } + if (inst->SrcReg[0].File == PROGRAM_TEMPORARY) { + program->NumTemporaries = MAX2(program->NumTemporaries, + inst->SrcReg[0].Index + 1); + } + if (inst->SrcReg[1].File == PROGRAM_TEMPORARY) { + program->NumTemporaries = MAX2(program->NumTemporaries, + inst->SrcReg[1].Index + 1); + } + if (inst->SrcReg[2].File == PROGRAM_TEMPORARY) { + program->NumTemporaries = MAX2(program->NumTemporaries, + inst->SrcReg[2].Index + 1); + } + } +} + /** * Load/parse/compile a program. * \note Called from the GL API dispatcher. diff --git a/src/mesa/shader/nvprogram.h b/src/mesa/shader/nvprogram.h index bfac165b5ed..0ed143d52f7 100644 --- a/src/mesa/shader/nvprogram.h +++ b/src/mesa/shader/nvprogram.h @@ -103,5 +103,7 @@ extern void GLAPIENTRY _mesa_GetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +extern void +_mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program); #endif diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index f5e2df26708..a94e6b8b803 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -44,6 +44,7 @@ #include "nvprogram.h" #include "nvvertparse.h" #include "prog_instruction.h" +#include "prog_parameter.h" #include "prog_print.h" #include "program.h" @@ -1345,6 +1346,9 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, if (Parse_Program(&parseState, instBuffer)) { + gl_state_index state_tokens[STATE_LENGTH] = {0, 0, 0, 0, 0}; + int i; + /* successful parse! */ if (parseState.isStateProgram) { @@ -1398,6 +1402,27 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, _mesa_fprint_program_opt(stdout, &program->Base, PROG_PRINT_NV, 0); _mesa_printf("------------------------------\n"); #endif + + if (program->Base.Parameters) + _mesa_free_parameter_list(program->Base.Parameters); + + program->Base.Parameters = _mesa_new_parameter_list (); + program->Base.NumParameters = 0; + + state_tokens[0] = STATE_VERTEX_PROGRAM; + state_tokens[1] = STATE_ENV; + /* Add refs to all of the potential params, in order. If we want to not + * upload everything, _mesa_layout_parameters is the answer. + */ + for (i = 0; i < MAX_NV_VERTEX_PROGRAM_PARAMS; i++) { + state_tokens[2] = i; + int index = _mesa_add_state_reference(program->Base.Parameters, + state_tokens); + assert(index == i); + } + program->Base.NumParameters = program->Base.Parameters->NumParameters; + + _mesa_setup_nv_temporary_count(ctx, &program->Base); } else { /* Error! */ -- cgit v1.2.3 From 9018a7dd175caa9a0fbf940b7e66aa9411d2d965 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Sep 2009 10:40:32 -0700 Subject: i965: Load NV program matrices when required. --- src/mesa/drivers/dri/i965/brw_curbe.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c index 0b0e6931a06..4be6c77aa1e 100644 --- a/src/mesa/drivers/dri/i965/brw_curbe.c +++ b/src/mesa/drivers/dri/i965/brw_curbe.c @@ -248,6 +248,9 @@ static void prepare_constant_buffer(struct brw_context *brw) GLuint offset = brw->curbe.vs_start * 16; GLuint nr = brw->vs.prog_data->nr_params / 4; + if (brw->vertex_program->IsNVProgram) + _mesa_load_tracked_matrices(ctx); + /* Updates the ParamaterValues[i] pointers for all parameters of the * basic type of PROGRAM_STATE_VAR. */ -- cgit v1.2.3 From a9a47afe7e87075432ce2d393b55409fcb7149ac Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 23 Sep 2009 16:50:59 -0700 Subject: i965: Remove assert about NV_vp now that it somewhat works. --- src/mesa/drivers/dri/i965/brw_vs.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index e3111c66800..f0c79efbd96 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -90,8 +90,6 @@ static void brw_upload_vs_prog(struct brw_context *brw) struct brw_vertex_program *vp = (struct brw_vertex_program *)brw->vertex_program; - assert (vp && !vp->program.IsNVProgram); - memset(&key, 0, sizeof(key)); /* Just upload the program verbatim for now. Always send it all -- cgit v1.2.3 From 726a04a2cd1bf159a6c40584b4b2b9bc5948a82e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Sep 2009 11:58:33 -0700 Subject: i965: Emit zero initialization for NV VP temporaries as required. This is similar to what r300 does inside the driver, but I've added it as a generic option since it seems most hardware will want it. Fixes piglit nv-init-zero-reg.vpfp and nv-init-zero-addr.vpfp. --- src/mesa/drivers/dri/i965/brw_context.c | 1 + src/mesa/main/mtypes.h | 1 + src/mesa/shader/nvprogram.c | 44 +++++++++++++++++++++++++++++++++ src/mesa/shader/nvprogram.h | 4 +++ src/mesa/shader/nvvertparse.c | 1 + 5 files changed, 51 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 3c5b8483197..c300c33adce 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -125,6 +125,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis, /* We want the GLSL compiler to emit code that uses condition codes */ ctx->Shader.EmitCondCodes = GL_TRUE; + ctx->Shader.EmitNVTempInitialization = GL_TRUE; ctx->Const.VertexProgram.MaxNativeInstructions = (16 * 1024); ctx->Const.VertexProgram.MaxAluInstructions = 0; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 6b64bf8139f..f8e4e41583d 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2079,6 +2079,7 @@ struct gl_shader_state GLboolean EmitContReturn; /**< Emit CONT/RET opcodes? */ GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitComments; /**< Annotated instructions */ + GLboolean EmitNVTempInitialization; /**< 0-fill NV temp registers */ void *MemPool; GLbitfield Flags; /**< Mask of GLSL_x flags */ struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */ diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c index fdb2f4210ad..471a7358a2f 100644 --- a/src/mesa/shader/nvprogram.c +++ b/src/mesa/shader/nvprogram.c @@ -509,7 +509,51 @@ _mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer) *pointer = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[index].Ptr; } +void +_mesa_emit_nv_temp_initialization(GLcontext *ctx, + struct gl_program *program) +{ + struct prog_instruction *inst; + int i; + + if (!ctx->Shader.EmitNVTempInitialization) + return; + /* We'll swizzle up a zero temporary so we can use it for the + * ARL. + */ + if (program->NumTemporaries == 0) + program->NumTemporaries = 1; + + _mesa_insert_instructions(program, 0, program->NumTemporaries + 1); + + for (i = 0; i < program->NumTemporaries; i++) { + struct prog_instruction *inst = &program->Instructions[i]; + + inst->Opcode = OPCODE_SWZ; + inst->DstReg.File = PROGRAM_TEMPORARY; + inst->DstReg.Index = i; + inst->DstReg.WriteMask = WRITEMASK_XYZW; + inst->SrcReg[0].File = PROGRAM_TEMPORARY; + inst->SrcReg[0].Index = 0; + inst->SrcReg[0].Swizzle = MAKE_SWIZZLE4(SWIZZLE_ZERO, + SWIZZLE_ZERO, + SWIZZLE_ZERO, + SWIZZLE_ZERO); + } + + inst = &program->Instructions[i]; + inst->Opcode = OPCODE_ARL; + inst->DstReg.File = PROGRAM_ADDRESS; + inst->DstReg.Index = 0; + inst->DstReg.WriteMask = WRITEMASK_XYZW; + inst->SrcReg[0].File = PROGRAM_TEMPORARY; + inst->SrcReg[0].Index = 0; + inst->SrcReg[0].Swizzle = SWIZZLE_XXXX; + + if (program->NumAddressRegs == 0) + program->NumAddressRegs = 1; +} void _mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program) diff --git a/src/mesa/shader/nvprogram.h b/src/mesa/shader/nvprogram.h index 0ed143d52f7..8ee59661bd0 100644 --- a/src/mesa/shader/nvprogram.h +++ b/src/mesa/shader/nvprogram.h @@ -106,4 +106,8 @@ _mesa_GetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name, extern void _mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program); +extern void +_mesa_emit_nv_temp_initialization(GLcontext *ctx, + struct gl_program *program); + #endif diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index a94e6b8b803..6ab8a14cb9b 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -1423,6 +1423,7 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, program->Base.NumParameters = program->Base.Parameters->NumParameters; _mesa_setup_nv_temporary_count(ctx, &program->Base); + _mesa_emit_nv_temp_initialization(ctx, &program->Base); } else { /* Error! */ -- cgit v1.2.3 From 54107a097904129ff794534542acd09ed152ea2e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Sep 2009 14:53:49 -0700 Subject: i965: Clean up some mess with the batch cache. Its flagging of extra state that's already flagged by the vtbl new_batch when appropriate was confusing my tracking down of the OA clear bug. --- src/mesa/drivers/dri/i965/brw_state.h | 5 +---- src/mesa/drivers/dri/i965/brw_state_batch.c | 15 ++------------- src/mesa/drivers/dri/i965/brw_state_upload.c | 3 ++- 3 files changed, 5 insertions(+), 18 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 78572356a3d..5335eac8951 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -86,9 +86,6 @@ const struct brw_tracked_state brw_psp_urb_cbs; const struct brw_tracked_state brw_pipe_control; -const struct brw_tracked_state brw_clear_surface_cache; -const struct brw_tracked_state brw_clear_batch_cache; - const struct brw_tracked_state brw_drawing_rect; const struct brw_tracked_state brw_indices; const struct brw_tracked_state brw_vertices; @@ -165,7 +162,7 @@ GLboolean brw_cached_batch_struct( struct brw_context *brw, const void *data, GLuint sz ); void brw_destroy_batch_cache( struct brw_context *brw ); -void brw_clear_batch_cache_flush( struct brw_context *brw ); +void brw_clear_batch_cache( struct brw_context *brw ); /* brw_wm_surface_state.c */ dri_bo * diff --git a/src/mesa/drivers/dri/i965/brw_state_batch.c b/src/mesa/drivers/dri/i965/brw_state_batch.c index 811940edc05..7821898cf9b 100644 --- a/src/mesa/drivers/dri/i965/brw_state_batch.c +++ b/src/mesa/drivers/dri/i965/brw_state_batch.c @@ -79,7 +79,7 @@ GLboolean brw_cached_batch_struct( struct brw_context *brw, return GL_TRUE; } -static void clear_batch_cache( struct brw_context *brw ) +void brw_clear_batch_cache( struct brw_context *brw ) { struct brw_cached_batch_item *item = brw->cached_batch_items; @@ -93,18 +93,7 @@ static void clear_batch_cache( struct brw_context *brw ) brw->cached_batch_items = NULL; } -void brw_clear_batch_cache_flush( struct brw_context *brw ) -{ - clear_batch_cache(brw); - - brw->state.dirty.mesa |= ~0; - brw->state.dirty.brw |= ~0; - brw->state.dirty.cache |= ~0; -} - - - void brw_destroy_batch_cache( struct brw_context *brw ) { - clear_batch_cache(brw); + brw_clear_batch_cache(brw); } diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index 414620d0b39..b817b741e77 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -287,6 +287,7 @@ void brw_validate_state( struct brw_context *brw ) if (brw->emit_state_always) { state->mesa |= ~0; state->brw |= ~0; + state->cache |= ~0; } if (brw->fragment_program != ctx->FragmentProgram._Current) { @@ -305,7 +306,7 @@ void brw_validate_state( struct brw_context *brw ) return; if (brw->state.dirty.brw & BRW_NEW_CONTEXT) - brw_clear_batch_cache_flush(brw); + brw_clear_batch_cache(brw); brw->intel.Fallback = 0; -- cgit v1.2.3 From cc8084932cc552587e3036dbbf62c77db3b4a08e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Sep 2009 16:15:52 -0700 Subject: intel: Flush the batch when we're about to subdata into a VBO. This fixes the clears in openarena with the new metaops clear code, and the new piglit vbo-subdata-sync test. Bug #23857. --- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 6 +++++- src/mesa/drivers/dri/intel/intel_clear.c | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index c55c5c426e0..7f6fb66d52f 100644 --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -207,8 +207,12 @@ intel_bufferobj_subdata(GLcontext * ctx, if (intel_obj->sys_buffer) memcpy((char *)intel_obj->sys_buffer + offset, data, size); - else + else { + /* Flush any existing batchbuffer that might reference this data. */ + intelFlush(ctx); + dri_bo_subdata(intel_obj->buffer, offset, size, data); + } } diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c index 9010b910c7d..1b0e221789a 100644 --- a/src/mesa/drivers/dri/intel/intel_clear.c +++ b/src/mesa/drivers/dri/intel/intel_clear.c @@ -173,7 +173,6 @@ intelClear(GLcontext *ctx, GLbitfield mask) } _mesa_meta_clear(&intel->ctx, tri_mask); - intel_batchbuffer_flush(intel->batch); } if (swrast_mask) { -- cgit v1.2.3 From 09af58d7ed7dfa8f2ce2b881bb849064e136c830 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 24 Sep 2009 18:27:20 -0700 Subject: NV fp lexer: Add UP4B and UP4UB instructions that were previously missing --- src/mesa/shader/lex.yy.c | 1351 ++++++++++++++++++++------------------- src/mesa/shader/program_lexer.l | 2 + 2 files changed, 686 insertions(+), 667 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c index 3c4e97b650a..3c86913fdfc 100644 --- a/src/mesa/shader/lex.yy.c +++ b/src/mesa/shader/lex.yy.c @@ -357,8 +357,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 168 -#define YY_END_OF_BUFFER 169 +#define YY_NUM_RULES 170 +#define YY_END_OF_BUFFER 171 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -366,100 +366,101 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[836] = +static yyconst flex_int16_t yy_accept[850] = { 0, - 0, 0, 169, 167, 165, 164, 167, 167, 137, 163, - 139, 139, 139, 139, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 165, 0, 0, 166, 137, - 0, 138, 140, 160, 160, 0, 0, 0, 0, 160, - 0, 0, 0, 0, 0, 0, 0, 117, 161, 118, - 119, 151, 151, 151, 151, 0, 139, 0, 125, 126, - 127, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 158, 158, 0, 0, 0, + 0, 0, 171, 169, 167, 166, 169, 169, 139, 165, + 141, 141, 141, 141, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 167, 0, 0, 168, 139, + 0, 140, 142, 162, 162, 0, 0, 0, 0, 162, + 0, 0, 0, 0, 0, 0, 0, 119, 163, 120, + 121, 153, 153, 153, 153, 0, 141, 0, 127, 128, + 129, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 161, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 160, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 157, 157, 157, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 148, 148, 148, 149, 149, 150, 141, - 140, 141, 0, 142, 11, 12, 137, 13, 137, 137, - 14, 15, 137, 16, 17, 18, 19, 20, 21, 6, + 159, 159, 159, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 150, 150, 150, 151, 151, 152, 143, + 142, 143, 0, 144, 11, 12, 139, 13, 139, 139, + 14, 15, 139, 16, 17, 18, 19, 20, 21, 6, 22, 23, 24, 25, 26, 28, 27, 29, 30, 31, - 32, 33, 34, 35, 137, 137, 137, 137, 137, 40, - 41, 137, 42, 43, 44, 45, 46, 47, 48, 137, - 49, 50, 51, 52, 53, 54, 55, 137, 56, 57, - 58, 59, 137, 62, 63, 137, 137, 137, 137, 137, - 137, 0, 0, 0, 0, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 78, 79, 81, 0, - 156, 0, 0, 0, 0, 0, 0, 95, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 155, 154, - 154, 107, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 145, 145, 146, 147, 0, 143, 11, 11, - 137, 12, 12, 12, 137, 137, 137, 137, 137, 15, - 15, 137, 128, 16, 16, 137, 17, 17, 137, 18, - 18, 137, 19, 19, 137, 20, 20, 137, 21, 21, - 137, 22, 22, 137, 24, 24, 137, 25, 25, 137, - 28, 28, 137, 27, 27, 137, 30, 30, 137, 31, - 31, 137, 32, 32, 137, 33, 33, 137, 34, 34, - 137, 35, 35, 137, 137, 137, 137, 36, 137, 38, - 137, 40, 40, 137, 41, 41, 137, 129, 42, 42, - 137, 43, 43, 137, 137, 45, 45, 137, 46, 46, - - 137, 47, 47, 137, 48, 48, 137, 137, 49, 49, - 137, 50, 50, 137, 51, 51, 137, 52, 52, 137, - 53, 53, 137, 54, 54, 137, 137, 10, 56, 137, - 57, 137, 58, 137, 59, 137, 60, 137, 62, 62, - 137, 137, 137, 137, 137, 137, 137, 137, 0, 162, - 0, 0, 0, 71, 72, 0, 0, 0, 0, 0, - 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, + 32, 33, 34, 35, 139, 139, 139, 139, 139, 40, + 41, 139, 42, 43, 44, 45, 46, 47, 48, 139, + 49, 50, 51, 52, 53, 54, 55, 139, 56, 57, + 58, 59, 139, 139, 64, 65, 139, 139, 139, 139, + 139, 139, 0, 0, 0, 0, 142, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 80, 81, 83, + 0, 158, 0, 0, 0, 0, 0, 0, 97, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, + 156, 156, 109, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 147, 147, 148, 149, 0, 145, 11, + 11, 139, 12, 12, 12, 139, 139, 139, 139, 139, + 15, 15, 139, 130, 16, 16, 139, 17, 17, 139, + 18, 18, 139, 19, 19, 139, 20, 20, 139, 21, + 21, 139, 22, 22, 139, 24, 24, 139, 25, 25, + 139, 28, 28, 139, 27, 27, 139, 30, 30, 139, + 31, 31, 139, 32, 32, 139, 33, 33, 139, 34, + 34, 139, 35, 35, 139, 139, 139, 139, 36, 139, + 38, 139, 40, 40, 139, 41, 41, 139, 131, 42, + 42, 139, 43, 43, 139, 139, 45, 45, 139, 46, + + 46, 139, 47, 47, 139, 48, 48, 139, 139, 49, + 49, 139, 50, 50, 139, 51, 51, 139, 52, 52, + 139, 53, 53, 139, 54, 54, 139, 139, 10, 56, + 139, 57, 139, 58, 139, 59, 139, 60, 139, 62, + 139, 64, 64, 139, 139, 139, 139, 139, 139, 139, + 139, 0, 164, 0, 0, 0, 73, 74, 0, 0, + 0, 0, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 153, 0, 0, 0, 111, 0, 113, 0, 0, - 0, 0, 0, 0, 152, 144, 137, 137, 137, 4, - - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 9, 37, 39, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 60, 137, 61, - 137, 137, 137, 137, 137, 67, 137, 137, 0, 0, - 0, 0, 0, 73, 74, 0, 0, 0, 0, 82, - 0, 0, 86, 89, 0, 0, 0, 0, 0, 0, - 0, 100, 101, 0, 0, 0, 0, 106, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 137, 137, - - 137, 137, 137, 137, 5, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 7, 8, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 61, 137, - 137, 137, 137, 137, 68, 137, 64, 0, 0, 0, - 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 92, 0, 96, 97, 0, 99, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 115, 116, 0, - 0, 123, 11, 3, 12, 133, 134, 137, 14, 15, - - 16, 17, 18, 19, 20, 21, 22, 24, 25, 28, - 27, 30, 31, 32, 33, 34, 35, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 137, 137, 137, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 137, 137, 62, 63, 137, 66, 124, 0, 0, 69, - 0, 75, 0, 0, 0, 84, 0, 0, 0, 0, - 0, 0, 98, 0, 0, 104, 91, 0, 0, 0, - 0, 0, 0, 120, 0, 137, 130, 131, 137, 60, - 137, 65, 0, 0, 0, 0, 77, 80, 85, 0, - 0, 90, 0, 0, 0, 103, 0, 0, 0, 0, - - 112, 114, 0, 137, 137, 61, 2, 1, 0, 76, - 0, 88, 0, 94, 102, 0, 0, 109, 110, 121, - 137, 132, 0, 87, 0, 105, 108, 137, 70, 93, - 137, 137, 135, 136, 0 + 0, 0, 0, 0, 155, 0, 0, 0, 113, 0, + 115, 0, 0, 0, 0, 0, 0, 154, 146, 139, + + 139, 139, 4, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 9, 37, 39, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 60, 139, 61, 62, 139, 63, 139, 139, 139, 139, + 139, 69, 139, 139, 0, 0, 0, 0, 0, 75, + 76, 0, 0, 0, 0, 84, 0, 0, 88, 91, + 0, 0, 0, 0, 0, 0, 0, 102, 103, 0, + 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 139, 139, 139, 139, 139, 139, + 5, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 7, 8, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 61, 139, 139, 63, 139, 139, + 139, 139, 139, 70, 139, 66, 0, 0, 0, 0, + 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 94, 0, 98, 99, 0, 101, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 117, 118, 0, 0, + + 125, 11, 3, 12, 135, 136, 139, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 24, 25, 28, 27, + 30, 31, 32, 33, 34, 35, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 139, 139, 139, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 139, + 139, 139, 139, 64, 65, 139, 68, 126, 0, 0, + 71, 0, 77, 0, 0, 0, 86, 0, 0, 0, + 0, 0, 0, 100, 0, 0, 106, 93, 0, 0, + 0, 0, 0, 0, 122, 0, 139, 132, 133, 139, + 60, 139, 62, 139, 67, 0, 0, 0, 0, 79, + + 82, 87, 0, 0, 92, 0, 0, 0, 105, 0, + 0, 0, 0, 114, 116, 0, 139, 139, 61, 63, + 2, 1, 0, 78, 0, 90, 0, 96, 104, 0, + 0, 111, 112, 123, 139, 134, 0, 89, 0, 107, + 110, 139, 72, 95, 139, 139, 137, 138, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -505,199 +506,203 @@ static yyconst flex_int32_t yy_meta[68] = 2, 2, 2, 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[839] = +static yyconst flex_int16_t yy_base[853] = { 0, - 0, 0, 1283, 1284, 66, 1284, 1277, 1278, 0, 69, - 85, 128, 140, 152, 151, 58, 56, 63, 76, 1256, - 158, 160, 39, 163, 173, 189, 52, 1249, 76, 1219, - 1218, 1230, 1214, 1228, 1227, 105, 1256, 1268, 1284, 0, - 225, 1284, 218, 160, 157, 20, 123, 66, 119, 192, - 1228, 1214, 54, 162, 1212, 1224, 194, 1284, 200, 195, - 98, 227, 196, 231, 235, 293, 305, 316, 1284, 1284, - 1284, 1233, 1246, 1240, 223, 1229, 1232, 1228, 1243, 107, - 298, 1225, 1239, 246, 1225, 1238, 1229, 1242, 1219, 1230, - 1221, 182, 1222, 1213, 1222, 1213, 1212, 1213, 144, 1207, - - 1213, 1224, 1215, 1209, 1206, 1207, 1211, 289, 1220, 1207, - 302, 1214, 1201, 1215, 1191, 65, 315, 1218, 1210, 1209, - 1185, 1170, 1165, 1182, 1158, 1163, 1189, 279, 1178, 293, - 1173, 342, 299, 1175, 1156, 317, 1166, 1162, 1157, 207, - 1163, 1149, 1165, 1162, 1153, 320, 324, 1155, 1144, 1158, - 1161, 1143, 1158, 1145, 1142, 1149, 284, 1157, 227, 288, - 327, 342, 345, 1134, 1151, 1152, 1145, 1127, 318, 1128, - 1150, 1141, 330, 341, 345, 349, 353, 357, 361, 1284, - 419, 430, 436, 442, 440, 441, 1174, 0, 1173, 1156, - 1146, 443, 1166, 444, 451, 468, 470, 472, 471, 0, + 0, 0, 1299, 1300, 66, 1300, 1293, 1294, 0, 69, + 85, 128, 140, 152, 151, 58, 56, 63, 76, 1272, + 158, 160, 39, 163, 173, 189, 52, 1265, 76, 1235, + 1234, 1246, 1230, 1244, 1243, 105, 1272, 1284, 1300, 0, + 225, 1300, 218, 160, 157, 20, 123, 66, 119, 192, + 1244, 1230, 54, 162, 1228, 1240, 194, 1300, 200, 195, + 98, 227, 196, 231, 235, 293, 305, 316, 1300, 1300, + 1300, 1249, 1262, 1256, 223, 1245, 1248, 1244, 1259, 107, + 298, 1241, 1255, 246, 1241, 1254, 1245, 1258, 1235, 1246, + 1237, 182, 1238, 1229, 1238, 1229, 1228, 1229, 144, 1223, + + 1229, 1240, 1231, 1225, 1222, 1223, 1227, 289, 1236, 1223, + 302, 1230, 1217, 1231, 1207, 65, 315, 276, 1227, 1226, + 1202, 1187, 1182, 1199, 1175, 1180, 1206, 279, 1195, 293, + 1190, 342, 299, 1192, 1173, 317, 1183, 1179, 1174, 207, + 1180, 1166, 1182, 1179, 1170, 320, 324, 1172, 1161, 1175, + 1178, 1160, 1175, 1162, 1159, 1166, 284, 1174, 227, 288, + 327, 342, 345, 1151, 1168, 1169, 1162, 1144, 318, 1145, + 1167, 1158, 330, 341, 345, 349, 353, 357, 361, 1300, + 419, 430, 436, 442, 440, 441, 1191, 0, 1190, 1173, + 1163, 443, 1183, 444, 451, 468, 470, 472, 471, 0, 496, 0, 497, 498, 0, 499, 500, 0, 524, 525, - 526, 536, 537, 553, 1161, 1154, 1167, 354, 356, 561, - 563, 1148, 564, 565, 1140, 580, 590, 591, 592, 1161, - 593, 617, 618, 619, 629, 630, 1138, 1148, 247, 330, - 362, 419, 445, 646, 1136, 1128, 1127, 1112, 1112, 1111, - 1110, 1153, 1125, 1113, 662, 669, 643, 1117, 487, 1114, - 1108, 1108, 1102, 1115, 1115, 1100, 1284, 1284, 1115, 1103, - 646, 1110, 135, 1107, 1113, 561, 1108, 1284, 1099, 1106, - 1105, 1108, 1094, 1093, 1097, 1092, 330, 1097, 650, 653, - 665, 1284, 1089, 1087, 1087, 1095, 1096, 1078, 670, 1083, - - 1089, 432, 460, 486, 579, 655, 715, 722, 1095, 682, - 1102, 1093, 697, 721, 1100, 1099, 1092, 1106, 1096, 1087, - 699, 1094, 0, 1085, 724, 1092, 1083, 725, 1090, 1081, - 726, 1088, 1079, 727, 1086, 1077, 728, 1084, 1075, 729, - 1082, 1073, 730, 1080, 1071, 731, 1078, 1069, 732, 1076, - 1067, 733, 1074, 1065, 734, 1072, 1063, 735, 1070, 1061, - 736, 1068, 1059, 737, 1066, 1057, 738, 1064, 1055, 739, - 1062, 1053, 740, 1060, 1063, 1056, 1063, 0, 1056, 0, - 1071, 1046, 741, 1053, 1044, 742, 1051, 0, 1042, 743, - 1049, 1040, 745, 1047, 1046, 1037, 746, 1044, 1035, 767, - - 1042, 1033, 770, 1040, 1031, 771, 1038, 1041, 1028, 772, - 1035, 1026, 773, 1033, 1024, 774, 1031, 1022, 775, 1029, - 1020, 776, 1027, 1018, 777, 1025, 1024, 0, 1015, 1022, - 1013, 1020, 1011, 1018, 1009, 1016, 778, 1015, 1006, 779, - 1013, 1012, 990, 984, 989, 995, 978, 993, 424, 1284, - 992, 982, 986, 1284, 1284, 976, 985, 971, 988, 971, - 974, 968, 1284, 969, 968, 965, 972, 965, 973, 969, - 979, 976, 958, 964, 971, 955, 954, 972, 954, 966, - 965, 1284, 964, 954, 958, 1284, 945, 1284, 950, 950, - 958, 941, 942, 952, 1284, 1284, 984, 966, 982, 0, - - 788, 980, 980, 979, 978, 977, 976, 975, 974, 973, - 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, - 962, 949, 942, 0, 0, 0, 959, 958, 957, 956, - 955, 954, 953, 952, 951, 929, 949, 948, 947, 946, - 945, 944, 943, 942, 941, 940, 939, 913, 920, 783, - 936, 935, 904, 907, 887, 0, 888, 881, 888, 887, - 888, 880, 898, 1284, 1284, 880, 878, 888, 881, 1284, - 876, 893, 345, 1284, 884, 868, 869, 878, 869, 868, - 868, 1284, 867, 876, 866, 882, 879, 1284, 878, 876, - 865, 866, 862, 854, 861, 856, 857, 852, 878, 878, - - 876, 890, 889, 884, 0, 872, 871, 870, 869, 868, - 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, - 857, 856, 855, 854, 0, 0, 853, 852, 851, 850, - 849, 848, 847, 846, 845, 791, 844, 843, 842, 841, - 840, 839, 838, 837, 836, 835, 834, 851, 825, 832, - 830, 829, 807, 807, 0, 814, 0, 848, 847, 796, - 814, 1284, 809, 804, 797, 793, 805, 795, 793, 789, - 805, 796, 795, 1284, 1284, 798, 1284, 793, 786, 775, - 786, 778, 782, 795, 790, 793, 775, 1284, 1284, 787, - 776, 1284, 0, 0, 0, 0, 0, 815, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 526, 536, 537, 553, 1178, 1171, 1184, 354, 356, 561, + 563, 1165, 564, 565, 1157, 580, 590, 591, 592, 1178, + 593, 617, 618, 619, 629, 630, 1155, 1165, 330, 362, + 419, 483, 445, 364, 646, 1153, 1145, 1144, 1129, 1129, + 1128, 1127, 1170, 1142, 1130, 662, 669, 643, 1134, 487, + 1131, 1125, 1125, 1119, 1132, 1132, 1117, 1300, 1300, 1132, + 1120, 646, 1127, 135, 1124, 1130, 561, 1125, 1300, 1116, + 1123, 1122, 1125, 1111, 1110, 1114, 1109, 448, 1114, 650, + 653, 665, 1300, 1106, 1104, 1104, 1112, 1113, 1095, 670, + + 1100, 1106, 486, 579, 655, 661, 668, 726, 732, 1112, + 682, 1119, 1110, 688, 730, 1117, 1116, 1109, 1123, 1113, + 1104, 712, 1111, 0, 1102, 731, 1109, 1100, 733, 1107, + 1098, 734, 1105, 1096, 736, 1103, 1094, 737, 1101, 1092, + 738, 1099, 1090, 739, 1097, 1088, 740, 1095, 1086, 741, + 1093, 1084, 742, 1091, 1082, 743, 1089, 1080, 744, 1087, + 1078, 745, 1085, 1076, 746, 1083, 1074, 747, 1081, 1072, + 748, 1079, 1070, 749, 1077, 1080, 1073, 1080, 0, 1073, + 0, 1088, 1063, 750, 1070, 1061, 751, 1068, 0, 1059, + 752, 1066, 1057, 755, 1064, 1063, 1054, 758, 1061, 1052, + + 776, 1059, 1050, 777, 1057, 1048, 779, 1055, 1058, 1045, + 780, 1052, 1043, 782, 1050, 1041, 783, 1048, 1039, 784, + 1046, 1037, 785, 1044, 1035, 786, 1042, 1041, 0, 1032, + 1039, 1030, 1037, 1028, 1035, 1026, 1033, 787, 1032, 788, + 1047, 1022, 789, 1029, 1028, 1006, 1000, 1005, 1011, 994, + 1009, 424, 1300, 1008, 998, 1002, 1300, 1300, 992, 1001, + 987, 1004, 987, 990, 984, 1300, 985, 984, 981, 988, + 981, 989, 985, 995, 992, 974, 980, 987, 971, 970, + 988, 970, 982, 981, 1300, 980, 970, 974, 1300, 961, + 1300, 966, 966, 974, 957, 958, 968, 1300, 1300, 1000, + + 982, 998, 0, 798, 996, 996, 995, 994, 993, 992, + 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, + 981, 980, 979, 978, 965, 958, 0, 0, 0, 975, + 974, 973, 972, 971, 970, 969, 968, 967, 945, 965, + 964, 963, 962, 961, 960, 959, 958, 957, 956, 955, + 929, 936, 793, 927, 934, 794, 950, 949, 918, 921, + 901, 0, 902, 895, 902, 901, 902, 894, 912, 1300, + 1300, 894, 892, 902, 895, 1300, 890, 907, 516, 1300, + 898, 882, 883, 892, 883, 882, 882, 1300, 881, 890, + 880, 896, 893, 1300, 892, 890, 879, 880, 876, 868, + + 875, 870, 871, 866, 892, 892, 890, 904, 903, 898, + 0, 886, 885, 884, 883, 882, 881, 880, 879, 878, + 877, 876, 875, 874, 873, 872, 871, 870, 869, 868, + 0, 0, 867, 866, 865, 864, 863, 862, 861, 860, + 859, 804, 858, 857, 856, 855, 854, 853, 852, 851, + 850, 849, 848, 865, 839, 846, 862, 836, 843, 841, + 840, 818, 818, 0, 825, 0, 859, 858, 807, 825, + 1300, 820, 815, 808, 804, 816, 806, 804, 800, 816, + 807, 806, 1300, 1300, 809, 1300, 804, 797, 786, 797, + 789, 793, 806, 801, 804, 786, 1300, 1300, 798, 787, + + 1300, 0, 0, 0, 0, 0, 826, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 811, 803, 790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 775, 791, 0, 0, 745, 0, 0, 796, 795, 1284, - 737, 1284, 655, 655, 661, 1284, 644, 658, 643, 644, - 635, 620, 1284, 598, 608, 1284, 1284, 604, 586, 579, - 567, 567, 574, 1284, 557, 582, 0, 0, 582, 0, - 565, 0, 582, 580, 539, 525, 1284, 1284, 1284, 527, - 527, 1284, 525, 497, 499, 1284, 478, 451, 439, 441, - - 1284, 1284, 431, 441, 366, 0, 1284, 1284, 21, 1284, - 144, 1284, 176, 1284, 1284, 182, 187, 1284, 1284, 1284, - 220, 0, 235, 1284, 245, 1284, 1284, 424, 1284, 1284, - 327, 373, 0, 0, 1284, 824, 396, 827 + 0, 0, 0, 0, 0, 814, 813, 802, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, + 798, 779, 792, 0, 0, 656, 0, 0, 706, 702, + 1300, 649, 1300, 648, 648, 654, 1300, 637, 645, 610, + 612, 608, 608, 1300, 572, 583, 1300, 1300, 577, 573, + 560, 557, 542, 555, 1300, 539, 573, 0, 0, 572, + 0, 555, 0, 546, 0, 562, 551, 495, 479, 1300, + + 1300, 1300, 481, 481, 1300, 480, 443, 31, 1300, 141, + 166, 171, 186, 1300, 1300, 211, 236, 276, 0, 0, + 1300, 1300, 290, 1300, 325, 1300, 346, 1300, 1300, 343, + 341, 1300, 1300, 1300, 365, 0, 380, 1300, 371, 1300, + 1300, 486, 1300, 1300, 451, 458, 0, 0, 1300, 836, + 503, 839 } ; -static yyconst flex_int16_t yy_def[839] = +static yyconst flex_int16_t yy_def[853] = { 0, - 835, 1, 835, 835, 835, 835, 835, 836, 837, 835, - 835, 835, 835, 835, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 835, 835, 836, 835, 837, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 838, 835, 835, 835, 835, - 835, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - - 835, 835, 835, 835, 835, 835, 835, 835, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 837, 837, 837, 837, - - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 837, 837, - - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 837, 837, 837, 837, 837, 837, 837, 837, - - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, - 837, 837, 837, 837, 837, 837, 837, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 837, 837, 837, 837, 837, - 837, 837, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - - 835, 835, 835, 837, 837, 837, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 837, 837, 835, 835, 835, 835, 835, 837, 835, 835, - 837, 837, 837, 837, 0, 835, 835, 835 + 849, 1, 849, 849, 849, 849, 849, 850, 851, 849, + 849, 849, 849, 849, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 849, 849, 850, 849, 851, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 852, 849, 849, 849, 849, + 849, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + + 849, 849, 849, 849, 849, 849, 849, 849, 849, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 851, + + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + + 849, 849, 849, 849, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + + 849, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 851, 851, 851, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 851, 851, 851, 851, + 851, 851, 851, 851, 851, 849, 849, 849, 849, 849, + + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 851, 851, 851, 851, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 851, 851, 849, 849, 849, 849, + 849, 851, 849, 849, 851, 851, 851, 851, 0, 849, + 849, 849 } ; -static yyconst flex_int16_t yy_nxt[1352] = +static yyconst flex_int16_t yy_nxt[1368] = { 0, 4, 5, 6, 5, 7, 8, 9, 4, 10, 11, 12, 13, 14, 11, 11, 15, 9, 16, 17, 18, @@ -706,7 +711,7 @@ static yyconst flex_int16_t yy_nxt[1352] = 9, 9, 9, 9, 9, 9, 30, 9, 9, 9, 9, 9, 9, 9, 9, 9, 31, 9, 32, 33, 34, 9, 35, 9, 9, 9, 9, 36, 96, 36, - 41, 116, 137, 97, 80, 138, 823, 42, 43, 43, + 41, 116, 137, 97, 80, 138, 829, 42, 43, 43, 43, 43, 43, 43, 77, 81, 78, 119, 82, 117, 83, 238, 79, 66, 67, 67, 67, 67, 67, 67, @@ -718,139 +723,140 @@ static yyconst flex_int16_t yy_nxt[1352] = 67, 67, 67, 67, 67, 218, 171, 219, 70, 68, 66, 67, 67, 67, 67, 67, 67, 72, 139, 73, 71, 68, 140, 68, 144, 92, 74, 145, 98, 88, - 464, 89, 75, 93, 76, 68, 90, 99, 94, 91, - 101, 100, 102, 103, 95, 465, 824, 68, 136, 133, + 467, 89, 75, 93, 76, 68, 90, 99, 94, 91, + 101, 100, 102, 103, 95, 468, 830, 68, 136, 133, 210, 133, 133, 152, 133, 104, 105, 133, 106, 107, 108, 109, 110, 134, 111, 133, 112, 153, 133, 211, - 135, 825, 113, 114, 154, 115, 41, 43, 43, 43, - 43, 43, 43, 146, 147, 157, 826, 132, 165, 133, - 166, 161, 162, 167, 168, 827, 158, 163, 188, 159, - 133, 169, 160, 264, 189, 164, 828, 201, 133, 174, - 173, 175, 176, 132, 429, 265, 128, 129, 46, 47, - 48, 49, 172, 51, 52, 202, 284, 53, 54, 55, - 56, 57, 58, 130, 60, 61, 285, 430, 131, 829, + 135, 831, 113, 114, 154, 115, 41, 43, 43, 43, + 43, 43, 43, 146, 147, 157, 832, 132, 165, 133, + 166, 161, 162, 167, 168, 833, 158, 163, 188, 159, + 133, 169, 160, 265, 189, 164, 834, 201, 133, 174, + 173, 175, 176, 132, 835, 266, 128, 129, 46, 47, + 48, 49, 172, 51, 52, 202, 285, 53, 54, 55, + 56, 57, 58, 130, 60, 61, 286, 243, 131, 244, 173, 173, 173, 173, 177, 173, 173, 178, 179, 173, - 173, 173, 181, 181, 181, 181, 181, 181, 228, 830, + 173, 173, 181, 181, 181, 181, 181, 181, 228, 836, 196, 197, 182, 66, 67, 67, 67, 67, 67, 67, 198, 232, 229, 183, 68, 184, 184, 184, 184, 184, - 184, 240, 134, 241, 254, 233, 281, 286, 182, 135, - 257, 257, 282, 287, 242, 833, 257, 431, 164, 255, - 68, 256, 256, 256, 256, 256, 256, 257, 257, 257, - 260, 257, 257, 297, 257, 271, 257, 257, 257, 257, - 432, 257, 380, 298, 257, 257, 378, 479, 257, 433, - 480, 288, 257, 289, 257, 257, 290, 291, 379, 257, - 381, 834, 257, 302, 302, 302, 302, 40, 669, 822, - - 257, 670, 434, 257, 302, 302, 302, 302, 303, 302, - 302, 304, 305, 302, 302, 302, 302, 302, 302, 302, - 306, 302, 302, 302, 302, 302, 302, 302, 43, 43, - 43, 43, 43, 43, 831, 832, 435, 307, 132, 308, - 308, 308, 308, 308, 308, 184, 184, 184, 184, 184, - 184, 184, 184, 184, 184, 184, 184, 309, 312, 436, - 320, 324, 310, 313, 132, 321, 325, 437, 327, 821, - 559, 310, 314, 328, 321, 325, 820, 310, 313, 438, - 311, 315, 328, 322, 326, 330, 560, 333, 339, 336, - 331, 329, 334, 340, 337, 495, 495, 495, 495, 331, - - 819, 334, 340, 337, 818, 331, 817, 334, 332, 337, - 335, 341, 338, 342, 345, 348, 351, 354, 343, 346, - 349, 352, 355, 495, 495, 495, 495, 343, 346, 349, - 352, 355, 452, 816, 346, 349, 344, 347, 350, 353, - 356, 357, 360, 363, 815, 453, 358, 361, 364, 496, - 495, 495, 495, 366, 369, 358, 361, 364, 367, 370, - 814, 358, 361, 364, 359, 362, 365, 367, 370, 813, - 372, 812, 811, 367, 370, 373, 368, 371, 382, 810, - 385, 389, 392, 383, 373, 386, 390, 393, 809, 808, - 373, 807, 383, 374, 386, 390, 393, 396, 806, 805, - - 804, 384, 397, 387, 391, 394, 468, 399, 402, 405, - 409, 397, 400, 403, 406, 410, 803, 397, 802, 469, - 398, 400, 403, 406, 410, 801, 800, 400, 403, 406, - 401, 404, 407, 411, 412, 415, 418, 799, 798, 413, - 416, 419, 495, 495, 495, 495, 421, 424, 413, 416, - 419, 422, 425, 797, 413, 416, 419, 414, 417, 420, - 422, 425, 796, 439, 795, 794, 422, 425, 440, 423, - 426, 256, 256, 256, 256, 256, 256, 440, 256, 256, - 256, 256, 256, 256, 450, 450, 441, 450, 450, 793, - 450, 450, 450, 450, 450, 450, 792, 450, 791, 309, - - 450, 450, 790, 789, 450, 788, 482, 450, 450, 787, - 786, 450, 450, 489, 312, 490, 320, 491, 495, 495, - 495, 495, 311, 450, 308, 308, 308, 308, 308, 308, - 492, 308, 308, 308, 308, 308, 308, 315, 312, 322, - 498, 324, 327, 330, 333, 336, 339, 342, 345, 348, - 351, 354, 357, 360, 363, 366, 369, 372, 382, 385, - 389, 315, 392, 396, 326, 329, 332, 335, 338, 341, - 344, 347, 350, 353, 356, 359, 362, 365, 368, 371, - 374, 384, 387, 391, 399, 394, 398, 402, 405, 409, - 412, 415, 418, 421, 424, 548, 439, 785, 602, 603, - - 649, 727, 728, 784, 783, 782, 781, 401, 780, 779, - 404, 407, 411, 414, 417, 420, 423, 426, 549, 441, - 604, 778, 729, 650, 38, 38, 38, 180, 180, 777, - 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, - 766, 765, 764, 763, 762, 761, 760, 759, 758, 757, - 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, - 746, 745, 744, 743, 742, 650, 741, 740, 739, 738, - 737, 736, 735, 734, 733, 732, 731, 730, 726, 725, - 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, - 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, - - 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, - 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, - 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, - 674, 673, 672, 671, 668, 667, 666, 665, 664, 663, - 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, - 652, 651, 648, 549, 647, 646, 645, 644, 643, 642, - 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, - 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, - 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, - 611, 610, 609, 608, 607, 606, 605, 601, 600, 599, - - 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, - 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, - 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, - 568, 567, 566, 565, 564, 563, 562, 561, 558, 557, - 556, 555, 554, 553, 552, 551, 441, 550, 547, 436, - 546, 434, 545, 432, 544, 430, 543, 542, 426, 541, - 423, 540, 420, 539, 417, 538, 414, 537, 411, 536, - 535, 407, 534, 404, 533, 401, 532, 398, 531, 530, - 394, 529, 391, 528, 387, 527, 384, 526, 525, 524, - 523, 522, 521, 374, 520, 371, 519, 368, 518, 365, - - 517, 362, 516, 359, 515, 356, 514, 353, 513, 350, - 512, 347, 511, 344, 510, 341, 509, 338, 508, 335, - 507, 332, 506, 329, 505, 326, 504, 322, 503, 502, - 501, 500, 499, 315, 497, 311, 494, 493, 488, 487, - 486, 485, 484, 483, 481, 478, 477, 476, 475, 474, - 473, 472, 471, 470, 467, 466, 463, 462, 461, 460, - 459, 458, 457, 456, 455, 454, 451, 288, 260, 449, - 448, 447, 446, 445, 444, 443, 442, 428, 427, 408, - 395, 388, 377, 376, 375, 323, 319, 318, 317, 316, - 301, 300, 299, 296, 295, 294, 293, 292, 283, 280, - - 279, 278, 277, 276, 275, 274, 273, 272, 270, 269, - 268, 267, 266, 263, 262, 261, 259, 258, 172, 253, - 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, - 237, 236, 235, 234, 231, 230, 227, 226, 225, 224, - 223, 222, 221, 220, 217, 216, 215, 214, 213, 212, - 209, 208, 207, 206, 205, 204, 203, 200, 199, 193, - 192, 191, 190, 187, 186, 185, 156, 155, 149, 148, - 39, 127, 126, 125, 124, 123, 122, 121, 118, 87, - 39, 37, 835, 3, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835 + 184, 240, 134, 241, 255, 233, 282, 287, 182, 135, + 258, 258, 283, 288, 242, 837, 258, 430, 164, 256, + 68, 257, 257, 257, 257, 257, 257, 258, 258, 258, + 261, 258, 258, 298, 258, 272, 258, 258, 258, 258, + 431, 258, 381, 299, 258, 258, 379, 838, 258, 432, + 440, 289, 258, 290, 258, 258, 291, 292, 380, 258, + 382, 839, 258, 303, 303, 303, 303, 840, 441, 841, + + 258, 842, 433, 258, 303, 303, 303, 303, 304, 303, + 303, 305, 306, 303, 303, 303, 303, 303, 303, 303, + 307, 303, 303, 303, 303, 303, 303, 303, 43, 43, + 43, 43, 43, 43, 843, 844, 434, 308, 132, 309, + 309, 309, 309, 309, 309, 184, 184, 184, 184, 184, + 184, 184, 184, 184, 184, 184, 184, 310, 313, 435, + 321, 325, 311, 314, 132, 322, 326, 438, 328, 847, + 565, 311, 315, 329, 322, 326, 848, 311, 314, 439, + 312, 316, 329, 323, 327, 331, 566, 334, 340, 337, + 332, 330, 335, 341, 338, 482, 845, 846, 483, 332, + + 436, 335, 341, 338, 40, 332, 828, 335, 333, 338, + 336, 342, 339, 343, 346, 349, 352, 355, 344, 347, + 350, 353, 356, 437, 827, 826, 825, 344, 347, 350, + 353, 356, 455, 824, 347, 350, 345, 348, 351, 354, + 357, 358, 361, 364, 823, 456, 359, 362, 365, 498, + 498, 498, 498, 367, 370, 359, 362, 365, 368, 371, + 822, 359, 362, 365, 360, 363, 366, 368, 371, 678, + 373, 821, 679, 368, 371, 374, 369, 372, 383, 820, + 386, 390, 393, 384, 374, 387, 391, 394, 819, 818, + 374, 817, 384, 375, 387, 391, 394, 397, 816, 815, + + 814, 385, 398, 388, 392, 395, 471, 400, 403, 406, + 410, 398, 401, 404, 407, 411, 813, 398, 812, 472, + 399, 401, 404, 407, 411, 811, 810, 401, 404, 407, + 402, 405, 408, 412, 413, 416, 419, 809, 808, 414, + 417, 420, 498, 498, 498, 498, 422, 425, 414, 417, + 420, 423, 426, 807, 414, 417, 420, 415, 418, 421, + 423, 426, 806, 442, 805, 804, 423, 426, 443, 424, + 427, 257, 257, 257, 257, 257, 257, 443, 257, 257, + 257, 257, 257, 257, 453, 453, 444, 453, 453, 803, + 453, 453, 453, 453, 453, 453, 802, 453, 801, 310, + + 453, 453, 800, 799, 453, 313, 485, 453, 453, 798, + 797, 453, 453, 492, 796, 493, 795, 494, 499, 498, + 498, 498, 312, 453, 498, 498, 498, 498, 316, 321, + 495, 498, 498, 498, 498, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 313, 325, 501, + 328, 331, 323, 334, 337, 340, 343, 346, 349, 352, + 355, 358, 361, 364, 367, 370, 373, 383, 386, 390, + 316, 327, 393, 330, 333, 397, 336, 339, 342, 345, + 348, 351, 354, 357, 360, 363, 366, 369, 372, 375, + 385, 388, 392, 400, 403, 395, 406, 410, 399, 413, + + 416, 419, 422, 425, 551, 554, 442, 794, 608, 609, + 655, 658, 793, 792, 736, 737, 402, 405, 791, 408, + 412, 790, 415, 418, 421, 424, 427, 552, 555, 444, + 610, 789, 788, 656, 659, 738, 38, 38, 38, 180, + 180, 787, 786, 785, 784, 783, 782, 781, 780, 779, + 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, + 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, + 758, 757, 756, 755, 754, 753, 659, 752, 751, 656, + 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, + 740, 739, 735, 734, 733, 732, 731, 730, 729, 728, + + 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, + 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, + 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, + 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, + 687, 686, 685, 684, 683, 682, 681, 680, 677, 676, + 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, + 665, 664, 663, 662, 661, 660, 657, 555, 654, 552, + 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, + 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, + 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, + + 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, + 613, 612, 611, 607, 606, 605, 604, 603, 602, 601, + 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, + 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, + 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, + 570, 569, 568, 567, 564, 563, 562, 561, 560, 559, + 558, 557, 444, 556, 553, 550, 437, 549, 435, 548, + 433, 547, 431, 546, 545, 427, 544, 424, 543, 421, + 542, 418, 541, 415, 540, 412, 539, 538, 408, 537, + 405, 536, 402, 535, 399, 534, 533, 395, 532, 392, + + 531, 388, 530, 385, 529, 528, 527, 526, 525, 524, + 375, 523, 372, 522, 369, 521, 366, 520, 363, 519, + 360, 518, 357, 517, 354, 516, 351, 515, 348, 514, + 345, 513, 342, 512, 339, 511, 336, 510, 333, 509, + 330, 508, 327, 507, 323, 506, 505, 504, 503, 502, + 316, 500, 312, 497, 496, 491, 490, 489, 488, 487, + 486, 484, 481, 480, 479, 478, 477, 476, 475, 474, + 473, 470, 469, 466, 465, 464, 463, 462, 461, 460, + 459, 458, 457, 454, 289, 261, 452, 451, 450, 449, + 448, 447, 446, 445, 429, 428, 409, 396, 389, 378, + + 377, 376, 324, 320, 319, 318, 317, 302, 301, 300, + 297, 296, 295, 294, 293, 284, 281, 280, 279, 278, + 277, 276, 275, 274, 273, 271, 270, 269, 268, 267, + 264, 263, 262, 260, 259, 172, 254, 253, 252, 251, + 250, 249, 248, 247, 246, 245, 237, 236, 235, 234, + 231, 230, 227, 226, 225, 224, 223, 222, 221, 220, + 217, 216, 215, 214, 213, 212, 209, 208, 207, 206, + 205, 204, 203, 200, 199, 193, 192, 191, 190, 187, + 186, 185, 156, 155, 149, 148, 39, 127, 126, 125, + 124, 123, 122, 121, 118, 87, 39, 37, 849, 3, + + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849 } ; -static yyconst flex_int16_t yy_chk[1352] = +static yyconst flex_int16_t yy_chk[1368] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -859,7 +865,7 @@ static yyconst flex_int16_t yy_chk[1352] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 23, 5, - 10, 27, 46, 23, 17, 46, 809, 10, 10, 10, + 10, 27, 46, 23, 17, 46, 808, 10, 10, 10, 10, 10, 10, 10, 16, 17, 16, 29, 17, 27, 18, 116, 16, 11, 11, 11, 11, 11, 11, 11, @@ -871,136 +877,137 @@ static yyconst flex_int16_t yy_chk[1352] = 13, 13, 13, 13, 13, 99, 61, 99, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 47, 15, 14, 14, 47, 12, 49, 22, 15, 49, 24, 21, - 273, 21, 15, 22, 15, 13, 21, 24, 22, 21, - 25, 24, 25, 25, 22, 273, 811, 14, 45, 45, + 274, 21, 15, 22, 15, 13, 21, 24, 22, 21, + 25, 24, 25, 25, 22, 274, 810, 14, 45, 45, 92, 44, 44, 54, 45, 25, 26, 44, 26, 26, 26, 26, 26, 44, 26, 45, 26, 54, 44, 92, - 44, 813, 26, 26, 54, 26, 41, 43, 43, 43, - 43, 43, 43, 50, 50, 57, 816, 43, 60, 50, - 60, 59, 59, 60, 60, 817, 57, 59, 75, 57, - 50, 60, 57, 140, 75, 59, 821, 84, 59, 63, - 63, 63, 63, 43, 239, 140, 41, 41, 41, 41, + 44, 811, 26, 26, 54, 26, 41, 43, 43, 43, + 43, 43, 43, 50, 50, 57, 812, 43, 60, 50, + 60, 59, 59, 60, 60, 813, 57, 59, 75, 57, + 50, 60, 57, 140, 75, 59, 816, 84, 59, 63, + 63, 63, 63, 43, 817, 140, 41, 41, 41, 41, 41, 41, 62, 41, 41, 84, 159, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 159, 239, 41, 823, + 41, 41, 41, 41, 41, 41, 159, 118, 41, 118, 62, 62, 62, 62, 64, 64, 64, 64, 65, 65, - 65, 65, 66, 66, 66, 66, 66, 66, 108, 825, + 65, 65, 66, 66, 66, 66, 66, 66, 108, 818, 81, 81, 66, 67, 67, 67, 67, 67, 67, 67, 81, 111, 108, 68, 67, 68, 68, 68, 68, 68, 68, 117, 128, 117, 130, 111, 157, 160, 66, 128, - 133, 133, 157, 160, 117, 831, 133, 240, 130, 132, + 133, 133, 157, 160, 117, 823, 133, 239, 130, 132, 67, 132, 132, 132, 132, 132, 132, 133, 136, 136, 136, 146, 146, 169, 136, 147, 147, 146, 161, 161, - 240, 147, 219, 169, 161, 136, 218, 287, 146, 241, - 287, 161, 147, 162, 162, 161, 163, 163, 218, 162, - 219, 832, 163, 173, 173, 173, 173, 837, 573, 805, + 239, 147, 219, 169, 161, 136, 218, 825, 146, 240, + 244, 161, 147, 162, 162, 161, 163, 163, 218, 162, + 219, 827, 163, 173, 173, 173, 173, 830, 244, 831, - 162, 573, 241, 163, 174, 174, 174, 174, 175, 175, + 162, 835, 240, 163, 174, 174, 174, 174, 175, 175, 175, 175, 176, 176, 176, 176, 177, 177, 177, 177, 178, 178, 178, 178, 179, 179, 179, 179, 181, 181, - 181, 181, 181, 181, 828, 828, 242, 182, 181, 182, + 181, 181, 181, 181, 837, 839, 241, 182, 181, 182, 182, 182, 182, 182, 182, 183, 183, 183, 183, 183, - 183, 184, 184, 184, 184, 184, 184, 185, 186, 242, - 192, 194, 185, 186, 181, 192, 194, 243, 195, 804, - 449, 185, 186, 195, 192, 194, 803, 185, 186, 243, - 185, 186, 195, 192, 194, 196, 449, 197, 199, 198, - 196, 195, 197, 199, 198, 302, 302, 302, 302, 196, + 183, 184, 184, 184, 184, 184, 184, 185, 186, 241, + 192, 194, 185, 186, 181, 192, 194, 243, 195, 845, + 452, 185, 186, 195, 192, 194, 846, 185, 186, 243, + 185, 186, 195, 192, 194, 196, 452, 197, 199, 198, + 196, 195, 197, 199, 198, 288, 842, 842, 288, 196, - 800, 197, 199, 198, 799, 196, 798, 197, 196, 198, + 242, 197, 199, 198, 851, 196, 807, 197, 196, 198, 197, 199, 198, 201, 203, 204, 206, 207, 201, 203, - 204, 206, 207, 303, 303, 303, 303, 201, 203, 204, - 206, 207, 259, 797, 203, 204, 201, 203, 204, 206, - 207, 209, 210, 211, 795, 259, 209, 210, 211, 304, - 304, 304, 304, 212, 213, 209, 210, 211, 212, 213, - 794, 209, 210, 211, 209, 210, 211, 212, 213, 793, - 214, 791, 790, 212, 213, 214, 212, 213, 220, 786, - 221, 223, 224, 220, 214, 221, 223, 224, 785, 784, - 214, 783, 220, 214, 221, 223, 224, 226, 781, 779, - - 776, 220, 226, 221, 223, 224, 276, 227, 228, 229, - 231, 226, 227, 228, 229, 231, 775, 226, 773, 276, - 226, 227, 228, 229, 231, 772, 771, 227, 228, 229, - 227, 228, 229, 231, 232, 233, 234, 770, 769, 232, - 233, 234, 305, 305, 305, 305, 235, 236, 232, 233, - 234, 235, 236, 768, 232, 233, 234, 232, 233, 234, - 235, 236, 765, 244, 764, 762, 235, 236, 244, 235, - 236, 255, 255, 255, 255, 255, 255, 244, 256, 256, - 256, 256, 256, 256, 257, 257, 244, 271, 271, 761, - 257, 289, 289, 271, 290, 290, 760, 289, 759, 310, - - 290, 257, 758, 757, 271, 755, 291, 291, 289, 754, - 753, 290, 291, 299, 313, 299, 321, 299, 306, 306, - 306, 306, 310, 291, 307, 307, 307, 307, 307, 307, - 299, 308, 308, 308, 308, 308, 308, 313, 314, 321, - 314, 325, 328, 331, 334, 337, 340, 343, 346, 349, - 352, 355, 358, 361, 364, 367, 370, 373, 383, 386, - 390, 314, 393, 397, 325, 328, 331, 334, 337, 340, - 343, 346, 349, 352, 355, 358, 361, 364, 367, 370, - 373, 383, 386, 390, 400, 393, 397, 403, 406, 410, - 413, 416, 419, 422, 425, 437, 440, 751, 501, 501, - - 550, 636, 636, 749, 748, 745, 742, 400, 741, 729, - 403, 406, 410, 413, 416, 419, 422, 425, 437, 440, - 501, 728, 636, 550, 836, 836, 836, 838, 838, 727, - 698, 691, 690, 687, 686, 685, 684, 683, 682, 681, - 680, 679, 678, 676, 673, 672, 671, 670, 669, 668, - 667, 666, 665, 664, 663, 661, 660, 659, 658, 656, + 204, 206, 207, 242, 806, 804, 803, 201, 203, 204, + 206, 207, 260, 799, 203, 204, 201, 203, 204, 206, + 207, 209, 210, 211, 798, 260, 209, 210, 211, 303, + 303, 303, 303, 212, 213, 209, 210, 211, 212, 213, + 797, 209, 210, 211, 209, 210, 211, 212, 213, 579, + 214, 796, 579, 212, 213, 214, 212, 213, 220, 794, + 221, 223, 224, 220, 214, 221, 223, 224, 792, 790, + 214, 787, 220, 214, 221, 223, 224, 226, 786, 784, + + 783, 220, 226, 221, 223, 224, 277, 227, 228, 229, + 231, 226, 227, 228, 229, 231, 782, 226, 781, 277, + 226, 227, 228, 229, 231, 780, 779, 227, 228, 229, + 227, 228, 229, 231, 232, 233, 234, 776, 775, 232, + 233, 234, 304, 304, 304, 304, 235, 236, 232, 233, + 234, 235, 236, 773, 232, 233, 234, 232, 233, 234, + 235, 236, 772, 245, 771, 770, 235, 236, 245, 235, + 236, 256, 256, 256, 256, 256, 256, 245, 257, 257, + 257, 257, 257, 257, 258, 258, 245, 272, 272, 769, + 258, 290, 290, 272, 291, 291, 768, 290, 766, 311, + + 291, 258, 765, 764, 272, 314, 292, 292, 290, 762, + 760, 291, 292, 300, 759, 300, 756, 300, 305, 305, + 305, 305, 311, 292, 306, 306, 306, 306, 314, 322, + 300, 307, 307, 307, 307, 308, 308, 308, 308, 308, + 308, 309, 309, 309, 309, 309, 309, 315, 326, 315, + 329, 332, 322, 335, 338, 341, 344, 347, 350, 353, + 356, 359, 362, 365, 368, 371, 374, 384, 387, 391, + 315, 326, 394, 329, 332, 398, 335, 338, 341, 344, + 347, 350, 353, 356, 359, 362, 365, 368, 371, 374, + 384, 387, 391, 401, 404, 394, 407, 411, 398, 414, + + 417, 420, 423, 426, 438, 440, 443, 753, 504, 504, + 553, 556, 752, 751, 642, 642, 401, 404, 750, 407, + 411, 738, 414, 417, 420, 423, 426, 438, 440, 443, + 504, 737, 736, 553, 556, 642, 850, 850, 850, 852, + 852, 707, 700, 699, 696, 695, 694, 693, 692, 691, + 690, 689, 688, 687, 685, 682, 681, 680, 679, 678, + 677, 676, 675, 674, 673, 672, 670, 669, 668, 667, + 665, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, - 644, 643, 642, 641, 640, 639, 638, 637, 635, 634, - 633, 632, 631, 630, 629, 628, 627, 624, 623, 622, - 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, + 644, 643, 641, 640, 639, 638, 637, 636, 635, 634, - 611, 610, 609, 608, 607, 606, 604, 603, 602, 601, - 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, - 590, 589, 587, 586, 585, 584, 583, 581, 580, 579, - 578, 577, 576, 575, 572, 571, 569, 568, 567, 566, - 563, 562, 561, 560, 559, 558, 557, 555, 554, 553, - 552, 551, 549, 548, 547, 546, 545, 544, 543, 542, - 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, - 531, 530, 529, 528, 527, 523, 522, 521, 520, 519, - 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, - 508, 507, 506, 505, 504, 503, 502, 499, 498, 497, - - 494, 493, 492, 491, 490, 489, 487, 485, 484, 483, - 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, - 471, 470, 469, 468, 467, 466, 465, 464, 462, 461, - 460, 459, 458, 457, 456, 453, 452, 451, 448, 447, - 446, 445, 444, 443, 442, 441, 439, 438, 436, 435, - 434, 433, 432, 431, 430, 429, 427, 426, 424, 423, - 421, 420, 418, 417, 415, 414, 412, 411, 409, 408, - 407, 405, 404, 402, 401, 399, 398, 396, 395, 394, - 392, 391, 389, 387, 385, 384, 382, 381, 379, 377, - 376, 375, 374, 372, 371, 369, 368, 366, 365, 363, - - 362, 360, 359, 357, 356, 354, 353, 351, 350, 348, - 347, 345, 344, 342, 341, 339, 338, 336, 335, 333, - 332, 330, 329, 327, 326, 324, 322, 320, 319, 318, - 317, 316, 315, 312, 311, 309, 301, 300, 298, 297, - 296, 295, 294, 293, 288, 286, 285, 284, 283, 282, - 281, 280, 279, 277, 275, 274, 272, 270, 269, 266, - 265, 264, 263, 262, 261, 260, 258, 254, 253, 252, - 251, 250, 249, 248, 247, 246, 245, 238, 237, 230, - 225, 222, 217, 216, 215, 193, 191, 190, 189, 187, - 172, 171, 170, 168, 167, 166, 165, 164, 158, 156, - - 155, 154, 153, 152, 151, 150, 149, 148, 145, 144, - 143, 142, 141, 139, 138, 137, 135, 134, 131, 129, - 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, - 115, 114, 113, 112, 110, 109, 107, 106, 105, 104, - 103, 102, 101, 100, 98, 97, 96, 95, 94, 93, - 91, 90, 89, 88, 87, 86, 85, 83, 82, 79, - 78, 77, 76, 74, 73, 72, 56, 55, 52, 51, - 38, 37, 35, 34, 33, 32, 31, 30, 28, 20, - 8, 7, 3, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, - 835 + 633, 630, 629, 628, 627, 626, 625, 624, 623, 622, + 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, + 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, + 600, 599, 598, 597, 596, 595, 593, 592, 591, 590, + 589, 587, 586, 585, 584, 583, 582, 581, 578, 577, + 575, 574, 573, 572, 569, 568, 567, 566, 565, 564, + 563, 561, 560, 559, 558, 557, 555, 554, 552, 551, + 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, + 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, + 530, 526, 525, 524, 523, 522, 521, 520, 519, 518, + + 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, + 507, 506, 505, 502, 501, 500, 497, 496, 495, 494, + 493, 492, 490, 488, 487, 486, 484, 483, 482, 481, + 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, + 470, 469, 468, 467, 465, 464, 463, 462, 461, 460, + 459, 456, 455, 454, 451, 450, 449, 448, 447, 446, + 445, 444, 442, 441, 439, 437, 436, 435, 434, 433, + 432, 431, 430, 428, 427, 425, 424, 422, 421, 419, + 418, 416, 415, 413, 412, 410, 409, 408, 406, 405, + 403, 402, 400, 399, 397, 396, 395, 393, 392, 390, + + 388, 386, 385, 383, 382, 380, 378, 377, 376, 375, + 373, 372, 370, 369, 367, 366, 364, 363, 361, 360, + 358, 357, 355, 354, 352, 351, 349, 348, 346, 345, + 343, 342, 340, 339, 337, 336, 334, 333, 331, 330, + 328, 327, 325, 323, 321, 320, 319, 318, 317, 316, + 313, 312, 310, 302, 301, 299, 298, 297, 296, 295, + 294, 289, 287, 286, 285, 284, 283, 282, 281, 280, + 278, 276, 275, 273, 271, 270, 267, 266, 265, 264, + 263, 262, 261, 259, 255, 254, 253, 252, 251, 250, + 249, 248, 247, 246, 238, 237, 230, 225, 222, 217, + + 216, 215, 193, 191, 190, 189, 187, 172, 171, 170, + 168, 167, 166, 165, 164, 158, 156, 155, 154, 153, + 152, 151, 150, 149, 148, 145, 144, 143, 142, 141, + 139, 138, 137, 135, 134, 131, 129, 127, 126, 125, + 124, 123, 122, 121, 120, 119, 115, 114, 113, 112, + 110, 109, 107, 106, 105, 104, 103, 102, 101, 100, + 98, 97, 96, 95, 94, 93, 91, 90, 89, 88, + 87, 86, 85, 83, 82, 79, 78, 77, 76, 74, + 73, 72, 56, 55, 52, 51, 38, 37, 35, 34, + 33, 32, 31, 30, 28, 20, 8, 7, 3, 849, + + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 849, 849 } ; /* The intent behind this definition is that it'll catch @@ -1153,7 +1160,7 @@ handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval) } while(0); #define YY_EXTRA_TYPE struct asm_parser_state * -#line 1157 "lex.yy.c" +#line 1164 "lex.yy.c" #define INITIAL 0 @@ -1402,7 +1409,7 @@ YY_DECL #line 156 "program_lexer.l" -#line 1406 "lex.yy.c" +#line 1413 "lex.yy.c" yylval = yylval_param; @@ -1459,13 +1466,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 836 ) + if ( yy_current_state >= 850 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 1284 ); + while ( yy_base[yy_current_state] != 1300 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1799,445 +1806,455 @@ YY_RULE_SETUP YY_BREAK case 62: YY_RULE_SETUP -#line 236 "program_lexer.l" -{ return_opcode(require_NV_fp, TRI_OP, X2D, 3); } +#line 235 "program_lexer.l" +{ return_opcode(require_NV_fp, SCALAR_OP, UP4B, 4); } YY_BREAK case 63: YY_RULE_SETUP -#line 237 "program_lexer.l" -{ return_opcode( 1, BIN_OP, XPD, 3); } +#line 236 "program_lexer.l" +{ return_opcode(require_NV_fp, SCALAR_OP, UP4UB, 5); } YY_BREAK case 64: YY_RULE_SETUP -#line 239 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } +#line 238 "program_lexer.l" +{ return_opcode(require_NV_fp, TRI_OP, X2D, 3); } YY_BREAK case 65: YY_RULE_SETUP -#line 240 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } +#line 239 "program_lexer.l" +{ return_opcode( 1, BIN_OP, XPD, 3); } YY_BREAK case 66: YY_RULE_SETUP #line 241 "program_lexer.l" -{ return PROGRAM; } +{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } YY_BREAK case 67: YY_RULE_SETUP #line 242 "program_lexer.l" -{ return STATE; } +{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } YY_BREAK case 68: YY_RULE_SETUP #line 243 "program_lexer.l" -{ return RESULT; } +{ return PROGRAM; } YY_BREAK case 69: YY_RULE_SETUP -#line 245 "program_lexer.l" -{ return AMBIENT; } +#line 244 "program_lexer.l" +{ return STATE; } YY_BREAK case 70: YY_RULE_SETUP -#line 246 "program_lexer.l" -{ return ATTENUATION; } +#line 245 "program_lexer.l" +{ return RESULT; } YY_BREAK case 71: YY_RULE_SETUP #line 247 "program_lexer.l" -{ return BACK; } +{ return AMBIENT; } YY_BREAK case 72: YY_RULE_SETUP #line 248 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, CLIP); } +{ return ATTENUATION; } YY_BREAK case 73: YY_RULE_SETUP #line 249 "program_lexer.l" -{ return COLOR; } +{ return BACK; } YY_BREAK case 74: YY_RULE_SETUP #line 250 "program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, DEPTH); } +{ return_token_or_DOT(require_ARB_vp, CLIP); } YY_BREAK case 75: YY_RULE_SETUP #line 251 "program_lexer.l" -{ return DIFFUSE; } +{ return COLOR; } YY_BREAK case 76: YY_RULE_SETUP #line 252 "program_lexer.l" -{ return DIRECTION; } +{ return_token_or_DOT(require_ARB_fp, DEPTH); } YY_BREAK case 77: YY_RULE_SETUP #line 253 "program_lexer.l" -{ return EMISSION; } +{ return DIFFUSE; } YY_BREAK case 78: YY_RULE_SETUP #line 254 "program_lexer.l" -{ return ENV; } +{ return DIRECTION; } YY_BREAK case 79: YY_RULE_SETUP #line 255 "program_lexer.l" -{ return EYE; } +{ return EMISSION; } YY_BREAK case 80: YY_RULE_SETUP #line 256 "program_lexer.l" -{ return FOGCOORD; } +{ return ENV; } YY_BREAK case 81: YY_RULE_SETUP #line 257 "program_lexer.l" -{ return FOG; } +{ return EYE; } YY_BREAK case 82: YY_RULE_SETUP #line 258 "program_lexer.l" -{ return FRONT; } +{ return FOGCOORD; } YY_BREAK case 83: YY_RULE_SETUP #line 259 "program_lexer.l" -{ return HALF; } +{ return FOG; } YY_BREAK case 84: YY_RULE_SETUP #line 260 "program_lexer.l" -{ return INVERSE; } +{ return FRONT; } YY_BREAK case 85: YY_RULE_SETUP #line 261 "program_lexer.l" -{ return INVTRANS; } +{ return HALF; } YY_BREAK case 86: YY_RULE_SETUP #line 262 "program_lexer.l" -{ return LIGHT; } +{ return INVERSE; } YY_BREAK case 87: YY_RULE_SETUP #line 263 "program_lexer.l" -{ return LIGHTMODEL; } +{ return INVTRANS; } YY_BREAK case 88: YY_RULE_SETUP #line 264 "program_lexer.l" -{ return LIGHTPROD; } +{ return LIGHT; } YY_BREAK case 89: YY_RULE_SETUP #line 265 "program_lexer.l" -{ return LOCAL; } +{ return LIGHTMODEL; } YY_BREAK case 90: YY_RULE_SETUP #line 266 "program_lexer.l" -{ return MATERIAL; } +{ return LIGHTPROD; } YY_BREAK case 91: YY_RULE_SETUP #line 267 "program_lexer.l" -{ return MAT_PROGRAM; } +{ return LOCAL; } YY_BREAK case 92: YY_RULE_SETUP #line 268 "program_lexer.l" -{ return MATRIX; } +{ return MATERIAL; } YY_BREAK case 93: YY_RULE_SETUP #line 269 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } +{ return MAT_PROGRAM; } YY_BREAK case 94: YY_RULE_SETUP #line 270 "program_lexer.l" -{ return MODELVIEW; } +{ return MATRIX; } YY_BREAK case 95: YY_RULE_SETUP #line 271 "program_lexer.l" -{ return MVP; } +{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } YY_BREAK case 96: YY_RULE_SETUP #line 272 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, NORMAL); } +{ return MODELVIEW; } YY_BREAK case 97: YY_RULE_SETUP #line 273 "program_lexer.l" -{ return OBJECT; } +{ return MVP; } YY_BREAK case 98: YY_RULE_SETUP #line 274 "program_lexer.l" -{ return PALETTE; } +{ return_token_or_DOT(require_ARB_vp, NORMAL); } YY_BREAK case 99: YY_RULE_SETUP #line 275 "program_lexer.l" -{ return PARAMS; } +{ return OBJECT; } YY_BREAK case 100: YY_RULE_SETUP #line 276 "program_lexer.l" -{ return PLANE; } +{ return PALETTE; } YY_BREAK case 101: YY_RULE_SETUP #line 277 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINT_TOK); } +{ return PARAMS; } YY_BREAK case 102: YY_RULE_SETUP #line 278 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINTSIZE); } +{ return PLANE; } YY_BREAK case 103: YY_RULE_SETUP #line 279 "program_lexer.l" -{ return POSITION; } +{ return_token_or_DOT(require_ARB_vp, POINT_TOK); } YY_BREAK case 104: YY_RULE_SETUP #line 280 "program_lexer.l" -{ return PRIMARY; } +{ return_token_or_DOT(require_ARB_vp, POINTSIZE); } YY_BREAK case 105: YY_RULE_SETUP #line 281 "program_lexer.l" -{ return PROJECTION; } +{ return POSITION; } YY_BREAK case 106: YY_RULE_SETUP #line 282 "program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, RANGE); } +{ return PRIMARY; } YY_BREAK case 107: YY_RULE_SETUP #line 283 "program_lexer.l" -{ return ROW; } +{ return PROJECTION; } YY_BREAK case 108: YY_RULE_SETUP #line 284 "program_lexer.l" -{ return SCENECOLOR; } +{ return_token_or_DOT(require_ARB_fp, RANGE); } YY_BREAK case 109: YY_RULE_SETUP #line 285 "program_lexer.l" -{ return SECONDARY; } +{ return ROW; } YY_BREAK case 110: YY_RULE_SETUP #line 286 "program_lexer.l" -{ return SHININESS; } +{ return SCENECOLOR; } YY_BREAK case 111: YY_RULE_SETUP #line 287 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); } +{ return SECONDARY; } YY_BREAK case 112: YY_RULE_SETUP #line 288 "program_lexer.l" -{ return SPECULAR; } +{ return SHININESS; } YY_BREAK case 113: YY_RULE_SETUP #line 289 "program_lexer.l" -{ return SPOT; } +{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); } YY_BREAK case 114: YY_RULE_SETUP #line 290 "program_lexer.l" -{ return TEXCOORD; } +{ return SPECULAR; } YY_BREAK case 115: YY_RULE_SETUP #line 291 "program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, TEXENV); } +{ return SPOT; } YY_BREAK case 116: YY_RULE_SETUP #line 292 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN); } +{ return TEXCOORD; } YY_BREAK case 117: YY_RULE_SETUP #line 293 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } +{ return_token_or_DOT(require_ARB_fp, TEXENV); } YY_BREAK case 118: YY_RULE_SETUP #line 294 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); } +{ return_token_or_DOT(require_ARB_vp, TEXGEN); } YY_BREAK case 119: YY_RULE_SETUP #line 295 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); } +{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } YY_BREAK case 120: YY_RULE_SETUP #line 296 "program_lexer.l" -{ return TEXTURE; } +{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); } YY_BREAK case 121: YY_RULE_SETUP #line 297 "program_lexer.l" -{ return TRANSPOSE; } +{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); } YY_BREAK case 122: YY_RULE_SETUP #line 298 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); } +{ return TEXTURE; } YY_BREAK case 123: YY_RULE_SETUP #line 299 "program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, WEIGHT); } +{ return TRANSPOSE; } YY_BREAK case 124: YY_RULE_SETUP -#line 301 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } +#line 300 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); } YY_BREAK case 125: YY_RULE_SETUP -#line 302 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } +#line 301 "program_lexer.l" +{ return_token_or_DOT(require_ARB_vp, WEIGHT); } YY_BREAK case 126: YY_RULE_SETUP #line 303 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } +{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } YY_BREAK case 127: YY_RULE_SETUP #line 304 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } +{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } YY_BREAK case 128: YY_RULE_SETUP #line 305 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } +{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } YY_BREAK case 129: YY_RULE_SETUP #line 306 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } +{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } YY_BREAK case 130: YY_RULE_SETUP #line 307 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } +{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } YY_BREAK case 131: YY_RULE_SETUP #line 308 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } +{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } YY_BREAK case 132: YY_RULE_SETUP #line 309 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } YY_BREAK case 133: YY_RULE_SETUP #line 310 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } YY_BREAK case 134: YY_RULE_SETUP #line 311 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } YY_BREAK case 135: YY_RULE_SETUP #line 312 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } +{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } YY_BREAK case 136: YY_RULE_SETUP #line 313 "program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } +{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } YY_BREAK case 137: YY_RULE_SETUP -#line 315 "program_lexer.l" -{ return handle_ident(yyextra, yytext, yylval); } +#line 314 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } YY_BREAK case 138: YY_RULE_SETUP -#line 317 "program_lexer.l" -{ return DOT_DOT; } +#line 315 "program_lexer.l" +{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } YY_BREAK case 139: YY_RULE_SETUP +#line 317 "program_lexer.l" +{ return handle_ident(yyextra, yytext, yylval); } + YY_BREAK +case 140: +YY_RULE_SETUP #line 319 "program_lexer.l" +{ return DOT_DOT; } + YY_BREAK +case 141: +YY_RULE_SETUP +#line 321 "program_lexer.l" { yylval->integer = strtol(yytext, NULL, 10); return INTEGER; } YY_BREAK -case 140: +case 142: YY_RULE_SETUP -#line 323 "program_lexer.l" +#line 325 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 141: -/* rule 141 can match eol */ +case 143: +/* rule 143 can match eol */ *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 327 "program_lexer.l" +#line 329 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 142: +case 144: YY_RULE_SETUP -#line 331 "program_lexer.l" +#line 333 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 143: +case 145: YY_RULE_SETUP -#line 335 "program_lexer.l" +#line 337 "program_lexer.l" { yylval->real = strtod(yytext, NULL); return REAL; } YY_BREAK -case 144: +case 146: YY_RULE_SETUP -#line 340 "program_lexer.l" +#line 342 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; return MASK4; } YY_BREAK -case 145: +case 147: YY_RULE_SETUP -#line 346 "program_lexer.l" +#line 348 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2245,27 +2262,27 @@ YY_RULE_SETUP return MASK3; } YY_BREAK -case 146: +case 148: YY_RULE_SETUP -#line 352 "program_lexer.l" +#line 354 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; return MASK3; } YY_BREAK -case 147: +case 149: YY_RULE_SETUP -#line 357 "program_lexer.l" +#line 359 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; return MASK3; } YY_BREAK -case 148: +case 150: YY_RULE_SETUP -#line 363 "program_lexer.l" +#line 365 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2273,9 +2290,9 @@ YY_RULE_SETUP return MASK2; } YY_BREAK -case 149: +case 151: YY_RULE_SETUP -#line 369 "program_lexer.l" +#line 371 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2283,18 +2300,18 @@ YY_RULE_SETUP return MASK2; } YY_BREAK -case 150: +case 152: YY_RULE_SETUP -#line 375 "program_lexer.l" +#line 377 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; return MASK2; } YY_BREAK -case 151: +case 153: YY_RULE_SETUP -#line 381 "program_lexer.l" +#line 383 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2302,9 +2319,9 @@ YY_RULE_SETUP return MASK1; } YY_BREAK -case 152: +case 154: YY_RULE_SETUP -#line 388 "program_lexer.l" +#line 390 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2314,18 +2331,18 @@ YY_RULE_SETUP return SWIZZLE; } YY_BREAK -case 153: +case 155: YY_RULE_SETUP -#line 397 "program_lexer.l" +#line 399 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; return_token_or_DOT(require_ARB_fp, MASK4); } YY_BREAK -case 154: +case 156: YY_RULE_SETUP -#line 403 "program_lexer.l" +#line 405 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2333,27 +2350,27 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 155: +case 157: YY_RULE_SETUP -#line 409 "program_lexer.l" +#line 411 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 156: +case 158: YY_RULE_SETUP -#line 414 "program_lexer.l" +#line 416 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; return_token_or_DOT(require_ARB_fp, MASK3); } YY_BREAK -case 157: +case 159: YY_RULE_SETUP -#line 420 "program_lexer.l" +#line 422 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2361,9 +2378,9 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 158: +case 160: YY_RULE_SETUP -#line 426 "program_lexer.l" +#line 428 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2371,18 +2388,18 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 159: +case 161: YY_RULE_SETUP -#line 432 "program_lexer.l" +#line 434 "program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; return_token_or_DOT(require_ARB_fp, MASK2); } YY_BREAK -case 160: +case 162: YY_RULE_SETUP -#line 438 "program_lexer.l" +#line 440 "program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2390,9 +2407,9 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, MASK1); } YY_BREAK -case 161: +case 163: YY_RULE_SETUP -#line 446 "program_lexer.l" +#line 448 "program_lexer.l" { if (require_ARB_vp) { return TEXGEN_R; @@ -2404,9 +2421,9 @@ YY_RULE_SETUP } } YY_BREAK -case 162: +case 164: YY_RULE_SETUP -#line 457 "program_lexer.l" +#line 459 "program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2416,15 +2433,15 @@ YY_RULE_SETUP return_token_or_DOT(require_ARB_fp, SWIZZLE); } YY_BREAK -case 163: +case 165: YY_RULE_SETUP -#line 466 "program_lexer.l" +#line 468 "program_lexer.l" { return DOT; } YY_BREAK -case 164: -/* rule 164 can match eol */ +case 166: +/* rule 166 can match eol */ YY_RULE_SETUP -#line 468 "program_lexer.l" +#line 470 "program_lexer.l" { yylloc->first_line++; yylloc->first_column = 1; @@ -2433,30 +2450,30 @@ YY_RULE_SETUP yylloc->position++; } YY_BREAK -case 165: +case 167: YY_RULE_SETUP -#line 475 "program_lexer.l" +#line 477 "program_lexer.l" /* eat whitespace */ ; YY_BREAK -case 166: +case 168: *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 476 "program_lexer.l" +#line 478 "program_lexer.l" /* eat comments */ ; YY_BREAK -case 167: +case 169: YY_RULE_SETUP -#line 477 "program_lexer.l" +#line 479 "program_lexer.l" { return yytext[0]; } YY_BREAK -case 168: +case 170: YY_RULE_SETUP -#line 478 "program_lexer.l" +#line 480 "program_lexer.l" ECHO; YY_BREAK -#line 2460 "lex.yy.c" +#line 2477 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2750,7 +2767,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 836 ) + if ( yy_current_state >= 850 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2779,11 +2796,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 836 ) + if ( yy_current_state >= 850 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 835); + yy_is_jam = (yy_current_state == 849); return yy_is_jam ? 0 : yy_current_state; } @@ -3631,7 +3648,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 478 "program_lexer.l" +#line 480 "program_lexer.l" diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l index 750c6acf42c..8498c3d8fc0 100644 --- a/src/mesa/shader/program_lexer.l +++ b/src/mesa/shader/program_lexer.l @@ -232,6 +232,8 @@ TXP{cc}{sat} { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); } UP2H{cc}{sat} { return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); } UP2US{cc}{sat} { return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); } +UP4B{cc}{sat} { return_opcode(require_NV_fp, SCALAR_OP, UP4B, 4); } +UP4UB{cc}{sat} { return_opcode(require_NV_fp, SCALAR_OP, UP4UB, 5); } X2D{szf}{cc}{sat} { return_opcode(require_NV_fp, TRI_OP, X2D, 3); } XPD{sat} { return_opcode( 1, BIN_OP, XPD, 3); } -- cgit v1.2.3 From e33ea11c143596d511331aceabbf60016869c304 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 13:38:27 -0600 Subject: mesa: remove: unused gl_vertex_program::TnlData field --- src/mesa/main/mtypes.h | 1 - src/mesa/shader/program.c | 7 ------- 2 files changed, 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 54fa8981ddd..4757c3efa56 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1834,7 +1834,6 @@ struct gl_vertex_program struct gl_program Base; /**< base class */ GLboolean IsNVProgram; /**< is this a GL_NV_vertex_program program? */ GLboolean IsPositionInvariant; - void *TnlData; /**< should probably use Base.DriverData */ }; diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 2cd6eb8a389..532adf4d360 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -351,13 +351,6 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog) _mesa_free_parameter_list(prog->Attributes); } - /* XXX this is a little ugly */ - if (prog->Target == GL_VERTEX_PROGRAM_ARB) { - struct gl_vertex_program *vprog = (struct gl_vertex_program *) prog; - if (vprog->TnlData) - _mesa_free(vprog->TnlData); - } - _mesa_free(prog); } -- cgit v1.2.3 From 0876618a8d118b39b80963cc0d5e7a118961aa83 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Sep 2009 19:33:22 -0600 Subject: mesa: _mesa_meta_GenerateMipmap() now working Handles GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP. But GL_TEXTURE_3D and texture borders not supported yet. --- src/mesa/drivers/common/meta.c | 205 ++++++++++++++++++++++++++++++++++------- 1 file changed, 172 insertions(+), 33 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 21756786c54..b445323aabe 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -1939,6 +1939,10 @@ _mesa_meta_Bitmap(GLcontext *ctx, } +/** + * Called via ctx->Driver.GenerateMipmap() + * Note: texture borders and 3D texture support not yet complete. + */ void _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj) @@ -1952,13 +1956,20 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, const GLuint maxLevel = texObj->MaxLevel; const GLenum minFilterSave = texObj->MinFilter; const GLenum magFilterSave = texObj->MagFilter; + const GLint baseLevelSave = texObj->BaseLevel; + const GLint maxLevelSave = texObj->MaxLevel; + const GLboolean genMipmapSave = texObj->GenerateMipmap; + const GLenum wrapSSave = texObj->WrapS; + const GLenum wrapTSave = texObj->WrapT; + const GLenum wrapRSave = texObj->WrapR; const GLuint fboSave = ctx->DrawBuffer->Name; GLenum faceTarget; - GLuint level; + GLuint dstLevel; GLuint border = 0; /* check for fallbacks */ - if (!ctx->Extensions.EXT_framebuffer_object) { + if (!ctx->Extensions.EXT_framebuffer_object || + target == GL_TEXTURE_3D) { _mesa_generate_mipmap(ctx, target, texObj); return; } @@ -2007,12 +2018,16 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + _mesa_set_enable(ctx, target, GL_TRUE); /* setup texcoords once (XXX what about border?) */ switch (faceTarget) { - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - break; + case GL_TEXTURE_1D: case GL_TEXTURE_2D: verts[0].s = 0.0F; verts[0].t = 0.0F; @@ -2027,63 +2042,180 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, verts[3].t = 1.0F; verts[3].r = 0.0F; break; + case GL_TEXTURE_3D: + abort(); + break; + default: + /* cube face */ + { + static const GLfloat st[4][2] = { + {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f} + }; + GLuint i; + + /* loop over quad verts */ + for (i = 0; i < 4; i++) { + /* Compute sc = +/-scale and tc = +/-scale. + * Not +/-1 to avoid cube face selection ambiguity near the edges, + * though that can still sometimes happen with this scale factor... + */ + const GLfloat scale = 0.9999f; + const GLfloat sc = (2.0f * st[i][0] - 1.0f) * scale; + const GLfloat tc = (2.0f * st[i][1] - 1.0f) * scale; + + switch (faceTarget) { + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + verts[i].s = 1.0f; + verts[i].t = -tc; + verts[i].r = -sc; + break; + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + verts[i].s = -1.0f; + verts[i].t = -tc; + verts[i].r = sc; + break; + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + verts[i].s = sc; + verts[i].t = 1.0f; + verts[i].r = tc; + break; + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + verts[i].s = sc; + verts[i].t = -1.0f; + verts[i].r = -tc; + break; + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + verts[i].s = sc; + verts[i].t = -tc; + verts[i].r = 1.0f; + break; + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + verts[i].s = -sc; + verts[i].t = -tc; + verts[i].r = -1.0f; + break; + default: + assert(0); + } + } + } } + _mesa_set_enable(ctx, target, GL_TRUE); + + /* texture is already locked, unlock now */ + _mesa_unlock_texture(ctx, texObj); - for (level = baseLevel + 1; level <= maxLevel; level++) { + for (dstLevel = baseLevel + 1; dstLevel <= maxLevel; dstLevel++) { const struct gl_texture_image *srcImage; - const GLuint srcLevel = level - 1; - GLsizei srcWidth, srcHeight; - GLsizei newWidth, newHeight; + const GLuint srcLevel = dstLevel - 1; + GLsizei srcWidth, srcHeight, srcDepth; + GLsizei dstWidth, dstHeight, dstDepth; GLenum status; - srcImage = _mesa_select_tex_image(ctx, texObj, target, srcLevel); + srcImage = _mesa_select_tex_image(ctx, texObj, faceTarget, srcLevel); assert(srcImage->Border == 0); /* XXX we can fix this */ + /* src size w/out border */ srcWidth = srcImage->Width - 2 * border; srcHeight = srcImage->Height - 2 * border; + srcDepth = srcImage->Depth - 2 * border; - newWidth = MAX2(1, srcWidth / 2) + 2 * border; - newHeight = MAX2(1, srcHeight / 2) + 2 * border; + /* new dst size w/ border */ + dstWidth = MAX2(1, srcWidth / 2) + 2 * border; + dstHeight = MAX2(1, srcHeight / 2) + 2 * border; + dstDepth = MAX2(1, srcDepth / 2) + 2 * border; - if (newWidth == srcImage->Width && newHeight == srcImage->Height) { - break; + if (dstWidth == srcImage->Width && + dstHeight == srcImage->Height && + dstDepth == srcImage->Depth) { + /* all done */ + break; } - /* Create empty image */ - _mesa_TexImage2D(GL_TEXTURE_2D, level, srcImage->InternalFormat, - newWidth, newHeight, border, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); + /* Create empty dest image */ + if (target == GL_TEXTURE_1D) { + _mesa_TexImage1D(target, dstLevel, srcImage->InternalFormat, + dstWidth, border, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + } + else if (target == GL_TEXTURE_3D) { + _mesa_TexImage3D(target, dstLevel, srcImage->InternalFormat, + dstWidth, dstHeight, dstDepth, border, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + } + else { + /* 2D or cube */ + _mesa_TexImage2D(faceTarget, dstLevel, srcImage->InternalFormat, + dstWidth, dstHeight, border, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + + if (target == GL_TEXTURE_CUBE_MAP) { + /* If texturing from a cube, we need to make sure all src faces + * have been defined (even if we're not sampling from them.) + * Otherwise the texture object will be 'incomplete' and + * texturing from it will not be allowed. + */ + GLuint face; + for (face = 0; face < 6; face++) { + if (!texObj->Image[face][srcLevel] || + texObj->Image[face][srcLevel]->Width != srcWidth) { + _mesa_TexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, + srcLevel, srcImage->InternalFormat, + srcWidth, srcHeight, border, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + } + } + } + } - /* vertex positions */ + /* setup vertex positions */ { verts[0].x = 0.0F; verts[0].y = 0.0F; - verts[1].x = (GLfloat) newWidth; + verts[1].x = (GLfloat) dstWidth; verts[1].y = 0.0F; - verts[2].x = (GLfloat) newWidth; - verts[2].y = (GLfloat) newHeight; + verts[2].x = (GLfloat) dstWidth; + verts[2].y = (GLfloat) dstHeight; verts[3].x = 0.0F; - verts[3].y = (GLfloat) newHeight; + verts[3].y = (GLfloat) dstHeight; /* upload new vertex data */ _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); } /* limit sampling to src level */ - _mesa_TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, srcLevel); - _mesa_TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, srcLevel); - - /* Set to draw into the current level */ - _mesa_FramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - target, - texObj->Name, - level); + _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, srcLevel); + _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel); + + /* Set to draw into the current dstLevel */ + if (target == GL_TEXTURE_1D) { + _mesa_FramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, + GL_COLOR_ATTACHMENT0_EXT, + target, + texObj->Name, + dstLevel); + } + else if (target == GL_TEXTURE_3D) { + GLint zoffset = 0; /* XXX unfinished */ + _mesa_FramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT, + GL_COLOR_ATTACHMENT0_EXT, + target, + texObj->Name, + dstLevel, zoffset); + } + else { + /* 2D / cube */ + _mesa_FramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, + GL_COLOR_ATTACHMENT0_EXT, + faceTarget, + texObj->Name, + dstLevel); + } - /* Choose to render to the color attachment. */ _mesa_DrawBuffer(GL_COLOR_ATTACHMENT0_EXT); + /* sanity check */ status = _mesa_CheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT); if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { abort(); @@ -2093,12 +2225,19 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); } + _mesa_lock_texture(ctx, texObj); /* relock */ + _mesa_meta_end(ctx); _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilterSave); _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilterSave); + _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, baseLevelSave); + _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave); + _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, genMipmapSave); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, wrapSSave); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, wrapTSave); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, wrapRSave); - /* restore (XXX add to meta_begin/end()? */ _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboSave); } -- cgit v1.2.3 From 126d62edd18f22ff9e744efea81e0383cd0a19c5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Sep 2009 20:03:21 -0700 Subject: i915: Fix GetBufferSubData in the case of a system-memory BO. Bug #23760 (crashes in wine) --- src/mesa/drivers/dri/intel/intel_buffer_objects.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index 2e6b77824df..db0de0343a8 100644 --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -209,7 +209,10 @@ intel_bufferobj_get_subdata(GLcontext * ctx, struct intel_buffer_object *intel_obj = intel_buffer_object(obj); assert(intel_obj); - dri_bo_get_subdata(intel_obj->buffer, offset, size, data); + if (intel_obj->sys_buffer) + memcpy(data, (char *)intel_obj->sys_buffer + offset, size); + else + dri_bo_get_subdata(intel_obj->buffer, offset, size, data); } -- cgit v1.2.3 From 17099f5e19dc0ce65cb4e4110d9d22de803c4e52 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 7 Sep 2009 17:51:33 +0800 Subject: mesa/main: Add comments to mfeatures.h. The comments document the conventions that a feature may follow. --- src/mesa/main/mfeatures.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index e23cdb1f426..6318934c6bf 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -36,6 +36,38 @@ #define _HAVE_FULL_GL 1 #endif +/* assert that a feature is disabled and should never be used */ +#define ASSERT_NO_FEATURE() ASSERT(0) + +/** + * A feature can be anything. But most of them share certain characteristics. + * + * When a feature defines driver entries, they can be initialized by + * _MESA_INIT__FUNCTIONS + * + * When a feature defines vtxfmt entries, they can be initialized and + * installed by + * _MESA_INIT__VTXFMT + * _mesa_install__vtxfmt + * + * When a feature defines dispatch entries, they are initialized by + * _mesa_init__dispatch + * + * When a feature has states, they are initialized and freed by + * _mesa_init_ + * _mesa_free__data + * + * Except for states, the others compile to no-op when a feature is disabled. + * + * The GLAPIENTRYs and helper functions defined by a feature should also + * compile to no-op when it is disabled. But to save typings and to catch + * bugs, some of them may be unavailable, or compile to ASSERT_NO_FEATURE() + * when the feature is disabled. + * + * A feature following the conventions may be used without knowing if it is + * enabled or not. + */ + #define FEATURE_accum _HAVE_FULL_GL #define FEATURE_attrib_stack _HAVE_FULL_GL #define FEATURE_colortable _HAVE_FULL_GL -- cgit v1.2.3 From dbb8fb8de9a9deca0ae22015e4680f4e631d6d32 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 7 Sep 2009 16:59:27 +0800 Subject: mesa/main: Make FEATURE_pixel_transfer follow feature conventions. As shown in mfeatures.h, this allows users of pixel.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 16 +++------------- src/mesa/main/pixel.c | 40 +++++++++++++++++++++++++++++++--------- src/mesa/main/pixel.h | 47 +++++++++++++++++------------------------------ src/mesa/main/state.c | 4 ---- 4 files changed, 51 insertions(+), 56 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 02550ae1088..39941a1b037 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -93,9 +93,7 @@ #include "macros.h" #include "matrix.h" #include "multisample.h" -#if FEATURE_pixel_transfer #include "pixel.h" -#endif #include "pixelstore.h" #include "points.h" #include "polygon.h" @@ -284,17 +282,9 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_MapGrid2f(exec, _mesa_MapGrid2f); #endif SET_MultMatrixd(exec, _mesa_MultMatrixd); -#if FEATURE_pixel_transfer - SET_GetPixelMapfv(exec, _mesa_GetPixelMapfv); - SET_GetPixelMapuiv(exec, _mesa_GetPixelMapuiv); - SET_GetPixelMapusv(exec, _mesa_GetPixelMapusv); - SET_PixelMapfv(exec, _mesa_PixelMapfv); - SET_PixelMapuiv(exec, _mesa_PixelMapuiv); - SET_PixelMapusv(exec, _mesa_PixelMapusv); - SET_PixelTransferf(exec, _mesa_PixelTransferf); - SET_PixelTransferi(exec, _mesa_PixelTransferi); - SET_PixelZoom(exec, _mesa_PixelZoom); -#endif + + _mesa_init_pixel_dispatch(exec); + SET_PixelStoref(exec, _mesa_PixelStoref); SET_PointSize(exec, _mesa_PointSize); SET_PolygonMode(exec, _mesa_PolygonMode); diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index fcef6dfd422..3820ebd8894 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -36,13 +36,17 @@ #include "macros.h" #include "pixel.h" #include "mtypes.h" +#include "glapi/dispatch.h" + + +#if FEATURE_pixel_transfer /**********************************************************************/ /***** glPixelZoom *****/ /**********************************************************************/ -void GLAPIENTRY +static void GLAPIENTRY _mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor ) { GET_CURRENT_CONTEXT(ctx); @@ -163,7 +167,7 @@ validate_pbo_access(GLcontext *ctx, struct gl_pixelstore_attrib *pack, } -void GLAPIENTRY +static void GLAPIENTRY _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ) { GET_CURRENT_CONTEXT(ctx); @@ -205,7 +209,7 @@ _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ) { GLfloat fvalues[MAX_PIXEL_MAP_TABLE]; @@ -261,7 +265,7 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ) { GLfloat fvalues[MAX_PIXEL_MAP_TABLE]; @@ -317,7 +321,7 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetPixelMapfv( GLenum map, GLfloat *values ) { GET_CURRENT_CONTEXT(ctx); @@ -362,7 +366,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetPixelMapuiv( GLenum map, GLuint *values ) { GET_CURRENT_CONTEXT(ctx); @@ -406,7 +410,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetPixelMapusv( GLenum map, GLushort *values ) { GET_CURRENT_CONTEXT(ctx); @@ -468,7 +472,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values ) * Implements glPixelTransfer[fi] whether called immediately or from a * display list. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_PixelTransferf( GLenum pname, GLfloat param ) { GET_CURRENT_CONTEXT(ctx); @@ -662,7 +666,7 @@ _mesa_PixelTransferf( GLenum pname, GLfloat param ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_PixelTransferi( GLenum pname, GLint param ) { _mesa_PixelTransferf( pname, (GLfloat) param ); @@ -756,6 +760,24 @@ void _mesa_update_pixel( GLcontext *ctx, GLuint new_state ) } +void +_mesa_init_pixel_dispatch(struct _glapi_table *disp) +{ + SET_GetPixelMapfv(disp, _mesa_GetPixelMapfv); + SET_GetPixelMapuiv(disp, _mesa_GetPixelMapuiv); + SET_GetPixelMapusv(disp, _mesa_GetPixelMapusv); + SET_PixelMapfv(disp, _mesa_PixelMapfv); + SET_PixelMapuiv(disp, _mesa_PixelMapuiv); + SET_PixelMapusv(disp, _mesa_PixelMapusv); + SET_PixelTransferf(disp, _mesa_PixelTransferf); + SET_PixelTransferi(disp, _mesa_PixelTransferi); + SET_PixelZoom(disp, _mesa_PixelZoom); +} + + +#endif /* FEATURE_pixel_transfer */ + + /**********************************************************************/ /***** Initialization *****/ /**********************************************************************/ diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h index cb6c5262a39..f4d3f1efdb0 100644 --- a/src/mesa/main/pixel.h +++ b/src/mesa/main/pixel.h @@ -33,48 +33,35 @@ #define PIXEL_H -#include "mtypes.h" +#include "main/mtypes.h" -/** \name API functions */ -/*@{*/ +#if FEATURE_pixel_transfer -extern void GLAPIENTRY -_mesa_GetPixelMapfv( GLenum map, GLfloat *values ); - -extern void GLAPIENTRY -_mesa_GetPixelMapuiv( GLenum map, GLuint *values ); - -extern void GLAPIENTRY -_mesa_GetPixelMapusv( GLenum map, GLushort *values ); - -extern void GLAPIENTRY -_mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ); - -extern void GLAPIENTRY -_mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ); - -extern void GLAPIENTRY -_mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ); +extern void +_mesa_update_pixel( GLcontext *ctx, GLuint newstate ); -extern void GLAPIENTRY -_mesa_PixelTransferf( GLenum pname, GLfloat param ); +extern void +_mesa_init_pixel_dispatch( struct _glapi_table * disp ); -extern void GLAPIENTRY -_mesa_PixelTransferi( GLenum pname, GLint param ); +#else /* FEATURE_pixel_transfer */ -extern void GLAPIENTRY -_mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor ); +static INLINE void +_mesa_update_pixel(GLcontext *ctx, GLuint newstate) +{ +} -/*@}*/ +static INLINE void +_mesa_init_pixel_dispatch(struct _glapi_table *disp) +{ +} +#endif /* FEATURE_pixel_transfer */ -extern void -_mesa_update_pixel( GLcontext *ctx, GLuint newstate ); extern void _mesa_init_pixel( GLcontext * ctx ); /*@}*/ -#endif +#endif /* PIXEL_H */ diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 140a998df2e..f10e6b04b7c 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -40,9 +40,7 @@ #include "framebuffer.h" #include "light.h" #include "matrix.h" -#if FEATURE_pixel_transfer #include "pixel.h" -#endif #include "shader/program.h" #include "shader/prog_parameter.h" #include "state.h" @@ -585,10 +583,8 @@ _mesa_update_state_locked( GLcontext *ctx ) if (new_state & (_NEW_STENCIL | _NEW_BUFFERS)) _mesa_update_stencil( ctx ); -#if FEATURE_pixel_transfer if (new_state & _MESA_NEW_TRANSFER_STATE) _mesa_update_pixel( ctx, new_state ); -#endif if (new_state & _DD_NEW_SEPARATE_SPECULAR) update_separate_specular( ctx ); -- cgit v1.2.3 From cb4f24e51d0f4f4b867b2c01ed26d2a5ce73aeab Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 7 Sep 2009 17:17:11 +0800 Subject: mesa/main: Make FEATURE_colortable follow feature conventions. As shown in mfeatures.h, this allows users of colortab.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 14 +--------- src/mesa/main/colortab.c | 37 ++++++++++++++++++++----- src/mesa/main/colortab.h | 71 ++++++++++++++++++++++-------------------------- src/mesa/main/context.c | 6 ---- src/mesa/main/texobj.c | 4 --- src/mesa/main/texstate.c | 6 ---- 6 files changed, 64 insertions(+), 74 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 39941a1b037..30c142e53ac 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -54,9 +54,7 @@ #endif #include "clear.h" #include "clip.h" -#if FEATURE_colortable #include "colortab.h" -#endif #include "context.h" #if FEATURE_convolve #include "convolve.h" @@ -385,17 +383,7 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_BlendEquation(exec, _mesa_BlendEquation); SET_BlendEquationSeparateEXT(exec, _mesa_BlendEquationSeparateEXT); -#if FEATURE_colortable - SET_ColorSubTable(exec, _mesa_ColorSubTable); - SET_ColorTable(exec, _mesa_ColorTable); - SET_ColorTableParameterfv(exec, _mesa_ColorTableParameterfv); - SET_ColorTableParameteriv(exec, _mesa_ColorTableParameteriv); - SET_CopyColorSubTable(exec, _mesa_CopyColorSubTable); - SET_CopyColorTable(exec, _mesa_CopyColorTable); - SET_GetColorTable(exec, _mesa_GetColorTable); - SET_GetColorTableParameterfv(exec, _mesa_GetColorTableParameterfv); - SET_GetColorTableParameteriv(exec, _mesa_GetColorTableParameteriv); -#endif + _mesa_init_colortable_dispatch(exec); #if FEATURE_convolve SET_ConvolutionFilter1D(exec, _mesa_ConvolutionFilter1D); diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c index 5447eb18ef9..5ede76c1fb1 100644 --- a/src/mesa/main/colortab.c +++ b/src/mesa/main/colortab.c @@ -32,6 +32,10 @@ #include "state.h" #include "teximage.h" #include "texstate.h" +#include "glapi/dispatch.h" + + +#if FEATURE_colortable /** @@ -536,7 +540,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start, -void GLAPIENTRY +static void GLAPIENTRY _mesa_CopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) { @@ -552,7 +556,7 @@ _mesa_CopyColorTable(GLenum target, GLenum internalformat, -void GLAPIENTRY +static void GLAPIENTRY _mesa_CopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) { @@ -568,7 +572,7 @@ _mesa_CopyColorSubTable(GLenum target, GLsizei start, -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetColorTable( GLenum target, GLenum format, GLenum type, GLvoid *data ) { @@ -702,7 +706,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, -void GLAPIENTRY +static void GLAPIENTRY _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) { GLfloat *scale, *bias; @@ -747,7 +751,7 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) -void GLAPIENTRY +static void GLAPIENTRY _mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params) { GLfloat fparams[4]; @@ -770,7 +774,7 @@ _mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params) -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ) { GET_CURRENT_CONTEXT(ctx); @@ -897,7 +901,7 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ) -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ) { GET_CURRENT_CONTEXT(ctx); @@ -1052,6 +1056,25 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ) } } + +void +_mesa_init_colortable_dispatch(struct _glapi_table *disp) +{ + SET_ColorSubTable(disp, _mesa_ColorSubTable); + SET_ColorTable(disp, _mesa_ColorTable); + SET_ColorTableParameterfv(disp, _mesa_ColorTableParameterfv); + SET_ColorTableParameteriv(disp, _mesa_ColorTableParameteriv); + SET_CopyColorSubTable(disp, _mesa_CopyColorSubTable); + SET_CopyColorTable(disp, _mesa_CopyColorTable); + SET_GetColorTable(disp, _mesa_GetColorTable); + SET_GetColorTableParameterfv(disp, _mesa_GetColorTableParameterfv); + SET_GetColorTableParameteriv(disp, _mesa_GetColorTableParameteriv); +} + + +#endif /* FEATURE_colortable */ + + /**********************************************************************/ /***** Initialization *****/ /**********************************************************************/ diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h index b6ff737a65f..652fb582463 100644 --- a/src/mesa/main/colortab.h +++ b/src/mesa/main/colortab.h @@ -27,9 +27,16 @@ #define COLORTAB_H -#include "mtypes.h" +#include "main/mtypes.h" -#if _HAVE_FULL_GL +#if FEATURE_colortable + +#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) \ + do { \ + (driver)->CopyColorTable = impl ## CopyColorTable; \ + (driver)->CopyColorSubTable = impl ## CopyColorSubTable; \ + (driver)->UpdateTexturePalette = impl ## UpdateTexturePalette; \ + } while (0) extern void GLAPIENTRY _mesa_ColorTable( GLenum target, GLenum internalformat, @@ -41,32 +48,35 @@ _mesa_ColorSubTable( GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table ); -extern void GLAPIENTRY -_mesa_CopyColorSubTable(GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width); - -extern void GLAPIENTRY -_mesa_CopyColorTable(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width); +extern void +_mesa_init_colortable_dispatch(struct _glapi_table *disp); -extern void GLAPIENTRY -_mesa_GetColorTable( GLenum target, GLenum format, - GLenum type, GLvoid *table ); +#else /* FEATURE_colortable */ -extern void GLAPIENTRY -_mesa_ColorTableParameterfv(GLenum target, GLenum pname, - const GLfloat *params); +#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) do { } while (0) -extern void GLAPIENTRY -_mesa_ColorTableParameteriv(GLenum target, GLenum pname, - const GLint *params); +static INLINE void GLAPIENTRY +_mesa_ColorTable( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, GLenum type, + const GLvoid *table ) +{ + ASSERT_NO_FEATURE(); +} -extern void GLAPIENTRY -_mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ); +static INLINE void GLAPIENTRY +_mesa_ColorSubTable( GLenum target, GLsizei start, + GLsizei count, GLenum format, GLenum type, + const GLvoid *table ) +{ + ASSERT_NO_FEATURE(); +} -extern void GLAPIENTRY -_mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ); +static INLINE void +_mesa_init_colortable_dispatch(struct _glapi_table *disp) +{ +} +#endif /* FEATURE_colortable */ extern void @@ -81,20 +91,5 @@ _mesa_init_colortables( GLcontext *ctx ); extern void _mesa_free_colortables_data( GLcontext *ctx ); -#else - -/** No-op */ -#define _mesa_init_colortable( p ) ((void) 0) - -/** No-op */ -#define _mesa_free_colortable_data( p ) ((void) 0) - -/** No-op */ -#define _mesa_init_colortables( p ) ((void)0) - -/** No-op */ -#define _mesa_free_colortables_data( p ) ((void)0) - -#endif -#endif +#endif /* COLORTAB_H */ diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index f6d4ac45957..1907c799df9 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -90,9 +90,7 @@ #include "blend.h" #include "buffers.h" #include "bufferobj.h" -#if FEATURE_colortable #include "colortab.h" -#endif #include "context.h" #include "cpuinfo.h" #include "debug.h" @@ -686,9 +684,7 @@ init_attrib_groups(GLcontext *ctx) #endif _mesa_init_buffer_objects( ctx ); _mesa_init_color( ctx ); -#if FEATURE_colortable _mesa_init_colortables( ctx ); -#endif _mesa_init_current( ctx ); _mesa_init_depth( ctx ); _mesa_init_debug( ctx ); @@ -1015,9 +1011,7 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_free_texture_data( ctx ); _mesa_free_matrix_data( ctx ); _mesa_free_viewport_data( ctx ); -#if FEATURE_colortable _mesa_free_colortables_data( ctx ); -#endif _mesa_free_program_data(ctx); _mesa_free_shader_state(ctx); #if FEATURE_ARB_occlusion_query diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index d09c4392506..678845ece06 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -29,9 +29,7 @@ #include "mfeatures.h" -#if FEATURE_colortable #include "colortab.h" -#endif #include "context.h" #include "enums.h" #include "fbobject.h" @@ -194,9 +192,7 @@ _mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *texObj ) */ texObj->Target = 0x99; -#if FEATURE_colortable _mesa_free_colortable_data(&texObj->Palette); -#endif /* free the texture images */ for (face = 0; face < 6; face++) { diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 861c5f37c4e..b9311d0ffc9 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -31,9 +31,7 @@ #include "glheader.h" #include "mfeatures.h" #include "colormac.h" -#if FEATURE_colortable #include "colortab.h" -#endif #include "context.h" #include "enums.h" #include "macros.h" @@ -753,9 +751,7 @@ _mesa_init_texture(GLcontext *ctx) ctx->Texture.CurrentUnit = 0; /* multitexture */ ctx->Texture._EnabledUnits = 0x0; ctx->Texture.SharedPalette = GL_FALSE; -#if FEATURE_colortable _mesa_init_colortable(&ctx->Texture.Palette); -#endif for (u = 0; u < MAX_TEXTURE_UNITS; u++) init_texture_unit(ctx, u); @@ -796,10 +792,8 @@ _mesa_free_texture_data(GLcontext *ctx) for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]); -#if FEATURE_colortable for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) _mesa_free_colortable_data(&ctx->Texture.Unit[u].ColorTable); -#endif } -- cgit v1.2.3 From 5a1e25afac8eac5df1c0c9d3165b9812f54909a6 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 23 Sep 2009 16:56:20 +0800 Subject: mesa/main: Make FEATURE_convolve follow feature conventions. As shown in mfeatures.h, this allows users of convolve.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 19 +------- src/mesa/main/convolve.c | 48 ++++++++++++++----- src/mesa/main/convolve.h | 118 ++++++++++++++++++++++++++--------------------- src/mesa/main/teximage.c | 2 - src/mesa/main/texstore.c | 2 - 5 files changed, 103 insertions(+), 86 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 30c142e53ac..63176390751 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -56,9 +56,7 @@ #include "clip.h" #include "colortab.h" #include "context.h" -#if FEATURE_convolve #include "convolve.h" -#endif #include "depth.h" #if FEATURE_dlist #include "dlist.h" @@ -384,21 +382,7 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_BlendEquationSeparateEXT(exec, _mesa_BlendEquationSeparateEXT); _mesa_init_colortable_dispatch(exec); - -#if FEATURE_convolve - SET_ConvolutionFilter1D(exec, _mesa_ConvolutionFilter1D); - SET_ConvolutionFilter2D(exec, _mesa_ConvolutionFilter2D); - SET_ConvolutionParameterf(exec, _mesa_ConvolutionParameterf); - SET_ConvolutionParameterfv(exec, _mesa_ConvolutionParameterfv); - SET_ConvolutionParameteri(exec, _mesa_ConvolutionParameteri); - SET_ConvolutionParameteriv(exec, _mesa_ConvolutionParameteriv); - SET_CopyConvolutionFilter1D(exec, _mesa_CopyConvolutionFilter1D); - SET_CopyConvolutionFilter2D(exec, _mesa_CopyConvolutionFilter2D); - SET_GetConvolutionFilter(exec, _mesa_GetConvolutionFilter); - SET_GetConvolutionParameterfv(exec, _mesa_GetConvolutionParameterfv); - SET_GetConvolutionParameteriv(exec, _mesa_GetConvolutionParameteriv); - SET_SeparableFilter2D(exec, _mesa_SeparableFilter2D); -#endif + _mesa_init_convolve_dispatch(exec); #if FEATURE_histogram SET_GetHistogram(exec, _mesa_GetHistogram); SET_GetHistogramParameterfv(exec, _mesa_GetHistogramParameterfv); @@ -406,7 +390,6 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_GetMinmax(exec, _mesa_GetMinmax); SET_GetMinmaxParameterfv(exec, _mesa_GetMinmaxParameterfv); SET_GetMinmaxParameteriv(exec, _mesa_GetMinmaxParameteriv); - SET_GetSeparableFilter(exec, _mesa_GetSeparableFilter); SET_Histogram(exec, _mesa_Histogram); SET_Minmax(exec, _mesa_Minmax); SET_ResetHistogram(exec, _mesa_ResetHistogram); diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c index bf6f6619d4f..8db3e79d384 100644 --- a/src/mesa/main/convolve.c +++ b/src/mesa/main/convolve.c @@ -40,6 +40,10 @@ #include "mtypes.h" #include "pixel.h" #include "state.h" +#include "glapi/dispatch.h" + + +#if FEATURE_convolve /* @@ -256,7 +260,7 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G } -void GLAPIENTRY +static void GLAPIENTRY _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) { GET_CURRENT_CONTEXT(ctx); @@ -299,7 +303,7 @@ _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) { GET_CURRENT_CONTEXT(ctx); @@ -351,7 +355,7 @@ _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) { GET_CURRENT_CONTEXT(ctx); @@ -394,7 +398,7 @@ _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) { GET_CURRENT_CONTEXT(ctx); @@ -459,7 +463,7 @@ _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width) { GLint baseFormat; @@ -491,7 +495,7 @@ _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLi } -void GLAPIENTRY +static void GLAPIENTRY _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height) { GLint baseFormat; @@ -527,7 +531,7 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image) { @@ -586,7 +590,7 @@ _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) { GET_CURRENT_CONTEXT(ctx); @@ -647,7 +651,7 @@ _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) { GET_CURRENT_CONTEXT(ctx); @@ -717,7 +721,7 @@ _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span) { @@ -784,7 +788,7 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, } -void GLAPIENTRY +static void GLAPIENTRY _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) { const GLint colStart = MAX_CONVOLUTION_WIDTH * 4; @@ -1433,3 +1437,25 @@ _mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions, *height = *height - (MAX2(ctx->Separable2D.Height, 1) - 1); } } + + +void +_mesa_init_convolve_dispatch(struct _glapi_table *disp) +{ + SET_ConvolutionFilter1D(disp, _mesa_ConvolutionFilter1D); + SET_ConvolutionFilter2D(disp, _mesa_ConvolutionFilter2D); + SET_ConvolutionParameterf(disp, _mesa_ConvolutionParameterf); + SET_ConvolutionParameterfv(disp, _mesa_ConvolutionParameterfv); + SET_ConvolutionParameteri(disp, _mesa_ConvolutionParameteri); + SET_ConvolutionParameteriv(disp, _mesa_ConvolutionParameteriv); + SET_CopyConvolutionFilter1D(disp, _mesa_CopyConvolutionFilter1D); + SET_CopyConvolutionFilter2D(disp, _mesa_CopyConvolutionFilter2D); + SET_GetConvolutionFilter(disp, _mesa_GetConvolutionFilter); + SET_GetConvolutionParameterfv(disp, _mesa_GetConvolutionParameterfv); + SET_GetConvolutionParameteriv(disp, _mesa_GetConvolutionParameteriv); + SET_SeparableFilter2D(disp, _mesa_SeparableFilter2D); + SET_GetSeparableFilter(disp, _mesa_GetSeparableFilter); +} + + +#endif /* FEATURE_convolve */ diff --git a/src/mesa/main/convolve.h b/src/mesa/main/convolve.h index 4505cdae01e..59492bc7c54 100644 --- a/src/mesa/main/convolve.h +++ b/src/mesa/main/convolve.h @@ -28,10 +28,17 @@ #define CONVOLVE_H -#include "mtypes.h" +#include "main/mtypes.h" -#if _HAVE_FULL_GL +#if FEATURE_convolve + +#define _MESA_INIT_CONVOLVE_FUNCTIONS(driver, impl) \ + do { \ + (driver)->CopyConvolutionFilter1D = impl ## CopyConvolutionFilter1D; \ + (driver)->CopyConvolutionFilter2D = impl ## CopyConvolutionFilter2D; \ + } while (0) + extern void GLAPIENTRY _mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); @@ -41,74 +48,79 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -extern void GLAPIENTRY -_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat params); - -extern void GLAPIENTRY -_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, - const GLfloat *params); - -extern void GLAPIENTRY -_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint params); - -extern void GLAPIENTRY -_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params); - -extern void GLAPIENTRY -_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width); +extern void +_mesa_convolve_1d_image(const GLcontext *ctx, GLsizei *width, + const GLfloat *srcImage, GLfloat *dstImage); -extern void GLAPIENTRY -_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLsizei height); +extern void +_mesa_convolve_2d_image(const GLcontext *ctx, GLsizei *width, GLsizei *height, + const GLfloat *srcImage, GLfloat *dstImage); -extern void GLAPIENTRY -_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, - GLvoid *image); +extern void +_mesa_convolve_sep_image(const GLcontext *ctx, + GLsizei *width, GLsizei *height, + const GLfloat *srcImage, GLfloat *dstImage); -extern void GLAPIENTRY -_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params); +extern void +_mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions, + GLsizei *width, GLsizei *height); -extern void GLAPIENTRY -_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params); +extern void +_mesa_init_convolve_dispatch(struct _glapi_table *disp); -extern void GLAPIENTRY -_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, - GLvoid *row, GLvoid *column, GLvoid *span); +#else /* FEATURE_convolve */ -extern void GLAPIENTRY -_mesa_SeparableFilter2D(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *row, const GLvoid *column); +#define _MESA_INIT_CONVOLVE_FUNCTIONS(driver, impl) do { } while (0) +static INLINE void GLAPIENTRY +_mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, + GLenum format, GLenum type, const GLvoid *image) +{ + ASSERT_NO_FEATURE(); +} +static INLINE void GLAPIENTRY +_mesa_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, + GLsizei height, GLenum format, GLenum type, + const GLvoid *image) +{ + ASSERT_NO_FEATURE(); +} -extern void +static INLINE void _mesa_convolve_1d_image(const GLcontext *ctx, GLsizei *width, - const GLfloat *srcImage, GLfloat *dstImage); - + const GLfloat *srcImage, GLfloat *dstImage) +{ + ASSERT_NO_FEATURE(); +} -extern void +static INLINE void _mesa_convolve_2d_image(const GLcontext *ctx, GLsizei *width, GLsizei *height, - const GLfloat *srcImage, GLfloat *dstImage); + const GLfloat *srcImage, GLfloat *dstImage) +{ + ASSERT_NO_FEATURE(); +} -extern void +static INLINE void _mesa_convolve_sep_image(const GLcontext *ctx, GLsizei *width, GLsizei *height, - const GLfloat *srcImage, GLfloat *dstImage); - + const GLfloat *srcImage, GLfloat *dstImage) +{ + ASSERT_NO_FEATURE(); +} -extern void +static INLINE void _mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions, - GLsizei *width, GLsizei *height); + GLsizei *width, GLsizei *height) +{ +} + +static INLINE void +_mesa_init_convolve_dispatch(struct _glapi_table *disp) +{ +} -#else -#define _mesa_adjust_image_for_convolution(c, d, w, h) ((void)0) -#define _mesa_convolve_1d_image(c,w,s,d) ((void)0) -#define _mesa_convolve_2d_image(c,w,h,s,d) ((void)0) -#define _mesa_convolve_sep_image(c,w,h,s,d) ((void)0) -#endif +#endif /* FEATURE_convolve */ -#endif +#endif /* CONVOLVE_H */ diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b555624d882..465da6b0469 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -33,9 +33,7 @@ #include "glheader.h" #include "bufferobj.h" #include "context.h" -#if FEATURE_convolve #include "convolve.h" -#endif #include "enums.h" #include "fbobject.h" #include "framebuffer.h" diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index ab9973b8101..f553a898f9e 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -56,9 +56,7 @@ #include "bufferobj.h" #include "colormac.h" #include "context.h" -#if FEATURE_convolve #include "convolve.h" -#endif #include "image.h" #include "macros.h" #include "mipmap.h" -- cgit v1.2.3 From 46da1f2c9b67e3b4c3659f2d029140b639571407 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 25 Sep 2009 08:51:57 -0600 Subject: mesa: move declaration before code --- src/mesa/shader/nvvertparse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c index 6ab8a14cb9b..8574016050c 100644 --- a/src/mesa/shader/nvvertparse.c +++ b/src/mesa/shader/nvvertparse.c @@ -1415,9 +1415,10 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, * upload everything, _mesa_layout_parameters is the answer. */ for (i = 0; i < MAX_NV_VERTEX_PROGRAM_PARAMS; i++) { + GLint index; state_tokens[2] = i; - int index = _mesa_add_state_reference(program->Base.Parameters, - state_tokens); + index = _mesa_add_state_reference(program->Base.Parameters, + state_tokens); assert(index == i); } program->Base.NumParameters = program->Base.Parameters->NumParameters; -- cgit v1.2.3 From 02b81187dcf606ebf064ac23888e5c57d0528edf Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Fri, 25 Sep 2009 18:51:55 +0200 Subject: radeon: Fix newlines. --- src/mesa/drivers/dri/r600/r700_chip.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c index e3b8a4081a5..3b7f6fffe03 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.c +++ b/src/mesa/drivers/dri/r600/r700_chip.c @@ -255,20 +255,20 @@ static void r700SetupVTXConstants2(GLcontext * ctx, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_shift, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask); /* TODO : trace back api for initial data type, not only GL_FLOAT */ - if(GL_TRUE == pStreamDesc->normalize) - { - SETfield(uSQ_VTX_CONSTANT_WORD2_0, SQ_NUM_FORMAT_NORM, - SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask); - } - //else - //{ - // SETfield(uSQ_VTX_CONSTANT_WORD2_0, SQ_NUM_FORMAT_INT, - // SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask); - //} - - if(1 == pStreamDesc->_signed) - { - SETbit(uSQ_VTX_CONSTANT_WORD2_0, SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit); + if(GL_TRUE == pStreamDesc->normalize) + { + SETfield(uSQ_VTX_CONSTANT_WORD2_0, SQ_NUM_FORMAT_NORM, + SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask); + } + //else + //{ + // SETfield(uSQ_VTX_CONSTANT_WORD2_0, SQ_NUM_FORMAT_INT, + // SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask); + //} + + if(1 == pStreamDesc->_signed) + { + SETbit(uSQ_VTX_CONSTANT_WORD2_0, SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit); } SETfield(uSQ_VTX_CONSTANT_WORD3_0, 1, MEM_REQUEST_SIZE_shift, MEM_REQUEST_SIZE_mask); -- cgit v1.2.3 From 151e0c0aeaa78f4eb6a87d2b3dd86b4807db1523 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Fri, 25 Sep 2009 20:59:44 +0200 Subject: intel: Handle GL_RGB8 for glCopyTex(Sub)Image. Avoids an unnecessary fallback. --- src/mesa/drivers/dri/intel/intel_tex_copy.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c index 028b49c14d3..74f7f58bbe4 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_copy.c +++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c @@ -74,6 +74,7 @@ get_teximage_source(struct intel_context *intel, GLenum internalFormat) case GL_RGBA: case GL_RGBA8: case GL_RGB: + case GL_RGB8: return intel_readbuf_region(intel); default: return NULL; -- cgit v1.2.3 From eea30906de37ea3b2f8a594c2b33b643d3dde987 Mon Sep 17 00:00:00 2001 From: Richard Li Date: Sun, 27 Sep 2009 14:47:12 -0400 Subject: r600 : Enable draw_prim. --- src/mesa/drivers/dri/r600/r700_render.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 5627984cf96..4949bf013d9 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -1147,9 +1147,7 @@ void r700InitDraw(GLcontext *ctx) struct vbo_context *vbo = vbo_context(ctx); /* to be enabled */ - /* vbo->draw_prims = r700DrawPrims; - */ } -- cgit v1.2.3 From eb82373abb08171d7fcb15b5f4f229fc9ca9aa91 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 28 Sep 2009 09:22:33 -0600 Subject: mesa: use _mesa_get_current_tex_unit() helper --- src/mesa/main/enable.c | 4 ++-- src/mesa/main/fbobject.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 8e6b01f73b9..4383aed6692 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -37,6 +37,7 @@ #include "mtypes.h" #include "enums.h" #include "api_arrayelt.h" +#include "texstate.h" @@ -228,8 +229,7 @@ get_texcoord_unit(GLcontext *ctx) static GLboolean enable_texture(GLcontext *ctx, GLboolean state, GLbitfield texBit) { - const GLuint curr = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr]; + struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); const GLbitfield newenabled = state ? (texUnit->Enabled | texBit) : (texUnit->Enabled & ~texBit); diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 13f49da5a78..680fd22ba8f 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -44,6 +44,7 @@ #include "teximage.h" #include "texobj.h" #include "texstore.h" +#include "texstate.h" /** Set this to 1 to help debug FBO incompleteness problems */ @@ -1955,7 +1956,7 @@ _mesa_GenerateMipmapEXT(GLenum target) return; } - texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + texUnit = _mesa_get_current_tex_unit(ctx); texObj = _mesa_select_tex_object(ctx, texUnit, target); _mesa_lock_texture(ctx, texObj); -- cgit v1.2.3 From e3a6f57ad6c0e7bda5d45eb146194ed39f45abdd Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 28 Sep 2009 09:28:50 -0600 Subject: st/mesa: fix/simplify st_texture_object::lastLevel calculation Don't compute the st_texture_object::lastLevel field based on the texture filters. Use the _MaxLevel value that core Mesa computes for us. When called from the GenerateMipmap path, we'll use the lastLevel field as-is. --- src/mesa/state_tracker/st_cb_texture.c | 62 +++++----------------------------- 1 file changed, 9 insertions(+), 53 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index cfa33d48e12..085da3eab43 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1708,53 +1708,6 @@ st_CopyTexSubImage3D(GLcontext * ctx, GLenum target, GLint level, } -/** - * Compute which mipmap levels that really need to be sent to the hardware. - * This depends on the base image size, GL_TEXTURE_MIN_LOD, - * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. - */ -static void -calculate_first_last_level(struct st_texture_object *stObj) -{ - struct gl_texture_object *tObj = &stObj->base; - - /* These must be signed values. MinLod and MaxLod can be negative numbers, - * and having firstLevel and lastLevel as signed prevents the need for - * extra sign checks. - */ - GLint firstLevel; - GLint lastLevel; - - /* Yes, this looks overly complicated, but it's all needed. - */ - switch (tObj->Target) { - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_CUBE_MAP: - if (tObj->MinFilter == GL_NEAREST || tObj->MinFilter == GL_LINEAR) { - /* GL_NEAREST and GL_LINEAR only care about GL_TEXTURE_BASE_LEVEL. - */ - firstLevel = lastLevel = tObj->BaseLevel; - } - else { - firstLevel = 0; - lastLevel = MIN2(tObj->MaxLevel, - (int) tObj->Image[0][tObj->BaseLevel]->WidthLog2); - } - break; - case GL_TEXTURE_RECTANGLE_NV: - case GL_TEXTURE_4D_SGIS: - firstLevel = lastLevel = 0; - break; - default: - return; - } - - stObj->lastLevel = lastLevel; -} - - static void copy_image_data_to_texture(struct st_context *st, struct st_texture_object *stObj, @@ -1818,13 +1771,16 @@ st_finalize_texture(GLcontext *ctx, *needFlush = GL_FALSE; - /* We know/require this is true by now: - */ - assert(stObj->base._Complete); + if (stObj->base._Complete) { + /* The texture is complete and we know exactly how many mipmap levels + * are present/needed. This is conditional because we may be called + * from the st_generate_mipmap() function when the texture object is + * incomplete. In that case, we'll have set stObj->lastLevel before + * we get here. + */ + stObj->lastLevel = stObj->base._MaxLevel - stObj->base.BaseLevel; + } - /* What levels must the texture include at a minimum? - */ - calculate_first_last_level(stObj); firstImage = st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); /* If both firstImage and stObj point to a texture which can contain -- cgit v1.2.3 From c7fddaf6122da489f4430f6bc2211bcb4740f416 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 25 Sep 2009 17:24:27 -0600 Subject: st/mesa: fix st_generate_mipmap() issues The main issue is we didn't always have a gallium texture object with enough space to store the to-be-generated mipmap levels. When that's the case, allocate a new gallium texture and use st_texure_finalize() to copy images from the old texture to the new one. We also had the baseLevel parameter to st_render_mipmap() wrong. --- src/mesa/state_tracker/st_gen_mipmap.c | 82 +++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index 58f69336523..f75b2348b82 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -27,6 +27,7 @@ #include "main/imports.h" +#include "main/macros.h" #include "main/mipmap.h" #include "main/teximage.h" #include "main/texformat.h" @@ -161,6 +162,43 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target, } +/** + * Compute the expected number of mipmap levels in the texture given + * the width/height/depth of the base image and the GL_TEXTURE_BASE_LEVEL/ + * GL_TEXTURE_MAX_LEVEL settings. This will tell us how many mipmap + * level should be generated. + */ +static GLuint +compute_num_levels(GLcontext *ctx, + struct gl_texture_object *texObj, + GLenum target) +{ + if (target == GL_TEXTURE_RECTANGLE_ARB) { + return 1; + } + else { + const GLuint maxLevels = texObj->MaxLevel - texObj->BaseLevel + 1; + const struct gl_texture_image *baseImage = + _mesa_get_tex_image(ctx, texObj, target, texObj->BaseLevel); + GLuint size, numLevels; + + size = MAX2(baseImage->Width2, baseImage->Height2); + size = MAX2(size, baseImage->Depth2); + + numLevels = 0; + + while (size > 0) { + numLevels++; + size >>= 1; + } + + numLevels = MIN2(numLevels, maxLevels); + + return numLevels; + } +} + + void st_generate_mipmap(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj) @@ -174,9 +212,49 @@ st_generate_mipmap(GLcontext *ctx, GLenum target, if (!pt) return; - lastLevel = pt->last_level; + /* find expected last mipmap level */ + lastLevel = compute_num_levels(ctx, texObj, target) - 1; + + if (pt->last_level < lastLevel) { + /* The current gallium texture doesn't have space for all the + * mipmap levels we need to generate. So allocate a new texture. + */ + struct st_texture_object *stObj = st_texture_object(texObj); + struct pipe_texture *oldTex = stObj->pt; + GLboolean needFlush; + + /* create new texture with space for more levels */ + stObj->pt = st_texture_create(st, + oldTex->target, + oldTex->format, + lastLevel, + oldTex->width[0], + oldTex->height[0], + oldTex->depth[0], + oldTex->tex_usage); + + /* The texture isn't in a "complete" state yet so set the expected + * lastLevel here, since it won't get done in st_finalize_texture(). + */ + stObj->lastLevel = lastLevel; + + /* This will copy the old texture's base image into the new texture + * which we just allocated. + */ + st_finalize_texture(ctx, st->pipe, texObj, &needFlush); + + /* release the old tex (will likely be freed too) */ + pipe_texture_reference(&oldTex, NULL); + + pt = stObj->pt; + } + + assert(lastLevel <= pt->last_level); - if (!st_render_mipmap(st, target, pt, baseLevel, lastLevel)) { + /* Recall that the Mesa BaseLevel image is stored in the gallium + * texture's level[0] position. So pass baseLevel=0 here. + */ + if (!st_render_mipmap(st, target, pt, 0, lastLevel)) { fallback_generate_mipmap(ctx, target, texObj); } -- cgit v1.2.3 From 05bad193f56d48384097e37e47fae3fdda85f144 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 28 Sep 2009 10:03:58 -0600 Subject: st/mesa: check gl_texture_object::GenerateMipmap field when allocating texmem In guess_and_alloc_texture() use the gl_texture_object::GenerateMipmap field as another hint as to whether to allocate space for a whole mipmap. --- src/mesa/state_tracker/st_cb_texture.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index c0fba8641b3..771a0e2bbdf 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -328,10 +328,13 @@ guess_and_alloc_texture(struct st_context *st, stObj->base.MinFilter == GL_LINEAR || stImage->base._BaseFormat == GL_DEPTH_COMPONENT || stImage->base._BaseFormat == GL_DEPTH_STENCIL_EXT) && + !stObj->base.GenerateMipmap && stImage->level == firstLevel) { + /* only alloc space for a single mipmap level */ lastLevel = firstLevel; } else { + /* alloc space for a full mipmap */ GLuint l2width = util_logbase2(width); GLuint l2height = util_logbase2(height); GLuint l2depth = util_logbase2(depth); -- cgit v1.2.3 From f0dc37870577378b51c1f8f223932a24909c5db1 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 28 Sep 2009 11:22:54 -0700 Subject: Prep for 7.6 release --- Makefile | 2 +- docs/relnotes-7.6.html | 7 +------ src/mesa/main/version.h | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/Makefile b/Makefile index b4f1934a5c2..d360ddfd8bf 100644 --- a/Makefile +++ b/Makefile @@ -182,7 +182,7 @@ ultrix-gcc: # Rules for making release tarballs -VERSION=7.6-devel +VERSION=7.6 DIRECTORY = Mesa-$(VERSION) LIB_NAME = MesaLib-$(VERSION) DEMO_NAME = MesaDemos-$(VERSION) diff --git a/docs/relnotes-7.6.html b/docs/relnotes-7.6.html index aaa36188d9d..69b035217d1 100644 --- a/docs/relnotes-7.6.html +++ b/docs/relnotes-7.6.html @@ -8,7 +8,7 @@ -

Mesa 7.6 Release Notes / date TBD

+

Mesa 7.6 Release Notes, 28 September 2009

Mesa 7.6 is a new development release. @@ -72,10 +72,5 @@ This was written by Zack Rusin at Tungsten Graphics. buffers (GLSL uniforms) - -

Changes

-
    -
- diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index d4d3dd1a94e..0ccdbf94a1b 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -32,7 +32,7 @@ #define MESA_MAJOR 7 #define MESA_MINOR 6 #define MESA_PATCH 0 -#define MESA_VERSION_STRING "7.6-devel" +#define MESA_VERSION_STRING "7.6" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3 From 8b23755ce978247a92c00e390de2e459c0a9d5ad Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 21 Sep 2009 17:13:31 -0700 Subject: intel: Remove some dead metaops code. --- src/mesa/drivers/dri/i965/brw_context.h | 4 --- src/mesa/drivers/dri/i965/brw_tex.c | 32 ------------------------ src/mesa/drivers/dri/i965/brw_vtbl.c | 2 -- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 13 ++-------- src/mesa/drivers/dri/intel/intel_context.h | 3 --- src/mesa/drivers/dri/intel/intel_pixel.c | 14 ----------- src/mesa/drivers/dri/intel/intel_pixel.h | 2 -- 7 files changed, 2 insertions(+), 68 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index a5209ac41be..fa3e32c7ff1 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -705,10 +705,6 @@ void brw_debug_batch(struct intel_context *intel); /*====================================================================== * brw_tex.c */ -void brwUpdateTextureState( struct intel_context *intel ); -void brw_FrameBufferTexInit( struct brw_context *brw, - struct intel_region *region ); -void brw_FrameBufferTexDestroy( struct brw_context *brw ); void brw_validate_textures( struct brw_context *brw ); diff --git a/src/mesa/drivers/dri/i965/brw_tex.c b/src/mesa/drivers/dri/i965/brw_tex.c index 71bff166dda..e911b105b23 100644 --- a/src/mesa/drivers/dri/i965/brw_tex.c +++ b/src/mesa/drivers/dri/i965/brw_tex.c @@ -39,38 +39,6 @@ #include "intel_tex.h" #include "brw_context.h" - -void brw_FrameBufferTexInit( struct brw_context *brw, - struct intel_region *region ) -{ - struct intel_context *intel = &brw->intel; - GLcontext *ctx = &intel->ctx; - struct gl_texture_object *obj; - struct gl_texture_image *img; - - intel->frame_buffer_texobj = obj = - ctx->Driver.NewTextureObject( ctx, (GLuint) -1, GL_TEXTURE_2D ); - - obj->MinFilter = GL_NEAREST; - obj->MagFilter = GL_NEAREST; - - img = ctx->Driver.NewTextureImage( ctx ); - - _mesa_init_teximage_fields( ctx, GL_TEXTURE_2D, img, - region->pitch, region->height, 1, 0, - region->cpp == 4 ? GL_RGBA : GL_RGB ); - - _mesa_set_tex_image( obj, GL_TEXTURE_2D, 0, img ); -} - -void brw_FrameBufferTexDestroy( struct brw_context *brw ) -{ - if (brw->intel.frame_buffer_texobj != NULL) - brw->intel.ctx.Driver.DeleteTexture( &brw->intel.ctx, - brw->intel.frame_buffer_texobj ); - brw->intel.frame_buffer_texobj = NULL; -} - /** * Finalizes all textures, completing any rendering that needs to be done * to prepare them. diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index ac117901515..124fde25fe0 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -69,8 +69,6 @@ static void brw_destroy_context( struct intel_context *intel ) _mesa_free(brw->wm.compile_data); - brw_FrameBufferTexDestroy( brw ); - for (i = 0; i < brw->state.nr_color_regions; i++) intel_region_release(&brw->state.color_regions[i]); brw->state.nr_color_regions = 0; diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 51539ac1e73..4f651170c60 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -724,17 +724,8 @@ static void prepare_wm_surfaces(struct brw_context *brw ) /* _NEW_TEXTURE, BRW_NEW_TEXDATA */ if (texUnit->_ReallyEnabled) { - if (texUnit->_Current == intel->frame_buffer_texobj) { - /* render to texture */ - dri_bo_unreference(brw->wm.surf_bo[surf]); - brw->wm.surf_bo[surf] = brw->wm.surf_bo[0]; - dri_bo_reference(brw->wm.surf_bo[surf]); - brw->wm.nr_surfaces = surf + 1; - } else { - /* regular texture */ - brw_update_texture_surface(ctx, i); - brw->wm.nr_surfaces = surf + 1; - } + brw_update_texture_surface(ctx, i); + brw->wm.nr_surfaces = surf + 1; } else { dri_bo_unreference(brw->wm.surf_bo[surf]); brw->wm.surf_bo[surf] = NULL; diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index 03e7cf39d68..c743ab1c246 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -254,9 +254,6 @@ struct intel_context intel_line_func draw_line; intel_tri_func draw_tri; - /* These refer to the current drawing buffer: - */ - struct gl_texture_object *frame_buffer_texobj; /** * Set to true if a single constant cliprect should be used in the * batchbuffer. Otherwise, cliprects must be calculated at batchbuffer diff --git a/src/mesa/drivers/dri/intel/intel_pixel.c b/src/mesa/drivers/dri/intel/intel_pixel.c index a3001416559..993e427a992 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel.c +++ b/src/mesa/drivers/dri/intel/intel_pixel.c @@ -129,20 +129,6 @@ intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one) return GL_TRUE; } - -GLboolean -intel_check_meta_tex_fragment_ops(GLcontext * ctx) -{ - if (ctx->NewState) - _mesa_update_state(ctx); - - /* Some of _ImageTransferState (scale, bias) could be done with - * fragment programs on i915. - */ - return !(ctx->_ImageTransferState || ctx->Fog.Enabled || /* not done yet */ - ctx->Texture._EnabledUnits || ctx->FragmentProgram._Enabled); -} - /* The intel_region struct doesn't really do enough to capture the * format of the pixels in the region. For now this code assumes that * the region is a display surface and hence is either ARGB8888 or diff --git a/src/mesa/drivers/dri/intel/intel_pixel.h b/src/mesa/drivers/dri/intel/intel_pixel.h index 96a6dd17b25..743b6497c52 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel.h +++ b/src/mesa/drivers/dri/intel/intel_pixel.h @@ -34,8 +34,6 @@ void intelInitPixelFuncs(struct dd_function_table *functions); GLboolean intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one); -GLboolean intel_check_meta_tex_fragment_ops(GLcontext * ctx); - GLboolean intel_check_blit_format(struct intel_region *region, GLenum format, GLenum type); -- cgit v1.2.3 From e885cb48a0b9292b3df9204f1c2783bf1fe29a28 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 28 Sep 2009 11:42:31 -0700 Subject: intel: Drop my generatemipmap code in favor of the new shared code. --- src/mesa/drivers/common/driverfuncs.c | 2 +- src/mesa/drivers/dri/i915/Makefile | 1 - src/mesa/drivers/dri/i915/intel_generatemipmap.c | 1 - src/mesa/drivers/dri/i965/Makefile | 1 - src/mesa/drivers/dri/i965/intel_generatemipmap.c | 1 - src/mesa/drivers/dri/intel/intel_generatemipmap.c | 300 ---------------------- src/mesa/drivers/dri/intel/intel_tex.c | 1 - src/mesa/drivers/dri/intel/intel_tex.h | 3 - 8 files changed, 1 insertion(+), 309 deletions(-) delete mode 120000 src/mesa/drivers/dri/i915/intel_generatemipmap.c delete mode 120000 src/mesa/drivers/dri/i965/intel_generatemipmap.c delete mode 100644 src/mesa/drivers/dri/intel/intel_generatemipmap.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index f09106b77c3..0f8447cb70f 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -106,7 +106,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->CopyTexSubImage1D = _mesa_meta_CopyTexSubImage1D; driver->CopyTexSubImage2D = _mesa_meta_CopyTexSubImage2D; driver->CopyTexSubImage3D = _mesa_meta_CopyTexSubImage3D; - driver->GenerateMipmap = _mesa_generate_mipmap; + driver->GenerateMipmap = _mesa_meta_GenerateMipmap; driver->TestProxyTexImage = _mesa_test_proxy_teximage; driver->CompressedTexImage1D = _mesa_store_compressed_teximage1d; driver->CompressedTexImage2D = _mesa_store_compressed_teximage2d; diff --git a/src/mesa/drivers/dri/i915/Makefile b/src/mesa/drivers/dri/i915/Makefile index 9d049dea8fe..393312e7328 100644 --- a/src/mesa/drivers/dri/i915/Makefile +++ b/src/mesa/drivers/dri/i915/Makefile @@ -19,7 +19,6 @@ DRIVER_SOURCES = \ intel_batchbuffer.c \ intel_clear.c \ intel_extensions.c \ - intel_generatemipmap.c \ intel_mipmap_tree.c \ intel_tex_layout.c \ intel_tex_image.c \ diff --git a/src/mesa/drivers/dri/i915/intel_generatemipmap.c b/src/mesa/drivers/dri/i915/intel_generatemipmap.c deleted file mode 120000 index 4c6b37ada01..00000000000 --- a/src/mesa/drivers/dri/i915/intel_generatemipmap.c +++ /dev/null @@ -1 +0,0 @@ -../intel/intel_generatemipmap.c \ No newline at end of file diff --git a/src/mesa/drivers/dri/i965/Makefile b/src/mesa/drivers/dri/i965/Makefile index 6e9a9a29a39..57dcc915869 100644 --- a/src/mesa/drivers/dri/i965/Makefile +++ b/src/mesa/drivers/dri/i965/Makefile @@ -14,7 +14,6 @@ DRIVER_SOURCES = \ intel_decode.c \ intel_extensions.c \ intel_fbo.c \ - intel_generatemipmap.c \ intel_mipmap_tree.c \ intel_regions.c \ intel_screen.c \ diff --git a/src/mesa/drivers/dri/i965/intel_generatemipmap.c b/src/mesa/drivers/dri/i965/intel_generatemipmap.c deleted file mode 120000 index 4c6b37ada01..00000000000 --- a/src/mesa/drivers/dri/i965/intel_generatemipmap.c +++ /dev/null @@ -1 +0,0 @@ -../intel/intel_generatemipmap.c \ No newline at end of file diff --git a/src/mesa/drivers/dri/intel/intel_generatemipmap.c b/src/mesa/drivers/dri/intel/intel_generatemipmap.c deleted file mode 100644 index 5958b36c971..00000000000 --- a/src/mesa/drivers/dri/intel/intel_generatemipmap.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - * Copyright © 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Authors: - * Eric Anholt - * - */ - -#include "main/glheader.h" -#include "main/enums.h" -#include "main/image.h" -#include "main/mtypes.h" -#include "main/macros.h" -#include "main/bufferobj.h" -#include "main/teximage.h" -#include "main/texenv.h" -#include "main/texobj.h" -#include "main/texstate.h" -#include "main/texparam.h" -#include "main/varray.h" -#include "main/attrib.h" -#include "main/enable.h" -#include "main/buffers.h" -#include "main/fbobject.h" -#include "main/framebuffer.h" -#include "main/renderbuffer.h" -#include "main/depth.h" -#include "main/hash.h" -#include "main/mipmap.h" -#include "main/blend.h" -#include "glapi/dispatch.h" -#include "swrast/swrast.h" - -#include "intel_screen.h" -#include "intel_context.h" -#include "intel_batchbuffer.h" -#include "intel_pixel.h" -#include "intel_tex.h" -#include "intel_mipmap_tree.h" - -static const char *intel_fp_tex2d = - "!!ARBfp1.0\n" - "TEX result.color, fragment.texcoord[0], texture[0], 2D;\n" - "END\n"; - -static GLboolean -intel_generate_mipmap_level(GLcontext *ctx, GLuint tex_name, - int level, int width, int height) -{ - struct intel_context *intel = intel_context(ctx); - GLfloat vertices[4][2]; - GLint status; - - /* Set to source from the previous level */ - _mesa_TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, level - 1); - _mesa_TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, level - 1); - - /* Set to draw into the current level */ - _mesa_FramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, - tex_name, - level); - /* Choose to render to the color attachment. */ - _mesa_DrawBuffer(GL_COLOR_ATTACHMENT0_EXT); - - status = _mesa_CheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) - return GL_FALSE; - - meta_set_passthrough_transform(&intel->meta); - - /* XXX: Doing it right would involve setting up the transformation to do - * 0-1 mapping or something, and not changing the vertex data. - */ - vertices[0][0] = 0; - vertices[0][1] = 0; - vertices[1][0] = width; - vertices[1][1] = 0; - vertices[2][0] = width; - vertices[2][1] = height; - vertices[3][0] = 0; - vertices[3][1] = height; - - _mesa_VertexPointer(2, GL_FLOAT, 2 * sizeof(GLfloat), &vertices); - _mesa_Enable(GL_VERTEX_ARRAY); - meta_set_default_texrect(&intel->meta); - - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - meta_restore_texcoords(&intel->meta); - meta_restore_transform(&intel->meta); - - return GL_TRUE; -} - -static GLboolean -intel_generate_mipmap_2d(GLcontext *ctx, - GLenum target, - struct gl_texture_object *texObj) -{ - struct intel_context *intel = intel_context(ctx); - GLint old_active_texture; - int level, max_levels, start_level, end_level; - GLuint fb_name; - GLboolean success = GL_FALSE; - struct gl_framebuffer *saved_fbo = NULL; - struct gl_buffer_object *saved_array_buffer = NULL; - struct gl_buffer_object *saved_element_buffer = NULL; - - _mesa_PushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | - GL_CURRENT_BIT | GL_COLOR_BUFFER_BIT | - GL_DEPTH_BUFFER_BIT); - _mesa_PushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT); - old_active_texture = ctx->Texture.CurrentUnit; - _mesa_reference_framebuffer(&saved_fbo, ctx->DrawBuffer); - - /* use default array/index buffers */ - _mesa_reference_buffer_object(ctx, &saved_array_buffer, - ctx->Array.ArrayBufferObj); - _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, - ctx->Shared->NullBufferObj); - _mesa_reference_buffer_object(ctx, &saved_element_buffer, - ctx->Array.ElementArrayBufferObj); - _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, - ctx->Shared->NullBufferObj); - - _mesa_Disable(GL_POLYGON_STIPPLE); - _mesa_Disable(GL_DEPTH_TEST); - _mesa_Disable(GL_STENCIL_TEST); - _mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - _mesa_DepthMask(GL_FALSE); - - /* Bind the given texture to GL_TEXTURE_2D with linear filtering for our - * minification. - */ - _mesa_ActiveTextureARB(GL_TEXTURE0_ARB); - _mesa_Enable(GL_TEXTURE_2D); - _mesa_BindTexture(GL_TEXTURE_2D, texObj->Name); - _mesa_TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, - GL_LINEAR_MIPMAP_NEAREST); - _mesa_TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - - /* Bind the new renderbuffer to the color attachment point. */ - _mesa_GenFramebuffersEXT(1, &fb_name); - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb_name); - - meta_set_fragment_program(&intel->meta, &intel->meta.tex2d_fp, - intel_fp_tex2d); - meta_set_passthrough_vertex_program(&intel->meta); - - max_levels = _mesa_max_texture_levels(ctx, texObj->Target); - start_level = texObj->BaseLevel; - end_level = texObj->MaxLevel; - - /* Loop generating level+1 from level. */ - for (level = start_level; level < end_level && level < max_levels - 1; level++) { - const struct gl_texture_image *srcImage; - int width, height; - - srcImage = _mesa_select_tex_image(ctx, texObj, target, level); - if (srcImage->Border != 0) - goto fail; - - width = srcImage->Width / 2; - if (width < 1) - width = 1; - height = srcImage->Height / 2; - if (height < 1) - height = 1; - - if (width == srcImage->Width && - height == srcImage->Height) { - /* Neither _mesa_max_texture_levels nor texObj->MaxLevel are the - * maximum texture level for the object, so break out when we've gone - * over the edge. - */ - break; - } - - /* Make sure that there's space allocated for the target level. - * We could skip this if there's already space allocated and save some - * time. - */ - _mesa_TexImage2D(GL_TEXTURE_2D, level + 1, srcImage->InternalFormat, - width, height, 0, - GL_RGBA, GL_UNSIGNED_INT, NULL); - - if (!intel_generate_mipmap_level(ctx, texObj->Name, level + 1, - width, height)) - goto fail; - } - - success = GL_TRUE; - -fail: - meta_restore_fragment_program(&intel->meta); - meta_restore_vertex_program(&intel->meta); - - /* restore array/index buffers */ - _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, - saved_array_buffer); - _mesa_reference_buffer_object(ctx, &saved_array_buffer, NULL); - _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, - saved_element_buffer); - _mesa_reference_buffer_object(ctx, &saved_element_buffer, NULL); - - - _mesa_DeleteFramebuffersEXT(1, &fb_name); - _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + old_active_texture); - if (saved_fbo) - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, saved_fbo->Name); - _mesa_reference_framebuffer(&saved_fbo, NULL); - _mesa_PopClientAttrib(); - _mesa_PopAttrib(); - - return success; -} - - -/** - * Generate new mipmap data from BASE+1 to BASE+p (the minimally-sized mipmap - * level). - * - * The texture object's miptree must be mapped. - * - * This function should also include an accelerated path. - */ -void -intel_generate_mipmap(GLcontext *ctx, GLenum target, - struct gl_texture_object *texObj) -{ - struct intel_context *intel = intel_context(ctx); - struct intel_texture_object *intelObj = intel_texture_object(texObj); - GLuint nr_faces = (intelObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1; - int face, i; - - /* HW path */ - if (target == GL_TEXTURE_2D && - ctx->Extensions.EXT_framebuffer_object && - ctx->Extensions.ARB_fragment_program && - ctx->Extensions.ARB_vertex_program) { - GLboolean success; - - /* We'll be accessing this texture using GL entrypoints, which should - * be resilient against other access to this texture. - */ - _mesa_unlock_texture(ctx, texObj); - success = intel_generate_mipmap_2d(ctx, target, texObj); - _mesa_lock_texture(ctx, texObj); - - if (success) - return; - } - - /* SW path */ - intel_tex_map_level_images(intel, intelObj, texObj->BaseLevel); - _mesa_generate_mipmap(ctx, target, texObj); - intel_tex_unmap_level_images(intel, intelObj, texObj->BaseLevel); - - /* Update the level information in our private data in the new images, since - * it didn't get set as part of a normal TexImage path. - */ - for (face = 0; face < nr_faces; face++) { - for (i = texObj->BaseLevel + 1; i < texObj->MaxLevel; i++) { - struct intel_texture_image *intelImage; - - intelImage = intel_texture_image(texObj->Image[face][i]); - if (intelImage == NULL) - break; - - intelImage->level = i; - intelImage->face = face; - /* Unreference the miptree to signal that the new Data is a bare - * pointer from mesa. - */ - intel_miptree_release(intel, &intelImage->mt); - } - } -} diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index df63f29a42c..f5d877edc36 100644 --- a/src/mesa/drivers/dri/intel/intel_tex.c +++ b/src/mesa/drivers/dri/intel/intel_tex.c @@ -162,7 +162,6 @@ void intelInitTextureFuncs(struct dd_function_table *functions) { functions->ChooseTextureFormat = intelChooseTextureFormat; - functions->GenerateMipmap = intel_generate_mipmap; functions->NewTextureObject = intelNewTextureObject; functions->NewTextureImage = intelNewTextureImage; diff --git a/src/mesa/drivers/dri/intel/intel_tex.h b/src/mesa/drivers/dri/intel/intel_tex.h index 471aa2a240b..57ed0b1aabd 100644 --- a/src/mesa/drivers/dri/intel/intel_tex.h +++ b/src/mesa/drivers/dri/intel/intel_tex.h @@ -71,7 +71,4 @@ void intel_tex_unmap_images(struct intel_context *intel, int intel_compressed_num_bytes(GLuint mesaFormat); -void intel_generate_mipmap(GLcontext *ctx, GLenum target, - struct gl_texture_object *texObj); - #endif -- cgit v1.2.3 From d492e7b017178c03b4979cf4ff266162d83c4f37 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 28 Sep 2009 14:03:40 -0700 Subject: meta: Fix invalid PBO access from DrawPixels when trying to just alloc. This whole reuse of buffers (TexSubImage instead of TexImage, SubData instead of Data) is bad for hardware drivers, but it's even worse when we accidentally try to access the 2x2 PBO to fill the new 16x16 texture we're creating, producing GL errors. Fixes piglit pbo-drawpixels. Bug #14163. --- src/mesa/drivers/common/meta.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index b445323aabe..a152087a3aa 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -974,7 +974,8 @@ setup_copypix_texture(struct temp_texture *tex, * Setup/load texture for glDrawPixels. */ static void -setup_drawpix_texture(struct temp_texture *tex, +setup_drawpix_texture(GLcontext *ctx, + struct temp_texture *tex, GLboolean newTex, GLenum texIntFormat, GLsizei width, GLsizei height, @@ -995,9 +996,17 @@ setup_drawpix_texture(struct temp_texture *tex, tex->Width, tex->Height, 0, format, type, pixels); } else { + struct gl_buffer_object *save_unpack_obj = NULL; + + _mesa_reference_buffer_object(ctx, &save_unpack_obj, + ctx->Unpack.BufferObj); + _mesa_BindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0); /* create empty texture */ _mesa_TexImage2D(tex->Target, 0, tex->IntFormat, tex->Width, tex->Height, 0, format, type, NULL); + if (save_unpack_obj != NULL) + _mesa_BindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, + save_unpack_obj->Name); /* load image */ _mesa_TexSubImage2D(tex->Target, 0, 0, 0, width, height, format, type, pixels); @@ -1162,7 +1171,7 @@ _mesa_meta_BlitFramebuffer(GLcontext *ctx, _mesa_ReadPixels(srcX, srcY, srcW, srcH, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, tmp); - setup_drawpix_texture(tex, newTex, GL_DEPTH_COMPONENT, srcW, srcH, + setup_drawpix_texture(ctx, tex, newTex, GL_DEPTH_COMPONENT, srcW, srcH, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, tmp); _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, blit->DepthFP); @@ -1725,7 +1734,7 @@ _mesa_meta_DrawPixels(GLcontext *ctx, if (!drawpix->StencilFP) init_draw_stencil_pixels(ctx); - setup_drawpix_texture(tex, newTex, texIntFormat, width, height, + setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height, GL_ALPHA, type, pixels); _mesa_ColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); @@ -1768,14 +1777,14 @@ _mesa_meta_DrawPixels(GLcontext *ctx, _mesa_ProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 0, ctx->Current.RasterColor); - setup_drawpix_texture(tex, newTex, texIntFormat, width, height, + setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height, format, type, pixels); _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); } else { /* Drawing RGBA */ - setup_drawpix_texture(tex, newTex, texIntFormat, width, height, + setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height, format, type, pixels); _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); } @@ -1923,7 +1932,7 @@ _mesa_meta_Bitmap(GLcontext *ctx, _mesa_set_enable(ctx, GL_ALPHA_TEST, GL_TRUE); _mesa_AlphaFunc(GL_GREATER, 0.0); - setup_drawpix_texture(tex, newTex, texIntFormat, width, height, + setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, bitmap8); _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); -- cgit v1.2.3 From a230ad2bc440e9d332482ea453e7ab7f4a5b8bd2 Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Tue, 29 Sep 2009 09:46:29 +0300 Subject: r600: clear position enable bit when when wpos is not used by FP Makes doom3 alot nicer.. --- src/mesa/drivers/dri/r600/r700_fragprog.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c index 78ce3ae4366..62a1ea1a22a 100644 --- a/src/mesa/drivers/dri/r600/r700_fragprog.c +++ b/src/mesa/drivers/dri/r600/r700_fragprog.c @@ -341,6 +341,11 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx) SETbit(r700->SPI_PS_IN_CONTROL_0.u32All, POSITION_ENA_bit); SETbit(r700->SPI_INPUT_Z.u32All, PROVIDE_Z_TO_SPI_bit); } + else + { + CLEARbit(r700->SPI_PS_IN_CONTROL_0.u32All, POSITION_ENA_bit); + CLEARbit(r700->SPI_INPUT_Z.u32All, PROVIDE_Z_TO_SPI_bit); + } ui = (unNumOfReg < ui) ? ui : unNumOfReg; -- cgit v1.2.3 From 7c5f3c3d8a63b0feee154092153e958fa4f24abd Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Mon, 28 Sep 2009 10:42:35 +0300 Subject: r600: user correct alpha blend factor Signed-off-by: Dave Airlie --- src/mesa/drivers/dri/r600/r700_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index fbff109455d..3ad6d74f536 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -493,10 +493,10 @@ static void r700SetBlendState(GLcontext * ctx) eqn, COLOR_COMB_FCN_shift, COLOR_COMB_FCN_mask); SETfield(blend_reg, - blend_factor(ctx->Color.BlendSrcRGB, GL_TRUE), + blend_factor(ctx->Color.BlendSrcA, GL_TRUE), ALPHA_SRCBLEND_shift, ALPHA_SRCBLEND_mask); SETfield(blend_reg, - blend_factor(ctx->Color.BlendDstRGB, GL_FALSE), + blend_factor(ctx->Color.BlendDstA, GL_FALSE), ALPHA_DESTBLEND_shift, ALPHA_DESTBLEND_mask); switch (ctx->Color.BlendEquationA) { -- cgit v1.2.3 From ac9c8b6359be770f1ed3e97100c497bd91338874 Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Mon, 28 Sep 2009 11:23:49 +0300 Subject: r600: use CB_TARGET_MASK instead of CB_SHADER_MASK for setting color mask makes blend functions work better Signed-off-by: Dave Airlie --- src/mesa/drivers/dri/r600/r700_state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index 3ad6d74f536..7e8b48f91eb 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -771,9 +771,9 @@ static void r700ColorMask(GLcontext * ctx, (b ? 4 : 0) | (a ? 8 : 0)); - if (mask != r700->CB_SHADER_MASK.u32All) { + if (mask != r700->CB_TARGET_MASK.u32All) { R600_STATECHANGE(context, cb); - SETfield(r700->CB_SHADER_MASK.u32All, mask, OUTPUT0_ENABLE_shift, OUTPUT0_ENABLE_mask); + SETfield(r700->CB_TARGET_MASK.u32All, mask, TARGET0_ENABLE_shift, TARGET0_ENABLE_mask); } } @@ -1780,7 +1780,7 @@ void r700InitState(GLcontext * ctx) //------------------- r700->CB_CLRCMP_MSK.u32All = 0xFFFFFFFF; /* screen/window/view */ - SETfield(r700->CB_TARGET_MASK.u32All, 0xF, (4 * id), TARGET0_ENABLE_mask); + SETfield(r700->CB_SHADER_MASK.u32All, 0xF, (4 * id), OUTPUT0_ENABLE_mask); context->radeon.hw.all_dirty = GL_TRUE; -- cgit v1.2.3 From 9b5541617fd16d4b1de474a766717edf72112d21 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Sep 2009 09:32:37 -0600 Subject: mesa: work-around glXCopyContext() bug in _mesa_copy_texture_state() See bug 24217. --- src/mesa/main/texstate.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 861c5f37c4e..8292d43eb6f 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -99,16 +99,22 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ) dst->Texture.Unit[u].BumpTarget = src->Texture.Unit[u].BumpTarget; COPY_4V(dst->Texture.Unit[u].RotMatrix, src->Texture.Unit[u].RotMatrix); + /* + * XXX strictly speaking, we should compare texture names/ids and + * bind textures in the dest context according to id. For now, only + * copy bindings if the contexts share the same pool of textures to + * avoid refcounting bugs. + */ + if (dst->Shared == src->Shared) { + /* copy texture object bindings, not contents of texture objects */ + _mesa_lock_context_textures(dst); - /* copy texture object bindings, not contents of texture objects */ - _mesa_lock_context_textures(dst); - - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_reference_texobj(&dst->Texture.Unit[u].CurrentTex[tex], - src->Texture.Unit[u].CurrentTex[tex]); + for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { + _mesa_reference_texobj(&dst->Texture.Unit[u].CurrentTex[tex], + src->Texture.Unit[u].CurrentTex[tex]); + } + _mesa_unlock_context_textures(dst); } - - _mesa_unlock_context_textures(dst); } } -- cgit v1.2.3 From 69a3043f4109463f35e87102e509e0a4599cd09a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Sep 2009 09:36:06 -0600 Subject: mesa: bump version to 7.6.1 --- Makefile | 2 +- configs/default | 2 +- src/mesa/main/version.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesa') diff --git a/Makefile b/Makefile index d360ddfd8bf..d25c55c1501 100644 --- a/Makefile +++ b/Makefile @@ -182,7 +182,7 @@ ultrix-gcc: # Rules for making release tarballs -VERSION=7.6 +VERSION=7.6.1 DIRECTORY = Mesa-$(VERSION) LIB_NAME = MesaLib-$(VERSION) DEMO_NAME = MesaDemos-$(VERSION) diff --git a/configs/default b/configs/default index 2168b29e3e8..0bdc4c86b88 100644 --- a/configs/default +++ b/configs/default @@ -10,7 +10,7 @@ CONFIG_NAME = default # Version info MESA_MAJOR=7 MESA_MINOR=6 -MESA_TINY=0 +MESA_TINY=1 MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) # external projects. This should be useless now that we use libdrm. diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index 0ccdbf94a1b..f24e11cc513 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.6 + * Version: 7.6.1 * * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * Copyright (C) 2009 VMware, Inc. All Rights Reserved. @@ -31,8 +31,8 @@ /* Mesa version */ #define MESA_MAJOR 7 #define MESA_MINOR 6 -#define MESA_PATCH 0 -#define MESA_VERSION_STRING "7.6" +#define MESA_PATCH 1 +#define MESA_VERSION_STRING "7.6.1-devel" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3 From c7aee65bb96df3f8e8421b5125dca84c028e9073 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 28 Sep 2009 15:26:12 -0600 Subject: mesa: added _mesa_nop_vertex/fragment_program() For debug/test purposes. --- src/mesa/shader/programopt.c | 91 ++++++++++++++++++++++++++++++++++++++++++++ src/mesa/shader/programopt.h | 7 ++++ 2 files changed, 98 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c index f70c75cec8e..3b8529592dd 100644 --- a/src/mesa/shader/programopt.c +++ b/src/mesa/shader/programopt.c @@ -573,3 +573,94 @@ _mesa_remove_output_reads(struct gl_program *prog, gl_register_file type) } } } + + +/** + * Make the given fragment program into a "no-op" shader. + * Actually, just copy the incoming fragment color (or texcoord) + * to the output color. + * This is for debug/test purposes. + */ +void +_mesa_nop_fragment_program(GLcontext *ctx, struct gl_fragment_program *prog) +{ + struct prog_instruction *inst; + GLuint inputAttr; + + inst = _mesa_alloc_instructions(2); + if (!inst) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "_mesa_nop_fragment_program"); + return; + } + + _mesa_init_instructions(inst, 2); + + inst[0].Opcode = OPCODE_MOV; + inst[0].DstReg.File = PROGRAM_OUTPUT; + inst[0].DstReg.Index = FRAG_RESULT_COLOR; + inst[0].SrcReg[0].File = PROGRAM_INPUT; + if (prog->Base.InputsRead & FRAG_BIT_COL0) + inputAttr = FRAG_ATTRIB_COL0; + else + inputAttr = FRAG_ATTRIB_TEX0; + inst[0].SrcReg[0].Index = inputAttr; + + inst[1].Opcode = OPCODE_END; + + _mesa_free_instructions(prog->Base.Instructions, + prog->Base.NumInstructions); + + prog->Base.Instructions = inst; + prog->Base.NumInstructions = 2; + prog->Base.InputsRead = 1 << inputAttr; + prog->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR; +} + + +/** + * \sa _mesa_nop_fragment_program + * Replace the given vertex program with a "no-op" program that just + * transforms vertex position and emits color. + */ +void +_mesa_nop_vertex_program(GLcontext *ctx, struct gl_vertex_program *prog) +{ + struct prog_instruction *inst; + GLuint inputAttr; + + /* + * Start with a simple vertex program that emits color. + */ + inst = _mesa_alloc_instructions(2); + if (!inst) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "_mesa_nop_vertex_program"); + return; + } + + _mesa_init_instructions(inst, 2); + + inst[0].Opcode = OPCODE_MOV; + inst[0].DstReg.File = PROGRAM_OUTPUT; + inst[0].DstReg.Index = VERT_RESULT_COL0; + inst[0].SrcReg[0].File = PROGRAM_INPUT; + if (prog->Base.InputsRead & VERT_BIT_COLOR0) + inputAttr = VERT_ATTRIB_COLOR0; + else + inputAttr = VERT_ATTRIB_TEX0; + inst[0].SrcReg[0].Index = inputAttr; + + inst[1].Opcode = OPCODE_END; + + _mesa_free_instructions(prog->Base.Instructions, + prog->Base.NumInstructions); + + prog->Base.Instructions = inst; + prog->Base.NumInstructions = 2; + prog->Base.InputsRead = 1 << inputAttr; + prog->Base.OutputsWritten = 1 << VERT_RESULT_COL0; + + /* + * Now insert code to do standard modelview/projection transformation. + */ + _mesa_insert_mvp_code(ctx, prog); +} diff --git a/src/mesa/shader/programopt.h b/src/mesa/shader/programopt.h index 96acaf9566c..21fac07849a 100644 --- a/src/mesa/shader/programopt.h +++ b/src/mesa/shader/programopt.h @@ -42,4 +42,11 @@ _mesa_count_texture_instructions(struct gl_program *prog); extern void _mesa_remove_output_reads(struct gl_program *prog, gl_register_file type); +extern void +_mesa_nop_fragment_program(GLcontext *ctx, struct gl_fragment_program *prog); + +extern void +_mesa_nop_vertex_program(GLcontext *ctx, struct gl_vertex_program *prog); + + #endif /* PROGRAMOPT_H */ -- cgit v1.2.3 From cb0de06301cd086a02ca709917819119dc1a8fd9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Sep 2009 10:22:32 -0600 Subject: mesa: added nopfrag/nopvert options for MESA_GLSL These options can be used to force vertex/fragment shaders to be no-op shaders (actually, simple pass-through shaders). For debug/test purposes. --- src/mesa/main/mtypes.h | 2 ++ src/mesa/shader/shader_api.c | 4 ++++ src/mesa/shader/slang/slang_compile.c | 10 ++++++++++ 3 files changed, 16 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index d7bf7689f3c..d0050646454 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2066,6 +2066,8 @@ struct gl_shader_program #define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */ #define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */ #define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */ +#define GLSL_NOP_VERT 0x20 /**< Force no-op vertex shaders */ +#define GLSL_NOP_FRAG 0x40 /**< Force no-op fragment shaders */ /** diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 178b7d0dbaf..6b19b4c46b3 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -380,6 +380,10 @@ get_shader_flags(void) flags |= GLSL_DUMP; if (_mesa_strstr(env, "log")) flags |= GLSL_LOG; + if (_mesa_strstr(env, "nopvert")) + flags |= GLSL_NOP_VERT; + if (_mesa_strstr(env, "nopfrag")) + flags |= GLSL_NOP_FRAG; if (_mesa_strstr(env, "nopt")) flags |= GLSL_NO_OPT; else if (_mesa_strstr(env, "opt")) diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index c1b97c7cb70..a2708884437 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2814,6 +2814,16 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) (ctx->Shader.Flags & GLSL_NO_OPT) == 0) { _mesa_optimize_program(ctx, shader->Program); } + if ((ctx->Shader.Flags & GLSL_NOP_VERT) && + shader->Program->Target == GL_VERTEX_PROGRAM_ARB) { + _mesa_nop_vertex_program(ctx, + (struct gl_vertex_program *) shader->Program); + } + if ((ctx->Shader.Flags & GLSL_NOP_FRAG) && + shader->Program->Target == GL_FRAGMENT_PROGRAM_ARB) { + _mesa_nop_fragment_program(ctx, + (struct gl_fragment_program *) shader->Program); + } } if (ctx->Shader.Flags & GLSL_LOG) { -- cgit v1.2.3 From 86ee448047e4f7be722b69da5296ccafc2307145 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Sep 2009 12:16:12 -0600 Subject: mesa/xlib: fix GLX_RENDER_TYPE query Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE. --- src/mesa/drivers/x11/fakeglx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 34e0b8bc8d7..eb7c4f6417c 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -2477,9 +2477,9 @@ Fake_glXQueryContext( Display *dpy, GLXContext ctx, int attribute, int *value ) break; case GLX_RENDER_TYPE: if (xmctx->xm_visual->mesa_visual.rgbMode) - *value = GLX_RGBA_BIT; + *value = GLX_RGBA_TYPE; else - *value = GLX_COLOR_INDEX_BIT; + *value = GLX_COLOR_INDEX_TYPE; break; case GLX_SCREEN: *value = 0; -- cgit v1.2.3 From 3c794e45b02c66ce3f52fe359f733e4d7d2ce315 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Sep 2009 18:51:49 -0600 Subject: glsl: add support for CMP instruction --- src/mesa/shader/slang/slang_codegen.c | 1 + src/mesa/shader/slang/slang_emit.c | 1 + src/mesa/shader/slang/slang_ir.c | 1 + src/mesa/shader/slang/slang_ir.h | 1 + 4 files changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 703af9f8740..344dfdc6804 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -422,6 +422,7 @@ static slang_asm_info AsmInfo[] = { { "vec4_lrp", IR_LRP, 1, 3 }, { "vec4_min", IR_MIN, 1, 2 }, { "vec4_max", IR_MAX, 1, 2 }, + { "vec4_cmp", IR_CMP, 1, 3 }, { "vec4_clamp", IR_CLAMP, 1, 3 }, { "vec4_seq", IR_SEQUAL, 1, 2 }, { "vec4_sne", IR_SNEQUAL, 1, 2 }, diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 3f455e0640b..3af301eacdf 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -2287,6 +2287,7 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) case IR_POW: /* trinary operators */ case IR_LRP: + case IR_CMP: return emit_arith(emitInfo, n); case IR_EQUAL: diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index 1c7f7474e71..62603503dd9 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -80,6 +80,7 @@ static const slang_ir_info IrInfo[] = { { IR_NOISE4, "IR_NOISE4", OPCODE_NOISE4, 1, 1 }, /* other */ + { IR_CMP, "IR_CMP", OPCODE_CMP, 4, 3 }, /* compare/select */ { IR_SEQ, "IR_SEQ", OPCODE_NOP, 0, 0 }, { IR_SCOPE, "IR_SCOPE", OPCODE_NOP, 0, 0 }, { IR_LABEL, "IR_LABEL", OPCODE_NOP, 0, 0 }, diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index e796693ed58..166b4e80436 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -91,6 +91,7 @@ typedef enum IR_CLAMP, IR_MIN, IR_MAX, + IR_CMP, /* = (op0 < 0) ? op1 : op2 */ IR_SEQUAL, /* Set if args are equal (vector) */ IR_SNEQUAL, /* Set if args are not equal (vector) */ IR_SGE, /* Set if greater or equal (vector) */ -- cgit v1.2.3 From 65765c9f2c5d3568608bde57db0bf44d6b724755 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Sep 2009 18:57:13 -0600 Subject: glsl: rewrite sqrt(x) intrinsic to handle x=0 Since sqrt() is basically implemented in terms of RSQ/RCP we'll do a divide by zero if x=0 and wind up with unpredictable results. Now use CMP instruction to test for x<=0 and return zero in that case. --- .../shader/slang/library/slang_common_builtin.gc | 76 ++++++++++++---------- 1 file changed, 42 insertions(+), 34 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc index 9764fc25b09..56de47ee8d7 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -602,42 +602,50 @@ vec4 exp2(const vec4 a) float sqrt(const float x) { + const float nx = -x; float r; __asm float_rsq r, x; - __asm float_rcp __retVal, r; -} - -vec2 sqrt(const vec2 v) -{ - float r; - __asm float_rsq r, v.x; - __asm float_rcp __retVal.x, r; - __asm float_rsq r, v.y; - __asm float_rcp __retVal.y, r; -} - -vec3 sqrt(const vec3 v) -{ - float r; - __asm float_rsq r, v.x; - __asm float_rcp __retVal.x, r; - __asm float_rsq r, v.y; - __asm float_rcp __retVal.y, r; - __asm float_rsq r, v.z; - __asm float_rcp __retVal.z, r; -} - -vec4 sqrt(const vec4 v) -{ - float r; - __asm float_rsq r, v.x; - __asm float_rcp __retVal.x, r; - __asm float_rsq r, v.y; - __asm float_rcp __retVal.y, r; - __asm float_rsq r, v.z; - __asm float_rcp __retVal.z, r; - __asm float_rsq r, v.w; - __asm float_rcp __retVal.w, r; + __asm float_rcp r, r; + __asm vec4_cmp __retVal, nx, r, 0.0; +} + +vec2 sqrt(const vec2 x) +{ + const vec2 nx = -x, zero = vec2(0.0); + vec2 r; + __asm float_rsq r.x, x.x; + __asm float_rsq r.y, x.y; + __asm float_rcp r.x, r.x; + __asm float_rcp r.y, r.y; + __asm vec4_cmp __retVal, nx, r, zero; +} + +vec3 sqrt(const vec3 x) +{ + const vec3 nx = -x, zero = vec3(0.0); + vec3 r; + __asm float_rsq r.x, x.x; + __asm float_rsq r.y, x.y; + __asm float_rsq r.z, x.z; + __asm float_rcp r.x, r.x; + __asm float_rcp r.y, r.y; + __asm float_rcp r.z, r.z; + __asm vec4_cmp __retVal, nx, r, zero; +} + +vec4 sqrt(const vec4 x) +{ + const vec4 nx = -x, zero = vec4(0.0); + vec4 r; + __asm float_rsq r.x, x.x; + __asm float_rsq r.y, x.y; + __asm float_rsq r.z, x.z; + __asm float_rsq r.w, x.w; + __asm float_rcp r.x, r.x; + __asm float_rcp r.y, r.y; + __asm float_rcp r.z, r.z; + __asm float_rcp r.w, r.w; + __asm vec4_cmp __retVal, nx, r, zero; } -- cgit v1.2.3 From 322bc403bc7aacb58c39527f5f7a324e0c63c73d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Sep 2009 18:59:37 -0600 Subject: glsl: regenerated file --- .../shader/slang/library/slang_common_builtin_gc.h | 106 +++++++++++---------- 1 file changed, 57 insertions(+), 49 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h index 78a7b83ec18..3c3666e4ea2 100644 --- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h @@ -307,55 +307,63 @@ 0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0, 59,122,0,0,18,97,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86, 97,108,0,59,119,0,0,18,97,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,115,113,114,116,0,1,1,0,0,9,0,120,0,0, -0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,0,18,114,0,0,0,0,1,90,95,0,0, -10,0,0,115,113,114,116,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,4,102,108,111,97, -116,95,114,115,113,0,18,114,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95, -95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0, -0,18,118,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, -121,0,0,18,114,0,0,0,0,1,90,95,0,0,11,0,0,115,113,114,116,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0, -9,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,120,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0,0,4,102,108,111, -97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114, -0,0,18,118,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, -122,0,0,18,114,0,0,0,0,1,90,95,0,0,12,0,0,115,113,114,116,0,1,1,0,0,12,0,118,0,0,0,1,3,2,90,95,0,0, -9,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,120,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,0,0,0,4,102,108,111, -97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114, -0,0,18,118,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, -122,0,0,18,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,118,0,59,119,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,0,0,0,0,1,90,95, -0,0,9,0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,9,0,120,0,0,0,1,4,102,108,111,97, -116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0, -105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,10,0,118,0,0,0,1,4,102,108,111,97,116,95,114, -115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,0,1,90,95,0,0, -11,0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,11,0,118,0,0,0,1,4,102,108,111,97,116, -95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111, -97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102, -108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0, -0,1,90,95,0,0,12,0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,12,0,118,0,0,0,1,4,102, -108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0, -4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121, -0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0, -59,122,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18, -118,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,9,0,120,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,17,49,0,48,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,114,109,97, -108,105,122,101,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,115,0,2,58,105,110,118,101,114,115, -101,115,113,114,116,0,0,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,115,0, -0,0,0,1,90,95,0,0,11,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0, -0,9,0,1,116,109,112,0,0,0,4,118,101,99,51,95,100,111,116,0,18,116,109,112,0,0,18,118,0,0,18,118,0, -0,0,4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0,4,118,101,99,52, -95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0, -0,18,116,109,112,0,0,0,0,1,90,95,0,0,12,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,12,0,118, -0,0,0,1,3,2,90,95,0,0,9,0,1,116,109,112,0,0,0,4,118,101,99,52,95,100,111,116,0,18,116,109,112,0,0, -18,118,0,0,18,118,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0, -0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,118,0,0,18,116,109,112,0,0,0,0,1,90,95,0,0,9,0,0,97,98,115,0,1,1,0,0,9,0,97,0,0,0,1, -4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0, +0,1,3,2,90,95,1,0,9,0,1,110,120,0,2,18,120,0,54,0,0,3,2,90,95,0,0,9,0,1,114,0,0,0,4,102,108,111,97, +116,95,114,115,113,0,18,114,0,0,18,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,0,18, +114,0,0,0,4,118,101,99,52,95,99,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114, +0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,10,0,0,115,113,114,116,0,1,1,0,0,10,0,120,0,0,0,1,3,2,90,95,1, +0,10,0,1,110,120,0,2,18,120,0,54,0,1,1,122,101,114,111,0,2,58,118,101,99,50,0,0,17,48,0,48,0,0,0,0, +0,0,3,2,90,95,0,0,10,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18, +120,0,59,120,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0, +4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0,18,114,0,59,120,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0,0,4,118,101,99,52,95,99,109,112,0,18, +95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,0,0,0,1,90,95,0,0, +11,0,0,115,113,114,116,0,1,1,0,0,11,0,120,0,0,0,1,3,2,90,95,1,0,11,0,1,110,120,0,2,18,120,0,54,0,1, +1,122,101,114,111,0,2,58,118,101,99,51,0,0,17,48,0,48,0,0,0,0,0,0,3,2,90,95,0,0,11,0,1,114,0,0,0,4, +102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,120,0,59,120,0,0,0,4,102,108,111,97,116, +95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,4,102,108,111,97,116,95,114,115,113,0, +18,114,0,59,122,0,0,18,120,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0, +18,114,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,122,0,0,18,114,0,59,122,0,0,0,4,118,101,99,52, +95,99,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0, +0,0,0,1,90,95,0,0,12,0,0,115,113,114,116,0,1,1,0,0,12,0,120,0,0,0,1,3,2,90,95,1,0,12,0,1,110,120,0, +2,18,120,0,54,0,1,1,122,101,114,111,0,2,58,118,101,99,52,0,0,17,48,0,48,0,0,0,0,0,0,3,2,90,95,0,0, +12,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,120,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,4,102,108,111,97,116, +95,114,115,113,0,18,114,0,59,122,0,0,18,120,0,59,122,0,0,0,4,102,108,111,97,116,95,114,115,113,0, +18,114,0,59,119,0,0,18,120,0,59,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0, +18,114,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0, +0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,122,0,0,18,114,0,59,122,0,0,0,4,102,108,111,97, +116,95,114,99,112,0,18,114,0,59,119,0,0,18,114,0,59,119,0,0,0,4,118,101,99,52,95,99,109,112,0,18, +95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,0,0,0,1,90,95,0,0,9, +0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,9,0,120,0,0,0,1,4,102,108,111,97,116,95, +114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,105, +110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,10,0,118,0,0,0,1,4,102,108,111,97,116,95,114,115, +113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95, +114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,0,1,90,95,0,0,11,0, +0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,11,0,118,0,0,0,1,4,102,108,111,97,116,95, +114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97, +116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108, +111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,0,1, +90,95,0,0,12,0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,12,0,118,0,0,0,1,4,102,108, +111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4, +102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0, +0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59, +122,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118, +0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,9,0,120,0,0,0,1,9, +18,95,95,114,101,116,86,97,108,0,17,49,0,48,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,114,109,97,108, +105,122,101,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,115,0,2,58,105,110,118,101,114,115,101, +115,113,114,116,0,0,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101,99,52,95,109,117, +108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,115,0,0,0, +0,1,90,95,0,0,11,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0,9, +0,1,116,109,112,0,0,0,4,118,101,99,51,95,100,111,116,0,18,116,109,112,0,0,18,118,0,0,18,118,0,0,0, +4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0,4,118,101,99,52,95, +109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, +18,116,109,112,0,0,0,0,1,90,95,0,0,12,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,12,0,118,0, +0,0,1,3,2,90,95,0,0,9,0,1,116,109,112,0,0,0,4,118,101,99,52,95,100,111,116,0,18,116,109,112,0,0,18, +118,0,0,18,118,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0, +4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121, +122,0,0,18,118,0,0,18,116,109,112,0,0,0,0,1,90,95,0,0,9,0,0,97,98,115,0,1,1,0,0,9,0,97,0,0,0,1,4, +118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0, 97,98,115,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108, 0,59,120,121,0,0,18,97,0,0,0,0,1,90,95,0,0,11,0,0,97,98,115,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,99, 52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,90,95,0,0,12, -- cgit v1.2.3 From a833ff0f53da6e365d917bb0081d909a809b6ec1 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 7 Sep 2009 17:51:42 +0800 Subject: mesa/main: Make FEATURE_accum follow feature conventions. As shown in mfeatures.h, this allows users of accum.h to work without knowing if the feature is available. --- src/mesa/main/accum.c | 16 +++++++++++++++- src/mesa/main/accum.h | 39 +++++++++++++++++++++++++++------------ src/mesa/main/api_exec.c | 9 +++------ src/mesa/main/context.c | 4 ---- 4 files changed, 45 insertions(+), 23 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index 2345695f3c6..032e13b96eb 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -29,6 +29,10 @@ #include "macros.h" #include "state.h" #include "mtypes.h" +#include "glapi/dispatch.h" + + +#if FEATURE_accum void GLAPIENTRY @@ -51,7 +55,7 @@ _mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_Accum( GLenum op, GLfloat value ) { GET_CURRENT_CONTEXT(ctx); @@ -99,6 +103,16 @@ _mesa_Accum( GLenum op, GLfloat value ) } +void +_mesa_init_accum_dispatch(struct _glapi_table *disp) +{ + SET_Accum(disp, _mesa_Accum); + SET_ClearAccum(disp, _mesa_ClearAccum); +} + + +#endif /* FEATURE_accum */ + void _mesa_init_accum( GLcontext *ctx ) diff --git a/src/mesa/main/accum.h b/src/mesa/main/accum.h index ce92688a5b9..63740f07edc 100644 --- a/src/mesa/main/accum.h +++ b/src/mesa/main/accum.h @@ -38,25 +38,40 @@ #define ACCUM_H -#include "mtypes.h" +#include "main/mtypes.h" -#if _HAVE_FULL_GL - -extern void GLAPIENTRY -_mesa_Accum( GLenum op, GLfloat value ); +#if FEATURE_accum +#define _MESA_INIT_ACCUM_FUNCTIONS(driver, impl) \ + do { \ + (driver)->Accum = impl ## Accum; \ + } while (0) extern void GLAPIENTRY _mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); -extern void -_mesa_init_accum( GLcontext *ctx ); +extern void +_mesa_init_accum_dispatch(struct _glapi_table *disp); + +#else /* FEATURE_accum */ -#else +#define _MESA_INIT_ACCUM_FUNCTIONS(driver, impl) do { } while (0) -/** No-op */ -#define _mesa_init_accum( c ) ((void)0) +static INLINE void +_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) +{ + /* this is used in _mesa_PopAttrib */ + ASSERT_NO_FEATURE(); +} -#endif +static INLINE void +_mesa_init_accum_dispatch(struct _glapi_table *disp) +{ +} + +#endif /* FEATURE_accum */ + +extern void +_mesa_init_accum( GLcontext *ctx ); -#endif +#endif /* ACCUM_H */ diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 63176390751..9ffac7905a9 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -30,9 +30,7 @@ #include "mfeatures.h" -#if FEATURE_accum #include "accum.h" -#endif #include "api_loopback.h" #include "api_exec.h" #if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program @@ -193,10 +191,9 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_TexParameteri(exec, _mesa_TexParameteri); SET_Translatef(exec, _mesa_Translatef); SET_Viewport(exec, _mesa_Viewport); -#if FEATURE_accum - SET_Accum(exec, _mesa_Accum); - SET_ClearAccum(exec, _mesa_ClearAccum); -#endif + + _mesa_init_accum_dispatch(exec); + #if FEATURE_dlist SET_CallList(exec, _mesa_CallList); SET_CallLists(exec, _mesa_CallLists); diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 1907c799df9..df194c3edb9 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -79,9 +79,7 @@ #include "glheader.h" #include "mfeatures.h" #include "imports.h" -#if FEATURE_accum #include "accum.h" -#endif #include "api_exec.h" #include "arrayobj.h" #if FEATURE_attrib_stack @@ -676,9 +674,7 @@ init_attrib_groups(GLcontext *ctx) _mesa_init_extensions( ctx ); /* Attribute Groups */ -#if FEATURE_accum _mesa_init_accum( ctx ); -#endif #if FEATURE_attrib_stack _mesa_init_attrib( ctx ); #endif -- cgit v1.2.3 From 2b36db496d34c60a3f987fa88d52bf5684713240 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 7 Sep 2009 18:20:10 +0800 Subject: mesa/main: Make FEATURE_attrib_stack follow feature conventions. As shown in mfeatures.h, this allows users of attrib.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 11 +++-------- src/mesa/main/attrib.c | 17 +++++++++++++++++ src/mesa/main/attrib.h | 38 +++++++++++++++++++++++++++----------- src/mesa/main/context.c | 6 ------ 4 files changed, 47 insertions(+), 25 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 9ffac7905a9..b363d4340ea 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -39,9 +39,7 @@ #if FEATURE_ATI_fragment_shader #include "shader/atifragshader.h" #endif -#if FEATURE_attrib_stack #include "attrib.h" -#endif #include "blend.h" #if FEATURE_ARB_vertex_buffer_object #include "bufferobj.h" @@ -283,12 +281,9 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_PolygonMode(exec, _mesa_PolygonMode); SET_PolygonOffset(exec, _mesa_PolygonOffset); SET_PolygonStipple(exec, _mesa_PolygonStipple); -#if FEATURE_attrib_stack - SET_PopAttrib(exec, _mesa_PopAttrib); - SET_PushAttrib(exec, _mesa_PushAttrib); - SET_PopClientAttrib(exec, _mesa_PopClientAttrib); - SET_PushClientAttrib(exec, _mesa_PushClientAttrib); -#endif + + _mesa_init_attrib_dispatch(exec); + #if FEATURE_drawpix SET_RasterPos2f(exec, _mesa_RasterPos2f); SET_RasterPos2fv(exec, _mesa_RasterPos2fv); diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 0fb8fa3bba2..246c5521b7d 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -57,6 +57,7 @@ #include "varray.h" #include "viewport.h" #include "mtypes.h" +#include "glapi/dispatch.h" /** @@ -174,6 +175,9 @@ struct texture_state }; +#if FEATURE_attrib_stack + + /** * Allocate new attribute node of given type/kind. Attach payload data. * Insert it into the linked list named by 'head'. @@ -1464,6 +1468,19 @@ _mesa_PopClientAttrib(void) } +void +_mesa_init_attrib_dispatch(struct _glapi_table *disp) +{ + SET_PopAttrib(disp, _mesa_PopAttrib); + SET_PushAttrib(disp, _mesa_PushAttrib); + SET_PopClientAttrib(disp, _mesa_PopClientAttrib); + SET_PushClientAttrib(disp, _mesa_PushClientAttrib); +} + + +#endif /* FEATURE_attrib_stack */ + + /** * Free any attribute state data that might be attached to the context. */ diff --git a/src/mesa/main/attrib.h b/src/mesa/main/attrib.h index 2cf8fe69345..6b48a176630 100644 --- a/src/mesa/main/attrib.h +++ b/src/mesa/main/attrib.h @@ -26,10 +26,10 @@ #define ATTRIB_H -#include "mtypes.h" +#include "main/mtypes.h" -#if _HAVE_FULL_GL +#if FEATURE_attrib_stack extern void GLAPIENTRY _mesa_PushAttrib( GLbitfield mask ); @@ -43,18 +43,34 @@ _mesa_PushClientAttrib( GLbitfield mask ); extern void GLAPIENTRY _mesa_PopClientAttrib( void ); +extern void +_mesa_init_attrib_dispatch(struct _glapi_table *disp); + +#else /* FEATURE_attrib_stack */ + +static INLINE void +_mesa_PushClientAttrib( GLbitfield mask ) +{ + ASSERT_NO_FEATURE(); +} + +static INLINE void +_mesa_PopClientAttrib( void ) +{ + ASSERT_NO_FEATURE(); +} + +static INLINE void +_mesa_init_attrib_dispatch(struct _glapi_table *disp) +{ +} + +#endif /* FEATURE_attrib_stack */ + extern void _mesa_init_attrib( GLcontext *ctx ); extern void _mesa_free_attrib_data( GLcontext *ctx ); -#else - -/** No-op */ -#define _mesa_init_attrib( c ) ((void)0) -#define _mesa_free_attrib_data( c ) ((void)0) - -#endif - -#endif +#endif /* ATTRIB_H */ diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index df194c3edb9..53a21ba4f57 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -82,9 +82,7 @@ #include "accum.h" #include "api_exec.h" #include "arrayobj.h" -#if FEATURE_attrib_stack #include "attrib.h" -#endif #include "blend.h" #include "buffers.h" #include "bufferobj.h" @@ -675,9 +673,7 @@ init_attrib_groups(GLcontext *ctx) /* Attribute Groups */ _mesa_init_accum( ctx ); -#if FEATURE_attrib_stack _mesa_init_attrib( ctx ); -#endif _mesa_init_buffer_objects( ctx ); _mesa_init_color( ctx ); _mesa_init_colortables( ctx ); @@ -997,9 +993,7 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL); _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL); -#if FEATURE_attrib_stack _mesa_free_attrib_data(ctx); -#endif _mesa_free_lighting_data( ctx ); #if FEATURE_evaluators _mesa_free_eval_data( ctx ); -- cgit v1.2.3 From cab7ea03688ec73dd71c0b969f2db30cabeb713c Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 7 Sep 2009 18:06:00 +0800 Subject: mesa/main: Make FEATURE_histogram follow feature conventions. As shown in mfeatures.h, this allows users of histogram.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 15 +-------------- src/mesa/main/context.c | 4 ---- src/mesa/main/histogram.c | 45 ++++++++++++++++++++++++++++++++++---------- src/mesa/main/histogram.h | 48 +++++++++++------------------------------------ 4 files changed, 47 insertions(+), 65 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index b363d4340ea..6b529db5ec2 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -76,9 +76,7 @@ #include "ffvertex_prog.h" #include "framebuffer.h" #include "hint.h" -#if FEATURE_histogram #include "histogram.h" -#endif #include "imports.h" #include "light.h" #include "lines.h" @@ -375,18 +373,7 @@ _mesa_init_exec_table(struct _glapi_table *exec) _mesa_init_colortable_dispatch(exec); _mesa_init_convolve_dispatch(exec); -#if FEATURE_histogram - SET_GetHistogram(exec, _mesa_GetHistogram); - SET_GetHistogramParameterfv(exec, _mesa_GetHistogramParameterfv); - SET_GetHistogramParameteriv(exec, _mesa_GetHistogramParameteriv); - SET_GetMinmax(exec, _mesa_GetMinmax); - SET_GetMinmaxParameterfv(exec, _mesa_GetMinmaxParameterfv); - SET_GetMinmaxParameteriv(exec, _mesa_GetMinmaxParameteriv); - SET_Histogram(exec, _mesa_Histogram); - SET_Minmax(exec, _mesa_Minmax); - SET_ResetHistogram(exec, _mesa_ResetHistogram); - SET_ResetMinmax(exec, _mesa_ResetMinmax); -#endif + _mesa_init_histogram_dispatch(exec); /* OpenGL 2.0 */ SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate); diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 53a21ba4f57..a546e37b5f6 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -106,9 +106,7 @@ #include "fog.h" #include "framebuffer.h" #include "get.h" -#if FEATURE_histogram #include "histogram.h" -#endif #include "hint.h" #include "hash.h" #include "light.h" @@ -693,9 +691,7 @@ init_attrib_groups(GLcontext *ctx) ctx->RenderMode = GL_RENDER; #endif _mesa_init_fog( ctx ); -#if FEATURE_histogram _mesa_init_histogram( ctx ); -#endif _mesa_init_hint( ctx ); _mesa_init_line( ctx ); _mesa_init_lighting( ctx ); diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c index ceb0d5a6a86..87816d31329 100644 --- a/src/mesa/main/histogram.c +++ b/src/mesa/main/histogram.c @@ -29,8 +29,11 @@ #include "context.h" #include "image.h" #include "histogram.h" +#include "glapi/dispatch.h" +#if FEATURE_histogram + /* * XXX the packed pixel formats haven't been tested. @@ -614,7 +617,11 @@ base_histogram_format( GLenum format ) */ -void GLAPIENTRY +/* this is defined below */ +static void GLAPIENTRY _mesa_ResetMinmax(GLenum target); + + +static void GLAPIENTRY _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) { GET_CURRENT_CONTEXT(ctx); @@ -677,7 +684,7 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) { GET_CURRENT_CONTEXT(ctx); @@ -737,7 +744,7 @@ _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, G } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params) { GET_CURRENT_CONTEXT(ctx); @@ -784,7 +791,7 @@ _mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params) { GET_CURRENT_CONTEXT(ctx); @@ -831,7 +838,7 @@ _mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params) { GET_CURRENT_CONTEXT(ctx); @@ -857,7 +864,7 @@ _mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params) { GET_CURRENT_CONTEXT(ctx); @@ -883,7 +890,7 @@ _mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink) { GLuint i; @@ -966,7 +973,7 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s } -void GLAPIENTRY +static void GLAPIENTRY _mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink) { GET_CURRENT_CONTEXT(ctx); @@ -994,7 +1001,7 @@ _mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_ResetHistogram(GLenum target) { GLuint i; @@ -1020,7 +1027,7 @@ _mesa_ResetHistogram(GLenum target) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_ResetMinmax(GLenum target) { GET_CURRENT_CONTEXT(ctx); @@ -1043,6 +1050,24 @@ _mesa_ResetMinmax(GLenum target) } +void +_mesa_init_histogram_dispatch(struct _glapi_table *disp) +{ + SET_GetHistogram(disp, _mesa_GetHistogram); + SET_GetHistogramParameterfv(disp, _mesa_GetHistogramParameterfv); + SET_GetHistogramParameteriv(disp, _mesa_GetHistogramParameteriv); + SET_GetMinmax(disp, _mesa_GetMinmax); + SET_GetMinmaxParameterfv(disp, _mesa_GetMinmaxParameterfv); + SET_GetMinmaxParameteriv(disp, _mesa_GetMinmaxParameteriv); + SET_Histogram(disp, _mesa_Histogram); + SET_Minmax(disp, _mesa_Minmax); + SET_ResetHistogram(disp, _mesa_ResetHistogram); + SET_ResetMinmax(disp, _mesa_ResetMinmax); +} + + +#endif /* FEATURE_histogram */ + /**********************************************************************/ /***** Initialization *****/ diff --git a/src/mesa/main/histogram.h b/src/mesa/main/histogram.h index 367e9b11ba1..dbae1bbd06b 100644 --- a/src/mesa/main/histogram.h +++ b/src/mesa/main/histogram.h @@ -36,48 +36,22 @@ #ifndef HISTOGRAM_H #define HISTOGRAM_H -#include "glheader.h" -#include "mtypes.h" +#include "main/mtypes.h" -#if _HAVE_FULL_GL +#if FEATURE_histogram -extern void GLAPIENTRY -_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values); +extern void +_mesa_init_histogram_dispatch(struct _glapi_table *disp); -extern void GLAPIENTRY -_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +#else /* FEATURE_histogram */ -extern void GLAPIENTRY -_mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params); +static INLINE void +_mesa_init_histogram_dispatch(struct _glapi_table *disp) +{ +} -extern void GLAPIENTRY -_mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params); - -extern void GLAPIENTRY -_mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params); - -extern void GLAPIENTRY -_mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params); - -extern void GLAPIENTRY -_mesa_Histogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); - -extern void GLAPIENTRY -_mesa_Minmax(GLenum target, GLenum internalformat, GLboolean sink); - -extern void GLAPIENTRY -_mesa_ResetHistogram(GLenum target); - -extern void GLAPIENTRY -_mesa_ResetMinmax(GLenum target); +#endif /* FEATURE_histogram */ extern void _mesa_init_histogram( GLcontext * ctx ); -#else - -/** No-op */ -#define _mesa_init_histogram( c ) ((void) 0) - -#endif - -#endif +#endif /* HISTOGRAM_H */ -- cgit v1.2.3 From d25080074f2da1ebc47cdfb5c3491740a57ec03f Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 8 Sep 2009 10:05:36 +0800 Subject: mesa/main: New feature FEATURE_rastpos. It is separated from FEATURE_drawpix and made to follow the feature conventions. --- src/mesa/main/api_exec.c | 56 +--------------- src/mesa/main/context.c | 4 -- src/mesa/main/mfeatures.h | 2 +- src/mesa/main/rastpos.c | 162 +++++++++++++++++++++++++++++++-------------- src/mesa/main/rastpos.h | 163 +++++----------------------------------------- 5 files changed, 133 insertions(+), 254 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 6b529db5ec2..8de06918515 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -59,8 +59,8 @@ #endif #if FEATURE_drawpix #include "drawpix.h" -#include "rastpos.h" #endif +#include "rastpos.h" #include "enable.h" #if FEATURE_evaluators #include "eval.h" @@ -281,33 +281,8 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_PolygonStipple(exec, _mesa_PolygonStipple); _mesa_init_attrib_dispatch(exec); + _mesa_init_rastpos_dispatch(exec); -#if FEATURE_drawpix - SET_RasterPos2f(exec, _mesa_RasterPos2f); - SET_RasterPos2fv(exec, _mesa_RasterPos2fv); - SET_RasterPos2i(exec, _mesa_RasterPos2i); - SET_RasterPos2iv(exec, _mesa_RasterPos2iv); - SET_RasterPos2d(exec, _mesa_RasterPos2d); - SET_RasterPos2dv(exec, _mesa_RasterPos2dv); - SET_RasterPos2s(exec, _mesa_RasterPos2s); - SET_RasterPos2sv(exec, _mesa_RasterPos2sv); - SET_RasterPos3d(exec, _mesa_RasterPos3d); - SET_RasterPos3dv(exec, _mesa_RasterPos3dv); - SET_RasterPos3f(exec, _mesa_RasterPos3f); - SET_RasterPos3fv(exec, _mesa_RasterPos3fv); - SET_RasterPos3i(exec, _mesa_RasterPos3i); - SET_RasterPos3iv(exec, _mesa_RasterPos3iv); - SET_RasterPos3s(exec, _mesa_RasterPos3s); - SET_RasterPos3sv(exec, _mesa_RasterPos3sv); - SET_RasterPos4d(exec, _mesa_RasterPos4d); - SET_RasterPos4dv(exec, _mesa_RasterPos4dv); - SET_RasterPos4f(exec, _mesa_RasterPos4f); - SET_RasterPos4fv(exec, _mesa_RasterPos4fv); - SET_RasterPos4i(exec, _mesa_RasterPos4i); - SET_RasterPos4iv(exec, _mesa_RasterPos4iv); - SET_RasterPos4s(exec, _mesa_RasterPos4s); - SET_RasterPos4sv(exec, _mesa_RasterPos4sv); -#endif SET_ReadPixels(exec, _mesa_ReadPixels); SET_Rotated(exec, _mesa_Rotated); SET_Scaled(exec, _mesa_Scaled); @@ -485,32 +460,7 @@ _mesa_init_exec_table(struct _glapi_table *exec) #endif /* 197. GL_MESA_window_pos */ -#if FEATURE_drawpix - SET_WindowPos2dMESA(exec, _mesa_WindowPos2dMESA); - SET_WindowPos2dvMESA(exec, _mesa_WindowPos2dvMESA); - SET_WindowPos2fMESA(exec, _mesa_WindowPos2fMESA); - SET_WindowPos2fvMESA(exec, _mesa_WindowPos2fvMESA); - SET_WindowPos2iMESA(exec, _mesa_WindowPos2iMESA); - SET_WindowPos2ivMESA(exec, _mesa_WindowPos2ivMESA); - SET_WindowPos2sMESA(exec, _mesa_WindowPos2sMESA); - SET_WindowPos2svMESA(exec, _mesa_WindowPos2svMESA); - SET_WindowPos3dMESA(exec, _mesa_WindowPos3dMESA); - SET_WindowPos3dvMESA(exec, _mesa_WindowPos3dvMESA); - SET_WindowPos3fMESA(exec, _mesa_WindowPos3fMESA); - SET_WindowPos3fvMESA(exec, _mesa_WindowPos3fvMESA); - SET_WindowPos3iMESA(exec, _mesa_WindowPos3iMESA); - SET_WindowPos3ivMESA(exec, _mesa_WindowPos3ivMESA); - SET_WindowPos3sMESA(exec, _mesa_WindowPos3sMESA); - SET_WindowPos3svMESA(exec, _mesa_WindowPos3svMESA); - SET_WindowPos4dMESA(exec, _mesa_WindowPos4dMESA); - SET_WindowPos4dvMESA(exec, _mesa_WindowPos4dvMESA); - SET_WindowPos4fMESA(exec, _mesa_WindowPos4fMESA); - SET_WindowPos4fvMESA(exec, _mesa_WindowPos4fvMESA); - SET_WindowPos4iMESA(exec, _mesa_WindowPos4iMESA); - SET_WindowPos4ivMESA(exec, _mesa_WindowPos4ivMESA); - SET_WindowPos4sMESA(exec, _mesa_WindowPos4sMESA); - SET_WindowPos4svMESA(exec, _mesa_WindowPos4svMESA); -#endif + /* part of _mesa_init_rastpos_dispatch(exec); */ /* 200. GL_IBM_multimode_draw_arrays */ #if _HAVE_FULL_GL diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index a546e37b5f6..cd8fe0df8f9 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -124,9 +124,7 @@ #if FEATURE_ARB_sync #include "syncobj.h" #endif -#if FEATURE_drawpix #include "rastpos.h" -#endif #include "scissor.h" #include "shared.h" #include "simple_list.h" @@ -708,9 +706,7 @@ init_attrib_groups(GLcontext *ctx) #if FEATURE_ARB_sync _mesa_init_sync( ctx ); #endif -#if FEATURE_drawpix _mesa_init_rastpos( ctx ); -#endif _mesa_init_scissor( ctx ); _mesa_init_shader_state( ctx ); _mesa_init_stencil( ctx ); diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index 6318934c6bf..d3491b1d427 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -82,12 +82,12 @@ #define FEATURE_histogram _HAVE_FULL_GL #define FEATURE_pixel_transfer _HAVE_FULL_GL #define FEATURE_point_size_array 0 +#define FEATURE_rastpos _HAVE_FULL_GL #define FEATURE_texgen _HAVE_FULL_GL #define FEATURE_texture_fxt1 _HAVE_FULL_GL #define FEATURE_texture_s3tc _HAVE_FULL_GL #define FEATURE_userclip _HAVE_FULL_GL #define FEATURE_vertex_array_byte 0 -#define FEATURE_windowpos _HAVE_FULL_GL #define FEATURE_es2_glsl 0 #define FEATURE_ARB_occlusion_query _HAVE_FULL_GL diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c index 9f309d6ab84..703b47ec742 100644 --- a/src/mesa/main/rastpos.c +++ b/src/mesa/main/rastpos.c @@ -34,6 +34,10 @@ #include "macros.h" #include "rastpos.h" #include "state.h" +#include "glapi/dispatch.h" + + +#if FEATURE_rastpos /** @@ -60,147 +64,147 @@ rasterpos(GLfloat x, GLfloat y, GLfloat z, GLfloat w) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos2d(GLdouble x, GLdouble y) { rasterpos((GLfloat)x, (GLfloat)y, (GLfloat)0.0, (GLfloat)1.0); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos2f(GLfloat x, GLfloat y) { rasterpos(x, y, 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos2i(GLint x, GLint y) { rasterpos((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos2s(GLshort x, GLshort y) { rasterpos(x, y, 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos3d(GLdouble x, GLdouble y, GLdouble z) { rasterpos((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos3f(GLfloat x, GLfloat y, GLfloat z) { rasterpos(x, y, z, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos3i(GLint x, GLint y, GLint z) { rasterpos((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos3s(GLshort x, GLshort y, GLshort z) { rasterpos(x, y, z, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { rasterpos((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { rasterpos(x, y, z, w); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos4i(GLint x, GLint y, GLint z, GLint w) { rasterpos((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) { rasterpos(x, y, z, w); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos2dv(const GLdouble *v) { rasterpos((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos2fv(const GLfloat *v) { rasterpos(v[0], v[1], 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos2iv(const GLint *v) { rasterpos((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos2sv(const GLshort *v) { rasterpos(v[0], v[1], 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos3dv(const GLdouble *v) { rasterpos((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos3fv(const GLfloat *v) { rasterpos(v[0], v[1], v[2], 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos3iv(const GLint *v) { rasterpos((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos3sv(const GLshort *v) { rasterpos(v[0], v[1], v[2], 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos4dv(const GLdouble *v) { rasterpos((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos4fv(const GLfloat *v) { rasterpos(v[0], v[1], v[2], v[3]); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos4iv(const GLint *v) { rasterpos((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_RasterPos4sv(const GLshort *v) { rasterpos(v[0], v[1], v[2], v[3]); @@ -211,7 +215,7 @@ _mesa_RasterPos4sv(const GLshort *v) /*** GL_ARB_window_pos / GL_MESA_window_pos ***/ /**********************************************************************/ -#if FEATURE_drawpix + /** * All glWindowPosMESA and glWindowPosARB commands call this function to * update the current raster position. @@ -290,153 +294,152 @@ window_pos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos2dMESA(GLdouble x, GLdouble y) { window_pos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos2fMESA(GLfloat x, GLfloat y) { window_pos4f(x, y, 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos2iMESA(GLint x, GLint y) { window_pos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos2sMESA(GLshort x, GLshort y) { window_pos4f(x, y, 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z) { window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z) { window_pos4f(x, y, z, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos3iMESA(GLint x, GLint y, GLint z) { window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos3sMESA(GLshort x, GLshort y, GLshort z) { window_pos4f(x, y, z, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { window_pos4f(x, y, z, w); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w) { window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w) { window_pos4f(x, y, z, w); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos2dvMESA(const GLdouble *v) { window_pos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos2fvMESA(const GLfloat *v) { window_pos4f(v[0], v[1], 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos2ivMESA(const GLint *v) { window_pos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos2svMESA(const GLshort *v) { window_pos4f(v[0], v[1], 0.0F, 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos3dvMESA(const GLdouble *v) { window_pos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos3fvMESA(const GLfloat *v) { window_pos4f(v[0], v[1], v[2], 1.0); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos3ivMESA(const GLint *v) { window_pos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos3svMESA(const GLshort *v) { window_pos4f(v[0], v[1], v[2], 1.0F); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos4dvMESA(const GLdouble *v) { window_pos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos4fvMESA(const GLfloat *v) { window_pos4f(v[0], v[1], v[2], v[3]); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos4ivMESA(const GLint *v) { window_pos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_WindowPos4svMESA(const GLshort *v) { window_pos4f(v[0], v[1], v[2], v[3]); } -#endif #if 0 @@ -477,6 +480,65 @@ void glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) #endif +void +_mesa_init_rastpos_dispatch(struct _glapi_table *disp) +{ + SET_RasterPos2f(disp, _mesa_RasterPos2f); + SET_RasterPos2fv(disp, _mesa_RasterPos2fv); + SET_RasterPos2i(disp, _mesa_RasterPos2i); + SET_RasterPos2iv(disp, _mesa_RasterPos2iv); + SET_RasterPos2d(disp, _mesa_RasterPos2d); + SET_RasterPos2dv(disp, _mesa_RasterPos2dv); + SET_RasterPos2s(disp, _mesa_RasterPos2s); + SET_RasterPos2sv(disp, _mesa_RasterPos2sv); + SET_RasterPos3d(disp, _mesa_RasterPos3d); + SET_RasterPos3dv(disp, _mesa_RasterPos3dv); + SET_RasterPos3f(disp, _mesa_RasterPos3f); + SET_RasterPos3fv(disp, _mesa_RasterPos3fv); + SET_RasterPos3i(disp, _mesa_RasterPos3i); + SET_RasterPos3iv(disp, _mesa_RasterPos3iv); + SET_RasterPos3s(disp, _mesa_RasterPos3s); + SET_RasterPos3sv(disp, _mesa_RasterPos3sv); + SET_RasterPos4d(disp, _mesa_RasterPos4d); + SET_RasterPos4dv(disp, _mesa_RasterPos4dv); + SET_RasterPos4f(disp, _mesa_RasterPos4f); + SET_RasterPos4fv(disp, _mesa_RasterPos4fv); + SET_RasterPos4i(disp, _mesa_RasterPos4i); + SET_RasterPos4iv(disp, _mesa_RasterPos4iv); + SET_RasterPos4s(disp, _mesa_RasterPos4s); + SET_RasterPos4sv(disp, _mesa_RasterPos4sv); + + /* 197. GL_MESA_window_pos */ + SET_WindowPos2dMESA(disp, _mesa_WindowPos2dMESA); + SET_WindowPos2dvMESA(disp, _mesa_WindowPos2dvMESA); + SET_WindowPos2fMESA(disp, _mesa_WindowPos2fMESA); + SET_WindowPos2fvMESA(disp, _mesa_WindowPos2fvMESA); + SET_WindowPos2iMESA(disp, _mesa_WindowPos2iMESA); + SET_WindowPos2ivMESA(disp, _mesa_WindowPos2ivMESA); + SET_WindowPos2sMESA(disp, _mesa_WindowPos2sMESA); + SET_WindowPos2svMESA(disp, _mesa_WindowPos2svMESA); + SET_WindowPos3dMESA(disp, _mesa_WindowPos3dMESA); + SET_WindowPos3dvMESA(disp, _mesa_WindowPos3dvMESA); + SET_WindowPos3fMESA(disp, _mesa_WindowPos3fMESA); + SET_WindowPos3fvMESA(disp, _mesa_WindowPos3fvMESA); + SET_WindowPos3iMESA(disp, _mesa_WindowPos3iMESA); + SET_WindowPos3ivMESA(disp, _mesa_WindowPos3ivMESA); + SET_WindowPos3sMESA(disp, _mesa_WindowPos3sMESA); + SET_WindowPos3svMESA(disp, _mesa_WindowPos3svMESA); + SET_WindowPos4dMESA(disp, _mesa_WindowPos4dMESA); + SET_WindowPos4dvMESA(disp, _mesa_WindowPos4dvMESA); + SET_WindowPos4fMESA(disp, _mesa_WindowPos4fMESA); + SET_WindowPos4fvMESA(disp, _mesa_WindowPos4fvMESA); + SET_WindowPos4iMESA(disp, _mesa_WindowPos4iMESA); + SET_WindowPos4ivMESA(disp, _mesa_WindowPos4ivMESA); + SET_WindowPos4sMESA(disp, _mesa_WindowPos4sMESA); + SET_WindowPos4svMESA(disp, _mesa_WindowPos4svMESA); +} + + +#endif /* FEATURE_rastpos */ + + /**********************************************************************/ /** \name Initialization */ /**********************************************************************/ diff --git a/src/mesa/main/rastpos.h b/src/mesa/main/rastpos.h index 363f86ad87b..b2127225b6b 100644 --- a/src/mesa/main/rastpos.h +++ b/src/mesa/main/rastpos.h @@ -32,162 +32,33 @@ #define RASTPOS_H -#include "glheader.h" +#include "main/mtypes.h" -extern void GLAPIENTRY -_mesa_RasterPos2d(GLdouble x, GLdouble y); +#if FEATURE_rastpos -extern void GLAPIENTRY -_mesa_RasterPos2f(GLfloat x, GLfloat y); +#define _MESA_INIT_RASTPOS_FUNCTIONS(driver, impl) \ + do { \ + (driver)->RasterPos = impl ## RasterPos; \ + } while (0) -extern void GLAPIENTRY -_mesa_RasterPos2i(GLint x, GLint y); +extern void +_mesa_init_rastpos_dispatch(struct _glapi_table *disp); -extern void GLAPIENTRY -_mesa_RasterPos2s(GLshort x, GLshort y); +#else /* FEATURE_rastpos */ -extern void GLAPIENTRY -_mesa_RasterPos3d(GLdouble x, GLdouble y, GLdouble z); +#define _MESA_INIT_RASTPOS_FUNCTIONS(driver, impl) do { } while (0) -extern void GLAPIENTRY -_mesa_RasterPos3f(GLfloat x, GLfloat y, GLfloat z); +static INLINE void +_mesa_init_rastpos_dispatch(struct _glapi_table *disp) +{ +} -extern void GLAPIENTRY -_mesa_RasterPos3i(GLint x, GLint y, GLint z); - -extern void GLAPIENTRY -_mesa_RasterPos3s(GLshort x, GLshort y, GLshort z); - -extern void GLAPIENTRY -_mesa_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); - -extern void GLAPIENTRY -_mesa_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); - -extern void GLAPIENTRY -_mesa_RasterPos4i(GLint x, GLint y, GLint z, GLint w); - -extern void GLAPIENTRY -_mesa_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w); - -extern void GLAPIENTRY -_mesa_RasterPos2dv(const GLdouble *v); - -extern void GLAPIENTRY -_mesa_RasterPos2fv(const GLfloat *v); - -extern void GLAPIENTRY -_mesa_RasterPos2iv(const GLint *v); - -extern void GLAPIENTRY -_mesa_RasterPos2sv(const GLshort *v); - -extern void GLAPIENTRY -_mesa_RasterPos3dv(const GLdouble *v); - -extern void GLAPIENTRY -_mesa_RasterPos3fv(const GLfloat *v); - -extern void GLAPIENTRY -_mesa_RasterPos3iv(const GLint *v); - -extern void GLAPIENTRY -_mesa_RasterPos3sv(const GLshort *v); - -extern void GLAPIENTRY -_mesa_RasterPos4dv(const GLdouble *v); - -extern void GLAPIENTRY -_mesa_RasterPos4fv(const GLfloat *v); - -extern void GLAPIENTRY -_mesa_RasterPos4iv(const GLint *v); - -extern void GLAPIENTRY -_mesa_RasterPos4sv(const GLshort *v); - - -/**********************************************************************/ -/** \name GL_MESA_window_pos */ -/**********************************************************************/ -/*@{*/ - -extern void GLAPIENTRY -_mesa_WindowPos2dMESA(GLdouble x, GLdouble y); - -extern void GLAPIENTRY -_mesa_WindowPos2fMESA(GLfloat x, GLfloat y); - -extern void GLAPIENTRY -_mesa_WindowPos2iMESA(GLint x, GLint y); - -extern void GLAPIENTRY -_mesa_WindowPos2sMESA(GLshort x, GLshort y); - -extern void GLAPIENTRY -_mesa_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z); - -extern void GLAPIENTRY -_mesa_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z); - -extern void GLAPIENTRY -_mesa_WindowPos3iMESA(GLint x, GLint y, GLint z); - -extern void GLAPIENTRY -_mesa_WindowPos3sMESA(GLshort x, GLshort y, GLshort z); - -extern void GLAPIENTRY -_mesa_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w); - -extern void GLAPIENTRY -_mesa_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w); - -extern void GLAPIENTRY -_mesa_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w); - -extern void GLAPIENTRY -_mesa_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w); - -extern void GLAPIENTRY -_mesa_WindowPos2dvMESA(const GLdouble *v); - -extern void GLAPIENTRY -_mesa_WindowPos2fvMESA(const GLfloat *v); - -extern void GLAPIENTRY -_mesa_WindowPos2ivMESA(const GLint *v); - -extern void GLAPIENTRY -_mesa_WindowPos2svMESA(const GLshort *v); - -extern void GLAPIENTRY -_mesa_WindowPos3dvMESA(const GLdouble *v); - -extern void GLAPIENTRY -_mesa_WindowPos3fvMESA(const GLfloat *v); - -extern void GLAPIENTRY -_mesa_WindowPos3ivMESA(const GLint *v); - -extern void GLAPIENTRY -_mesa_WindowPos3svMESA(const GLshort *v); - -extern void GLAPIENTRY -_mesa_WindowPos4dvMESA(const GLdouble *v); - -extern void GLAPIENTRY -_mesa_WindowPos4fvMESA(const GLfloat *v); - -extern void GLAPIENTRY -_mesa_WindowPos4ivMESA(const GLint *v); - -extern void GLAPIENTRY -_mesa_WindowPos4svMESA(const GLshort *v); +#endif /* FEATURE_rastpos */ extern void -_mesa_init_rastpos( GLcontext * ctx ); +_mesa_init_rastpos(GLcontext *ctx); /*@}*/ -#endif +#endif /* RASTPOS_H */ -- cgit v1.2.3 From 67a2a4e901367418a5c28e7b0963bf9c0c4762ba Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 8 Sep 2009 10:15:06 +0800 Subject: mesa/main: Make FEATURE_drawpix follow feature conventions. As shown in mfeatures.h, this allows users of drawpix.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 10 +++------- src/mesa/main/drawpix.c | 26 ++++++++++++++++++-------- src/mesa/main/drawpix.h | 35 +++++++++++++++++++++-------------- 3 files changed, 42 insertions(+), 29 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 8de06918515..5ddbf497598 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -57,9 +57,7 @@ #if FEATURE_dlist #include "dlist.h" #endif -#if FEATURE_drawpix #include "drawpix.h" -#endif #include "rastpos.h" #include "enable.h" #if FEATURE_evaluators @@ -209,11 +207,9 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_DepthFunc(exec, _mesa_DepthFunc); SET_DepthMask(exec, _mesa_DepthMask); SET_DepthRange(exec, _mesa_DepthRange); -#if FEATURE_drawpix - SET_Bitmap(exec, _mesa_Bitmap); - SET_CopyPixels(exec, _mesa_CopyPixels); - SET_DrawPixels(exec, _mesa_DrawPixels); -#endif + + _mesa_init_drawpix_dispatch(exec); + #if FEATURE_feedback SET_InitNames(exec, _mesa_InitNames); SET_FeedbackBuffer(exec, _mesa_FeedbackBuffer); diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index aef6585641e..5d4b53af4cb 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -33,8 +33,11 @@ #include "image.h" #include "readpix.h" #include "state.h" +#include "glapi/dispatch.h" +#if FEATURE_drawpix + /** * If a fragment program is enabled, check that it's valid. @@ -47,12 +50,10 @@ valid_fragment_program(GLcontext *ctx) } -#if _HAVE_FULL_GL - /* * Execute glDrawPixels */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_DrawPixels( GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) { @@ -140,7 +141,7 @@ end: } -void GLAPIENTRY +static void GLAPIENTRY _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLenum type ) { @@ -225,11 +226,8 @@ end: _mesa_set_vp_override(ctx, GL_FALSE); } -#endif /* _HAVE_FULL_GL */ - - -void GLAPIENTRY +static void GLAPIENTRY _mesa_Bitmap( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap ) @@ -309,3 +307,15 @@ _mesa_Bitmap( GLsizei width, GLsizei height, ctx->Current.RasterPos[0] += xmove; ctx->Current.RasterPos[1] += ymove; } + + +void +_mesa_init_drawpix_dispatch(struct _glapi_table *disp) +{ + SET_Bitmap(disp, _mesa_Bitmap); + SET_CopyPixels(disp, _mesa_CopyPixels); + SET_DrawPixels(disp, _mesa_DrawPixels); +} + + +#endif /* FEATURE_drawpix */ diff --git a/src/mesa/main/drawpix.h b/src/mesa/main/drawpix.h index 6177adad6da..8ffb1a6d884 100644 --- a/src/mesa/main/drawpix.h +++ b/src/mesa/main/drawpix.h @@ -22,28 +22,35 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifndef DRAWPIX_H +#define DRAWPIX_H -#ifndef DRAWPIXELS_H -#define DRAWPIXELS_H +#include "main/mtypes.h" -#include "main/glheader.h" +#if FEATURE_drawpix -extern void GLAPIENTRY -_mesa_DrawPixels( GLsizei width, GLsizei height, - GLenum format, GLenum type, const GLvoid *pixels ); +#define _MESA_INIT_DRAWPIX_FUNCTIONS(driver, impl) \ + do { \ + (driver)->DrawPixels = impl ## DrawPixels; \ + (driver)->CopyPixels = impl ## CopyPixels; \ + (driver)->Bitmap = impl ## Bitmap; \ + } while (0) +extern void +_mesa_init_drawpix_dispatch(struct _glapi_table *disp); -extern void GLAPIENTRY -_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, - GLenum type ); +#else /* FEATURE_drawpix */ +#define _MESA_INIT_DRAWPIX_FUNCTIONS(driver, impl) do { } while (0) -extern void GLAPIENTRY -_mesa_Bitmap( GLsizei width, GLsizei height, - GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, - const GLubyte *bitmap ); +static INLINE void +_mesa_init_drawpix_dispatch(struct _glapi_table *disp) +{ +} +#endif /* FEATURE_drawpix */ -#endif + +#endif /* DRAWPIX_H */ -- cgit v1.2.3 From 301a510092859d2e214d64f4ac2ebe03d591c64b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 8 Sep 2009 10:52:01 +0800 Subject: mesa/main: Make FEATURE_feedback follow feature conventions. As shown in mfeatures.h, this allows users of feedback.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 13 +--------- src/mesa/main/context.c | 6 ----- src/mesa/main/feedback.c | 39 ++++++++++++++++++++---------- src/mesa/main/feedback.h | 62 ++++++++++++++++++++++++++++++++---------------- 4 files changed, 70 insertions(+), 50 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 5ddbf497598..a2f0dfabda9 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -64,9 +64,7 @@ #include "eval.h" #endif #include "get.h" -#if FEATURE_feedback #include "feedback.h" -#endif #include "fog.h" #if FEATURE_EXT_framebuffer_object #include "fbobject.h" @@ -209,17 +207,8 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_DepthRange(exec, _mesa_DepthRange); _mesa_init_drawpix_dispatch(exec); + _mesa_init_feedback_dispatch(exec); -#if FEATURE_feedback - SET_InitNames(exec, _mesa_InitNames); - SET_FeedbackBuffer(exec, _mesa_FeedbackBuffer); - SET_LoadName(exec, _mesa_LoadName); - SET_PassThrough(exec, _mesa_PassThrough); - SET_PopName(exec, _mesa_PopName); - SET_PushName(exec, _mesa_PushName); - SET_SelectBuffer(exec, _mesa_SelectBuffer); - SET_RenderMode(exec, _mesa_RenderMode); -#endif SET_FogCoordPointerEXT(exec, _mesa_FogCoordPointerEXT); SET_Fogf(exec, _mesa_Fogf); SET_Fogfv(exec, _mesa_Fogfv); diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index cd8fe0df8f9..17e98ffa309 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -100,9 +100,7 @@ #include "enums.h" #include "extensions.h" #include "fbobject.h" -#if FEATURE_feedback #include "feedback.h" -#endif #include "fog.h" #include "framebuffer.h" #include "get.h" @@ -683,11 +681,7 @@ init_attrib_groups(GLcontext *ctx) _mesa_init_eval( ctx ); #endif _mesa_init_fbobjects( ctx ); -#if FEATURE_feedback _mesa_init_feedback( ctx ); -#else - ctx->RenderMode = GL_RENDER; -#endif _mesa_init_fog( ctx ); _mesa_init_histogram( ctx ); _mesa_init_hint( ctx ); diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index 818a8045407..fcdbb75fc4f 100644 --- a/src/mesa/main/feedback.c +++ b/src/mesa/main/feedback.c @@ -36,9 +36,10 @@ #include "feedback.h" #include "macros.h" #include "mtypes.h" +#include "glapi/dispatch.h" -#if _HAVE_FULL_GL +#if FEATURE_feedback #define FB_3D 0x01 @@ -49,7 +50,7 @@ -void GLAPIENTRY +static void GLAPIENTRY _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) { GET_CURRENT_CONTEXT(ctx); @@ -103,7 +104,7 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_PassThrough( GLfloat token ) { GET_CURRENT_CONTEXT(ctx); @@ -153,9 +154,6 @@ _mesa_feedback_vertex(GLcontext *ctx, } -#endif /* _HAVE_FULL_GL */ - - /**********************************************************************/ /** \name Selection */ /*@{*/ @@ -173,7 +171,7 @@ _mesa_feedback_vertex(GLcontext *ctx, * Verifies we're not in selection mode, flushes the vertices and initialize * the fields in __GLcontextRec::Select with the given buffer. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_SelectBuffer( GLsizei size, GLuint *buffer ) { GET_CURRENT_CONTEXT(ctx); @@ -280,7 +278,7 @@ write_hit_record(GLcontext *ctx) * the hit record data in gl_selection. Marks new render mode in * __GLcontextRec::NewState. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_InitNames( void ) { GET_CURRENT_CONTEXT(ctx); @@ -311,7 +309,7 @@ _mesa_InitNames( void ) * * sa __GLcontextRec::Select. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_LoadName( GLuint name ) { GET_CURRENT_CONTEXT(ctx); @@ -350,7 +348,7 @@ _mesa_LoadName( GLuint name ) * * sa __GLcontextRec::Select. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_PushName( GLuint name ) { GET_CURRENT_CONTEXT(ctx); @@ -381,7 +379,7 @@ _mesa_PushName( GLuint name ) * * sa __GLcontextRec::Select. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_PopName( void ) { GET_CURRENT_CONTEXT(ctx); @@ -424,7 +422,7 @@ _mesa_PopName( void ) * __GLcontextRec::RenderMode and notifies the driver via the * dd_function_table::RenderMode callback. */ -GLint GLAPIENTRY +static GLint GLAPIENTRY _mesa_RenderMode( GLenum mode ) { GET_CURRENT_CONTEXT(ctx); @@ -507,6 +505,23 @@ _mesa_RenderMode( GLenum mode ) /*@}*/ +void +_mesa_init_feedback_dispatch(struct _glapi_table *disp) +{ + SET_InitNames(disp, _mesa_InitNames); + SET_FeedbackBuffer(disp, _mesa_FeedbackBuffer); + SET_LoadName(disp, _mesa_LoadName); + SET_PassThrough(disp, _mesa_PassThrough); + SET_PopName(disp, _mesa_PopName); + SET_PushName(disp, _mesa_PushName); + SET_SelectBuffer(disp, _mesa_SelectBuffer); + SET_RenderMode(disp, _mesa_RenderMode); +} + + +#endif /* FEATURE_feedback */ + + /**********************************************************************/ /** \name Initialization */ /*@{*/ diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h index 72c2acd5edd..7a648f444fc 100644 --- a/src/mesa/main/feedback.h +++ b/src/mesa/main/feedback.h @@ -27,11 +27,15 @@ #define FEEDBACK_H -#include "mtypes.h" +#include "main/mtypes.h" -extern void -_mesa_init_feedback( GLcontext *ctx ); +#if FEATURE_feedback + +#define _MESA_INIT_FEEDBACK_FUNCTIONS(driver, impl) \ + do { \ + (driver)->RenderMode = impl ## RenderMode; \ + } while (0) extern void _mesa_feedback_vertex( GLcontext *ctx, @@ -55,29 +59,47 @@ extern void _mesa_update_hitflag( GLcontext *ctx, GLfloat z ); -extern void GLAPIENTRY -_mesa_PassThrough( GLfloat token ); +extern void +_mesa_init_feedback_dispatch(struct _glapi_table *disp); + +#else /* FEATURE_feedback */ -extern void GLAPIENTRY -_mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); +#define _MESA_INIT_FEEDBACK_FUNCTIONS(driver, impl) do { } while (0) -extern void GLAPIENTRY -_mesa_SelectBuffer( GLsizei size, GLuint *buffer ); +static INLINE void +_mesa_feedback_vertex( GLcontext *ctx, + const GLfloat win[4], + const GLfloat color[4], + GLfloat index, + const GLfloat texcoord[4] ) +{ + /* render mode is always GL_RENDER */ + ASSERT_NO_FEATURE(); +} -extern void GLAPIENTRY -_mesa_InitNames( void ); -extern void GLAPIENTRY -_mesa_LoadName( GLuint name ); +static INLINE void +_mesa_feedback_token( GLcontext *ctx, GLfloat token ) +{ + /* render mode is always GL_RENDER */ + ASSERT_NO_FEATURE(); +} -extern void GLAPIENTRY -_mesa_PushName( GLuint name ); +static INLINE void +_mesa_update_hitflag( GLcontext *ctx, GLfloat z ) +{ + /* render mode is always GL_RENDER */ + ASSERT_NO_FEATURE(); +} -extern void GLAPIENTRY -_mesa_PopName( void ); +static INLINE void +_mesa_init_feedback_dispatch(struct _glapi_table *disp) +{ +} -extern GLint GLAPIENTRY -_mesa_RenderMode( GLenum mode ); +#endif /* FEATURE_feedback */ +extern void +_mesa_init_feedback( GLcontext *ctx ); -#endif +#endif /* FEEDBACK_H */ -- cgit v1.2.3 From cc95de82e5939586771d478e662cb458bbc42c20 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 8 Sep 2009 11:01:19 +0800 Subject: mesa/main: Make FEATURE_texgen follow feature conventions. As shown in mfeatures.h, this allows users of texgen.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 14 +------------- src/mesa/main/texgen.c | 34 +++++++++++++++++++++++++++------- src/mesa/main/texgen.h | 43 ++++++++++++++++++++++++++----------------- 3 files changed, 54 insertions(+), 37 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index a2f0dfabda9..b7b9aa0bf23 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -93,9 +93,7 @@ #include "texenv.h" #include "texgetimage.h" #include "teximage.h" -#if FEATURE_texgen #include "texgen.h" -#endif #include "texobj.h" #include "texparam.h" #include "texstate.h" @@ -275,17 +273,7 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_TexEnvf(exec, _mesa_TexEnvf); SET_TexEnviv(exec, _mesa_TexEnviv); -#if FEATURE_texgen - SET_GetTexGendv(exec, _mesa_GetTexGendv); - SET_GetTexGenfv(exec, _mesa_GetTexGenfv); - SET_GetTexGeniv(exec, _mesa_GetTexGeniv); - SET_TexGend(exec, _mesa_TexGend); - SET_TexGendv(exec, _mesa_TexGendv); - SET_TexGenf(exec, _mesa_TexGenf); - SET_TexGenfv(exec, _mesa_TexGenfv); - SET_TexGeni(exec, _mesa_TexGeni); - SET_TexGeniv(exec, _mesa_TexGeniv); -#endif + _mesa_init_texgen_dispatch(exec); SET_TexImage1D(exec, _mesa_TexImage1D); SET_TexParameterf(exec, _mesa_TexParameterf); diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c index b3ecfc784e3..733e129fcfe 100644 --- a/src/mesa/main/texgen.c +++ b/src/mesa/main/texgen.c @@ -37,6 +37,10 @@ #include "main/texgen.h" #include "main/texstate.h" #include "math/m_matrix.h" +#include "glapi/dispatch.h" + + +#if FEATURE_texgen /** @@ -162,7 +166,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params ) { GLfloat p[4]; @@ -179,7 +183,7 @@ _mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_TexGend(GLenum coord, GLenum pname, GLdouble param ) { GLfloat p = (GLfloat) param; @@ -187,7 +191,7 @@ _mesa_TexGend(GLenum coord, GLenum pname, GLdouble param ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) { GLfloat p[4]; @@ -204,7 +208,7 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ) { _mesa_TexGenfv(coord, pname, ¶m); @@ -219,7 +223,7 @@ _mesa_TexGeni( GLenum coord, GLenum pname, GLint param ) -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) { struct gl_texture_unit *texUnit; @@ -257,7 +261,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) { struct gl_texture_unit *texUnit; @@ -295,7 +299,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) { struct gl_texture_unit *texUnit; @@ -338,3 +342,19 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) } +void +_mesa_init_texgen_dispatch(struct _glapi_table *disp) +{ + SET_GetTexGendv(disp, _mesa_GetTexGendv); + SET_GetTexGenfv(disp, _mesa_GetTexGenfv); + SET_GetTexGeniv(disp, _mesa_GetTexGeniv); + SET_TexGend(disp, _mesa_TexGend); + SET_TexGendv(disp, _mesa_TexGendv); + SET_TexGenf(disp, _mesa_TexGenf); + SET_TexGenfv(disp, _mesa_TexGenfv); + SET_TexGeni(disp, _mesa_TexGeni); + SET_TexGeniv(disp, _mesa_TexGeniv); +} + + +#endif /* FEATURE_texgen */ diff --git a/src/mesa/main/texgen.h b/src/mesa/main/texgen.h index 073588efcdb..f6924ef7222 100644 --- a/src/mesa/main/texgen.h +++ b/src/mesa/main/texgen.h @@ -27,36 +27,45 @@ #define TEXGEN_H -#include "main/glheader.h" +#include "main/mtypes.h" -extern void GLAPIENTRY -_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); +#if FEATURE_texgen -extern void GLAPIENTRY -_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); +#define _MESA_INIT_TEXGEN_FUNCTIONS(driver, impl) \ + do { \ + (driver)->TexGen = impl ## TexGen; \ + } while (0) extern void GLAPIENTRY -_mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ); +_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); extern void GLAPIENTRY -_mesa_TexGend( GLenum coord, GLenum pname, GLdouble param ); +_mesa_TexGeni( GLenum coord, GLenum pname, GLint param ); -extern void GLAPIENTRY -_mesa_TexGendv( GLenum coord, GLenum pname, const GLdouble *params ); +extern void +_mesa_init_texgen_dispatch(struct _glapi_table *disp); -extern void GLAPIENTRY -_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ); +#else /* FEATURE_texgen */ -extern void GLAPIENTRY -_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); +#define _MESA_INIT_TEXGEN_FUNCTIONS(driver, impl) do { } while (0) -extern void GLAPIENTRY -_mesa_TexGeni( GLenum coord, GLenum pname, GLint param ); +static void +_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) +{ +} -extern void GLAPIENTRY -_mesa_TexGeniv( GLenum coord, GLenum pname, const GLint *params ); +static void INLINE +_mesa_TexGeni( GLenum coord, GLenum pname, GLint param ) +{ +} + +static INLINE void +_mesa_init_texgen_dispatch(struct _glapi_table *disp) +{ +} +#endif /* FEATURE_texgen */ #endif /* TEXGEN_H */ -- cgit v1.2.3 From 80630d1fed6cd32e75f5e97e2cd27509be21d093 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 8 Sep 2009 14:32:08 +0800 Subject: mesa/main: New feature FEATURE_arrayelt. This allows the removal of AEcontext. --- src/mesa/main/api_arrayelt.c | 18 +++++++++++++++-- src/mesa/main/api_arrayelt.h | 47 +++++++++++++++++++++++++++++++++++++++++--- src/mesa/main/api_noop.c | 3 ++- src/mesa/main/dlist.c | 3 ++- src/mesa/main/mfeatures.h | 3 ++- src/mesa/main/vtxfmt.c | 4 +++- src/mesa/vbo/vbo_exec_api.c | 3 ++- src/mesa/vbo/vbo_save_api.c | 3 ++- 8 files changed, 73 insertions(+), 11 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 2462a1b0037..a058227110d 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -71,6 +71,10 @@ typedef struct { */ #define TYPE_IDX(t) ( (t) == GL_DOUBLE ? 7 : (t) & 7 ) + +#if FEATURE_arrayelt + + static const int ColorFuncs[2][8] = { { _gloffset_Color3bv, @@ -1160,7 +1164,7 @@ static void _ae_update_state( GLcontext *ctx ) at->array = attribArray; /* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV * function pointer here (for float arrays) since the pointer may - * change from one execution of _ae_loopback_array_elt() to + * change from one execution of _ae_ArrayElement() to * the next. Doing so caused UT to break. */ if (ctx->VertexProgram._Enabled @@ -1254,7 +1258,7 @@ void _ae_unmap_vbos( GLcontext *ctx ) * for all enabled vertex arrays (for elt-th element). * Note: this may be called during display list construction. */ -void GLAPIENTRY _ae_loopback_array_elt( GLint elt ) +void GLAPIENTRY _ae_ArrayElement( GLint elt ) { GET_CURRENT_CONTEXT(ctx); const AEcontext *actx = AE_CONTEXT(ctx); @@ -1317,3 +1321,13 @@ void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ) actx->NewState |= new_state; } } + + +void _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt) +{ + SET_ArrayElement(disp, vfmt->ArrayElement); +} + + +#endif /* FEATURE_arrayelt */ diff --git a/src/mesa/main/api_arrayelt.h b/src/mesa/main/api_arrayelt.h index e621724fb29..d18c0792c35 100644 --- a/src/mesa/main/api_arrayelt.h +++ b/src/mesa/main/api_arrayelt.h @@ -27,16 +27,57 @@ #ifndef API_ARRAYELT_H #define API_ARRAYELT_H -#include "mtypes.h" + +#include "main/mtypes.h" + +#if FEATURE_arrayelt + +#define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) \ + do { \ + (vfmt)->ArrayElement = impl ## ArrayElement; \ + } while (0) extern GLboolean _ae_create_context( GLcontext *ctx ); extern void _ae_destroy_context( GLcontext *ctx ); extern void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ); -extern void GLAPIENTRY _ae_loopback_array_elt( GLint elt ); +extern void GLAPIENTRY _ae_ArrayElement( GLint elt ); /* May optionally be called before a batch of element calls: */ extern void _ae_map_vbos( GLcontext *ctx ); extern void _ae_unmap_vbos( GLcontext *ctx ); -#endif +extern void +_mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt); + +#else /* FEATURE_arrayelt */ + +#define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) do { } while (0) + +static INLINE GLboolean +_ae_create_context( GLcontext *ctx ) +{ + return GL_TRUE; +} + +static INLINE void +_ae_destroy_context( GLcontext *ctx ) +{ +} + +static INLINE void +_ae_invalidate_state( GLcontext *ctx, GLuint new_state ) +{ +} + +static INLINE void +_mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt) +{ +} + +#endif /* FEATURE_arrayelt */ + + +#endif /* API_ARRAYELT_H */ diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index 0b669e7e7fc..162b685b02d 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -992,7 +992,8 @@ _mesa_noop_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ) void _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) { - vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ + _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); + vfmt->Begin = _mesa_noop_Begin; #if FEATURE_dlist vfmt->CallList = _mesa_CallList; diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 9c25de41871..e2b172595c4 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -9291,7 +9291,8 @@ mesa_print_display_list(GLuint list) void _mesa_save_vtxfmt_init(GLvertexformat * vfmt) { - vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ + _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); + vfmt->Begin = save_Begin; vfmt->CallList = _mesa_save_CallList; vfmt->CallLists = _mesa_save_CallLists; diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index d3491b1d427..834b89e6e57 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -69,11 +69,12 @@ */ #define FEATURE_accum _HAVE_FULL_GL +#define FEATURE_arrayelt _HAVE_FULL_GL #define FEATURE_attrib_stack _HAVE_FULL_GL #define FEATURE_colortable _HAVE_FULL_GL #define FEATURE_convolve _HAVE_FULL_GL #define FEATURE_dispatch _HAVE_FULL_GL -#define FEATURE_dlist _HAVE_FULL_GL +#define FEATURE_dlist (_HAVE_FULL_GL && FEATURE_arrayelt) #define FEATURE_draw_read_buffer _HAVE_FULL_GL #define FEATURE_drawpix _HAVE_FULL_GL #define FEATURE_evaluators _HAVE_FULL_GL diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index 91412f138a5..de9479d6b0b 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -27,6 +27,7 @@ */ #include "glheader.h" +#include "api_arrayelt.h" #include "api_loopback.h" #include "context.h" #include "imports.h" @@ -82,7 +83,8 @@ static void install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) { - SET_ArrayElement(tab, vfmt->ArrayElement); + _mesa_install_arrayelt_vtxfmt(tab, vfmt); + SET_Color3f(tab, vfmt->Color3f); SET_Color3fv(tab, vfmt->Color3fv); SET_Color4f(tab, vfmt->Color4f); diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 387d4ee3d4a..238beee030f 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -557,7 +557,8 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) { GLvertexformat *vfmt = &exec->vtxfmt; - vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ + _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); + vfmt->Begin = vbo_exec_Begin; #if FEATURE_dlist vfmt->CallList = _mesa_CallList; diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 41cd21d04b7..6e113443808 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -988,7 +988,8 @@ static void _save_vtxfmt_init( GLcontext *ctx ) struct vbo_save_context *save = &vbo_context(ctx)->save; GLvertexformat *vfmt = &save->vtxfmt; - vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ + _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); + vfmt->Begin = _save_Begin; vfmt->Color3f = _save_Color3f; vfmt->Color3fv = _save_Color3fv; -- cgit v1.2.3 From 42fac11d437d6bf2cb27f9487dedf7fb396616d4 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 8 Sep 2009 17:45:59 +0800 Subject: mesa/main: New feature FEATURE_queryobj. It merges FEATURE_ARB_occlusion_query and FEATURE_EXT_timer_query, and follows the feature conventions. --- src/mesa/main/api_exec.c | 18 +---------- src/mesa/main/context.c | 10 ++----- src/mesa/main/dlist.c | 8 ++--- src/mesa/main/extensions.c | 2 +- src/mesa/main/mfeatures.h | 3 +- src/mesa/main/queryobj.c | 48 ++++++++++++++++++------------ src/mesa/main/queryobj.h | 59 +++++++++++++++++++++++++------------ src/mesa/state_tracker/st_context.c | 2 +- src/mesa/swrast/s_span.c | 4 --- 9 files changed, 79 insertions(+), 75 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index b7b9aa0bf23..3fe10f1207e 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -83,9 +83,7 @@ #include "pixelstore.h" #include "points.h" #include "polygon.h" -#if FEATURE_ARB_occlusion_query || FEATURE_EXT_timer_query #include "queryobj.h" -#endif #include "readpix.h" #include "scissor.h" #include "state.h" @@ -625,16 +623,7 @@ _mesa_init_exec_table(struct _glapi_table *exec) #endif /* ARB 29. GL_ARB_occlusion_query */ -#if FEATURE_ARB_occlusion_query - SET_GenQueriesARB(exec, _mesa_GenQueriesARB); - SET_DeleteQueriesARB(exec, _mesa_DeleteQueriesARB); - SET_IsQueryARB(exec, _mesa_IsQueryARB); - SET_BeginQueryARB(exec, _mesa_BeginQueryARB); - SET_EndQueryARB(exec, _mesa_EndQueryARB); - SET_GetQueryivARB(exec, _mesa_GetQueryivARB); - SET_GetQueryObjectivARB(exec, _mesa_GetQueryObjectivARB); - SET_GetQueryObjectuivARB(exec, _mesa_GetQueryObjectuivARB); -#endif + _mesa_init_queryobj_dispatch(exec); /* ARB 37. GL_ARB_draw_buffers */ #if FEATURE_draw_read_buffer @@ -744,11 +733,6 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT); #endif -#if FEATURE_EXT_timer_query - SET_GetQueryObjecti64vEXT(exec, _mesa_GetQueryObjecti64vEXT); - SET_GetQueryObjectui64vEXT(exec, _mesa_GetQueryObjectui64vEXT); -#endif - #if FEATURE_EXT_framebuffer_blit SET_BlitFramebufferEXT(exec, _mesa_BlitFramebufferEXT); #endif diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 17e98ffa309..6994f98504d 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -116,9 +116,7 @@ #include "pixelstore.h" #include "points.h" #include "polygon.h" -#if FEATURE_ARB_occlusion_query #include "queryobj.h" -#endif #if FEATURE_ARB_sync #include "syncobj.h" #endif @@ -694,9 +692,7 @@ init_attrib_groups(GLcontext *ctx) _mesa_init_point( ctx ); _mesa_init_polygon( ctx ); _mesa_init_program( ctx ); -#if FEATURE_ARB_occlusion_query - _mesa_init_query( ctx ); -#endif + _mesa_init_queryobj( ctx ); #if FEATURE_ARB_sync _mesa_init_sync( ctx ); #endif @@ -990,9 +986,7 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_free_colortables_data( ctx ); _mesa_free_program_data(ctx); _mesa_free_shader_state(ctx); -#if FEATURE_ARB_occlusion_query - _mesa_free_query_data(ctx); -#endif + _mesa_free_queryobj_data(ctx); #if FEATURE_ARB_sync _mesa_free_sync_data(ctx); #endif diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index e2b172595c4..35f9a3cf03a 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -4856,7 +4856,7 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len, #endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */ -#if FEATURE_ARB_occlusion_query +#if FEATURE_queryobj static void GLAPIENTRY save_BeginQueryARB(GLenum target, GLuint id) @@ -4890,7 +4890,7 @@ save_EndQueryARB(GLenum target) } } -#endif /* FEATURE_ARB_occlusion_query */ +#endif /* FEATURE_queryobj */ static void GLAPIENTRY @@ -7155,7 +7155,7 @@ execute_list(GLcontext *ctx, GLuint list) n[6].f)); break; #endif -#if FEATURE_ARB_occlusion_query +#if FEATURE_queryobj case OPCODE_BEGIN_QUERY_ARB: CALL_BeginQueryARB(ctx->Exec, (n[1].e, n[2].ui)); break; @@ -8924,7 +8924,7 @@ _mesa_init_dlist_table(struct _glapi_table *table) SET_UnmapBufferARB(table, _mesa_UnmapBufferARB); #endif -#if FEATURE_ARB_occlusion_query +#if FEATURE_queryobj SET_BeginQueryARB(table, save_BeginQueryARB); SET_EndQueryARB(table, save_EndQueryARB); SET_GenQueriesARB(table, _mesa_GenQueriesARB); diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 2992abd0751..54cf37c5f48 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -215,7 +215,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.ARB_imaging = GL_TRUE; ctx->Extensions.ARB_map_buffer_range = GL_TRUE; ctx->Extensions.ARB_multitexture = GL_TRUE; -#if FEATURE_ARB_occlusion_query +#if FEATURE_queryobj ctx->Extensions.ARB_occlusion_query = GL_TRUE; #endif ctx->Extensions.ARB_point_sprite = GL_TRUE; diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index 834b89e6e57..27799771a58 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -83,6 +83,7 @@ #define FEATURE_histogram _HAVE_FULL_GL #define FEATURE_pixel_transfer _HAVE_FULL_GL #define FEATURE_point_size_array 0 +#define FEATURE_queryobj _HAVE_FULL_GL #define FEATURE_rastpos _HAVE_FULL_GL #define FEATURE_texgen _HAVE_FULL_GL #define FEATURE_texture_fxt1 _HAVE_FULL_GL @@ -91,7 +92,6 @@ #define FEATURE_vertex_array_byte 0 #define FEATURE_es2_glsl 0 -#define FEATURE_ARB_occlusion_query _HAVE_FULL_GL #define FEATURE_ARB_fragment_program _HAVE_FULL_GL #define FEATURE_ARB_framebuffer_object _HAVE_FULL_GL #define FEATURE_ARB_map_buffer_range _HAVE_FULL_GL @@ -109,7 +109,6 @@ #define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL #define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL #define FEATURE_EXT_texture_sRGB _HAVE_FULL_GL -#define FEATURE_EXT_timer_query _HAVE_FULL_GL #define FEATURE_ATI_fragment_shader _HAVE_FULL_GL #define FEATURE_NV_fence _HAVE_FULL_GL #define FEATURE_NV_fragment_program _HAVE_FULL_GL diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index a73c6e05081..f6eb4ee7e1b 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -29,6 +29,10 @@ #include "imports.h" #include "queryobj.h" #include "mtypes.h" +#include "glapi/dispatch.h" + + +#if FEATURE_queryobj /** @@ -216,7 +220,7 @@ _mesa_IsQueryARB(GLuint id) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_BeginQueryARB(GLenum target, GLuint id) { struct gl_query_object *q; @@ -236,7 +240,6 @@ _mesa_BeginQueryARB(GLenum target, GLuint id) return; } break; -#if FEATURE_EXT_timer_query case GL_TIME_ELAPSED_EXT: if (!ctx->Extensions.EXT_timer_query) { _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)"); @@ -247,7 +250,6 @@ _mesa_BeginQueryARB(GLenum target, GLuint id) return; } break; -#endif default: _mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)"); return; @@ -285,17 +287,15 @@ _mesa_BeginQueryARB(GLenum target, GLuint id) if (target == GL_SAMPLES_PASSED_ARB) { ctx->Query.CurrentOcclusionObject = q; } -#if FEATURE_EXT_timer_query else if (target == GL_TIME_ELAPSED_EXT) { ctx->Query.CurrentTimerObject = q; } -#endif ctx->Driver.BeginQuery(ctx, q); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_EndQueryARB(GLenum target) { struct gl_query_object *q; @@ -313,7 +313,6 @@ _mesa_EndQueryARB(GLenum target) q = ctx->Query.CurrentOcclusionObject; ctx->Query.CurrentOcclusionObject = NULL; break; -#if FEATURE_EXT_timer_query case GL_TIME_ELAPSED_EXT: if (!ctx->Extensions.EXT_timer_query) { _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)"); @@ -322,7 +321,6 @@ _mesa_EndQueryARB(GLenum target) q = ctx->Query.CurrentTimerObject; ctx->Query.CurrentTimerObject = NULL; break; -#endif default: _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)"); return; @@ -354,7 +352,6 @@ _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params) } q = ctx->Query.CurrentOcclusionObject; break; -#if FEATURE_EXT_timer_query case GL_TIME_ELAPSED_EXT: if (!ctx->Extensions.EXT_timer_query) { _mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)"); @@ -362,7 +359,6 @@ _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params) } q = ctx->Query.CurrentTimerObject; break; -#endif default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryivARB(target)"); return; @@ -462,12 +458,10 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params) } -#if FEATURE_EXT_timer_query - /** * New with GL_EXT_timer_query */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params) { struct gl_query_object *q = NULL; @@ -504,7 +498,7 @@ _mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params) /** * New with GL_EXT_timer_query */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params) { struct gl_query_object *q = NULL; @@ -537,19 +531,35 @@ _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params) } } -#endif /* FEATURE_EXT_timer_query */ + +void +_mesa_init_queryobj_dispatch(struct _glapi_table *disp) +{ + SET_GenQueriesARB(disp, _mesa_GenQueriesARB); + SET_DeleteQueriesARB(disp, _mesa_DeleteQueriesARB); + SET_IsQueryARB(disp, _mesa_IsQueryARB); + SET_BeginQueryARB(disp, _mesa_BeginQueryARB); + SET_EndQueryARB(disp, _mesa_EndQueryARB); + SET_GetQueryivARB(disp, _mesa_GetQueryivARB); + SET_GetQueryObjectivARB(disp, _mesa_GetQueryObjectivARB); + SET_GetQueryObjectuivARB(disp, _mesa_GetQueryObjectuivARB); + + SET_GetQueryObjecti64vEXT(disp, _mesa_GetQueryObjecti64vEXT); + SET_GetQueryObjectui64vEXT(disp, _mesa_GetQueryObjectui64vEXT); +} + + +#endif /* FEATURE_queryobj */ /** * Allocate/init the context state related to query objects. */ void -_mesa_init_query(GLcontext *ctx) +_mesa_init_queryobj(GLcontext *ctx) { -#if FEATURE_ARB_occlusion_query ctx->Query.QueryObjects = _mesa_NewHashTable(); ctx->Query.CurrentOcclusionObject = NULL; -#endif } @@ -569,7 +579,7 @@ delete_queryobj_cb(GLuint id, void *data, void *userData) * Free the context state related to query objects. */ void -_mesa_free_query_data(GLcontext *ctx) +_mesa_free_queryobj_data(GLcontext *ctx) { _mesa_HashDeleteAll(ctx->Query.QueryObjects, delete_queryobj_cb, ctx); _mesa_DeleteHashTable(ctx->Query.QueryObjects); diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h index ee775ef959e..6cf3c76d74d 100644 --- a/src/mesa/main/queryobj.h +++ b/src/mesa/main/queryobj.h @@ -23,19 +23,24 @@ */ -#ifndef OCCLUDE_H -#define OCCLUDE_H +#ifndef QUERYOBJ_H +#define QUERYOBJ_H -extern void -_mesa_init_query(GLcontext *ctx); +#include "main/mtypes.h" -extern void -_mesa_free_query_data(GLcontext *ctx); -extern void -_mesa_init_query_object_functions(struct dd_function_table *driver); +#if FEATURE_queryobj +#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) \ + do { \ + (driver)->NewQueryObject = impl ## NewQueryObject; \ + (driver)->DeleteQuery = impl ## DeleteQuery; \ + (driver)->BeginQuery = impl ## BeginQuery; \ + (driver)->EndQuery = impl ## EndQuery; \ + (driver)->WaitQuery = impl ## WaitQuery; \ + (driver)->CheckQuery = impl ## CheckQuery; \ + } while (0) extern void GLAPIENTRY _mesa_GenQueriesARB(GLsizei n, GLuint *ids); @@ -46,12 +51,6 @@ _mesa_DeleteQueriesARB(GLsizei n, const GLuint *ids); extern GLboolean GLAPIENTRY _mesa_IsQueryARB(GLuint id); -extern void GLAPIENTRY -_mesa_BeginQueryARB(GLenum target, GLuint id); - -extern void GLAPIENTRY -_mesa_EndQueryARB(GLenum target); - extern void GLAPIENTRY _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params); @@ -61,11 +60,33 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params); extern void GLAPIENTRY _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params); -extern void GLAPIENTRY -_mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params); +extern void +_mesa_init_query_object_functions(struct dd_function_table *driver); -extern void GLAPIENTRY -_mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params); +extern void +_mesa_init_queryobj_dispatch(struct _glapi_table *disp); + +#else /* FEATURE_queryobj */ + +#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) do { } while (0) + +static INLINE void +_mesa_init_query_object_functions(struct dd_function_table *driver) +{ +} + +static INLINE void +_mesa_init_queryobj_dispatch(struct _glapi_table *disp) +{ +} + +#endif /* FEATURE_queryobj */ + +extern void +_mesa_init_queryobj(GLcontext *ctx); + +extern void +_mesa_free_queryobj_data(GLcontext *ctx); -#endif /* OCCLUDE_H */ +#endif /* QUERYOBJ_H */ diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 8514b6b3756..96969c736c0 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -332,7 +332,7 @@ void st_init_driver_functions(struct dd_function_table *functions) st_init_feedback_functions(functions); #endif st_init_program_functions(functions); -#if FEATURE_ARB_occlusion_query +#if FEATURE_queryobj st_init_query_functions(functions); #endif st_init_readpixels_functions(functions); diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index a45eac438e4..704230d1d7b 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -904,7 +904,6 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span) } } -#if FEATURE_ARB_occlusion_query if (ctx->Query.CurrentOcclusionObject) { /* update count of 'passed' fragments */ struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; @@ -912,7 +911,6 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span) for (i = 0; i < span->end; i++) q->Result += span->array->mask[i]; } -#endif /* we have to wait until after occlusion to do this test */ if (ctx->Color.IndexMask == 0) { @@ -1376,7 +1374,6 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) } } -#if FEATURE_ARB_occlusion_query if (ctx->Query.CurrentOcclusionObject) { /* update count of 'passed' fragments */ struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; @@ -1384,7 +1381,6 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) for (i = 0; i < span->end; i++) q->Result += span->array->mask[i]; } -#endif /* We had to wait until now to check for glColorMask(0,0,0,0) because of * the occlusion test. -- cgit v1.2.3 From aefa1f6ab1d9267b223b06ae205ab34c8e0d7c02 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 8 Sep 2009 10:25:22 +0800 Subject: mesa/main: Make FEATURE_evaluators follow feature conventions. As shown in mfeatures.h, this allows users of eval.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 18 ++-------- src/mesa/main/api_noop.c | 14 +++----- src/mesa/main/context.c | 6 ---- src/mesa/main/dlist.c | 19 ++++------ src/mesa/main/eval.c | 61 ++++++++++++++++++++++++++------ src/mesa/main/eval.h | 84 ++++++++++++++++++--------------------------- src/mesa/main/vtxfmt.c | 13 +++---- src/mesa/vbo/vbo_exec_api.c | 19 +++++----- src/mesa/vbo/vbo_save_api.c | 11 ++---- 9 files changed, 114 insertions(+), 131 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 3fe10f1207e..fc4de3c14c1 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -60,9 +60,7 @@ #include "drawpix.h" #include "rastpos.h" #include "enable.h" -#if FEATURE_evaluators #include "eval.h" -#endif #include "get.h" #include "feedback.h" #include "fog.h" @@ -238,19 +236,9 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_Lighti(exec, _mesa_Lighti); SET_Lightiv(exec, _mesa_Lightiv); SET_LoadMatrixd(exec, _mesa_LoadMatrixd); -#if FEATURE_evaluators - SET_GetMapdv(exec, _mesa_GetMapdv); - SET_GetMapfv(exec, _mesa_GetMapfv); - SET_GetMapiv(exec, _mesa_GetMapiv); - SET_Map1d(exec, _mesa_Map1d); - SET_Map1f(exec, _mesa_Map1f); - SET_Map2d(exec, _mesa_Map2d); - SET_Map2f(exec, _mesa_Map2f); - SET_MapGrid1d(exec, _mesa_MapGrid1d); - SET_MapGrid1f(exec, _mesa_MapGrid1f); - SET_MapGrid2d(exec, _mesa_MapGrid2d); - SET_MapGrid2f(exec, _mesa_MapGrid2f); -#endif + + _mesa_init_eval_dispatch(exec); + SET_MultMatrixd(exec, _mesa_MultMatrixd); _mesa_init_pixel_dispatch(exec); diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index 162b685b02d..23c52177d8e 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -33,6 +33,7 @@ #if FEATURE_dlist #include "dlist.h" #endif +#include "eval.h" #include "glapi/dispatch.h" @@ -1005,14 +1006,9 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) vfmt->Color4fv = _mesa_noop_Color4fv; vfmt->EdgeFlag = _mesa_noop_EdgeFlag; vfmt->End = _mesa_noop_End; -#if FEATURE_evaluators - vfmt->EvalCoord1f = _mesa_noop_EvalCoord1f; - vfmt->EvalCoord1fv = _mesa_noop_EvalCoord1fv; - vfmt->EvalCoord2f = _mesa_noop_EvalCoord2f; - vfmt->EvalCoord2fv = _mesa_noop_EvalCoord2fv; - vfmt->EvalPoint1 = _mesa_noop_EvalPoint1; - vfmt->EvalPoint2 = _mesa_noop_EvalPoint2; -#endif + + _MESA_INIT_EVAL_VTXFMT(vfmt, _mesa_noop_); + vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT; vfmt->FogCoordfvEXT = _mesa_noop_FogCoordfvEXT; vfmt->Indexf = _mesa_noop_Indexf; @@ -1070,6 +1066,4 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) vfmt->DrawElementsBaseVertex = _mesa_noop_DrawElementsBaseVertex; vfmt->DrawRangeElementsBaseVertex = _mesa_noop_DrawRangeElementsBaseVertex; vfmt->MultiDrawElementsBaseVertex = _mesa_noop_MultiDrawElementsBaseVertex; - vfmt->EvalMesh1 = _mesa_noop_EvalMesh1; - vfmt->EvalMesh2 = _mesa_noop_EvalMesh2; } diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 6994f98504d..03ee7fb04d9 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -94,9 +94,7 @@ #if FEATURE_dlist #include "dlist.h" #endif -#if FEATURE_evaluators #include "eval.h" -#endif #include "enums.h" #include "extensions.h" #include "fbobject.h" @@ -675,9 +673,7 @@ init_attrib_groups(GLcontext *ctx) #if FEATURE_dlist _mesa_init_display_list( ctx ); #endif -#if FEATURE_evaluators _mesa_init_eval( ctx ); -#endif _mesa_init_fbobjects( ctx ); _mesa_init_feedback( ctx ); _mesa_init_fog( ctx ); @@ -977,9 +973,7 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_free_attrib_data(ctx); _mesa_free_lighting_data( ctx ); -#if FEATURE_evaluators _mesa_free_eval_data( ctx ); -#endif _mesa_free_texture_data( ctx ); _mesa_free_matrix_data( ctx ); _mesa_free_viewport_data( ctx ); diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 35f9a3cf03a..189743e5f56 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1876,7 +1876,7 @@ save_Enable(GLenum cap) static void GLAPIENTRY -_mesa_save_EvalMesh1(GLenum mode, GLint i1, GLint i2) +save_EvalMesh1(GLenum mode, GLint i1, GLint i2) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -1894,7 +1894,7 @@ _mesa_save_EvalMesh1(GLenum mode, GLint i1, GLint i2) static void GLAPIENTRY -_mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) +save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -8451,8 +8451,8 @@ _mesa_init_dlist_table(struct _glapi_table *table) SET_DrawPixels(table, save_DrawPixels); SET_Enable(table, save_Enable); SET_EndList(table, _mesa_EndList); - SET_EvalMesh1(table, _mesa_save_EvalMesh1); - SET_EvalMesh2(table, _mesa_save_EvalMesh2); + SET_EvalMesh1(table, save_EvalMesh1); + SET_EvalMesh2(table, save_EvalMesh2); SET_Finish(table, exec_Finish); SET_Flush(table, exec_Flush); SET_Fogf(table, save_Fogf); @@ -9302,12 +9302,9 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) vfmt->Color4fv = save_Color4fv; vfmt->EdgeFlag = save_EdgeFlag; vfmt->End = save_End; - vfmt->EvalCoord1f = save_EvalCoord1f; - vfmt->EvalCoord1fv = save_EvalCoord1fv; - vfmt->EvalCoord2f = save_EvalCoord2f; - vfmt->EvalCoord2fv = save_EvalCoord2fv; - vfmt->EvalPoint1 = save_EvalPoint1; - vfmt->EvalPoint2 = save_EvalPoint2; + + _MESA_INIT_EVAL_VTXFMT(vfmt, save_); + vfmt->FogCoordfEXT = save_FogCoordfEXT; vfmt->FogCoordfvEXT = save_FogCoordfvEXT; vfmt->Indexf = save_Indexf; @@ -9356,8 +9353,6 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) vfmt->VertexAttrib4fARB = save_VertexAttrib4fARB; vfmt->VertexAttrib4fvARB = save_VertexAttrib4fvARB; - vfmt->EvalMesh1 = _mesa_save_EvalMesh1; - vfmt->EvalMesh2 = _mesa_save_EvalMesh2; vfmt->Rectf = save_Rectf; /* The driver is required to implement these as diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c index 3f89f9c1eae..95d6e231879 100644 --- a/src/mesa/main/eval.c +++ b/src/mesa/main/eval.c @@ -44,6 +44,10 @@ #include "eval.h" #include "macros.h" #include "mtypes.h" +#include "glapi/dispatch.h" + + +#if FEATURE_evaluators /* @@ -417,7 +421,7 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, -void GLAPIENTRY +static void GLAPIENTRY _mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points ) { @@ -425,7 +429,7 @@ _mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, } -void GLAPIENTRY +static void GLAPIENTRY _mesa_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points ) { @@ -516,7 +520,7 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, } -void GLAPIENTRY +static void GLAPIENTRY _mesa_Map2f( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, @@ -527,7 +531,7 @@ _mesa_Map2f( GLenum target, } -void GLAPIENTRY +static void GLAPIENTRY _mesa_Map2d( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, @@ -539,7 +543,7 @@ _mesa_Map2d( GLenum target, -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ) { GET_CURRENT_CONTEXT(ctx); @@ -604,7 +608,7 @@ _mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ) { GET_CURRENT_CONTEXT(ctx); @@ -669,7 +673,7 @@ _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_GetMapiv( GLenum target, GLenum query, GLint *v ) { GET_CURRENT_CONTEXT(ctx); @@ -735,7 +739,7 @@ _mesa_GetMapiv( GLenum target, GLenum query, GLint *v ) -void GLAPIENTRY +static void GLAPIENTRY _mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ) { GET_CURRENT_CONTEXT(ctx); @@ -753,14 +757,14 @@ _mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ) } -void GLAPIENTRY +static void GLAPIENTRY _mesa_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 ) { _mesa_MapGrid1f( un, (GLfloat) u1, (GLfloat) u2 ); } -void GLAPIENTRY +static void GLAPIENTRY _mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 ) { @@ -788,7 +792,7 @@ _mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2, } -void GLAPIENTRY +static void GLAPIENTRY _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 ) { @@ -797,6 +801,41 @@ _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2, } +void +_mesa_install_eval_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt) +{ + SET_EvalCoord1f(disp, vfmt->EvalCoord1f); + SET_EvalCoord1fv(disp, vfmt->EvalCoord1fv); + SET_EvalCoord2f(disp, vfmt->EvalCoord2f); + SET_EvalCoord2fv(disp, vfmt->EvalCoord2fv); + SET_EvalPoint1(disp, vfmt->EvalPoint1); + SET_EvalPoint2(disp, vfmt->EvalPoint2); + + SET_EvalMesh1(disp, vfmt->EvalMesh1); + SET_EvalMesh2(disp, vfmt->EvalMesh2); +} + + +void +_mesa_init_eval_dispatch(struct _glapi_table *disp) +{ + SET_GetMapdv(disp, _mesa_GetMapdv); + SET_GetMapfv(disp, _mesa_GetMapfv); + SET_GetMapiv(disp, _mesa_GetMapiv); + SET_Map1d(disp, _mesa_Map1d); + SET_Map1f(disp, _mesa_Map1f); + SET_Map2d(disp, _mesa_Map2d); + SET_Map2f(disp, _mesa_Map2f); + SET_MapGrid1d(disp, _mesa_MapGrid1d); + SET_MapGrid1f(disp, _mesa_MapGrid1f); + SET_MapGrid2d(disp, _mesa_MapGrid2d); + SET_MapGrid2f(disp, _mesa_MapGrid2f); +} + + +#endif /* FEATURE_evaluators */ + /**********************************************************************/ /***** Initialization *****/ diff --git a/src/mesa/main/eval.h b/src/mesa/main/eval.h index b3ff0a96f82..ffd1bab76da 100644 --- a/src/mesa/main/eval.h +++ b/src/mesa/main/eval.h @@ -37,13 +37,22 @@ #define EVAL_H -#include "mtypes.h" +#include "main/mtypes.h" -#if _HAVE_FULL_GL -extern void _mesa_init_eval( GLcontext *ctx ); -extern void _mesa_free_eval_data( GLcontext *ctx ); +#if FEATURE_evaluators +#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) \ + do { \ + (vfmt)->EvalCoord1f = impl ## EvalCoord1f; \ + (vfmt)->EvalCoord1fv = impl ## EvalCoord1fv; \ + (vfmt)->EvalCoord2f = impl ## EvalCoord2f; \ + (vfmt)->EvalCoord2fv = impl ## EvalCoord2fv; \ + (vfmt)->EvalPoint1 = impl ## EvalPoint1; \ + (vfmt)->EvalPoint2 = impl ## EvalPoint2; \ + (vfmt)->EvalMesh1 = impl ## EvalMesh1; \ + (vfmt)->EvalMesh2 = impl ## EvalMesh2; \ + } while (0) extern GLuint _mesa_evaluator_components( GLenum target ); @@ -70,59 +79,32 @@ extern GLfloat *_mesa_copy_map_points2d(GLenum target, GLint vstride, GLint vorder, const GLdouble *points ); +extern void +_mesa_install_eval_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt); +extern void +_mesa_init_eval_dispatch(struct _glapi_table *disp); -extern void GLAPIENTRY -_mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, - GLint order, const GLfloat *points ); - -extern void GLAPIENTRY -_mesa_Map2f( GLenum target, - GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, - const GLfloat *points ); - -extern void GLAPIENTRY -_mesa_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, - GLint order, const GLdouble *points ); - -extern void GLAPIENTRY -_mesa_Map2d( GLenum target, - GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, - GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, - const GLdouble *points ); - -extern void GLAPIENTRY -_mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); +#else /* FEATURE_evaluators */ -extern void GLAPIENTRY -_mesa_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); +#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) do { } while (0) -extern void GLAPIENTRY -_mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2, - GLint vn, GLfloat v1, GLfloat v2 ); +static INLINE void +_mesa_install_eval_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt) +{ +} -extern void GLAPIENTRY -_mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2, - GLint vn, GLdouble v1, GLdouble v2 ); +static INLINE void +_mesa_init_eval_dispatch(struct _glapi_table *disp) +{ +} -extern void GLAPIENTRY -_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ); +#endif /* FEATURE_evaluators */ -extern void GLAPIENTRY -_mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ); - -extern void GLAPIENTRY -_mesa_GetMapiv( GLenum target, GLenum query, GLint *v ); - -#else - -/** No-op */ -#define _mesa_init_eval( c ) ((void)0) - -/** No-op */ -#define _mesa_free_eval_data( c ) ((void)0) +extern void _mesa_init_eval( GLcontext *ctx ); +extern void _mesa_free_eval_data( GLcontext *ctx ); -#endif -#endif +#endif /* EVAL_H */ diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index de9479d6b0b..c35e4dabe3b 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -34,6 +34,7 @@ #include "mtypes.h" #include "state.h" #include "vtxfmt.h" +#include "eval.h" /* The neutral vertex format. This wraps all tnl module functions, @@ -90,12 +91,9 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) SET_Color4f(tab, vfmt->Color4f); SET_Color4fv(tab, vfmt->Color4fv); SET_EdgeFlag(tab, vfmt->EdgeFlag); - SET_EvalCoord1f(tab, vfmt->EvalCoord1f); - SET_EvalCoord1fv(tab, vfmt->EvalCoord1fv); - SET_EvalCoord2f(tab, vfmt->EvalCoord2f); - SET_EvalCoord2fv(tab, vfmt->EvalCoord2fv); - SET_EvalPoint1(tab, vfmt->EvalPoint1); - SET_EvalPoint2(tab, vfmt->EvalPoint2); + + _mesa_install_eval_vtxfmt(tab, vfmt); + SET_FogCoordfEXT(tab, vfmt->FogCoordfEXT); SET_FogCoordfvEXT(tab, vfmt->FogCoordfvEXT); SET_Indexf(tab, vfmt->Indexf); @@ -139,9 +137,6 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex); SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex); SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex); - SET_EvalMesh1(tab, vfmt->EvalMesh1); - SET_EvalMesh2(tab, vfmt->EvalMesh2); - ASSERT(tab->EvalMesh2); /* GL_NV_vertex_program */ SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV); diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 238beee030f..cfe8be77e54 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -38,6 +38,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #if FEATURE_dlist #include "main/dlist.h" #endif +#include "main/eval.h" #include "main/state.h" #include "main/light.h" #include "main/api_arrayelt.h" @@ -392,6 +393,7 @@ do { \ +#if FEATURE_evaluators /* Eval */ static void GLAPIENTRY vbo_exec_EvalCoord1f( GLfloat u ) @@ -485,6 +487,12 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j ) vbo_exec_EvalCoord2f( u, v ); } +/* use noop eval mesh */ +#define vbo_exec_EvalMesh1 _mesa_noop_EvalMesh1 +#define vbo_exec_EvalMesh2 _mesa_noop_EvalMesh2 + +#endif /* FEATURE_evaluators */ + /* Build a list of primitives on the fly. Keep * ctx->Driver.CurrentExecPrimitive uptodate as well. @@ -565,17 +573,10 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) vfmt->CallLists = _mesa_CallLists; #endif vfmt->End = vbo_exec_End; - vfmt->EvalCoord1f = vbo_exec_EvalCoord1f; - vfmt->EvalCoord1fv = vbo_exec_EvalCoord1fv; - vfmt->EvalCoord2f = vbo_exec_EvalCoord2f; - vfmt->EvalCoord2fv = vbo_exec_EvalCoord2fv; - vfmt->EvalPoint1 = vbo_exec_EvalPoint1; - vfmt->EvalPoint2 = vbo_exec_EvalPoint2; - vfmt->Rectf = _mesa_noop_Rectf; - vfmt->EvalMesh1 = _mesa_noop_EvalMesh1; - vfmt->EvalMesh2 = _mesa_noop_EvalMesh2; + _MESA_INIT_EVAL_VTXFMT(vfmt, vbo_exec_); + vfmt->Rectf = _mesa_noop_Rectf; /* from attrib_tmp.h: */ diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 6e113443808..611460dc7ba 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -72,6 +72,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/context.h" #include "main/dlist.h" #include "main/enums.h" +#include "main/eval.h" #include "main/macros.h" #include "main/api_noop.h" #include "main/api_validate.h" @@ -1050,18 +1051,12 @@ static void _save_vtxfmt_init( GLcontext *ctx ) */ vfmt->CallList = _save_CallList; /* inside begin/end */ vfmt->CallLists = _save_CallLists; /* inside begin/end */ - vfmt->EvalCoord1f = _save_EvalCoord1f; - vfmt->EvalCoord1fv = _save_EvalCoord1fv; - vfmt->EvalCoord2f = _save_EvalCoord2f; - vfmt->EvalCoord2fv = _save_EvalCoord2fv; - vfmt->EvalPoint1 = _save_EvalPoint1; - vfmt->EvalPoint2 = _save_EvalPoint2; + + _MESA_INIT_EVAL_VTXFMT(vfmt, _save_); /* These are all errors as we at least know we are in some sort of * begin/end pair: */ - vfmt->EvalMesh1 = _save_EvalMesh1; - vfmt->EvalMesh2 = _save_EvalMesh2; vfmt->Begin = _save_Begin; vfmt->Rectf = _save_Rectf; vfmt->DrawArrays = _save_DrawArrays; -- cgit v1.2.3 From a73ba2d31b87e974f6846a8aaced704634f6f657 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 9 Sep 2009 15:00:08 +0800 Subject: mesa/main: Make FEATURE_dlist follow feature conventions. As shown in mfeatures.h, this allows users of dlist.h to work without knowing if the feature is available. --- src/mesa/main/api_exec.c | 13 +------ src/mesa/main/api_noop.c | 9 ++--- src/mesa/main/context.c | 8 ++--- src/mesa/main/dlist.c | 64 ++++++++++++++++++++++++++--------- src/mesa/main/dlist.h | 82 ++++++++++++++++++++++++++------------------- src/mesa/main/shared.c | 4 --- src/mesa/main/vtxfmt.c | 6 ++-- src/mesa/vbo/vbo_exec_api.c | 7 +--- src/mesa/vbo/vbo_save_api.c | 3 +- 9 files changed, 110 insertions(+), 86 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index fc4de3c14c1..1559984f43a 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -54,9 +54,7 @@ #include "context.h" #include "convolve.h" #include "depth.h" -#if FEATURE_dlist #include "dlist.h" -#endif #include "drawpix.h" #include "rastpos.h" #include "enable.h" @@ -179,17 +177,8 @@ _mesa_init_exec_table(struct _glapi_table *exec) SET_Viewport(exec, _mesa_Viewport); _mesa_init_accum_dispatch(exec); + _mesa_init_dlist_dispatch(exec); -#if FEATURE_dlist - SET_CallList(exec, _mesa_CallList); - SET_CallLists(exec, _mesa_CallLists); - SET_DeleteLists(exec, _mesa_DeleteLists); - SET_EndList(exec, _mesa_EndList); - SET_GenLists(exec, _mesa_GenLists); - SET_IsList(exec, _mesa_IsList); - SET_ListBase(exec, _mesa_ListBase); - SET_NewList(exec, _mesa_NewList); -#endif SET_ClearDepth(exec, _mesa_ClearDepth); SET_ClearIndex(exec, _mesa_ClearIndex); SET_ClipPlane(exec, _mesa_ClipPlane); diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index 23c52177d8e..06c287fd194 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -30,9 +30,7 @@ #include "context.h" #include "light.h" #include "macros.h" -#if FEATURE_dlist #include "dlist.h" -#endif #include "eval.h" #include "glapi/dispatch.h" @@ -996,10 +994,9 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = _mesa_noop_Begin; -#if FEATURE_dlist - vfmt->CallList = _mesa_CallList; - vfmt->CallLists = _mesa_CallLists; -#endif + + _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_); + vfmt->Color3f = _mesa_noop_Color3f; vfmt->Color3fv = _mesa_noop_Color3fv; vfmt->Color4f = _mesa_noop_Color4f; diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 03ee7fb04d9..11b1d244538 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -91,9 +91,7 @@ #include "cpuinfo.h" #include "debug.h" #include "depth.h" -#if FEATURE_dlist #include "dlist.h" -#endif #include "eval.h" #include "enums.h" #include "extensions.h" @@ -670,9 +668,7 @@ init_attrib_groups(GLcontext *ctx) _mesa_init_current( ctx ); _mesa_init_depth( ctx ); _mesa_init_debug( ctx ); -#if FEATURE_dlist _mesa_init_display_list( ctx ); -#endif _mesa_init_eval( ctx ); _mesa_init_fbobjects( ctx ); _mesa_init_feedback( ctx ); @@ -869,10 +865,12 @@ _mesa_initialize_context(GLcontext *ctx, _mesa_init_exec_table(ctx->Exec); #endif ctx->CurrentDispatch = ctx->Exec; + #if FEATURE_dlist - _mesa_init_dlist_table(ctx->Save); + _mesa_init_save_table(ctx->Save); _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt ); #endif + /* Neutral tnl module stuff */ _mesa_init_exec_vtxfmt( ctx ); ctx->TnlModule.Current = NULL; diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 189743e5f56..6354ed74748 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -73,6 +73,7 @@ #include "texstate.h" #include "mtypes.h" #include "varray.h" +#include "vtxfmt.h" #if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program #include "shader/arbprogram.h" #include "shader/program.h" @@ -438,6 +439,10 @@ typedef union gl_dlist_node Node; */ static GLuint InstSize[OPCODE_END_OF_LIST + 1]; + +#if FEATURE_dlist + + void mesa_print_display_list(GLuint list); @@ -1047,8 +1052,8 @@ static void invalidate_saved_current_state( GLcontext *ctx ) ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN; } -void GLAPIENTRY -_mesa_save_CallList(GLuint list) +static void GLAPIENTRY +save_CallList(GLuint list) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -1070,8 +1075,8 @@ _mesa_save_CallList(GLuint list) } -void GLAPIENTRY -_mesa_save_CallLists(GLsizei num, GLenum type, const GLvoid * lists) +static void GLAPIENTRY +save_CallLists(GLsizei num, GLenum type, const GLvoid * lists) { GET_CURRENT_CONTEXT(ctx); GLint i; @@ -7426,7 +7431,7 @@ execute_list(GLcontext *ctx, GLuint list) /** * Test if a display list number is valid. */ -GLboolean GLAPIENTRY +static GLboolean GLAPIENTRY _mesa_IsList(GLuint list) { GET_CURRENT_CONTEXT(ctx); @@ -7439,7 +7444,7 @@ _mesa_IsList(GLuint list) /** * Delete a sequence of consecutive display lists. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_DeleteLists(GLuint list, GLsizei range) { GET_CURRENT_CONTEXT(ctx); @@ -7461,7 +7466,7 @@ _mesa_DeleteLists(GLuint list, GLsizei range) * Return a display list number, n, such that lists n through n+range-1 * are free. */ -GLuint GLAPIENTRY +static GLuint GLAPIENTRY _mesa_GenLists(GLsizei range) { GET_CURRENT_CONTEXT(ctx); @@ -7501,7 +7506,7 @@ _mesa_GenLists(GLsizei range) /** * Begin a new display list. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_NewList(GLuint name, GLenum mode) { GET_CURRENT_CONTEXT(ctx); @@ -7551,7 +7556,7 @@ _mesa_NewList(GLuint name, GLenum mode) /** * End definition of current display list. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_EndList(void) { GET_CURRENT_CONTEXT(ctx); @@ -7685,7 +7690,7 @@ _mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists) /** * Set the offset added to list numbers in glCallLists. */ -void GLAPIENTRY +static void GLAPIENTRY _mesa_ListBase(GLuint base) { GET_CURRENT_CONTEXT(ctx); @@ -8420,7 +8425,7 @@ exec_MultiModeDrawElementsIBM(const GLenum * mode, * struct. */ void -_mesa_init_dlist_table(struct _glapi_table *table) +_mesa_init_save_table(struct _glapi_table *table) { _mesa_loopback_init_api_table(table); @@ -8429,8 +8434,8 @@ _mesa_init_dlist_table(struct _glapi_table *table) SET_AlphaFunc(table, save_AlphaFunc); SET_Bitmap(table, save_Bitmap); SET_BlendFunc(table, save_BlendFunc); - SET_CallList(table, _mesa_save_CallList); - SET_CallLists(table, _mesa_save_CallLists); + SET_CallList(table, save_CallList); + SET_CallLists(table, save_CallLists); SET_Clear(table, save_Clear); SET_ClearAccum(table, save_ClearAccum); SET_ClearColor(table, save_ClearColor); @@ -9294,8 +9299,9 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = save_Begin; - vfmt->CallList = _mesa_save_CallList; - vfmt->CallLists = _mesa_save_CallLists; + + _MESA_INIT_DLIST_VTXFMT(vfmt, save_); + vfmt->Color3f = save_Color3f; vfmt->Color3fv = save_Color3fv; vfmt->Color4f = save_Color4f; @@ -9373,6 +9379,32 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) } +void +_mesa_install_dlist_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt) +{ + SET_CallList(disp, vfmt->CallList); + SET_CallLists(disp, vfmt->CallLists); +} + + +void _mesa_init_dlist_dispatch(struct _glapi_table *disp) +{ + SET_CallList(disp, _mesa_CallList); + SET_CallLists(disp, _mesa_CallLists); + + SET_DeleteLists(disp, _mesa_DeleteLists); + SET_EndList(disp, _mesa_EndList); + SET_GenLists(disp, _mesa_GenLists); + SET_IsList(disp, _mesa_IsList); + SET_ListBase(disp, _mesa_ListBase); + SET_NewList(disp, _mesa_NewList); +} + + +#endif /* FEATURE_dlist */ + + /** * Initialize display list state for given context. */ @@ -9397,5 +9429,7 @@ _mesa_init_display_list(GLcontext *ctx) /* Display List group */ ctx->List.ListBase = 0; +#if FEATURE_dlist _mesa_save_vtxfmt_init(&ctx->ListState.ListVtxfmt); +#endif } diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h index ab7ec2c8db3..af36991d5ec 100644 --- a/src/mesa/main/dlist.h +++ b/src/mesa/main/dlist.h @@ -33,41 +33,34 @@ #define DLIST_H -#include "mtypes.h" +#include "main/mtypes.h" -#if _HAVE_FULL_GL +#if FEATURE_dlist -extern void -_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist); +#define _MESA_INIT_DLIST_FUNCTIONS(driver, impl) \ + do { \ + (driver)->NewList = impl ## NewList; \ + (driver)->EndList = impl ## EndList; \ + (driver)->BeginCallList = impl ## BeginCallList; \ + (driver)->EndCallList = impl ## EndCallList; \ + (driver)->SaveFlushVertices = impl ## SaveFlushVertices; \ + (driver)->NotifySaveBegin = impl ## NotifyBegin; \ + } while (0) + +#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) \ + do { \ + (vfmt)->CallList = impl ## CallList; \ + (vfmt)->CallLists = impl ## CallLists; \ + } while (0) extern void GLAPIENTRY _mesa_CallList( GLuint list ); extern void GLAPIENTRY _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists ); -extern void GLAPIENTRY _mesa_DeleteLists( GLuint list, GLsizei range ); - -extern void GLAPIENTRY _mesa_EndList( void ); - -extern GLuint GLAPIENTRY _mesa_GenLists( GLsizei range ); - -extern GLboolean GLAPIENTRY _mesa_IsList( GLuint list ); - -extern void GLAPIENTRY _mesa_ListBase( GLuint base ); - -extern void GLAPIENTRY _mesa_NewList( GLuint list, GLenum mode ); - -extern void GLAPIENTRY _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists ); - -extern void GLAPIENTRY _mesa_save_CallList( GLuint list ); - - - -extern void _mesa_init_dlist_table( struct _glapi_table *table ); extern void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s ); - extern void *_mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint sz); extern GLint _mesa_alloc_opcode( GLcontext *ctx, GLuint sz, @@ -75,22 +68,43 @@ extern GLint _mesa_alloc_opcode( GLcontext *ctx, GLuint sz, void (*destroy)( GLcontext *, void * ), void (*print)( GLcontext *, void * ) ); -extern void _mesa_init_display_list( GLcontext * ctx ); +extern void _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist); extern void _mesa_save_vtxfmt_init( GLvertexformat *vfmt ); +extern void _mesa_init_save_table( struct _glapi_table *table ); + +extern void _mesa_install_dlist_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt); + +extern void _mesa_init_dlist_dispatch(struct _glapi_table *disp); -#else +#else /* FEATURE_dlist */ -/** No-op */ -#define _mesa_init_dlist_table(t,ts) ((void)0) +#define _MESA_INIT_DLIST_FUNCTIONS(driver, impl) do { } while (0) +#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) do { } while (0) -/** No-op */ -#define _mesa_init_display_list(c) ((void)0) +static INLINE void +_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist) +{ + /* there should be no list to delete */ + ASSERT_NO_FEATURE(); +} -/** No-op */ -#define _mesa_save_vtxfmt_init(v) ((void)0) +static INLINE void +_mesa_install_dlist_vtxfmt(struct _glapi_table *disp, + const GLvertexformat *vfmt) +{ +} + +static INLINE void +_mesa_init_dlist_dispatch(struct _glapi_table *disp) +{ +} + +#endif /* FEATURE_dlist */ + +extern void _mesa_init_display_list( GLcontext * ctx ); -#endif -#endif +#endif /* DLIST_H */ diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index 643ad3354e7..4d01e8abc6e 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -37,9 +37,7 @@ #include "shared.h" #include "shader/program.h" #include "shader/shader_api.h" -#if FEATURE_dlist #include "dlist.h" -#endif #if FEATURE_ATI_fragment_shader #include "shader/atifragshader.h" #endif @@ -143,11 +141,9 @@ _mesa_alloc_shared_state(GLcontext *ctx) static void delete_displaylist_cb(GLuint id, void *data, void *userData) { -#if FEATURE_dlist struct gl_display_list *list = (struct gl_display_list *) data; GLcontext *ctx = (GLcontext *) userData; _mesa_delete_list(ctx, list); -#endif } diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index c35e4dabe3b..8336ff34d29 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -35,6 +35,7 @@ #include "state.h" #include "vtxfmt.h" #include "eval.h" +#include "dlist.h" /* The neutral vertex format. This wraps all tnl module functions, @@ -125,8 +126,9 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) SET_Vertex3fv(tab, vfmt->Vertex3fv); SET_Vertex4f(tab, vfmt->Vertex4f); SET_Vertex4fv(tab, vfmt->Vertex4fv); - SET_CallList(tab, vfmt->CallList); - SET_CallLists(tab, vfmt->CallLists); + + _mesa_install_dlist_vtxfmt(tab, vfmt); + SET_Begin(tab, vfmt->Begin); SET_End(tab, vfmt->End); SET_Rectf(tab, vfmt->Rectf); diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index cfe8be77e54..3eb85789fa8 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -35,9 +35,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/context.h" #include "main/macros.h" #include "main/vtxfmt.h" -#if FEATURE_dlist #include "main/dlist.h" -#endif #include "main/eval.h" #include "main/state.h" #include "main/light.h" @@ -568,12 +566,9 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_); vfmt->Begin = vbo_exec_Begin; -#if FEATURE_dlist - vfmt->CallList = _mesa_CallList; - vfmt->CallLists = _mesa_CallLists; -#endif vfmt->End = vbo_exec_End; + _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_); _MESA_INIT_EVAL_VTXFMT(vfmt, vbo_exec_); vfmt->Rectf = _mesa_noop_Rectf; diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 611460dc7ba..4da248e2b88 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1049,8 +1049,7 @@ static void _save_vtxfmt_init( GLcontext *ctx ) /* This will all require us to fallback to saving the list as opcodes: */ - vfmt->CallList = _save_CallList; /* inside begin/end */ - vfmt->CallLists = _save_CallLists; /* inside begin/end */ + _MESA_INIT_DLIST_VTXFMT(vfmt, _save_); /* inside begin/end */ _MESA_INIT_EVAL_VTXFMT(vfmt, _save_); -- cgit v1.2.3 From cef97267d696d37f4dccb22951499ca25d5d87ad Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 12 Sep 2009 18:59:13 +0800 Subject: mesa/main: New feature FEATURE_beginend. This feature corresponds to the Begin/End paradigm. Disabling this feature also eliminates the use of GLvertexformat completely. --- src/mesa/main/api_loopback.c | 7 ++++ src/mesa/main/api_loopback.h | 16 ++++++-- src/mesa/main/api_noop.c | 6 +++ src/mesa/main/api_noop.h | 9 +++-- src/mesa/main/mfeatures.h | 4 +- src/mesa/main/vtxfmt.c | 6 +++ src/mesa/main/vtxfmt.h | 28 ++++++++++++- src/mesa/vbo/vbo_exec.h | 18 +++++++++ src/mesa/vbo/vbo_exec_api.c | 94 +++++++++++++++++++++++++++++++++++++++++++- src/mesa/vbo/vbo_exec_draw.c | 6 +++ 10 files changed, 184 insertions(+), 10 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 0e3f5ff9570..3d466ac44a8 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -77,6 +77,10 @@ #define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x)) #define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c)) + +#if FEATURE_beginend + + static void GLAPIENTRY loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue ) { @@ -1655,3 +1659,6 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest ) SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB); SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB); } + + +#endif /* FEATURE_beginend */ diff --git a/src/mesa/main/api_loopback.h b/src/mesa/main/api_loopback.h index 6f85bbc1d92..3140eb515ee 100644 --- a/src/mesa/main/api_loopback.h +++ b/src/mesa/main/api_loopback.h @@ -27,11 +27,19 @@ #ifndef API_LOOPBACK_H #define API_LOOPBACK_H -#include "glheader.h" +#include "main/mtypes.h" - -struct _glapi_table; +#if FEATURE_beginend extern void _mesa_loopback_init_api_table( struct _glapi_table *dest ); -#endif +#else /* FEATURE_beginend */ + +static INLINE void +_mesa_loopback_init_api_table( struct _glapi_table *dest ) +{ +} + +#endif /* FEATURE_beginend */ + +#endif /* API_LOOPBACK_H */ diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index 06c287fd194..f72f957300d 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -43,6 +43,9 @@ */ +#if FEATURE_beginend + + static void GLAPIENTRY _mesa_noop_EdgeFlag( GLboolean b ) { GET_CURRENT_CONTEXT(ctx); @@ -1064,3 +1067,6 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) vfmt->DrawRangeElementsBaseVertex = _mesa_noop_DrawRangeElementsBaseVertex; vfmt->MultiDrawElementsBaseVertex = _mesa_noop_MultiDrawElementsBaseVertex; } + + +#endif /* FEATURE_beginend */ diff --git a/src/mesa/main/api_noop.h b/src/mesa/main/api_noop.h index 1150984d64b..e7fd49bafbb 100644 --- a/src/mesa/main/api_noop.h +++ b/src/mesa/main/api_noop.h @@ -25,8 +25,9 @@ #ifndef _API_NOOP_H #define _API_NOOP_H -#include "mtypes.h" -#include "context.h" +#include "main/mtypes.h" + +#if FEATURE_beginend extern void GLAPIENTRY _mesa_noop_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); @@ -54,4 +55,6 @@ _mesa_noop_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, extern void _mesa_noop_vtxfmt_init(GLvertexformat *vfmt); -#endif +#endif /* FEATURE_beginend */ + +#endif /* _API_NOOP_H */ diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h index 27799771a58..c2fb8404b16 100644 --- a/src/mesa/main/mfeatures.h +++ b/src/mesa/main/mfeatures.h @@ -71,10 +71,12 @@ #define FEATURE_accum _HAVE_FULL_GL #define FEATURE_arrayelt _HAVE_FULL_GL #define FEATURE_attrib_stack _HAVE_FULL_GL +/* this disables vtxfmt, api_loopback, and api_noop completely */ +#define FEATURE_beginend _HAVE_FULL_GL #define FEATURE_colortable _HAVE_FULL_GL #define FEATURE_convolve _HAVE_FULL_GL #define FEATURE_dispatch _HAVE_FULL_GL -#define FEATURE_dlist (_HAVE_FULL_GL && FEATURE_arrayelt) +#define FEATURE_dlist (_HAVE_FULL_GL && FEATURE_arrayelt && FEATURE_beginend) #define FEATURE_draw_read_buffer _HAVE_FULL_GL #define FEATURE_drawpix _HAVE_FULL_GL #define FEATURE_evaluators _HAVE_FULL_GL diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index 8336ff34d29..c9eea8ab830 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -38,6 +38,9 @@ #include "dlist.h" +#if FEATURE_beginend + + /* The neutral vertex format. This wraps all tnl module functions, * verifying that the currently-installed module is valid and then * installing the function pointers in a lazy fashion. It records the @@ -195,3 +198,6 @@ void _mesa_restore_exec_vtxfmt( GLcontext *ctx ) tnl->SwapCount = 0; } + + +#endif /* FEATURE_beginend */ diff --git a/src/mesa/main/vtxfmt.h b/src/mesa/main/vtxfmt.h index 76f108e0232..fb6c23abe98 100644 --- a/src/mesa/main/vtxfmt.h +++ b/src/mesa/main/vtxfmt.h @@ -33,6 +33,8 @@ #ifndef _VTXFMT_H_ #define _VTXFMT_H_ +#if FEATURE_beginend + extern void _mesa_init_exec_vtxfmt( GLcontext *ctx ); extern void _mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ); @@ -40,4 +42,28 @@ extern void _mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfm extern void _mesa_restore_exec_vtxfmt( GLcontext *ctx ); -#endif +#else /* FEATURE_beginend */ + +static INLINE void +_mesa_init_exec_vtxfmt( GLcontext *ctx ) +{ +} + +static INLINE void +_mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) +{ +} + +static INLINE void +_mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) +{ +} + +static INLINE void +_mesa_restore_exec_vtxfmt( GLcontext *ctx ) +{ +} + +#endif /* FEATURE_beginend */ + +#endif /* _VTXFMT_H_ */ diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h index e0f44892cff..516be0995b2 100644 --- a/src/mesa/vbo/vbo_exec.h +++ b/src/mesa/vbo/vbo_exec.h @@ -161,8 +161,26 @@ void vbo_exec_array_destroy( struct vbo_exec_context *exec ); void vbo_exec_vtx_init( struct vbo_exec_context *exec ); void vbo_exec_vtx_destroy( struct vbo_exec_context *exec ); + +#if FEATURE_beginend + void vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ); void vbo_exec_vtx_map( struct vbo_exec_context *exec ); + +#else /* FEATURE_beginend */ + +static INLINE void +vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) +{ +} + +static INLINE void +vbo_exec_vtx_map( struct vbo_exec_context *exec ) +{ +} + +#endif /* FEATURE_beginend */ + void vbo_exec_vtx_wrap( struct vbo_exec_context *exec ); void vbo_exec_eval_update( struct vbo_exec_context *exec ); diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 3eb85789fa8..bfa6d76886a 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -348,7 +348,7 @@ static void vbo_exec_fixup_vertex( GLcontext *ctx, } - +#if FEATURE_beginend /* */ @@ -635,6 +635,98 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) } +#else /* FEATURE_beginend */ + + +#define ATTR( A, N, V0, V1, V2, V3 ) \ +do { \ + struct vbo_exec_context *exec = &vbo_context(ctx)->exec; \ + \ + /* FLUSH_UPDATE_CURRENT needs to be set manually */ \ + exec->ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT; \ + \ + if (exec->vtx.active_sz[A] != N) \ + vbo_exec_fixup_vertex(ctx, A, N); \ + \ + { \ + GLfloat *dest = exec->vtx.attrptr[A]; \ + if (N>0) dest[0] = V0; \ + if (N>1) dest[1] = V1; \ + if (N>2) dest[2] = V2; \ + if (N>3) dest[3] = V3; \ + } \ +} while (0) + +#define ERROR() _mesa_error( ctx, GL_INVALID_ENUM, __FUNCTION__ ) +#define TAG(x) vbo_##x + +#include "vbo_attrib_tmp.h" + +static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec ) +{ + /* silence warnings */ + (void) vbo_Color3f; + (void) vbo_Color3fv; + (void) vbo_Color4f; + (void) vbo_Color4fv; + (void) vbo_FogCoordfEXT; + (void) vbo_FogCoordfvEXT; + (void) vbo_MultiTexCoord1f; + (void) vbo_MultiTexCoord1fv; + (void) vbo_MultiTexCoord2f; + (void) vbo_MultiTexCoord2fv; + (void) vbo_MultiTexCoord3f; + (void) vbo_MultiTexCoord3fv; + (void) vbo_MultiTexCoord4f; + (void) vbo_MultiTexCoord4fv; + (void) vbo_Normal3f; + (void) vbo_Normal3fv; + (void) vbo_SecondaryColor3fEXT; + (void) vbo_SecondaryColor3fvEXT; + (void) vbo_TexCoord1f; + (void) vbo_TexCoord1fv; + (void) vbo_TexCoord2f; + (void) vbo_TexCoord2fv; + (void) vbo_TexCoord3f; + (void) vbo_TexCoord3fv; + (void) vbo_TexCoord4f; + (void) vbo_TexCoord4fv; + (void) vbo_Vertex2f; + (void) vbo_Vertex2fv; + (void) vbo_Vertex3f; + (void) vbo_Vertex3fv; + (void) vbo_Vertex4f; + (void) vbo_Vertex4fv; + + (void) vbo_VertexAttrib1fARB; + (void) vbo_VertexAttrib1fvARB; + (void) vbo_VertexAttrib2fARB; + (void) vbo_VertexAttrib2fvARB; + (void) vbo_VertexAttrib3fARB; + (void) vbo_VertexAttrib3fvARB; + (void) vbo_VertexAttrib4fARB; + (void) vbo_VertexAttrib4fvARB; + + (void) vbo_VertexAttrib1fNV; + (void) vbo_VertexAttrib1fvNV; + (void) vbo_VertexAttrib2fNV; + (void) vbo_VertexAttrib2fvNV; + (void) vbo_VertexAttrib3fNV; + (void) vbo_VertexAttrib3fvNV; + (void) vbo_VertexAttrib4fNV; + (void) vbo_VertexAttrib4fvNV; + + (void) vbo_Materialfv; + + (void) vbo_EdgeFlag; + (void) vbo_Indexf; + (void) vbo_Indexfv; +} + + +#endif /* FEATURE_beginend */ + + /** * Tell the VBO module to use a real OpenGL vertex buffer object to * store accumulated immediate-mode vertex data. diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 0c258c535e0..ee148df4a12 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -35,6 +35,9 @@ #include "vbo_context.h" +#if FEATURE_beginend + + static void vbo_exec_debug_verts( struct vbo_exec_context *exec ) { @@ -411,3 +414,6 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) exec->vtx.prim_count = 0; exec->vtx.vert_count = 0; } + + +#endif /* FEATURE_beginend */ -- cgit v1.2.3 From 49fbdd18ed738feaf73b7faba4d3577cd9cc3e59 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 Feb 2009 03:54:58 -0800 Subject: i965: Fix massive memory allocation for streaming texture usage. Once we've freed a miptree, we won't see any more state cache requests that would hit the things that pointed at it until we've let the miptree get released back into the BO cache to be reused. By leaving those surface state and binding table pointers that pointed at it around, we would end up with up to (500 * texture size) in memory uselessly consumed by the state cache. Bug #20057 Bug #23530 --- src/mesa/drivers/dri/i965/brw_state.h | 1 + src/mesa/drivers/dri/i965/brw_state_cache.c | 49 ++++++++++++++++++++++++++ src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 16 +++++++++ 3 files changed, 66 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 5335eac8951..d639656b9d4 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -151,6 +151,7 @@ void brw_state_cache_check_size( struct brw_context *brw ); void brw_init_caches( struct brw_context *brw ); void brw_destroy_caches( struct brw_context *brw ); +void brw_state_cache_bo_delete(struct brw_cache *cache, dri_bo *bo); /*********************************************************************** * brw_state_batch.c diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c index e40d7a04164..f8e46aacf71 100644 --- a/src/mesa/drivers/dri/i965/brw_state_cache.c +++ b/src/mesa/drivers/dri/i965/brw_state_cache.c @@ -517,6 +517,55 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache) brw->state.dirty.cache |= ~0; } +/* Clear all entries from the cache that point to the given bo. + * + * This lets us release memory for reuse earlier for known-dead buffers, + * at the cost of walking the entire hash table. + */ +void +brw_state_cache_bo_delete(struct brw_cache *cache, dri_bo *bo) +{ + struct brw_cache_item **prev; + GLuint i; + + if (INTEL_DEBUG & DEBUG_STATE) + _mesa_printf("%s\n", __FUNCTION__); + + for (i = 0; i < cache->size; i++) { + for (prev = &cache->items[i]; *prev;) { + struct brw_cache_item *c = *prev; + int j; + + for (j = 0; j < c->nr_reloc_bufs; j++) { + if (c->reloc_bufs[j] == bo) + break; + } + + if (j != c->nr_reloc_bufs) { + + *prev = c->next; + + for (j = 0; j < c->nr_reloc_bufs; j++) + dri_bo_unreference(c->reloc_bufs[j]); + dri_bo_unreference(c->bo); + free((void *)c->key); + free(c); + cache->n_items--; + + /* Delete up the tree. Notably we're trying to get from + * a request to delete the surface, to deleting the surface state + * object, to deleting the binding table. We're slack and restart + * the deletion process when we do this because the other delete + * may kill our *prev. + */ + brw_state_cache_bo_delete(cache, c->bo); + prev = &cache->items[i]; + } else { + prev = &(*prev)->next; + } + } + } +} void brw_state_cache_check_size(struct brw_context *brw) diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index c985da5aa25..4f5101a3128 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -29,6 +29,9 @@ #include "intel_mipmap_tree.h" #include "intel_regions.h" #include "intel_chipset.h" +#ifndef I915 +#include "brw_state.h" +#endif #include "main/enums.h" #define FILE_DEBUG_FLAG DEBUG_MIPTREE @@ -269,6 +272,19 @@ intel_miptree_release(struct intel_context *intel, DBG("%s deleting %p\n", __FUNCTION__, *mt); +#ifndef I915 + /* Free up cached binding tables holding a reference on our buffer, to + * avoid excessive memory consumption. + * + * This isn't as aggressive as we could be, as we'd like to do + * it from any time we free the last ref on a region. But intel_region.c + * is context-agnostic. Perhaps our constant state cache should be, as + * well. + */ + brw_state_cache_bo_delete(&brw_context(&intel->ctx)->surface_cache, + (*mt)->region->buffer); +#endif + intel_region_release(&((*mt)->region)); for (i = 0; i < MAX_TEXTURE_LEVELS; i++) -- cgit v1.2.3 From ae2daacbac7242938cffe0e2409071e030e00863 Mon Sep 17 00:00:00 2001 From: Cooper Yuan Date: Thu, 1 Oct 2009 17:54:27 +0800 Subject: st/mesa: fix non-mipmap lastLevel calculation. reviewed by Brian Paul. --- src/mesa/state_tracker/st_cb_texture.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 771a0e2bbdf..9a634bb9302 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1766,7 +1766,11 @@ st_finalize_texture(GLcontext *ctx, * incomplete. In that case, we'll have set stObj->lastLevel before * we get here. */ - stObj->lastLevel = stObj->base._MaxLevel - stObj->base.BaseLevel; + if (stObj->base.MinFilter == GL_LINEAR || + stObj->base.MinFilter == GL_NEAREST) + stObj->lastLevel = stObj->base.BaseLevel; + else + stObj->lastLevel = stObj->base._MaxLevel - stObj->base.BaseLevel; } firstImage = st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); -- cgit v1.2.3 From 4456006ba626890172289111403e469f49106e18 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 1 Oct 2009 14:34:23 +0100 Subject: gallium: remove depth.occlusion_count flag This was redundant as drivers can just keep track of whether they are inside a begin/end query pair. We want to add more query types later and also support nested queries, none of which map well onto a flag like this. No driver appeared to be using the flag. --- src/gallium/drivers/llvmpipe/lp_bld_depth.c | 3 --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 1 - src/gallium/drivers/softpipe/sp_video_context.c | 1 - src/gallium/include/pipe/p_state.h | 1 - src/gallium/state_trackers/g3dvl/vl_context.c | 1 - src/mesa/state_tracker/st_atom_depth.c | 4 ---- 6 files changed, 11 deletions(-) (limited to 'src/mesa') diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c index 21c665c4d4c..98ec1cb1b9d 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c @@ -210,7 +210,4 @@ lp_build_depth_test(LLVMBuilderRef builder, dst = lp_build_select(&bld, z_bitmask, src, dst); LLVMBuildStore(builder, dst, dst_ptr); } - - /* FIXME */ - assert(!state->occlusion_count); } diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index d5ce6993c5d..b00be0cc32a 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -401,7 +401,6 @@ generate_fragment(struct llvmpipe_context *lp, if(key->depth.enabled) { debug_printf("depth.func = %s\n", debug_dump_func(key->depth.func, TRUE)); debug_printf("depth.writemask = %u\n", key->depth.writemask); - debug_printf("depth.occlusion_count = %u\n", key->depth.occlusion_count); } if(key->alpha.enabled) { debug_printf("alpha.func = %s\n", debug_dump_func(key->alpha.func, TRUE)); diff --git a/src/gallium/drivers/softpipe/sp_video_context.c b/src/gallium/drivers/softpipe/sp_video_context.c index ccb29726b6a..7e9136d8e09 100644 --- a/src/gallium/drivers/softpipe/sp_video_context.c +++ b/src/gallium/drivers/softpipe/sp_video_context.c @@ -167,7 +167,6 @@ init_pipe_state(struct sp_mpeg12_context *ctx) dsa.depth.enabled = 0; dsa.depth.writemask = 0; dsa.depth.func = PIPE_FUNC_ALWAYS; - dsa.depth.occlusion_count = 0; for (i = 0; i < 2; ++i) { dsa.stencil[i].enabled = 0; dsa.stencil[i].func = PIPE_FUNC_ALWAYS; diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index b59d6b7ae32..287b424e4ac 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -197,7 +197,6 @@ struct pipe_depth_state unsigned enabled:1; /**< depth test enabled? */ unsigned writemask:1; /**< allow depth buffer writes? */ unsigned func:3; /**< depth test func (PIPE_FUNC_x) */ - unsigned occlusion_count:1; /**< do occlusion counting? */ }; diff --git a/src/gallium/state_trackers/g3dvl/vl_context.c b/src/gallium/state_trackers/g3dvl/vl_context.c index 5cfd233c4c1..cfbf618d742 100644 --- a/src/gallium/state_trackers/g3dvl/vl_context.c +++ b/src/gallium/state_trackers/g3dvl/vl_context.c @@ -69,7 +69,6 @@ static int vlInitCommon(struct vlContext *context) dsa.depth.enabled = 0; dsa.depth.writemask = 0; dsa.depth.func = PIPE_FUNC_ALWAYS; - dsa.depth.occlusion_count = 0; for (i = 0; i < 2; ++i) { dsa.stencil[i].enabled = 0; diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c index 0aa128f9479..88b80a07fc9 100644 --- a/src/mesa/state_tracker/st_atom_depth.c +++ b/src/mesa/state_tracker/st_atom_depth.c @@ -104,10 +104,6 @@ update_depth_stencil_alpha(struct st_context *st) dsa->depth.func = st_compare_func_to_pipe(ctx->Depth.Func); } - if (ctx->Query.CurrentOcclusionObject && - ctx->Query.CurrentOcclusionObject->Active) - dsa->depth.occlusion_count = 1; - if (ctx->Stencil.Enabled && ctx->DrawBuffer->Visual.stencilBits > 0) { dsa->stencil[0].enabled = 1; dsa->stencil[0].func = st_compare_func_to_pipe(ctx->Stencil.Function[0]); -- cgit v1.2.3 From f8d8f4527884d018a51daf8cc6281b52ce083b9e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 30 Sep 2009 09:30:27 -0600 Subject: mesa: better debug message --- src/mesa/main/texobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 678845ece06..f8ce811eb29 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -491,7 +491,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx, t->Image[face][baseLevel]->Width2 != w || t->Image[face][baseLevel]->Height2 != h) { t->_Complete = GL_FALSE; - incomplete(t, "Non-quare cubemap image"); + incomplete(t, "Cube face missing or mismatched size"); return; } } -- cgit v1.2.3 From 18883cdf2334511005973155fc517eb678dc0043 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 1 Oct 2009 13:33:20 -0600 Subject: mesa: Return -FLT_MAX instead of 0 for LG2(0). lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0 for LG2(0). --- src/mesa/shader/prog_execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 69b81e724a2..192d39aed1e 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -939,7 +939,7 @@ _mesa_execute_program(GLcontext * ctx, /* The fast LOG2 macro doesn't meet the precision requirements. */ if (a[0] == 0.0F) { - val = 0.0F; + val = -FLT_MAX; } else { val = log(a[0]) * 1.442695F; -- cgit v1.2.3 From 994d1db079b4947e6f10ab22a4b366a676382345 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 30 Jul 2009 12:32:40 -0700 Subject: i915: Let i915_program_error take a format string, and don't use _mesa_problem. It's misleading to report things like the program having too many native instructions as a Mesa implementation error, when the program may just be too big for the hardware. --- src/mesa/drivers/dri/i915/i915_fragprog.c | 17 ++++++++++------- src/mesa/drivers/dri/i915/i915_program.c | 17 +++++++++++++---- src/mesa/drivers/dri/i915/i915_program.h | 2 +- 3 files changed, 24 insertions(+), 12 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 2db10c60e99..beed8ef1979 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -89,7 +89,8 @@ src_vector(struct i915_fragment_program *p, */ case PROGRAM_TEMPORARY: if (source->Index >= I915_MAX_TEMPORARY) { - i915_program_error(p, "Exceeded max temporary reg"); + i915_program_error(p, "Exceeded max temporary reg: %d/%d", + source->Index, I915_MAX_TEMPORARY); return 0; } src = UREG(REG_TYPE_R, source->Index); @@ -124,7 +125,7 @@ src_vector(struct i915_fragment_program *p, break; default: - i915_program_error(p, "Bad source->Index"); + i915_program_error(p, "Bad source->Index: %d", source->Index); return 0; } break; @@ -153,7 +154,7 @@ src_vector(struct i915_fragment_program *p, break; default: - i915_program_error(p, "Bad source->File"); + i915_program_error(p, "Bad source->File: %d", source->File); return 0; } @@ -186,13 +187,14 @@ get_result_vector(struct i915_fragment_program *p, p->depth_written = 1; return UREG(REG_TYPE_OD, 0); default: - i915_program_error(p, "Bad inst->DstReg.Index"); + i915_program_error(p, "Bad inst->DstReg.Index: %d", + inst->DstReg.Index); return 0; } case PROGRAM_TEMPORARY: return UREG(REG_TYPE_R, inst->DstReg.Index); default: - i915_program_error(p, "Bad inst->DstReg.File"); + i915_program_error(p, "Bad inst->DstReg.File: %d", inst->DstReg.File); return 0; } } @@ -231,7 +233,7 @@ translate_tex_src_target(struct i915_fragment_program *p, GLubyte bit) case TEXTURE_CUBE_INDEX: return D0_SAMPLE_TYPE_CUBE; default: - i915_program_error(p, "TexSrcBit"); + i915_program_error(p, "TexSrcBit: %d", bit); return 0; } } @@ -870,7 +872,8 @@ upload_program(struct i915_fragment_program *p) return; default: - i915_program_error(p, "bad opcode"); + i915_program_error(p, "bad opcode: %s", + _mesa_opcode_string(inst->Opcode)); return; } diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index e87700f8e0a..85a1b0cf5d9 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -424,12 +424,21 @@ i915_emit_param4fv(struct i915_fragment_program * p, const GLfloat * values) return 0; } - - +/* Warning the user about program errors seems to be quite valuable, from + * our bug reports. It unfortunately means piglit reporting errors + * when we fall back to software due to an unsupportable program, though. + */ void -i915_program_error(struct i915_fragment_program *p, const char *msg) +i915_program_error(struct i915_fragment_program *p, const char *fmt, ...) { - _mesa_problem(NULL, "i915_program_error: %s", msg); + va_list args; + + fprintf(stderr, "i915_program_error: "); + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); + + fprintf(stderr, "\n"); p->error = 1; } diff --git a/src/mesa/drivers/dri/i915/i915_program.h b/src/mesa/drivers/dri/i915/i915_program.h index 14a3f08801f..1074d24f9e4 100644 --- a/src/mesa/drivers/dri/i915/i915_program.h +++ b/src/mesa/drivers/dri/i915/i915_program.h @@ -145,7 +145,7 @@ extern GLuint i915_emit_param4fv(struct i915_fragment_program *p, const GLfloat * values); extern void i915_program_error(struct i915_fragment_program *p, - const char *msg); + const char *fmt, ...); extern void i915_init_program(struct i915_context *i915, struct i915_fragment_program *p); -- cgit v1.2.3 From 4ff816751f74b0645c198372937eec589c458a60 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Jul 2009 22:39:15 -0700 Subject: i915: Bail when the fragment program has too many total instructions. Previously, we'd go trashing the heap. --- src/mesa/drivers/dri/i915/i915_program.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index 85a1b0cf5d9..6ccc9eea3e0 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -186,6 +186,11 @@ i915_emit_arith(struct i915_fragment_program * p, p->utemp_flag = old_utemp_flag; /* restore */ } + if (p->csr >= p->program + I915_PROGRAM_SIZE) { + i915_program_error(p, "Program contains too many instructions"); + return UREG_BAD; + } + *(p->csr++) = (op | A0_DEST(dest) | mask | saturate | A0_SRC0(src0)); *(p->csr++) = (A1_SRC0(src0) | A1_SRC1(src1)); *(p->csr++) = (A2_SRC1(src1) | A2_SRC2(src2)); @@ -270,6 +275,11 @@ GLuint i915_emit_texld( struct i915_fragment_program *p, p->register_phases[GET_UREG_NR(coord)] == p->nr_tex_indirect) p->nr_tex_indirect++; + if (p->csr >= p->program + I915_PROGRAM_SIZE) { + i915_program_error(p, "Program contains too many instructions"); + return UREG_BAD; + } + *(p->csr++) = (op | T0_DEST( dest ) | T0_SAMPLER( sampler )); -- cgit v1.2.3 From d6fbf87575a59e24c5d47b8b6b8700ee4583709b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Jul 2009 22:46:14 -0700 Subject: Revert "i915: don't validate PS program when falling back to software" This reverts commit e7044d552c6d16389447880b8744a51de1cf0199. It prevented the driver from ever recovering from a software fallback due to a program error. The original bug it claimed to fix doesn't appear to exist post-revert. --- src/mesa/drivers/dri/i915/i915_vtbl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 9a723d3cd73..9e2523932f1 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -54,8 +54,7 @@ i915_render_prevalidate(struct intel_context *intel) { struct i915_context *i915 = i915_context(&intel->ctx); - if (!intel->Fallback) - i915ValidateFragmentProgram(i915); + i915ValidateFragmentProgram(i915); } static void -- cgit v1.2.3 From 61b512c47c9888f3ff117faf3aceccfb52d59c3a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Jul 2009 23:37:04 -0700 Subject: i915: Update and translate the fragment program along with state updates. Previously, we were doing it in the midst of the pipeline run, which gave an opportunity to enable/disable fallbacks, which is certainly the wrong time to be doing so. This manifested itself in a NULL dereference for PutRow after transitioning out of a fallback during a run_pipeline in glean glsl1. --- src/mesa/drivers/dri/i915/i915_context.c | 3 +++ src/mesa/drivers/dri/i915/i915_fragprog.c | 32 +++++++++++++++++++++---------- src/mesa/drivers/dri/i915/i915_program.c | 2 -- src/mesa/drivers/dri/i915/i915_program.h | 3 +-- 4 files changed, 26 insertions(+), 14 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 3ab7d682ee7..b342503772b 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -40,6 +40,7 @@ #include "utils.h" #include "i915_reg.h" +#include "i915_program.h" #include "intel_regions.h" #include "intel_batchbuffer.h" @@ -80,6 +81,8 @@ i915InvalidateState(GLcontext * ctx, GLuint new_state) i915_update_stencil(ctx); if (new_state & (_NEW_LIGHT)) i915_update_provoking_vertex(ctx); + if (new_state & (_NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS)) + i915_update_program(ctx); } diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index beed8ef1979..929a6eb8352 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -1058,6 +1058,28 @@ i915ProgramStringNotify(GLcontext * ctx, _tnl_program_string(ctx, target, prog); } +void +i915_update_program(GLcontext *ctx) +{ + struct intel_context *intel = intel_context(ctx); + struct i915_context *i915 = i915_context(&intel->ctx); + struct i915_fragment_program *fp = + (struct i915_fragment_program *) ctx->FragmentProgram._Current; + + if (i915->current_program != fp) { + if (i915->current_program) { + i915->current_program->on_hardware = 0; + i915->current_program->params_uptodate = 0; + } + + i915->current_program = fp; + } + + if (!fp->translated) + translate_program(fp); + + FALLBACK(&i915->intel, I915_FALLBACK_PROGRAM, fp->error); +} void i915ValidateFragmentProgram(struct i915_context *i915) @@ -1075,16 +1097,6 @@ i915ValidateFragmentProgram(struct i915_context *i915) GLuint s2 = S2_TEXCOORD_NONE; int i, offset = 0; - if (i915->current_program != p) { - if (i915->current_program) { - i915->current_program->on_hardware = 0; - i915->current_program->params_uptodate = 0; - } - - i915->current_program = p; - } - - /* Important: */ VB->AttribPtr[VERT_ATTRIB_POS] = VB->NdcPtr; diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index 6ccc9eea3e0..fd3019b234a 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -530,8 +530,6 @@ i915_upload_program(struct i915_context *i915, GLuint program_size = p->csr - p->program; GLuint decl_size = p->decl - p->declarations; - FALLBACK(&i915->intel, I915_FALLBACK_PROGRAM, p->error); - /* Could just go straight to the batchbuffer from here: */ if (i915->state.ProgramSize != (program_size + decl_size) || diff --git a/src/mesa/drivers/dri/i915/i915_program.h b/src/mesa/drivers/dri/i915/i915_program.h index 1074d24f9e4..0d17d048653 100644 --- a/src/mesa/drivers/dri/i915/i915_program.h +++ b/src/mesa/drivers/dri/i915/i915_program.h @@ -155,7 +155,6 @@ extern void i915_upload_program(struct i915_context *i915, extern void i915_fini_program(struct i915_fragment_program *p); - - +extern void i915_update_program(GLcontext *ctx); #endif -- cgit v1.2.3 From 96a3c69d48bb7c021181e061d010cca08198ae4c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 30 Jul 2009 00:03:21 -0700 Subject: i915: Increase maximum program size to the hardware limits. This fixes potential heap trashing if the program of choice exceeds limits, and fixes the native instructions limit being lower than what can be used by valid programs. --- src/mesa/drivers/dri/i915/i915_context.h | 15 ++++++++++----- src/mesa/drivers/dri/i915/i915_program.c | 8 ++++++-- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h index 8de4a9d0d36..082d6144425 100644 --- a/src/mesa/drivers/dri/i915/i915_context.h +++ b/src/mesa/drivers/dri/i915/i915_context.h @@ -121,10 +121,14 @@ enum { #define I915_MAX_CONSTANT 32 #define I915_CONSTANT_SIZE (2+(4*I915_MAX_CONSTANT)) +#define I915_MAX_INSN (I915_MAX_DECL_INSN + \ + I915_MAX_TEX_INSN + \ + I915_MAX_ALU_INSN) -#define I915_PROGRAM_SIZE 192 - -#define I915_MAX_INSN (I915_MAX_TEX_INSN+I915_MAX_ALU_INSN) +/* Maximum size of the program packet, which matches the limits on + * decl, tex, and ALU instructions. + */ +#define I915_PROGRAM_SIZE (I915_MAX_INSN * 3 + 1) /* Hardware version of a parsed fragment program. "Derived" from the * mesa fragment_program struct. @@ -154,8 +158,9 @@ struct i915_fragment_program */ GLcontext *ctx; - GLuint declarations[I915_PROGRAM_SIZE]; - GLuint program[I915_PROGRAM_SIZE]; + /* declarations contains the packet header. */ + GLuint declarations[I915_MAX_DECL_INSN * 3 + 1]; + GLuint program[(I915_MAX_TEX_INSN + I915_MAX_ALU_INSN) * 3]; GLfloat constant[I915_MAX_CONSTANT][4]; GLuint constant_flags[I915_MAX_CONSTANT]; diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index fd3019b234a..e7908bd48fc 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -130,6 +130,7 @@ i915_emit_decl(struct i915_fragment_program *p, *(p->decl++) = (D0_DCL | D0_DEST(reg) | d0_flags); *(p->decl++) = D1_MBZ; *(p->decl++) = D2_MBZ; + assert(p->decl <= p->declarations + ARRAY_SIZE(p->declarations)); p->nr_decl_insn++; return reg; @@ -186,7 +187,7 @@ i915_emit_arith(struct i915_fragment_program * p, p->utemp_flag = old_utemp_flag; /* restore */ } - if (p->csr >= p->program + I915_PROGRAM_SIZE) { + if (p->csr >= p->program + ARRAY_SIZE(p->program)) { i915_program_error(p, "Program contains too many instructions"); return UREG_BAD; } @@ -275,7 +276,7 @@ GLuint i915_emit_texld( struct i915_fragment_program *p, p->register_phases[GET_UREG_NR(coord)] == p->nr_tex_indirect) p->nr_tex_indirect++; - if (p->csr >= p->program + I915_PROGRAM_SIZE) { + if (p->csr >= p->program + ARRAY_SIZE(p->program)) { i915_program_error(p, "Program contains too many instructions"); return UREG_BAD; } @@ -530,6 +531,9 @@ i915_upload_program(struct i915_context *i915, GLuint program_size = p->csr - p->program; GLuint decl_size = p->decl - p->declarations; + if (p->error) + return; + /* Could just go straight to the batchbuffer from here: */ if (i915->state.ProgramSize != (program_size + decl_size) || -- cgit v1.2.3 From 7d4b7460b0e565d0574c00d1d40c426cfebc290d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Jul 2009 12:15:14 -0700 Subject: i915: Enable ARB_vertex_shader for both i915 and i830. Since the TNL is all done in software anyway, it should be the same to the user who's probably using ARB_vertex_program otherwise, but gives them a nicer programming environment. --- src/mesa/drivers/dri/i915/intel_tris.c | 2 ++ src/mesa/drivers/dri/intel/intel_extensions.c | 8 +++--- src/mesa/drivers/dri/intel/intel_span.c | 37 +++++++++++++++++++++++++++ src/mesa/drivers/dri/intel/intel_span.h | 2 ++ 4 files changed, 45 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index a905455342d..0641e6df9d7 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -1076,7 +1076,9 @@ intelRunPipeline(GLcontext * ctx) intel->NewGLState = 0; } + intel_map_vertex_shader_textures(ctx); _tnl_run_pipeline(ctx); + intel_unmap_vertex_shader_textures(ctx); _mesa_unlock_context_textures(ctx); } diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 5431cf90a1b..f10eda7cc7a 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -80,6 +80,9 @@ static const struct dri_extension card_extensions[] = { { "GL_ARB_multitexture", NULL }, { "GL_ARB_point_parameters", GL_ARB_point_parameters_functions }, { "GL_ARB_point_sprite", NULL }, + { "GL_ARB_shader_objects", GL_ARB_shader_objects_functions }, + { "GL_ARB_shading_language_100", GL_VERSION_2_0_functions }, + { "GL_ARB_shading_language_120", GL_VERSION_2_1_functions }, { "GL_ARB_sync", GL_ARB_sync_functions }, { "GL_ARB_texture_border_clamp", NULL }, { "GL_ARB_texture_cube_map", NULL }, @@ -91,6 +94,7 @@ static const struct dri_extension card_extensions[] = { { "GL_ARB_texture_rectangle", NULL }, { "GL_ARB_vertex_array_object", GL_ARB_vertex_array_object_functions}, { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }, + { "GL_ARB_vertex_shader", GL_ARB_vertex_shader_functions }, { "GL_ARB_window_pos", GL_ARB_window_pos_functions }, { "GL_EXT_blend_color", GL_EXT_blend_color_functions }, { "GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions }, @@ -150,13 +154,9 @@ static const struct dri_extension brw_extensions[] = { { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions }, { "GL_ARB_point_sprite", NULL }, { "GL_ARB_seamless_cube_map", NULL }, - { "GL_ARB_shader_objects", GL_ARB_shader_objects_functions }, - { "GL_ARB_shading_language_100", GL_VERSION_2_0_functions }, - { "GL_ARB_shading_language_120", GL_VERSION_2_1_functions }, { "GL_ARB_shadow", NULL }, { "GL_MESA_texture_signed_rgba", NULL }, { "GL_ARB_texture_non_power_of_two", NULL }, - { "GL_ARB_vertex_shader", GL_ARB_vertex_shader_functions }, { "GL_EXT_shadow_funcs", NULL }, { "GL_EXT_stencil_two_side", GL_EXT_stencil_two_side_functions }, { "GL_EXT_texture_sRGB", NULL }, diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index 28eabbc0054..dcfcad1d952 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -558,6 +558,43 @@ intelInitSpanFuncs(GLcontext * ctx) swdd->SpanRenderFinish = intelSpanRenderFinish; } +void +intel_map_vertex_shader_textures(GLcontext *ctx) +{ + struct intel_context *intel = intel_context(ctx); + int i; + + if (ctx->VertexProgram._Current == NULL) + return; + + for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { + if (ctx->Texture.Unit[i]._ReallyEnabled && + ctx->VertexProgram._Current->Base.TexturesUsed[i] != 0) { + struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current; + + intel_tex_map_images(intel, intel_texture_object(texObj)); + } + } +} + +void +intel_unmap_vertex_shader_textures(GLcontext *ctx) +{ + struct intel_context *intel = intel_context(ctx); + int i; + + if (ctx->VertexProgram._Current == NULL) + return; + + for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { + if (ctx->Texture.Unit[i]._ReallyEnabled && + ctx->VertexProgram._Current->Base.TexturesUsed[i] != 0) { + struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current; + + intel_tex_unmap_images(intel, intel_texture_object(texObj)); + } + } +} /** * Plug in appropriate span read/write functions for the given renderbuffer. diff --git a/src/mesa/drivers/dri/intel/intel_span.h b/src/mesa/drivers/dri/intel/intel_span.h index acbeb4abe1c..bffe109aa5b 100644 --- a/src/mesa/drivers/dri/intel/intel_span.h +++ b/src/mesa/drivers/dri/intel/intel_span.h @@ -36,5 +36,7 @@ void intel_renderbuffer_map(struct intel_context *intel, struct gl_renderbuffer *rb); void intel_renderbuffer_unmap(struct intel_context *intel, struct gl_renderbuffer *rb); +void intel_map_vertex_shader_textures(GLcontext *ctx); +void intel_unmap_vertex_shader_textures(GLcontext *ctx); #endif -- cgit v1.2.3 From f9f31b25740887373806cb489e5480dc9b261805 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 1 Oct 2009 14:00:28 -0700 Subject: i915: Add support for varying inputs. --- src/mesa/drivers/dri/i915/i915_context.c | 2 +- src/mesa/drivers/dri/i915/i915_fragprog.c | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index b342503772b..7d4c7cfbabb 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -142,7 +142,7 @@ i915CreateContext(const __GLcontextModes * mesaVis, ctx->Const.MaxTextureUnits = I915_TEX_UNITS; ctx->Const.MaxTextureImageUnits = I915_TEX_UNITS; ctx->Const.MaxTextureCoordUnits = I915_TEX_UNITS; - + ctx->Const.MaxVarying = I915_TEX_UNITS; /* Advertise the full hardware capabilities. The new memory * manager should cope much better with overload situations: diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 929a6eb8352..66db7e1645c 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -122,6 +122,19 @@ src_vector(struct i915_fragment_program *p, src = i915_emit_decl(p, REG_TYPE_T, T_TEX0 + (source->Index - FRAG_ATTRIB_TEX0), D0_CHANNEL_ALL); + break; + + case FRAG_ATTRIB_VAR0: + case FRAG_ATTRIB_VAR0 + 1: + case FRAG_ATTRIB_VAR0 + 2: + case FRAG_ATTRIB_VAR0 + 3: + case FRAG_ATTRIB_VAR0 + 4: + case FRAG_ATTRIB_VAR0 + 5: + case FRAG_ATTRIB_VAR0 + 6: + case FRAG_ATTRIB_VAR0 + 7: + src = i915_emit_decl(p, REG_TYPE_T, + T_TEX0 + (source->Index - FRAG_ATTRIB_VAR0), + D0_CHANNEL_ALL); break; default: @@ -909,7 +922,7 @@ check_wpos(struct i915_fragment_program *p) p->wpos_tex = -1; for (i = 0; i < p->ctx->Const.MaxTextureCoordUnits; i++) { - if (inputs & FRAG_BIT_TEX(i)) + if (inputs & (FRAG_BIT_TEX(i) | FRAG_BIT_VAR(i))) continue; else if (inputs & FRAG_BIT_WPOS) { p->wpos_tex = i; @@ -1140,6 +1153,14 @@ i915ValidateFragmentProgram(struct i915_context *i915) EMIT_ATTR(_TNL_ATTRIB_TEX0 + i, EMIT_SZ(sz), 0, sz * 4); } + else if (inputsRead & FRAG_BIT_VAR(i)) { + int sz = VB->AttribPtr[_TNL_ATTRIB_GENERIC0 + i]->size; + + s2 &= ~S2_TEXCOORD_FMT(i, S2_TEXCOORD_FMT0_MASK); + s2 |= S2_TEXCOORD_FMT(i, SZ_TO_HW(sz)); + + EMIT_ATTR(_TNL_ATTRIB_GENERIC0 + i, EMIT_SZ(sz), 0, sz * 4); + } else if (i == p->wpos_tex) { /* If WPOS is required, duplicate the XYZ position data in an -- cgit v1.2.3 From 67f4d626d39f2c340fa1632d3e4344c547301508 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Jul 2009 20:44:39 -0700 Subject: i915: Add support or fallbacks for GLSL fragment shader opcodes. --- src/mesa/drivers/dri/i915/i915_fragprog.c | 162 +++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 66db7e1645c..d5659e762f3 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -366,7 +366,7 @@ upload_program(struct i915_fragment_program *p) while (1) { GLuint src0, src1, src2, flags; - GLuint tmp = 0, consts0 = 0, consts1 = 0; + GLuint tmp = 0, dst, consts0 = 0, consts1 = 0; switch (inst->Opcode) { case OPCODE_ABS: @@ -518,6 +518,10 @@ upload_program(struct i915_fragment_program *p) EMIT_1ARG_ARITH(A0_FLR); break; + case OPCODE_TRUNC: + EMIT_1ARG_ARITH(A0_TRC); + break; + case OPCODE_FRC: EMIT_1ARG_ARITH(A0_FRC); break; @@ -531,6 +535,22 @@ upload_program(struct i915_fragment_program *p) 0, src0, T0_TEXKILL); break; + case OPCODE_KIL_NV: + if (inst->DstReg.CondMask == COND_TR) { + tmp = i915_get_utemp(p); + + i915_emit_texld(p, get_live_regs(p, inst), + tmp, A0_DEST_CHANNEL_ALL, + 0, /* use a dummy dest reg */ + swizzle(tmp, ONE, ONE, ONE, ONE), /* always */ + T0_TEXKILL); + } else { + p->error = 1; + i915_program_error(p, "Unsupported KIL_NV condition code: %d", + inst->DstReg.CondMask); + } + break; + case OPCODE_LG2: src0 = src_vector(p, &inst->SrcReg[0], program); @@ -630,6 +650,20 @@ upload_program(struct i915_fragment_program *p) EMIT_2ARG_ARITH(A0_MUL); break; + case OPCODE_NOISE1: + case OPCODE_NOISE2: + case OPCODE_NOISE3: + case OPCODE_NOISE4: + /* Don't implement noise because we just don't have the instructions + * to spare. We aren't the first vendor to do so. + */ + i915_program_error(p, "Stubbed-out noise functions"); + i915_emit_arith(p, + A0_MOV, + get_result_vector(p, inst), + get_result_flags(inst), 0, + swizzle(src0, ZERO, ZERO, ZERO, ZERO), 0, 0); + case OPCODE_POW: src0 = src_vector(p, &inst->SrcReg[0], program); src1 = src_vector(p, &inst->SrcReg[1], program); @@ -736,9 +770,38 @@ upload_program(struct i915_fragment_program *p) } break; - case OPCODE_SGE: - EMIT_2ARG_ARITH(A0_SGE); - break; + case OPCODE_SEQ: + tmp = i915_get_utemp(p); + flags = get_result_flags(inst); + dst = get_result_vector(p, inst); + + /* dst = src1 >= src2 */ + i915_emit_arith(p, + A0_SGE, + dst, + flags, 0, + src_vector(p, &inst->SrcReg[0], program), + src_vector(p, &inst->SrcReg[1], program), + 0); + /* tmp = src1 <= src2 */ + i915_emit_arith(p, + A0_SGE, + tmp, + flags, 0, + negate(src_vector(p, &inst->SrcReg[0], program), + 1, 1, 1, 1), + negate(src_vector(p, &inst->SrcReg[1], program), + 1, 1, 1, 1), + 0); + /* dst = tmp && dst */ + i915_emit_arith(p, + A0_MUL, + dst, + flags, 0, + dst, + tmp, + 0); + break; case OPCODE_SIN: src0 = src_vector(p, &inst->SrcReg[0], program); @@ -824,10 +887,71 @@ upload_program(struct i915_fragment_program *p) break; + case OPCODE_SGE: + EMIT_2ARG_ARITH(A0_SGE); + break; + + case OPCODE_SGT: + i915_emit_arith(p, + A0_SLT, + get_result_vector( p, inst ), + get_result_flags( inst ), 0, + negate(src_vector( p, &inst->SrcReg[0], program), + 1, 1, 1, 1), + negate(src_vector( p, &inst->SrcReg[1], program), + 1, 1, 1, 1), + 0); + break; + + case OPCODE_SLE: + i915_emit_arith(p, + A0_SGE, + get_result_vector( p, inst ), + get_result_flags( inst ), 0, + negate(src_vector( p, &inst->SrcReg[0], program), + 1, 1, 1, 1), + negate(src_vector( p, &inst->SrcReg[1], program), + 1, 1, 1, 1), + 0); + break; + case OPCODE_SLT: EMIT_2ARG_ARITH(A0_SLT); break; + case OPCODE_SNE: + tmp = i915_get_utemp(p); + flags = get_result_flags(inst); + dst = get_result_vector(p, inst); + + /* dst = src1 < src2 */ + i915_emit_arith(p, + A0_SLT, + dst, + flags, 0, + src_vector(p, &inst->SrcReg[0], program), + src_vector(p, &inst->SrcReg[1], program), + 0); + /* tmp = src1 > src2 */ + i915_emit_arith(p, + A0_SLT, + tmp, + flags, 0, + negate(src_vector(p, &inst->SrcReg[0], program), + 1, 1, 1, 1), + negate(src_vector(p, &inst->SrcReg[1], program), + 1, 1, 1, 1), + 0); + /* dst = tmp || dst */ + i915_emit_arith(p, + A0_ADD, + dst, + flags | A0_DEST_SATURATE, 0, + dst, + tmp, + 0); + break; + case OPCODE_SUB: src0 = src_vector(p, &inst->SrcReg[0], program); src1 = src_vector(p, &inst->SrcReg[1], program); @@ -884,6 +1008,36 @@ upload_program(struct i915_fragment_program *p) case OPCODE_END: return; + case OPCODE_BGNLOOP: + case OPCODE_BGNSUB: + case OPCODE_BRA: + case OPCODE_BRK: + case OPCODE_CAL: + case OPCODE_CONT: + case OPCODE_DDX: + case OPCODE_DDY: + case OPCODE_ELSE: + case OPCODE_ENDIF: + case OPCODE_ENDLOOP: + case OPCODE_ENDSUB: + case OPCODE_IF: + case OPCODE_RET: + p->error = 1; + i915_program_error(p, "Unsupported opcode: %s", + _mesa_opcode_string(inst->Opcode)); + return; + + case OPCODE_EXP: + case OPCODE_LOG: + /* These opcodes are claimed as GLSL, NV_vp, and ARB_vp in + * prog_instruction.h, but apparently GLSL doesn't ever emit them. + * Instead, it translates to EX2 or LG2. + */ + case OPCODE_TXD: + case OPCODE_TXL: + /* These opcodes are claimed by GLSL in prog_instruction.h, but + * only NV_vp/fp appears to emit them. + */ default: i915_program_error(p, "bad opcode: %s", _mesa_opcode_string(inst->Opcode)); -- cgit v1.2.3 From 862a2a55b35d1dec9224b025a6e7a0cf8593a6a7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Jul 2009 13:00:09 -0700 Subject: i915: Add optional support for ARB_fragment_shader under a driconf option. Other vendors have enabled ARB_fragment_shader as part of OpenGL 2.0 enablement even on hardware like the 915 with no dynamic branching or dFdx/dFdy support. But for now we'll leave it disabled because we don't do any flattening of ifs or loops, which is rather restrictive. This support is not complete, and may be unstable depending on your shaders. It passes 10/15 of the piglit glsl tests, but hangs on glean glsl1. --- src/mesa/drivers/dri/i915/i915_fragprog.c | 1 + src/mesa/drivers/dri/intel/intel_context.h | 1 - src/mesa/drivers/dri/intel/intel_extensions.c | 10 +++++++++- src/mesa/drivers/dri/intel/intel_screen.c | 6 +++++- 4 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index d5659e762f3..d9c61446f52 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -160,6 +160,7 @@ src_vector(struct i915_fragment_program *p, case PROGRAM_CONSTANT: case PROGRAM_STATE_VAR: case PROGRAM_NAMED_PARAM: + case PROGRAM_UNIFORM: src = i915_emit_param4fv(p, program->Base.Parameters->ParameterValues[source-> diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index c743ab1c246..b104096912c 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -293,7 +293,6 @@ struct intel_context GLboolean use_texture_tiling; GLboolean use_early_z; - drm_clip_rect_t fboRect; /**< cliprect for FBO rendering */ int perf_boxes; diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index f10eda7cc7a..6831cbbfc85 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -182,6 +182,10 @@ static const struct dri_extension ttm_extensions[] = { { NULL, NULL } }; +static const struct dri_extension fragment_shader_extensions[] = { + { "GL_ARB_fragment_shader", NULL }, + { NULL, NULL } +}; /** * Initializes potential list of extensions if ctx == NULL, or actually enables @@ -205,6 +209,10 @@ intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging) driInitExtensions(ctx, brw_extensions, GL_FALSE); if (intel == NULL || IS_915(intel->intelScreen->deviceID) - || IS_945(intel->intelScreen->deviceID)) + || IS_945(intel->intelScreen->deviceID)) { driInitExtensions(ctx, i915_extensions, GL_FALSE); + + if (intel == NULL || driQueryOptionb(&intel->optionCache, "fragment_shader")) + driInitExtensions(ctx, fragment_shader_extensions, GL_FALSE); + } } diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 1b8c56e68d6..2478e636373 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -79,6 +79,10 @@ PUBLIC const char __driConfigOptions[] = DRI_CONF_DESC(en, "Enable early Z in classic mode (unstable, 945-only).") DRI_CONF_OPT_END + DRI_CONF_OPT_BEGIN(fragment_shader, bool, false) + DRI_CONF_DESC(en, "Enable limited ARB_fragment_shader support on 915/945.") + DRI_CONF_OPT_END + DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY DRI_CONF_FORCE_S3TC_ENABLE(false) @@ -91,7 +95,7 @@ PUBLIC const char __driConfigOptions[] = DRI_CONF_SECTION_END DRI_CONF_END; -const GLuint __driNConfigOptions = 10; +const GLuint __driNConfigOptions = 11; #ifdef USE_NEW_INTERFACE static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; -- cgit v1.2.3 From 81aa5d717bd0098608e9cc292b316293800c7e11 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 29 Jul 2009 13:07:49 -0700 Subject: i915: Add stub ARB_occlusion_query support under a driconf debug option. This is useful for enabling our GLSL testcases using the 2.0 entrypoints even though we don't have full GL 2.0. --- src/mesa/drivers/dri/intel/intel_extensions.c | 5 +++++ src/mesa/drivers/dri/intel/intel_screen.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 6831cbbfc85..2eb08a8f057 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -171,6 +171,7 @@ static const struct dri_extension brw_extensions[] = { static const struct dri_extension arb_oq_extensions[] = { + { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions }, { NULL, NULL } }; @@ -214,5 +215,9 @@ intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging) if (intel == NULL || driQueryOptionb(&intel->optionCache, "fragment_shader")) driInitExtensions(ctx, fragment_shader_extensions, GL_FALSE); + + if (intel == NULL || driQueryOptionb(&intel->optionCache, + "stub_occlusion_query")) + driInitExtensions(ctx, arb_oq_extensions, GL_FALSE); } } diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 2478e636373..24f7fbc9922 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -92,10 +92,14 @@ PUBLIC const char __driConfigOptions[] = DRI_CONF_NO_RAST(false) DRI_CONF_ALWAYS_FLUSH_BATCH(false) DRI_CONF_ALWAYS_FLUSH_CACHE(false) + + DRI_CONF_OPT_BEGIN(stub_occlusion_query, bool, false) + DRI_CONF_DESC(en, "Enable stub ARB_occlusion_query support on 915/945.") + DRI_CONF_OPT_END DRI_CONF_SECTION_END DRI_CONF_END; -const GLuint __driNConfigOptions = 11; +const GLuint __driNConfigOptions = 12; #ifdef USE_NEW_INTERFACE static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; -- cgit v1.2.3 From f1cab802b8e78906413f219ad354f5d5500b4d3f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Oct 2009 08:54:55 -0600 Subject: mesa: added _mesa_meta_check_generate_mipmap_fallback() --- src/mesa/drivers/common/meta.c | 27 ++++++++++++++++++++++++--- src/mesa/drivers/common/meta.h | 4 ++++ 2 files changed, 28 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index a152087a3aa..20d47dc38b0 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -1948,6 +1948,29 @@ _mesa_meta_Bitmap(GLcontext *ctx, } +/** + * Check if the call to _mesa_meta_GenerateMipmap() will require a + * software fallback. The fallback path will require that the texture + * images are mapped. + */ +GLboolean +_mesa_meta_check_generate_mipmap_fallback(GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj) +{ + struct gl_texture_image *baseImage = + _mesa_select_tex_image(ctx, texObj, target, texObj->BaseLevel); + + /* check for fallbacks */ + if (!ctx->Extensions.EXT_framebuffer_object || + target == GL_TEXTURE_3D || + !baseImage || + baseImage->IsCompressed) { + return GL_TRUE; + } + return GL_FALSE; +} + + /** * Called via ctx->Driver.GenerateMipmap() * Note: texture borders and 3D texture support not yet complete. @@ -1976,9 +1999,7 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, GLuint dstLevel; GLuint border = 0; - /* check for fallbacks */ - if (!ctx->Extensions.EXT_framebuffer_object || - target == GL_TEXTURE_3D) { + if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, texObj)) { _mesa_generate_mipmap(ctx, target, texObj); return; } diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h index 7f659528dc0..6225b941893 100644 --- a/src/mesa/drivers/common/meta.h +++ b/src/mesa/drivers/common/meta.h @@ -60,6 +60,10 @@ _mesa_meta_Bitmap(GLcontext *ctx, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap); +extern GLboolean +_mesa_meta_check_generate_mipmap_fallback(GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj); + extern void _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj); -- cgit v1.2.3 From 7d4b348c67dbc2eff1d7dd0c043a76bc0eae57ab Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Oct 2009 08:55:25 -0600 Subject: intel: wrap _mesa_meta_GenerateMipmap() Need to check if we'll take the software path so which requires mapping the src texture image. Fixes crash in piglit gen-compressed-teximage, bug 24219. However, the test still does not pass (it may never have). --- src/mesa/drivers/dri/intel/intel_tex.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index f5d877edc36..3cbc379dbd3 100644 --- a/src/mesa/drivers/dri/intel/intel_tex.c +++ b/src/mesa/drivers/dri/intel/intel_tex.c @@ -2,6 +2,7 @@ #include "main/texobj.h" #include "main/teximage.h" #include "main/mipmap.h" +#include "drivers/common/meta.h" #include "intel_context.h" #include "intel_mipmap_tree.h" #include "intel_tex.h" @@ -158,10 +159,36 @@ timed_memcpy(void *dest, const void *src, size_t n) } #endif /* DO_DEBUG */ + +/** + * Called via ctx->Driver.GenerateMipmap() + * This is basically a wrapper for _mesa_meta_GenerateMipmap() which checks + * if we'll be using software mipmap generation. In that case, we need to + * map/unmap the base level texture image. + */ +static void +intelGenerateMipmap(GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj) +{ + if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, texObj)) { + /* sw path: need to map texture images */ + struct intel_context *intel = intel_context(ctx); + struct intel_texture_object *intelObj = intel_texture_object(texObj); + intel_tex_map_level_images(intel, intelObj, texObj->BaseLevel); + _mesa_generate_mipmap(ctx, target, texObj); + intel_tex_unmap_level_images(intel, intelObj, texObj->BaseLevel); + } + else { + _mesa_meta_GenerateMipmap(ctx, target, texObj); + } +} + + void intelInitTextureFuncs(struct dd_function_table *functions) { functions->ChooseTextureFormat = intelChooseTextureFormat; + functions->GenerateMipmap = intelGenerateMipmap; functions->NewTextureObject = intelNewTextureObject; functions->NewTextureImage = intelNewTextureImage; -- cgit v1.2.3 From 47e41b024e325f69ed514e551a6824afa58f1db6 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Fri, 2 Oct 2009 18:13:26 +0200 Subject: gallium: Preparations for adding more PIPE_TRANSFER_* usage flags. Always test for PIPE_TRANSFER_READ/WRITE using the bit-wise and operator, and add a pipe_transfer_buffer_flags() helper for getting the buffer usage flags corresponding to them. --- src/gallium/auxiliary/util/u_tile.c | 4 ++-- src/gallium/drivers/cell/ppu/cell_texture.c | 18 ++++----------- src/gallium/drivers/i915simple/i915_texture.c | 2 +- src/gallium/drivers/llvmpipe/lp_texture.c | 14 +++--------- src/gallium/drivers/nv04/nv04_transfer.c | 26 +++++----------------- src/gallium/drivers/nv10/nv10_transfer.c | 26 +++++----------------- src/gallium/drivers/nv20/nv20_transfer.c | 26 +++++----------------- src/gallium/drivers/nv30/nv30_transfer.c | 26 +++++----------------- src/gallium/drivers/nv40/nv40_transfer.c | 26 +++++----------------- src/gallium/drivers/nv50/nv50_transfer.c | 4 ++-- src/gallium/drivers/r300/r300_screen.c | 11 ++------- src/gallium/drivers/softpipe/sp_texture.c | 15 +++---------- src/gallium/drivers/trace/tr_screen.c | 2 +- src/gallium/include/pipe/p_inlines.h | 16 +++++++++++++ .../state_trackers/python/retrace/interpreter.py | 2 +- src/gallium/state_trackers/vega/st_inlines.h | 3 +-- src/mesa/state_tracker/st_cb_accum.c | 2 +- src/mesa/state_tracker/st_texture.c | 3 +-- 18 files changed, 63 insertions(+), 163 deletions(-) (limited to 'src/mesa') diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c index 0d6489c26e4..8a22f584bee 100644 --- a/src/gallium/auxiliary/util/u_tile.c +++ b/src/gallium/auxiliary/util/u_tile.c @@ -1452,7 +1452,7 @@ pipe_put_tile_z(struct pipe_transfer *pt, case PIPE_FORMAT_S8Z24_UNORM: { uint *pDest = (uint *) (map + y * pt->stride + x*4); - assert(pt->usage == PIPE_TRANSFER_READ_WRITE); + assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE); for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { /* convert 32-bit Z to 24-bit Z, preserve stencil */ @@ -1479,7 +1479,7 @@ pipe_put_tile_z(struct pipe_transfer *pt, case PIPE_FORMAT_Z24S8_UNORM: { uint *pDest = (uint *) (map + y * pt->stride + x*4); - assert(pt->usage == PIPE_TRANSFER_READ_WRITE); + assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE); for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { /* convert 32-bit Z to 24-bit Z, preserve stencil */ diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c index 6a63a0e6ced..ae4c61efb3b 100644 --- a/src/gallium/drivers/cell/ppu/cell_texture.c +++ b/src/gallium/drivers/cell/ppu/cell_texture.c @@ -389,22 +389,14 @@ cell_transfer_map(struct pipe_screen *screen, struct pipe_transfer *transfer) const uint texWidth = pt->width[level]; const uint texHeight = pt->height[level]; const uint stride = ct->stride[level]; - unsigned flags = 0x0; unsigned size; assert(transfer->texture); - if (transfer->usage != PIPE_TRANSFER_READ) { - flags |= PIPE_BUFFER_USAGE_CPU_WRITE; - } - - if (transfer->usage != PIPE_TRANSFER_WRITE) { - flags |= PIPE_BUFFER_USAGE_CPU_READ; - } - if (!ct->mapped) { /* map now */ - ct->mapped = pipe_buffer_map(screen, ct->buffer, flags); + ct->mapped = pipe_buffer_map(screen, ct->buffer, + pipe_transfer_buffer_flags(transfer)); } /* @@ -417,8 +409,7 @@ cell_transfer_map(struct pipe_screen *screen, struct pipe_transfer *transfer) if (!ctrans->map) return NULL; /* out of memory */ - if (transfer->usage == PIPE_TRANSFER_READ || - transfer->usage == PIPE_TRANSFER_READ_WRITE) { + if (transfer->usage & PIPE_TRANSFER_READ) { /* need to untwiddle the texture to make a linear version */ const uint bpp = pf_get_size(ct->base.format); if (bpp == 4) { @@ -459,8 +450,7 @@ cell_transfer_unmap(struct pipe_screen *screen, PIPE_BUFFER_USAGE_CPU_READ); } - if (transfer->usage == PIPE_TRANSFER_WRITE || - transfer->usage == PIPE_TRANSFER_READ_WRITE) { + if (transfer->usage & PIPE_TRANSFER_WRITE) { /* The user wrote new texture data into the mapped buffer. * We need to convert the new linear data into the twiddled/tiled format. */ diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c index 15ccc1fc73b..286c9ace8e5 100644 --- a/src/gallium/drivers/i915simple/i915_texture.c +++ b/src/gallium/drivers/i915simple/i915_texture.c @@ -859,7 +859,7 @@ i915_transfer_map(struct pipe_screen *screen, char *map; boolean write = FALSE; - if (transfer->usage != PIPE_TRANSFER_READ) + if (transfer->usage & PIPE_TRANSFER_WRITE) write = TRUE; map = iws->buffer_map(iws, tex->buffer, write); diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 724d4378336..08f0950d475 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -353,17 +353,9 @@ llvmpipe_transfer_map( struct pipe_screen *_screen, if(lpt->dt) { struct llvmpipe_winsys *winsys = screen->winsys; - unsigned flags = 0; - if (transfer->usage != PIPE_TRANSFER_READ) { - flags |= PIPE_BUFFER_USAGE_CPU_WRITE; - } - - if (transfer->usage != PIPE_TRANSFER_WRITE) { - flags |= PIPE_BUFFER_USAGE_CPU_READ; - } - - map = winsys->displaytarget_map(winsys, lpt->dt, flags); + map = winsys->displaytarget_map(winsys, lpt->dt, + pipe_transfer_buffer_flags(transfer)); if (map == NULL) return NULL; } @@ -373,7 +365,7 @@ llvmpipe_transfer_map( struct pipe_screen *_screen, /* May want to different things here depending on read/write nature * of the map: */ - if (transfer->texture && transfer->usage != PIPE_TRANSFER_READ) + if (transfer->texture && (transfer->usage & PIPE_TRANSFER_WRITE)) { /* Do something to notify sharing contexts of a texture change. * In llvmpipe, that would mean flushing the texture cache. diff --git a/src/gallium/drivers/nv04/nv04_transfer.c b/src/gallium/drivers/nv04/nv04_transfer.c index 854b855d64a..6618660743d 100644 --- a/src/gallium/drivers/nv04/nv04_transfer.c +++ b/src/gallium/drivers/nv04/nv04_transfer.c @@ -13,22 +13,6 @@ struct nv04_transfer { bool direct; }; -static unsigned nv04_usage_tx_to_buf(unsigned tx_usage) -{ - switch (tx_usage) { - case PIPE_TRANSFER_READ: - return PIPE_BUFFER_USAGE_CPU_READ; - case PIPE_TRANSFER_WRITE: - return PIPE_BUFFER_USAGE_CPU_WRITE; - case PIPE_TRANSFER_READ_WRITE: - return PIPE_BUFFER_USAGE_CPU_READ_WRITE; - default: - assert(0); - } - - return -1; -} - static void nv04_compatible_transfer_tex(struct pipe_texture *pt, unsigned level, struct pipe_texture *template) @@ -86,7 +70,7 @@ nv04_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->direct = true; tx->surface = pscreen->get_tex_surface(pscreen, pt, 0, 0, 0, - nv04_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); return &tx->base; } @@ -103,7 +87,7 @@ nv04_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->surface = pscreen->get_tex_surface(pscreen, tx_tex, face, level, zslice, - nv04_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); pipe_texture_reference(&tx_tex, NULL); @@ -114,7 +98,7 @@ nv04_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, return NULL; } - if (usage != PIPE_TRANSFER_WRITE) { + if (usage & PIPE_TRANSFER_READ) { struct nv04_screen *nvscreen = nv04_screen(pscreen); struct pipe_surface *src; @@ -140,7 +124,7 @@ nv04_transfer_del(struct pipe_transfer *ptx) { struct nv04_transfer *tx = (struct nv04_transfer *)ptx; - if (!tx->direct && ptx->usage != PIPE_TRANSFER_READ) { + if (!tx->direct && (ptx->usage & PIPE_TRANSFER_WRITE)) { struct pipe_screen *pscreen = ptx->texture->screen; struct nv04_screen *nvscreen = nv04_screen(pscreen); struct pipe_surface *dst; @@ -170,7 +154,7 @@ nv04_transfer_map(struct pipe_screen *pscreen, struct pipe_transfer *ptx) struct nv04_surface *ns = (struct nv04_surface *)tx->surface; struct nv04_miptree *mt = (struct nv04_miptree *)tx->surface->texture; void *map = pipe_buffer_map(pscreen, mt->buffer, - nv04_usage_tx_to_buf(ptx->usage)); + pipe_transfer_buffer_flags(ptx)); return map + ns->base.offset + ptx->y * ns->pitch + ptx->x * ptx->block.size; diff --git a/src/gallium/drivers/nv10/nv10_transfer.c b/src/gallium/drivers/nv10/nv10_transfer.c index c06b8d34c72..8feb85e4bda 100644 --- a/src/gallium/drivers/nv10/nv10_transfer.c +++ b/src/gallium/drivers/nv10/nv10_transfer.c @@ -13,22 +13,6 @@ struct nv10_transfer { bool direct; }; -static unsigned nv10_usage_tx_to_buf(unsigned tx_usage) -{ - switch (tx_usage) { - case PIPE_TRANSFER_READ: - return PIPE_BUFFER_USAGE_CPU_READ; - case PIPE_TRANSFER_WRITE: - return PIPE_BUFFER_USAGE_CPU_WRITE; - case PIPE_TRANSFER_READ_WRITE: - return PIPE_BUFFER_USAGE_CPU_READ_WRITE; - default: - assert(0); - } - - return -1; -} - static void nv10_compatible_transfer_tex(struct pipe_texture *pt, unsigned level, struct pipe_texture *template) @@ -86,7 +70,7 @@ nv10_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->direct = true; tx->surface = pscreen->get_tex_surface(pscreen, pt, 0, 0, 0, - nv10_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); return &tx->base; } @@ -103,7 +87,7 @@ nv10_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->surface = pscreen->get_tex_surface(pscreen, tx_tex, face, level, zslice, - nv10_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); pipe_texture_reference(&tx_tex, NULL); @@ -114,7 +98,7 @@ nv10_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, return NULL; } - if (usage != PIPE_TRANSFER_WRITE) { + if (usage & PIPE_TRANSFER_READ) { struct nv10_screen *nvscreen = nv10_screen(pscreen); struct pipe_surface *src; @@ -140,7 +124,7 @@ nv10_transfer_del(struct pipe_transfer *ptx) { struct nv10_transfer *tx = (struct nv10_transfer *)ptx; - if (!tx->direct && ptx->usage != PIPE_TRANSFER_READ) { + if (!tx->direct && (ptx->usage & PIPE_TRANSFER_WRITE)) { struct pipe_screen *pscreen = ptx->texture->screen; struct nv10_screen *nvscreen = nv10_screen(pscreen); struct pipe_surface *dst; @@ -170,7 +154,7 @@ nv10_transfer_map(struct pipe_screen *pscreen, struct pipe_transfer *ptx) struct nv04_surface *ns = (struct nv04_surface *)tx->surface; struct nv10_miptree *mt = (struct nv10_miptree *)tx->surface->texture; void *map = pipe_buffer_map(pscreen, mt->buffer, - nv10_usage_tx_to_buf(ptx->usage)); + pipe_transfer_buffer_flags(ptx)); return map + ns->base.offset + ptx->y * ns->pitch + ptx->x * ptx->block.size; diff --git a/src/gallium/drivers/nv20/nv20_transfer.c b/src/gallium/drivers/nv20/nv20_transfer.c index 5018995596c..81b4f1a9177 100644 --- a/src/gallium/drivers/nv20/nv20_transfer.c +++ b/src/gallium/drivers/nv20/nv20_transfer.c @@ -13,22 +13,6 @@ struct nv20_transfer { bool direct; }; -static unsigned nv20_usage_tx_to_buf(unsigned tx_usage) -{ - switch (tx_usage) { - case PIPE_TRANSFER_READ: - return PIPE_BUFFER_USAGE_CPU_READ; - case PIPE_TRANSFER_WRITE: - return PIPE_BUFFER_USAGE_CPU_WRITE; - case PIPE_TRANSFER_READ_WRITE: - return PIPE_BUFFER_USAGE_CPU_READ_WRITE; - default: - assert(0); - } - - return -1; -} - static void nv20_compatible_transfer_tex(struct pipe_texture *pt, unsigned level, struct pipe_texture *template) @@ -86,7 +70,7 @@ nv20_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->direct = true; tx->surface = pscreen->get_tex_surface(pscreen, pt, 0, 0, 0, - nv20_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); return &tx->base; } @@ -103,7 +87,7 @@ nv20_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->surface = pscreen->get_tex_surface(pscreen, tx_tex, face, level, zslice, - nv20_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); pipe_texture_reference(&tx_tex, NULL); @@ -114,7 +98,7 @@ nv20_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, return NULL; } - if (usage != PIPE_TRANSFER_WRITE) { + if (usage & PIPE_TRANSFER_READ) { struct nv20_screen *nvscreen = nv20_screen(pscreen); struct pipe_surface *src; @@ -140,7 +124,7 @@ nv20_transfer_del(struct pipe_transfer *ptx) { struct nv20_transfer *tx = (struct nv20_transfer *)ptx; - if (!tx->direct && ptx->usage != PIPE_TRANSFER_READ) { + if (!tx->direct && (ptx->usage = PIPE_TRANSFER_WRITE)) { struct pipe_screen *pscreen = ptx->texture->screen; struct nv20_screen *nvscreen = nv20_screen(pscreen); struct pipe_surface *dst; @@ -170,7 +154,7 @@ nv20_transfer_map(struct pipe_screen *pscreen, struct pipe_transfer *ptx) struct nv04_surface *ns = (struct nv04_surface *)tx->surface; struct nv20_miptree *mt = (struct nv20_miptree *)tx->surface->texture; void *map = pipe_buffer_map(pscreen, mt->buffer, - nv20_usage_tx_to_buf(ptx->usage)); + pipe_transfer_buffer_flags(ptx)); return map + ns->base.offset + ptx->y * ns->pitch + ptx->x * ptx->block.size; diff --git a/src/gallium/drivers/nv30/nv30_transfer.c b/src/gallium/drivers/nv30/nv30_transfer.c index 23675718781..98011decf7c 100644 --- a/src/gallium/drivers/nv30/nv30_transfer.c +++ b/src/gallium/drivers/nv30/nv30_transfer.c @@ -13,22 +13,6 @@ struct nv30_transfer { bool direct; }; -static unsigned nv30_usage_tx_to_buf(unsigned tx_usage) -{ - switch (tx_usage) { - case PIPE_TRANSFER_READ: - return PIPE_BUFFER_USAGE_CPU_READ; - case PIPE_TRANSFER_WRITE: - return PIPE_BUFFER_USAGE_CPU_WRITE; - case PIPE_TRANSFER_READ_WRITE: - return PIPE_BUFFER_USAGE_CPU_READ_WRITE; - default: - assert(0); - } - - return -1; -} - static void nv30_compatible_transfer_tex(struct pipe_texture *pt, unsigned level, struct pipe_texture *template) @@ -86,7 +70,7 @@ nv30_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->direct = true; tx->surface = pscreen->get_tex_surface(pscreen, pt, face, level, zslice, - nv30_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); return &tx->base; } @@ -103,7 +87,7 @@ nv30_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->surface = pscreen->get_tex_surface(pscreen, tx_tex, 0, 0, 0, - nv30_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); pipe_texture_reference(&tx_tex, NULL); @@ -114,7 +98,7 @@ nv30_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, return NULL; } - if (usage != PIPE_TRANSFER_WRITE) { + if (usage & PIPE_TRANSFER_READ) { struct nv30_screen *nvscreen = nv30_screen(pscreen); struct pipe_surface *src; @@ -140,7 +124,7 @@ nv30_transfer_del(struct pipe_transfer *ptx) { struct nv30_transfer *tx = (struct nv30_transfer *)ptx; - if (!tx->direct && ptx->usage != PIPE_TRANSFER_READ) { + if (!tx->direct && (ptx->usage & PIPE_TRANSFER_WRITE)) { struct pipe_screen *pscreen = ptx->texture->screen; struct nv30_screen *nvscreen = nv30_screen(pscreen); struct pipe_surface *dst; @@ -170,7 +154,7 @@ nv30_transfer_map(struct pipe_screen *pscreen, struct pipe_transfer *ptx) struct nv04_surface *ns = (struct nv04_surface *)tx->surface; struct nv30_miptree *mt = (struct nv30_miptree *)tx->surface->texture; void *map = pipe_buffer_map(pscreen, mt->buffer, - nv30_usage_tx_to_buf(ptx->usage)); + pipe_transfer_buffer_flags(ptx)); return map + ns->base.offset + ptx->y * ns->pitch + ptx->x * ptx->block.size; diff --git a/src/gallium/drivers/nv40/nv40_transfer.c b/src/gallium/drivers/nv40/nv40_transfer.c index 6d92ac3db9c..92caee6f382 100644 --- a/src/gallium/drivers/nv40/nv40_transfer.c +++ b/src/gallium/drivers/nv40/nv40_transfer.c @@ -13,22 +13,6 @@ struct nv40_transfer { bool direct; }; -static unsigned nv40_usage_tx_to_buf(unsigned tx_usage) -{ - switch (tx_usage) { - case PIPE_TRANSFER_READ: - return PIPE_BUFFER_USAGE_CPU_READ; - case PIPE_TRANSFER_WRITE: - return PIPE_BUFFER_USAGE_CPU_WRITE; - case PIPE_TRANSFER_READ_WRITE: - return PIPE_BUFFER_USAGE_CPU_READ_WRITE; - default: - assert(0); - } - - return -1; -} - static void nv40_compatible_transfer_tex(struct pipe_texture *pt, unsigned level, struct pipe_texture *template) @@ -86,7 +70,7 @@ nv40_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->direct = true; tx->surface = pscreen->get_tex_surface(pscreen, pt, face, level, zslice, - nv40_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); return &tx->base; } @@ -103,7 +87,7 @@ nv40_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, tx->surface = pscreen->get_tex_surface(pscreen, tx_tex, 0, 0, 0, - nv40_usage_tx_to_buf(usage)); + pipe_transfer_buffer_flags(&tx->base)); pipe_texture_reference(&tx_tex, NULL); @@ -114,7 +98,7 @@ nv40_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, return NULL; } - if (usage != PIPE_TRANSFER_WRITE) { + if (usage & PIPE_TRANSFER_READ) { struct nv40_screen *nvscreen = nv40_screen(pscreen); struct pipe_surface *src; @@ -140,7 +124,7 @@ nv40_transfer_del(struct pipe_transfer *ptx) { struct nv40_transfer *tx = (struct nv40_transfer *)ptx; - if (!tx->direct && ptx->usage != PIPE_TRANSFER_READ) { + if (!tx->direct && (ptx->usage & PIPE_TRANSFER_WRITE)) { struct pipe_screen *pscreen = ptx->texture->screen; struct nv40_screen *nvscreen = nv40_screen(pscreen); struct pipe_surface *dst; @@ -170,7 +154,7 @@ nv40_transfer_map(struct pipe_screen *pscreen, struct pipe_transfer *ptx) struct nv04_surface *ns = (struct nv04_surface *)tx->surface; struct nv40_miptree *mt = (struct nv40_miptree *)tx->surface->texture; void *map = pipe_buffer_map(pscreen, mt->buffer, - nv40_usage_tx_to_buf(ptx->usage)); + pipe_transfer_buffer_flags(ptx)); return map + ns->base.offset + ptx->y * ns->pitch + ptx->x * ptx->block.size; diff --git a/src/gallium/drivers/nv50/nv50_transfer.c b/src/gallium/drivers/nv50/nv50_transfer.c index bb7731855cd..9c289026bbb 100644 --- a/src/gallium/drivers/nv50/nv50_transfer.c +++ b/src/gallium/drivers/nv50/nv50_transfer.c @@ -161,7 +161,7 @@ nv50_transfer_new(struct pipe_screen *pscreen, struct pipe_texture *pt, return NULL; } - if (usage != PIPE_TRANSFER_WRITE) { + if (usage & PIPE_TRANSFER_READ) { nv50_transfer_rect_m2mf(pscreen, mt->base.bo, tx->level_offset, tx->level_pitch, tx->level_tiling, x, y, @@ -183,7 +183,7 @@ nv50_transfer_del(struct pipe_transfer *ptx) struct nv50_transfer *tx = (struct nv50_transfer *)ptx; struct nv50_miptree *mt = nv50_miptree(ptx->texture); - if (ptx->usage != PIPE_TRANSFER_READ) { + if (ptx->usage & PIPE_TRANSFER_WRITE) { struct pipe_screen *pscreen = ptx->texture->screen; nv50_transfer_rect_m2mf(pscreen, tx->bo, 0, tx->base.stride, tx->bo->tile_mode, 0, 0, diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 8296d56840f..f2659ca61f7 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -345,16 +345,9 @@ static void* r300_transfer_map(struct pipe_screen* screen, { struct r300_texture* tex = (struct r300_texture*)transfer->texture; char* map; - unsigned flags = 0; - if (transfer->usage != PIPE_TRANSFER_WRITE) { - flags |= PIPE_BUFFER_USAGE_CPU_READ; - } - if (transfer->usage != PIPE_TRANSFER_READ) { - flags |= PIPE_BUFFER_USAGE_CPU_WRITE; - } - - map = pipe_buffer_map(screen, tex->buffer, flags); + map = pipe_buffer_map(screen, tex->buffer, + pipe_transfer_buffer_flags(transfer)); if (!map) { return NULL; diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index 1c64d58372d..2e6c43c7ef2 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -329,27 +329,18 @@ softpipe_transfer_map( struct pipe_screen *screen, { ubyte *map, *xfer_map; struct softpipe_texture *spt; - unsigned flags = 0; assert(transfer->texture); spt = softpipe_texture(transfer->texture); - if (transfer->usage != PIPE_TRANSFER_READ) { - flags |= PIPE_BUFFER_USAGE_CPU_WRITE; - } - - if (transfer->usage != PIPE_TRANSFER_WRITE) { - flags |= PIPE_BUFFER_USAGE_CPU_READ; - } - - map = pipe_buffer_map(screen, spt->buffer, flags); + map = pipe_buffer_map(screen, spt->buffer, pipe_transfer_buffer_flags(transfer)); if (map == NULL) return NULL; /* May want to different things here depending on read/write nature * of the map: */ - if (transfer->texture && transfer->usage != PIPE_TRANSFER_READ) { + if (transfer->texture && (transfer->usage & PIPE_TRANSFER_WRITE)) { /* Do something to notify sharing contexts of a texture change. * In softpipe, that would mean flushing the texture cache. */ @@ -375,7 +366,7 @@ softpipe_transfer_unmap(struct pipe_screen *screen, pipe_buffer_unmap( screen, spt->buffer ); - if (transfer->usage != PIPE_TRANSFER_READ) { + if (transfer->usage & PIPE_TRANSFER_WRITE) { /* Mark the texture as dirty to expire the tile caches. */ spt->timestamp++; } diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index 26f1c04594f..ab605c7fc87 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -403,7 +403,7 @@ trace_screen_transfer_map(struct pipe_screen *_screen, map = screen->transfer_map(screen, transfer); if(map) { - if(transfer->usage != PIPE_TRANSFER_READ) { + if(transfer->usage & PIPE_TRANSFER_WRITE) { assert(!tr_trans->map); tr_trans->map = map; } diff --git a/src/gallium/include/pipe/p_inlines.h b/src/gallium/include/pipe/p_inlines.h index 30a4aaf4093..5fbd62a03d2 100644 --- a/src/gallium/include/pipe/p_inlines.h +++ b/src/gallium/include/pipe/p_inlines.h @@ -176,6 +176,22 @@ pipe_transfer_destroy( struct pipe_transfer *transf ) screen->tex_transfer_destroy(transf); } +static INLINE unsigned +pipe_transfer_buffer_flags( struct pipe_transfer *transf ) +{ + switch (transf->usage & PIPE_TRANSFER_READ_WRITE) { + case PIPE_TRANSFER_READ_WRITE: + return PIPE_BUFFER_USAGE_CPU_READ | PIPE_BUFFER_USAGE_CPU_WRITE; + case PIPE_TRANSFER_READ: + return PIPE_BUFFER_USAGE_CPU_READ; + case PIPE_TRANSFER_WRITE: + return PIPE_BUFFER_USAGE_CPU_WRITE; + default: + debug_assert(0); + return 0; + } +} + #ifdef __cplusplus } #endif diff --git a/src/gallium/state_trackers/python/retrace/interpreter.py b/src/gallium/state_trackers/python/retrace/interpreter.py index 6f0bd6ae52a..f4ed2fde4dc 100755 --- a/src/gallium/state_trackers/python/retrace/interpreter.py +++ b/src/gallium/state_trackers/python/retrace/interpreter.py @@ -314,7 +314,7 @@ class Screen(Object): if texture is None: return None transfer = Transfer(texture.get_surface(face, level, zslice), x, y, w, h) - if transfer and usage != gallium.PIPE_TRANSFER_WRITE: + if transfer and usage & gallium.PIPE_TRANSFER_READ if self.interpreter.options.all: self.interpreter.present(transfer.surface, 'transf_read', x, y, w, h) return transfer diff --git a/src/gallium/state_trackers/vega/st_inlines.h b/src/gallium/state_trackers/vega/st_inlines.h index 1f331dfcdb7..610755e0636 100644 --- a/src/gallium/state_trackers/vega/st_inlines.h +++ b/src/gallium/state_trackers/vega/st_inlines.h @@ -57,8 +57,7 @@ st_cond_flush_get_tex_transfer(struct vg_context *st, pipe->is_texture_referenced(pipe, pt, face, level); if (referenced && ((referenced & PIPE_REFERENCED_FOR_WRITE) || - usage == PIPE_TRANSFER_WRITE || - usage == PIPE_TRANSFER_READ_WRITE)) + (usage & PIPE_TRANSFER_WRITE))) vgFlush(); return screen->get_tex_transfer(screen, pt, face, level, zslice, usage, diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c index 95181578f63..3d1d0f71d53 100644 --- a/src/mesa/state_tracker/st_cb_accum.c +++ b/src/mesa/state_tracker/st_cb_accum.c @@ -241,7 +241,7 @@ accum_return(GLcontext *ctx, GLfloat value, xpos, ypos, width, height); - if (usage != PIPE_TRANSFER_WRITE) + if (usage & PIPE_TRANSFER_READ) pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf); switch (acc_strb->format) { diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index bbc2830e694..ba8d1e8cc16 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -577,7 +577,6 @@ st_teximage_flush_before_map(struct st_context *st, pipe->is_texture_referenced(pipe, pt, face, level); if (referenced && ((referenced & PIPE_REFERENCED_FOR_WRITE) || - usage == PIPE_TRANSFER_WRITE || - usage == PIPE_TRANSFER_READ_WRITE)) + (usage & PIPE_TRANSFER_WRITE))) st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL); } -- cgit v1.2.3 From 918199fb0f5d84121e0ac5821168cd0e886b22e9 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 2 Oct 2009 15:36:47 +0100 Subject: mesa/st: don't reuse vertex buffers for bitmap, clear quads Currently using max_slots > 1 will cause synchronous rendering if the driver flushes its command buffers between one bitmap and the next. Need to improve buffer_write to allow NO_WAIT (as well as no_flush) updates to buffers where we know there is no conflict with previous data. --- src/mesa/state_tracker/st_cb_bitmap.c | 13 ++++++++++++- src/mesa/state_tracker/st_cb_clear.c | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 902fb38d1a7..a22fa68299b 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -330,7 +330,18 @@ setup_bitmap_vertex_data(struct st_context *st, const GLfloat clip_y0 = (GLfloat)(y0 / fb_height * 2.0 - 1.0); const GLfloat clip_x1 = (GLfloat)(x1 / fb_width * 2.0 - 1.0); const GLfloat clip_y1 = (GLfloat)(y1 / fb_height * 2.0 - 1.0); - const GLuint max_slots = 4096 / sizeof(st->bitmap.vertices); + + /* XXX: Need to improve buffer_write to allow NO_WAIT (as well as + * no_flush) updates to buffers where we know there is no conflict + * with previous data. Currently using max_slots > 1 will cause + * synchronous rendering if the driver flushes its command buffers + * between one bitmap and the next. Our flush hook below isn't + * sufficient to catch this as the driver doesn't tell us when it + * flushes its own command buffers. Until this gets fixed, pay the + * price of allocating a new buffer for each bitmap cache-flush to + * avoid synchronous rendering. + */ + const GLuint max_slots = 1; /* 4096 / sizeof(st->bitmap.vertices); */ GLuint i; if (st->bitmap.vbuf_slot >= max_slots) { diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 8a8c99f7e17..36510720a4c 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -116,7 +116,18 @@ draw_quad(GLcontext *ctx, { struct st_context *st = ctx->st; struct pipe_context *pipe = st->pipe; - const GLuint max_slots = 1024 / sizeof(st->clear.vertices); + + /* XXX: Need to improve buffer_write to allow NO_WAIT (as well as + * no_flush) updates to buffers where we know there is no conflict + * with previous data. Currently using max_slots > 1 will cause + * synchronous rendering if the driver flushes its command buffers + * between one bitmap and the next. Our flush hook below isn't + * sufficient to catch this as the driver doesn't tell us when it + * flushes its own command buffers. Until this gets fixed, pay the + * price of allocating a new buffer for each bitmap cache-flush to + * avoid synchronous rendering. + */ + const GLuint max_slots = 1; /* 1024 / sizeof(st->clear.vertices); */ GLuint i; if (st->clear.vbuf_slot >= max_slots) { -- cgit v1.2.3 From 3f623cfffee8db83ba8e0302fc5e3d1f40d1b0b5 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 2 Oct 2009 14:25:52 -0400 Subject: r600: remove support for host-based ibs no longer used now that the hw supports this natively. Also, clean up some formatting. --- src/mesa/drivers/dri/r600/r600_context.h | 26 ++-- src/mesa/drivers/dri/r600/r700_render.c | 204 +++++++++++-------------------- 2 files changed, 80 insertions(+), 150 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h index a296ea23fa4..7f68820fda1 100644 --- a/src/mesa/drivers/dri/r600/r600_context.h +++ b/src/mesa/drivers/dri/r600/r600_context.h @@ -126,32 +126,30 @@ struct r600_hw_state { struct radeon_state_atom tx_brdr_clr; }; -typedef struct StreamDesc +typedef struct StreamDesc { GLint size; //number of data element GLenum type; //data element type GLsizei stride; - struct radeon_bo *bo; - GLint bo_offset; + struct radeon_bo *bo; + GLint bo_offset; - GLuint dwords; + GLuint dwords; GLuint dst_loc; GLuint _signed; GLboolean normalize; - GLboolean is_named_bo; - GLubyte element; + GLboolean is_named_bo; + GLubyte element; } StreamDesc; -typedef struct r700_index_buffer +typedef struct r700_index_buffer { - struct radeon_bo *bo; - int bo_offset; + struct radeon_bo *bo; + int bo_offset; - GLboolean is_32bit; - GLuint count; - - GLboolean bHostIb; + GLboolean is_32bit; + GLuint count; } r700_index_buffer; /** @@ -172,7 +170,7 @@ struct r600_context { GLvector4f dummy_attrib[_TNL_ATTRIB_MAX]; GLvector4f *temp_attrib[_TNL_ATTRIB_MAX]; - GLint nNumActiveAos; + GLint nNumActiveAos; StreamDesc stream_desc[VERT_ATTRIB_MAX]; struct r700_index_buffer ind_buf; }; diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 4949bf013d9..0aef0b7ea1f 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -251,19 +251,19 @@ static int r700NumVerts(int num_verts, int prim) static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim) { - context_t *context = R700_CONTEXT(ctx); - BATCH_LOCALS(&context->radeon); - int type, i, total_emit; - int num_indices; - uint32_t vgt_draw_initiator = 0; - uint32_t vgt_index_type = 0; - uint32_t vgt_primitive_type = 0; - uint32_t vgt_num_indices = 0; - TNLcontext *tnl = TNL_CONTEXT(ctx); - struct vertex_buffer *vb = &tnl->vb; - + context_t *context = R700_CONTEXT(ctx); + BATCH_LOCALS(&context->radeon); + int type, i, total_emit; + int num_indices; + uint32_t vgt_draw_initiator = 0; + uint32_t vgt_index_type = 0; + uint32_t vgt_primitive_type = 0; + uint32_t vgt_num_indices = 0; + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *vb = &tnl->vb; GLboolean bUseDrawIndex; - if( (NULL != context->ind_buf.bo) && (GL_TRUE != context->ind_buf.bHostIb) ) + + if(NULL != context->ind_buf.bo) { bUseDrawIndex = GL_TRUE; } @@ -272,35 +272,35 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim bUseDrawIndex = GL_FALSE; } - type = r700PrimitiveType(prim); - num_indices = r700NumVerts(end - start, prim); + type = r700PrimitiveType(prim); + num_indices = r700NumVerts(end - start, prim); - radeon_print(RADEON_RENDER, RADEON_TRACE, - "%s type %x num_indices %d\n", - __func__, type, num_indices); + radeon_print(RADEON_RENDER, RADEON_TRACE, + "%s type %x num_indices %d\n", + __func__, type, num_indices); - if (type < 0 || num_indices <= 0) - return; + if (type < 0 || num_indices <= 0) + return; if(GL_TRUE == bUseDrawIndex) { total_emit = 3 /* VGT_PRIMITIVE_TYPE */ - + 2 /* VGT_INDEX_TYPE */ - + 2 /* NUM_INSTANCES */ - + 5+2; /* DRAW_INDEX */ + + 2 /* VGT_INDEX_TYPE */ + + 2 /* NUM_INSTANCES */ + + 5 + 2; /* DRAW_INDEX */ } else { total_emit = 3 /* VGT_PRIMITIVE_TYPE */ - + 2 /* VGT_INDEX_TYPE */ - + 2 /* NUM_INSTANCES */ - + num_indices + 3; /* DRAW_INDEX_IMMD */ + + 2 /* VGT_INDEX_TYPE */ + + 2 /* NUM_INSTANCES */ + + num_indices + 3; /* DRAW_INDEX_IMMD */ } BEGIN_BATCH_NO_AUTOSTATE(total_emit); - // prim + // prim SETfield(vgt_primitive_type, type, - VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask); + VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask); R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_CONFIG_REG, 1)); R600_OUT_BATCH(mmVGT_PRIMITIVE_TYPE - ASIC_CONFIG_BASE_INDEX); R600_OUT_BATCH(vgt_primitive_type); @@ -319,11 +319,11 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim R600_OUT_BATCH(CP_PACKET3(R600_IT_INDEX_TYPE, 0)); R600_OUT_BATCH(vgt_index_type); - // num instances - R600_OUT_BATCH(CP_PACKET3(R600_IT_NUM_INSTANCES, 0)); - R600_OUT_BATCH(1); + // num instances + R600_OUT_BATCH(CP_PACKET3(R600_IT_NUM_INSTANCES, 0)); + R600_OUT_BATCH(1); - // draw packet + // draw packet vgt_num_indices = num_indices; if(GL_TRUE == bUseDrawIndex) @@ -354,44 +354,17 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_IMMD, (num_indices + 1))); R600_OUT_BATCH(vgt_num_indices); R600_OUT_BATCH(vgt_draw_initiator); - } - if(NULL == context->ind_buf.bo) - { - for (i = start; i < (start + num_indices); i++) { + for (i = start; i < (start + num_indices); i++) + { if(vb->Elts) { R600_OUT_BATCH(vb->Elts[i]); } else + { R600_OUT_BATCH(i); - } - } - else - { - if(GL_TRUE == context->ind_buf.bHostIb) - { - if(GL_TRUE != context->ind_buf.is_32bit) - { - GLushort * pIndex = (GLushort*)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); - pIndex += start; - for (i = 0; i < num_indices; i++) - { - R600_OUT_BATCH(*pIndex); - pIndex++; - } - } - else - { - GLuint * pIndex = (GLuint*)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); - pIndex += start; - - for (i = 0; i < num_indices; i++) - { - R600_OUT_BATCH(*pIndex); - pIndex++; - } - } + } } } @@ -826,30 +799,21 @@ static void r700FreeData(GLcontext *ctx) * called during context destroy */ context_t *context = R700_CONTEXT(ctx); - + int i; - for (i = 0; i < context->nNumActiveAos; i++) + for (i = 0; i < context->nNumActiveAos; i++) { - if (!context->stream_desc[i].is_named_bo) + if (!context->stream_desc[i].is_named_bo) { radeon_bo_unref(context->stream_desc[i].bo); } context->radeon.tcl.aos[i].bo = NULL; } - - if (context->ind_buf.bo != NULL) + + if (context->ind_buf.bo != NULL) { - if(context->ind_buf.bHostIb != GL_TRUE) - { radeon_bo_unref(context->ind_buf.bo); - } - else - { - FREE(context->ind_buf.bo->ptr); - FREE(context->ind_buf.bo); - context->ind_buf.bo = NULL; - } } } @@ -861,7 +825,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer int i; GLboolean mapped_named_bo = GL_FALSE; - if (mesa_ind_buf->obj->Name && !mesa_ind_buf->obj->Pointer) + if (mesa_ind_buf->obj->Name && !mesa_ind_buf->obj->Pointer) { ctx->Driver.MapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, GL_READ_ONLY_ARB, mesa_ind_buf->obj); mapped_named_bo = GL_TRUE; @@ -869,66 +833,46 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer } src_ptr = ADD_POINTERS(mesa_ind_buf->obj->Pointer, mesa_ind_buf->ptr); - if (mesa_ind_buf->type == GL_UNSIGNED_BYTE) + if (mesa_ind_buf->type == GL_UNSIGNED_BYTE) { GLuint size = sizeof(GLushort) * ((mesa_ind_buf->count + 1) & ~1); GLubyte *in = (GLubyte *)src_ptr; - if(context->ind_buf.bHostIb != GL_TRUE) - { - radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, - &context->ind_buf.bo_offset, size, 4); + radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, + &context->ind_buf.bo_offset, size, 4); - assert(context->ind_buf.bo->ptr != NULL); - out = (GLuint *)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); - } - else - { - context->ind_buf.bo = MALLOC_STRUCT(radeon_bo); - context->ind_buf.bo->ptr = ALIGN_MALLOC(size, 4); - context->ind_buf.bo_offset = 0; - out = (GLuint *)context->ind_buf.bo->ptr; - } + assert(context->ind_buf.bo->ptr != NULL); + out = (GLuint *)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); - for (i = 0; i + 1 < mesa_ind_buf->count; i += 2) + for (i = 0; i + 1 < mesa_ind_buf->count; i += 2) { *out++ = in[i] | in[i + 1] << 16; } - if (i < mesa_ind_buf->count) + if (i < mesa_ind_buf->count) { *out++ = in[i]; } #if MESA_BIG_ENDIAN - } - else + } + else { /* if (mesa_ind_buf->type == GL_UNSIGNED_SHORT) */ GLushort *in = (GLushort *)src_ptr; GLuint size = sizeof(GLushort) * ((mesa_ind_buf->count + 1) & ~1); - if(context->ind_buf.bHostIb != GL_TRUE) - { - radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, - &context->ind_buf.bo_offset, size, 4); + radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, + &context->ind_buf.bo_offset, size, 4); - assert(context->ind_buf.bo->ptr != NULL); - out = (GLuint *)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); - } - else - { - context->ind_buf.bo = MALLOC_STRUCT(radeon_bo); - context->ind_buf.bo->ptr = ALIGN_MALLOC(size, 4); - context->ind_buf.bo_offset = 0; - out = (GLuint *)context->ind_buf.bo->ptr; - } + assert(context->ind_buf.bo->ptr != NULL); + out = (GLuint *)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); - for (i = 0; i + 1 < mesa_ind_buf->count; i += 2) + for (i = 0; i + 1 < mesa_ind_buf->count; i += 2) { *out++ = in[i] | in[i + 1] << 16; } - if (i < mesa_ind_buf->count) + if (i < mesa_ind_buf->count) { *out++ = in[i]; } @@ -938,7 +882,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer context->ind_buf.is_32bit = GL_FALSE; context->ind_buf.count = mesa_ind_buf->count; - if (mapped_named_bo) + if (mapped_named_bo) { ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); } @@ -953,20 +897,18 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer return; } - context->ind_buf.bHostIb = GL_FALSE; - #if MESA_BIG_ENDIAN - if (mesa_ind_buf->type == GL_UNSIGNED_INT) + if (mesa_ind_buf->type == GL_UNSIGNED_INT) { #else - if (mesa_ind_buf->type != GL_UNSIGNED_BYTE) + if (mesa_ind_buf->type != GL_UNSIGNED_BYTE) { #endif const GLvoid *src_ptr; GLvoid *dst_ptr; GLboolean mapped_named_bo = GL_FALSE; - if (mesa_ind_buf->obj->Name && !mesa_ind_buf->obj->Pointer) + if (mesa_ind_buf->obj->Name && !mesa_ind_buf->obj->Pointer) { ctx->Driver.MapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, GL_READ_ONLY_ARB, mesa_ind_buf->obj); assert(mesa_ind_buf->obj->Pointer != NULL); @@ -977,32 +919,22 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer const GLuint size = mesa_ind_buf->count * getTypeSize(mesa_ind_buf->type); - if(context->ind_buf.bHostIb != GL_TRUE) - { - radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, - &context->ind_buf.bo_offset, size, 4); - assert(context->ind_buf.bo->ptr != NULL); - dst_ptr = ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); - } - else - { - context->ind_buf.bo = MALLOC_STRUCT(radeon_bo); - context->ind_buf.bo->ptr = ALIGN_MALLOC(size, 4); - context->ind_buf.bo_offset = 0; - dst_ptr = context->ind_buf.bo->ptr; - } + radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo, + &context->ind_buf.bo_offset, size, 4); + assert(context->ind_buf.bo->ptr != NULL); + dst_ptr = ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset); _mesa_memcpy(dst_ptr, src_ptr, size); context->ind_buf.is_32bit = (mesa_ind_buf->type == GL_UNSIGNED_INT); context->ind_buf.count = mesa_ind_buf->count; - if (mapped_named_bo) + if (mapped_named_bo) { ctx->Driver.UnmapBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, mesa_ind_buf->obj); } - } - else + } + else { r700FixupIndexBuffer(ctx, mesa_ind_buf); } @@ -1145,7 +1077,7 @@ static void r700DrawPrims(GLcontext *ctx, void r700InitDraw(GLcontext *ctx) { struct vbo_context *vbo = vbo_context(ctx); - + /* to be enabled */ vbo->draw_prims = r700DrawPrims; } -- cgit v1.2.3 From 3d78a86cd777aecce544d14b85177a71e9c142ce Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 1 Oct 2009 18:07:57 -0700 Subject: intel: Remove an unexplained flush from intelClearWithBlit. --- src/mesa/drivers/dri/intel/intel_blit.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c index 43141c509c7..9e114db6c78 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.c +++ b/src/mesa/drivers/dri/intel/intel_blit.c @@ -371,8 +371,6 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask) skipBuffers = BUFFER_BIT_STENCIL; } - /* XXX Move this flush/lock into the following conditional? */ - intelFlush(&intel->ctx); LOCK_HARDWARE(intel); intel_get_cliprects(intel, &cliprects, &num_cliprects, &x_off, &y_off); -- cgit v1.2.3 From f019577f0c2ff83e20bd198a467ddb03579ddae3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 1 Oct 2009 16:53:12 -0700 Subject: Revert "Flush driver, not just tnl module." This reverts commit df058298e1570eea8712f9bb051f674fab2eaf24. It didn't explain why it was required, doesnt appear to be required, and is a significant performance penalty for cairo-gl firefox. Conflicts: src/mesa/main/fbobject.c --- src/mesa/main/fbobject.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 680fd22ba8f..a73a7659add 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -718,12 +718,6 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer) } FLUSH_CURRENT(ctx, _NEW_BUFFERS); - /* The above doesn't fully flush the drivers in the way that a - * glFlush does, but that is required here: - */ - if (ctx->Driver.Flush) - ctx->Driver.Flush(ctx); - if (renderbuffer) { newRb = _mesa_lookup_renderbuffer(ctx, renderbuffer); @@ -1294,11 +1288,6 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers) ASSERT_OUTSIDE_BEGIN_END(ctx); FLUSH_CURRENT(ctx, _NEW_BUFFERS); - /* The above doesn't fully flush the drivers in the way that a - * glFlush does, but that is required here: - */ - if (ctx->Driver.Flush) - ctx->Driver.Flush(ctx); for (i = 0; i < n; i++) { if (framebuffers[i] > 0) { @@ -1532,11 +1521,6 @@ framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target, } FLUSH_CURRENT(ctx, _NEW_BUFFERS); - /* The above doesn't fully flush the drivers in the way that a - * glFlush does, but that is required here: - */ - if (ctx->Driver.Flush) - ctx->Driver.Flush(ctx); _glthread_LOCK_MUTEX(fb->Mutex); if (texObj) { @@ -1713,11 +1697,6 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, FLUSH_CURRENT(ctx, _NEW_BUFFERS); - /* The above doesn't fully flush the drivers in the way that a - * glFlush does, but that is required here: - */ - if (ctx->Driver.Flush) - ctx->Driver.Flush(ctx); assert(ctx->Driver.FramebufferRenderbuffer); ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb); @@ -1794,11 +1773,6 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, } FLUSH_CURRENT(ctx, _NEW_BUFFERS); - /* The above doesn't fully flush the drivers in the way that a - * glFlush does, but that is required here: - */ - if (ctx->Driver.Flush) - ctx->Driver.Flush(ctx); switch (pname) { case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: -- cgit v1.2.3 From 6d0fc3cfde3dd730de17e925c5594a8b317ba200 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 1 Oct 2009 17:59:05 -0700 Subject: mesa: Remove another unexplained Flush call, this time from BindFramebuffer. Combined with the previous fix, it takes cairo-gl firefox-talos-gfx time from 120 seconds to 90 seconds on my GM45. --- src/mesa/main/fbobject.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index a73a7659add..6e767bb24d1 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1207,9 +1207,6 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer) } FLUSH_CURRENT(ctx, _NEW_BUFFERS); - if (ctx->Driver.Flush) { - ctx->Driver.Flush(ctx); - } if (framebuffer) { /* Binding a user-created framebuffer object */ -- cgit v1.2.3 From 4182b58169c1c37833c590d00d0a6a52b2b55326 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 2 Oct 2009 10:53:56 -0700 Subject: i965: Use a little stack space to avoid a malloc in wm_get_binding_table. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 4f651170c60..9c28a22a298 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -660,7 +660,7 @@ brw_wm_get_binding_table(struct brw_context *brw) if (bind_bo == NULL) { GLuint data_size = brw->wm.nr_surfaces * sizeof(GLuint); - uint32_t *data = malloc(data_size); + uint32_t data[BRW_WM_MAX_SURF]; int i; for (i = 0; i < brw->wm.nr_surfaces; i++) @@ -685,8 +685,6 @@ brw_wm_get_binding_table(struct brw_context *brw) brw->wm.surf_bo[i]); } } - - free(data); } return bind_bo; -- cgit v1.2.3 From be16acaafa2f28bb7d4551ed93d2e290c928006c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Oct 2009 13:59:41 -0600 Subject: mesa: optimized _mesa_meta_BlitFramebuffer() for src=texture case If the src renderbuffer is actually a texture, we can directly use that texture as the src and avoid a copy. --- src/mesa/drivers/common/meta.c | 130 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 20d47dc38b0..12e0bdde883 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -1053,6 +1053,124 @@ init_blit_depth_pixels(GLcontext *ctx) } +/** + * Try to do a glBiltFramebuffer using no-copy texturing. + * We can do this when the src renderbuffer is actually a texture. + * But if the src buffer == dst buffer we cannot do this. + * + * \return new buffer mask indicating the buffers left to blit using the + * normal path. + */ +static GLbitfield +blitframebuffer_texture(GLcontext *ctx, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter) +{ + if (mask & GL_COLOR_BUFFER_BIT) { + const struct gl_framebuffer *drawFb = ctx->DrawBuffer; + const struct gl_framebuffer *readFb = ctx->ReadBuffer; + const struct gl_renderbuffer_attachment *drawAtt = + &drawFb->Attachment[drawFb->_ColorDrawBufferIndexes[0]]; + const struct gl_renderbuffer_attachment *readAtt = + &readFb->Attachment[readFb->_ColorReadBufferIndex]; + + if (readAtt && readAtt->Texture) { + const struct gl_texture_object *texObj = readAtt->Texture; + const GLenum minFilterSave = texObj->MinFilter; + const GLenum magFilterSave = texObj->MagFilter; + const GLenum target = texObj->Target; + + if (drawAtt->Texture == readAtt->Texture) { + /* Can't use same texture as both the source and dest. We need + * to handle overlapping blits and besides, some hw may not + * support this. + */ + return mask; + } + + if (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_ARB) { + /* Can't handle other texture types at this time */ + return mask; + } + + /* + printf("Blit from texture!\n"); + printf(" srcAtt %p dstAtt %p\n", readAtt, drawAtt); + printf(" srcTex %p dstText %p\n", texObj, drawAtt->Texture); + */ + + /* Prepare src texture state */ + _mesa_BindTexture(target, texObj->Name); + _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, filter); + _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, filter); + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + /*_mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE, GL_FALSE);*/ + _mesa_set_enable(ctx, target, GL_TRUE); + + /* Prepare vertex data (the VBO was previously created and bound) */ + { + struct vertex { + GLfloat x, y, s, t; + }; + struct vertex verts[4]; + GLfloat s0, t0, s1, t1; + + if (target == GL_TEXTURE_2D) { + const struct gl_texture_image *texImage + = _mesa_select_tex_image(ctx, texObj, target, + readAtt->TextureLevel); + s0 = srcX0 / (float) texImage->Width; + s1 = srcX1 / (float) texImage->Width; + t0 = srcY0 / (float) texImage->Height; + t1 = srcY1 / (float) texImage->Height; + } + else { + assert(target == GL_TEXTURE_RECTANGLE_ARB); + s0 = srcX0; + s1 = srcX1; + t0 = srcY0; + t1 = srcY1; + } + + verts[0].x = (GLfloat) dstX0; + verts[0].y = (GLfloat) dstY0; + verts[1].x = (GLfloat) dstX1; + verts[1].y = (GLfloat) dstY0; + verts[2].x = (GLfloat) dstX1; + verts[2].y = (GLfloat) dstY1; + verts[3].x = (GLfloat) dstX0; + verts[3].y = (GLfloat) dstY1; + + verts[0].s = s0; + verts[0].t = t0; + verts[1].s = s1; + verts[1].t = t0; + verts[2].s = s1; + verts[2].t = t1; + verts[3].s = s0; + verts[3].t = t1; + + _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); + } + + _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); + + /* Restore texture's filter state, the texture binding will + * be restored by _mesa_meta_end(). + */ + _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilterSave); + _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilterSave); + + /* Done with color buffer */ + mask &= ~GL_COLOR_BUFFER_BIT; + } + } + + return mask; +} + + /** * Meta implementation of ctx->Driver.BlitFramebuffer() in terms * of texture mapping and polygon rendering. @@ -1124,6 +1242,18 @@ _mesa_meta_BlitFramebuffer(GLcontext *ctx, _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, blit->VBO); } + /* Try faster, direct texture approach first */ + mask = blitframebuffer_texture(ctx, srcX0, srcY0, srcX1, srcY1, + dstX0, dstY0, dstX1, dstY1, mask, filter); + if (mask == 0x0) { + _mesa_meta_end(ctx); + return; + } + + /* Continue with "normal" approach which involves copying the src rect + * into a temporary texture and is "blitted" by drawing a textured quad. + */ + newTex = alloc_texture(tex, srcW, srcH, GL_RGBA); /* vertex positions/texcoords (after texture allocation!) */ -- cgit v1.2.3 From 4a6759b7789dc703a8ee9f1cf08af22c6e8101fb Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Sat, 3 Oct 2009 18:01:57 +0200 Subject: meta: Make sure texImage->TexFormat is valid for CopyTex(Sub)Image. --- src/mesa/drivers/common/meta.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 12e0bdde883..e1732241b3a 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -55,6 +55,7 @@ #include "main/stencil.h" #include "main/texobj.h" #include "main/texenv.h" +#include "main/texformat.h" #include "main/teximage.h" #include "main/texparam.h" #include "main/texstate.h" @@ -2471,6 +2472,12 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level, return; } + if (texImage->TexFormat == &_mesa_null_texformat) + texImage->TexFormat = ctx->Driver.ChooseTextureFormat(ctx, + internalFormat, + format, + type); + _mesa_unlock_texture(ctx, texObj); /* need to unlock first */ /* -- cgit v1.2.3 From f741c1eed4559329a89fbf8da569889bbcdace26 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Sat, 3 Oct 2009 18:01:58 +0200 Subject: swrast: Move up state validation in _swrast_ReadPixels. This ensures the driver won't map the wrong set of textures. --- src/mesa/swrast/s_readpix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 48b9408d242..a1aeb2e01fb 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -555,15 +555,15 @@ _swrast_ReadPixels( GLcontext *ctx, SWcontext *swrast = SWRAST_CONTEXT(ctx); struct gl_pixelstore_attrib clippedPacking = *packing; + if (ctx->NewState) + _mesa_update_state(ctx); + /* Need to do swrast_render_start() before clipping or anything else * since this is where a driver may grab the hw lock and get an updated * window size. */ swrast_render_start(ctx); - if (ctx->NewState) - _mesa_update_state(ctx); - if (swrast->NewState) _swrast_validate_derived( ctx ); -- cgit v1.2.3 From b330cebe01c5574e203fa6b9d49fee4c01e1adb6 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Sat, 3 Oct 2009 18:01:58 +0200 Subject: radeon: Cope better with texture images with no miptrees. Fixes crash with compiz magnifier plugin. --- src/mesa/drivers/dri/radeon/radeon_texture.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 049284ef8c5..7b7392b2179 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -101,7 +101,12 @@ void radeonFreeTexImageData(GLcontext *ctx, struct gl_texture_image *timage) /* Set Data pointer and additional data for mapped texture image */ static void teximage_set_map_data(radeon_texture_image *image) { - radeon_mipmap_level *lvl = &image->mt->levels[image->mtlevel]; + radeon_mipmap_level *lvl; + + if (!image->mt) + return; + + lvl = &image->mt->levels[image->mtlevel]; image->base.Data = image->mt->bo->ptr + lvl->faces[image->mtface].offset; image->base.RowStride = lvl->rowstride / image->mt->bpp; @@ -969,7 +974,7 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t radeon_texture_image *image = get_radeon_texture_image(texObj->Image[face][level]); if (RADEON_DEBUG & RADEON_TEXTURE) fprintf(stderr, " face %i, level %i... %p vs %p ", face, level, t->mt, image->mt); - if (t->mt == image->mt) { + if (t->mt == image->mt || (!image->mt && !image->base.Data)) { if (RADEON_DEBUG & RADEON_TEXTURE) fprintf(stderr, "OK\n"); -- cgit v1.2.3 From 7d2699aedc084d9cb9c2bd2f8bdb5f038271ac1e Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Sat, 3 Oct 2009 16:18:57 +0200 Subject: prog_parameter: Document the fact that Size may be > 4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolai Hähnle --- src/mesa/shader/prog_parameter.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h index d1fcf47e61b..699cb0c7356 100644 --- a/src/mesa/shader/prog_parameter.h +++ b/src/mesa/shader/prog_parameter.h @@ -56,7 +56,13 @@ struct gl_program_parameter const char *Name; /**< Null-terminated string */ gl_register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ GLenum DataType; /**< GL_FLOAT, GL_FLOAT_VEC2, etc */ - GLuint Size; /**< Number of components (1..4) */ + /** + * Number of components (1..4), or more. + * If the number of components is greater than 4, + * this parameter is part of a larger uniform like a GLSL matrix or array. + * The next program parameter's Size will be Size-4 of this parameter. + */ + GLuint Size; GLboolean Used; /**< Helper flag for GLSL uniform tracking */ GLboolean Initialized; /**< Has the ParameterValue[] been set? */ GLbitfield Flags; /**< Bitmask of PROG_PARAM_*_BIT */ -- cgit v1.2.3