diff options
Diffstat (limited to 'mesalib/src')
64 files changed, 1457 insertions, 556 deletions
diff --git a/mesalib/src/glsl/.gitignore b/mesalib/src/glsl/.gitignore index dda423f83..620ac3c93 100644..100755 --- a/mesalib/src/glsl/.gitignore +++ b/mesalib/src/glsl/.gitignore @@ -1,10 +1,10 @@ -glsl_compiler -glsl_lexer.cpp -glsl_parser.cpp -glsl_parser.h -glsl_parser.output -glsl_test -subtest-cr/ -subtest-lf/ -subtest-cr-lf/ -subtest-lf-cr/ +glsl_compiler
+glsl_lexer.cpp
+glsl_parser.cpp
+glsl_parser.h
+glsl_parser.output
+glsl_test
+subtest-cr/
+subtest-lf/
+subtest-cr-lf/
+subtest-lf-cr/
diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h index ef74e5137..f1d1806f0 100644 --- a/mesalib/src/glsl/ast.h +++ b/mesalib/src/glsl/ast.h @@ -50,6 +50,10 @@ struct YYLTYPE; class ast_node { public: DECLARE_RALLOC_CXX_OPERATORS(ast_node); + static void operator delete(void *table, void *ctx) + { + ralloc_free(table); + } /** * Print an AST node in something approximating the original GLSL code diff --git a/mesalib/src/glsl/builtin_functions.cpp b/mesalib/src/glsl/builtin_functions.cpp index efab29919..cf53e1691 100644..100755 --- a/mesalib/src/glsl/builtin_functions.cpp +++ b/mesalib/src/glsl/builtin_functions.cpp @@ -63,8 +63,8 @@ #include <math.h> #define M_PIf ((float) M_PI) -#define M_PI_2f ((float) M_PI_2) -#define M_PI_4f ((float) M_PI_4) +#define M_PI_2f ((float) M_PI/2.0f) +#define M_PI_4f ((float) M_PI/4.0f) using namespace ir_builder; diff --git a/mesalib/src/glsl/doflexbison.bat b/mesalib/src/glsl/doflexbison.bat new file mode 100644 index 000000000..28cf2706b --- /dev/null +++ b/mesalib/src/glsl/doflexbison.bat @@ -0,0 +1,21 @@ +@echo off
+setlocal
+
+cd "%~dp0"
+
+set M4=..\..\..\tools\mhmake\m4.exe
+set BISON_PKGDATADIR=../../../tools/mhmake/src/bisondata
+
+set path=..\..\..\tools\mhmake;%path%
+
+..\..\..\tools\mhmake\bison.exe -v -o glsl_parser.cpp -p "_mesa_glsl_" --defines=glsl_parser.h glsl_parser.yy
+
+..\..\..\tools\mhmake\bison.exe -v -o glcpp/glcpp-parse.c -d -p "glcpp_parser_" --defines=glcpp/glcpp-parse.h glcpp/glcpp-parse.y
+
+copy "..\..\..\tools\mhmake\flex++.exe" flex.exe
+flex.exe --nounistd -oglsl_lexer.cpp glsl_lexer.ll
+flex.exe --nounistd -oglcpp/glcpp-lex.c glcpp/glcpp-lex.l
+del flex.exe
+
+endlocal
+
diff --git a/mesalib/src/glsl/getopt.cpp b/mesalib/src/glsl/getopt.cpp new file mode 100644 index 000000000..ea5dd3927 --- /dev/null +++ b/mesalib/src/glsl/getopt.cpp @@ -0,0 +1,552 @@ +/* $OpenBSD: getopt_long.c,v 1.20 2005/10/25 15:49:37 jmc Exp $ */ +/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ +// Adapted for Box Backup by Chris Wilson <chris+boxbackup@qwirx.com> + +/* + * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ +/*- + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dieter Baron and Thomas Klausner. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +// #include "Box.h" + +#include <errno.h> +#include <stdarg.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#define __STDC__ 1 + +#include "getopt.h" + +#if defined _MSC_VER || defined __MINGW32__ +#define REPLACE_GETOPT /* use this getopt as the system getopt(3) */ + +#ifdef REPLACE_GETOPT +int opterr = 1; /* if error message should be printed */ +int optind = 1; /* index into parent argv vector */ +int optopt = '?'; /* character checked for validity */ +int optreset; /* reset getopt */ +char *optarg; /* argument associated with option */ +#endif + +#define PRINT_ERROR ((opterr) && (*options != ':')) + +#define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */ +#define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */ +#define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */ + +/* return values */ +#define BADCH (int)'?' +#define BADARG ((*options == ':') ? (int)':' : (int)'?') +#define INORDER (int)1 + +#define EMSG "" + +static void warnx(const char* fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + va_end(ap); + fprintf(stderr, "\n"); + } + + static int getopt_internal(int, char * const *, const char *, + const struct option *, int *, int); + static int parse_long_options(char * const *, const char *, + const struct option *, int *, int); + static int gcd(int, int); + static void permute_args(int, int, int, char * const *); + + static char *place = EMSG; /* option letter processing */ + + /* XXX: set optreset to 1 rather than these two */ + static int nonopt_start = -1; /* first non option argument (for permute) */ + static int nonopt_end = -1; /* first option after non options (for permute) */ + + /* Error messages */ + static const char recargchar[] = "option requires an argument -- %c"; + static const char recargstring[] = "option requires an argument -- %s"; + static const char ambig[] = "ambiguous option -- %.*s"; + static const char noarg[] = "option doesn't take an argument -- %.*s"; + static const char illoptchar[] = "unknown option -- %c"; + static const char illoptstring[] = "unknown option -- %s"; + + /* + * Compute the greatest common divisor of a and b. + */ + static int + gcd(int a, int b) + { + int c; + + c = a % b; + while (c != 0) { + a = b; + b = c; + c = a % b; + } + + return (b); + } + + /* + * Exchange the block from nonopt_start to nonopt_end with the block + * from nonopt_end to opt_end (keeping the same order of arguments + * in each block). + */ + static void + permute_args(int panonopt_start, int panonopt_end, int opt_end, + char * const *nargv) + { + int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; + char *swap; + + /* + * compute lengths of blocks and number and size of cycles + */ + nnonopts = panonopt_end - panonopt_start; + nopts = opt_end - panonopt_end; + ncycle = gcd(nnonopts, nopts); + cyclelen = (opt_end - panonopt_start) / ncycle; + + for (i = 0; i < ncycle; i++) { + cstart = panonopt_end+i; + pos = cstart; + for (j = 0; j < cyclelen; j++) { + if (pos >= panonopt_end) + pos -= nnonopts; + else + pos += nopts; + swap = nargv[pos]; + /* LINTED const cast */ + ((char **) nargv)[pos] = nargv[cstart]; + /* LINTED const cast */ + ((char **)nargv)[cstart] = swap; + } + } + } + + /* + * parse_long_options -- + * Parse long options in argc/argv argument vector. + * Returns -1 if short_too is set and the option does not match long_options. + */ + static int + parse_long_options(char * const *nargv, const char *options, + const struct option *long_options, int *idx, int short_too) + { + char *current_argv, *has_equal; + size_t current_argv_len; + int i, match; + + current_argv = place; + match = -1; + + optind++; + + if ((has_equal = strchr(current_argv, '=')) != NULL) { + /* argument found (--option=arg) */ + current_argv_len = has_equal - current_argv; + has_equal++; + } else + current_argv_len = strlen(current_argv); + + for (i = 0; long_options[i].name; i++) { + /* find matching long option */ + if (strncmp(current_argv, long_options[i].name, + current_argv_len)) + continue; + + if (strlen(long_options[i].name) == current_argv_len) { + /* exact match */ + match = i; + break; + } + /* + * If this is a known short option, don't allow + * a partial match of a single character. + */ + if (short_too && current_argv_len == 1) + continue; + + if (match == -1) /* partial match */ + match = i; + else { + /* ambiguous abbreviation */ + if (PRINT_ERROR) + warnx(ambig, (int)current_argv_len, + current_argv); + optopt = 0; + return (BADCH); + } + } + if (match != -1) { /* option found */ + if (long_options[match].has_arg == no_argument + && has_equal) { + if (PRINT_ERROR) + warnx(noarg, (int)current_argv_len, + current_argv); + /* + * XXX: GNU sets optopt to val regardless of flag + */ + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + return (BADARG); + } + if (long_options[match].has_arg == required_argument || + long_options[match].has_arg == optional_argument) { + if (has_equal) + optarg = has_equal; + else if (long_options[match].has_arg == + required_argument) { + /* + * optional argument doesn't use next nargv + */ + optarg = nargv[optind++]; + } + } + if ((long_options[match].has_arg == required_argument) + && (optarg == NULL)) { + /* + * Missing argument; leading ':' indicates no error + * should be generated. + */ + if (PRINT_ERROR) + warnx(recargstring, + current_argv); + /* + * XXX: GNU sets optopt to val regardless of flag + */ + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + --optind; + return (BADARG); + } + } else { /* unknown option */ + if (short_too) { + --optind; + return (-1); + } + if (PRINT_ERROR) + warnx(illoptstring, current_argv); + optopt = 0; + return (BADCH); + } + if (idx) + *idx = match; + if (long_options[match].flag) { + *long_options[match].flag = long_options[match].val; + return (0); + } else + return (long_options[match].val); + } + + /* + * getopt_internal -- + * Parse argc/argv argument vector. Called by user level routines. + */ + static int + getopt_internal(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx, int flags) + { + const char * oli; /* option letter list index */ + int optchar, short_too; + static int posixly_correct = -1; + + if (options == NULL) + return (-1); + + /* + * Disable GNU extensions if POSIXLY_CORRECT is set or options + * string begins with a '+'. + */ + if (posixly_correct == -1) + posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); + if (posixly_correct || *options == '+') + flags &= ~FLAG_PERMUTE; + else if (*options == '-') + flags |= FLAG_ALLARGS; + if (*options == '+' || *options == '-') + options++; + + /* + * XXX Some GNU programs (like cvs) set optind to 0 instead of + * XXX using optreset. Work around this braindamage. + */ + if (optind == 0) + optind = optreset = 1; + + optarg = NULL; + if (optreset) + nonopt_start = nonopt_end = -1; + start: + if (optreset || !*place) { /* update scanning pointer */ + optreset = 0; + if (optind >= nargc) { /* end of argument vector */ + place = EMSG; + if (nonopt_end != -1) { + /* do permutation, if we have to */ + permute_args(nonopt_start, nonopt_end, + optind, nargv); + optind -= nonopt_end - nonopt_start; + } + else if (nonopt_start != -1) { + /* + * If we skipped non-options, set optind + * to the first of them. + */ + optind = nonopt_start; + } + nonopt_start = nonopt_end = -1; + return (-1); + } + if (*(place = nargv[optind]) != '-' || + (place[1] == '\0' && strchr(options, '-') == NULL)) { + place = EMSG; /* found non-option */ + if (flags & FLAG_ALLARGS) { + /* + * GNU extension: + * return non-option as argument to option 1 + */ + optarg = nargv[optind++]; + return (INORDER); + } + if (!(flags & FLAG_PERMUTE)) { + /* + * If no permutation wanted, stop parsing + * at first non-option. + */ + return (-1); + } + /* do permutation */ + if (nonopt_start == -1) + nonopt_start = optind; + else if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, + optind, nargv); + nonopt_start = optind - + (nonopt_end - nonopt_start); + nonopt_end = -1; + } + optind++; + /* process next argument */ + goto start; + } + if (nonopt_start != -1 && nonopt_end == -1) + nonopt_end = optind; + + /* + * If we have "-" do nothing, if "--" we are done. + */ + if (place[1] != '\0' && *++place == '-' && place[1] == '\0') { + optind++; + place = EMSG; + /* + * We found an option (--), so if we skipped + * non-options, we have to permute. + */ + if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, + optind, nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + return (-1); + } + } + + /* + * Check long options if: + * 1) we were passed some + * 2) the arg is not just "-" + * 3) either the arg starts with -- we are getopt_long_only() + */ + if (long_options != NULL && place != nargv[optind] && + (*place == '-' || (flags & FLAG_LONGONLY))) { + short_too = 0; + if (*place == '-') + place++; /* --foo long option */ + else if (*place != ':' && strchr(options, *place) != NULL) + short_too = 1; /* could be short option too */ + + optchar = parse_long_options(nargv, options, long_options, + idx, short_too); + if (optchar != -1) { + place = EMSG; + return (optchar); + } + } + + if ((optchar = (int)*place++) == (int)':' || + optchar == (int)'-' && *place != '\0' || + (oli = strchr(options, optchar)) == NULL) { + /* + * If the user specified "-" and '-' isn't listed in + * options, return -1 (non-option) as per POSIX. + * Otherwise, it is an unknown option character (or ':'). + */ + if (optchar == (int)'-' && *place == '\0') + return (-1); + if (!*place) + ++optind; + if (PRINT_ERROR) + warnx(illoptchar, optchar); + optopt = optchar; + return (BADCH); + } + if (long_options != NULL && optchar == 'W' && oli[1] == ';') { + /* -W long-option */ + if (*place) /* no space */ + /* NOTHING */; + else if (++optind >= nargc) { /* no arg */ + place = EMSG; + if (PRINT_ERROR) + warnx(recargchar, optchar); + optopt = optchar; + return (BADARG); + } else /* white space */ + place = nargv[optind]; + optchar = parse_long_options(nargv, options, long_options, + idx, 0); + place = EMSG; + return (optchar); + } + if (*++oli != ':') { /* doesn't take argument */ + if (!*place) + ++optind; + } else { /* takes (optional) argument */ + optarg = NULL; + if (*place) /* no white space */ + optarg = place; + /* XXX: disable test for :: if PC? (GNU doesn't) */ + else if (oli[1] != ':') { /* arg not optional */ + if (++optind >= nargc) { /* no arg */ + place = EMSG; + if (PRINT_ERROR) + warnx(recargchar, optchar); + optopt = optchar; + return (BADARG); + } else + optarg = nargv[optind]; + } else if (!(flags & FLAG_PERMUTE)) { + /* + * If permutation is disabled, we can accept an + * optional arg separated by whitespace so long + * as it does not start with a dash (-). + */ + if (optind + 1 < nargc && *nargv[optind + 1] != '-') + optarg = nargv[++optind]; + } + place = EMSG; + ++optind; + } + /* dump back option letter */ + return (optchar); + } + + #ifdef REPLACE_GETOPT + /* + * getopt -- + * Parse argc/argv argument vector. + * + * [eventually this will replace the BSD getopt] + */ + int + getopt(int nargc, char * const *nargv, const char *options) + { + + /* + * We don't pass FLAG_PERMUTE to getopt_internal() since + * the BSD getopt(3) (unlike GNU) has never done this. + * + * Furthermore, since many privileged programs call getopt() + * before dropping privileges it makes sense to keep things + * as simple (and bug-free) as possible. + */ + return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); + } + #endif /* REPLACE_GETOPT */ + + /* + * getopt_long -- + * Parse argc/argv argument vector. + */ + int + getopt_long(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) + { + + return (getopt_internal(nargc, nargv, options, long_options, idx, + FLAG_PERMUTE)); + } + + /* + * getopt_long_only -- + * Parse argc/argv argument vector. + */ + int + getopt_long_only(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) + { + + return (getopt_internal(nargc, nargv, options, long_options, idx, + FLAG_PERMUTE|FLAG_LONGONLY)); + } + +#endif // defined _MSC_VER || defined __MINGW32__
\ No newline at end of file diff --git a/mesalib/src/glsl/glcpp/.gitignore b/mesalib/src/glsl/glcpp/.gitignore index 24a7119ca..9f7e0cc3e 100644..100755 --- a/mesalib/src/glsl/glcpp/.gitignore +++ b/mesalib/src/glsl/glcpp/.gitignore @@ -1,6 +1,6 @@ -glcpp -glcpp-lex.c -glcpp-parse.output -glcpp-parse.c -glcpp-parse.h -tests/*.out +glcpp
+glcpp-lex.c
+glcpp-parse.output
+glcpp-parse.c
+glcpp-parse.h
+tests/*.out
diff --git a/mesalib/src/glsl/glcpp/glcpp.c b/mesalib/src/glsl/glcpp/glcpp.c index 5144516a6..ece2fc3b7 100644 --- a/mesalib/src/glsl/glcpp/glcpp.c +++ b/mesalib/src/glsl/glcpp/glcpp.c @@ -30,6 +30,14 @@ #include "main/mtypes.h" #include "main/shaderobj.h" +#ifdef _MSC_VER +#include <io.h> +#define STDIN_FILENO 0 +#define read _read +#define open _open +#define close _close +#endif + extern int glcpp_parser_debug; void diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy index 3ce9e103f..a23c01d30 100644 --- a/mesalib/src/glsl/glsl_parser.yy +++ b/mesalib/src/glsl/glsl_parser.yy @@ -23,6 +23,7 @@ */ #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include <string.h> #ifndef _MSC_VER #include <strings.h> diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h index 9a0c24e67..bea83f43a 100644 --- a/mesalib/src/glsl/glsl_parser_extras.h +++ b/mesalib/src/glsl/glsl_parser_extras.h @@ -77,6 +77,10 @@ struct _mesa_glsl_parse_state { void *mem_ctx); DECLARE_RALLOC_CXX_OPERATORS(_mesa_glsl_parse_state); + static void operator delete(void *mem, void *ctx) + { + ralloc_free(mem); + } /** * Generate a string representing the GLSL version currently being compiled diff --git a/mesalib/src/glsl/glsl_symbol_table.cpp b/mesalib/src/glsl/glsl_symbol_table.cpp index 2294dda42..2a2c465ed 100644..100755 --- a/mesalib/src/glsl/glsl_symbol_table.cpp +++ b/mesalib/src/glsl/glsl_symbol_table.cpp @@ -27,6 +27,10 @@ class symbol_table_entry { public: DECLARE_RALLOC_CXX_OPERATORS(symbol_table_entry); + static void operator delete(void *entry, void *ctx) + { + ralloc_free(entry); + } bool add_interface(const glsl_type *i, enum ir_variable_mode mode) { diff --git a/mesalib/src/glsl/glsl_symbol_table.h b/mesalib/src/glsl/glsl_symbol_table.h index e32b88b86..21b02e919 100644..100755 --- a/mesalib/src/glsl/glsl_symbol_table.h +++ b/mesalib/src/glsl/glsl_symbol_table.h @@ -44,6 +44,11 @@ struct glsl_type; */ struct glsl_symbol_table { DECLARE_RALLOC_CXX_OPERATORS(glsl_symbol_table) + static void operator delete(void *table, void *ctx) + { + ralloc_set_destructor(table, NULL); + ralloc_free(table); + } glsl_symbol_table(); ~glsl_symbol_table(); diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp index dbd064fee..3f266f8f0 100644..100755 --- a/mesalib/src/glsl/ir.cpp +++ b/mesalib/src/glsl/ir.cpp @@ -604,7 +604,7 @@ static const char *const operator_strs[] = { "vector_extract", "interpolate_at_offset", "interpolate_at_sample", - "fma", + "fma_mesa", "lrp", "csel", "bfi", diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp index 171b8e954..bbf2b0ca8 100644..100755 --- a/mesalib/src/glsl/ir_constant_expression.cpp +++ b/mesalib/src/glsl/ir_constant_expression.cpp @@ -53,13 +53,6 @@ static int isnormal(double x) } #endif -#if defined(_MSC_VER) -static double copysign(double x, double y) -{ - return _copysign(x, y); -} -#endif - static float dot_f(ir_constant *op0, ir_constant *op1) { diff --git a/mesalib/src/glsl/link_uniforms.cpp b/mesalib/src/glsl/link_uniforms.cpp index 11ae06f9b..142e90ffa 100644 --- a/mesalib/src/glsl/link_uniforms.cpp +++ b/mesalib/src/glsl/link_uniforms.cpp @@ -1055,7 +1055,6 @@ link_assign_uniform_locations(struct gl_shader_program *prog, for (unsigned i = 0; i < num_uniforms; i++) { assert(uniforms[i].storage != NULL || uniforms[i].builtin); } - assert(parcel.values == data_end); #endif diff --git a/mesalib/src/glsl/list.h b/mesalib/src/glsl/list.h index 15fcd4abd..d855240cb 100644 --- a/mesalib/src/glsl/list.h +++ b/mesalib/src/glsl/list.h @@ -81,6 +81,10 @@ struct exec_node { #ifdef __cplusplus DECLARE_RALLOC_CXX_OPERATORS(exec_node) + static void operator delete(void *node, void *ctx) + { + ralloc_free(node); + } exec_node() : next(NULL), prev(NULL) { @@ -313,6 +317,10 @@ struct exec_list { #ifdef __cplusplus DECLARE_RALLOC_CXX_OPERATORS(exec_list) + static void operator delete(void *node, void *ctx) + { + ralloc_free(node); + } exec_list() { diff --git a/mesalib/src/glsl/main.cpp b/mesalib/src/glsl/main.cpp index 23412980d..a4212fa40 100644 --- a/mesalib/src/glsl/main.cpp +++ b/mesalib/src/glsl/main.cpp @@ -20,7 +20,18 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ +#include <io.h> + +#ifdef _MSC_VER +#define __STDC__ 1 #include <getopt.h> +#define open _open +#define read _read +#define fstat _fstat +#define stat _stat +#define close _close +#define O_RDONLY _O_RDONLY +#endif /** @file main.cpp * diff --git a/mesalib/src/loader/Android.mk b/mesalib/src/loader/Android.mk index 92d9fd20d..92d9fd20d 100644..100755 --- a/mesalib/src/loader/Android.mk +++ b/mesalib/src/loader/Android.mk diff --git a/mesalib/src/loader/Makefile.am b/mesalib/src/loader/Makefile.am index aef1bd61b..aef1bd61b 100644..100755 --- a/mesalib/src/loader/Makefile.am +++ b/mesalib/src/loader/Makefile.am diff --git a/mesalib/src/loader/SConscript b/mesalib/src/loader/SConscript index 16d1053ff..16d1053ff 100644..100755 --- a/mesalib/src/loader/SConscript +++ b/mesalib/src/loader/SConscript diff --git a/mesalib/src/mapi/glapi/gen/.gitignore b/mesalib/src/mapi/glapi/gen/.gitignore new file mode 100644 index 000000000..343198fd0 --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/.gitignore @@ -0,0 +1,18 @@ +dispatch.h +enums.c +indirect.c +indirect.h +indirect_dispatch.c +indirect_dispatch.h +indirect_dispatch_swap.c +indirect_init.c +indirect_reqsize.c +indirect_reqsize.h +indirect_size.c +indirect_size.h +indirect_size_get.c +indirect_size_get.h +indirect_table.c +mapi_abi.py +remap_helper.h +glfunctions.h diff --git a/mesalib/src/mapi/glapi/gen/GL3x.xml b/mesalib/src/mapi/glapi/gen/GL3x.xml index 7919d6577..a5c7f40a6 100644 --- a/mesalib/src/mapi/glapi/gen/GL3x.xml +++ b/mesalib/src/mapi/glapi/gen/GL3x.xml @@ -30,8 +30,12 @@ <enum name="RGB16F" value="0x881B"/> <enum name="VERTEX_ATTRIB_ARRAY_INTEGER" value="0x88FD"/> <enum name="MAX_ARRAY_TEXTURE_LAYERS" value="0x88FF"/> - <enum name="MIN_PROGRAM_TEXEL_OFFSET" value="0x8904"/> - <enum name="MAX_PROGRAM_TEXEL_OFFSET" value="0x8905"/> + <enum name="MIN_PROGRAM_TEXEL_OFFSET" value="0x8904"> + <size name="Get" mode="get"/> + </enum> + <enum name="MAX_PROGRAM_TEXEL_OFFSET" value="0x8905"> + <size name="Get" mode="get"/> + </enum> <enum name="CLAMP_VERTEX_COLOR" value="0x891A"/> <enum name="CLAMP_FRAGMENT_COLOR" value="0x891B"/> <enum name="CLAMP_READ_COLOR" value="0x891C"/> diff --git a/mesalib/src/mapi/glapi/gen/gen.bat b/mesalib/src/mapi/glapi/gen/gen.bat new file mode 100644 index 000000000..aec698a80 --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/gen.bat @@ -0,0 +1,26 @@ +echo on +glx_server_table.py -f gl_and_glX_API.xml > indirect_table.c +glx_proto_size.py -m size_h --only-set -h _INDIRECT_SIZE_H_ > indirect_size.h +glx_proto_size.py -m size_c --only-set > indirect_size.c +glx_proto_size.py -m size_h --only-get -h _INDIRECT_SIZE_GET_H_ > indirect_size_get.h +glx_proto_size.py -m size_c --only-get > indirect_size_get.c +glx_proto_size.py -m reqsize_c > indirect_reqsize.c +glx_proto_size.py -m reqsize_h --only-get -h _INDIRECT_SIZE_GET_H_ > indirect_reqsize.h +glx_proto_recv.py -m dispatch_c > indirect_dispatch.c +glx_proto_recv.py -m dispatch_c -s > indirect_dispatch_swap.c +glx_proto_recv.py -m dispatch_h -f gl_and_glX_API.xml -s > indirect_dispatch.h +gl_table.py -f gl_and_es_API.xml > glapitable.h +gl_gentable.py -f gl_and_es_API.xml > glapi_gentable.c +gl_table.py -f gl_and_es_API.xml -m remap_table > dispatch.h +rem gl_offsets.py > glapioffsets.h +gl_apitemp.py -f gl_and_es_API.xml > glapitemp.h +gl_procs.py -f gl_and_es_API.xml > glprocs.h + +glX_proto_send.py -m proto > indirect.c +glX_proto_send.py -m init_h > indirect.h +glX_proto_send.py -m init_c > indirect_init.c + +gl_enums.py -f gl_and_es_API.xml > enums.c +remap_helper.py -f gl_and_es_API.xml > remap_helper.h +copy ..\..\mapi_abi.py +mapi_abi.py --printer glapi --mode lib gl_and_es_API.xml > glapi_mapi_tmp.h diff --git a/mesalib/src/mapi/glapi/gen/gen.sh b/mesalib/src/mapi/glapi/gen/gen.sh new file mode 100755 index 000000000..58e8b6867 --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/gen.sh @@ -0,0 +1,27 @@ +./glX_server_table.py -f gl_and_glX_API.xml > indirect_table.c +./glX_proto_size.py -m size_h --only-set --header-tag _INDIRECT_SIZE_H_ > indirect_size.h +./glX_proto_size.py -m size_c --only-set > indirect_size.c +./glX_proto_size.py -m size_h --only-get --header-tag _INDIRECT_SIZE_GET_H_ > indirect_size_get.h +./glX_proto_size.py -m size_c --only-get > indirect_size_get.c +./glX_proto_size.py -m reqsize_c > indirect_reqsize.c +./glX_proto_size.py -m reqsize_h --only-get --header-tag _INDIRECT_SIZE_GET_H_ > indirect_reqsize.h +./glX_proto_recv.py -m dispatch_c > indirect_dispatch.c +./glX_proto_recv.py -m dispatch_c -s > indirect_dispatch_swap.c +./glX_proto_recv.py -m dispatch_h -f gl_and_glX_API.xml -s > indirect_dispatch.h +./gl_table.py -f gl_and_es_API.xml > glapitable.h +./gl_gentable.py -f gl_and_es_API.xml > glapi_gentable.c +./gl_table.py -f gl_and_es_API.xml -m remap_table > dispatch.h +./gl_functions.py -f gl_and_es_API.xml > glfunctions.h +# ./gl_offsets.py > glapioffsets.h +./gl_apitemp.py -f gl_and_es_API.xml > glapitemp.h +./gl_procs.py -f gl_and_es_API.xml > glprocs.h + +./glX_proto_send.py -m proto > indirect.c +./glX_proto_send.py -m init_h > indirect.h +./glX_proto_send.py -m init_c > indirect_init.c + +./gl_enums.py -f gl_and_es_API.xml > enums.c +./remap_helper.py -f gl_and_es_API.xml > remap_helper.h +cp ../../mapi_abi.py . +./mapi_abi.py --printer glapi --mode lib gl_and_es_API.xml > glapi_mapi_tmp.h + diff --git a/mesalib/src/mapi/glapi/gen/glX_API.xml b/mesalib/src/mapi/glapi/gen/glX_API.xml index 926d8791b..62ad9ebbd 100644 --- a/mesalib/src/mapi/glapi/gen/glX_API.xml +++ b/mesalib/src/mapi/glapi/gen/glX_API.xml @@ -217,18 +217,4 @@ </function> </category> -<category name="GLX_ARB_create_context" number="56" window_system="glX"> - <function name="SetClientInfoARB"> - <glx sop="33"/> - </function> - - <function name="CreateContextAttribsARB"> - <glx sop="34"/> - </function> - - <function name="SetClientInfo2ARB"> - <glx sop="35"/> - </function> -</category> - </OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_recv.py b/mesalib/src/mapi/glapi/gen/glX_proto_recv.py index da468dc58..08db9e21c 100644..100755 --- a/mesalib/src/mapi/glapi/gen/glX_proto_recv.py +++ b/mesalib/src/mapi/glapi/gen/glX_proto_recv.py @@ -80,6 +80,11 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): def printRealHeader(self): + print '#ifdef HAVE_DIX_CONFIG_H' + print '#include <dix-config.h>' + print '#endif' + print '#include "glheader.h"' + print '' print '#include <X11/Xmd.h>' print '#include <GL/gl.h>' print '#include <GL/glxproto.h>' @@ -279,7 +284,10 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): if param.is_image(): offset = f.offset_of( param.name ) - print '%s %s const %s = (%s) (%s(pc + %s));' % (indent, type_string, param.name, type_string, cond, offset) + if cond: + print '%s %s const %s = (%s) (%s(pc + %s));' % (indent, type_string, param.name, type_string, cond, offset) + else: + print '%s %s const %s = (%s) (pc + %s);' % (indent, type_string, param.name, type_string, offset) if param.depth: print '%s __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);' % (indent) @@ -366,8 +374,9 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): else: for param in f.parameterIterateGlxSend(): if param.count_parameter_list: - print '%s %s = (%s) (pc + %s);' % (indent, param.name, param.type_string(), param.offset) - need_blank = 1 + if param.size() != 1 or self.do_swap: + print '%s %s = (%s) (pc + %s);' % (indent, param.name, param.type_string(), param.offset) + need_blank = 1 if need_blank: @@ -442,6 +451,8 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): elif param.counter: print ' %s answerBuffer[200];' % (answer_type) print ' %s %s = __glXGetAnswerBuffer(cl, %s%s, answerBuffer, sizeof(answerBuffer), %u);' % (param.type_string(), param.name, param.counter, size_scale, type_size) + print ' if (%s == NULL)' % (param.name) + print ' return BadAlloc;' answer_string = param.name answer_count = param.counter elif c >= 1: @@ -549,9 +560,9 @@ def main(): """Main function.""" args = _parser() - if args._mode == "dispatch_c": + if args.mode == "dispatch_c": printer = PrintGlxDispatchFunctions(args.swap) - elif args._mode == "dispatch_h": + elif args.mode == "dispatch_h": printer = PrintGlxDispatch_h() api = gl_XML.parse_GL_API( diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_send.py b/mesalib/src/mapi/glapi/gen/glX_proto_send.py index 2b3303078..2b3303078 100644..100755 --- a/mesalib/src/mapi/glapi/gen/glX_proto_send.py +++ b/mesalib/src/mapi/glapi/gen/glX_proto_send.py diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_size.py b/mesalib/src/mapi/glapi/gen/glX_proto_size.py index 75fc26f5d..9fe7b1941 100644..100755 --- a/mesalib/src/mapi/glapi/gen/glX_proto_size.py +++ b/mesalib/src/mapi/glapi/gen/glX_proto_size.py @@ -291,7 +291,7 @@ class glx_server_enum_function(glx_enum_function): print '' print ' compsize = __gl%s_size(%s);' % (f.name, string.join(f.count_parameter_list, ",")) p = f.variable_length_parameter() - print ' return __GLX_PAD(%s);' % (p.size_string()) + print ' return safe_pad(%s);' % (p.size_arg_string()) print '}' print '' @@ -315,7 +315,14 @@ class PrintGlxSizeStubs_common(gl_XML.gl_print_base): class PrintGlxSizeStubs_c(PrintGlxSizeStubs_common): def printRealHeader(self): print '' - print '#include <X11/Xfuncproto.h>' + print '#ifdef HAVE_DIX_CONFIG_H' + print '#include <dix-config.h>' + print '#else' + print '' + print '#include "glheader.h"' + print '' + print '#endif' + print '' print '#include <GL/gl.h>' if self.emit_get: print '#include "indirect_size_get.h"' @@ -428,7 +435,7 @@ class PrintGlxReqSize_h(PrintGlxReqSize_common): def printBody(self, api): for func in api.functionIterateGlx(): if not func.ignore and func.has_variable_size_request(): - print 'extern PURE _X_HIDDEN int __glX%sReqSize(const GLbyte *pc, Bool swap);' % (func.name) + print 'extern PURE _X_HIDDEN int __glX%sReqSize(const GLbyte *pc, Bool swap, int reqlen);' % (func.name) class PrintGlxReqSize_c(PrintGlxReqSize_common): @@ -446,26 +453,32 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): def printRealHeader(self): print '' + print '#ifdef HAVE_DIX_CONFIG_H' + print '#include <dix-config.h>' + print '#else' + print '' + print '#include "glheader.h"' + print '' + print '#endif' + print '' print '#include <GL/gl.h>' print '#include "glxserver.h"' print '#include "glxbyteorder.h"' print '#include "indirect_size.h"' print '#include "indirect_reqsize.h"' print '' - print '#define __GLX_PAD(x) (((x) + 3) & ~3)' - print '' print '#if defined(__CYGWIN__) || defined(__MINGW32__)' print '# undef HAVE_ALIAS' print '#endif' print '#ifdef HAVE_ALIAS' print '# define ALIAS2(from,to) \\' - print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\' + print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \\' print ' __attribute__ ((alias( # to )));' print '# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )' print '#else' print '# define ALIAS(from,to) \\' - print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\' - print ' { return __glX ## to ## ReqSize( pc, swap ); }' + print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \\' + print ' { return __glX ## to ## ReqSize( pc, swap, reqlen ); }' print '#endif' print '' print '' @@ -547,7 +560,7 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): def common_func_print_just_header(self, f): print 'int' - print '__glX%sReqSize( const GLbyte * pc, Bool swap )' % (f.name) + print '__glX%sReqSize( const GLbyte * pc, Bool swap, int reqlen )' % (f.name) print '{' @@ -605,6 +618,7 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): plus = '' size = '' param_offsets = {} + plusAdded=0 # Calculate the offset of each counter parameter and the # size string for the variable length parameter(s). While @@ -620,8 +634,10 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): if s == 0: s = 1 sig += "(%u,%u)" % (f.offset_of(p.counter), s) - size += '%s%s' % (plus, p.size_string()) - plus = ' + ' + if len(plus)!=0: + plusAdded=1 + size += '%s%s' % (plus, p.size_arg_string()) + plus = ', ' # If the calculated signature matches a function that has @@ -645,7 +661,10 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): self.common_emit_fixups(fixup) print '' - print ' return __GLX_PAD(%s);' % (size) + if plusAdded: + print ' return safe_pad(safe_add(%s));' % (size) + else: + print ' return safe_pad(%s);' % (size) print '}' print '' diff --git a/mesalib/src/mapi/glapi/gen/glX_server_table.py b/mesalib/src/mapi/glapi/gen/glX_server_table.py index 2d21f4e4e..02365221c 100644..100755 --- a/mesalib/src/mapi/glapi/gen/glX_server_table.py +++ b/mesalib/src/mapi/glapi/gen/glX_server_table.py @@ -358,6 +358,10 @@ class PrintGlxDispatchTables(glX_proto_common.glx_print_proto): def printRealHeader(self): + print '#ifndef HAVE_DIX_CONFIG_H' + print '#include "glheader.h"' + print '#endif' + print '' print '#include <inttypes.h>' print '#include "glxserver.h"' print '#include "glxext.h"' diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml index bd8db6203..6efc69b18 100644..100755 --- a/mesalib/src/mapi/glapi/gen/gl_API.xml +++ b/mesalib/src/mapi/glapi/gen/gl_API.xml @@ -183,18 +183,18 @@ <size name="Get" mode="get"/> </enum> <enum name="LIGHT_MODEL_LOCAL_VIEWER" count="1" value="0x0B51"> - <size name="LightModelfv"/> - <size name="LightModeliv"/> + <size name="LightModelfv" mode="get"/> + <size name="LightModeliv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="LIGHT_MODEL_TWO_SIDE" count="1" value="0x0B52"> - <size name="LightModelfv"/> - <size name="LightModeliv"/> + <size name="LightModelfv" mode="get"/> + <size name="LightModeliv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="LIGHT_MODEL_AMBIENT" count="4" value="0x0B53"> - <size name="LightModelfv"/> - <size name="LightModeliv"/> + <size name="LightModelfv" mode="get"/> + <size name="LightModeliv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="SHADE_MODEL" count="1" value="0x0B54"> @@ -213,33 +213,33 @@ <size name="Get" mode="get"/> </enum> <enum name="FOG_INDEX" count="1" value="0x0B61"> - <size name="Fogfv"/> - <size name="Fogiv"/> + <size name="Fogfv" mode="get"/> + <size name="Fogiv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="FOG_DENSITY" count="1" value="0x0B62"> - <size name="Fogfv"/> - <size name="Fogiv"/> + <size name="Fogfv" mode="get"/> + <size name="Fogiv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="FOG_START" count="1" value="0x0B63"> - <size name="Fogfv"/> - <size name="Fogiv"/> + <size name="Fogfv" mode="get"/> + <size name="Fogiv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="FOG_END" count="1" value="0x0B64"> - <size name="Fogfv"/> - <size name="Fogiv"/> + <size name="Fogfv" mode="get"/> + <size name="Fogiv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="FOG_MODE" count="1" value="0x0B65"> - <size name="Fogfv"/> - <size name="Fogiv"/> + <size name="Fogfv" mode="get"/> + <size name="Fogiv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="FOG_COLOR" count="4" value="0x0B66"> - <size name="Fogfv"/> - <size name="Fogiv"/> + <size name="Fogfv" mode="get"/> + <size name="Fogiv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="DEPTH_RANGE" count="2" value="0x0B70"> @@ -531,8 +531,8 @@ <size name="Get" mode="get"/> </enum> <enum name="ALPHA_SCALE" count="1" value="0x0D1C"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> <size name="Get" mode="get"/> @@ -625,93 +625,93 @@ <size name="Get" mode="get"/> </enum> <enum name="MAP1_COLOR_4" count="4" value="0x0D90"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_INDEX" count="1" value="0x0D91"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_NORMAL" count="3" value="0x0D92"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_TEXTURE_COORD_1" count="1" value="0x0D93"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_TEXTURE_COORD_2" count="2" value="0x0D94"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_TEXTURE_COORD_3" count="3" value="0x0D95"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_TEXTURE_COORD_4" count="4" value="0x0D96"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_VERTEX_3" count="3" value="0x0D97"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_VERTEX_4" count="4" value="0x0D98"> - <size name="Map1d"/> - <size name="Map1f"/> + <size name="Map1d" mode="get"/> + <size name="Map1f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_COLOR_4" count="4" value="0x0DB0"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_INDEX" count="1" value="0x0DB1"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_NORMAL" count="3" value="0x0DB2"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_TEXTURE_COORD_1" count="1" value="0x0DB3"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_TEXTURE_COORD_2" count="2" value="0x0DB4"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_TEXTURE_COORD_3" count="3" value="0x0DB5"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_TEXTURE_COORD_4" count="4" value="0x0DB6"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_VERTEX_3" count="3" value="0x0DB7"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP2_VERTEX_4" count="4" value="0x0DB8"> - <size name="Map2d"/> - <size name="Map2f"/> + <size name="Map2d" mode="get"/> + <size name="Map2f" mode="get"/> <size name="Get" count="1" mode="get"/> </enum> <enum name="MAP1_GRID_DOMAIN" count="2" value="0x0DD0"> @@ -754,8 +754,8 @@ <size name="GetTexLevelParameteriv" mode="get"/> </enum> <enum name="TEXTURE_BORDER_COLOR" count="4" value="0x1004"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -763,111 +763,111 @@ <enum name="FASTEST" value="0x1101"/> <enum name="NICEST" value="0x1102"/> <enum name="AMBIENT" count="4" value="0x1200"> - <size name="Materialfv"/> - <size name="Materialiv"/> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Materialfv" mode="get"/> + <size name="Materialiv" mode="get"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetMaterialfv" mode="get"/> <size name="GetMaterialiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="DIFFUSE" count="4" value="0x1201"> - <size name="Materialfv"/> - <size name="Materialiv"/> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Materialfv" mode="get"/> + <size name="Materialiv" mode="get"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetMaterialfv" mode="get"/> <size name="GetMaterialiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="SPECULAR" count="4" value="0x1202"> - <size name="Materialfv"/> - <size name="Materialiv"/> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Materialfv" mode="get"/> + <size name="Materialiv" mode="get"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetMaterialfv" mode="get"/> <size name="GetMaterialiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="POSITION" count="4" value="0x1203"> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="SPOT_DIRECTION" count="3" value="0x1204"> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="SPOT_EXPONENT" count="1" value="0x1205"> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="SPOT_CUTOFF" count="1" value="0x1206"> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="CONSTANT_ATTENUATION" count="1" value="0x1207"> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="LINEAR_ATTENUATION" count="1" value="0x1208"> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="QUADRATIC_ATTENUATION" count="1" value="0x1209"> - <size name="Lightfv"/> - <size name="Lightiv"/> + <size name="Lightfv" mode="get"/> + <size name="Lightiv" mode="get"/> <size name="GetLightfv" mode="get"/> <size name="GetLightiv" mode="get"/> </enum> <enum name="COMPILE" value="0x1300"/> <enum name="COMPILE_AND_EXECUTE" value="0x1301"/> <enum name="BYTE" count="1" value="0x1400"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="UNSIGNED_BYTE" count="1" value="0x1401"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="SHORT" count="2" value="0x1402"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="UNSIGNED_SHORT" count="2" value="0x1403"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="INT" count="4" value="0x1404"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="UNSIGNED_INT" count="4" value="0x1405"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="FLOAT" count="4" value="0x1406"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="2_BYTES" count="2" value="0x1407"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="3_BYTES" count="3" value="0x1408"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="4_BYTES" count="4" value="0x1409"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="HALF_FLOAT" count="2" value="0x140B"> - <size name="CallLists"/> + <size name="CallLists" mode="get"/> </enum> <enum name="CLEAR" value="0x1500"/> <enum name="AND" value="0x1501"/> @@ -886,26 +886,26 @@ <enum name="NAND" value="0x150E"/> <enum name="SET" value="0x150F"/> <enum name="EMISSION" count="4" value="0x1600"> - <size name="Materialfv"/> - <size name="Materialiv"/> + <size name="Materialfv" mode="get"/> + <size name="Materialiv" mode="get"/> <size name="GetMaterialfv" mode="get"/> <size name="GetMaterialiv" mode="get"/> </enum> <enum name="SHININESS" count="1" value="0x1601"> - <size name="Materialfv"/> - <size name="Materialiv"/> + <size name="Materialfv" mode="get"/> + <size name="Materialiv" mode="get"/> <size name="GetMaterialfv" mode="get"/> <size name="GetMaterialiv" mode="get"/> </enum> <enum name="AMBIENT_AND_DIFFUSE" count="4" value="0x1602"> - <size name="Materialfv"/> - <size name="Materialiv"/> + <size name="Materialfv" mode="get"/> + <size name="Materialiv" mode="get"/> <size name="GetMaterialfv" mode="get"/> <size name="GetMaterialiv" mode="get"/> </enum> <enum name="COLOR_INDEXES" count="3" value="0x1603"> - <size name="Materialfv"/> - <size name="Materialiv"/> + <size name="Materialfv" mode="get"/> + <size name="Materialiv" mode="get"/> <size name="GetMaterialfv" mode="get"/> <size name="GetMaterialiv" mode="get"/> </enum> @@ -950,14 +950,14 @@ <enum name="MODULATE" value="0x2100"/> <enum name="DECAL" value="0x2101"/> <enum name="TEXTURE_ENV_MODE" count="1" value="0x2200"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="TEXTURE_ENV_COLOR" count="4" value="0x2201"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> @@ -966,25 +966,25 @@ <enum name="OBJECT_LINEAR" value="0x2401"/> <enum name="SPHERE_MAP" value="0x2402"/> <enum name="TEXTURE_GEN_MODE" count="1" value="0x2500"> - <size name="TexGendv"/> - <size name="TexGenfv"/> - <size name="TexGeniv"/> + <size name="TexGendv" mode="get"/> + <size name="TexGenfv" mode="get"/> + <size name="TexGeniv" mode="get"/> <size name="GetTexGendv" mode="get"/> <size name="GetTexGenfv" mode="get"/> <size name="GetTexGeniv" mode="get"/> </enum> <enum name="OBJECT_PLANE" count="4" value="0x2501"> - <size name="TexGendv"/> - <size name="TexGenfv"/> - <size name="TexGeniv"/> + <size name="TexGendv" mode="get"/> + <size name="TexGenfv" mode="get"/> + <size name="TexGeniv" mode="get"/> <size name="GetTexGendv" mode="get"/> <size name="GetTexGenfv" mode="get"/> <size name="GetTexGeniv" mode="get"/> </enum> <enum name="EYE_PLANE" count="4" value="0x2502"> - <size name="TexGendv"/> - <size name="TexGenfv"/> - <size name="TexGeniv"/> + <size name="TexGendv" mode="get"/> + <size name="TexGenfv" mode="get"/> + <size name="TexGeniv" mode="get"/> <size name="GetTexGendv" mode="get"/> <size name="GetTexGenfv" mode="get"/> <size name="GetTexGeniv" mode="get"/> @@ -996,26 +996,26 @@ <enum name="NEAREST_MIPMAP_LINEAR" value="0x2702"/> <enum name="LINEAR_MIPMAP_LINEAR" value="0x2703"/> <enum name="TEXTURE_MAG_FILTER" count="1" value="0x2800"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_MIN_FILTER" count="1" value="0x2801"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_WRAP_S" count="1" value="0x2802"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_WRAP_T" count="1" value="0x2803"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -3056,8 +3056,8 @@ <enum name="PROXY_TEXTURE_1D" value="0x8063"/> <enum name="PROXY_TEXTURE_2D" value="0x8064"/> <enum name="TEXTURE_PRIORITY" count="1" value="0x8066"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -3397,8 +3397,8 @@ <size name="GetTexLevelParameteriv" mode="get"/> </enum> <enum name="TEXTURE_WRAP_R" count="1" value="0x8072"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -3422,32 +3422,32 @@ </enum> <enum name="CLAMP_TO_EDGE" value="0x812F"/> <enum name="TEXTURE_MIN_LOD" count="1" value="0x813A"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_MAX_LOD" count="1" value="0x813B"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_BASE_LEVEL" count="1" value="0x813C"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_MAX_LEVEL" count="1" value="0x813D"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="LIGHT_MODEL_COLOR_CONTROL" count="1" value="0x81F8"> - <size name="LightModelfv"/> - <size name="LightModeliv"/> + <size name="LightModelfv" mode="get"/> + <size name="LightModeliv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="SINGLE_COLOR" value="0x81F9"/> @@ -3499,26 +3499,26 @@ </enum> <enum name="CONVOLUTION_BORDER_MODE" count="1" value="0x8013"> - <size name="ConvolutionParameterfv"/> - <size name="ConvolutionParameteriv"/> + <size name="ConvolutionParameterfv" mode="get"/> + <size name="ConvolutionParameteriv" mode="get"/> <size name="GetConvolutionParameterfv" mode="get"/> <size name="GetConvolutionParameteriv" mode="get"/> </enum> <enum name="CONVOLUTION_BORDER_COLOR" count="4" value="0x8154"> - <size name="ConvolutionParameterfv"/> - <size name="ConvolutionParameteriv"/> + <size name="ConvolutionParameterfv" mode="get"/> + <size name="ConvolutionParameteriv" mode="get"/> <size name="GetConvolutionParameterfv" mode="get"/> <size name="GetConvolutionParameteriv" mode="get"/> </enum> <enum name="CONVOLUTION_FILTER_SCALE" count="4" value="0x8014"> - <size name="ConvolutionParameterfv"/> - <size name="ConvolutionParameteriv"/> + <size name="ConvolutionParameterfv" mode="get"/> + <size name="ConvolutionParameteriv" mode="get"/> <size name="GetConvolutionParameterfv" mode="get"/> <size name="GetConvolutionParameteriv" mode="get"/> </enum> <enum name="CONVOLUTION_FILTER_BIAS" count="4" value="0x8015"> - <size name="ConvolutionParameterfv"/> - <size name="ConvolutionParameteriv"/> + <size name="ConvolutionParameterfv" mode="get"/> + <size name="ConvolutionParameteriv" mode="get"/> <size name="GetConvolutionParameterfv" mode="get"/> <size name="GetConvolutionParameteriv" mode="get"/> </enum> @@ -3666,14 +3666,14 @@ <enum name="PROXY_POST_COLOR_MATRIX_COLOR_TABLE" value="0x80D5"/> <enum name="COLOR_TABLE_SCALE" count="4" value="0x80D6"> - <size name="ColorTableParameterfv"/> - <size name="ColorTableParameteriv"/> + <size name="ColorTableParameterfv" mode="get"/> + <size name="ColorTableParameteriv" mode="get"/> <size name="GetColorTableParameterfv" mode="get"/> <size name="GetColorTableParameteriv" mode="get"/> </enum> <enum name="COLOR_TABLE_BIAS" count="4" value="0x80D7"> - <size name="ColorTableParameterfv"/> - <size name="ColorTableParameteriv"/> + <size name="ColorTableParameterfv" mode="get"/> + <size name="ColorTableParameteriv" mode="get"/> <size name="GetColorTableParameterfv" mode="get"/> <size name="GetColorTableParameteriv" mode="get"/> </enum> @@ -4150,92 +4150,92 @@ <enum name="CLAMP_TO_BORDER" value="0x812D"/> <enum name="COMBINE" value="0x8570"/> <enum name="COMBINE_RGB" count="1" value="0x8571"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="COMBINE_ALPHA" count="1" value="0x8572"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="SOURCE0_RGB" count="1" value="0x8580"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="SOURCE1_RGB" count="1" value="0x8581"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="SOURCE2_RGB" count="1" value="0x8582"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="SOURCE0_ALPHA" count="1" value="0x8588"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="SOURCE1_ALPHA" count="1" value="0x8589"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="SOURCE2_ALPHA" count="1" value="0x858A"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="OPERAND0_RGB" count="1" value="0x8590"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="OPERAND1_RGB" count="1" value="0x8591"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="OPERAND2_RGB" count="1" value="0x8592"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="OPERAND0_ALPHA" count="1" value="0x8598"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="OPERAND1_ALPHA" count="1" value="0x8599"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="OPERAND2_ALPHA" count="1" value="0x859A"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="RGB_SCALE" count="1" value="0x8573"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> @@ -4584,24 +4584,24 @@ <size name="Get" mode="get"/> </enum> <enum name="POINT_SIZE_MIN" count="1" value="0x8126"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="POINT_SIZE_MAX" count="1" value="0x8127"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="POINT_FADE_THRESHOLD_SIZE" count="1" value="0x8128"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="POINT_DISTANCE_ATTENUATION" count="3" value="0x8129"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="GENERATE_MIPMAP" count="1" value="0x8191"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -4650,10 +4650,10 @@ </enum> <enum name="TEXTURE_FILTER_CONTROL" value="0x8500"/> <enum name="TEXTURE_LOD_BIAS" count="1" value="0x8501"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> @@ -4666,20 +4666,20 @@ <size name="GetTexLevelParameteriv" mode="get"/> </enum> <enum name="DEPTH_TEXTURE_MODE" count="1" value="0x884B"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_COMPARE_MODE" count="1" value="0x884C"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_COMPARE_FUNC" count="1" value="0x884D"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -5223,8 +5223,8 @@ <enum name="SHADING_LANGUAGE_VERSION" value="0x8B8C"/> <enum name="CURRENT_PROGRAM" value="0x8B8D"/> <enum name="POINT_SPRITE_COORD_ORIGIN" count="1" value="0x8CA0"> - <size name="PointParameterfv"/> - <size name="PointParameteriv"/> + <size name="PointParameterfv" mode="get"/> + <size name="PointParameteriv" mode="get"/> </enum> <enum name="LOWER_LEFT" value="0x8CA1"/> <enum name="UPPER_LEFT" value="0x8CA2"/> @@ -6346,16 +6346,16 @@ <category name="GL_ARB_point_parameters" number="14"> <enum name="POINT_SIZE_MIN_ARB" count="1" value="0x8126"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_SIZE_MAX_ARB" count="1" value="0x8127"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_FADE_THRESHOLD_SIZE_ARB" count="1" value="0x8128"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_DISTANCE_ATTENUATION_ARB" count="3" value="0x8129"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <function name="PointParameterfARB" alias="PointParameterf"> @@ -6661,8 +6661,8 @@ <size name="GetTexLevelParameteriv" mode="get"/> </enum> <enum name="DEPTH_TEXTURE_MODE_ARB" count="1" value="0x884B"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -6670,14 +6670,14 @@ <category name="GL_ARB_shadow" number="23"> <enum name="TEXTURE_COMPARE_MODE_ARB" count="1" value="0x884C"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_COMPARE_FUNC_ARB" count="1" value="0x884D"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -6686,8 +6686,8 @@ <category name="GL_ARB_shadow_ambient" number="24"> <enum name="TEXTURE_COMPARE_FAIL_VALUE_ARB" count="1" value="0x80BF"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -7933,8 +7933,8 @@ <size name="Get" mode="get"/> </enum> <enum name="COORD_REPLACE_ARB" count="1" value="0x8862"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> @@ -8601,20 +8601,20 @@ <category name="GL_EXT_convolution" number="12"> <enum name="CONVOLUTION_BORDER_MODE_EXT" count="1" value="0x8013"> - <size name="ConvolutionParameterfv"/> - <size name="ConvolutionParameteriv"/> + <size name="ConvolutionParameterfv" mode="get"/> + <size name="ConvolutionParameteriv" mode="get"/> <size name="GetConvolutionParameterfv" mode="get"/> <size name="GetConvolutionParameteriv" mode="get"/> </enum> <enum name="CONVOLUTION_FILTER_SCALE_EXT" count="4" value="0x8014"> - <size name="ConvolutionParameterfv"/> - <size name="ConvolutionParameteriv"/> + <size name="ConvolutionParameterfv" mode="get"/> + <size name="ConvolutionParameteriv" mode="get"/> <size name="GetConvolutionParameterfv" mode="get"/> <size name="GetConvolutionParameteriv" mode="get"/> </enum> <enum name="CONVOLUTION_FILTER_BIAS_EXT" count="4" value="0x8015"> - <size name="ConvolutionParameterfv"/> - <size name="ConvolutionParameteriv"/> + <size name="ConvolutionParameterfv" mode="get"/> + <size name="ConvolutionParameteriv" mode="get"/> <size name="GetConvolutionParameterfv" mode="get"/> <size name="GetConvolutionParameteriv" mode="get"/> </enum> @@ -9133,8 +9133,8 @@ <category name="GL_SGIS_generate_mipmap" number="32"> <enum name="GENERATE_MIPMAP_SGIS" count="1" value="0x8191"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -9144,26 +9144,26 @@ <category name="GL_SGIX_clipmap" number="33"> <enum name="LINEAR_CLIPMAP_LINEAR_SGIX" value="0x8170"/> <enum name="TEXTURE_CLIPMAP_CENTER_SGIX" count="2" value="0x8171"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_CLIPMAP_FRAME_SGIX" count="1" value="0x8172"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_CLIPMAP_OFFSET_SGIX" count="2" value="0x8173"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX" count="3" value="0x8174"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -9178,14 +9178,14 @@ <category name="GL_SGIX_shadow" number="34"> <enum name="TEXTURE_COMPARE_SGIX" count="1" value="0x819A"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_COMPARE_OPERATOR_SGIX" count="1" value="0x819B"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -9262,16 +9262,16 @@ <category name="GL_EXT_point_parameters" number="54"> <enum name="POINT_SIZE_MIN_EXT" count="1" value="0x8126"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_SIZE_MAX_EXT" count="1" value="0x8127"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_FADE_THRESHOLD_SIZE_EXT" count="1" value="0x8128"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_DISTANCE_ATTENUATION_EXT" count="3" value="0x8129"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <function name="PointParameterfEXT" alias="PointParameterf"> @@ -9320,14 +9320,14 @@ <category name="GL_SGIX_texture_scale_bias" number="56"> <enum name="POST_TEXTURE_FILTER_BIAS_SGIX" count="4" value="0x8179"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="POST_TEXTURE_FILTER_SCALE_SGIX" count="4" value="0x817A"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -9387,8 +9387,8 @@ <category name="GL_SGIX_fog_offset" number="65"> <enum name="FOG_OFFSET_SGIX" value="0x8198"/> <enum name="FOG_OFFSET_VALUE_SGIX" count="1" value="0x8199"> - <size name="Fogfv"/> - <size name="Fogiv"/> + <size name="Fogfv" mode="get"/> + <size name="Fogiv" mode="get"/> </enum> </category> @@ -9435,8 +9435,8 @@ <enum name="CONSTANT_BORDER_HP" value="0x8151"/> <enum name="REPLICATE_BORDER_HP" value="0x8153"/> <enum name="CONVOLUTION_BORDER_COLOR_HP" count="4" value="0x8154"> - <size name="ConvolutionParameterfv"/> - <size name="ConvolutionParameteriv"/> + <size name="ConvolutionParameterfv" mode="get"/> + <size name="ConvolutionParameteriv" mode="get"/> <size name="GetConvolutionParameterfv" mode="get"/> <size name="GetConvolutionParameteriv" mode="get"/> </enum> @@ -9602,20 +9602,20 @@ <category name="GL_SGIX_texture_lod_bias" number="84"> <enum name="TEXTURE_LOD_BIAS_S_SGIX" count="1" value="0x818E"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_LOD_BIAS_T_SGIX" count="1" value="0x818F"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_LOD_BIAS_R_SGIX" count="1" value="0x8190"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -9630,8 +9630,8 @@ <category name="GL_SGIX_shadow_ambient" number="90"> <enum name="SHADOW_AMBIENT_SGIX" count="1" value="0x80BF"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -9978,8 +9978,8 @@ <category name="GL_EXT_separate_specular_color" number="144"> <enum name="LIGHT_MODEL_COLOR_CONTROL_EXT" count="1" value="0x81F8"> - <size name="LightModelfv"/> - <size name="LightModeliv"/> + <size name="LightModelfv" mode="get"/> + <size name="LightModeliv" mode="get"/> </enum> <enum name="SINGLE_COLOR_EXT" value="0x81F9"/> <enum name="SEPARATE_SPECULAR_COLOR_EXT" value="0x81FA"/> @@ -10753,8 +10753,8 @@ <category name="GL_EXT_texture_lod_bias" number="186"> <enum name="TEXTURE_LOD_BIAS_EXT" count="1" value="0x8501"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -10762,8 +10762,8 @@ <category name="GL_EXT_texture_filter_anisotropic" number="187"> <enum name="TEXTURE_MAX_ANISOTROPY_EXT" count="1" value="0x84FE"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -10922,8 +10922,8 @@ <category name="GL_NV_fog_distance" number="192"> <enum name="FOG_DISTANCE_MODE_NV" count="1" value="0x855A"> - <size name="Fogfv"/> - <size name="Fogiv"/> + <size name="Fogfv" mode="get"/> + <size name="Fogiv" mode="get"/> <size name="Get" mode="get"/> </enum> <enum name="EYE_RADIAL_NV" value="0x855B"/> @@ -10937,26 +10937,26 @@ <category name="GL_NV_texture_env_combine4" number="195"> <enum name="COMBINE4_NV" value="0x8503"/> <enum name="SOURCE3_RGB_NV" count="1" value="0x8583"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="SOURCE3_ALPHA_NV" count="1" value="0x858B"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="OPERAND3_RGB_NV" count="1" value="0x8593"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="OPERAND3_ALPHA_NV" count="1" value="0x859B"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> @@ -11970,20 +11970,20 @@ <category name="GL_SGIX_texture_coordinate_clamp" number="235"> <enum name="TEXTURE_MAX_CLAMP_S_SGIX" count="1" value="0x8369"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_MAX_CLAMP_T_SGIX" count="1" value="0x836A"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> <enum name="TEXTURE_MAX_CLAMP_R_SGIX" count="1" value="0x836B"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -12022,8 +12022,8 @@ <enum name="DU8DV8_ATI" value="0x877A"/> <enum name="BUMP_ENVMAP_ATI" value="0x877B"/> <enum name="BUMP_TARGET_ATI" count="1" value="0x877C"> - <size name="TexEnviv"/> - <size name="TexEnvfv"/> + <size name="TexEnviv" mode="get"/> + <size name="TexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> </enum> @@ -12327,30 +12327,30 @@ added for this extension. --> <enum name="POINT_SIZE_MIN_EXT" count="1" value="0x8126"> - <size name="PointParameteriv"/> + <size name="PointParameteriv" mode="get"/> </enum> <enum name="POINT_SIZE_MAX_EXT" count="1" value="0x8127"> - <size name="PointParameteriv"/> + <size name="PointParameteriv" mode="get"/> </enum> <enum name="POINT_FADE_THRESHOLD_SIZE_EXT" count="1" value="0x8128"> - <size name="PointParameteriv"/> + <size name="PointParameteriv" mode="get"/> </enum> <enum name="POINT_DISTANCE_ATTENUATION_EXT" count="3" value="0x8129"> - <size name="PointParameteriv"/> + <size name="PointParameteriv" mode="get"/> </enum> <enum name="POINT_SPRITE_NV" count="1" value="0x8861"> <size name="Get" mode="get"/> </enum> <enum name="COORD_REPLACE_NV" count="1" value="0x8862"> - <size name="TexEnvfv"/> - <size name="TexEnviv"/> + <size name="TexEnvfv" mode="get"/> + <size name="TexEnviv" mode="get"/> <size name="GetTexEnvfv" mode="get"/> <size name="GetTexEnviv" mode="get"/> </enum> <enum name="POINT_SPRITE_R_MODE_NV" count="1" value="0x8863"> - <size name="PointParameterfv"/> - <size name="PointParameteriv"/> + <size name="PointParameterfv" mode="get"/> + <size name="PointParameteriv" mode="get"/> <size name="Get" mode="get"/> </enum> @@ -12479,8 +12479,8 @@ <category name="GL_NV_texture_expand_normal" number="286"> <enum name="TEXTURE_UNSIGNED_REMAP_MODE_NV" count="1" value="0x888F"> - <size name="TexParameterfv"/> - <size name="TexParameteriv"/> + <size name="TexParameterfv" mode="get"/> + <size name="TexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> </enum> @@ -12646,22 +12646,22 @@ <category name="GL_APPLE_texture_range" number="367"> <enum name="TEXTURE_STORAGE_HINT_APPLE" count="1" value="0x85BC"> - <size name="TexParameteriv"/> - <size name="TexParameterfv"/> + <size name="TexParameteriv" mode="get"/> + <size name="TexParameterfv" mode="get"/> <size name="GetTexParameteriv" mode="get"/> <size name="GetTexParameterfv" mode="get"/> </enum> <enum name="STORAGE_PRIVATE_APPLE" count="1" value="0x85BD"> - <size name="TexParameteriv"/> - <size name="TexParameterfv"/> + <size name="TexParameteriv" mode="get"/> + <size name="TexParameterfv" mode="get"/> </enum> <enum name="STORAGE_CACHED_APPLE" count="1" value="0x85BE"> - <size name="TexParameteriv"/> - <size name="TexParameterfv"/> + <size name="TexParameteriv" mode="get"/> + <size name="TexParameterfv" mode="get"/> </enum> <enum name="STORAGE_SHARED_APPLE" count="1" value="0x85BF"> - <size name="TexParameteriv"/> - <size name="TexParameterfv"/> + <size name="TexParameteriv" mode="get"/> + <size name="TexParameterfv" mode="get"/> </enum> <enum name="TEXTURE_RANGE_LENGTH_APPLE" count="1" value="0x85B7"> <size name="GetTexParameteriv" mode="get"/> @@ -12795,16 +12795,16 @@ <category name="GL_SGIS_point_parameters"> <enum name="POINT_SIZE_MIN_SGIS" count="1" value="0x8126"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_SIZE_MAX_SGIS" count="1" value="0x8127"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_FADE_THRESHOLD_SIZE_SGIS" count="1" value="0x8128"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <enum name="POINT_DISTANCE_ATTENUATION_SGIS" count="3" value="0x8129"> - <size name="PointParameterfv"/> + <size name="PointParameterfv" mode="get"/> </enum> <function name="PointParameterfSGIS" alias="PointParameterf"> diff --git a/mesalib/src/mapi/glapi/gen/gl_XML.py b/mesalib/src/mapi/glapi/gen/gl_XML.py index 67aba81a7..b5e7b32d0 100644 --- a/mesalib/src/mapi/glapi/gen/gl_XML.py +++ b/mesalib/src/mapi/glapi/gen/gl_XML.py @@ -585,6 +585,29 @@ class gl_parameter(object): else: return str(s) + def size_arg_string(self, use_parens = 1): + s = self.size() + if self.counter or self.count_parameter_list: + list = [ "compsize" ] + + if self.counter and self.count_parameter_list: + list.append( self.counter ) + elif self.counter: + list = [ self.counter ] + + if s > 1: + list.append( str(s) ) + + if len(list) > 1 and use_parens : + return "safe_mul(%s)" % (string.join(list, " , ")) + else: + return string.join(list, " , ") + + elif self.is_image(): + return "compsize" + else: + return str(s) + def format_string(self): if self.type_expr.original_string == "GLenum": diff --git a/mesalib/src/mapi/glapi/gen/gl_apitemp.py b/mesalib/src/mapi/glapi/gen/gl_apitemp.py index 5e985a2ec..5e985a2ec 100644..100755 --- a/mesalib/src/mapi/glapi/gen/gl_apitemp.py +++ b/mesalib/src/mapi/glapi/gen/gl_apitemp.py diff --git a/mesalib/src/mapi/glapi/gen/gl_enums.py b/mesalib/src/mapi/glapi/gen/gl_enums.py index 955f27d08..0d393e3be 100644..100755 --- a/mesalib/src/mapi/glapi/gen/gl_enums.py +++ b/mesalib/src/mapi/glapi/gen/gl_enums.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/env python # -*- Mode: Python; py-indent-offset: 8 -*- # (C) Copyright Zack Rusin 2005. All Rights Reserved. diff --git a/mesalib/src/mapi/glapi/gen/gl_functions.py b/mesalib/src/mapi/glapi/gen/gl_functions.py new file mode 100755 index 000000000..cd408ade2 --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/gl_functions.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python + +# (C) Copyright IBM Corporation 2004 +# All Rights Reserved. +# +# 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 +# on the rights to use, copy, modify, merge, publish, distribute, sub +# license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL +# IBM AND/OR ITS SUPPLIERS 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: +# Ian Romanick <idr@us.ibm.com> + +import gl_XML +import license +import sys, getopt + +class PrintFunctionTable(gl_XML.gl_print_base): + def __init__(self): + gl_XML.gl_print_base.__init__(self) + + self.header_tag = '__GLFUNCTIONS_H__' + self.name = "gl_functions.py" + self.license = license.bsd_license_template % ("(C) Copyright IBM Corporation 2005", "IBM") + return + + + def printRealHeader(self): + print """ +#include "glapitable.h" +#include "glapi.h" +#include "u_thread.h" +#include "dispatch.h" +""" + return + + def printBody(self, api): + + functions = [] + abi_functions = [] + alias_functions = [] + count = 0 + for f in api.functionIterateByOffset(): + if not f.is_abi(): + functions.append( [f, count] ) + count += 1 + else: + abi_functions.append( [f, -1] ) + + for f, index in abi_functions + functions: + arg_string="" + nrParams=0 + comma="" + + for p in f.parameters: + if not p.is_padding: + nrParams+=1 + arg_string+=comma + comma=", " + arg_string+="a%d"%nrParams + + print '#define gl%s(%s) CALL_%s(GET_DISPATCH(), (%s))' % (f.name, arg_string, f.name, arg_string) + + return + + +def show_usage(): + print "Usage: %s [-f input_file_name]" % sys.argv[0] + sys.exit(1) + +if __name__ == '__main__': + file_name = "gl_API.xml" + + try: + (args, trail) = getopt.getopt(sys.argv[1:], "f:") + except Exception,e: + show_usage() + + for (arg,val) in args: + if arg == "-f": + file_name = val + + printer = PrintFunctionTable() + + api = gl_XML.parse_GL_API( file_name ) + + printer.Print( api ) diff --git a/mesalib/src/mapi/glapi/gen/gl_gentable.py b/mesalib/src/mapi/glapi/gen/gl_gentable.py index 1b3eb7247..36ac86b8e 100644..100755 --- a/mesalib/src/mapi/glapi/gen/gl_gentable.py +++ b/mesalib/src/mapi/glapi/gen/gl_gentable.py @@ -58,7 +58,7 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i #include <stdlib.h> #include <stdio.h> -#include "main/glheader.h" +#include "glheader.h" #include "glapi.h" #include "glapitable.h" diff --git a/mesalib/src/mapi/glapi/gen/gl_procs.py b/mesalib/src/mapi/glapi/gen/gl_procs.py index 685e2fac3..685e2fac3 100644..100755 --- a/mesalib/src/mapi/glapi/gen/gl_procs.py +++ b/mesalib/src/mapi/glapi/gen/gl_procs.py diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py index 3f0290230..d7e2b9dce 100644..100755 --- a/mesalib/src/mapi/glapi/gen/gl_table.py +++ b/mesalib/src/mapi/glapi/gen/gl_table.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/env python # (C) Copyright IBM Corporation 2004 # All Rights Reserved. @@ -89,6 +89,7 @@ class PrintRemapTable(gl_XML.gl_print_base): def printRealHeader(self): print """ +#include "glapitable.h" /** * \\file main/dispatch.h * Macros for handling GL dispatch tables. @@ -104,6 +105,11 @@ class PrintRemapTable(gl_XML.gl_print_base): def printBody(self, api): + print '#ifdef _MSC_VER' + print '#ifndef INLINE' + print '#define INLINE __inline' + print '#endif' + print '#endif' print '#define CALL_by_offset(disp, cast, offset, parameters) \\' print ' (*(cast (GET_by_offset(disp, offset)))) parameters' print '#define GET_by_offset(disp, offset) \\' @@ -154,7 +160,7 @@ class PrintRemapTable(gl_XML.gl_print_base): remap_table = "driDispatchRemapTable" print '#define %s_size %u' % (remap_table, count) - print 'extern int %s[ %s_size ];' % (remap_table, remap_table) + print 'SERVEXTERN int %s[ %s_size ];' % (remap_table, remap_table) print '' for f, index in functions: @@ -173,11 +179,11 @@ class PrintRemapTable(gl_XML.gl_print_base): print 'typedef %s (GLAPIENTRYP _glptr_%s)(%s);' % (f.return_type, f.name, arg_string) print '#define CALL_%s(disp, parameters) \\' % (f.name) print ' (* GET_%s(disp)) parameters' % (f.name) - print 'static inline _glptr_%s GET_%s(struct _glapi_table *disp) {' % (f.name, f.name) + print 'static INLINE _glptr_%s GET_%s(struct _glapi_table *disp) {' % (f.name, f.name) print ' return (_glptr_%s) (GET_by_offset(disp, _gloffset_%s));' % (f.name, f.name) print '}' print - print 'static inline void SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name, f.return_type, arg_string) + print 'static INLINE void SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name, f.return_type, arg_string) print ' SET_by_offset(disp, _gloffset_%s, fn);' % (f.name) print '}' print diff --git a/mesalib/src/mapi/glapi/gen/remap_helper.py b/mesalib/src/mapi/glapi/gen/remap_helper.py index 94ae1936d..bd269b6a3 100644..100755 --- a/mesalib/src/mapi/glapi/gen/remap_helper.py +++ b/mesalib/src/mapi/glapi/gen/remap_helper.py @@ -67,8 +67,8 @@ class PrintGlRemap(gl_XML.gl_print_base): def printRealHeader(self): - print '#include "main/dispatch.h"' - print '#include "main/remap.h"' + print '#include "dispatch.h"' + print '#include "remap.h"' print '' return diff --git a/mesalib/src/mapi/glapi/glapi.h b/mesalib/src/mapi/glapi/glapi.h index 673295bca..8084e5757 100644..100755 --- a/mesalib/src/mapi/glapi/glapi.h +++ b/mesalib/src/mapi/glapi/glapi.h @@ -68,9 +68,20 @@ extern "C" { # endif #endif /* _GLAPI_NO_EXPORTS */ +#include "GL/gl.h" +#include "GL/glext.h" -/* Is this needed? It is incomplete anyway. */ -#ifdef USE_MGL_NAMESPACE + +struct _glapi_table; + +typedef void (*_glapi_proc)(void); /* generic function pointer */ + +typedef void (*_glapi_nop_handler_proc)(const char *name); + +typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...); + + +#if defined(USE_MGL_NAMESPACE) #define _glapi_set_dispatch _mglapi_set_dispatch #define _glapi_get_dispatch _mglapi_get_dispatch #define _glapi_set_context _mglapi_set_context @@ -79,20 +90,23 @@ extern "C" { #define _glapi_Context _mglapi_Context #endif -typedef void (*_glapi_proc)(void); - -typedef void (*_glapi_nop_handler_proc)(const char *name); - -struct _glapi_table; +/* + * Number of extension functions which we can dynamically add at runtime. + */ +#define MAX_EXTENSION_FUNCS 300 +/** + ** Define the GET_CURRENT_CONTEXT() macro. + ** \param C local variable which will hold the current context. + **/ #if defined (GLX_USE_TLS) _GLAPI_EXPORT extern __thread struct _glapi_table * _glapi_tls_Dispatch - __attribute__((tls_model("initial-exec"))); + ; _GLAPI_EXPORT extern __thread void * _glapi_tls_Context - __attribute__((tls_model("initial-exec"))); + ; _GLAPI_EXPORT extern const struct _glapi_table *_glapi_Dispatch; _GLAPI_EXPORT extern const void *_glapi_Context; @@ -102,8 +116,14 @@ _GLAPI_EXPORT extern const void *_glapi_Context; #else -_GLAPI_EXPORT extern struct _glapi_table *_glapi_Dispatch; -_GLAPI_EXPORT extern void *_glapi_Context; +#ifdef INSERVER +#define SERVEXTERN _declspec(dllimport) +#else +#define SERVEXTERN _declspec(dllexport) +#endif + +SERVEXTERN struct _glapi_table *_glapi_Dispatch; +SERVEXTERN void *_glapi_Context; #define GET_DISPATCH() \ (likely(_glapi_Dispatch) ? _glapi_Dispatch : _glapi_get_dispatch()) @@ -114,77 +134,61 @@ _GLAPI_EXPORT extern void *_glapi_Context; #endif /* defined (GLX_USE_TLS) */ -void -_glapi_destroy_multithread(void); - +/** + ** GL API public functions + **/ -_GLAPI_EXPORT void +SERVEXTERN void _glapi_check_multithread(void); -_GLAPI_EXPORT void +SERVEXTERN void _glapi_set_context(void *context); -_GLAPI_EXPORT void * +SERVEXTERN void * _glapi_get_context(void); -_GLAPI_EXPORT void +SERVEXTERN void _glapi_set_dispatch(struct _glapi_table *dispatch); -_GLAPI_EXPORT struct _glapi_table * +SERVEXTERN struct _glapi_table * _glapi_get_dispatch(void); +SERVEXTERN int +_glapi_begin_dispatch_override(struct _glapi_table *override); + +SERVEXTERN void +_glapi_end_dispatch_override(int layer); + +struct _glapi_table * +_glapi_get_override_dispatch(int layer); -_GLAPI_EXPORT unsigned int +SERVEXTERN GLuint _glapi_get_dispatch_table_size(void); -_GLAPI_EXPORT int +SERVEXTERN int _glapi_add_dispatch( const char * const * function_names, const char * parameter_signature ); -_GLAPI_EXPORT int -_glapi_get_proc_offset(const char *funcName); - - _GLAPI_EXPORT _glapi_proc _glapi_get_proc_address(const char *funcName); - -_GLAPI_EXPORT const char * -_glapi_get_proc_name(unsigned int offset); - - -_GLAPI_EXPORT struct _glapi_table * +extern struct _glapi_table * _glapi_create_table_from_handle(void *handle, const char *symbol_prefix); -_GLAPI_EXPORT void +void _glapi_set_nop_handler(_glapi_nop_handler_proc func); /** Return pointer to new dispatch table filled with no-op functions */ -_GLAPI_EXPORT struct _glapi_table * +struct _glapi_table * _glapi_new_nop_table(unsigned num_entries); -/** Deprecated function */ -_GLAPI_EXPORT unsigned long -_glthread_GetID(void); - - -/* - * These stubs are kept so that the old DRI drivers still load. - */ -_GLAPI_EXPORT void -_glapi_noop_enable_warnings(unsigned char enable); - - -_GLAPI_EXPORT void -_glapi_set_warning_func(_glapi_proc func); - #ifdef __cplusplus } diff --git a/mesalib/src/mapi/glapi/glapi_getproc.c b/mesalib/src/mapi/glapi/glapi_getproc.c index 524a771ca..7f4dc7f4d 100644 --- a/mesalib/src/mapi/glapi/glapi_getproc.c +++ b/mesalib/src/mapi/glapi/glapi_getproc.c @@ -373,6 +373,7 @@ set_entry_info( struct _glapi_function * entry, const char * signature, unsigned * the parameter signature of a static function. */ +#ifndef INSERVER int _glapi_add_dispatch( const char * const * function_names, const char * parameter_signature ) @@ -482,12 +483,12 @@ _glapi_add_dispatch( const char * const * function_names, return offset; } - +#endif /** * Return offset of entrypoint for named function within dispatch table. */ -GLint +GLint _GLAPI_EXPORT _glapi_get_proc_offset(const char *funcName) { GLint offset; @@ -508,7 +509,7 @@ _glapi_get_proc_offset(const char *funcName) * in the name of static functions, try generating a new API entrypoint on * the fly with assembly language. */ -_glapi_proc +_glapi_proc _GLAPI_EXPORT _glapi_get_proc_address(const char *funcName) { _glapi_proc func; @@ -549,7 +550,7 @@ _glapi_get_proc_address(const char *funcName) * Return the name of the function at the given dispatch offset. * This is only intended for debugging. */ -const char * +const char * _GLAPI_EXPORT _glapi_get_proc_name(GLuint offset) { const char * n; @@ -575,7 +576,7 @@ _glapi_get_proc_name(GLuint offset) * Return size of dispatch table struct as number of functions (or * slots). */ -GLuint +GLuint _GLAPI_EXPORT _glapi_get_dispatch_table_size(void) { /* diff --git a/mesalib/src/mapi/glapi/glapi_nop.c b/mesalib/src/mapi/glapi/glapi_nop.c index 13db310b3..e006e0259 100644..100755 --- a/mesalib/src/mapi/glapi/glapi_nop.c +++ b/mesalib/src/mapi/glapi/glapi_nop.c @@ -48,13 +48,15 @@ #include <string.h> #include "glapi/glapi_priv.h" +#undef _GLAPI_EXPORT +#define _GLAPI_EXPORT -void +void _GLAPI_EXPORT _glapi_noop_enable_warnings(unsigned char enable) { } -void +void _GLAPI_EXPORT _glapi_set_warning_func(_glapi_proc func) { } @@ -70,7 +72,7 @@ static _glapi_nop_handler_proc nop_handler = NULL; /** * Register the no-op handler call-back function. */ -void +_GLAPI_EXPORT void _glapi_set_nop_handler(_glapi_nop_handler_proc func) { nop_handler = func; @@ -116,11 +118,11 @@ NoOpUnused(void) #define DISPATCH_TABLE_NAME __glapi_noop_table #define UNUSED_TABLE_NAME __unused_noop_functions -#include "glapi/glapitemp.h" +#include "glapi/gen/glapitemp.h" /** Return pointer to new dispatch table filled with no-op functions */ -struct _glapi_table * +struct _glapi_table * _GLAPI_EXPORT _glapi_new_nop_table(unsigned num_entries) { struct _glapi_table *table = malloc(num_entries * sizeof(_glapi_proc)); diff --git a/mesalib/src/mapi/glapi/glapi_priv.h b/mesalib/src/mapi/glapi/glapi_priv.h index 337913acc..331435050 100644..100755 --- a/mesalib/src/mapi/glapi/glapi_priv.h +++ b/mesalib/src/mapi/glapi/glapi_priv.h @@ -99,19 +99,8 @@ get_entrypoint_address(unsigned int functionOffset); #endif -/** - * Number of extension functions which we can dynamically add at runtime. - * - * Number of extension functions is also subject to the size of backing exec - * mem we allocate. For the common case of dispatch stubs with size 16 bytes, - * the two limits will be hit simultaneously. For larger dispatch function - * sizes, MAX_EXTENSION_FUNCS is effectively reduced. - */ -#define MAX_EXTENSION_FUNCS 256 - #ifdef __cplusplus } #endif - #endif diff --git a/mesalib/src/mapi/mapi_abi.py b/mesalib/src/mapi/mapi_abi.py index 012a5c3f4..012a5c3f4 100644..100755 --- a/mesalib/src/mapi/mapi_abi.py +++ b/mesalib/src/mapi/mapi_abi.py diff --git a/mesalib/src/mesa/drivers/common/meta_blit.c b/mesalib/src/mesa/drivers/common/meta_blit.c index 9cace2b24..9cace2b24 100644..100755 --- a/mesalib/src/mesa/drivers/common/meta_blit.c +++ b/mesalib/src/mesa/drivers/common/meta_blit.c diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c index e7ababe0b..a554a4ffa 100644..100755 --- a/mesalib/src/mesa/drivers/dri/common/dri_util.c +++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c @@ -116,6 +116,10 @@ driCreateNewScreen2(int scrn, int fd, { static const __DRIextension *emptyExtensionList[] = { NULL }; __DRIscreen *psp; + struct gl_constants consts = { 0 }; + gl_api api; + unsigned version; + int i; psp = calloc(1, sizeof(*psp)); if (!psp) @@ -128,7 +132,7 @@ driCreateNewScreen2(int scrn, int fd, * (megadrivers), use that instead. */ if (driver_extensions) { - for (int i = 0; driver_extensions[i]; i++) { + for (i = 0; driver_extensions[i]; i++) { if (strcmp(driver_extensions[i]->name, __DRI_DRIVER_VTABLE) == 0) { psp->driver = ((__DRIDriverVtableExtension *)driver_extensions[i])->vtable; @@ -162,10 +166,6 @@ driCreateNewScreen2(int scrn, int fd, return NULL; } - struct gl_constants consts = { 0 }; - gl_api api; - unsigned version; - api = API_OPENGLES2; if (_mesa_override_gl_version_contextless(&consts, &api, &version)) psp->max_gl_es2_version = version; @@ -318,6 +318,8 @@ driCreateContextAttribs(__DRIscreen *screen, int api, unsigned minor_version = 0; uint32_t flags = 0; bool notify_reset = false; + unsigned i; + struct gl_context *ctx; assert((num_attribs == 0) || (attribs != NULL)); @@ -345,7 +347,7 @@ driCreateContextAttribs(__DRIscreen *screen, int api, return NULL; } - for (unsigned i = 0; i < num_attribs; i++) { + for (i = 0; i < num_attribs; i++) { switch (attribs[i * 2]) { case __DRI_CTX_ATTRIB_MAJOR_VERSION: major_version = attribs[i * 2 + 1]; @@ -742,36 +744,36 @@ driSwapBuffers(__DRIdrawable *pdp) /** Core interface */ const __DRIcoreExtension driCoreExtension = { - .base = { __DRI_CORE, 1 }, - - .createNewScreen = NULL, - .destroyScreen = driDestroyScreen, - .getExtensions = driGetExtensions, - .getConfigAttrib = driGetConfigAttrib, - .indexConfigAttrib = driIndexConfigAttrib, - .createNewDrawable = NULL, - .destroyDrawable = driDestroyDrawable, - .swapBuffers = driSwapBuffers, /* swrast */ - .createNewContext = driCreateNewContext, /* swrast */ - .copyContext = driCopyContext, - .destroyContext = driDestroyContext, - .bindContext = driBindContext, - .unbindContext = driUnbindContext + /*.base =*/ { __DRI_CORE, 1 }, + + /*.createNewScreen =*/ NULL, + /*.destroyScreen =*/ driDestroyScreen, + /*.getExtensions =*/ driGetExtensions, + /*.getConfigAttrib =*/ driGetConfigAttrib, + /*.indexConfigAttrib =*/ driIndexConfigAttrib, + /*.createNewDrawable =*/ NULL, + /*.destroyDrawable =*/ driDestroyDrawable, + /*.swapBuffers =*/ driSwapBuffers, /* swrast */ + /*.createNewContext =*/ driCreateNewContext, /* swrast */ + /*.copyContext =*/ driCopyContext, + /*.destroyContext =*/ driDestroyContext, + /*.bindContext =*/ driBindContext, + /*.unbindContext =*/ driUnbindContext }; /** DRI2 interface */ const __DRIdri2Extension driDRI2Extension = { - .base = { __DRI_DRI2, 4 }, - - .createNewScreen = dri2CreateNewScreen, - .createNewDrawable = driCreateNewDrawable, - .createNewContext = driCreateNewContext, - .getAPIMask = driGetAPIMask, - .createNewContextForAPI = driCreateNewContextForAPI, - .allocateBuffer = dri2AllocateBuffer, - .releaseBuffer = dri2ReleaseBuffer, - .createContextAttribs = driCreateContextAttribs, - .createNewScreen2 = driCreateNewScreen2, + /*.base =*/ { __DRI_DRI2, 4 }, + + /*.createNewScreen =*/ dri2CreateNewScreen, + /*.createNewDrawable =*/ driCreateNewDrawable, + /*.createNewContext =*/ driCreateNewContext, + /*.getAPIMask =*/ driGetAPIMask, + /*.createNewContextForAPI =*/ driCreateNewContextForAPI, + /*.allocateBuffer =*/ dri2AllocateBuffer, + /*.releaseBuffer =*/ dri2ReleaseBuffer, + /*.createContextAttribs =*/ driCreateContextAttribs, + /*.createNewScreen2 =*/ driCreateNewScreen2, }; const __DRIswrastExtension driSWRastExtension = { @@ -785,11 +787,11 @@ const __DRIswrastExtension driSWRastExtension = { }; const __DRI2configQueryExtension dri2ConfigQueryExtension = { - .base = { __DRI2_CONFIG_QUERY, 1 }, + /*.base =*/ { __DRI2_CONFIG_QUERY, 1 }, - .configQueryb = dri2ConfigQueryb, - .configQueryi = dri2ConfigQueryi, - .configQueryf = dri2ConfigQueryf, + /*.configQueryb =*/ dri2ConfigQueryb, + /*.configQueryi =*/ dri2ConfigQueryi, + /*.configQueryf =*/ dri2ConfigQueryf, }; void @@ -881,12 +883,12 @@ driImageFormatToGLFormat(uint32_t image_format) /** Image driver interface */ const __DRIimageDriverExtension driImageDriverExtension = { - .base = { __DRI_IMAGE_DRIVER, 1 }, + /*.base =*/ { __DRI_IMAGE_DRIVER, 1 }, - .createNewScreen2 = driCreateNewScreen2, - .createNewDrawable = driCreateNewDrawable, - .getAPIMask = driGetAPIMask, - .createContextAttribs = driCreateContextAttribs, + /*.createNewScreen2 =*/ driCreateNewScreen2, + /*.createNewDrawable =*/ driCreateNewDrawable, + /*.createContextAttribs =*/ driCreateContextAttribs, + /*.getAPIMask =*/ driGetAPIMask, }; /* swrast copy sub buffer entrypoint. */ @@ -900,7 +902,7 @@ static void driCopySubBuffer(__DRIdrawable *pdp, int x, int y, /* for swrast only */ const __DRIcopySubBufferExtension driCopySubBufferExtension = { - .base = { __DRI_COPY_SUB_BUFFER, 1 }, + /*.base =*/ { __DRI_COPY_SUB_BUFFER, 1 }, - .copySubBuffer = driCopySubBuffer, + /*.copySubBuffer =*/ driCopySubBuffer, }; diff --git a/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c b/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c index d085080a1..f0c8878a8 100644 --- a/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c +++ b/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c @@ -162,5 +162,5 @@ __DRIconfig **stub_error_init_screen(__DRIscreen *psp) * never be used. */ const struct __DriverAPIRec driDriverAPI = { - .InitScreen = stub_error_init_screen, + /*.InitScreen = */stub_error_init_screen, }; diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c index f17693e73..7ae38d07a 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c +++ b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c @@ -104,7 +104,11 @@ static const char *__getProgramName () { # define GET_PROGRAM_NAME() __getProgramName() # else # define GET_PROGRAM_NAME() "" +# ifdef _MSC_VER +# pragma message("Per application configuration won't work with your OS version.") +# else # warning "Per application configuration won't work with your OS version." +# endif # endif #endif @@ -289,6 +293,29 @@ static float strToF (const XML_Char *string, const XML_Char **tail) { return result; } +#if !defined(HAVE_STRNDUP)
+
+/* Emulates glibc's strndup() */
+char *
+strndup(const char *str, size_t size)
+{
+ size_t len;
+ char *result = (char *)NULL;
+
+ if ((char *)NULL == str) return (char *)NULL;
+
+ len = strlen(str);
+ if (!len) return strdup("");
+ if (size > len) size = len;
+
+ result = (char *)malloc((size + 1) * sizeof (char));
+ memcpy(result, str, size);
+ result[size] = 0x0;
+ return result;
+}
+
+#endif /* _WIN32 should be !HAVE_STRNDUP */
+ /** \brief Parse a value of a given type. */ static unsigned char parseValue (driOptionValue *v, driOptionType type, const XML_Char *string) { @@ -449,11 +476,11 @@ __driUtilMessage(const char *f, ...) (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser)); \ } while (0) -#define XML_WARNING(msg,args...) do { \ +#define XML_WARNING(msg, ...) do { \ __driUtilMessage ("Warning in %s line %d, column %d: "msg, data->name, \ (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser), \ - args); \ + __VA_ARGS__); \ } while (0) /** \brief Output an error message. */ #define XML_ERROR1(msg) do { \ @@ -461,11 +488,11 @@ __driUtilMessage(const char *f, ...) (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser)); \ } while (0) -#define XML_ERROR(msg,args...) do { \ +#define XML_ERROR(msg, ...) do { \ __driUtilMessage ("Error in %s line %d, column %d: "msg, data->name, \ (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser), \ - args); \ + __VA_ARGS__); \ } while (0) /** \brief Output a fatal error message and abort. */ #define XML_FATAL1(msg) do { \ @@ -475,12 +502,12 @@ __driUtilMessage(const char *f, ...) (int) XML_GetCurrentColumnNumber(data->parser)); \ abort();\ } while (0) -#define XML_FATAL(msg,args...) do { \ +#define XML_FATAL(msg, ...) do { \ fprintf (stderr, "Fatal error in %s line %d, column %d: "msg"\n", \ data->name, \ (int) XML_GetCurrentLineNumber(data->parser), \ (int) XML_GetCurrentColumnNumber(data->parser), \ - args); \ + __VA_ARGS__); \ abort();\ } while (0) diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.h b/mesalib/src/mesa/drivers/dri/common/xmlconfig.h index 8969843bd..8969843bd 100644..100755 --- a/mesalib/src/mesa/drivers/dri/common/xmlconfig.h +++ b/mesalib/src/mesa/drivers/dri/common/xmlconfig.h diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c index 2d4bb702f..1be420b6a 100644..100755 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c @@ -33,6 +33,11 @@ */ #include <stdio.h> +#ifdef _MSC_VER +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + #include "main/api_exec.h" #include "main/context.h" #include "main/extensions.h" @@ -66,7 +71,7 @@ # include <sys/sysctl.h> #endif -const __DRIextension **__driDriverGetExtensions_swrast(void); +PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void); const char * const swrast_vendor_string = "Mesa Project"; const char * const swrast_renderer_string = "Software Rasterizer"; @@ -87,7 +92,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, uint32_t internalFormat; mesa_format texFormat; - dri_ctx = pDRICtx->driverPrivate; + dri_ctx = (struct dri_context *)pDRICtx->driverPrivate; internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? 3 : 4); @@ -153,6 +158,7 @@ swrast_query_renderer_integer(__DRIscreen *psp, int param, return -1; #elif defined(_SC_PHYS_PAGES) && defined(_SC_PAGE_SIZE) /* XXX: Do we want to return the full amount of system memory ? */ +#ifndef _MSC_VER const long system_memory_pages = sysconf(_SC_PHYS_PAGES); const long system_page_size = sysconf(_SC_PAGE_SIZE); @@ -170,6 +176,9 @@ swrast_query_renderer_integer(__DRIscreen *psp, int param, value[0] = system_memory_megabytes; return 0; +#else + return -1; +#endif } case __DRI2_RENDERER_UNIFIED_MEMORY_ARCHITECTURE: /** @@ -264,7 +273,7 @@ swrastFillInModes(__DRIscreen *psp, format = MESA_FORMAT_B8G8R8A8_UNORM; break; default: - fprintf(stderr, "[%s:%u] bad depth %d\n", __func__, __LINE__, + fprintf(stderr, "[%s:%u] bad depth %d\n", __FUNCTION__, __LINE__, pixel_bits); return NULL; } @@ -275,7 +284,7 @@ swrastFillInModes(__DRIscreen *psp, back_buffer_factor, msaa_samples_array, 1, GL_TRUE); if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, + fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __FUNCTION__, __LINE__); return NULL; } @@ -399,7 +408,7 @@ swrast_alloc_back_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, swrast_alloc_front_storage(ctx, rb, internalFormat, width, height); - xrb->Base.Buffer = malloc(height * xrb->pitch); + xrb->Base.Buffer = (GLubyte*)malloc(height * xrb->pitch); return GL_TRUE; } @@ -408,7 +417,7 @@ static struct dri_swrast_renderbuffer * swrast_new_renderbuffer(const struct gl_config *visual, __DRIdrawable *dPriv, GLboolean front) { - struct dri_swrast_renderbuffer *xrb = calloc(1, sizeof *xrb); + struct dri_swrast_renderbuffer *xrb = (struct dri_swrast_renderbuffer *)calloc(1, sizeof *xrb); struct gl_renderbuffer *rb; GLuint pixel_format; @@ -489,7 +498,7 @@ swrast_map_renderbuffer(struct gl_context *ctx, xrb->map_h = h; stride = w * cpp; - xrb->Base.Buffer = malloc(h * stride); + xrb->Base.Buffer = (GLubyte*)malloc(h * stride); sPriv->swrast_loader->getImage(dPriv, x, rb->Height - y - h, w, h, (char *) xrb->Base.Buffer, @@ -558,7 +567,7 @@ dri_create_buffer(__DRIscreen * sPriv, dPriv->driverPrivate = drawable; drawable->dPriv = dPriv; - drawable->row = malloc(SWRAST_MAX_WIDTH * 4); + drawable->row = (char*)malloc(SWRAST_MAX_WIDTH * 4); if (drawable->row == NULL) goto drawable_fail; @@ -939,21 +948,23 @@ dri_copy_sub_buffer(__DRIdrawable *dPriv, int x, int y, static const struct __DriverAPIRec swrast_driver_api = { - .InitScreen = dri_init_screen, - .DestroyScreen = dri_destroy_screen, - .CreateContext = dri_create_context, - .DestroyContext = dri_destroy_context, - .CreateBuffer = dri_create_buffer, - .DestroyBuffer = dri_destroy_buffer, - .SwapBuffers = dri_swap_buffers, - .MakeCurrent = dri_make_current, - .UnbindContext = dri_unbind_context, - .CopySubBuffer = dri_copy_sub_buffer, + /*.InitScreen = */dri_init_screen, + /*.DestroyScreen = */dri_destroy_screen, + /*.CreateContext = */dri_create_context, + /*.DestroyContext = */dri_destroy_context, + /*.CreateBuffer = */dri_create_buffer, + /*.DestroyBuffer = */dri_destroy_buffer, + /*.SwapBuffers = */dri_swap_buffers, + /*.MakeCurrent = */dri_make_current, + /*.UnbindContext = */dri_unbind_context, + /*.CopySubBuffer = */dri_copy_sub_buffer, + /*.AllocateBuffer = */NULL, + /*.ReleaseBuffer = */NULL }; static const struct __DRIDriverVtableExtensionRec swrast_vtable = { - .base = { __DRI_DRIVER_VTABLE, 1 }, - .vtable = &swrast_driver_api, + /*.base = */{ __DRI_DRIVER_VTABLE, 1 }, + /*.vtable = */&swrast_driver_api, }; static const __DRIextension *swrast_driver_extensions[] = { diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h index a6ab53529..8182e7677 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h @@ -33,6 +33,13 @@ #include "dri_util.h" #include "swrast/s_context.h" +#ifdef _MSC_VER +#ifdef PUBLIC +#undef PUBLIC +#endif +#define PUBLIC __declspec(dllexport) +#endif + /** * Debugging diff --git a/mesalib/src/mesa/main/.gitignore b/mesalib/src/mesa/main/.gitignore index 355b426e2..58c73d333 100644..100755 --- a/mesalib/src/mesa/main/.gitignore +++ b/mesalib/src/mesa/main/.gitignore @@ -1,12 +1,13 @@ -api_exec.c -dispatch.h -enums.c -git_sha1.h -git_sha1.h.tmp -remap_helper.h -get_hash.h -get_hash.h.tmp -format_info.h -format_info.c -format_pack.c -format_unpack.c +api_exec.c
+dispatch.h
+enums.c
+git_sha1.h
+git_sha1.h.tmp
+remap_helper.h
+get_hash.h
+get_hash.h.tmp
+format_info.h
+glapitable.h
+format_info.c
+format_pack.c
+format_unpack.c
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index 66dee6802..4a116acfe 100644..100755 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -388,7 +388,7 @@ convert_clear_buffer_data(struct gl_context *ctx, * * Default callback for the \c dd_function_table::NewBufferObject() hook. */ -static struct gl_buffer_object * +struct gl_buffer_object * _mesa_new_buffer_object(struct gl_context *ctx, GLuint name) { struct gl_buffer_object *obj; @@ -406,7 +406,7 @@ _mesa_new_buffer_object(struct gl_context *ctx, GLuint name) * * Default callback for the \c dd_function_table::DeleteBuffer() hook. */ -static void +void _mesa_delete_buffer_object(struct gl_context *ctx, struct gl_buffer_object *bufObj) { @@ -555,7 +555,7 @@ _mesa_total_buffer_object_memory(struct gl_context *ctx) * \return GL_TRUE for success, GL_FALSE for failure * \sa glBufferDataARB, dd_function_table::BufferData. */ -static GLboolean +GLboolean buffer_data_fallback(struct gl_context *ctx, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage, GLenum storageFlags, struct gl_buffer_object *bufObj) @@ -601,7 +601,7 @@ buffer_data_fallback(struct gl_context *ctx, GLenum target, GLsizeiptr size, * * \sa glBufferSubDataARB, dd_function_table::BufferSubData. */ -static void +void buffer_sub_data_fallback(struct gl_context *ctx, GLintptr offset, GLsizeiptr size, const GLvoid *data, struct gl_buffer_object *bufObj) @@ -634,7 +634,7 @@ buffer_sub_data_fallback(struct gl_context *ctx, GLintptr offset, * * \sa glBufferGetSubDataARB, dd_function_table::GetBufferSubData. */ -static void +void _mesa_buffer_get_subdata( struct gl_context *ctx, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data, struct gl_buffer_object * bufObj ) @@ -747,7 +747,7 @@ flush_mapped_buffer_range_fallback(struct gl_context *ctx, * * \sa glUnmapBufferARB, dd_function_table::UnmapBuffer */ -static GLboolean +GLboolean unmap_buffer_fallback(struct gl_context *ctx, struct gl_buffer_object *bufObj, gl_map_buffer_index index) { diff --git a/mesalib/src/mesa/main/config.h b/mesalib/src/mesa/main/config.h index 9c3baf4c6..cb6e0112c 100644 --- a/mesalib/src/mesa/main/config.h +++ b/mesalib/src/mesa/main/config.h @@ -32,6 +32,10 @@ #define MESA_CONFIG_H_INCLUDED +#define PACKAGE_VERSION "9.2-devel" +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa" + + /** * \name OpenGL implementation limits */ diff --git a/mesalib/src/mesa/main/dlopen.h b/mesalib/src/mesa/main/dlopen.h index 4d20ff2c7..93d1258cf 100644..100755 --- a/mesalib/src/mesa/main/dlopen.h +++ b/mesalib/src/mesa/main/dlopen.h @@ -50,7 +50,7 @@ _mesa_dlopen(const char *libname, int flags) #if defined(HAVE_DLOPEN) flags = RTLD_LAZY | RTLD_GLOBAL; /* Overriding flags at this time */ return dlopen(libname, flags); -#elif defined(_WIN32) +#elif defined(__MINGW32__) || defined(_WIN32) return LoadLibraryA(libname); #else return NULL; @@ -71,7 +71,7 @@ _mesa_dlsym(void *handle, const char *fname) } u; #if defined(HAVE_DLOPEN) u.v = dlsym(handle, fname); -#elif defined(_WIN32) +#elif defined(__MINGW32__) || defined(_WIN32) u.v = (void *) GetProcAddress(handle, fname); #else u.v = NULL; @@ -87,7 +87,7 @@ _mesa_dlclose(void *handle) { #if defined(HAVE_DLOPEN) dlclose(handle); -#elif defined(_WIN32) +#elif defined(__MINGW32__) || defined(_WIN32) FreeLibrary(handle); #else (void) handle; diff --git a/mesalib/src/mesa/main/imports.h b/mesalib/src/mesa/main/imports.h index c4d917ebb..27f54d585 100644..100755 --- a/mesalib/src/mesa/main/imports.h +++ b/mesalib/src/mesa/main/imports.h @@ -86,7 +86,6 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type; #if _MSC_VER < 1800 /* Not req'd on VS2013 and above */ #define strtoll(p, e, b) _strtoi64(p, e, b) #endif /* _MSC_VER < 1800 */ -#define strcasecmp(s1, s2) _stricmp(s1, s2) #endif /*@}*/ diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h index 0608650ae..2a5731f8c 100644..100755 --- a/mesalib/src/mesa/main/macros.h +++ b/mesalib/src/mesa/main/macros.h @@ -155,21 +155,21 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256]; else if (__tmp.i >= IEEE_ONE) \ UB = (GLubyte) 255; \ else { \ - __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; \ + __tmp.f = __tmp.f * (255.0f/256.0f) + 32768.0f; \ UB = (GLubyte) __tmp.i; \ } \ } while (0) #define CLAMPED_FLOAT_TO_UBYTE(UB, FLT) \ do { \ fi_type __tmp; \ - __tmp.f = (FLT) * (255.0F/256.0F) + 32768.0F; \ + __tmp.f = (FLT) * (255.0f/256.0f) + 32768.0f; \ UB = (GLubyte) __tmp.i; \ } while (0) #else -#define UNCLAMPED_FLOAT_TO_UBYTE(ub, f) \ - ub = ((GLubyte) F_TO_I(CLAMP((f), 0.0F, 1.0F) * 255.0F)) -#define CLAMPED_FLOAT_TO_UBYTE(ub, f) \ - ub = ((GLubyte) F_TO_I((f) * 255.0F)) +#define UNCLAMPED_FLOAT_TO_UBYTE(ub, FLT) \ + ub = ((GLubyte) F_TO_I(CLAMP((FLT), 0.0f, 1.0f) * 255.0f)) +#define CLAMPED_FLOAT_TO_UBYTE(ub, FLT) \ + ub = ((GLubyte) F_TO_I((FLT) * 255.0f)) #endif static fi_type UINT_AS_UNION(GLuint u) diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c index 5ff1b9532..7b6cbbc77 100644..100755 --- a/mesalib/src/mesa/main/queryobj.c +++ b/mesalib/src/mesa/main/queryobj.c @@ -40,7 +40,7 @@ * \param id - the new object's ID * \return pointer to new query_object object or NULL if out of memory. */ -static struct gl_query_object * +struct gl_query_object * _mesa_new_query_object(struct gl_context *ctx, GLuint id) { struct gl_query_object *q = CALLOC_STRUCT(gl_query_object); @@ -72,7 +72,7 @@ _mesa_new_query_object(struct gl_context *ctx, GLuint id) * Begin a query. Software driver fallback. * Called via ctx->Driver.BeginQuery(). */ -static void +void _mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q) { ctx->NewState |= _NEW_DEPTH; /* for swrast */ @@ -83,7 +83,7 @@ _mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q) * End a query. Software driver fallback. * Called via ctx->Driver.EndQuery(). */ -static void +void _mesa_end_query(struct gl_context *ctx, struct gl_query_object *q) { ctx->NewState |= _NEW_DEPTH; /* for swrast */ @@ -95,7 +95,7 @@ _mesa_end_query(struct gl_context *ctx, struct gl_query_object *q) * Wait for query to complete. Software driver fallback. * Called via ctx->Driver.WaitQuery(). */ -static void +void _mesa_wait_query(struct gl_context *ctx, struct gl_query_object *q) { /* For software drivers, _mesa_end_query() should have completed the query. @@ -123,7 +123,7 @@ _mesa_check_query(struct gl_context *ctx, struct gl_query_object *q) * Delete a query object. Called via ctx->Driver.DeleteQuery(). * Not removed from hash table here. */ -static void +void _mesa_delete_query(struct gl_context *ctx, struct gl_query_object *q) { free(q->Label); diff --git a/mesalib/src/mesa/main/remap.c b/mesalib/src/mesa/main/remap.c index 5a9538772..74a2e481d 100644 --- a/mesalib/src/mesa/main/remap.c +++ b/mesalib/src/mesa/main/remap.c @@ -35,9 +35,9 @@ * a dynamic entry, or the corresponding static entry, in glapi. */ +#include "glapi/glapi.h" #include "remap.h" #include "imports.h" -#include "glapi/glapi.h" #define MAX_ENTRY_POINTS 16 @@ -46,7 +46,7 @@ /* this is global for quick access */ -int driDispatchRemapTable[driDispatchRemapTable_size]; +SERVEXTERN int driDispatchRemapTable[driDispatchRemapTable_size]; /** diff --git a/mesalib/src/mesa/main/remap.h b/mesalib/src/mesa/main/remap.h index 9d91b83c1..c55a93a2d 100644 --- a/mesalib/src/mesa/main/remap.h +++ b/mesalib/src/mesa/main/remap.h @@ -38,7 +38,7 @@ struct gl_function_remap { }; -extern int +SERVEXTERN int driDispatchRemapTable[]; extern const char * diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c index c1b2d3bed..ac130926a 100644 --- a/mesalib/src/mesa/main/syncobj.c +++ b/mesalib/src/mesa/main/syncobj.c @@ -127,7 +127,7 @@ _mesa_wait_sync(struct gl_context *ctx, struct gl_sync_object *syncObj, } -void +void GLAPIENTRY _mesa_init_sync_object_functions(struct dd_function_table *driver) { driver->NewSyncObject = _mesa_new_sync_object; @@ -144,7 +144,7 @@ _mesa_init_sync_object_functions(struct dd_function_table *driver) /** * Allocate/init the context state related to sync objects. */ -void +void GLAPIENTRY _mesa_init_sync(struct gl_context *ctx) { (void) ctx; @@ -154,7 +154,7 @@ _mesa_init_sync(struct gl_context *ctx) /** * Free the context state related to sync objects. */ -void +void GLAPIENTRY _mesa_free_sync_data(struct gl_context *ctx) { (void) ctx; @@ -179,7 +179,7 @@ _mesa_validate_sync(struct gl_context *ctx, } -void +void GLAPIENTRY _mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { mtx_lock(&ctx->Shared->Mutex); @@ -188,7 +188,7 @@ _mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) } -void +void GLAPIENTRY _mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { struct set_entry *entry; diff --git a/mesalib/src/mesa/main/syncobj.h b/mesalib/src/mesa/main/syncobj.h index 5d510e873..1dbb7b14a 100644 --- a/mesalib/src/mesa/main/syncobj.h +++ b/mesalib/src/mesa/main/syncobj.h @@ -38,19 +38,19 @@ struct dd_function_table; struct gl_context; struct gl_sync_object; -extern void +extern void GLAPIENTRY _mesa_init_sync_object_functions(struct dd_function_table *driver); -extern void +extern void GLAPIENTRY _mesa_init_sync(struct gl_context *); -extern void +extern void GLAPIENTRY _mesa_free_sync_data(struct gl_context *); -extern void +extern void GLAPIENTRY _mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj); -extern void +extern void GLAPIENTRY _mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj); extern bool diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c index 60c76040e..43357df85 100644 --- a/mesalib/src/mesa/main/version.c +++ b/mesalib/src/mesa/main/version.c @@ -27,7 +27,7 @@ #include "imports.h" #include "mtypes.h" #include "version.h" -#include "git_sha1.h" +/*#include "git_sha1.h"*/ /** * Scans 'string' to see if it ends with 'ending'. diff --git a/mesalib/src/mesa/program/.gitignore b/mesalib/src/mesa/program/.gitignore index 4c20872e1..2f1601fcc 100644..100755 --- a/mesalib/src/mesa/program/.gitignore +++ b/mesalib/src/mesa/program/.gitignore @@ -1,4 +1,4 @@ -program_parse.output -lex.yy.c -program_parse.tab.c -program_parse.tab.h +lex.yy.c
+program_parse.output
+program_parse.tab.c
+program_parse.tab.h
\ No newline at end of file diff --git a/mesalib/src/mesa/program/doflexbison.bat b/mesalib/src/mesa/program/doflexbison.bat new file mode 100644 index 000000000..b39b53cf8 --- /dev/null +++ b/mesalib/src/mesa/program/doflexbison.bat @@ -0,0 +1,18 @@ +@echo off
+setlocal
+
+cd "%~dp0"
+
+set M4=..\..\..\..\tools\mhmake\m4.exe
+set BISON_PKGDATADIR=../../../../tools/mhmake/src/bisondata
+
+set path=..\..\..\..\tools\mhmake;%path%
+
+..\..\..\..\tools\mhmake\bison.exe -v -d -p "_mesa_program_" --output=program_parse.tab.c program_parse.y
+
+copy "..\..\..\..\tools\mhmake\flex++.exe" flex.exe
+flex.exe --never-interactive --outfile=lex.yy.c program_lexer.l
+del flex.exe
+
+endlocal
+
diff --git a/mesalib/src/mesa/program/hash_table.h b/mesalib/src/mesa/program/hash_table.h index e85a836a0..bfd56513a 100644 --- a/mesalib/src/mesa/program/hash_table.h +++ b/mesalib/src/mesa/program/hash_table.h @@ -37,6 +37,7 @@ #include <stdint.h> #include <limits.h> #include <assert.h> +#include <unistd.h> struct string_to_uint_map; |