diff -Nru mesa-8.0.2/aclocal.m4 mesa-8.0.3/aclocal.m4 --- mesa-8.0.2/aclocal.m4 2012-03-21 17:14:44.000000000 +0000 +++ mesa-8.0.3/aclocal.m4 2012-05-18 23:11:59.000000000 +0000 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -156,7 +156,7 @@ Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])dnl +_PKG_TEXT]) ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) @@ -167,7 +167,7 @@ _PKG_TEXT -To get pkg-config, see .])dnl +To get pkg-config, see .]) ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS diff -Nru mesa-8.0.2/bin/mklib mesa-8.0.3/bin/mklib --- mesa-8.0.2/bin/mklib 2012-03-20 11:56:52.000000000 +0000 +++ mesa-8.0.3/bin/mklib 2012-05-18 23:08:34.000000000 +0000 @@ -334,7 +334,9 @@ # environment. If so, pass -m32 flag to linker. set ${OBJECTS} ABI32=`file $1 | grep 32-bit` - if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then + ARM=`file $1 | grep ARM` + # Do not add "-m32" option for arm. + if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then OPTS="-m32 ${OPTS}" fi @@ -391,7 +393,9 @@ # environment. If so, pass -m32 flag to linker. set ${OBJECTS} ABI32=`file $1 | grep 32-bit` - if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then + ARM=`file $1 | grep ARM` + # Do not add "-m32" option for arm. + if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then OPTS="-m32 ${OPTS}" fi if [ "${ALTOPTS}" ] ; then diff -Nru mesa-8.0.2/configs/default mesa-8.0.3/configs/default --- mesa-8.0.2/configs/default 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/configs/default 2012-05-18 23:08:34.000000000 +0000 @@ -10,7 +10,7 @@ # Version info MESA_MAJOR=8 MESA_MINOR=0 -MESA_TINY=0 +MESA_TINY=3 MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) # external projects. This should be useless now that we use libdrm. diff -Nru mesa-8.0.2/configure mesa-8.0.3/configure --- mesa-8.0.2/configure 2012-03-21 17:14:45.000000000 +0000 +++ mesa-8.0.3/configure 2012-05-18 23:11:59.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for Mesa 8.0.0. +# Generated by GNU Autoconf 2.68 for Mesa 8.0.3. # # Report bugs to . # @@ -91,6 +91,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -216,11 +217,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -553,8 +561,8 @@ # Identity of this package. PACKAGE_NAME='Mesa' PACKAGE_TARNAME='mesa' -PACKAGE_VERSION='8.0.0' -PACKAGE_STRING='Mesa 8.0.0' +PACKAGE_VERSION='8.0.3' +PACKAGE_STRING='Mesa 8.0.3' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa' PACKAGE_URL='' @@ -1386,7 +1394,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1524,7 +1532,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Mesa 8.0.0 to adapt to many kinds of systems. +\`configure' configures Mesa 8.0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1608,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Mesa 8.0.0:";; + short | recursive ) echo "Configuration of Mesa 8.0.3:";; esac cat <<\_ACEOF @@ -1860,8 +1868,8 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Mesa configure 8.0.0 -generated by GNU Autoconf 2.67 +Mesa configure 8.0.3 +generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1907,7 +1915,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1944,7 +1952,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1982,7 +1990,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -2028,7 +2036,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2074,7 +2082,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link @@ -2087,7 +2095,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2142,7 +2150,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2154,10 +2162,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2224,7 +2232,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2233,7 +2241,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2274,7 +2282,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2288,7 +2296,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2306,15 +2314,15 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Mesa $as_me 8.0.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by Mesa $as_me 8.0.3, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2572,7 +2580,7 @@ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2696,7 +2704,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -2712,7 +2720,7 @@ $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2730,7 +2738,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -2745,7 +2753,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2780,7 +2788,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2867,11 +2875,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2957,7 +2965,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2997,7 +3005,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3050,7 +3058,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3101,7 +3109,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3141,7 +3149,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3199,7 +3207,7 @@ # Define the identity of the package. PACKAGE='mesa' - VERSION='8.0.0' + VERSION='8.0.3' cat >>confdefs.h <<_ACEOF @@ -3324,7 +3332,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3364,7 +3372,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3417,7 +3425,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3457,7 +3465,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3516,7 +3524,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3560,7 +3568,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3615,7 +3623,7 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3730,7 +3738,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3773,7 +3781,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3832,7 +3840,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3843,7 +3851,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3884,7 +3892,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3894,7 +3902,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3931,7 +3939,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -4009,7 +4017,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -4108,7 +4116,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4243,7 +4251,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4359,7 +4367,7 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4378,7 +4386,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4418,7 +4426,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4471,7 +4479,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4511,7 +4519,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4570,7 +4578,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4614,7 +4622,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4669,7 +4677,7 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4698,7 +4706,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4735,7 +4743,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -4813,7 +4821,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -4912,7 +4920,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -5051,7 +5059,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -5095,7 +5103,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -5173,7 +5181,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5210,7 +5218,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -5296,7 +5304,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -5425,7 +5433,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MAKE+set}" = set; then : +if ${ac_cv_prog_MAKE+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MAKE"; then @@ -5467,7 +5475,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_PYTHON2+set}" = set; then : +if ${ac_cv_prog_PYTHON2+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYTHON2"; then @@ -5505,7 +5513,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5576,7 +5584,7 @@ set dummy makedepend; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MKDEP+set}" = set; then : +if ${ac_cv_path_MKDEP+:} false; then : $as_echo_n "(cached) " >&6 else case $MKDEP in @@ -5621,7 +5629,7 @@ set dummy flex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FLEX+set}" = set; then : +if ${ac_cv_path_FLEX+:} false; then : $as_echo_n "(cached) " >&6 else case $FLEX in @@ -5663,7 +5671,7 @@ set dummy bison; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BISON+set}" = set; then : +if ${ac_cv_path_BISON+:} false; then : $as_echo_n "(cached) " >&6 else case $BISON in @@ -5713,7 +5721,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_POSIX_SHELL+set}" = set; then : +if ${ac_cv_path_POSIX_SHELL+:} false; then : $as_echo_n "(cached) " >&6 else case $POSIX_SHELL in @@ -5760,7 +5768,7 @@ set dummy gtest-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GTESTCONFIG+set}" = set; then : +if ${ac_cv_path_GTESTCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $GTESTCONFIG in @@ -5892,7 +5900,7 @@ set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -5935,7 +5943,7 @@ set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in @@ -6027,9 +6035,6 @@ if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99" - if test "x$CLANG" = "xno"; then - CFLAGS="$CFLAGS -ffast-math" - fi # Enable -fvisibility=hidden if using a gcc that supports it save_CFLAGS="$CFLAGS" @@ -6545,12 +6550,12 @@ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6584,7 +6589,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : DLOPEN_LIBS="-ldl" fi @@ -6593,7 +6598,7 @@ ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" -if test "x$ac_cv_func_posix_memalign" = x""yes; then : +if test "x$ac_cv_func_posix_memalign" = xyes; then : DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN" fi @@ -6609,7 +6614,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -6672,7 +6677,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -6739,7 +6744,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6867,7 +6872,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" -if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : +if test "x$ac_cv_header_selinux_selinux_h" = xyes; then : else as_fn_error $? "SELinux headers not found" "$LINENO" 5 @@ -6876,7 +6881,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5 $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then : +if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6910,7 +6915,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } -if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then : +if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSELINUX 1 _ACEOF @@ -7448,6 +7453,7 @@ Alternatively, you may set the environment variables X11_CFLAGS and X11_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -7462,7 +7468,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else X11_CFLAGS=$pkg_cv_X11_CFLAGS X11_LIBS=$pkg_cv_X11_LIBS @@ -7486,8 +7493,8 @@ have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -7764,7 +7771,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : +if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7798,14 +7805,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : +if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7839,7 +7846,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi @@ -7858,14 +7865,14 @@ # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : +if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : +if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7899,14 +7906,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : +if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7940,7 +7947,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -7955,14 +7962,14 @@ # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = x""yes; then : +if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then : +if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7996,7 +8003,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then : +if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi @@ -8004,14 +8011,14 @@ # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = x""yes; then : +if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then : +if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -8045,7 +8052,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then : +if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi @@ -8053,14 +8060,14 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = x""yes; then : +if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then : +if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -8094,7 +8101,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : +if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -8112,7 +8119,7 @@ # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : +if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -8146,7 +8153,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -8260,6 +8267,7 @@ Alternatively, you may set the environment variables XLIBGL_CFLAGS and XLIBGL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -8274,7 +8282,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else XLIBGL_CFLAGS=$pkg_cv_XLIBGL_CFLAGS XLIBGL_LIBS=$pkg_cv_XLIBGL_LIBS @@ -8364,6 +8373,7 @@ Alternatively, you may set the environment variables GLPROTO_CFLAGS and GLPROTO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -8378,7 +8388,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else GLPROTO_CFLAGS=$pkg_cv_GLPROTO_CFLAGS GLPROTO_LIBS=$pkg_cv_GLPROTO_LIBS @@ -8458,6 +8469,7 @@ Alternatively, you may set the environment variables DRI2PROTO_CFLAGS and DRI2PROTO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -8472,7 +8484,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else DRI2PROTO_CFLAGS=$pkg_cv_DRI2PROTO_CFLAGS DRI2PROTO_LIBS=$pkg_cv_DRI2PROTO_LIBS @@ -8628,6 +8641,7 @@ Alternatively, you may set the environment variables DRIGL_CFLAGS and DRIGL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -8642,7 +8656,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else DRIGL_CFLAGS=$pkg_cv_DRIGL_CFLAGS DRIGL_LIBS=$pkg_cv_DRIGL_LIBS @@ -8732,6 +8747,7 @@ Alternatively, you may set the environment variables XCB_CFLAGS and XCB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -8746,7 +8762,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else XCB_CFLAGS=$pkg_cv_XCB_CFLAGS XCB_LIBS=$pkg_cv_XCB_LIBS @@ -8768,7 +8785,7 @@ LDFLAGS="$LDFLAGS $GL_LIB_DEPS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xcb_glx_create_context_attribs_arb_checked in -lxcb-glx" >&5 $as_echo_n "checking for xcb_glx_create_context_attribs_arb_checked in -lxcb-glx... " >&6; } -if test "${ac_cv_lib_xcb_glx_xcb_glx_create_context_attribs_arb_checked+set}" = set; then : +if ${ac_cv_lib_xcb_glx_xcb_glx_create_context_attribs_arb_checked+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -8802,7 +8819,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xcb_glx_xcb_glx_create_context_attribs_arb_checked" >&5 $as_echo "$ac_cv_lib_xcb_glx_xcb_glx_create_context_attribs_arb_checked" >&6; } -if test "x$ac_cv_lib_xcb_glx_xcb_glx_create_context_attribs_arb_checked" = x""yes; then : +if test "x$ac_cv_lib_xcb_glx_xcb_glx_create_context_attribs_arb_checked" = xyes; then : HAVE_XCB_GLX_CREATE_CONTEXT=yes else HAVE_XCB_GLX_CREATE_CONTEXT=no @@ -9042,7 +9059,7 @@ fi ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" -if test "x$ac_cv_header_expat_h" = x""yes; then : +if test "x$ac_cv_header_expat_h" = xyes; then : else as_fn_error $? "Expat required for DRI." "$LINENO" 5 @@ -9051,7 +9068,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5 $as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; } -if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then : +if ${ac_cv_lib_expat_XML_ParserCreate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9085,7 +9102,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 $as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; } -if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then : +if test "x$ac_cv_lib_expat_XML_ParserCreate" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXPAT 1 _ACEOF @@ -9181,6 +9198,7 @@ Alternatively, you may set the environment variables INTEL_CFLAGS and INTEL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -9195,7 +9213,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else INTEL_CFLAGS=$pkg_cv_INTEL_CFLAGS INTEL_LIBS=$pkg_cv_INTEL_LIBS @@ -9275,6 +9294,7 @@ Alternatively, you may set the environment variables NOUVEAU_CFLAGS and NOUVEAU_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -9289,7 +9309,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else NOUVEAU_CFLAGS=$pkg_cv_NOUVEAU_CFLAGS NOUVEAU_LIBS=$pkg_cv_NOUVEAU_LIBS @@ -9369,6 +9390,7 @@ Alternatively, you may set the environment variables RADEON_CFLAGS and RADEON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -9383,7 +9405,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else RADEON_CFLAGS=$pkg_cv_RADEON_CFLAGS RADEON_LIBS=$pkg_cv_RADEON_LIBS @@ -9546,7 +9569,7 @@ EGL_DRIVERS_DIRS="" ac_fn_c_check_func "$LINENO" "mincore" "ac_cv_func_mincore" -if test "x$ac_cv_func_mincore" = x""yes; then : +if test "x$ac_cv_func_mincore" = xyes; then : DEFINES="$DEFINES -DHAVE_MINCORE" fi @@ -9707,7 +9730,7 @@ # workaround a bug in xcb-dri2 generated by xcb-proto 1.6 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xcb_dri2_connect_alignment_pad in -lxcb-dri2" >&5 $as_echo_n "checking for xcb_dri2_connect_alignment_pad in -lxcb-dri2... " >&6; } -if test "${ac_cv_lib_xcb_dri2_xcb_dri2_connect_alignment_pad+set}" = set; then : +if ${ac_cv_lib_xcb_dri2_xcb_dri2_connect_alignment_pad+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9741,7 +9764,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xcb_dri2_xcb_dri2_connect_alignment_pad" >&5 $as_echo "$ac_cv_lib_xcb_dri2_xcb_dri2_connect_alignment_pad" >&6; } -if test "x$ac_cv_lib_xcb_dri2_xcb_dri2_connect_alignment_pad" = x""yes; then : +if test "x$ac_cv_lib_xcb_dri2_xcb_dri2_connect_alignment_pad" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXCB_DRI2 1 _ACEOF @@ -9870,6 +9893,7 @@ Alternatively, you may set the environment variables XORG_CFLAGS and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -9884,7 +9908,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else XORG_CFLAGS=$pkg_cv_XORG_CFLAGS XORG_LIBS=$pkg_cv_XORG_LIBS @@ -9959,6 +9984,7 @@ Alternatively, you may set the environment variables LIBDRM_XORG_CFLAGS and LIBDRM_XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -9973,7 +9999,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else LIBDRM_XORG_CFLAGS=$pkg_cv_LIBDRM_XORG_CFLAGS LIBDRM_XORG_LIBS=$pkg_cv_LIBDRM_XORG_LIBS @@ -10048,6 +10075,7 @@ Alternatively, you may set the environment variables LIBKMS_XORG_CFLAGS and LIBKMS_XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -10062,7 +10090,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else LIBKMS_XORG_CFLAGS=$pkg_cv_LIBKMS_XORG_CFLAGS LIBKMS_XORG_LIBS=$pkg_cv_LIBKMS_XORG_LIBS @@ -10150,7 +10179,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -10188,7 +10217,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -10253,7 +10282,7 @@ set dummy nm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NM+set}" = set; then : +if ${ac_cv_prog_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -10443,6 +10472,7 @@ Alternatively, you may set the environment variables XVMC_CFLAGS and XVMC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -10457,7 +10487,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else XVMC_CFLAGS=$pkg_cv_XVMC_CFLAGS XVMC_LIBS=$pkg_cv_XVMC_LIBS @@ -10537,6 +10568,7 @@ Alternatively, you may set the environment variables VDPAU_CFLAGS and VDPAU_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -10551,7 +10583,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else VDPAU_CFLAGS=$pkg_cv_VDPAU_CFLAGS VDPAU_LIBS=$pkg_cv_VDPAU_LIBS @@ -10631,6 +10664,7 @@ Alternatively, you may set the environment variables LIBVA_CFLAGS and LIBVA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -10645,7 +10679,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else LIBVA_CFLAGS=$pkg_cv_LIBVA_CFLAGS LIBVA_LIBS=$pkg_cv_LIBVA_LIBS @@ -10844,7 +10879,7 @@ fi case "$plat$have_libudev" in waylandno|drmno) - as_fn_error $? "cannot build $plat platfrom without udev" "$LINENO" 5 ;; + as_fn_error $? "cannot build $plat platfrom without udev" "$LINENO" 5 ;; esac done EGL_PLATFORMS="$egl_platforms" @@ -10925,7 +10960,7 @@ set dummy llvm-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LLVM_CONFIG+set}" = set; then : +if ${ac_cv_path_LLVM_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $LLVM_CONFIG in @@ -11033,7 +11068,7 @@ gallium_require_llvm() { if test "x$MESA_LLVM" = x0; then case "$host_cpu" in - i*86|x86_64) as_fn_error $? "LLVM is required to build $1 on x86 and x86_64" "$LINENO" 5 ;; + i*86|x86_64) as_fn_error $? "LLVM is required to build $1 on x86 and x86_64" "$LINENO" 5;; esac fi } @@ -11114,6 +11149,7 @@ Alternatively, you may set the environment variables INTEL_CFLAGS and INTEL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -11128,7 +11164,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else INTEL_CFLAGS=$pkg_cv_INTEL_CFLAGS INTEL_LIBS=$pkg_cv_INTEL_LIBS @@ -11220,6 +11257,7 @@ Alternatively, you may set the environment variables NOUVEAU_CFLAGS and NOUVEAU_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 + elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -11234,7 +11272,8 @@ See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } + else NOUVEAU_CFLAGS=$pkg_cv_NOUVEAU_CFLAGS NOUVEAU_LIBS=$pkg_cv_NOUVEAU_LIBS @@ -11365,10 +11404,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -11468,7 +11518,7 @@ Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -11569,6 +11619,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11875,8 +11926,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Mesa $as_me 8.0.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by Mesa $as_me 8.0.3, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11932,8 +11983,8 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Mesa config.status 8.0.0 -configured by $0, generated by GNU Autoconf 2.67, +Mesa config.status 8.0.3 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. @@ -12056,7 +12107,7 @@ "tests/glx/Makefile") CONFIG_FILES="$CONFIG_FILES tests/glx/Makefile" ;; "configs") CONFIG_COMMANDS="$CONFIG_COMMANDS configs" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -12078,9 +12129,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -12088,12 +12140,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -12115,7 +12168,7 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -12143,7 +12196,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -12191,7 +12244,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -12223,7 +12276,7 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -12263,7 +12316,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -12282,7 +12335,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -12291,7 +12344,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -12317,8 +12370,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -12454,21 +12507,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; diff -Nru mesa-8.0.2/configure.ac mesa-8.0.3/configure.ac --- mesa-8.0.2/configure.ac 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/configure.ac 2012-05-18 04:27:14.000000000 +0000 @@ -168,9 +168,6 @@ dnl Add flags for gcc and g++ if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99" - if test "x$CLANG" = "xno"; then - CFLAGS="$CFLAGS -ffast-math" - fi # Enable -fvisibility=hidden if using a gcc that supports it save_CFLAGS="$CFLAGS" diff -Nru mesa-8.0.2/debian/changelog mesa-8.0.3/debian/changelog --- mesa-8.0.2/debian/changelog 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/changelog 2012-07-11 02:13:06.000000000 +0000 @@ -1,4 +1,41 @@ -mesa (8.0.2-0ubuntu3.1) precise-proposed; urgency=low +mesa (8.0.3-0ubuntu0.1) precise-proposed; urgency=low + + * New upstream stable release. + + Fixes crash in intel_miptree_release() + (LP: #952896) + + Fixes slow WebGL in firefox + (LP: #988343) + + [ Robert Hooker ] + * Drop 118_fix_rendering_from_textures.patch and + 117_intel_fix_hiz_null_dereference.patch, both included upstream. + * Refresh patches. + + [ Bryce Harrington ] + * Add 117_nullptr_check_in_query_version.patch: Fix null pointer + deref in QueryVersion() during login. + (LP: #968284) + * Add 118_glsl_initialize_samplers.patch: Initialize samplers to 0, as + required by the spec. Fixes rendering corruption in MapsGL labels. + Cherrypick from mesa master. + (LP: #981883) + + -- Bryce Harrington Tue, 10 Jul 2012 18:45:26 -0700 + +mesa (8.0.3-1) UNRELEASED; urgency=low + + * New upstream stable release (Closes: #673532) + * Refresh patches. + + -- Robert Hooker Mon, 21 May 2012 18:21:40 -0400 + +mesa (8.0.2-2) unstable; urgency=low + + * Upload to unstable. + + -- Cyril Brulebois Tue, 01 May 2012 21:42:35 +0200 + +mesa (8.0.2-0ubuntu4) quantal; urgency=low * Add 118_fix_rendering_from_textures.patch: Postpone the setup of the workaround render target miptree until update_renderbuffer time. diff -Nru mesa-8.0.2/debian/patches/06_kfreebsd-ftbfs.diff mesa-8.0.3/debian/patches/06_kfreebsd-ftbfs.diff --- mesa-8.0.2/debian/patches/06_kfreebsd-ftbfs.diff 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/06_kfreebsd-ftbfs.diff 2012-07-11 02:13:06.000000000 +0000 @@ -7,9 +7,9 @@ Index: mesa/configure.ac =================================================================== ---- mesa.orig/configure.ac 2012-01-18 16:04:58.270652780 +0200 -+++ mesa/configure.ac 2012-01-18 16:05:57.376424418 +0200 -@@ -1218,7 +1218,7 @@ +--- mesa.orig/configure.ac 2012-05-21 18:19:36.835922738 -0400 ++++ mesa/configure.ac 2012-05-21 18:19:43.047922906 -0400 +@@ -1215,7 +1215,7 @@ ;; esac ;; diff -Nru mesa-8.0.2/debian/patches/100_no_abi_tag.patch mesa-8.0.3/debian/patches/100_no_abi_tag.patch --- mesa-8.0.2/debian/patches/100_no_abi_tag.patch 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/100_no_abi_tag.patch 2012-07-11 02:13:06.000000000 +0000 @@ -1,7 +1,9 @@ ---- a/src/mapi/glapi/glapi_x86-64.S -+++ b/src/mapi/glapi/glapi_x86-64.S -@@ -30885,18 +30885,6 @@ GL_PREFIX(EGLImageTargetTexture2DOES): - .globl GL_PREFIX(FramebufferTextureLayer) ; .set GL_PREFIX(FramebufferTextureLayer), GL_PREFIX(FramebufferTextureLayerEXT) +Index: mesa/src/mapi/glapi/glapi_x86-64.S +=================================================================== +--- mesa.orig/src/mapi/glapi/glapi_x86-64.S 2012-06-01 13:01:25.255165726 -0400 ++++ mesa/src/mapi/glapi/glapi_x86-64.S 2012-06-01 13:02:45.859167925 -0400 +@@ -37448,18 +37448,6 @@ + .globl GL_PREFIX(TransformFeedbackVaryings) ; .set GL_PREFIX(TransformFeedbackVaryings), GL_PREFIX(TransformFeedbackVaryingsEXT) .globl GL_PREFIX(ProvokingVertex) ; .set GL_PREFIX(ProvokingVertex), GL_PREFIX(ProvokingVertexEXT) -#if defined(GLX_USE_TLS) && defined(__linux__) @@ -19,9 +21,11 @@ #if defined (__ELF__) && defined (__linux__) .section .note.GNU-stack,"",%progbits ---- a/src/mapi/glapi/glapi_x86.S -+++ b/src/mapi/glapi/glapi_x86.S -@@ -1279,18 +1279,6 @@ GLNAME(gl_dispatch_functions_start): +Index: mesa/src/mapi/glapi/glapi_x86.S +=================================================================== +--- mesa.orig/src/mapi/glapi/glapi_x86.S 2012-06-01 13:01:25.259165726 -0400 ++++ mesa/src/mapi/glapi/glapi_x86.S 2012-06-01 13:02:45.863167925 -0400 +@@ -1504,18 +1504,6 @@ ALIGNTEXT16 GLNAME(gl_dispatch_functions_end): diff -Nru mesa-8.0.2/debian/patches/101_ubuntu_hidden_glname.patch mesa-8.0.3/debian/patches/101_ubuntu_hidden_glname.patch --- mesa-8.0.2/debian/patches/101_ubuntu_hidden_glname.patch 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/101_ubuntu_hidden_glname.patch 2012-07-11 02:13:06.000000000 +0000 @@ -1,12 +1,12 @@ -Index: mesa/src/mesa/x86/glapi_x86.S +Index: mesa/src/mapi/glapi/glapi_x86.S =================================================================== ---- mesa.orig/src/mapi/glapi/glapi_x86.S 2009-06-29 14:43:07.000000000 +0300 -+++ mesa/src/mapi/glapi/glapi_x86.S 2009-06-29 14:45:38.000000000 +0300 -@@ -148,7 +148,6 @@ +--- mesa.orig/src/mapi/glapi/glapi_x86.S 2012-06-01 13:02:45.863167925 -0400 ++++ mesa/src/mapi/glapi/glapi_x86.S 2012-06-01 13:02:46.203167935 -0400 +@@ -147,7 +147,6 @@ ALIGNTEXT16 GLOBL GLNAME(gl_dispatch_functions_start) - HIDDEN(GLNAME(gl_dispatch_functions_start)) GLNAME(gl_dispatch_functions_start): - GL_STUB(NewList, _gloffset_NewList, NewList@8) + GL_STUB(NewList, 0, NewList@8) diff -Nru mesa-8.0.2/debian/patches/10-hurd-configure-tweaks.diff mesa-8.0.3/debian/patches/10-hurd-configure-tweaks.diff --- mesa-8.0.2/debian/patches/10-hurd-configure-tweaks.diff 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/10-hurd-configure-tweaks.diff 2012-07-11 02:13:06.000000000 +0000 @@ -3,9 +3,9 @@ Thanks to Pino Toscano. Index: mesa/configure.ac =================================================================== ---- mesa.orig/configure.ac 2012-01-18 16:05:57.376424418 +0200 -+++ mesa/configure.ac 2012-01-18 16:06:14.824947429 +0200 -@@ -473,7 +473,7 @@ +--- mesa.orig/configure.ac 2012-05-21 18:19:43.047922906 -0400 ++++ mesa/configure.ac 2012-05-21 18:19:43.639922922 -0400 +@@ -470,7 +470,7 @@ case "$host_cpu" in i?86) case "$host_os" in diff -Nru mesa-8.0.2/debian/patches/115_llvm_dynamic_linking.diff mesa-8.0.3/debian/patches/115_llvm_dynamic_linking.diff --- mesa-8.0.2/debian/patches/115_llvm_dynamic_linking.diff 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/115_llvm_dynamic_linking.diff 2012-07-11 02:13:06.000000000 +0000 @@ -1,8 +1,8 @@ Index: mesa/configure.ac =================================================================== ---- mesa.orig/configure.ac 2012-01-24 14:48:40.488101770 +0200 -+++ mesa/configure.ac 2012-01-24 14:48:42.364157964 +0200 -@@ -1770,7 +1770,7 @@ +--- mesa.orig/configure.ac 2012-06-01 13:02:45.535167916 -0400 ++++ mesa/configure.ac 2012-06-01 13:02:46.511167943 -0400 +@@ -1767,7 +1767,7 @@ if test "x$LLVM_CONFIG" != xno; then LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'` LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g'` diff -Nru mesa-8.0.2/debian/patches/116_use_shared_galliumcore.diff mesa-8.0.3/debian/patches/116_use_shared_galliumcore.diff --- mesa-8.0.2/debian/patches/116_use_shared_galliumcore.diff 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/116_use_shared_galliumcore.diff 2012-07-11 02:13:06.000000000 +0000 @@ -1,8 +1,8 @@ -diff --git a/bin/mklib b/bin/mklib -index 2c7ed38..14bca63 100755 ---- a/bin/mklib -+++ b/bin/mklib -@@ -147,6 +147,7 @@ ARCHOPT="" +Index: mesa/bin/mklib +=================================================================== +--- mesa.orig/bin/mklib 2012-06-01 13:01:25.243165726 -0400 ++++ mesa/bin/mklib 2012-06-01 13:02:46.827167952 -0400 +@@ -147,6 +147,7 @@ NOPREFIX=0 EXPORTS="" ID="" @@ -10,7 +10,7 @@ # # Parse arguments -@@ -191,6 +192,18 @@ do +@@ -191,6 +192,18 @@ -R*) DEPS="$DEPS $1" ;; @@ -29,7 +29,7 @@ -Wl*) DEPS="$DEPS $1" ;; -@@ -271,6 +284,10 @@ if [ $STATIC = 1 ]; then +@@ -271,6 +284,10 @@ OBJECTS=$NEWOBJECTS fi @@ -40,7 +40,7 @@ # # Error checking -@@ -284,7 +301,6 @@ if [ "x${OBJECTS}" = "x" ] ; then +@@ -284,7 +301,6 @@ exit 1 fi @@ -48,7 +48,7 @@ # # Debugging info # -@@ -343,6 +359,7 @@ case $ARCH in +@@ -345,6 +361,7 @@ fi rm -f ${LIBNAME} @@ -56,11 +56,11 @@ # make lib ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} # finish up -diff --git a/configs/autoconf.in b/configs/autoconf.in -index 37b7ea5..b479f2b 100644 ---- a/configs/autoconf.in -+++ b/configs/autoconf.in -@@ -121,6 +121,7 @@ DRI_DIRS = @DRI_DIRS@ +Index: mesa/configs/autoconf.in +=================================================================== +--- mesa.orig/configs/autoconf.in 2012-06-01 13:01:25.243165726 -0400 ++++ mesa/configs/autoconf.in 2012-06-01 13:02:46.831167952 -0400 +@@ -124,6 +124,7 @@ DRICORE_GLSL_LIBS = @DRICORE_GLSL_LIBS@ DRICORE_LIBS = @DRICORE_LIBS@ DRICORE_LIB_DEPS = @DRICORE_LIB_DEPS@ @@ -68,12 +68,12 @@ EGL_PLATFORMS = @EGL_PLATFORMS@ EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ -diff --git a/configure.ac b/configure.ac -index 0ea264e..684f5b0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1036,6 +1036,41 @@ AC_SUBST([GLESv2_PC_LIB_PRIV]) - GLAPI_LIB_DEPS="-lpthread" +Index: mesa/configure.ac +=================================================================== +--- mesa.orig/configure.ac 2012-06-01 13:02:46.511167943 -0400 ++++ mesa/configure.ac 2012-06-01 13:02:46.831167952 -0400 +@@ -1068,6 +1068,41 @@ + GLAPI_LIB_DEPS="-lpthread $SELINUX_LIBS" AC_SUBST([GLAPI_LIB_DEPS]) +dnl Setup default DRI CFLAGS @@ -114,11 +114,11 @@ dnl Setup default DRI CFLAGS DRI_CFLAGS='$(CFLAGS)' -diff --git a/src/gallium/Makefile.template b/src/gallium/Makefile.template -index 036c119..3f01d08 100644 ---- a/src/gallium/Makefile.template -+++ b/src/gallium/Makefile.template -@@ -30,7 +30,7 @@ endif +Index: mesa/src/gallium/Makefile.template +=================================================================== +--- mesa.orig/src/gallium/Makefile.template 2012-06-01 13:01:25.247165726 -0400 ++++ mesa/src/gallium/Makefile.template 2012-06-01 13:02:46.831167952 -0400 +@@ -30,7 +30,7 @@ ##### TARGETS ##### @@ -127,7 +127,7 @@ lib$(LIBNAME).a: $(OBJECTS) $(EXTRA_OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) $(EXTRA_OBJECTS) -@@ -58,16 +58,16 @@ install: +@@ -58,16 +58,16 @@ ##### RULES ##### %.s: %.c @@ -148,11 +148,11 @@ sinclude depend -diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile -index 7dae7bc..9a08acb 100644 ---- a/src/gallium/auxiliary/Makefile -+++ b/src/gallium/auxiliary/Makefile -@@ -213,6 +213,14 @@ endif +Index: mesa/src/gallium/auxiliary/Makefile +=================================================================== +--- mesa.orig/src/gallium/auxiliary/Makefile 2012-06-01 13:01:25.247165726 -0400 ++++ mesa/src/gallium/auxiliary/Makefile 2012-06-01 13:02:46.831167952 -0400 +@@ -18,6 +18,14 @@ include ../Makefile.template @@ -167,18 +167,18 @@ indices/u_indices_gen.c: indices/u_indices_gen.py $(PYTHON2) $< > $@ -@@ -228,4 +236,6 @@ util/u_format_table.c: util/u_format_table.py util/u_format_pack.py util/u_forma +@@ -33,4 +41,6 @@ util/u_half.c: util/u_half.py $(PYTHON2) util/u_half.py > $@ + +default:: $(TOP)/$(LIB_DIR)/libgallium.so # DO NOT DELETE -diff --git a/src/gallium/targets/Makefile.dri b/src/gallium/targets/Makefile.dri -index 857ebfe..bb08ba0 100644 ---- a/src/gallium/targets/Makefile.dri -+++ b/src/gallium/targets/Makefile.dri -@@ -9,7 +9,6 @@ LDFLAGS += -lstdc++ +Index: mesa/src/gallium/targets/Makefile.dri +=================================================================== +--- mesa.orig/src/gallium/targets/Makefile.dri 2012-06-01 13:01:25.251165726 -0400 ++++ mesa/src/gallium/targets/Makefile.dri 2012-06-01 13:02:46.831167952 -0400 +@@ -7,7 +7,6 @@ endif MESA_MODULES = \ @@ -186,7 +186,7 @@ $(GALLIUM_AUXILIARIES) COMMON_GALLIUM_SOURCES = \ -@@ -78,8 +77,8 @@ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) Makefile \ +@@ -73,8 +72,8 @@ $(MKLIB) -o $@.tmp -noprefix -linker '$(CXX)' -ldflags '$(LDFLAGS)' \ $(OBJECTS) $(PIPE_DRIVERS) \ -Wl,--start-group $(MESA_MODULES) -Wl,--end-group \ @@ -197,13 +197,13 @@ @rm -f $@.test mv -f $@.tmp $@ -diff --git a/src/mesa/Makefile b/src/mesa/Makefile -index a903a26..c4ab43c 100644 ---- a/src/mesa/Makefile -+++ b/src/mesa/Makefile -@@ -17,6 +17,9 @@ MESA_GALLIUM_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_GALLIUM_OBJECTS)) - - DRICORE_OBJECTS := $(addprefix $(DRICORE_OBJ_DIR)/, $(MESA_OBJECTS)) +Index: mesa/src/mesa/Makefile +=================================================================== +--- mesa.orig/src/mesa/Makefile 2012-06-01 13:01:25.259165726 -0400 ++++ mesa/src/mesa/Makefile 2012-06-01 13:02:46.831167952 -0400 +@@ -16,6 +16,9 @@ + MESA_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_OBJECTS)) + MESA_GALLIUM_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_GALLIUM_OBJECTS)) +DRICORE_OBJECTS := $(addprefix $(DRICORE_OBJ_DIR)/, $(MESA_OBJECTS)) +GALLIUMCORE_OBJECTS := $(addprefix $(DRICORE_OBJ_DIR)/, $(filter-out $(MESA_OBJECTS), $(MESA_GALLIUM_OBJECTS))) @@ -211,17 +211,17 @@ # define preprocessor flags MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES) -@@ -66,7 +69,7 @@ $(DRICORE_OBJ_DIR)/%.o: %.S +@@ -65,7 +68,7 @@ # Default: build dependencies, then asm_subdirs, GLSL built-in lib, # then convenience libs (.a) and finally the device drivers: -default: $(DEPENDS) asm_subdirs $(MESA_LIBS) $(DRICORE_LIBS) driver_subdirs +default: $(DEPENDS) asm_subdirs $(MESA_LIBS) $(DRICORE_LIBS) libgalliumcore.a driver_subdirs - main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py - $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@ -@@ -125,6 +128,10 @@ depend: $(ALL_SOURCES) - @$(MKDEP) $(MKDEP_OPTIONS) -p$(MESA_OBJ_DIR)/ $(MESA_CPPFLAGS) \ + # include glapi_gen.mk for generating glapi headers for GLES + GLAPI := $(TOP)/src/mapi/glapi/gen +@@ -146,6 +149,10 @@ + @$(MKDEP) $(MKDEP_OPTIONS) -a -p$(DRICORE_OBJ_DIR)/ $(MESA_CPPFLAGS) \ $(ALL_SOURCES) > /dev/null 2>/dev/null +# Make archive of subset of core mesa object files for gallium diff -Nru mesa-8.0.2/debian/patches/117_intel_fix_hiz_null_dereference.patch mesa-8.0.3/debian/patches/117_intel_fix_hiz_null_dereference.patch --- mesa-8.0.2/debian/patches/117_intel_fix_hiz_null_dereference.patch 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/117_intel_fix_hiz_null_dereference.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -From 9c396be157cb4e8780145769851f99754830b5f6 Mon Sep 17 00:00:00 2001 -From: Dylan Noblesmith -Date: Fri, 16 Mar 2012 18:38:49 +0000 -Subject: [PATCH] intel: fix null dereference processing HiZ buffer - -Or technically, a near-null dereference. - -https://bugs.freedesktop.org/show_bug.cgi?id=46303 -https://bugs.freedesktop.org/show_bug.cgi?id=46739 - -NOTE: This is a candidate for the 8.0 branch. ---- - src/mesa/drivers/dri/intel/intel_context.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c -index ffd9536..7f94976 100644 ---- a/src/mesa/drivers/dri/intel/intel_context.c -+++ b/src/mesa/drivers/dri/intel/intel_context.c -@@ -1223,6 +1223,10 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel, - if (!rb) - return; - -+ /* Check if we failed to allocate the depth miptree earlier. */ -+ if (buffer->attachment == __DRI_BUFFER_HIZ && rb->mt == NULL) -+ return; -+ - /* If the renderbuffer's and DRIbuffer's regions match, then continue. */ - if ((buffer->attachment != __DRI_BUFFER_HIZ && - rb->mt && -@@ -1264,6 +1268,7 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel, - * due to failure to allocate new storage. - */ - if (buffer->attachment == __DRI_BUFFER_HIZ) { -+ assert(rb->mt); - intel_miptree_release(&rb->mt->hiz_mt); - } else { - intel_miptree_release(&rb->mt); -@@ -1289,6 +1294,7 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel, - - /* Associate buffer with new storage. */ - if (buffer->attachment == __DRI_BUFFER_HIZ) { -+ assert(rb->mt); - rb->mt->hiz_mt = mt; - } else { - rb->mt = mt; --- -1.7.4.1 - diff -Nru mesa-8.0.2/debian/patches/117_nullptr_check_in_query_version.patch mesa-8.0.3/debian/patches/117_nullptr_check_in_query_version.patch --- mesa-8.0.2/debian/patches/117_nullptr_check_in_query_version.patch 1970-01-01 00:00:00.000000000 +0000 +++ mesa-8.0.3/debian/patches/117_nullptr_check_in_query_version.patch 2012-07-11 02:13:06.000000000 +0000 @@ -0,0 +1,25 @@ +commit 7062625c601478d108da1c8da7201f023bd35b54 +Author: Bryce Harrington +Date: Tue Jun 12 17:32:21 2012 -0700 + + Check for NULL return from xcb_glx_query_version_reply() before deref. + + This can get triggered during login when called from + gnome-session-check-accelerated-helper. + + Fixes: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/968284 + Signed-off-by: Bryce Harrington + +diff --git a/src/glx/glxext.c b/src/glx/glxext.c +index 12fff22..5da2570 100644 +--- a/src/glx/glxext.c ++++ b/src/glx/glxext.c +@@ -293,6 +293,8 @@ QueryVersion(Display * dpy, int opcode, int *major, int *minor) + GLX_MINOR_VERSION), + NULL); + ++ if (!reply) ++ return GL_FALSE; + if (reply->major_version != GLX_MAJOR_VERSION) { + free(reply); + return GL_FALSE; diff -Nru mesa-8.0.2/debian/patches/118_fix_rendering_from_textures.patch mesa-8.0.3/debian/patches/118_fix_rendering_from_textures.patch --- mesa-8.0.2/debian/patches/118_fix_rendering_from_textures.patch 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/118_fix_rendering_from_textures.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,226 +0,0 @@ -commit 93e94cbb48a679b7bf67594adb6f858526b37935 -Author: Eric Anholt -Date: Fri Feb 10 12:54:25 2012 -0800 - - intel: Fix rendering from textures after RenderTexture(). - - There's a serious trap for drivers: RenderTexture() does not indicate - that the texture is currently bound to the draw buffer, despite - FinishRenderTexture() signaling that the texture is just now being - unbound from the draw buffer. - - We were acting as if RenderTexture() *was* the start of rendering and - that we could make texturing incoherent with the current contents of - the renderbuffer. This caused intel oglconform sRGB - Mipmap.1D_textures to fail, because we got a call to TexImage() and - thus RenderTexture() on a texture bound to a framebuffer that wasn't - the draw buffer, so we skipped validating the new image into the - texture object used for rendering. - - We can't (easily) make RenderTexture() indicate the start of drawing, - because both our driver and gallium are using it as the moment to set - up the renderbuffer wrapper used for things like MapRenderbuffer(). - Instead, postpone the setup of the workaround render target miptree - until update_renderbuffer time, so that we no longer need to skip - validation of miptrees used as render targets. As a bonus, this - should make GL_NV_texture_barrier possible. - - (This also fixes a regression in the gen4 small-mipmap rendering since - 3b38b33c1648b07e75dc4d8340758171e109c598, which switched - set_draw_offset from image->mt to irb->mt but didn't move the irb->mt - replacement up before set_draw_offset). - - Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44961 - NOTE: This is a candidate for the 8.0 branch. - -diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c -index 51d3a46..97ae489 100644 ---- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c -+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c -@@ -916,12 +916,48 @@ brw_update_renderbuffer_surface(struct brw_context *brw, - struct gl_context *ctx = &intel->ctx; - struct intel_renderbuffer *irb = intel_renderbuffer(rb); - struct intel_mipmap_tree *mt = irb->mt; -- struct intel_region *region = irb->mt->region; -+ struct intel_region *region; - uint32_t *surf; - uint32_t tile_x, tile_y; - uint32_t format = 0; - gl_format rb_format = intel_rb_format(irb); - -+ if (irb->tex_image && !brw->has_surface_tile_offset) { -+ intel_renderbuffer_tile_offsets(irb, &tile_x, &tile_y); -+ -+ if (tile_x != 0 || tile_y != 0) { -+ /* Original gen4 hardware couldn't draw to a non-tile-aligned -+ * destination in a miptree unless you actually setup your renderbuffer -+ * as a miptree and used the fragile lod/array_index/etc. controls to -+ * select the image. So, instead, we just make a new single-level -+ * miptree and render into that. -+ */ -+ struct intel_context *intel = intel_context(ctx); -+ struct intel_texture_image *intel_image = -+ intel_texture_image(irb->tex_image); -+ struct intel_mipmap_tree *new_mt; -+ int width, height, depth; -+ -+ intel_miptree_get_dimensions_for_image(irb->tex_image, &width, &height, &depth); -+ -+ new_mt = intel_miptree_create(intel, irb->tex_image->TexObject->Target, -+ intel_image->base.Base.TexFormat, -+ intel_image->base.Base.Level, -+ intel_image->base.Base.Level, -+ width, height, depth, -+ true); -+ -+ intel_miptree_copy_teximage(intel, intel_image, new_mt); -+ intel_miptree_reference(&irb->mt, intel_image->mt); -+ intel_renderbuffer_set_draw_offset(irb); -+ intel_miptree_release(&new_mt); -+ -+ mt = irb->mt; -+ } -+ } -+ -+ region = irb->mt->region; -+ - surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE, - 6 * 4, 32, &brw->bind.surf_offset[unit]); - -diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c -index 185602a..c5097c3 100644 ---- a/src/mesa/drivers/dri/intel/intel_fbo.c -+++ b/src/mesa/drivers/dri/intel/intel_fbo.c -@@ -553,22 +553,6 @@ intel_renderbuffer_tile_offsets(struct intel_renderbuffer *irb, - } - } - --#ifndef I915 --static bool --need_tile_offset_workaround(struct brw_context *brw, -- struct intel_renderbuffer *irb) --{ -- uint32_t tile_x, tile_y; -- -- if (brw->has_surface_tile_offset) -- return false; -- -- intel_renderbuffer_tile_offsets(irb, &tile_x, &tile_y); -- -- return tile_x != 0 || tile_y != 0; --} --#endif -- - /** - * Called by glFramebufferTexture[123]DEXT() (and other places) to - * prepare for rendering into texture memory. This might be called -@@ -626,42 +610,13 @@ intel_render_texture(struct gl_context * ctx, - return; - } - -+ irb->tex_image = image; -+ - DBG("Begin render %s texture tex=%u w=%d h=%d refcount=%d\n", - _mesa_get_format_name(image->TexFormat), - att->Texture->Name, image->Width, image->Height, - irb->Base.Base.RefCount); - -- intel_image->used_as_render_target = true; -- --#ifndef I915 -- if (need_tile_offset_workaround(brw_context(ctx), irb)) { -- /* Original gen4 hardware couldn't draw to a non-tile-aligned -- * destination in a miptree unless you actually setup your -- * renderbuffer as a miptree and used the fragile -- * lod/array_index/etc. controls to select the image. So, -- * instead, we just make a new single-level miptree and render -- * into that. -- */ -- struct intel_context *intel = intel_context(ctx); -- struct intel_mipmap_tree *new_mt; -- int width, height, depth; -- -- intel_miptree_get_dimensions_for_image(image, &width, &height, &depth); -- -- new_mt = intel_miptree_create(intel, image->TexObject->Target, -- intel_image->base.Base.TexFormat, -- intel_image->base.Base.Level, -- intel_image->base.Base.Level, -- width, height, depth, -- true); -- -- intel_miptree_copy_teximage(intel, intel_image, new_mt); -- intel_renderbuffer_set_draw_offset(irb); -- -- intel_miptree_reference(&irb->mt, intel_image->mt); -- intel_miptree_release(&new_mt); -- } --#endif - /* update drawing region, etc */ - intel_draw_buffer(ctx); - } -@@ -678,14 +633,13 @@ intel_finish_render_texture(struct gl_context * ctx, - struct gl_texture_object *tex_obj = att->Texture; - struct gl_texture_image *image = - tex_obj->Image[att->CubeMapFace][att->TextureLevel]; -- struct intel_texture_image *intel_image = intel_texture_image(image); -+ struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer); - - DBG("Finish render %s texture tex=%u\n", - _mesa_get_format_name(image->TexFormat), att->Texture->Name); - -- /* Flag that this image may now be validated into the object's miptree. */ -- if (intel_image) -- intel_image->used_as_render_target = false; -+ if (irb) -+ irb->tex_image = NULL; - - /* Since we've (probably) rendered to the texture and will (likely) use - * it in the texture domain later on in this batchbuffer, flush the -diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h -index a2c1b1a..724f141 100644 ---- a/src/mesa/drivers/dri/intel/intel_fbo.h -+++ b/src/mesa/drivers/dri/intel/intel_fbo.h -@@ -47,6 +47,9 @@ struct intel_renderbuffer - struct intel_mipmap_tree *mt; /**< The renderbuffer storage. */ - drm_intel_bo *map_bo; - -+ /* Current texture image this renderbuffer is attached to. */ -+ struct gl_texture_image *tex_image; -+ - /** - * \name Miptree view - * \{ -diff --git a/src/mesa/drivers/dri/intel/intel_tex_obj.h b/src/mesa/drivers/dri/intel/intel_tex_obj.h -index 8b278ba..d1a5f05 100644 ---- a/src/mesa/drivers/dri/intel/intel_tex_obj.h -+++ b/src/mesa/drivers/dri/intel/intel_tex_obj.h -@@ -65,7 +65,6 @@ struct intel_texture_image - * Else there is no image data. - */ - struct intel_mipmap_tree *mt; -- bool used_as_render_target; - }; - - static INLINE struct intel_texture_object * -diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c -index b96f2a4..a63068b 100644 ---- a/src/mesa/drivers/dri/intel/intel_tex_validate.c -+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c -@@ -97,14 +97,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) - /* skip too small size mipmap */ - if (intelImage == NULL) - break; -- /* Need to import images in main memory or held in other trees. -- * If it's a render target, then its data isn't needed to be in -- * the object tree (otherwise we'd be FBO incomplete), and we need -- * to keep track of the image's MT as needing to be pulled in still, -- * or we'll lose the rendering that's done to it. -- */ -- if (intelObj->mt != intelImage->mt && -- !intelImage->used_as_render_target) { -+ -+ if (intelObj->mt != intelImage->mt) { - intel_miptree_copy_teximage(intel, intelImage, intelObj->mt); - } - } diff -Nru mesa-8.0.2/debian/patches/118_glsl_initialize_samplers.patch mesa-8.0.3/debian/patches/118_glsl_initialize_samplers.patch --- mesa-8.0.2/debian/patches/118_glsl_initialize_samplers.patch 1970-01-01 00:00:00.000000000 +0000 +++ mesa-8.0.3/debian/patches/118_glsl_initialize_samplers.patch 2012-07-11 02:13:06.000000000 +0000 @@ -0,0 +1,53 @@ +commit b610881317a7775a7ffe5f032099d8b2dc45eff0 +Author: Ian Romanick +Date: Tue Apr 10 10:40:11 2012 -0700 + + glsl: Initialize samplers to 0, propagate sampler values to the gl_program + + The spec requires that samplers be initialized to 0. Since this + differs from the 1-to-1 mapping of samplers to texture units assumed + by ARB assembly shaders (and the gl_program structure), be sure to + propagate this date from the gl_shader_program to the gl_program. + + Signed-off-by: Ian Romanick + Reviewed-by: Eric Anholt + Reviewed-by: Kenneth Graunke + CC: Vadim Girlin + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49088 + +diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp +index 81a995e..92e2a1f 100644 +--- a/src/glsl/link_uniforms.cpp ++++ b/src/glsl/link_uniforms.cpp +@@ -329,9 +329,16 @@ link_assign_uniform_locations(struct gl_shader_program *prog) + prog->UniformHash = new string_to_uint_map; + } + +- for (unsigned i = 0; i < Elements(prog->SamplerUnits); i++) { +- prog->SamplerUnits[i] = i; +- } ++ /* Uniforms that lack an initializer in the shader code have an initial ++ * value of zero. This includes sampler uniforms. ++ * ++ * Page 24 (page 30 of the PDF) of the GLSL 1.20 spec says: ++ * ++ * "The link time initial value is either the value of the variable's ++ * initializer, if present, or 0 if no initializer is present. Sampler ++ * types cannot have initializers." ++ */ ++ memset(prog->SamplerUnits, 0, sizeof(prog->SamplerUnits)); + + /* First pass: Count the uniform resources used by the user-defined + * uniforms. While this happens, each active uniform will have an index +diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c +index be1e172..e6604b1 100644 +--- a/src/mesa/main/uniforms.c ++++ b/src/mesa/main/uniforms.c +@@ -65,6 +65,7 @@ _mesa_update_shader_textures_used(struct gl_shader_program *shProg, + { + GLuint s; + ++ memcpy(prog->SamplerUnits, shProg->SamplerUnits, sizeof(prog->SamplerUnits)); + memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed)); + + for (s = 0; s < MAX_SAMPLERS; s++) { diff -Nru mesa-8.0.2/debian/patches/13-llvm-config-pick-a-version.diff mesa-8.0.3/debian/patches/13-llvm-config-pick-a-version.diff --- mesa-8.0.2/debian/patches/13-llvm-config-pick-a-version.diff 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/13-llvm-config-pick-a-version.diff 2012-07-11 02:13:06.000000000 +0000 @@ -6,9 +6,9 @@ Switch to 3.0 for ubuntu 12.04 Index: mesa/configure.ac =================================================================== ---- mesa.orig/configure.ac 2012-01-18 16:06:14.824947429 +0200 -+++ mesa/configure.ac 2012-01-18 16:06:19.117076083 +0200 -@@ -1765,7 +1765,7 @@ +--- mesa.orig/configure.ac 2012-05-21 18:19:43.639922922 -0400 ++++ mesa/configure.ac 2012-05-21 18:19:43.947922933 -0400 +@@ -1762,7 +1762,7 @@ esac fi if test "x$enable_gallium_llvm" = xyes; then diff -Nru mesa-8.0.2/debian/patches/series mesa-8.0.3/debian/patches/series --- mesa-8.0.2/debian/patches/series 2012-07-11 02:13:05.000000000 +0000 +++ mesa-8.0.3/debian/patches/series 2012-07-11 02:13:06.000000000 +0000 @@ -12,5 +12,5 @@ 101_ubuntu_hidden_glname.patch 115_llvm_dynamic_linking.diff 116_use_shared_galliumcore.diff -117_intel_fix_hiz_null_dereference.patch -118_fix_rendering_from_textures.patch +117_nullptr_check_in_query_version.patch +118_glsl_initialize_samplers.patch diff -Nru mesa-8.0.2/docs/relnotes-8.0.2.html mesa-8.0.3/docs/relnotes-8.0.2.html --- mesa-8.0.2/docs/relnotes-8.0.2.html 2012-03-21 18:01:05.000000000 +0000 +++ mesa-8.0.3/docs/relnotes-8.0.2.html 2012-05-18 04:27:14.000000000 +0000 @@ -28,7 +28,9 @@

MD5 checksums

-tdb
+70eb3dc74fbfcd72f6776268ee1db52e  MesaLib-8.0.2.tar.gz
+a368104e5700707048dc3e8691a9a7a1  MesaLib-8.0.2.tar.bz2
+d5e5cdb85d2afdbcd1c0623d3ed1c54d  MesaLib-8.0.2.zip
 

New features

diff -Nru mesa-8.0.2/docs/relnotes-8.0.3.html mesa-8.0.3/docs/relnotes-8.0.3.html --- mesa-8.0.2/docs/relnotes-8.0.3.html 1970-01-01 00:00:00.000000000 +0000 +++ mesa-8.0.3/docs/relnotes-8.0.3.html 2012-05-18 23:11:23.000000000 +0000 @@ -0,0 +1,317 @@ + + + +Mesa Release Notes + + + + + + + + +

Mesa 8.0.3 Release Notes / May 18, 2012

+ +

+Mesa 8.0.3 is a bug fix release which fixes bugs found since the 8.0.2 release. +

+

+Mesa 8.0.3 implements the OpenGL 3.0 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.0. +

+

+See the Compiling/Installing page for prerequisites +for DRI hardware acceleration. +

+ + +

MD5 checksums

+
+TBD.
+
+ +

New features

+

None.

+ +

Bug fixes

+ +

This list is likely incomplete.

+ +
    + +
  • Bug 28138 - [G45] Regnum Online, sparkling in in-game rendering
  • + +
  • Bug 30102 - glean depthStencil test fails BadLength with indirect non-swrast rendering
  • + +
  • Bug 40361 - Glitches on X3100 after upgrade to 7.11
  • + +
  • Bug 41152 - [glsl] Shader backend in Regnum Online does not work
  • + +
  • Bug 41216 - [bisected pineview]oglc filtercubemin(basic.sizedRGBA) fails
  • + +
  • Bug 41372 - i830_state.c PBO crash
  • + +
  • Bug 41495 - i830: intel_get_vb_max / intel_batchbuffer_space mismatch.
  • + +
  • Bug 44701 - Regnum online textures flickering
  • + +
  • Bug 44961 - [bisected i965] oglc sRGB(Mipmap.1D_textures) regressed
  • + +
  • Bug 44970 - [i965]oglc max_values(negative.textureSize.textureCube) segfaults
  • + +
  • Bug 45214 - Textures disappearing or missing in RegnumOnline OpenGL game
  • + +
  • Bug 45558 - cannot render on a drawable of size equal the max framebuffer size
  • + +
  • Bug 45921 - [r300g, bisected] Multiple piglit regressions after glsl_to_tgsi changes
  • + +
  • Bug 46303 - [SNB] segfault in intel_miptree_release()
  • + +
  • Bug 46739 - [snb-m-gt2+] compiz crashed with SIGSEGV in intel_miptree_release()
  • + +
  • Bug 46834 - small performance when playing flightgear (swrast fallback through GTT mapping)
  • + +
  • Bug 47126 - tests/fbo/fbo-array.c:109: create_array_fbo: Assertion `glGetError() == 0' failed.
  • + +
  • Bug 48218 - brw_fs_schedule_instructions.cpp segfault due to accessing not allocated last_mrf_write[16]
  • + +
  • Bug 48545 - LLVMpipe glReadPixels Firefox hits the slow path (WebGL rendering)
  • + +
  • Bug 49124 - swrast/s_texfetch.c:1156: set_fetch_functions: Assertion `texImage->FetchTexel' failed.
  • + + + +
+ + +

Changes

+

The full set of changes can be viewed by using the following GIT command:

+ +
+  git log mesa-8.0.2..mesa-8.0.3
+
+ +

Alban Browaeys (1): +

    +
  • dri/i915: Fix off-by-one in i830 clip region size.
  • +

+ +

Alex Deucher (2): +

    +
  • r200: fix fog coordinate emit
  • +
  • radeon: fix fog coordinate emit
  • +

+ +

Alexander von Gluck (4): +

    +
  • llvmpipe: fix symbol conflict on Haiku
  • +
  • svga: fix typedef conflicts on Haiku
  • +
  • mesa: Don't use newlocale on Haiku
  • +
  • glsl: Don't use newlocale on Haiku
  • +

+ +

Anuj Phogat (4): +

    +
  • mesa: fix issues with texture border and array textures
  • +
  • mesa: Fix valid texture target test in _mesa_GetTexLevelParameteriv()
  • +
  • mesa: Fix the cause of piglit test fbo-array failure
  • +
  • intel: Fix a case when mapping large texture fails
  • +

+ +

Brian Paul (17): +

    +
  • mesa: add a couple fast-paths to fast_read_rgba_pixels_memcpy()
  • +
  • mesa/gdi: remove wmesa_set_renderbuffer_funcs() function
  • +
  • mesa/gdi: remove clear_color() function
  • +
  • mesa: bump version to 8.0.2 in configs/default
  • +
  • swrast: include s_fragprog.h to silence warnings
  • +
  • mesa: remove LSB-first pixel packing check in glReadPixels
  • +
  • mesa: fix error in _mesa_format_matches_format_and_type() for RGB888
  • +
  • mesa: add BGR888 code in _mesa_format_matches_format_and_type()
  • +
  • vbo: fix node_attrsz[] usage in vbo_bind_vertex_list()
  • +
  • mesa: add missing texture integer test in glTexSubImage()
  • +
  • mesa: add missing return after _mesa_error() in update_array()
  • +
  • glsl: propagate MaxUnrollIterations to the optimizer's loop unroller
  • +
  • st/mesa: set MaxUnrollIterations = 255
  • +
  • st/mesa: no-op glCopyPixels if source region is out of bounds
  • +
  • mesa: do more teximage error checking for generic compressed formats
  • +
  • mesa: fix/add error check in _mesa_ColorMaterial()
  • +
  • mesa: fix glMaterial / dlist bug
  • +

+ +

Chad Versace (3): +

    +
  • glsl: Fix Android build
  • +
  • main: Fix memory leak in _mesa_make_extension_string()
  • +
  • intel: Disable ARB_framebuffer_object in ES contexts
  • +

+ +

Chris Wilson (1): +

    +
  • i830: Compute initial number of vertices from remaining batch space
  • +

+ +

Dave Airlie (4): +

    +
  • mesa/format_unpack: add LUMINANCE 8/16 UINT/INT
  • +
  • glx/drisw: avoid segfaults when we fail to get visual
  • +
  • drisw: fix image stride calculation for 16-bit.
  • +
  • intel: fix TFP at 16-bpp
  • +

+ +

Dylan Noblesmith (7): +

    +
  • intel: fix null dereference processing HiZ buffer
  • +
  • util: fix undefined behavior
  • +
  • util: fix uninitialized table
  • +
  • egl: fix uninitialized values
  • +
  • st/vega: fix uninitialized values
  • +
  • egl-static: fix printf warning
  • +
  • i965: fix typo
  • +

+ +

Eric Anholt (19): +

    +
  • i965/fs: Jump from discard statements to the end of the program when done.
  • +
  • intel: Fix rendering from textures after RenderTexture().
  • +
  • mesa: Fix handling of glCopyBufferSubData() for src == dst.
  • +
  • i965/fs: Move GL_CLAMP handling to coordinate setup.
  • +
  • i965/fs: Implement GL_CLAMP behavior on texture rectangles on gen6+.
  • +
  • mesa: Fix push/pop of multisample coverage invert.
  • +
  • mesa: Include the multisample enables under GL_MULTISAMPLE_BIT attrib as well.
  • +
  • mesa: Fix display list handling for GL_ARB_draw_instanced.
  • +
  • mesa: Fix display lists for draw_elements_base_vertex with draw_instanced.
  • +
  • mesa: Add missing error check for first < 0 in glDrawArraysInstanced().
  • +
  • i915: Fix piglit fbo-nodepth-test on i830.
  • +
  • intel: Return success when asked to allocate a 0-width/height renderbuffer.
  • +
  • mesa: Throw error on glGetActiveUniform inside Begin/End.
  • +
  • i965/vs: Fix up swizzle for dereference_array of matrices.
  • +
  • glsl: Fix indentation of switch code.
  • +
  • glsl: Let the constructor figure out the types of switch-related expressions.
  • +
  • glsl: Reject non-scalar switch expressions.
  • +
  • glsl: Fix assertion failure on handling switch on uint expressions.
  • +
  • mesa: Check for framebuffer completeness before looking at the rb.
  • +

+ +

Eugeni Dodonov (1): +

    +
  • intel: add PCI IDs for Ivy Bridge GT2 server variant
  • +

+ +

Han Shen(沈涵) (1): +

    +
  • bin/mklib: remove '-m32' for arm linux
  • +

+ +

Ian Romanick (1): +

    +
  • mesa: Bump version number to 8.0.3
  • +

+ +

Jakob Bornecrantz (1): +

    +
  • docs: Add 8.0.2 md5sums
  • +

+ +

Jeremy Huddleston (7): +

    +
  • darwin: Eliminate a pthread mutex leak
  • +
  • darwin: Fix an error message
  • +
  • darwin: Make reported errors more user-friendly
  • +
  • darwin: Use ASL for logging
  • +
  • darwin: Unlock our mutex before destroying it
  • +
  • darwin: Eliminate a possible race condition while destroying a surface
  • +
  • darwin: Address a build failure on Leopard and earlier OS versions
  • +

+ +

Jon TURNEY (1): +

    +
  • Have __glImageSize handle format GL_DEPTH_STENCIL_NV the same way as the server does
  • +

+ +

Jonas Maebe (2): +

    +
  • glapi: Correct size of allocated _glapi_table struct
  • +
  • apple: Fix a use after free
  • +

+ +

Jordan Justen (1): +

    +
  • mesa: Add primitive restart support to glArrayElement
  • +

+ +

Kenneth Graunke (12): +

    +
  • i965: Actually upload sampler state pointers for the VS unit on Gen6.
  • +
  • i965/fs: Fix FB writes that tried to use the non-existent m16 register.
  • +
  • vbo: Remove pedantic warning about 'end' beind out of bounds.
  • +
  • vbo: Ignore invalid element ranges which are outside VBO bounds.
  • +
  • vbo: Rework checking of 'end' against _MaxElement.
  • +
  • vbo: Eliminate short-circuiting in invalid-start case.
  • +
  • i965: Fix GPU hangs in the dummy fragment shader.
  • +
  • i965: Make the dummy fragment shader work in SIMD16 mode.
  • +
  • drirc: Add force_glsl_extensions_warn workaround for Unigine Heaven.
  • +
  • i965: Avoid explicit accumulator operands in SIMD16 mode on Gen7.
  • +
  • intel: Remove pointless software fallback for glBitmap on Gen6.
  • +
  • glsl: Fix broken constant expression handling for <, <=, >, and >=.
  • +

+ +

Kurt Roeckx (2): +

    +
  • i915: Compute maximum number of verts using the actual batchbuffer size.
  • +
  • i915: Fix i830 polygon stipple from PBOs.
  • +

+ +

Marek Olšák (5): +

    +
  • r300g/swtcl: don't print an error when getting ClipVertex
  • +
  • r300g/swtcl: don't enter u_vbuf_mgr
  • +
  • r300g/swtcl: don't expose shader subroutine support
  • +
  • r300g/swtcl: fix polygon offset
  • +
  • r300g/swtcl: fix crash when back color is present in vertex shader
  • +

+ +

Mathias Fröhlich (1): +

    +
  • glsl: Avoid excessive loop unrolling.
  • +

+ +

Matt Turner (1): +

    +
  • Remove -ffast-math from default CFLAGS
  • +

+ +

Paul Berry (1): +

    +
  • i915: Initialize swrast_texture_image structure fields.
  • +

+ +

Roland Scheidegger (1): +

    +
  • mesa: check_index_bounds off-by-one fix
  • +

+ +

Tom Stellard (2): +

    +
  • r300/compiler: Clear loop registers in vertex shaders w/o loops
  • +
  • r300/compiler: Copy all instruction attributes during local transfoms
  • +

+ +

Vinson Lee (5): +

    +
  • mesa: Fix memory leak in _mesa_get_uniform_location.
  • +
  • linker: Fix memory leak in count_uniform_size::visit_field.
  • +
  • swrast: Fix memory leaks in blit_linear.
  • +
  • ir_to_mesa: Fix uninitialized member in add_uniform_to_shader.
  • +
  • mesa: Fix memory leak in generate_mipmap_compressed.
  • +

+ +

Yuanhan Liu (2): +

    +
  • i915: set SPRITE_POINT_ENABLE bit correctly
  • +
  • i965: fix wrong cube/3D texture layout
  • +

+ + + diff -Nru mesa-8.0.2/include/pci_ids/i965_pci_ids.h mesa-8.0.3/include/pci_ids/i965_pci_ids.h --- mesa-8.0.2/include/pci_ids/i965_pci_ids.h 2011-07-05 04:34:17.000000000 +0000 +++ mesa-8.0.3/include/pci_ids/i965_pci_ids.h 2012-05-18 04:27:14.000000000 +0000 @@ -25,3 +25,4 @@ CHIPSET(0x0156, IVYBRIDGE_M_GT1, ivb_gt1) CHIPSET(0x0166, IVYBRIDGE_M_GT2, ivb_gt2) CHIPSET(0x015a, IVYBRIDGE_S_GT1, ivb_gt1) +CHIPSET(0x016a, IVYBRIDGE_S_GT2, ivb_gt2) diff -Nru mesa-8.0.2/Makefile mesa-8.0.3/Makefile --- mesa-8.0.2/Makefile 2012-03-21 17:55:53.000000000 +0000 +++ mesa-8.0.3/Makefile 2012-05-18 23:08:34.000000000 +0000 @@ -184,7 +184,7 @@ # Rules for making release tarballs -PACKAGE_VERSION=8.0.2 +PACKAGE_VERSION=8.0.3 PACKAGE_DIR = Mesa-$(PACKAGE_VERSION) PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION) diff -Nru mesa-8.0.2/src/egl/main/eglimage.c mesa-8.0.3/src/egl/main/eglimage.c --- mesa-8.0.2/src/egl/main/eglimage.c 2012-03-20 11:56:52.000000000 +0000 +++ mesa-8.0.3/src/egl/main/eglimage.c 2012-05-18 04:27:14.000000000 +0000 @@ -45,7 +45,7 @@ (void) dpy; - memset(attrs, 0, sizeof(attrs)); + memset(attrs, 0, sizeof(*attrs)); attrs->ImagePreserved = EGL_FALSE; attrs->GLTextureLevel = 0; attrs->GLTextureZOffset = 0; diff -Nru mesa-8.0.2/src/gallium/auxiliary/util/u_double_list.h mesa-8.0.3/src/gallium/auxiliary/util/u_double_list.h --- mesa-8.0.2/src/gallium/auxiliary/util/u_double_list.h 2011-04-08 16:56:56.000000000 +0000 +++ mesa-8.0.3/src/gallium/auxiliary/util/u_double_list.h 2012-05-18 04:27:14.000000000 +0000 @@ -105,6 +105,11 @@ #define LIST_IS_EMPTY(__list) \ ((__list)->next == (__list)) +/** + * Cast from a pointer to a member of a struct back to the containing struct. + * + * 'sample' MUST be initialized, or else the result is undefined! + */ #ifndef container_of #define container_of(ptr, sample, member) \ (void *)((char *)(ptr) \ @@ -112,29 +117,29 @@ #endif #define LIST_FOR_EACH_ENTRY(pos, head, member) \ - for (pos = container_of((head)->next, pos, member); \ + for (pos = NULL, pos = container_of((head)->next, pos, member); \ &pos->member != (head); \ pos = container_of(pos->member.next, pos, member)) #define LIST_FOR_EACH_ENTRY_SAFE(pos, storage, head, member) \ - for (pos = container_of((head)->next, pos, member), \ + for (pos = NULL, pos = container_of((head)->next, pos, member), \ storage = container_of(pos->member.next, pos, member); \ &pos->member != (head); \ pos = storage, storage = container_of(storage->member.next, storage, member)) #define LIST_FOR_EACH_ENTRY_SAFE_REV(pos, storage, head, member) \ - for (pos = container_of((head)->prev, pos, member), \ + for (pos = NULL, pos = container_of((head)->prev, pos, member), \ storage = container_of(pos->member.prev, pos, member); \ &pos->member != (head); \ pos = storage, storage = container_of(storage->member.prev, storage, member)) #define LIST_FOR_EACH_ENTRY_FROM(pos, start, head, member) \ - for (pos = container_of((start), pos, member); \ + for (pos = NULL, pos = container_of((start), pos, member); \ &pos->member != (head); \ pos = container_of(pos->member.next, pos, member)) #define LIST_FOR_EACH_ENTRY_FROM_REV(pos, start, head, member) \ - for (pos = container_of((start), pos, member); \ + for (pos = NULL, pos = container_of((start), pos, member); \ &pos->member != (head); \ pos = container_of(pos->member.prev, pos, member)) diff -Nru mesa-8.0.2/src/gallium/auxiliary/util/u_linkage.h mesa-8.0.3/src/gallium/auxiliary/util/u_linkage.h --- mesa-8.0.2/src/gallium/auxiliary/util/u_linkage.h 2011-07-05 04:34:17.000000000 +0000 +++ mesa-8.0.3/src/gallium/auxiliary/util/u_linkage.h 2012-05-18 04:27:14.000000000 +0000 @@ -49,15 +49,16 @@ * * num_slots is the size of the layout array and hardware limit instead. * - * efficient_slots == 0 or efficient_solts == num_slots are typical settings. + * efficient_slots == 0 or efficient_slots == num_slots are typical settings. */ void util_semantic_layout_from_set(unsigned char *layout, const struct util_semantic_set *set, unsigned efficient_slots, unsigned num_slots); static INLINE void -util_semantic_table_from_layout(unsigned char *table, unsigned char *layout, unsigned char first_slot_value, unsigned char num_slots) +util_semantic_table_from_layout(unsigned char *table, size_t table_size, unsigned char *layout, + unsigned char first_slot_value, unsigned char num_slots) { - int i; - memset(table, 0xff, sizeof(table)); + unsigned char i; + memset(table, 0xff, table_size); for(i = 0; i < num_slots; ++i) table[layout[i]] = first_slot_value + i; diff -Nru mesa-8.0.2/src/gallium/drivers/llvmpipe/lp_rast.c mesa-8.0.3/src/gallium/drivers/llvmpipe/lp_rast.c --- mesa-8.0.2/src/gallium/drivers/llvmpipe/lp_rast.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/llvmpipe/lp_rast.c 2012-05-18 04:27:14.000000000 +0000 @@ -792,7 +792,7 @@ * 2. do work * 3. signal that we're done */ -static PIPE_THREAD_ROUTINE( thread_func, init_data ) +static PIPE_THREAD_ROUTINE( thread_function, init_data ) { struct lp_rasterizer_task *task = (struct lp_rasterizer_task *) init_data; struct lp_rasterizer *rast = task->rast; @@ -860,7 +860,7 @@ for (i = 0; i < rast->num_threads; i++) { pipe_semaphore_init(&rast->tasks[i].work_ready, 0); pipe_semaphore_init(&rast->tasks[i].work_done, 0); - rast->threads[i] = pipe_thread_create(thread_func, + rast->threads[i] = pipe_thread_create(thread_function, (void *) &rast->tasks[i]); } } diff -Nru mesa-8.0.2/src/gallium/drivers/nvfx/nvfx_fragprog.c mesa-8.0.3/src/gallium/drivers/nvfx/nvfx_fragprog.c --- mesa-8.0.2/src/gallium/drivers/nvfx/nvfx_fragprog.c 2011-01-19 17:54:11.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/nvfx/nvfx_fragprog.c 2012-05-18 04:27:14.000000000 +0000 @@ -977,7 +977,8 @@ if(fpc->fp->num_slots > num_texcoords) return FALSE; util_semantic_layout_from_set(fpc->fp->slot_to_generic, &set, 0, num_texcoords); - util_semantic_table_from_layout(fpc->generic_to_slot, fpc->fp->slot_to_generic, 0, num_texcoords); + util_semantic_table_from_layout(fpc->generic_to_slot, sizeof fpc->generic_to_slot, + fpc->fp->slot_to_generic, 0, num_texcoords); memset(fpc->fp->slot_to_fp_input, 0xff, sizeof(fpc->fp->slot_to_fp_input)); diff -Nru mesa-8.0.2/src/gallium/drivers/r300/compiler/radeon_program_alu.c mesa-8.0.3/src/gallium/drivers/r300/compiler/radeon_program_alu.c --- mesa-8.0.2/src/gallium/drivers/r300/compiler/radeon_program_alu.c 2012-03-20 14:13:55.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/compiler/radeon_program_alu.c 2012-05-18 04:27:14.000000000 +0000 @@ -41,13 +41,16 @@ static struct rc_instruction *emit1( struct radeon_compiler * c, struct rc_instruction * after, - rc_opcode Opcode, rc_saturate_mode Saturate, struct rc_dst_register DstReg, - struct rc_src_register SrcReg) + rc_opcode Opcode, struct rc_sub_instruction * base, + struct rc_dst_register DstReg, struct rc_src_register SrcReg) { struct rc_instruction *fpi = rc_insert_new_instruction(c, after); + if (base) { + memcpy(&fpi->U.I, base, sizeof(struct rc_sub_instruction)); + } + fpi->U.I.Opcode = Opcode; - fpi->U.I.SaturateMode = Saturate; fpi->U.I.DstReg = DstReg; fpi->U.I.SrcReg[0] = SrcReg; return fpi; @@ -55,13 +58,17 @@ static struct rc_instruction *emit2( struct radeon_compiler * c, struct rc_instruction * after, - rc_opcode Opcode, rc_saturate_mode Saturate, struct rc_dst_register DstReg, + rc_opcode Opcode, struct rc_sub_instruction * base, + struct rc_dst_register DstReg, struct rc_src_register SrcReg0, struct rc_src_register SrcReg1) { struct rc_instruction *fpi = rc_insert_new_instruction(c, after); + if (base) { + memcpy(&fpi->U.I, base, sizeof(struct rc_sub_instruction)); + } + fpi->U.I.Opcode = Opcode; - fpi->U.I.SaturateMode = Saturate; fpi->U.I.DstReg = DstReg; fpi->U.I.SrcReg[0] = SrcReg0; fpi->U.I.SrcReg[1] = SrcReg1; @@ -70,14 +77,18 @@ static struct rc_instruction *emit3( struct radeon_compiler * c, struct rc_instruction * after, - rc_opcode Opcode, rc_saturate_mode Saturate, struct rc_dst_register DstReg, + rc_opcode Opcode, struct rc_sub_instruction * base, + struct rc_dst_register DstReg, struct rc_src_register SrcReg0, struct rc_src_register SrcReg1, struct rc_src_register SrcReg2) { struct rc_instruction *fpi = rc_insert_new_instruction(c, after); + if (base) { + memcpy(&fpi->U.I, base, sizeof(struct rc_sub_instruction)); + } + fpi->U.I.Opcode = Opcode; - fpi->U.I.SaturateMode = Saturate; fpi->U.I.DstReg = DstReg; fpi->U.I.SrcReg[0] = SrcReg0; fpi->U.I.SrcReg[1] = SrcReg1; @@ -221,7 +232,7 @@ struct rc_src_register src = inst->U.I.SrcReg[0]; src.Abs = 1; src.Negate = RC_MASK_NONE; - emit1(c, inst->Prev, RC_OPCODE_MOV, inst->U.I.SaturateMode, inst->U.I.DstReg, src); + emit1(c, inst->Prev, RC_OPCODE_MOV, &inst->U.I, inst->U.I.DstReg, src); rc_remove_instruction(inst); } @@ -240,7 +251,7 @@ struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dst, negate(inst->U.I.SrcReg[0])); - emit2(c, inst->Prev, RC_OPCODE_ADD, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit2(c, inst->Prev, RC_OPCODE_ADD, &inst->U.I, inst->U.I.DstReg, inst->U.I.SrcReg[0], srcreg(RC_FILE_TEMPORARY, dst.Index)); rc_remove_instruction(inst); } @@ -256,7 +267,7 @@ struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit2(c, inst->Prev, RC_OPCODE_MIN, 0, dst, inst->U.I.SrcReg[0], inst->U.I.SrcReg[2]); - emit2(c, inst->Prev, RC_OPCODE_MAX, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit2(c, inst->Prev, RC_OPCODE_MAX, &inst->U.I, inst->U.I.DstReg, srcreg(RC_FILE_TEMPORARY, dst.Index), inst->U.I.SrcReg[1]); rc_remove_instruction(inst); } @@ -272,7 +283,7 @@ src1.Negate &= ~(RC_MASK_Z | RC_MASK_W); src1.Swizzle &= ~(63 << (3 * 2)); src1.Swizzle |= (RC_SWIZZLE_ZERO << (3 * 2)) | (RC_SWIZZLE_ZERO << (3 * 3)); - emit2(c, inst->Prev, RC_OPCODE_DP3, inst->U.I.SaturateMode, inst->U.I.DstReg, src0, src1); + emit2(c, inst->Prev, RC_OPCODE_DP3, &inst->U.I, inst->U.I.DstReg, src0, src1); rc_remove_instruction(inst); } @@ -283,7 +294,7 @@ src0.Negate &= ~RC_MASK_W; src0.Swizzle &= ~(7 << (3 * 3)); src0.Swizzle |= RC_SWIZZLE_ONE << (3 * 3); - emit2(c, inst->Prev, RC_OPCODE_DP4, inst->U.I.SaturateMode, inst->U.I.DstReg, src0, inst->U.I.SrcReg[1]); + emit2(c, inst->Prev, RC_OPCODE_DP4, &inst->U.I, inst->U.I.DstReg, src0, inst->U.I.SrcReg[1]); rc_remove_instruction(inst); } @@ -294,7 +305,7 @@ static void transform_DST(struct radeon_compiler* c, struct rc_instruction* inst) { - emit2(c, inst->Prev, RC_OPCODE_MUL, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit2(c, inst->Prev, RC_OPCODE_MUL, &inst->U.I, inst->U.I.DstReg, swizzle(inst->U.I.SrcReg[0], RC_SWIZZLE_ONE, RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_ONE), swizzle(inst->U.I.SrcReg[1], RC_SWIZZLE_ONE, RC_SWIZZLE_Y, RC_SWIZZLE_ONE, RC_SWIZZLE_W)); rc_remove_instruction(inst); @@ -305,7 +316,7 @@ { struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit1(c, inst->Prev, RC_OPCODE_FRC, 0, dst, inst->U.I.SrcReg[0]); - emit2(c, inst->Prev, RC_OPCODE_ADD, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit2(c, inst->Prev, RC_OPCODE_ADD, &inst->U.I, inst->U.I.DstReg, inst->U.I.SrcReg[0], negate(srcreg(RC_FILE_TEMPORARY, dst.Index))); rc_remove_instruction(inst); } @@ -379,14 +390,14 @@ swizzle_wwww(srctemp)); /* tmp.z = (tmp.x > 0) ? tmp.w : 0.0 */ - emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode, + emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, dstregtmpmask(temp, RC_MASK_Z), negate(swizzle_xxxx(srctemp)), swizzle_wwww(srctemp), builtin_zero); /* tmp.x, tmp.y, tmp.w = 1.0, tmp.x, 1.0 */ - emit1(c, inst->Prev, RC_OPCODE_MOV, inst->U.I.SaturateMode, + emit1(c, inst->Prev, RC_OPCODE_MOV, &inst->U.I, dstregtmpmask(temp, RC_MASK_XYW), swizzle(srctemp, RC_SWIZZLE_ONE, RC_SWIZZLE_X, RC_SWIZZLE_ONE, RC_SWIZZLE_ONE)); @@ -401,7 +412,7 @@ emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[1], negate(inst->U.I.SrcReg[2])); - emit3(c, inst->Prev, RC_OPCODE_MAD, inst->U.I.SaturateMode, + emit3(c, inst->Prev, RC_OPCODE_MAD, &inst->U.I, inst->U.I.DstReg, inst->U.I.SrcReg[0], srcreg(RC_FILE_TEMPORARY, dst.Index), inst->U.I.SrcReg[2]); @@ -418,7 +429,7 @@ emit1(c, inst->Prev, RC_OPCODE_LG2, 0, tempdst, swizzle_xxxx(inst->U.I.SrcReg[0])); emit2(c, inst->Prev, RC_OPCODE_MUL, 0, tempdst, tempsrc, swizzle_xxxx(inst->U.I.SrcReg[1])); - emit1(c, inst->Prev, RC_OPCODE_EX2, inst->U.I.SaturateMode, inst->U.I.DstReg, tempsrc); + emit1(c, inst->Prev, RC_OPCODE_EX2, &inst->U.I, inst->U.I.DstReg, tempsrc); rc_remove_instruction(inst); } @@ -472,7 +483,7 @@ struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1])); - emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg, negate(absolute(srcreg(RC_FILE_TEMPORARY, dst.Index))), builtin_zero, builtin_one); rc_remove_instruction(inst); @@ -481,7 +492,7 @@ static void transform_SFL(struct radeon_compiler* c, struct rc_instruction* inst) { - emit1(c, inst->Prev, RC_OPCODE_MOV, inst->U.I.SaturateMode, inst->U.I.DstReg, builtin_zero); + emit1(c, inst->Prev, RC_OPCODE_MOV, &inst->U.I, inst->U.I.DstReg, builtin_zero); rc_remove_instruction(inst); } @@ -491,7 +502,7 @@ struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1])); - emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg, srcreg(RC_FILE_TEMPORARY, dst.Index), builtin_zero, builtin_one); rc_remove_instruction(inst); @@ -503,7 +514,7 @@ struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, negate(inst->U.I.SrcReg[0]), inst->U.I.SrcReg[1]); - emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg, srcreg(RC_FILE_TEMPORARY, dst.Index), builtin_one, builtin_zero); rc_remove_instruction(inst); @@ -515,7 +526,7 @@ struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, negate(inst->U.I.SrcReg[0]), inst->U.I.SrcReg[1]); - emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg, srcreg(RC_FILE_TEMPORARY, dst.Index), builtin_zero, builtin_one); rc_remove_instruction(inst); @@ -527,7 +538,7 @@ struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1])); - emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg, srcreg(RC_FILE_TEMPORARY, dst.Index), builtin_one, builtin_zero); rc_remove_instruction(inst); @@ -539,7 +550,7 @@ struct rc_dst_register dst = try_to_reuse_dst(c, inst); emit2(c, inst->Prev, RC_OPCODE_ADD, 0, dst, inst->U.I.SrcReg[0], negate(inst->U.I.SrcReg[1])); - emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit3(c, inst->Prev, RC_OPCODE_CMP, &inst->U.I, inst->U.I.DstReg, negate(absolute(srcreg(RC_FILE_TEMPORARY, dst.Index))), builtin_one, builtin_zero); rc_remove_instruction(inst); @@ -604,7 +615,7 @@ emit2(c, inst->Prev, RC_OPCODE_MUL, 0, dst, swizzle(inst->U.I.SrcReg[0], RC_SWIZZLE_Z, RC_SWIZZLE_X, RC_SWIZZLE_Y, RC_SWIZZLE_W), swizzle(inst->U.I.SrcReg[1], RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_X, RC_SWIZZLE_W)); - emit3(c, inst->Prev, RC_OPCODE_MAD, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit3(c, inst->Prev, RC_OPCODE_MAD, &inst->U.I, inst->U.I.DstReg, swizzle(inst->U.I.SrcReg[0], RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_X, RC_SWIZZLE_W), swizzle(inst->U.I.SrcReg[1], RC_SWIZZLE_Z, RC_SWIZZLE_X, RC_SWIZZLE_Y, RC_SWIZZLE_W), negate(srcreg(RC_FILE_TEMPORARY, dst.Index))); @@ -719,7 +730,7 @@ src1.Negate &= ~RC_MASK_W; src1.Swizzle &= ~(7 << (3 * 3)); src1.Swizzle |= RC_SWIZZLE_ZERO << (3 * 3); - emit2(c, inst->Prev, RC_OPCODE_DP4, inst->U.I.SaturateMode, inst->U.I.DstReg, src0, src1); + emit2(c, inst->Prev, RC_OPCODE_DP4, &inst->U.I, inst->U.I.DstReg, src0, src1); rc_remove_instruction(inst); } @@ -1043,22 +1054,22 @@ unsigned srctmp) { if (inst->U.I.Opcode == RC_OPCODE_COS) { - emit1(c, inst->Prev, RC_OPCODE_COS, inst->U.I.SaturateMode, inst->U.I.DstReg, + emit1(c, inst->Prev, RC_OPCODE_COS, &inst->U.I, inst->U.I.DstReg, srcregswz(RC_FILE_TEMPORARY, srctmp, RC_SWIZZLE_WWWW)); } else if (inst->U.I.Opcode == RC_OPCODE_SIN) { - emit1(c, inst->Prev, RC_OPCODE_SIN, inst->U.I.SaturateMode, + emit1(c, inst->Prev, RC_OPCODE_SIN, &inst->U.I, inst->U.I.DstReg, srcregswz(RC_FILE_TEMPORARY, srctmp, RC_SWIZZLE_WWWW)); } else if (inst->U.I.Opcode == RC_OPCODE_SCS) { struct rc_dst_register moddst = inst->U.I.DstReg; if (inst->U.I.DstReg.WriteMask & RC_MASK_X) { moddst.WriteMask = RC_MASK_X; - emit1(c, inst->Prev, RC_OPCODE_COS, inst->U.I.SaturateMode, moddst, + emit1(c, inst->Prev, RC_OPCODE_COS, &inst->U.I, moddst, srcregswz(RC_FILE_TEMPORARY, srctmp, RC_SWIZZLE_WWWW)); } if (inst->U.I.DstReg.WriteMask & RC_MASK_Y) { moddst.WriteMask = RC_MASK_Y; - emit1(c, inst->Prev, RC_OPCODE_SIN, inst->U.I.SaturateMode, moddst, + emit1(c, inst->Prev, RC_OPCODE_SIN, &inst->U.I, moddst, srcregswz(RC_FILE_TEMPORARY, srctmp, RC_SWIZZLE_WWWW)); } } diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_blit.c mesa-8.0.3/src/gallium/drivers/r300/r300_blit.c --- mesa-8.0.2/src/gallium/drivers/r300/r300_blit.c 2012-03-20 11:56:52.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_blit.c 2012-05-18 04:27:14.000000000 +0000 @@ -63,8 +63,13 @@ util_blitter_save_vertex_shader(r300->blitter, r300->vs_state.state); util_blitter_save_viewport(r300->blitter, &r300->viewport); util_blitter_save_vertex_elements(r300->blitter, r300->velems); - util_blitter_save_vertex_buffers(r300->blitter, r300->vbuf_mgr->nr_vertex_buffers, - r300->vbuf_mgr->vertex_buffer); + if (r300->vbuf_mgr) { + util_blitter_save_vertex_buffers(r300->blitter, r300->vbuf_mgr->nr_vertex_buffers, + r300->vbuf_mgr->vertex_buffer); + } else { + util_blitter_save_vertex_buffers(r300->blitter, r300->swtcl_nr_vertex_buffers, + r300->swtcl_vertex_buffer); + } if (op & R300_SAVE_FRAMEBUFFER) { util_blitter_save_framebuffer(r300->blitter, r300->fb_state.state); diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_context.c mesa-8.0.3/src/gallium/drivers/r300/r300_context.c --- mesa-8.0.2/src/gallium/drivers/r300/r300_context.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_context.c 2012-05-18 04:27:14.000000000 +0000 @@ -419,17 +419,19 @@ r300_init_query_functions(r300); r300_init_state_functions(r300); r300_init_resource_functions(r300); - + r300->context.create_video_decoder = vl_create_decoder; r300->context.create_video_buffer = vl_video_buffer_create; - r300->vbuf_mgr = u_vbuf_create(&r300->context, 1024 * 1024, 16, + if (r300->screen->caps.has_tcl) { + r300->vbuf_mgr = u_vbuf_create(&r300->context, 1024 * 1024, 16, PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER, U_VERTEX_FETCH_DWORD_ALIGNED); - if (!r300->vbuf_mgr) - goto fail; - r300->vbuf_mgr->caps.format_fixed32 = 0; + if (!r300->vbuf_mgr) + goto fail; + r300->vbuf_mgr->caps.format_fixed32 = 0; + } r300->blitter = util_blitter_create(&r300->context); if (r300->blitter == NULL) diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_context.h mesa-8.0.3/src/gallium/drivers/r300/r300_context.h --- mesa-8.0.2/src/gallium/drivers/r300/r300_context.h 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_context.h 2012-05-18 04:27:14.000000000 +0000 @@ -581,6 +581,9 @@ void *dsa_decompress_zmask; struct u_vbuf *vbuf_mgr; + struct pipe_index_buffer swtcl_index_buffer; + struct pipe_vertex_buffer swtcl_vertex_buffer[PIPE_MAX_ATTRIBS]; + unsigned swtcl_nr_vertex_buffers; struct util_slab_mempool pool_transfers; diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_emit.c mesa-8.0.3/src/gallium/drivers/r300/r300_emit.c --- mesa-8.0.2/src/gallium/drivers/r300/r300_emit.c 2012-03-20 11:56:52.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_emit.c 2012-05-18 04:27:14.000000000 +0000 @@ -1030,20 +1030,18 @@ R300_PVS_VF_MAX_VTX_NUM(12) | (r300screen->caps.is_r500 ? R500_TCL_STATE_OPTIMIZATION : 0)); - /* Emit flow control instructions. */ - if (code->num_fc_ops) { - - OUT_CS_REG(R300_VAP_PVS_FLOW_CNTL_OPC, code->fc_ops); - if (r300screen->caps.is_r500) { - OUT_CS_REG_SEQ(R500_VAP_PVS_FLOW_CNTL_ADDRS_LW_0, code->num_fc_ops * 2); - OUT_CS_TABLE(code->fc_op_addrs.r500, code->num_fc_ops * 2); - } else { - OUT_CS_REG_SEQ(R300_VAP_PVS_FLOW_CNTL_ADDRS_0, code->num_fc_ops); - OUT_CS_TABLE(code->fc_op_addrs.r300, code->num_fc_ops); - } - OUT_CS_REG_SEQ(R300_VAP_PVS_FLOW_CNTL_LOOP_INDEX_0, code->num_fc_ops); - OUT_CS_TABLE(code->fc_loop_index, code->num_fc_ops); + /* Emit flow control instructions. Even if there are no fc instructions, + * we still need to write the registers to make sure they are cleared. */ + OUT_CS_REG(R300_VAP_PVS_FLOW_CNTL_OPC, code->fc_ops); + if (r300screen->caps.is_r500) { + OUT_CS_REG_SEQ(R500_VAP_PVS_FLOW_CNTL_ADDRS_LW_0, R300_VS_MAX_FC_OPS * 2); + OUT_CS_TABLE(code->fc_op_addrs.r500, R300_VS_MAX_FC_OPS * 2); + } else { + OUT_CS_REG_SEQ(R300_VAP_PVS_FLOW_CNTL_ADDRS_0, R300_VS_MAX_FC_OPS); + OUT_CS_TABLE(code->fc_op_addrs.r300, R300_VS_MAX_FC_OPS); } + OUT_CS_REG_SEQ(R300_VAP_PVS_FLOW_CNTL_LOOP_INDEX_0, R300_VS_MAX_FC_OPS); + OUT_CS_TABLE(code->fc_loop_index, R300_VS_MAX_FC_OPS); END_CS; } diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_render.c mesa-8.0.3/src/gallium/drivers/r300/r300_render.c --- mesa-8.0.2/src/gallium/drivers/r300/r300_render.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_render.c 2012-05-18 04:27:14.000000000 +0000 @@ -818,7 +818,7 @@ struct pipe_transfer *ib_transfer = NULL; int i; void *indices = NULL; - boolean indexed = info->indexed && r300->vbuf_mgr->index_buffer.buffer; + boolean indexed = info->indexed && r300->swtcl_index_buffer.buffer; if (r300->skip_rendering) { return; @@ -831,10 +831,10 @@ (indexed ? PREP_INDEXED : 0), indexed ? 256 : 6); - for (i = 0; i < r300->vbuf_mgr->nr_vertex_buffers; i++) { - if (r300->vbuf_mgr->vertex_buffer[i].buffer) { + for (i = 0; i < r300->swtcl_nr_vertex_buffers; i++) { + if (r300->swtcl_vertex_buffer[i].buffer) { void *buf = pipe_buffer_map(pipe, - r300->vbuf_mgr->vertex_buffer[i].buffer, + r300->swtcl_vertex_buffer[i].buffer, PIPE_TRANSFER_READ | PIPE_TRANSFER_UNSYNCHRONIZED, &vb_transfer[i]); @@ -843,7 +843,7 @@ } if (indexed) { - indices = pipe_buffer_map(pipe, r300->vbuf_mgr->index_buffer.buffer, + indices = pipe_buffer_map(pipe, r300->swtcl_index_buffer.buffer, PIPE_TRANSFER_READ | PIPE_TRANSFER_UNSYNCHRONIZED, &ib_transfer); } @@ -856,8 +856,8 @@ draw_flush(r300->draw); r300->draw_vbo_locked = FALSE; - for (i = 0; i < r300->vbuf_mgr->nr_vertex_buffers; i++) { - if (r300->vbuf_mgr->vertex_buffer[i].buffer) { + for (i = 0; i < r300->swtcl_nr_vertex_buffers; i++) { + if (r300->swtcl_vertex_buffer[i].buffer) { pipe_buffer_unmap(pipe, vb_transfer[i]); draw_set_mapped_vertex_buffer(r300->draw, i, NULL); } diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_screen.c mesa-8.0.3/src/gallium/drivers/r300/r300_screen.c --- mesa-8.0.2/src/gallium/drivers/r300/r300_screen.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_screen.c 2012-05-18 04:27:14.000000000 +0000 @@ -212,6 +212,7 @@ switch (param) { case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: + case PIPE_SHADER_CAP_SUBROUTINES: return 0; default:; } diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_state.c mesa-8.0.3/src/gallium/drivers/r300/r300_state.c --- mesa-8.0.2/src/gallium/drivers/r300/r300_state.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_state.c 2012-05-18 04:27:14.000000000 +0000 @@ -1048,6 +1048,10 @@ /* Override some states for Draw. */ rs->rs_draw.sprite_coord_enable = 0; /* We can do this in HW. */ + rs->rs_draw.offset_point = 0; + rs->rs_draw.offset_line = 0; + rs->rs_draw.offset_tri = 0; + rs->rs_draw.offset_clamp = 0; #ifdef PIPE_ARCH_LITTLE_ENDIAN vap_control_status = R300_VC_NO_SWAP; @@ -1595,7 +1599,6 @@ const struct pipe_vertex_buffer* buffers) { struct r300_context* r300 = r300_context(pipe); - unsigned i; struct pipe_vertex_buffer dummy_vb = {0}; /* There must be at least one vertex buffer set, otherwise it locks up. */ @@ -1605,18 +1608,13 @@ count = 1; } - u_vbuf_set_vertex_buffers(r300->vbuf_mgr, count, buffers); - if (r300->screen->caps.has_tcl) { - /* HW TCL. */ - for (i = 0; i < count; i++) { - if (buffers[i].buffer && - !r300_resource(buffers[i].buffer)->b.user_ptr) { - } - } + u_vbuf_set_vertex_buffers(r300->vbuf_mgr, count, buffers); r300->vertex_arrays_dirty = TRUE; } else { - /* SW TCL. */ + util_copy_vertex_buffers(r300->swtcl_vertex_buffer, + &r300->swtcl_nr_vertex_buffers, + buffers, count); draw_set_vertex_buffers(r300->draw, count, buffers); } } @@ -1626,9 +1624,15 @@ { struct r300_context* r300 = r300_context(pipe); - u_vbuf_set_index_buffer(r300->vbuf_mgr, ib); - - if (!r300->screen->caps.has_tcl) { + if (r300->screen->caps.has_tcl) { + u_vbuf_set_index_buffer(r300->vbuf_mgr, ib); + } else { + if (ib) { + pipe_resource_reference(&r300->swtcl_index_buffer.buffer, ib->buffer); + memcpy(&r300->swtcl_index_buffer, ib, sizeof(*ib)); + } else { + pipe_resource_reference(&r300->swtcl_index_buffer.buffer, NULL); + } draw_set_index_buffer(r300->draw, ib); } } @@ -1702,11 +1706,11 @@ return NULL; velems->count = count; - velems->vmgr_elements = - u_vbuf_create_vertex_elements(r300->vbuf_mgr, count, attribs, - velems->velem); if (r300_screen(pipe->screen)->caps.has_tcl) { + velems->vmgr_elements = + u_vbuf_create_vertex_elements(r300->vbuf_mgr, count, attribs, + velems->velem); /* Setup PSC. * The unused components will be replaced by (..., 0, 1). */ r300_vertex_psc(velems); @@ -1716,6 +1720,8 @@ align(util_format_get_blocksize(velems->velem[i].src_format), 4); velems->vertex_size_dwords += velems->format_size[i] / 4; } + } else { + memcpy(velems->velem, attribs, count * sizeof(struct pipe_vertex_element)); } return velems; @@ -1733,9 +1739,9 @@ r300->velems = velems; - u_vbuf_bind_vertex_elements(r300->vbuf_mgr, state, velems->vmgr_elements); - - if (r300->draw) { + if (r300->screen->caps.has_tcl) { + u_vbuf_bind_vertex_elements(r300->vbuf_mgr, state, velems->vmgr_elements); + } else { draw_set_vertex_elements(r300->draw, velems->count, velems->velem); return; } @@ -1750,7 +1756,9 @@ struct r300_context *r300 = r300_context(pipe); struct r300_vertex_element_state *velems = state; - u_vbuf_destroy_vertex_elements(r300->vbuf_mgr, velems->vmgr_elements); + if (r300->screen->caps.has_tcl) { + u_vbuf_destroy_vertex_elements(r300->vbuf_mgr, velems->vmgr_elements); + } FREE(state); } @@ -1765,10 +1773,10 @@ vs->state.tokens = tgsi_dup_tokens(shader->tokens); if (r300->screen->caps.has_tcl) { - r300_init_vs_outputs(vs); + r300_init_vs_outputs(r300, vs); r300_translate_vertex_shader(r300, vs); } else { - r300_draw_init_vertex_shader(r300->draw, vs); + r300_draw_init_vertex_shader(r300, vs); } return vs; @@ -1794,9 +1802,8 @@ if (r300->screen->caps.has_tcl) { unsigned fc_op_dwords = r300->screen->caps.is_r500 ? 3 : 2; r300_mark_atom_dirty(r300, &r300->vs_state); - r300->vs_state.size = - vs->code.length + 9 + - (vs->code.num_fc_ops ? vs->code.num_fc_ops * fc_op_dwords + 4 : 0); + r300->vs_state.size = vs->code.length + 9 + + (R300_VS_MAX_FC_OPS * fc_op_dwords + 4); r300_mark_atom_dirty(r300, &r300->vs_constants); r300->vs_constants.size = diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_vs.c mesa-8.0.3/src/gallium/drivers/r300/r300_vs.c --- mesa-8.0.2/src/gallium/drivers/r300/r300_vs.c 2012-03-20 11:56:52.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_vs.c 2012-05-18 04:27:14.000000000 +0000 @@ -36,6 +36,7 @@ /* Convert info about VS output semantics into r300_shader_semantics. */ static void r300_shader_read_vs_outputs( + struct r300_context *r300, struct tgsi_shader_info* info, struct r300_shader_semantics* vs_outputs) { @@ -83,6 +84,14 @@ fprintf(stderr, "r300 VP: cannot handle edgeflag output.\n"); break; + case TGSI_SEMANTIC_CLIPVERTEX: + assert(index == 0); + /* Draw does clip vertex for us. */ + if (r300->screen->caps.has_tcl) { + fprintf(stderr, "r300 VP: cannot handle clip vertex output.\n"); + } + break; + default: fprintf(stderr, "r300 VP: unknown vertex output semantic: %i.\n", info->output_semantic_name[i]); @@ -160,10 +169,11 @@ c->code->outputs[outputs->wpos] = reg++; } -void r300_init_vs_outputs(struct r300_vertex_shader *vs) +void r300_init_vs_outputs(struct r300_context *r300, + struct r300_vertex_shader *vs) { tgsi_scan_shader(vs->state.tokens, &vs->info); - r300_shader_read_vs_outputs(&vs->info, &vs->outputs); + r300_shader_read_vs_outputs(r300, &vs->info, &vs->outputs); } static void r300_dummy_vertex_shader( @@ -187,7 +197,7 @@ ureg_destroy(ureg); shader->dummy = TRUE; - r300_init_vs_outputs(shader); + r300_init_vs_outputs(r300, shader); r300_translate_vertex_shader(r300, shader); } diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_vs_draw.c mesa-8.0.3/src/gallium/drivers/r300/r300_vs_draw.c --- mesa-8.0.2/src/gallium/drivers/r300/r300_vs_draw.c 2010-07-13 18:17:47.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_vs_draw.c 2012-05-18 04:27:14.000000000 +0000 @@ -29,7 +29,7 @@ * * Transformations: * 1) If the secondary color output is present, the primary color must be - * inserted before it. + * present too. * 2) If any back-face color output is present, there must be all 4 color * outputs and missing ones must be inserted. * 3) Insert a trailing texcoord output containing a copy of POS, for WPOS. @@ -52,7 +52,6 @@ boolean color_used[2]; boolean bcolor_used[2]; - boolean temp_used[128]; /* Index of the pos output, typically 0. */ unsigned pos_output; @@ -72,6 +71,8 @@ boolean first_instruction; /* End instruction processed? */ boolean end_instruction; + + boolean temp_used[1024]; }; static void emit_temp(struct tgsi_transform_context *ctx, unsigned reg) @@ -102,9 +103,9 @@ ++vsctx->num_outputs; } -static void insert_output(struct tgsi_transform_context *ctx, - struct tgsi_full_declaration *before, - unsigned name, unsigned index, unsigned interp) +static void insert_output_before(struct tgsi_transform_context *ctx, + struct tgsi_full_declaration *before, + unsigned name, unsigned index, unsigned interp) { struct vs_transform_context *vsctx = (struct vs_transform_context *)ctx; unsigned i; @@ -115,28 +116,29 @@ } /* Insert the new output. */ - emit_output(ctx, name, index, interp, before->Range.First); + emit_output(ctx, name, index, interp, + before->Range.First + vsctx->decl_shift); ++vsctx->decl_shift; } -static void insert_trailing_bcolor(struct tgsi_transform_context *ctx, - struct tgsi_full_declaration *before) +static void insert_output_after(struct tgsi_transform_context *ctx, + struct tgsi_full_declaration *after, + unsigned name, unsigned index, unsigned interp) { struct vs_transform_context *vsctx = (struct vs_transform_context *)ctx; + unsigned i; - /* If BCOLOR0 is used, make sure BCOLOR1 is present too. Otherwise - * the rasterizer doesn't do the color selection correctly. */ - if (vsctx->bcolor_used[0] && !vsctx->bcolor_used[1]) { - if (before) { - insert_output(ctx, before, TGSI_SEMANTIC_BCOLOR, 1, - TGSI_INTERPOLATE_LINEAR); - } else { - emit_output(ctx, TGSI_SEMANTIC_BCOLOR, 1, - TGSI_INTERPOLATE_LINEAR, vsctx->num_outputs); - } - vsctx->bcolor_used[1] = TRUE; + /* Make a place for the new output. */ + for (i = after->Range.First+1; i < Elements(vsctx->out_remap); i++) { + ++vsctx->out_remap[i]; } + + /* Insert the new output. */ + emit_output(ctx, name, index, interp, + after->Range.First + 1); + + ++vsctx->decl_shift; } static void transform_decl(struct tgsi_transform_context *ctx, @@ -153,41 +155,38 @@ case TGSI_SEMANTIC_COLOR: assert(decl->Semantic.Index < 2); - vsctx->color_used[decl->Semantic.Index] = TRUE; /* We must rasterize the first color if the second one is * used, otherwise the rasterizer doesn't do the color * selection correctly. Declare it, but don't write to it. */ if (decl->Semantic.Index == 1 && !vsctx->color_used[0]) { - insert_output(ctx, decl, TGSI_SEMANTIC_COLOR, 0, - TGSI_INTERPOLATE_LINEAR); + insert_output_before(ctx, decl, TGSI_SEMANTIC_COLOR, 0, + TGSI_INTERPOLATE_LINEAR); vsctx->color_used[0] = TRUE; } break; case TGSI_SEMANTIC_BCOLOR: assert(decl->Semantic.Index < 2); - vsctx->bcolor_used[decl->Semantic.Index] = TRUE; /* We must rasterize all 4 colors if back-face colors are * used, otherwise the rasterizer doesn't do the color * selection correctly. Declare it, but don't write to it. */ if (!vsctx->color_used[0]) { - insert_output(ctx, decl, TGSI_SEMANTIC_COLOR, 0, - TGSI_INTERPOLATE_LINEAR); + insert_output_before(ctx, decl, TGSI_SEMANTIC_COLOR, 0, + TGSI_INTERPOLATE_LINEAR); vsctx->color_used[0] = TRUE; } if (!vsctx->color_used[1]) { - insert_output(ctx, decl, TGSI_SEMANTIC_COLOR, 1, - TGSI_INTERPOLATE_LINEAR); + insert_output_before(ctx, decl, TGSI_SEMANTIC_COLOR, 1, + TGSI_INTERPOLATE_LINEAR); vsctx->color_used[1] = TRUE; } if (decl->Semantic.Index == 1 && !vsctx->bcolor_used[0]) { - insert_output(ctx, decl, TGSI_SEMANTIC_BCOLOR, 0, - TGSI_INTERPOLATE_LINEAR); + insert_output_before(ctx, decl, TGSI_SEMANTIC_BCOLOR, 0, + TGSI_INTERPOLATE_LINEAR); vsctx->bcolor_used[0] = TRUE; } - /* One more case is handled in insert_trailing_bcolor. */ break; case TGSI_SEMANTIC_GENERIC: @@ -195,11 +194,6 @@ break; } - if (decl->Semantic.Name != TGSI_SEMANTIC_BCOLOR) { - /* Insert it as soon as possible. */ - insert_trailing_bcolor(ctx, decl); - } - /* Since we're inserting new outputs in between, the following outputs * should be moved to the right so that they don't overlap with * the newly added ones. */ @@ -214,6 +208,14 @@ } ctx->emit_declaration(ctx, decl); + + /* Insert BCOLOR1 if needed. */ + if (decl->Declaration.File == TGSI_FILE_OUTPUT && + decl->Semantic.Name == TGSI_SEMANTIC_BCOLOR && + !vsctx->bcolor_used[1]) { + insert_output_after(ctx, decl, TGSI_SEMANTIC_BCOLOR, 1, + TGSI_INTERPOLATE_LINEAR); + } } static void transform_inst(struct tgsi_transform_context *ctx, @@ -226,10 +228,6 @@ if (!vsctx->first_instruction) { vsctx->first_instruction = TRUE; - /* The trailing BCOLOR should be inserted before the code - * if it hasn't already been done so. */ - insert_trailing_bcolor(ctx, NULL); - /* Insert the generic output for WPOS. */ emit_output(ctx, TGSI_SEMANTIC_GENERIC, vsctx->last_generic + 1, TGSI_INTERPOLATE_PERSPECTIVE, vsctx->num_outputs); @@ -309,14 +307,18 @@ ctx->emit_instruction(ctx, inst); } -void r300_draw_init_vertex_shader(struct draw_context *draw, +void r300_draw_init_vertex_shader(struct r300_context *r300, struct r300_vertex_shader *vs) { + struct draw_context *draw = r300->draw; struct pipe_shader_state new_vs; + struct tgsi_shader_info info; struct vs_transform_context transform; const uint newLen = tgsi_num_tokens(vs->state.tokens) + 100 /* XXX */; unsigned i; + tgsi_scan_shader(vs->state.tokens, &info); + new_vs.tokens = tgsi_alloc_tokens(newLen); if (new_vs.tokens == NULL) return; @@ -329,6 +331,22 @@ transform.base.transform_instruction = transform_inst; transform.base.transform_declaration = transform_decl; + for (i = 0; i < info.num_outputs; i++) { + unsigned index = info.output_semantic_index[i]; + + switch (info.output_semantic_name[i]) { + case TGSI_SEMANTIC_COLOR: + assert(index < 2); + transform.color_used[index] = TRUE; + break; + + case TGSI_SEMANTIC_BCOLOR: + assert(index < 2); + transform.bcolor_used[index] = TRUE; + break; + } + } + tgsi_transform_shader(vs->state.tokens, (struct tgsi_token*)new_vs.tokens, newLen, &transform.base); @@ -350,7 +368,7 @@ vs->state.tokens = new_vs.tokens; /* Init the VS output table for the rasterizer. */ - r300_init_vs_outputs(vs); + r300_init_vs_outputs(r300, vs); /* Make the last generic be WPOS. */ vs->outputs.wpos = vs->outputs.generic[transform.last_generic + 1]; diff -Nru mesa-8.0.2/src/gallium/drivers/r300/r300_vs.h mesa-8.0.3/src/gallium/drivers/r300/r300_vs.h --- mesa-8.0.2/src/gallium/drivers/r300/r300_vs.h 2011-08-26 19:33:15.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/r300/r300_vs.h 2012-05-18 04:27:14.000000000 +0000 @@ -56,12 +56,13 @@ void *draw_vs; }; -void r300_init_vs_outputs(struct r300_vertex_shader *vs); +void r300_init_vs_outputs(struct r300_context *r300, + struct r300_vertex_shader *vs); void r300_translate_vertex_shader(struct r300_context *r300, struct r300_vertex_shader *vs); -void r300_draw_init_vertex_shader(struct draw_context *draw, +void r300_draw_init_vertex_shader(struct r300_context *r300, struct r300_vertex_shader *vs); #endif /* R300_VS_H */ diff -Nru mesa-8.0.2/src/gallium/drivers/svga/include/svga_types.h mesa-8.0.3/src/gallium/drivers/svga/include/svga_types.h --- mesa-8.0.2/src/gallium/drivers/svga/include/svga_types.h 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/gallium/drivers/svga/include/svga_types.h 2012-05-18 04:27:14.000000000 +0000 @@ -28,6 +28,7 @@ #include "pipe/p_compiler.h" +#ifndef __HAIKU__ typedef int64_t int64; typedef uint64_t uint64; @@ -39,6 +40,9 @@ typedef int8_t int8; typedef uint8_t uint8; +#else +#include +#endif /* HAIKU */ typedef uint8_t Bool; diff -Nru mesa-8.0.2/src/gallium/state_trackers/dri/sw/drisw.c mesa-8.0.3/src/gallium/state_trackers/dri/sw/drisw.c --- mesa-8.0.2/src/gallium/state_trackers/dri/sw/drisw.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/gallium/state_trackers/dri/sw/drisw.c 2012-05-18 23:08:33.000000000 +0000 @@ -253,6 +253,7 @@ char *map; int x, y, w, h; int ximage_stride, line; + int cpp = util_format_get_blocksize(res->format); get_drawable_info(dPriv, &x, &y, &w, &h); @@ -265,9 +266,8 @@ /* Copy the Drawable content to the mapped texture buffer */ get_image(dPriv, x, y, w, h, map); - /* The pipe transfer has a pitch rounded up to the nearest 64 pixels. - We assume 32 bit pixels. */ - ximage_stride = w * 4; + /* The pipe transfer has a pitch rounded up to the nearest 64 pixels. */ + ximage_stride = w * cpp; for (line = h-1; line; --line) { memmove(&map[line * transfer->stride], &map[line * ximage_stride], diff -Nru mesa-8.0.2/src/gallium/state_trackers/vega/text.c mesa-8.0.3/src/gallium/state_trackers/vega/text.c --- mesa-8.0.2/src/gallium/state_trackers/vega/text.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/gallium/state_trackers/vega/text.c 2012-05-18 04:27:14.000000000 +0000 @@ -73,8 +73,8 @@ glyph = CALLOC_STRUCT(vg_glyph); glyph->object = obj; glyph->is_hinted = isHinted; - memcpy(glyph->glyph_origin, glyphOrigin, sizeof(glyphOrigin)); - memcpy(glyph->escapement, escapement, sizeof(escapement)); + memcpy(glyph->glyph_origin, glyphOrigin, sizeof(glyph->glyph_origin)); + memcpy(glyph->escapement, escapement, sizeof(glyph->glyph_origin)); cso_hash_insert(font->glyphs, (unsigned) glyphIndex, glyph); } diff -Nru mesa-8.0.2/src/gallium/targets/egl-static/egl_st.c mesa-8.0.3/src/gallium/targets/egl-static/egl_st.c --- mesa-8.0.2/src/gallium/targets/egl-static/egl_st.c 2011-07-05 04:34:17.000000000 +0000 +++ mesa-8.0.3/src/gallium/targets/egl-static/egl_st.c 2012-05-18 04:27:14.000000000 +0000 @@ -54,8 +54,9 @@ int ret; if (len) { + assert(len <= INT_MAX && "path is insanely long!"); ret = util_snprintf(path, sizeof(path), "%.*s/%s" UTIL_DL_EXT, - len, dir, name); + (int)len, dir, name); } else { ret = util_snprintf(path, sizeof(path), "%s" UTIL_DL_EXT, name); diff -Nru mesa-8.0.2/src/glsl/Android.mk mesa-8.0.3/src/glsl/Android.mk --- mesa-8.0.2/src/glsl/Android.mk 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/glsl/Android.mk 2012-05-18 04:27:14.000000000 +0000 @@ -39,6 +39,7 @@ $(LIBGLSL_CXX_SOURCES) LOCAL_C_INCLUDES := \ + external/astl/include \ $(MESA_TOP)/src/mapi \ $(MESA_TOP)/src/mesa diff -Nru mesa-8.0.2/src/glsl/ast_to_hir.cpp mesa-8.0.3/src/glsl/ast_to_hir.cpp --- mesa-8.0.2/src/glsl/ast_to_hir.cpp 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/glsl/ast_to_hir.cpp 2012-05-18 23:08:34.000000000 +0000 @@ -3516,11 +3516,9 @@ * * "The type of init-expression in a switch statement must be a * scalar integer." - * - * The checks are separated so that higher quality diagnostics can be - * generated for cases where the rule is violated. */ - if (!test_expression->type->is_integer()) { + if (!test_expression->type->is_scalar() || + !test_expression->type->is_integer()) { YYLTYPE loc = this->test_expression->get_location(); _mesa_glsl_error(& loc, @@ -3571,7 +3569,7 @@ /* Cache test expression. */ test_to_hir(instructions, state); - + /* Emit code for body of switch stmt. */ body->hir(instructions, state); @@ -3580,290 +3578,268 @@ state->switch_state = saved; - /* Switch statements do not have r-values. - */ - return NULL; - } - - - void - ast_switch_statement::test_to_hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) - { - void *ctx = state; - - /* Cache value of test expression. - */ - ir_rvalue *const test_val = - test_expression->hir(instructions, - state); - - state->switch_state.test_var = new(ctx) ir_variable(glsl_type::int_type, - "switch_test_tmp", - ir_var_temporary); - ir_dereference_variable *deref_test_var = - new(ctx) ir_dereference_variable(state->switch_state.test_var); - - instructions->push_tail(state->switch_state.test_var); - instructions->push_tail(new(ctx) ir_assignment(deref_test_var, - test_val, - NULL)); - } - - - ir_rvalue * - ast_switch_body::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) - { - if (stmts != NULL) - stmts->hir(instructions, state); - - /* Switch bodies do not have r-values. - */ - return NULL; - } - - - ir_rvalue * - ast_case_statement_list::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) - { - foreach_list_typed (ast_case_statement, case_stmt, link, & this->cases) - case_stmt->hir(instructions, state); - - /* Case statements do not have r-values. - */ - return NULL; - } + /* Switch statements do not have r-values. */ + return NULL; +} - ir_rvalue * - ast_case_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) - { - labels->hir(instructions, state); +void +ast_switch_statement::test_to_hir(exec_list *instructions, + struct _mesa_glsl_parse_state *state) +{ + void *ctx = state; + + /* Cache value of test expression. */ + ir_rvalue *const test_val = + test_expression->hir(instructions, + state); + + state->switch_state.test_var = new(ctx) ir_variable(test_val->type, + "switch_test_tmp", + ir_var_temporary); + ir_dereference_variable *deref_test_var = + new(ctx) ir_dereference_variable(state->switch_state.test_var); + + instructions->push_tail(state->switch_state.test_var); + instructions->push_tail(new(ctx) ir_assignment(deref_test_var, test_val, + NULL)); +} + + +ir_rvalue * +ast_switch_body::hir(exec_list *instructions, + struct _mesa_glsl_parse_state *state) +{ + if (stmts != NULL) + stmts->hir(instructions, state); + + /* Switch bodies do not have r-values. */ + return NULL; +} + +ir_rvalue * +ast_case_statement_list::hir(exec_list *instructions, + struct _mesa_glsl_parse_state *state) +{ + foreach_list_typed (ast_case_statement, case_stmt, link, & this->cases) + case_stmt->hir(instructions, state); + + /* Case statements do not have r-values. */ + return NULL; +} + +ir_rvalue * +ast_case_statement::hir(exec_list *instructions, + struct _mesa_glsl_parse_state *state) +{ + labels->hir(instructions, state); + + /* Conditionally set fallthru state based on break state. */ + ir_constant *const false_val = new(state) ir_constant(false); + ir_dereference_variable *const deref_is_fallthru_var = + new(state) ir_dereference_variable(state->switch_state.is_fallthru_var); + ir_dereference_variable *const deref_is_break_var = + new(state) ir_dereference_variable(state->switch_state.is_break_var); + ir_assignment *const reset_fallthru_on_break = + new(state) ir_assignment(deref_is_fallthru_var, + false_val, + deref_is_break_var); + instructions->push_tail(reset_fallthru_on_break); + + /* Guard case statements depending on fallthru state. */ + ir_dereference_variable *const deref_fallthru_guard = + new(state) ir_dereference_variable(state->switch_state.is_fallthru_var); + ir_if *const test_fallthru = new(state) ir_if(deref_fallthru_guard); + + foreach_list_typed (ast_node, stmt, link, & this->stmts) + stmt->hir(& test_fallthru->then_instructions, state); + + instructions->push_tail(test_fallthru); + + /* Case statements do not have r-values. */ + return NULL; +} + + +ir_rvalue * +ast_case_label_list::hir(exec_list *instructions, + struct _mesa_glsl_parse_state *state) +{ + foreach_list_typed (ast_case_label, label, link, & this->labels) + label->hir(instructions, state); + + /* Case labels do not have r-values. */ + return NULL; +} + +ir_rvalue * +ast_case_label::hir(exec_list *instructions, + struct _mesa_glsl_parse_state *state) +{ + void *ctx = state; + + ir_dereference_variable *deref_fallthru_var = + new(ctx) ir_dereference_variable(state->switch_state.is_fallthru_var); - /* Conditionally set fallthru state based on break state. - */ - ir_constant *const false_val = new(state) ir_constant(false); - ir_dereference_variable *const deref_is_fallthru_var = - new(state) ir_dereference_variable(state->switch_state.is_fallthru_var); - ir_dereference_variable *const deref_is_break_var = - new(state) ir_dereference_variable(state->switch_state.is_break_var); - ir_assignment *const reset_fallthru_on_break = - new(state) ir_assignment(deref_is_fallthru_var, - false_val, - deref_is_break_var); - instructions->push_tail(reset_fallthru_on_break); - - /* Guard case statements depending on fallthru state. - */ - ir_dereference_variable *const deref_fallthru_guard = - new(state) ir_dereference_variable(state->switch_state.is_fallthru_var); - ir_if *const test_fallthru = new(state) ir_if(deref_fallthru_guard); - - foreach_list_typed (ast_node, stmt, link, & this->stmts) - stmt->hir(& test_fallthru->then_instructions, state); - - instructions->push_tail(test_fallthru); - - /* Case statements do not have r-values. - */ - return NULL; - } - - - ir_rvalue * - ast_case_label_list::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) - { - foreach_list_typed (ast_case_label, label, link, & this->labels) - label->hir(instructions, state); - - /* Case labels do not have r-values. - */ - return NULL; - } - - - ir_rvalue * - ast_case_label::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) - { - void *ctx = state; - - ir_dereference_variable *deref_fallthru_var = - new(ctx) ir_dereference_variable(state->switch_state.is_fallthru_var); - - ir_rvalue *const true_val = new(ctx) ir_constant(true); - - /* If not default case, ... - */ - if (this->test_value != NULL) { - /* Conditionally set fallthru state based on - * comparison of cached test expression value to case label. - */ - ir_rvalue *const label_rval = this->test_value->hir(instructions, state); - ir_constant *label_const = label_rval->constant_expression_value(); - - if (!label_const) { - YYLTYPE loc = this->test_value->get_location(); - - _mesa_glsl_error(& loc, state, - "switch statement case label must be a " - "constant expression"); - - /* Stuff a dummy value in to allow processing to continue. */ - label_const = new(ctx) ir_constant(0); - } else { - ast_expression *previous_label = (ast_expression *) - hash_table_find(state->switch_state.labels_ht, + ir_rvalue *const true_val = new(ctx) ir_constant(true); + + /* If not default case, ... */ + if (this->test_value != NULL) { + /* Conditionally set fallthru state based on + * comparison of cached test expression value to case label. + */ + ir_rvalue *const label_rval = this->test_value->hir(instructions, state); + ir_constant *label_const = label_rval->constant_expression_value(); + + if (!label_const) { + YYLTYPE loc = this->test_value->get_location(); + + _mesa_glsl_error(& loc, state, + "switch statement case label must be a " + "constant expression"); + + /* Stuff a dummy value in to allow processing to continue. */ + label_const = new(ctx) ir_constant(0); + } else { + ast_expression *previous_label = (ast_expression *) + hash_table_find(state->switch_state.labels_ht, + (void *)(uintptr_t)label_const->value.u[0]); + + if (previous_label) { + YYLTYPE loc = this->test_value->get_location(); + _mesa_glsl_error(& loc, state, + "duplicate case value"); + + loc = previous_label->get_location(); + _mesa_glsl_error(& loc, state, + "this is the previous case label"); + } else { + hash_table_insert(state->switch_state.labels_ht, + this->test_value, (void *)(uintptr_t)label_const->value.u[0]); + } + } + + ir_dereference_variable *deref_test_var = + new(ctx) ir_dereference_variable(state->switch_state.test_var); + + ir_rvalue *const test_cond = new(ctx) ir_expression(ir_binop_all_equal, + label_const, + deref_test_var); + + ir_assignment *set_fallthru_on_test = + new(ctx) ir_assignment(deref_fallthru_var, + true_val, + test_cond); + + instructions->push_tail(set_fallthru_on_test); + } else { /* default case */ + if (state->switch_state.previous_default) { + printf("a\n"); + YYLTYPE loc = this->get_location(); + _mesa_glsl_error(& loc, state, + "multiple default labels in one switch"); + + printf("b\n"); + + loc = state->switch_state.previous_default->get_location(); + _mesa_glsl_error(& loc, state, + "this is the first default label"); + } + state->switch_state.previous_default = this; + + /* Set falltrhu state. */ + ir_assignment *set_fallthru = + new(ctx) ir_assignment(deref_fallthru_var, true_val, NULL); + + instructions->push_tail(set_fallthru); + } + + /* Case statements do not have r-values. */ + return NULL; +} + +void +ast_iteration_statement::condition_to_hir(ir_loop *stmt, + struct _mesa_glsl_parse_state *state) +{ + void *ctx = state; + + if (condition != NULL) { + ir_rvalue *const cond = + condition->hir(& stmt->body_instructions, state); + + if ((cond == NULL) + || !cond->type->is_boolean() || !cond->type->is_scalar()) { + YYLTYPE loc = condition->get_location(); + + _mesa_glsl_error(& loc, state, + "loop condition must be scalar boolean"); + } else { + /* As the first code in the loop body, generate a block that looks + * like 'if (!condition) break;' as the loop termination condition. + */ + ir_rvalue *const not_cond = + new(ctx) ir_expression(ir_unop_logic_not, cond); + + ir_if *const if_stmt = new(ctx) ir_if(not_cond); + + ir_jump *const break_stmt = + new(ctx) ir_loop_jump(ir_loop_jump::jump_break); + + if_stmt->then_instructions.push_tail(break_stmt); + stmt->body_instructions.push_tail(if_stmt); + } + } +} + + +ir_rvalue * +ast_iteration_statement::hir(exec_list *instructions, + struct _mesa_glsl_parse_state *state) +{ + void *ctx = state; + + /* For-loops and while-loops start a new scope, but do-while loops do not. + */ + if (mode != ast_do_while) + state->symbols->push_scope(); + + if (init_statement != NULL) + init_statement->hir(instructions, state); + + ir_loop *const stmt = new(ctx) ir_loop(); + instructions->push_tail(stmt); + + /* Track the current loop nesting. */ + ast_iteration_statement *nesting_ast = state->loop_nesting_ast; + + state->loop_nesting_ast = this; + + /* Likewise, indicate that following code is closest to a loop, + * NOT closest to a switch. + */ + bool saved_is_switch_innermost = state->switch_state.is_switch_innermost; + state->switch_state.is_switch_innermost = false; + + if (mode != ast_do_while) + condition_to_hir(stmt, state); + + if (body != NULL) + body->hir(& stmt->body_instructions, state); + + if (rest_expression != NULL) + rest_expression->hir(& stmt->body_instructions, state); + + if (mode == ast_do_while) + condition_to_hir(stmt, state); + + if (mode != ast_do_while) + state->symbols->pop_scope(); - if (previous_label) { - YYLTYPE loc = this->test_value->get_location(); - _mesa_glsl_error(& loc, state, - "duplicate case value"); - - loc = previous_label->get_location(); - _mesa_glsl_error(& loc, state, - "this is the previous case label"); - } else { - hash_table_insert(state->switch_state.labels_ht, - this->test_value, - (void *)(uintptr_t)label_const->value.u[0]); - } - } - - ir_dereference_variable *deref_test_var = - new(ctx) ir_dereference_variable(state->switch_state.test_var); - - ir_rvalue *const test_cond = new(ctx) ir_expression(ir_binop_all_equal, - glsl_type::bool_type, - label_const, - deref_test_var); - - ir_assignment *set_fallthru_on_test = - new(ctx) ir_assignment(deref_fallthru_var, - true_val, - test_cond); - - instructions->push_tail(set_fallthru_on_test); - } else { /* default case */ - if (state->switch_state.previous_default) { - printf("a\n"); - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(& loc, state, - "multiple default labels in one switch"); - - printf("b\n"); - - loc = state->switch_state.previous_default->get_location(); - _mesa_glsl_error(& loc, state, - "this is the first default label"); - } - state->switch_state.previous_default = this; - - /* Set falltrhu state. - */ - ir_assignment *set_fallthru = - new(ctx) ir_assignment(deref_fallthru_var, - true_val, - NULL); - - instructions->push_tail(set_fallthru); - } - - /* Case statements do not have r-values. - */ - return NULL; - } - - - void - ast_iteration_statement::condition_to_hir(ir_loop *stmt, - struct _mesa_glsl_parse_state *state) - { - void *ctx = state; - - if (condition != NULL) { - ir_rvalue *const cond = - condition->hir(& stmt->body_instructions, state); - - if ((cond == NULL) - || !cond->type->is_boolean() || !cond->type->is_scalar()) { - YYLTYPE loc = condition->get_location(); - - _mesa_glsl_error(& loc, state, - "loop condition must be scalar boolean"); - } else { - /* As the first code in the loop body, generate a block that looks - * like 'if (!condition) break;' as the loop termination condition. - */ - ir_rvalue *const not_cond = - new(ctx) ir_expression(ir_unop_logic_not, glsl_type::bool_type, cond, - NULL); - - ir_if *const if_stmt = new(ctx) ir_if(not_cond); - - ir_jump *const break_stmt = - new(ctx) ir_loop_jump(ir_loop_jump::jump_break); - - if_stmt->then_instructions.push_tail(break_stmt); - stmt->body_instructions.push_tail(if_stmt); - } - } - } - - - ir_rvalue * - ast_iteration_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) - { - void *ctx = state; - - /* For-loops and while-loops start a new scope, but do-while loops do not. - */ - if (mode != ast_do_while) - state->symbols->push_scope(); - - if (init_statement != NULL) - init_statement->hir(instructions, state); - - ir_loop *const stmt = new(ctx) ir_loop(); - instructions->push_tail(stmt); - - /* Track the current loop nesting. - */ - ast_iteration_statement *nesting_ast = state->loop_nesting_ast; - - state->loop_nesting_ast = this; - - /* Likewise, indicate that following code is closest to a loop, - * NOT closest to a switch. - */ - bool saved_is_switch_innermost = state->switch_state.is_switch_innermost; - state->switch_state.is_switch_innermost = false; - - if (mode != ast_do_while) - condition_to_hir(stmt, state); - - if (body != NULL) - body->hir(& stmt->body_instructions, state); - - if (rest_expression != NULL) - rest_expression->hir(& stmt->body_instructions, state); - - if (mode == ast_do_while) - condition_to_hir(stmt, state); - - if (mode != ast_do_while) - state->symbols->pop_scope(); - - /* Restore previous nesting before returning. - */ - state->loop_nesting_ast = nesting_ast; - state->switch_state.is_switch_innermost = saved_is_switch_innermost; + /* Restore previous nesting before returning. */ + state->loop_nesting_ast = nesting_ast; + state->switch_state.is_switch_innermost = saved_is_switch_innermost; /* Loops do not have r-values. */ diff -Nru mesa-8.0.2/src/glsl/glcpp/glcpp-lex.c mesa-8.0.3/src/glsl/glcpp/glcpp-lex.c --- mesa-8.0.2/src/glsl/glcpp/glcpp-lex.c 2012-03-21 17:17:15.000000000 +0000 +++ mesa-8.0.3/src/glsl/glcpp/glcpp-lex.c 2012-05-18 23:12:03.000000000 +0000 @@ -54,6 +54,7 @@ typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -84,8 +85,6 @@ #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -159,15 +158,7 @@ /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -657,7 +648,7 @@ strings, we have to be careful to avoid OTHER matching and hiding something that CPP does care about. So we simply exclude all characters that appear in any other expressions. */ -#line 661 "glcpp/glcpp-lex.c" +#line 652 "glcpp/glcpp-lex.c" #define INITIAL 0 #define DONE 1 @@ -757,6 +748,10 @@ void glcpp_set_lineno (int line_number ,yyscan_t yyscanner ); +int glcpp_get_column (yyscan_t yyscanner ); + +void glcpp_set_column (int column_no ,yyscan_t yyscanner ); + YYSTYPE * glcpp_get_lval (yyscan_t yyscanner ); void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); @@ -805,12 +800,7 @@ /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -829,7 +819,7 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -932,7 +922,7 @@ } /* Single-line comments */ -#line 936 "glcpp/glcpp-lex.c" +#line 926 "glcpp/glcpp-lex.c" yylval = yylval_param; @@ -1424,7 +1414,7 @@ #line 326 "glcpp/glcpp-lex.l" ECHO; YY_BREAK -#line 1428 "glcpp/glcpp-lex.c" +#line 1418 "glcpp/glcpp-lex.c" case YY_STATE_EOF(DONE): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(UNREACHABLE): @@ -2164,8 +2154,8 @@ /** Setup the input buffer state to scan the given bytes. The next call to glcpp_lex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ diff -Nru mesa-8.0.2/src/glsl/glcpp/glcpp-parse.c mesa-8.0.3/src/glsl/glcpp/glcpp-parse.c --- mesa-8.0.2/src/glsl/glcpp/glcpp-parse.c 2012-03-21 17:17:15.000000000 +0000 +++ mesa-8.0.3/src/glsl/glcpp/glcpp-parse.c 2012-05-18 23:12:03.000000000 +0000 @@ -1,10 +1,9 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.4.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,7 +45,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.4.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -212,7 +211,7 @@ /* Line 189 of yacc.c */ -#line 216 "glcpp/glcpp-parse.c" +#line 215 "glcpp/glcpp-parse.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -300,7 +299,7 @@ /* Line 264 of yacc.c */ -#line 304 "glcpp/glcpp-parse.c" +#line 303 "glcpp/glcpp-parse.c" #ifdef short # undef short @@ -350,7 +349,7 @@ #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -938,9 +937,18 @@ /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) @@ -997,7 +1005,7 @@ we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -1539,7 +1547,7 @@ YYLTYPE *yylsp; /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + YYLTYPE yyerror_range[3]; YYSIZE_T yystacksize; @@ -1586,7 +1594,7 @@ yyvsp = yyvs; yylsp = yyls; -#if YYLTYPE_IS_TRIVIAL +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; @@ -1594,7 +1602,7 @@ /* User initialization code. */ -/* Line 1242 of yacc.c */ +/* Line 1251 of yacc.c */ #line 147 "glcpp/glcpp-parse.y" { yylloc.first_line = 1; @@ -1604,8 +1612,8 @@ yylloc.source = 0; } -/* Line 1242 of yacc.c */ -#line 1609 "glcpp/glcpp-parse.c" +/* Line 1251 of yacc.c */ +#line 1617 "glcpp/glcpp-parse.c" yylsp[0] = yylloc; goto yysetstate; @@ -1792,7 +1800,7 @@ { case 4: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 186 "glcpp/glcpp-parse.y" { ralloc_strcat (&parser->output, "\n"); @@ -1801,7 +1809,7 @@ case 5: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 189 "glcpp/glcpp-parse.y" { _glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list)); @@ -1812,7 +1820,7 @@ case 8: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 199 "glcpp/glcpp-parse.y" { _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival)); @@ -1821,7 +1829,7 @@ case 9: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 202 "glcpp/glcpp-parse.y" { _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival)); @@ -1830,7 +1838,7 @@ case 10: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 208 "glcpp/glcpp-parse.y" { _define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list)); @@ -1839,7 +1847,7 @@ case 11: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 211 "glcpp/glcpp-parse.y" { _define_function_macro (parser, & (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].str), NULL, (yyvsp[(5) - (6)].token_list)); @@ -1848,7 +1856,7 @@ case 12: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 214 "glcpp/glcpp-parse.y" { _define_function_macro (parser, & (yylsp[(2) - (7)]), (yyvsp[(2) - (7)].str), (yyvsp[(4) - (7)].string_list), (yyvsp[(6) - (7)].token_list)); @@ -1857,7 +1865,7 @@ case 13: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 217 "glcpp/glcpp-parse.y" { macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str)); @@ -1871,7 +1879,7 @@ case 14: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 225 "glcpp/glcpp-parse.y" { /* Be careful to only evaluate the 'if' expression if @@ -1896,7 +1904,7 @@ case 15: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 244 "glcpp/glcpp-parse.y" { /* #if without an expression is only an error if we @@ -1912,7 +1920,7 @@ case 16: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 254 "glcpp/glcpp-parse.y" { macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str)); @@ -1923,7 +1931,7 @@ case 17: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 259 "glcpp/glcpp-parse.y" { macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str)); @@ -1934,7 +1942,7 @@ case 18: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 264 "glcpp/glcpp-parse.y" { /* Be careful to only evaluate the 'elif' expression @@ -1959,7 +1967,7 @@ case 19: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 283 "glcpp/glcpp-parse.y" { /* #elif without an expression is an error unless we @@ -1980,7 +1988,7 @@ case 20: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 298 "glcpp/glcpp-parse.y" { _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1); @@ -1989,7 +1997,7 @@ case 21: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 301 "glcpp/glcpp-parse.y" { _glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)])); @@ -1998,7 +2006,7 @@ case 22: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 304 "glcpp/glcpp-parse.y" { macro_t *macro = hash_table_find (parser->defines, "__VERSION__"); @@ -2025,7 +2033,7 @@ case 24: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 329 "glcpp/glcpp-parse.y" { if (strlen ((yyvsp[(1) - (1)].str)) >= 3 && strncmp ((yyvsp[(1) - (1)].str), "0x", 2) == 0) { @@ -2040,7 +2048,7 @@ case 25: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 338 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (1)].ival); @@ -2049,7 +2057,7 @@ case 27: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 344 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival); @@ -2058,7 +2066,7 @@ case 28: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 347 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival); @@ -2067,7 +2075,7 @@ case 29: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 350 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival); @@ -2076,7 +2084,7 @@ case 30: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 353 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival); @@ -2085,7 +2093,7 @@ case 31: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 356 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival); @@ -2094,7 +2102,7 @@ case 32: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 359 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival); @@ -2103,7 +2111,7 @@ case 33: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 362 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival); @@ -2112,7 +2120,7 @@ case 34: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 365 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival); @@ -2121,7 +2129,7 @@ case 35: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 368 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival); @@ -2130,7 +2138,7 @@ case 36: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 371 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival); @@ -2139,7 +2147,7 @@ case 37: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 374 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival); @@ -2148,7 +2156,7 @@ case 38: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 377 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival); @@ -2157,7 +2165,7 @@ case 39: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 380 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival); @@ -2166,7 +2174,7 @@ case 40: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 383 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival); @@ -2175,7 +2183,7 @@ case 41: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 386 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival); @@ -2184,7 +2192,7 @@ case 42: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 389 "glcpp/glcpp-parse.y" { if ((yyvsp[(3) - (3)].ival) == 0) { @@ -2198,7 +2206,7 @@ case 43: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 397 "glcpp/glcpp-parse.y" { if ((yyvsp[(3) - (3)].ival) == 0) { @@ -2212,7 +2220,7 @@ case 44: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 405 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival); @@ -2221,7 +2229,7 @@ case 45: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 408 "glcpp/glcpp-parse.y" { (yyval.ival) = ! (yyvsp[(2) - (2)].ival); @@ -2230,7 +2238,7 @@ case 46: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 411 "glcpp/glcpp-parse.y" { (yyval.ival) = ~ (yyvsp[(2) - (2)].ival); @@ -2239,7 +2247,7 @@ case 47: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 414 "glcpp/glcpp-parse.y" { (yyval.ival) = - (yyvsp[(2) - (2)].ival); @@ -2248,7 +2256,7 @@ case 48: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 417 "glcpp/glcpp-parse.y" { (yyval.ival) = + (yyvsp[(2) - (2)].ival); @@ -2257,7 +2265,7 @@ case 49: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 420 "glcpp/glcpp-parse.y" { (yyval.ival) = (yyvsp[(2) - (3)].ival); @@ -2266,7 +2274,7 @@ case 50: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 426 "glcpp/glcpp-parse.y" { (yyval.string_list) = _string_list_create (parser); @@ -2277,7 +2285,7 @@ case 51: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 431 "glcpp/glcpp-parse.y" { (yyval.string_list) = (yyvsp[(1) - (3)].string_list); @@ -2288,14 +2296,14 @@ case 52: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 439 "glcpp/glcpp-parse.y" { (yyval.token_list) = NULL; ;} break; case 54: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 444 "glcpp/glcpp-parse.y" { yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #"); @@ -2304,14 +2312,14 @@ case 55: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 450 "glcpp/glcpp-parse.y" { (yyval.token_list) = NULL; ;} break; case 58: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 456 "glcpp/glcpp-parse.y" { glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive"); @@ -2320,7 +2328,7 @@ case 59: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 463 "glcpp/glcpp-parse.y" { int v = hash_table_find (parser->defines, (yyvsp[(2) - (2)].str)) ? 1 : 0; @@ -2330,7 +2338,7 @@ case 60: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 467 "glcpp/glcpp-parse.y" { int v = hash_table_find (parser->defines, (yyvsp[(3) - (4)].str)) ? 1 : 0; @@ -2340,7 +2348,7 @@ case 62: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 476 "glcpp/glcpp-parse.y" { (yyval.token_list) = _token_list_create (parser); @@ -2350,7 +2358,7 @@ case 63: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 480 "glcpp/glcpp-parse.y" { (yyval.token_list) = (yyvsp[(1) - (2)].token_list); @@ -2360,7 +2368,7 @@ case 64: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 487 "glcpp/glcpp-parse.y" { parser->space_tokens = 1; @@ -2371,7 +2379,7 @@ case 65: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 492 "glcpp/glcpp-parse.y" { (yyval.token_list) = (yyvsp[(1) - (2)].token_list); @@ -2381,7 +2389,7 @@ case 66: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 499 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str)); @@ -2391,7 +2399,7 @@ case 67: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 503 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str)); @@ -2401,7 +2409,7 @@ case 68: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 507 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_ival (parser, (yyvsp[(1) - (1)].ival), (yyvsp[(1) - (1)].ival)); @@ -2411,7 +2419,7 @@ case 69: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 511 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str)); @@ -2421,7 +2429,7 @@ case 70: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 515 "glcpp/glcpp-parse.y" { (yyval.token) = _token_create_ival (parser, SPACE, SPACE); @@ -2431,225 +2439,225 @@ case 71: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 522 "glcpp/glcpp-parse.y" { (yyval.ival) = '['; ;} break; case 72: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 523 "glcpp/glcpp-parse.y" { (yyval.ival) = ']'; ;} break; case 73: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 524 "glcpp/glcpp-parse.y" { (yyval.ival) = '('; ;} break; case 74: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 525 "glcpp/glcpp-parse.y" { (yyval.ival) = ')'; ;} break; case 75: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 526 "glcpp/glcpp-parse.y" { (yyval.ival) = '{'; ;} break; case 76: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 527 "glcpp/glcpp-parse.y" { (yyval.ival) = '}'; ;} break; case 77: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 528 "glcpp/glcpp-parse.y" { (yyval.ival) = '.'; ;} break; case 78: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 529 "glcpp/glcpp-parse.y" { (yyval.ival) = '&'; ;} break; case 79: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 530 "glcpp/glcpp-parse.y" { (yyval.ival) = '*'; ;} break; case 80: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 531 "glcpp/glcpp-parse.y" { (yyval.ival) = '+'; ;} break; case 81: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 532 "glcpp/glcpp-parse.y" { (yyval.ival) = '-'; ;} break; case 82: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 533 "glcpp/glcpp-parse.y" { (yyval.ival) = '~'; ;} break; case 83: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 534 "glcpp/glcpp-parse.y" { (yyval.ival) = '!'; ;} break; case 84: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 535 "glcpp/glcpp-parse.y" { (yyval.ival) = '/'; ;} break; case 85: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 536 "glcpp/glcpp-parse.y" { (yyval.ival) = '%'; ;} break; case 86: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 537 "glcpp/glcpp-parse.y" { (yyval.ival) = LEFT_SHIFT; ;} break; case 87: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 538 "glcpp/glcpp-parse.y" { (yyval.ival) = RIGHT_SHIFT; ;} break; case 88: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 539 "glcpp/glcpp-parse.y" { (yyval.ival) = '<'; ;} break; case 89: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 540 "glcpp/glcpp-parse.y" { (yyval.ival) = '>'; ;} break; case 90: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 541 "glcpp/glcpp-parse.y" { (yyval.ival) = LESS_OR_EQUAL; ;} break; case 91: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 542 "glcpp/glcpp-parse.y" { (yyval.ival) = GREATER_OR_EQUAL; ;} break; case 92: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 543 "glcpp/glcpp-parse.y" { (yyval.ival) = EQUAL; ;} break; case 93: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 544 "glcpp/glcpp-parse.y" { (yyval.ival) = NOT_EQUAL; ;} break; case 94: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 545 "glcpp/glcpp-parse.y" { (yyval.ival) = '^'; ;} break; case 95: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 546 "glcpp/glcpp-parse.y" { (yyval.ival) = '|'; ;} break; case 96: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 547 "glcpp/glcpp-parse.y" { (yyval.ival) = AND; ;} break; case 97: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 548 "glcpp/glcpp-parse.y" { (yyval.ival) = OR; ;} break; case 98: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 549 "glcpp/glcpp-parse.y" { (yyval.ival) = ';'; ;} break; case 99: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 550 "glcpp/glcpp-parse.y" { (yyval.ival) = ','; ;} break; case 100: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 551 "glcpp/glcpp-parse.y" { (yyval.ival) = '='; ;} break; case 101: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 552 "glcpp/glcpp-parse.y" { (yyval.ival) = PASTE; ;} break; -/* Line 1455 of yacc.c */ -#line 2653 "glcpp/glcpp-parse.c" +/* Line 1464 of yacc.c */ +#line 2661 "glcpp/glcpp-parse.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2721,7 +2729,7 @@ #endif } - yyerror_range[0] = yylloc; + yyerror_range[1] = yylloc; if (yyerrstatus == 3) { @@ -2758,7 +2766,7 @@ if (/*CONSTCOND*/ 0) goto yyerrorlab; - yyerror_range[0] = yylsp[1-yylen]; + yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -2792,7 +2800,7 @@ if (yyssp == yyss) YYABORT; - yyerror_range[0] = *yylsp; + yyerror_range[1] = *yylsp; yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp, parser); YYPOPSTACK (1); @@ -2802,10 +2810,10 @@ *++yyvsp = yylval; - yyerror_range[1] = yylloc; + yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc; /* Shift the error token. */ @@ -2867,7 +2875,7 @@ -/* Line 1675 of yacc.c */ +/* Line 1684 of yacc.c */ #line 555 "glcpp/glcpp-parse.y" diff -Nru mesa-8.0.2/src/glsl/glcpp/glcpp-parse.h mesa-8.0.3/src/glsl/glcpp/glcpp-parse.h --- mesa-8.0.2/src/glsl/glcpp/glcpp-parse.h 2012-03-21 17:17:15.000000000 +0000 +++ mesa-8.0.3/src/glsl/glcpp/glcpp-parse.h 2012-05-18 23:12:03.000000000 +0000 @@ -1,10 +1,9 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.4.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru mesa-8.0.2/src/glsl/glsl_lexer.cpp mesa-8.0.3/src/glsl/glsl_lexer.cpp --- mesa-8.0.2/src/glsl/glsl_lexer.cpp 2012-03-21 17:17:15.000000000 +0000 +++ mesa-8.0.3/src/glsl/glsl_lexer.cpp 2012-05-18 23:12:03.000000000 +0000 @@ -54,6 +54,7 @@ typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -84,8 +85,6 @@ #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -159,15 +158,7 @@ /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -1133,7 +1124,7 @@ literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base) -#line 1137 "glsl_lexer.cpp" +#line 1128 "glsl_lexer.cpp" #define INITIAL 0 #define PP 1 @@ -1220,6 +1211,10 @@ void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner ); +int _mesa_glsl_get_column (yyscan_t yyscanner ); + +void _mesa_glsl_set_column (int column_no ,yyscan_t yyscanner ); + YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner ); void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); @@ -1260,12 +1255,7 @@ /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1284,7 +1274,7 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1375,7 +1365,7 @@ #line 145 "glsl_lexer.ll" -#line 1379 "glsl_lexer.cpp" +#line 1369 "glsl_lexer.cpp" yylval = yylval_param; @@ -2626,7 +2616,7 @@ #line 482 "glsl_lexer.ll" ECHO; YY_BREAK -#line 2630 "glsl_lexer.cpp" +#line 2620 "glsl_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PP): case YY_STATE_EOF(PRAGMA): @@ -3362,8 +3352,8 @@ /** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ diff -Nru mesa-8.0.2/src/glsl/glsl_parser.cpp mesa-8.0.3/src/glsl/glsl_parser.cpp --- mesa-8.0.2/src/glsl/glsl_parser.cpp 2012-03-21 17:17:15.000000000 +0000 +++ mesa-8.0.3/src/glsl/glsl_parser.cpp 2012-05-18 23:12:03.000000000 +0000 @@ -1,10 +1,9 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.4.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,7 +45,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.4.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -120,7 +119,7 @@ /* Line 189 of yacc.c */ -#line 124 "glsl_parser.cpp" +#line 123 "glsl_parser.cpp" /* Enabling traces. */ #ifndef YYDEBUG @@ -389,7 +388,7 @@ /* Line 214 of yacc.c */ -#line 393 "glsl_parser.cpp" +#line 392 "glsl_parser.cpp" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -414,7 +413,7 @@ /* Line 264 of yacc.c */ -#line 418 "glsl_parser.cpp" +#line 417 "glsl_parser.cpp" #ifdef short # undef short @@ -464,7 +463,7 @@ #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -2047,9 +2046,18 @@ /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) @@ -2106,7 +2114,7 @@ we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -2648,7 +2656,7 @@ YYLTYPE *yylsp; /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + YYLTYPE yyerror_range[3]; YYSIZE_T yystacksize; @@ -2695,7 +2703,7 @@ yyvsp = yyvs; yylsp = yyls; -#if YYLTYPE_IS_TRIVIAL +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; @@ -2703,7 +2711,7 @@ /* User initialization code. */ -/* Line 1242 of yacc.c */ +/* Line 1251 of yacc.c */ #line 47 "glsl_parser.yy" { yylloc.first_line = 1; @@ -2713,8 +2721,8 @@ yylloc.source = 0; } -/* Line 1242 of yacc.c */ -#line 2718 "glsl_parser.cpp" +/* Line 1251 of yacc.c */ +#line 2726 "glsl_parser.cpp" yylsp[0] = yylloc; goto yysetstate; @@ -2901,7 +2909,7 @@ { case 2: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 236 "glsl_parser.yy" { _mesa_glsl_initialize_types(state); @@ -2910,7 +2918,7 @@ case 3: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 240 "glsl_parser.yy" { delete state->symbols; @@ -2921,7 +2929,7 @@ case 5: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 250 "glsl_parser.yy" { bool supported = false; @@ -2963,7 +2971,7 @@ case 10: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 294 "glsl_parser.yy" { if (state->language_version < 120) { @@ -2978,7 +2986,7 @@ case 16: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 318 "glsl_parser.yy" { if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) { @@ -2989,7 +2997,7 @@ case 17: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 327 "glsl_parser.yy" { /* FINISHME: The NULL test is required because pragmas are set to @@ -3002,7 +3010,7 @@ case 18: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 335 "glsl_parser.yy" { /* FINISHME: The NULL test is required because pragmas are set to @@ -3015,7 +3023,7 @@ case 21: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 351 "glsl_parser.yy" { void *ctx = state; @@ -3027,7 +3035,7 @@ case 22: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 358 "glsl_parser.yy" { void *ctx = state; @@ -3039,7 +3047,7 @@ case 23: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 365 "glsl_parser.yy" { void *ctx = state; @@ -3051,7 +3059,7 @@ case 24: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 372 "glsl_parser.yy" { void *ctx = state; @@ -3063,7 +3071,7 @@ case 25: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 379 "glsl_parser.yy" { void *ctx = state; @@ -3075,7 +3083,7 @@ case 26: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 386 "glsl_parser.yy" { (yyval.expression) = (yyvsp[(2) - (3)].expression); @@ -3084,7 +3092,7 @@ case 28: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 394 "glsl_parser.yy" { void *ctx = state; @@ -3095,7 +3103,7 @@ case 29: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 400 "glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (1)].expression); @@ -3104,7 +3112,7 @@ case 30: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 404 "glsl_parser.yy" { void *ctx = state; @@ -3116,7 +3124,7 @@ case 31: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 411 "glsl_parser.yy" { void *ctx = state; @@ -3127,7 +3135,7 @@ case 32: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 417 "glsl_parser.yy" { void *ctx = state; @@ -3138,7 +3146,7 @@ case 36: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 435 "glsl_parser.yy" { void *ctx = state; @@ -3149,7 +3157,7 @@ case 41: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 454 "glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (2)].expression); @@ -3160,7 +3168,7 @@ case 42: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 460 "glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (3)].expression); @@ -3171,7 +3179,7 @@ case 44: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 476 "glsl_parser.yy" { void *ctx = state; @@ -3182,7 +3190,7 @@ case 45: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 482 "glsl_parser.yy" { void *ctx = state; @@ -3194,7 +3202,7 @@ case 46: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 489 "glsl_parser.yy" { void *ctx = state; @@ -3206,7 +3214,7 @@ case 51: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 509 "glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (2)].expression); @@ -3217,7 +3225,7 @@ case 52: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 515 "glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (3)].expression); @@ -3228,7 +3236,7 @@ case 53: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 527 "glsl_parser.yy" { void *ctx = state; @@ -3240,7 +3248,7 @@ case 55: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 539 "glsl_parser.yy" { void *ctx = state; @@ -3251,7 +3259,7 @@ case 56: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 545 "glsl_parser.yy" { void *ctx = state; @@ -3262,7 +3270,7 @@ case 57: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 551 "glsl_parser.yy" { void *ctx = state; @@ -3273,35 +3281,35 @@ case 58: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 560 "glsl_parser.yy" { (yyval.n) = ast_plus; ;} break; case 59: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 561 "glsl_parser.yy" { (yyval.n) = ast_neg; ;} break; case 60: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 562 "glsl_parser.yy" { (yyval.n) = ast_logic_not; ;} break; case 61: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 563 "glsl_parser.yy" { (yyval.n) = ast_bit_not; ;} break; case 63: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 569 "glsl_parser.yy" { void *ctx = state; @@ -3312,7 +3320,7 @@ case 64: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 575 "glsl_parser.yy" { void *ctx = state; @@ -3323,7 +3331,7 @@ case 65: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 581 "glsl_parser.yy" { void *ctx = state; @@ -3334,7 +3342,7 @@ case 67: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 591 "glsl_parser.yy" { void *ctx = state; @@ -3345,7 +3353,7 @@ case 68: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 597 "glsl_parser.yy" { void *ctx = state; @@ -3356,7 +3364,7 @@ case 70: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 607 "glsl_parser.yy" { void *ctx = state; @@ -3367,7 +3375,7 @@ case 71: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 613 "glsl_parser.yy" { void *ctx = state; @@ -3378,7 +3386,7 @@ case 73: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 623 "glsl_parser.yy" { void *ctx = state; @@ -3389,7 +3397,7 @@ case 74: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 629 "glsl_parser.yy" { void *ctx = state; @@ -3400,7 +3408,7 @@ case 75: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 635 "glsl_parser.yy" { void *ctx = state; @@ -3411,7 +3419,7 @@ case 76: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 641 "glsl_parser.yy" { void *ctx = state; @@ -3422,7 +3430,7 @@ case 78: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 651 "glsl_parser.yy" { void *ctx = state; @@ -3433,7 +3441,7 @@ case 79: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 657 "glsl_parser.yy" { void *ctx = state; @@ -3444,7 +3452,7 @@ case 81: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 667 "glsl_parser.yy" { void *ctx = state; @@ -3455,7 +3463,7 @@ case 83: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 677 "glsl_parser.yy" { void *ctx = state; @@ -3466,7 +3474,7 @@ case 85: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 687 "glsl_parser.yy" { void *ctx = state; @@ -3477,7 +3485,7 @@ case 87: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 697 "glsl_parser.yy" { void *ctx = state; @@ -3488,7 +3496,7 @@ case 89: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 707 "glsl_parser.yy" { void *ctx = state; @@ -3499,7 +3507,7 @@ case 91: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 717 "glsl_parser.yy" { void *ctx = state; @@ -3510,7 +3518,7 @@ case 93: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 727 "glsl_parser.yy" { void *ctx = state; @@ -3521,7 +3529,7 @@ case 95: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 737 "glsl_parser.yy" { void *ctx = state; @@ -3532,84 +3540,84 @@ case 96: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 745 "glsl_parser.yy" { (yyval.n) = ast_assign; ;} break; case 97: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 746 "glsl_parser.yy" { (yyval.n) = ast_mul_assign; ;} break; case 98: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 747 "glsl_parser.yy" { (yyval.n) = ast_div_assign; ;} break; case 99: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 748 "glsl_parser.yy" { (yyval.n) = ast_mod_assign; ;} break; case 100: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 749 "glsl_parser.yy" { (yyval.n) = ast_add_assign; ;} break; case 101: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 750 "glsl_parser.yy" { (yyval.n) = ast_sub_assign; ;} break; case 102: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 751 "glsl_parser.yy" { (yyval.n) = ast_ls_assign; ;} break; case 103: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 752 "glsl_parser.yy" { (yyval.n) = ast_rs_assign; ;} break; case 104: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 753 "glsl_parser.yy" { (yyval.n) = ast_and_assign; ;} break; case 105: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 754 "glsl_parser.yy" { (yyval.n) = ast_xor_assign; ;} break; case 106: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 755 "glsl_parser.yy" { (yyval.n) = ast_or_assign; ;} break; case 107: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 760 "glsl_parser.yy" { (yyval.expression) = (yyvsp[(1) - (1)].expression); @@ -3618,7 +3626,7 @@ case 108: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 764 "glsl_parser.yy" { void *ctx = state; @@ -3636,7 +3644,7 @@ case 110: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 784 "glsl_parser.yy" { state->symbols->pop_scope(); @@ -3646,7 +3654,7 @@ case 111: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 789 "glsl_parser.yy" { (yyval.node) = (yyvsp[(1) - (2)].declarator_list); @@ -3655,7 +3663,7 @@ case 112: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 793 "glsl_parser.yy" { (yyvsp[(3) - (4)].type_specifier)->precision = (yyvsp[(2) - (4)].n); @@ -3666,7 +3674,7 @@ case 116: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 811 "glsl_parser.yy" { (yyval.function) = (yyvsp[(1) - (2)].function); @@ -3676,7 +3684,7 @@ case 117: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 816 "glsl_parser.yy" { (yyval.function) = (yyvsp[(1) - (3)].function); @@ -3686,7 +3694,7 @@ case 118: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 824 "glsl_parser.yy" { void *ctx = state; @@ -3702,7 +3710,7 @@ case 119: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 838 "glsl_parser.yy" { void *ctx = state; @@ -3717,7 +3725,7 @@ case 120: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 848 "glsl_parser.yy" { void *ctx = state; @@ -3734,7 +3742,7 @@ case 121: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 863 "glsl_parser.yy" { (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i; @@ -3746,7 +3754,7 @@ case 122: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 870 "glsl_parser.yy" { (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator); @@ -3756,7 +3764,7 @@ case 123: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 875 "glsl_parser.yy" { void *ctx = state; @@ -3772,7 +3780,7 @@ case 124: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 886 "glsl_parser.yy" { void *ctx = state; @@ -3786,7 +3794,7 @@ case 125: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 898 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -3795,7 +3803,7 @@ case 126: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 902 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -3805,7 +3813,7 @@ case 127: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 907 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -3815,7 +3823,7 @@ case 128: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 912 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -3826,7 +3834,7 @@ case 131: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 926 "glsl_parser.yy" { void *ctx = state; @@ -3841,7 +3849,7 @@ case 132: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 936 "glsl_parser.yy" { void *ctx = state; @@ -3856,7 +3864,7 @@ case 133: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 946 "glsl_parser.yy" { void *ctx = state; @@ -3871,7 +3879,7 @@ case 134: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 956 "glsl_parser.yy" { void *ctx = state; @@ -3886,7 +3894,7 @@ case 135: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 966 "glsl_parser.yy" { void *ctx = state; @@ -3901,7 +3909,7 @@ case 136: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 976 "glsl_parser.yy" { void *ctx = state; @@ -3916,7 +3924,7 @@ case 137: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 990 "glsl_parser.yy" { void *ctx = state; @@ -3928,7 +3936,7 @@ case 138: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 997 "glsl_parser.yy" { void *ctx = state; @@ -3942,7 +3950,7 @@ case 139: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1006 "glsl_parser.yy" { void *ctx = state; @@ -3956,7 +3964,7 @@ case 140: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1015 "glsl_parser.yy" { void *ctx = state; @@ -3970,7 +3978,7 @@ case 141: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1024 "glsl_parser.yy" { void *ctx = state; @@ -3984,7 +3992,7 @@ case 142: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1033 "glsl_parser.yy" { void *ctx = state; @@ -3998,7 +4006,7 @@ case 143: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1042 "glsl_parser.yy" { void *ctx = state; @@ -4012,7 +4020,7 @@ case 144: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1051 "glsl_parser.yy" { void *ctx = state; @@ -4028,7 +4036,7 @@ case 145: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1065 "glsl_parser.yy" { void *ctx = state; @@ -4040,7 +4048,7 @@ case 146: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1072 "glsl_parser.yy" { void *ctx = state; @@ -4053,7 +4061,7 @@ case 147: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1083 "glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier); @@ -4062,7 +4070,7 @@ case 149: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1091 "glsl_parser.yy" { if (((yyvsp[(1) - (3)].type_qualifier).flags.i & (yyvsp[(3) - (3)].type_qualifier).flags.i) != 0) { @@ -4083,7 +4091,7 @@ case 150: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1110 "glsl_parser.yy" { bool got_one = false; @@ -4147,7 +4155,7 @@ case 151: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1169 "glsl_parser.yy" { bool got_one = false; @@ -4190,7 +4198,7 @@ case 152: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1210 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4200,7 +4208,7 @@ case 153: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1215 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4210,7 +4218,7 @@ case 154: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1220 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4220,7 +4228,7 @@ case 155: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1228 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4230,7 +4238,7 @@ case 158: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1238 "glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier); @@ -4240,7 +4248,7 @@ case 160: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1244 "glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier); @@ -4250,7 +4258,7 @@ case 161: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1249 "glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier); @@ -4260,7 +4268,7 @@ case 162: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1254 "glsl_parser.yy" { (yyval.type_qualifier) = (yyvsp[(2) - (3)].type_qualifier); @@ -4271,7 +4279,7 @@ case 163: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1260 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4281,7 +4289,7 @@ case 164: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1268 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4291,7 +4299,7 @@ case 165: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1273 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4301,7 +4309,7 @@ case 166: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1278 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4311,7 +4319,7 @@ case 167: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1283 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4322,7 +4330,7 @@ case 168: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1289 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4332,7 +4340,7 @@ case 169: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1294 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4342,7 +4350,7 @@ case 170: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1299 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4352,7 +4360,7 @@ case 171: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1304 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4362,7 +4370,7 @@ case 172: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1309 "glsl_parser.yy" { memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); @@ -4372,7 +4380,7 @@ case 173: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1317 "glsl_parser.yy" { (yyval.type_specifier) = (yyvsp[(1) - (1)].type_specifier); @@ -4381,7 +4389,7 @@ case 174: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1321 "glsl_parser.yy" { (yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier); @@ -4391,7 +4399,7 @@ case 176: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1330 "glsl_parser.yy" { (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier); @@ -4402,7 +4410,7 @@ case 177: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1336 "glsl_parser.yy" { (yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier); @@ -4413,7 +4421,7 @@ case 178: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1345 "glsl_parser.yy" { void *ctx = state; @@ -4424,7 +4432,7 @@ case 179: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1351 "glsl_parser.yy" { void *ctx = state; @@ -4435,7 +4443,7 @@ case 180: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1357 "glsl_parser.yy" { void *ctx = state; @@ -4446,371 +4454,371 @@ case 181: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1365 "glsl_parser.yy" { (yyval.n) = ast_void; ;} break; case 182: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1366 "glsl_parser.yy" { (yyval.n) = ast_float; ;} break; case 183: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1367 "glsl_parser.yy" { (yyval.n) = ast_int; ;} break; case 184: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1368 "glsl_parser.yy" { (yyval.n) = ast_uint; ;} break; case 185: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1369 "glsl_parser.yy" { (yyval.n) = ast_bool; ;} break; case 186: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1370 "glsl_parser.yy" { (yyval.n) = ast_vec2; ;} break; case 187: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1371 "glsl_parser.yy" { (yyval.n) = ast_vec3; ;} break; case 188: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1372 "glsl_parser.yy" { (yyval.n) = ast_vec4; ;} break; case 189: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1373 "glsl_parser.yy" { (yyval.n) = ast_bvec2; ;} break; case 190: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1374 "glsl_parser.yy" { (yyval.n) = ast_bvec3; ;} break; case 191: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1375 "glsl_parser.yy" { (yyval.n) = ast_bvec4; ;} break; case 192: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1376 "glsl_parser.yy" { (yyval.n) = ast_ivec2; ;} break; case 193: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1377 "glsl_parser.yy" { (yyval.n) = ast_ivec3; ;} break; case 194: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1378 "glsl_parser.yy" { (yyval.n) = ast_ivec4; ;} break; case 195: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1379 "glsl_parser.yy" { (yyval.n) = ast_uvec2; ;} break; case 196: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1380 "glsl_parser.yy" { (yyval.n) = ast_uvec3; ;} break; case 197: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1381 "glsl_parser.yy" { (yyval.n) = ast_uvec4; ;} break; case 198: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1382 "glsl_parser.yy" { (yyval.n) = ast_mat2; ;} break; case 199: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1383 "glsl_parser.yy" { (yyval.n) = ast_mat2x3; ;} break; case 200: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1384 "glsl_parser.yy" { (yyval.n) = ast_mat2x4; ;} break; case 201: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1385 "glsl_parser.yy" { (yyval.n) = ast_mat3x2; ;} break; case 202: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1386 "glsl_parser.yy" { (yyval.n) = ast_mat3; ;} break; case 203: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1387 "glsl_parser.yy" { (yyval.n) = ast_mat3x4; ;} break; case 204: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1388 "glsl_parser.yy" { (yyval.n) = ast_mat4x2; ;} break; case 205: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1389 "glsl_parser.yy" { (yyval.n) = ast_mat4x3; ;} break; case 206: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1390 "glsl_parser.yy" { (yyval.n) = ast_mat4; ;} break; case 207: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1391 "glsl_parser.yy" { (yyval.n) = ast_sampler1d; ;} break; case 208: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1392 "glsl_parser.yy" { (yyval.n) = ast_sampler2d; ;} break; case 209: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1393 "glsl_parser.yy" { (yyval.n) = ast_sampler2drect; ;} break; case 210: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1394 "glsl_parser.yy" { (yyval.n) = ast_sampler3d; ;} break; case 211: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1395 "glsl_parser.yy" { (yyval.n) = ast_samplercube; ;} break; case 212: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1396 "glsl_parser.yy" { (yyval.n) = ast_samplerexternaloes; ;} break; case 213: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1397 "glsl_parser.yy" { (yyval.n) = ast_sampler1dshadow; ;} break; case 214: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1398 "glsl_parser.yy" { (yyval.n) = ast_sampler2dshadow; ;} break; case 215: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1399 "glsl_parser.yy" { (yyval.n) = ast_sampler2drectshadow; ;} break; case 216: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1400 "glsl_parser.yy" { (yyval.n) = ast_samplercubeshadow; ;} break; case 217: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1401 "glsl_parser.yy" { (yyval.n) = ast_sampler1darray; ;} break; case 218: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1402 "glsl_parser.yy" { (yyval.n) = ast_sampler2darray; ;} break; case 219: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1403 "glsl_parser.yy" { (yyval.n) = ast_sampler1darrayshadow; ;} break; case 220: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1404 "glsl_parser.yy" { (yyval.n) = ast_sampler2darrayshadow; ;} break; case 221: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1405 "glsl_parser.yy" { (yyval.n) = ast_isampler1d; ;} break; case 222: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1406 "glsl_parser.yy" { (yyval.n) = ast_isampler2d; ;} break; case 223: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1407 "glsl_parser.yy" { (yyval.n) = ast_isampler3d; ;} break; case 224: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1408 "glsl_parser.yy" { (yyval.n) = ast_isamplercube; ;} break; case 225: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1409 "glsl_parser.yy" { (yyval.n) = ast_isampler1darray; ;} break; case 226: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1410 "glsl_parser.yy" { (yyval.n) = ast_isampler2darray; ;} break; case 227: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1411 "glsl_parser.yy" { (yyval.n) = ast_usampler1d; ;} break; case 228: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1412 "glsl_parser.yy" { (yyval.n) = ast_usampler2d; ;} break; case 229: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1413 "glsl_parser.yy" { (yyval.n) = ast_usampler3d; ;} break; case 230: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1414 "glsl_parser.yy" { (yyval.n) = ast_usamplercube; ;} break; case 231: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1415 "glsl_parser.yy" { (yyval.n) = ast_usampler1darray; ;} break; case 232: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1416 "glsl_parser.yy" { (yyval.n) = ast_usampler2darray; ;} break; case 233: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1420 "glsl_parser.yy" { if (!state->es_shader && state->language_version < 130) @@ -4826,7 +4834,7 @@ case 234: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1430 "glsl_parser.yy" { if (!state->es_shader && state->language_version < 130) @@ -4842,7 +4850,7 @@ case 235: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1440 "glsl_parser.yy" { if (!state->es_shader && state->language_version < 130) @@ -4858,7 +4866,7 @@ case 236: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1454 "glsl_parser.yy" { void *ctx = state; @@ -4870,7 +4878,7 @@ case 237: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1461 "glsl_parser.yy" { void *ctx = state; @@ -4881,7 +4889,7 @@ case 238: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1470 "glsl_parser.yy" { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list); @@ -4891,7 +4899,7 @@ case 239: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1475 "glsl_parser.yy" { (yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node); @@ -4901,7 +4909,7 @@ case 240: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1483 "glsl_parser.yy" { void *ctx = state; @@ -4918,7 +4926,7 @@ case 241: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1498 "glsl_parser.yy" { (yyval.declaration) = (yyvsp[(1) - (1)].declaration); @@ -4928,7 +4936,7 @@ case 242: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1503 "glsl_parser.yy" { (yyval.declaration) = (yyvsp[(1) - (3)].declaration); @@ -4938,7 +4946,7 @@ case 243: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1511 "glsl_parser.yy" { void *ctx = state; @@ -4950,7 +4958,7 @@ case 244: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1518 "glsl_parser.yy" { void *ctx = state; @@ -4961,14 +4969,14 @@ case 247: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1536 "glsl_parser.yy" { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;} break; case 255: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1551 "glsl_parser.yy" { void *ctx = state; @@ -4979,7 +4987,7 @@ case 256: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1557 "glsl_parser.yy" { state->symbols->push_scope(); @@ -4988,7 +4996,7 @@ case 257: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1561 "glsl_parser.yy" { void *ctx = state; @@ -5000,14 +5008,14 @@ case 258: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1570 "glsl_parser.yy" { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;} break; case 260: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1576 "glsl_parser.yy" { void *ctx = state; @@ -5018,7 +5026,7 @@ case 261: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1582 "glsl_parser.yy" { void *ctx = state; @@ -5029,7 +5037,7 @@ case 262: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1591 "glsl_parser.yy" { if ((yyvsp[(1) - (1)].node) == NULL) { @@ -5044,7 +5052,7 @@ case 263: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1601 "glsl_parser.yy" { if ((yyvsp[(2) - (2)].node) == NULL) { @@ -5058,7 +5066,7 @@ case 264: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1613 "glsl_parser.yy" { void *ctx = state; @@ -5069,7 +5077,7 @@ case 265: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1619 "glsl_parser.yy" { void *ctx = state; @@ -5080,7 +5088,7 @@ case 266: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1628 "glsl_parser.yy" { (yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement, @@ -5091,7 +5099,7 @@ case 267: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1637 "glsl_parser.yy" { (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node); @@ -5101,7 +5109,7 @@ case 268: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1642 "glsl_parser.yy" { (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node); @@ -5111,7 +5119,7 @@ case 269: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1650 "glsl_parser.yy" { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression); @@ -5120,7 +5128,7 @@ case 270: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1654 "glsl_parser.yy" { void *ctx = state; @@ -5136,7 +5144,7 @@ case 271: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1672 "glsl_parser.yy" { (yyval.node) = new(state) ast_switch_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].switch_body)); @@ -5146,7 +5154,7 @@ case 272: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1680 "glsl_parser.yy" { (yyval.switch_body) = new(state) ast_switch_body(NULL); @@ -5156,7 +5164,7 @@ case 273: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1685 "glsl_parser.yy" { (yyval.switch_body) = new(state) ast_switch_body((yyvsp[(2) - (3)].case_statement_list)); @@ -5166,7 +5174,7 @@ case 274: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1693 "glsl_parser.yy" { (yyval.case_label) = new(state) ast_case_label((yyvsp[(2) - (3)].expression)); @@ -5176,7 +5184,7 @@ case 275: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1698 "glsl_parser.yy" { (yyval.case_label) = new(state) ast_case_label(NULL); @@ -5186,7 +5194,7 @@ case 276: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1706 "glsl_parser.yy" { ast_case_label_list *labels = new(state) ast_case_label_list(); @@ -5199,7 +5207,7 @@ case 277: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1714 "glsl_parser.yy" { (yyval.case_label_list) = (yyvsp[(1) - (2)].case_label_list); @@ -5209,7 +5217,7 @@ case 278: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1722 "glsl_parser.yy" { ast_case_statement *stmts = new(state) ast_case_statement((yyvsp[(1) - (2)].case_label_list)); @@ -5222,7 +5230,7 @@ case 279: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1730 "glsl_parser.yy" { (yyval.case_statement) = (yyvsp[(1) - (2)].case_statement); @@ -5232,7 +5240,7 @@ case 280: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1738 "glsl_parser.yy" { ast_case_statement_list *cases= new(state) ast_case_statement_list(); @@ -5245,7 +5253,7 @@ case 281: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1746 "glsl_parser.yy" { (yyval.case_statement_list) = (yyvsp[(1) - (2)].case_statement_list); @@ -5255,7 +5263,7 @@ case 282: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1754 "glsl_parser.yy" { void *ctx = state; @@ -5267,7 +5275,7 @@ case 283: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1761 "glsl_parser.yy" { void *ctx = state; @@ -5279,7 +5287,7 @@ case 284: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1768 "glsl_parser.yy" { void *ctx = state; @@ -5291,7 +5299,7 @@ case 288: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1784 "glsl_parser.yy" { (yyval.node) = NULL; @@ -5300,7 +5308,7 @@ case 289: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1791 "glsl_parser.yy" { (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node); @@ -5310,7 +5318,7 @@ case 290: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1796 "glsl_parser.yy" { (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node); @@ -5320,7 +5328,7 @@ case 291: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1805 "glsl_parser.yy" { void *ctx = state; @@ -5331,7 +5339,7 @@ case 292: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1811 "glsl_parser.yy" { void *ctx = state; @@ -5342,7 +5350,7 @@ case 293: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1817 "glsl_parser.yy" { void *ctx = state; @@ -5353,7 +5361,7 @@ case 294: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1823 "glsl_parser.yy" { void *ctx = state; @@ -5364,7 +5372,7 @@ case 295: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1829 "glsl_parser.yy" { void *ctx = state; @@ -5375,28 +5383,28 @@ case 296: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1837 "glsl_parser.yy" { (yyval.node) = (yyvsp[(1) - (1)].function_definition); ;} break; case 297: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1838 "glsl_parser.yy" { (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 298: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1839 "glsl_parser.yy" { (yyval.node) = NULL; ;} break; case 299: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1844 "glsl_parser.yy" { void *ctx = state; @@ -5411,8 +5419,8 @@ -/* Line 1455 of yacc.c */ -#line 5416 "glsl_parser.cpp" +/* Line 1464 of yacc.c */ +#line 5424 "glsl_parser.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -5484,7 +5492,7 @@ #endif } - yyerror_range[0] = yylloc; + yyerror_range[1] = yylloc; if (yyerrstatus == 3) { @@ -5521,7 +5529,7 @@ if (/*CONSTCOND*/ 0) goto yyerrorlab; - yyerror_range[0] = yylsp[1-yylen]; + yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -5555,7 +5563,7 @@ if (yyssp == yyss) YYABORT; - yyerror_range[0] = *yylsp; + yyerror_range[1] = *yylsp; yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp, state); YYPOPSTACK (1); @@ -5565,10 +5573,10 @@ *++yyvsp = yylval; - yyerror_range[1] = yylloc; + yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc; /* Shift the error token. */ diff -Nru mesa-8.0.2/src/glsl/glsl_parser.h mesa-8.0.3/src/glsl/glsl_parser.h --- mesa-8.0.2/src/glsl/glsl_parser.h 2012-03-21 17:17:15.000000000 +0000 +++ mesa-8.0.3/src/glsl/glsl_parser.h 2012-05-18 23:12:03.000000000 +0000 @@ -1,10 +1,9 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.4.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -242,7 +241,7 @@ typedef union YYSTYPE { -/* Line 1676 of yacc.c */ +/* Line 1685 of yacc.c */ #line 58 "glsl_parser.yy" int n; @@ -280,8 +279,8 @@ -/* Line 1676 of yacc.c */ -#line 285 "glsl_parser.h" +/* Line 1685 of yacc.c */ +#line 284 "glsl_parser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff -Nru mesa-8.0.2/src/glsl/ir_constant_expression.cpp mesa-8.0.3/src/glsl/ir_constant_expression.cpp --- mesa-8.0.2/src/glsl/ir_constant_expression.cpp 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/glsl/ir_constant_expression.cpp 2012-05-18 23:08:34.000000000 +0000 @@ -633,13 +633,13 @@ for (unsigned c = 0; c < op[0]->type->components(); c++) { switch (op[0]->type->base_type) { case GLSL_TYPE_UINT: - data.b[0] = op[0]->value.u[0] < op[1]->value.u[0]; + data.b[c] = op[0]->value.u[c] < op[1]->value.u[c]; break; case GLSL_TYPE_INT: - data.b[0] = op[0]->value.i[0] < op[1]->value.i[0]; + data.b[c] = op[0]->value.i[c] < op[1]->value.i[c]; break; case GLSL_TYPE_FLOAT: - data.b[0] = op[0]->value.f[0] < op[1]->value.f[0]; + data.b[c] = op[0]->value.f[c] < op[1]->value.f[c]; break; default: assert(0); @@ -669,13 +669,13 @@ for (unsigned c = 0; c < op[0]->type->components(); c++) { switch (op[0]->type->base_type) { case GLSL_TYPE_UINT: - data.b[0] = op[0]->value.u[0] <= op[1]->value.u[0]; + data.b[c] = op[0]->value.u[c] <= op[1]->value.u[c]; break; case GLSL_TYPE_INT: - data.b[0] = op[0]->value.i[0] <= op[1]->value.i[0]; + data.b[c] = op[0]->value.i[c] <= op[1]->value.i[c]; break; case GLSL_TYPE_FLOAT: - data.b[0] = op[0]->value.f[0] <= op[1]->value.f[0]; + data.b[c] = op[0]->value.f[c] <= op[1]->value.f[c]; break; default: assert(0); @@ -687,13 +687,13 @@ for (unsigned c = 0; c < op[0]->type->components(); c++) { switch (op[0]->type->base_type) { case GLSL_TYPE_UINT: - data.b[0] = op[0]->value.u[0] >= op[1]->value.u[0]; + data.b[c] = op[0]->value.u[c] >= op[1]->value.u[c]; break; case GLSL_TYPE_INT: - data.b[0] = op[0]->value.i[0] >= op[1]->value.i[0]; + data.b[c] = op[0]->value.i[c] >= op[1]->value.i[c]; break; case GLSL_TYPE_FLOAT: - data.b[0] = op[0]->value.f[0] >= op[1]->value.f[0]; + data.b[c] = op[0]->value.f[c] >= op[1]->value.f[c]; break; default: assert(0); diff -Nru mesa-8.0.2/src/glsl/linker.cpp mesa-8.0.3/src/glsl/linker.cpp --- mesa-8.0.2/src/glsl/linker.cpp 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/glsl/linker.cpp 2012-05-18 23:08:33.000000000 +0000 @@ -2263,7 +2263,9 @@ if (ctx->ShaderCompilerOptions[i].LowerClipDistance) lower_clip_distance(prog->_LinkedShaders[i]->ir); - while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false, 32)) + unsigned max_unroll = ctx->ShaderCompilerOptions[i].MaxUnrollIterations; + + while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false, max_unroll)) ; } diff -Nru mesa-8.0.2/src/glsl/link_uniforms.cpp mesa-8.0.3/src/glsl/link_uniforms.cpp --- mesa-8.0.2/src/glsl/link_uniforms.cpp 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/glsl/link_uniforms.cpp 2012-05-18 23:08:33.000000000 +0000 @@ -174,8 +174,7 @@ if (this->map->get(id, name)) return; - char *key = strdup(name); - this->map->put(this->num_active_uniforms, key); + this->map->put(this->num_active_uniforms, name); /* Each leaf uniform occupies one entry in the list of active * uniforms. diff -Nru mesa-8.0.2/src/glsl/loop_unroll.cpp mesa-8.0.3/src/glsl/loop_unroll.cpp --- mesa-8.0.2/src/glsl/loop_unroll.cpp 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/glsl/loop_unroll.cpp 2012-05-18 04:27:59.000000000 +0000 @@ -56,6 +56,7 @@ { loop_variable_state *const ls = this->state->get(ir); int iterations; + unsigned ir_count; /* If we've entered a loop that hasn't been analyzed, something really, * really bad has happened. @@ -78,6 +79,20 @@ if (iterations > (int) max_iterations) return visit_continue; + /* Don't try to unroll nested loops and loops with a huge body. + */ + ir_count = 0; + foreach_list(node, &ir->body_instructions) { + ++ir_count; + + /* If the loop body gets to huge, do not unroll. */ + if (5*max_iterations < ir_count*iterations) + return visit_continue; + /* Do not unroll loops with child loop nodes. */ + if (((ir_instruction *) node)->as_loop()) + return visit_continue; + } + if (ls->num_loop_jumps > 1) return visit_continue; else if (ls->num_loop_jumps) { diff -Nru mesa-8.0.2/src/glsl/strtod.c mesa-8.0.3/src/glsl/strtod.c --- mesa-8.0.2/src/glsl/strtod.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/glsl/strtod.c 2012-05-18 04:27:14.000000000 +0000 @@ -44,7 +44,8 @@ double glsl_strtod(const char *s, char **end) { -#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) +#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \ + !defined(__HAIKU__) static locale_t loc = NULL; if (!loc) { loc = newlocale(LC_CTYPE_MASK, "C", NULL); diff -Nru mesa-8.0.2/src/glx/apple/apple_glx.c mesa-8.0.3/src/glx/apple/apple_glx.c --- mesa-8.0.2/src/glx/apple/apple_glx.c 2011-07-05 04:34:17.000000000 +0000 +++ mesa-8.0.3/src/glx/apple/apple_glx.c 2012-05-18 04:27:14.000000000 +0000 @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include "appledri.h" #include "apple_glx.h" #include "apple_glx_context.h" @@ -43,22 +45,6 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 }; -static bool diagnostic = false; - -void -apple_glx_diagnostic(const char *fmt, ...) -{ - va_list vl; - - if (diagnostic) { - fprintf(stderr, "DIAG: "); - - va_start(vl, fmt); - vfprintf(stderr, fmt, vl); - va_end(vl); - } -} - int apple_get_dri_event_base(void) { @@ -125,10 +111,9 @@ if (initialized) return false; - if (getenv("LIBGL_DIAGNOSTIC")) { - printf("initializing libGL in %s\n", __func__); - diagnostic = true; - } + apple_glx_log_init(); + + apple_glx_log(ASL_LEVEL_INFO, "Initializing libGL."); apple_cgl_init(); (void) apple_glx_get_client_id(); diff -Nru mesa-8.0.2/src/glx/apple/apple_glx_context.c mesa-8.0.3/src/glx/apple/apple_glx_context.c --- mesa-8.0.2/src/glx/apple/apple_glx_context.c 2010-07-01 11:22:50.000000000 +0000 +++ mesa-8.0.3/src/glx/apple/apple_glx_context.c 2012-05-18 04:27:14.000000000 +0000 @@ -421,7 +421,7 @@ */ if (same_drawable && ac->is_current) { - apple_glx_diagnostic("%s: same_drawable and ac->is_current\n"); + apple_glx_diagnostic("same_drawable and ac->is_current\n"); return false; } diff -Nru mesa-8.0.2/src/glx/apple/apple_glx_drawable.c mesa-8.0.3/src/glx/apple/apple_glx_drawable.c --- mesa-8.0.2/src/glx/apple/apple_glx_drawable.c 2010-07-01 11:22:50.000000000 +0000 +++ mesa-8.0.3/src/glx/apple/apple_glx_drawable.c 2012-05-18 04:27:14.000000000 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include #include "apple_glx.h" #include "apple_glx_context.h" #include "apple_glx_drawable.h" @@ -48,8 +49,8 @@ err = pthread_mutex_lock(&drawables_lock); if (err) { - fprintf(stderr, "pthread_mutex_lock failure in %s: %d\n", - __func__, err); + fprintf(stderr, "pthread_mutex_lock failure in %s: %s\n", + __func__, strerror(err)); abort(); } } @@ -62,8 +63,8 @@ err = pthread_mutex_unlock(&drawables_lock); if (err) { - fprintf(stderr, "pthread_mutex_unlock failure in %s: %d\n", - __func__, err); + fprintf(stderr, "pthread_mutex_unlock failure in %s: %s\n", + __func__, strerror(err)); abort(); } } @@ -95,7 +96,7 @@ err = pthread_mutex_lock(&agd->mutex); if (err) { - fprintf(stderr, "pthread_mutex_lock error: %d\n", err); + fprintf(stderr, "pthread_mutex_lock error: %s\n", strerror(err)); abort(); } } @@ -108,7 +109,7 @@ err = pthread_mutex_unlock(&d->mutex); if (err) { - fprintf(stderr, "pthread_mutex_unlock error: %d\n", err); + fprintf(stderr, "pthread_mutex_unlock error: %s\n", strerror(err)); abort(); } } @@ -135,6 +136,7 @@ static bool destroy_drawable(struct apple_glx_drawable *d) { + int err; d->lock(d); @@ -172,6 +174,15 @@ apple_glx_diagnostic("%s: freeing %p\n", __func__, (void *) d); + /* Stupid recursive locks */ + while (pthread_mutex_unlock(&d->mutex) == 0); + + err = pthread_mutex_destroy(&d->mutex); + if (err) { + fprintf(stderr, "pthread_mutex_destroy error: %s\n", strerror(err)); + abort(); + } + free(d); /* So that the locks are balanced and the caller correctly unlocks. */ @@ -238,7 +249,7 @@ err = pthread_mutexattr_init(&attr); if (err) { - fprintf(stderr, "pthread_mutexattr_init error: %d\n", err); + fprintf(stderr, "pthread_mutexattr_init error: %s\n", strerror(err)); abort(); } @@ -250,14 +261,14 @@ err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); if (err) { - fprintf(stderr, "error: setting pthread mutex type: %d\n", err); + fprintf(stderr, "error: setting pthread mutex type: %s\n", strerror(err)); abort(); } err = pthread_mutex_init(&d->mutex, &attr); if (err) { - fprintf(stderr, "pthread_mutex_init error: %d\n", err); + fprintf(stderr, "pthread_mutex_init error: %s\n", strerror(err)); abort(); } diff -Nru mesa-8.0.2/src/glx/apple/apple_glx.h mesa-8.0.3/src/glx/apple/apple_glx.h --- mesa-8.0.2/src/glx/apple/apple_glx.h 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/glx/apple/apple_glx.h 2012-05-18 04:27:14.000000000 +0000 @@ -38,7 +38,8 @@ #define XP_NO_X_HEADERS #include -void apple_glx_diagnostic(const char *fmt, ...); +#include "apple_glx_log.h" + xp_client_id apple_glx_get_client_id(void); bool apple_init_glx(Display * dpy); void apple_glx_swap_buffers(void *ptr); diff -Nru mesa-8.0.2/src/glx/apple/apple_glx_log.c mesa-8.0.3/src/glx/apple/apple_glx_log.c --- mesa-8.0.2/src/glx/apple/apple_glx_log.c 1970-01-01 00:00:00.000000000 +0000 +++ mesa-8.0.3/src/glx/apple/apple_glx_log.c 2012-05-18 23:08:32.000000000 +0000 @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2012 Apple Inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + * HOLDER(S) 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. + * + * Except as contained in this notice, the name(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "apple_glx_log.h" + +static bool diagnostic = false; +static aslclient aslc; + +void apple_glx_log_init(void) { + if (getenv("LIBGL_DIAGNOSTIC")) { + diagnostic = true; + } + + aslc = asl_open(NULL, NULL, 0); +} + +void _apple_glx_log(int level, const char *file, const char *function, + int line, const char *fmt, ...) { + va_list v; + va_start(v, fmt); + _apple_glx_vlog(level, file, function, line, fmt, v); + va_end(v); +} + +static const char * +_asl_level_string(int level) +{ + if (level == ASL_LEVEL_EMERG) return ASL_STRING_EMERG; + if (level == ASL_LEVEL_ALERT) return ASL_STRING_ALERT; + if (level == ASL_LEVEL_CRIT) return ASL_STRING_CRIT; + if (level == ASL_LEVEL_ERR) return ASL_STRING_ERR; + if (level == ASL_LEVEL_WARNING) return ASL_STRING_WARNING; + if (level == ASL_LEVEL_NOTICE) return ASL_STRING_NOTICE; + if (level == ASL_LEVEL_INFO) return ASL_STRING_INFO; + if (level == ASL_LEVEL_DEBUG) return ASL_STRING_DEBUG; + return "unknown"; +} + +void _apple_glx_vlog(int level, const char *file, const char *function, + int line, const char *fmt, va_list args) { + aslmsg msg; + uint64_t thread = 0; + + if (pthread_is_threaded_np()) { +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 + thread = (uint64_t)(uintptr_t)pthread_self(); +#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060 + if (&pthread_threadid_np) { + pthread_threadid_np(NULL, &thread); + } else { + thread = (uint64_t)(uintptr_t)pthread_self(); + } +#else + pthread_threadid_np(NULL, &thread); +#endif + } + + if (diagnostic) { + va_list args2; + va_copy(args2, args); + + fprintf(stderr, "%-9s %24s:%-4d %s(%"PRIu64"): ", + _asl_level_string(level), file, line, function, thread); + vfprintf(stderr, fmt, args2); + } + + msg = asl_new(ASL_TYPE_MSG); + if (msg) { + if (file) + asl_set(msg, "File", file); + if (function) + asl_set(msg, "Function", function); + if (line) { + char *_line; + asprintf(&_line, "%d", line); + if (_line) { + asl_set(msg, "Line", _line); + free(_line); + } + } + if (pthread_is_threaded_np()) { + char *_thread; + asprintf(&_thread, "%"PRIu64, thread); + if (_thread) { + asl_set(msg, "Thread", _thread); + free(_thread); + } + } + } + + asl_vlog(aslc, msg, level, fmt, args); + if (msg) + asl_free(msg); +} diff -Nru mesa-8.0.2/src/glx/apple/apple_glx_log.h mesa-8.0.3/src/glx/apple/apple_glx_log.h --- mesa-8.0.2/src/glx/apple/apple_glx_log.h 1970-01-01 00:00:00.000000000 +0000 +++ mesa-8.0.3/src/glx/apple/apple_glx_log.h 2012-05-18 04:27:14.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2012 Apple Inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + * HOLDER(S) 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. + * + * Except as contained in this notice, the name(s) of the above + * copyright holders shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization. + */ + +#ifndef APPLE_GLX_LOG_H +#define APPLE_GLX_LOG_H + +#include +#include + +void apple_glx_log_init(void); + +__printflike(5, 6) +void _apple_glx_log(int level, const char *file, const char *function, + int line, const char *fmt, ...); +#define apple_glx_log(l, f, args ...) \ + _apple_glx_log(l, __FILE__, __FUNCTION__, __LINE__, f, ## args) + + +__printflike(5, 0) +void _apple_glx_vlog(int level, const char *file, const char *function, + int line, const char *fmt, va_list v); +#define apple_glx_vlog(l, f, v) \ + _apple_glx_vlog(l, __FILE__, __FUNCTION__, __LINE__, f, v) + +/* This is just here to help the transition. + * TODO: Replace calls to apple_glx_diagnostic + */ +#define apple_glx_diagnostic(f, args ...) \ + apple_glx_log(ASL_LEVEL_DEBUG, f, ## args) + +#endif diff -Nru mesa-8.0.2/src/glx/apple/apple_glx_surface.c mesa-8.0.3/src/glx/apple/apple_glx_surface.c --- mesa-8.0.2/src/glx/apple/apple_glx_surface.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/glx/apple/apple_glx_surface.c 2012-05-18 04:27:14.000000000 +0000 @@ -206,6 +206,7 @@ if (d) { d->types.surface.pending_destroy = true; d->release(d); + /* * We release 2 references to the surface. One was acquired by * the find, and the other was leftover from a context, or @@ -216,8 +217,9 @@ * to actually destroy it when the pending_destroy is processed * by a glViewport callback (see apple_glx_context_update()). */ - d->destroy(d); - - d->unlock(d); + if (!d->destroy(d)) { + /* apple_glx_drawable_find_by_uid returns a locked drawable */ + d->unlock(d); + } } } diff -Nru mesa-8.0.2/src/glx/apple/Makefile mesa-8.0.3/src/glx/apple/Makefile --- mesa-8.0.2/src/glx/apple/Makefile 2012-03-20 14:13:55.000000000 +0000 +++ mesa-8.0.3/src/glx/apple/Makefile 2012-05-18 04:27:14.000000000 +0000 @@ -26,6 +26,7 @@ apple_glx.c \ apple_glx_context.c \ apple_glx_drawable.c \ + apple_glx_log.c \ apple_glx_pbuffer.c \ apple_glx_pixmap.c \ apple_glx_surface.c \ diff -Nru mesa-8.0.2/src/glx/compsize.c mesa-8.0.3/src/glx/compsize.c --- mesa-8.0.2/src/glx/compsize.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/glx/compsize.c 2012-05-18 04:27:14.000000000 +0000 @@ -71,6 +71,7 @@ case GL_422_REV_EXT: case GL_422_AVERAGE_EXT: case GL_422_REV_AVERAGE_EXT: + case GL_DEPTH_STENCIL_NV: case GL_YCBCR_422_APPLE: case GL_LUMINANCE_ALPHA: return 2; diff -Nru mesa-8.0.2/src/glx/drisw_glx.c mesa-8.0.3/src/glx/drisw_glx.c --- mesa-8.0.2/src/glx/drisw_glx.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/glx/drisw_glx.c 2012-05-18 23:08:33.000000000 +0000 @@ -91,6 +91,9 @@ visMask = VisualIDMask; pdp->visinfo = XGetVisualInfo(dpy, visMask, &visTemp, &num_visuals); + if (!pdp->visinfo || num_visuals == 0) + return False; + /* create XImage */ pdp->ximage = XCreateImage(dpy, pdp->visinfo->visual, @@ -513,7 +516,7 @@ struct drisw_drawable *pdp; __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) modes; struct drisw_screen *psc = (struct drisw_screen *) base; - + Bool ret; const __DRIswrastExtension *swrast = psc->swrast; pdp = Xmalloc(sizeof(*pdp)); @@ -525,7 +528,11 @@ pdp->base.drawable = drawable; pdp->base.psc = &psc->base; - XCreateDrawable(pdp, psc->base.dpy, xDrawable, modes->visualID); + ret = XCreateDrawable(pdp, psc->base.dpy, xDrawable, modes->visualID); + if (!ret) { + Xfree(pdp); + return NULL; + } /* Create a new drawable */ pdp->driDrawable = diff -Nru mesa-8.0.2/src/mapi/glapi/glapi_gentable.c mesa-8.0.3/src/mapi/glapi/glapi_gentable.c --- mesa-8.0.2/src/mapi/glapi/glapi_gentable.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mapi/glapi/glapi_gentable.c 2012-05-18 04:27:14.000000000 +0000 @@ -105,7 +105,7 @@ struct _glapi_table * _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { - struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table)); + struct _glapi_table *disp = calloc(_glapi_get_dispatch_table_size(), sizeof(void *)); char symboln[512]; if(!disp) diff -Nru mesa-8.0.2/src/mesa/drivers/dri/common/drirc mesa-8.0.3/src/mesa/drivers/dri/common/drirc --- mesa-8.0.2/src/mesa/drivers/dri/common/drirc 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/common/drirc 2012-05-18 06:08:05.000000000 +0000 @@ -6,5 +6,11 @@ + + + + diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/i830_state.c mesa-8.0.3/src/mesa/drivers/dri/i915/i830_state.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/i830_state.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/i830_state.c 2012-05-18 06:07:08.000000000 +0000 @@ -436,7 +436,10 @@ struct i830_context *i830 = i830_context(ctx); DBG("%s flag (%d)\n", __FUNCTION__, flag); - + + if (!ctx->DrawBuffer || !ctx->DrawBuffer->Visual.depthBits) + flag = false; + I830_STATECHANGE(i830, I830_UPLOAD_CTX); i830->state.Ctx[I830_CTXREG_ENABLES_2] &= ~ENABLE_DIS_DEPTH_WRITE_MASK; @@ -473,7 +476,7 @@ i830PolygonStipple(struct gl_context * ctx, const GLubyte * mask) { struct i830_context *i830 = i830_context(ctx); - const GLubyte *m = mask; + const GLubyte *m; GLubyte p[4]; int i, j, k; int active = (ctx->Polygon.StippleFlag && @@ -485,6 +488,12 @@ i830->state.Stipple[I830_STPREG_ST1] &= ~ST1_ENABLE; } + /* Use the already unpacked stipple data from the context rather than the + * uninterpreted mask passed in. + */ + mask = (const GLubyte *)ctx->PolygonStipple; + m = mask; + p[0] = mask[12] & 0xf; p[0] |= p[0] << 4; p[1] = mask[8] & 0xf; @@ -795,6 +804,9 @@ I830_STATECHANGE(i830, I830_UPLOAD_CTX); i830->state.Ctx[I830_CTXREG_ENABLES_1] &= ~ENABLE_DIS_DEPTH_TEST_MASK; + if (!ctx->DrawBuffer || !ctx->DrawBuffer->Visual.depthBits) + state = false; + if (state) i830->state.Ctx[I830_CTXREG_ENABLES_1] |= ENABLE_DEPTH_TEST; else diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/i830_vtbl.c mesa-8.0.3/src/mesa/drivers/dri/i915/i830_vtbl.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/i830_vtbl.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/i830_vtbl.c 2012-05-18 06:06:13.000000000 +0000 @@ -692,8 +692,8 @@ state->Buffer[I830_DESTREG_DRAWRECT1] = 0; state->Buffer[I830_DESTREG_DRAWRECT2] = (draw_y << 16) | draw_x; state->Buffer[I830_DESTREG_DRAWRECT3] = - ((ctx->DrawBuffer->Width + draw_x) & 0xffff) | - ((ctx->DrawBuffer->Height + draw_y) << 16); + ((ctx->DrawBuffer->Width + draw_x - 1) & 0xffff) | + ((ctx->DrawBuffer->Height + draw_y - 1) << 16); state->Buffer[I830_DESTREG_DRAWRECT4] = (draw_y << 16) | draw_x; state->Buffer[I830_DESTREG_DRAWRECT5] = MI_NOOP; @@ -826,8 +826,7 @@ /* * Update depth and stencil test state */ - ctx->Driver.Enable(ctx, GL_DEPTH_TEST, - (ctx->Depth.Test && fb->Visual.depthBits > 0)); + ctx->Driver.Enable(ctx, GL_DEPTH_TEST, ctx->Depth.Test); ctx->Driver.Enable(ctx, GL_STENCIL_TEST, (ctx->Stencil.Enabled && fb->Visual.stencilBits > 0)); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/i915_context.c mesa-8.0.3/src/mesa/drivers/dri/i915/i915_context.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/i915_context.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/i915_context.c 2012-05-18 04:27:14.000000000 +0000 @@ -76,6 +76,8 @@ i915_update_provoking_vertex(ctx); if (new_state & (_NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS)) i915_update_program(ctx); + if (new_state & (_NEW_PROGRAM | _NEW_POINT)) + i915_update_sprite_point_enable(ctx); } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/i915_context.h mesa-8.0.3/src/mesa/drivers/dri/i915/i915_context.h --- mesa-8.0.2/src/mesa/drivers/dri/i915/i915_context.h 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/i915_context.h 2012-05-18 04:27:14.000000000 +0000 @@ -40,6 +40,7 @@ #define I915_FALLBACK_POINT_SMOOTH 0x80000 #define I915_FALLBACK_POINT_SPRITE_COORD_ORIGIN 0x100000 #define I915_FALLBACK_DRAW_OFFSET 0x200000 +#define I915_FALLBACK_COORD_REPLACE 0x400000 #define I915_UPLOAD_CTX 0x1 #define I915_UPLOAD_BUFFERS 0x2 @@ -338,6 +339,7 @@ extern void i915InitState(struct i915_context *i915); extern void i915_update_stencil(struct gl_context * ctx); extern void i915_update_provoking_vertex(struct gl_context *ctx); +extern void i915_update_sprite_point_enable(struct gl_context *ctx); /*====================================================================== diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/i915_state.c mesa-8.0.3/src/mesa/drivers/dri/i915/i915_state.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/i915_state.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/i915_state.c 2012-05-18 04:27:14.000000000 +0000 @@ -652,6 +652,48 @@ } } +void +i915_update_sprite_point_enable(struct gl_context *ctx) +{ + struct intel_context *intel = intel_context(ctx); + /* _NEW_PROGRAM */ + struct i915_fragment_program *p = + (struct i915_fragment_program *) ctx->FragmentProgram._Current; + const GLbitfield64 inputsRead = p->FragProg.Base.InputsRead; + struct i915_context *i915 = i915_context(ctx); + GLuint s4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_VFMT_MASK; + int i; + GLuint coord_replace_bits = 0x0; + GLuint tex_coord_unit_bits = 0x0; + + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + /* _NEW_POINT */ + if (ctx->Point.CoordReplace[i] && ctx->Point.PointSprite) + coord_replace_bits |= (1 << i); + if (inputsRead & FRAG_BIT_TEX(i)) + tex_coord_unit_bits |= (1 << i); + } + + /* + * Here we can't enable the SPRITE_POINT_ENABLE bit when the mis-match + * of tex_coord_unit_bits and coord_replace_bits, or this will make all + * the other non-point-sprite coords(like varying inputs, as we now use + * tex coord to implement varying inputs) be replaced to value (0, 0)-(1, 1). + * + * Thus, do fallback when needed. + */ + FALLBACK(intel, I915_FALLBACK_COORD_REPLACE, + coord_replace_bits && coord_replace_bits != tex_coord_unit_bits); + + s4 &= ~S4_SPRITE_POINT_ENABLE; + s4 |= (coord_replace_bits && coord_replace_bits == tex_coord_unit_bits) ? + S4_SPRITE_POINT_ENABLE : 0; + if (s4 != i915->state.Ctx[I915_CTXREG_LIS4]) { + i915->state.Ctx[I915_CTXREG_LIS4] = s4; + I915_STATECHANGE(i915, I915_UPLOAD_CTX); + } +} + /* ============================================================= * Color masks @@ -869,18 +911,7 @@ break; case GL_POINT_SPRITE: - /* This state change is handled in i915_reduced_primitive_state because - * the hardware bit should only be set when rendering points. - */ - dw = i915->state.Ctx[I915_CTXREG_LIS4]; - if (state) - dw |= S4_SPRITE_POINT_ENABLE; - else - dw &= ~S4_SPRITE_POINT_ENABLE; - if (dw != i915->state.Ctx[I915_CTXREG_LIS4]) { - i915->state.Ctx[I915_CTXREG_LIS4] = dw; - I915_STATECHANGE(i915, I915_UPLOAD_CTX); - } + /* Handle it at i915_update_sprite_point_enable () */ break; case GL_POINT_SMOOTH: diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_context.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_context.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_context.c 2012-03-21 17:55:52.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_context.c 2012-05-18 04:27:14.000000000 +0000 @@ -183,6 +183,7 @@ chipset = "Intel(R) Ivybridge Mobile"; break; case PCI_CHIP_IVYBRIDGE_S_GT1: + case PCI_CHIP_IVYBRIDGE_S_GT2: chipset = "Intel(R) Ivybridge Server"; break; default: @@ -1225,6 +1226,10 @@ if (!rb) return; + /* Check if we failed to allocate the depth miptree earlier. */ + if (buffer->attachment == __DRI_BUFFER_HIZ && rb->mt == NULL) + return; + /* If the renderbuffer's and DRIbuffer's regions match, then continue. */ if ((buffer->attachment != __DRI_BUFFER_HIZ && rb->mt && @@ -1266,6 +1271,7 @@ * due to failure to allocate new storage. */ if (buffer->attachment == __DRI_BUFFER_HIZ) { + assert(rb->mt); intel_miptree_release(&rb->mt->hiz_mt); } else { intel_miptree_release(&rb->mt); @@ -1291,6 +1297,7 @@ /* Associate buffer with new storage. */ if (buffer->attachment == __DRI_BUFFER_HIZ) { + assert(rb->mt); rb->mt->hiz_mt = mt; } else { rb->mt = mt; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_extensions_es.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_extensions_es.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_extensions_es.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_extensions_es.c 2012-05-18 23:08:34.000000000 +0000 @@ -66,7 +66,6 @@ "GL_EXT_blend_func_separate", "GL_EXT_blend_subtract", "GL_OES_draw_texture", - "GL_ARB_framebuffer_object", "GL_EXT_framebuffer_object", "GL_ARB_point_sprite", "GL_EXT_stencil_wrap", @@ -92,7 +91,6 @@ "GL_NV_blend_square", /* Optional GLES2 */ - "GL_ARB_framebuffer_object", "GL_ARB_depth_texture", "GL_EXT_framebuffer_object", diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_fbo.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_fbo.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_fbo.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_fbo.c 2012-05-18 23:08:34.000000000 +0000 @@ -237,6 +237,9 @@ _mesa_lookup_enum_by_nr(internalFormat), _mesa_get_format_name(rb->Format), width, height); + if (width == 0 || height == 0) + return true; + irb->mt = intel_miptree_create_for_renderbuffer(intel, rb->Format, width, height); if (!irb->mt) @@ -553,22 +556,6 @@ } } -#ifndef I915 -static bool -need_tile_offset_workaround(struct brw_context *brw, - struct intel_renderbuffer *irb) -{ - uint32_t tile_x, tile_y; - - if (brw->has_surface_tile_offset) - return false; - - intel_renderbuffer_tile_offsets(irb, &tile_x, &tile_y); - - return tile_x != 0 || tile_y != 0; -} -#endif - /** * Called by glFramebufferTexture[123]DEXT() (and other places) to * prepare for rendering into texture memory. This might be called @@ -626,42 +613,13 @@ return; } + irb->tex_image = image; + DBG("Begin render %s texture tex=%u w=%d h=%d refcount=%d\n", _mesa_get_format_name(image->TexFormat), att->Texture->Name, image->Width, image->Height, irb->Base.Base.RefCount); - intel_image->used_as_render_target = true; - -#ifndef I915 - if (need_tile_offset_workaround(brw_context(ctx), irb)) { - /* Original gen4 hardware couldn't draw to a non-tile-aligned - * destination in a miptree unless you actually setup your - * renderbuffer as a miptree and used the fragile - * lod/array_index/etc. controls to select the image. So, - * instead, we just make a new single-level miptree and render - * into that. - */ - struct intel_context *intel = intel_context(ctx); - struct intel_mipmap_tree *new_mt; - int width, height, depth; - - intel_miptree_get_dimensions_for_image(image, &width, &height, &depth); - - new_mt = intel_miptree_create(intel, image->TexObject->Target, - intel_image->base.Base.TexFormat, - intel_image->base.Base.Level, - intel_image->base.Base.Level, - width, height, depth, - true); - - intel_miptree_copy_teximage(intel, intel_image, new_mt); - intel_renderbuffer_set_draw_offset(irb); - - intel_miptree_reference(&irb->mt, intel_image->mt); - intel_miptree_release(&new_mt); - } -#endif /* update drawing region, etc */ intel_draw_buffer(ctx); } @@ -678,14 +636,13 @@ struct gl_texture_object *tex_obj = att->Texture; struct gl_texture_image *image = tex_obj->Image[att->CubeMapFace][att->TextureLevel]; - struct intel_texture_image *intel_image = intel_texture_image(image); + struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer); DBG("Finish render %s texture tex=%u\n", _mesa_get_format_name(image->TexFormat), att->Texture->Name); - /* Flag that this image may now be validated into the object's miptree. */ - if (intel_image) - intel_image->used_as_render_target = false; + if (irb) + irb->tex_image = NULL; /* Since we've (probably) rendered to the texture and will (likely) use * it in the texture domain later on in this batchbuffer, flush the diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_mipmap_tree.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_mipmap_tree.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_mipmap_tree.c 2012-03-21 17:55:52.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_mipmap_tree.c 2012-05-18 06:13:50.000000000 +0000 @@ -702,15 +702,20 @@ y /= bh; base = intel_region_map(intel, mt->region, map->mode); - /* Note that in the case of cube maps, the caller must have passed the slice - * number referencing the face. - */ - intel_miptree_get_image_offset(mt, level, 0, slice, &image_x, &image_y); - x += image_x; - y += image_y; - map->stride = mt->region->pitch * mt->cpp; - map->ptr = base + y * map->stride + x * mt->cpp; + if (base == NULL) + map->ptr = NULL; + else { + /* Note that in the case of cube maps, the caller must have passed the + * slice number referencing the face. + */ + intel_miptree_get_image_offset(mt, level, 0, slice, &image_x, &image_y); + x += image_x; + y += image_y; + + map->stride = mt->region->pitch * mt->cpp; + map->ptr = base + y * map->stride + x * mt->cpp; + } DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __FUNCTION__, map->x, map->y, map->w, map->h, @@ -1067,6 +1072,11 @@ *out_ptr = map->ptr; *out_stride = map->stride; + + if (map->ptr == NULL) { + mt->level[level].slice[slice].map = NULL; + free(map); + } } void diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_pixel_bitmap.c 2012-05-18 23:08:34.000000000 +0000 @@ -337,9 +337,5 @@ unpack, pixels)) return; - /* FIXME */ - if (intel->gen == 6) - return _swrast_Bitmap(ctx, x, y, width, height, unpack, pixels); - _mesa_meta_Bitmap(ctx, x, y, width, height, unpack, pixels); } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_regions.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_regions.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_regions.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_regions.c 2012-05-18 06:38:07.000000000 +0000 @@ -124,7 +124,7 @@ */ _DBG("%s %p\n", __FUNCTION__, region); - if (!region->map_refcount++) { + if (!region->map_refcount) { intel_flush(&intel->ctx); if (region->tiling != I915_TILING_NONE) @@ -133,7 +133,10 @@ drm_intel_bo_map(region->bo, true); region->map = region->bo->virtual; - ++intel->num_mapped_regions; + } + if (region->map) { + intel->num_mapped_regions++; + region->map_refcount++; } return region->map; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_render.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_render.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_render.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_render.c 2012-05-18 06:07:08.000000000 +0000 @@ -119,13 +119,15 @@ intel_set_prim(intel, hw_prim[prim]); } +#define INTEL_NO_VBO_STATE_RESERVED 1500 + static INLINE GLuint intel_get_vb_max(struct intel_context *intel) { GLuint ret; - if (intel->intelScreen->no_vbo) - ret = sizeof(intel->batch.map) - 1500; - else + if (intel->intelScreen->no_vbo) { + ret = intel->batch.bo->size - INTEL_NO_VBO_STATE_RESERVED; + } else ret = INTEL_VB_SIZE; ret /= (intel->vertex_size * 4); return ret; @@ -133,11 +135,15 @@ static INLINE GLuint intel_get_current_max(struct intel_context *intel) { + GLuint ret; + + if (intel->intelScreen->no_vbo) { + ret = intel_batchbuffer_space(intel); + ret = ret <= INTEL_NO_VBO_STATE_RESERVED ? 0 : ret - INTEL_NO_VBO_STATE_RESERVED; + } else + ret = (INTEL_VB_SIZE - intel->prim.current_offset); - if (intel->intelScreen->no_vbo) - return intel_get_vb_max(intel); - else - return (INTEL_VB_SIZE - intel->prim.current_offset) / (intel->vertex_size * 4); + return ret / (intel->vertex_size * 4); } #define LOCAL_VARS struct intel_context *intel = intel_context(ctx) diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_tex.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_tex.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_tex.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_tex.c 2012-05-18 06:05:12.000000000 +0000 @@ -84,6 +84,8 @@ assert(!intel_image->base.ImageOffsets); intel_image->base.ImageOffsets = malloc(slices * sizeof(GLuint)); + _swrast_init_texture_image(image, width, height, depth); + if (intel_texobj->mt && intel_miptree_match_image(intel_texobj->mt, image)) { intel_miptree_reference(&intel_image->mt, intel_texobj->mt); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_tex_image.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_tex_image.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_tex_image.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_tex_image.c 2012-05-18 23:08:33.000000000 +0000 @@ -341,13 +341,18 @@ if (!rb || !rb->mt) return; - if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + if (rb->mt->cpp == 4) { + if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + internalFormat = GL_RGB; + texFormat = MESA_FORMAT_XRGB8888; + } + else { + internalFormat = GL_RGBA; + texFormat = MESA_FORMAT_ARGB8888; + } + } else if (rb->mt->cpp == 2) { internalFormat = GL_RGB; - texFormat = MESA_FORMAT_XRGB8888; - } - else { - internalFormat = GL_RGBA; - texFormat = MESA_FORMAT_ARGB8888; + texFormat = MESA_FORMAT_RGB565; } _mesa_lock_texture(&intel->ctx, texObj); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_tex_validate.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_tex_validate.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_tex_validate.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_tex_validate.c 2012-05-18 04:27:14.000000000 +0000 @@ -97,14 +97,8 @@ /* skip too small size mipmap */ if (intelImage == NULL) break; - /* Need to import images in main memory or held in other trees. - * If it's a render target, then its data isn't needed to be in - * the object tree (otherwise we'd be FBO incomplete), and we need - * to keep track of the image's MT as needing to be pulled in still, - * or we'll lose the rendering that's done to it. - */ - if (intelObj->mt != intelImage->mt && - !intelImage->used_as_render_target) { + + if (intelObj->mt != intelImage->mt) { intel_miptree_copy_teximage(intel, intelImage, intelObj->mt); } } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i915/intel_tris.c mesa-8.0.3/src/mesa/drivers/dri/i915/intel_tris.c --- mesa-8.0.2/src/mesa/drivers/dri/i915/intel_tris.c 2012-03-20 14:13:55.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i915/intel_tris.c 2012-05-18 04:27:14.000000000 +0000 @@ -1198,6 +1198,7 @@ [19] = "Smooth point", [20] = "point sprite coord origin", [21] = "depth/color drawing offset", + [22] = "coord replace(SPRITE POINT ENABLE)", }; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/brw_eu_emit.c mesa-8.0.3/src/mesa/drivers/dri/i965/brw_eu_emit.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/brw_eu_emit.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/brw_eu_emit.c 2012-05-18 04:27:14.000000000 +0000 @@ -1339,6 +1339,20 @@ return insn; } +struct brw_instruction *gen6_HALT(struct brw_compile *p) +{ + struct brw_instruction *insn; + + insn = next_insn(p, BRW_OPCODE_HALT); + brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src0(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); + brw_set_src1(p, insn, brw_imm_d(0x0)); /* UIP and JIP, updated later. */ + + insn->header.compression_control = BRW_COMPRESSION_NONE; + insn->header.execution_size = BRW_EXECUTE_8; + return insn; +} + /* DO/WHILE loop: * * The DO/WHILE is just an unterminated loop -- break or continue are @@ -2395,8 +2409,8 @@ return ip; } } - assert(!"not reached"); - return start + 1; + + return 0; } /* There is no DO instruction on gen6, so to find the end of the loop @@ -2425,7 +2439,7 @@ } /* After program generation, go back and update the UIP and JIP of - * BREAK and CONT instructions to their correct locations. + * BREAK, CONT, and HALT instructions to their correct locations. */ void brw_set_uip_jip(struct brw_compile *p) @@ -2439,21 +2453,50 @@ for (ip = 0; ip < p->nr_insn; ip++) { struct brw_instruction *insn = &p->store[ip]; + int block_end_ip = 0; + + if (insn->header.opcode == BRW_OPCODE_BREAK || + insn->header.opcode == BRW_OPCODE_CONTINUE || + insn->header.opcode == BRW_OPCODE_HALT) { + block_end_ip = brw_find_next_block_end(p, ip); + } switch (insn->header.opcode) { case BRW_OPCODE_BREAK: - insn->bits3.break_cont.jip = br * (brw_find_next_block_end(p, ip) - ip); + assert(block_end_ip != 0); + insn->bits3.break_cont.jip = br * (block_end_ip - ip); /* Gen7 UIP points to WHILE; Gen6 points just after it */ insn->bits3.break_cont.uip = br * (brw_find_loop_end(p, ip) - ip + (intel->gen == 6 ? 1 : 0)); break; case BRW_OPCODE_CONTINUE: - insn->bits3.break_cont.jip = br * (brw_find_next_block_end(p, ip) - ip); + assert(block_end_ip != 0); + insn->bits3.break_cont.jip = br * (block_end_ip - ip); insn->bits3.break_cont.uip = br * (brw_find_loop_end(p, ip) - ip); assert(insn->bits3.break_cont.uip != 0); assert(insn->bits3.break_cont.jip != 0); break; + case BRW_OPCODE_HALT: + /* From the Sandy Bridge PRM (volume 4, part 2, section 8.3.19): + * + * "In case of the halt instruction not inside any conditional code + * block, the value of and should be the same. In case + * of the halt instruction inside conditional code block, the + * should be the end of the program, and the should be end of + * the most inner conditional code block." + * + * The uip will have already been set by whoever set up the + * instruction. + */ + if (block_end_ip == 0) { + insn->bits3.break_cont.jip = insn->bits3.break_cont.uip; + } else { + insn->bits3.break_cont.jip = br * (block_end_ip - ip); + } + assert(insn->bits3.break_cont.uip != 0); + assert(insn->bits3.break_cont.jip != 0); + break; } } } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/brw_eu.h mesa-8.0.3/src/mesa/drivers/dri/i965/brw_eu.h --- mesa-8.0.2/src/mesa/drivers/dri/i965/brw_eu.h 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/brw_eu.h 2012-05-18 04:27:14.000000000 +0000 @@ -1048,6 +1048,7 @@ struct brw_instruction *brw_BREAK(struct brw_compile *p); struct brw_instruction *brw_CONT(struct brw_compile *p); struct brw_instruction *gen6_CONT(struct brw_compile *p); +struct brw_instruction *gen6_HALT(struct brw_compile *p); /* Forward jumps: */ void brw_land_fwd_jump(struct brw_compile *p, int jmp_insn_idx); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/brw_fs_emit.cpp mesa-8.0.3/src/mesa/drivers/dri/i965/brw_fs_emit.cpp --- mesa-8.0.2/src/mesa/drivers/dri/i965/brw_fs_emit.cpp 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/brw_fs_emit.cpp 2012-05-18 04:27:14.000000000 +0000 @@ -37,11 +37,55 @@ #include "glsl/ir_print_visitor.h" void +fs_visitor::patch_discard_jumps_to_fb_writes() +{ + if (intel->gen < 6 || this->discard_halt_patches.is_empty()) + return; + + /* There is a somewhat strange undocumented requirement of using + * HALT, according to the simulator. If some channel has HALTed to + * a particular UIP, then by the end of the program, every channel + * must have HALTed to that UIP. Furthermore, the tracking is a + * stack, so you can't do the final halt of a UIP after starting + * halting to a new UIP. + * + * Symptoms of not emitting this instruction on actual hardware + * included GPU hangs and sparkly rendering on the piglit discard + * tests. + */ + struct brw_instruction *last_halt = gen6_HALT(p); + last_halt->bits3.break_cont.uip = 2; + last_halt->bits3.break_cont.jip = 2; + + int ip = p->nr_insn; + + foreach_list(node, &this->discard_halt_patches) { + ip_record *patch_ip = (ip_record *)node; + struct brw_instruction *patch = &p->store[patch_ip->ip]; + int br = (intel->gen >= 5) ? 2 : 1; + + /* HALT takes a distance from the pre-incremented IP, so '1' + * would be the next instruction after jmpi. + */ + assert(patch->header.opcode == BRW_OPCODE_HALT); + patch->bits3.break_cont.uip = (ip - patch_ip->ip) * br; + } + + this->discard_halt_patches.make_empty(); +} + +void fs_visitor::generate_fb_write(fs_inst *inst) { bool eot = inst->eot; struct brw_reg implied_header; + /* Note that the jumps emitted to this point mean that the g0 -> + * base_mrf setup must be inside of this function, so that we jump + * to a point containing it. + */ + patch_discard_jumps_to_fb_writes(); + /* Header is 2 regs, g0 and g1 are the contents. g0 will be implied * move, here's g1. */ @@ -482,6 +526,17 @@ brw_set_mask_control(p, BRW_MASK_DISABLE); brw_AND(p, g1, f0, g1); brw_pop_insn_state(p); + + /* GLSL 1.30+ say that discarded channels should stop executing + * (so, for example, an infinite loop that would otherwise in + * just that channel does not occur. + * + * This HALT will be patched up at FB write time to point UIP at + * the end of the program, and at brw_uip_jip() JIP will be set + * to the end of the current block (or the program). + */ + this->discard_halt_patches.push_tail(new(mem_ctx) ip_record(p->nr_insn)); + gen6_HALT(p); } else { struct brw_reg g0 = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/brw_fs.h mesa-8.0.3/src/mesa/drivers/dri/i965/brw_fs.h --- mesa-8.0.2/src/mesa/drivers/dri/i965/brw_fs.h 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/brw_fs.h 2012-05-18 04:27:14.000000000 +0000 @@ -171,6 +171,26 @@ static const fs_reg reg_null_f(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_F); static const fs_reg reg_null_d(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_D); +class ip_record : public exec_node { +public: + static void* operator new(size_t size, void *ctx) + { + void *node; + + node = rzalloc_size(ctx, size); + assert(node != NULL); + + return node; + } + + ip_record(int ip) + { + this->ip = ip; + } + + int ip; +}; + class fs_inst : public exec_node { public: /* Callers of this ralloc-based new need not call delete. It's @@ -489,6 +509,7 @@ bool remove_duplicate_mrf_writes(); bool virtual_grf_interferes(int a, int b); void schedule_instructions(); + void patch_discard_jumps_to_fb_writes(); void fail(const char *msg, ...); void push_force_uncompressed(); @@ -571,6 +592,7 @@ struct gl_shader_program *prog; void *mem_ctx; exec_list instructions; + exec_list discard_halt_patches; /* Delayed setup of c->prog_data.params[] due to realloc of * ParamValues[] during compile. diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp mesa-8.0.3/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp --- mesa-8.0.2/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp 2012-05-18 23:08:33.000000000 +0000 @@ -296,6 +296,9 @@ * FINISHME: Emit just the MUL if we know an operand is small * enough. */ + if (intel->gen >= 7 && c->dispatch_width == 16) + fail("16-wide explicit accumulator operands unsupported\n"); + struct brw_reg acc = retype(brw_acc_reg(), BRW_REGISTER_TYPE_D); emit(BRW_OPCODE_MUL, acc, op[0], op[1]); @@ -633,11 +636,7 @@ if (ir->shadow_comparitor && ir->op != ir_txd) { for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - fs_inst *inst = emit(BRW_OPCODE_MOV, - fs_reg(MRF, base_mrf + mlen + i), coordinate); - if (i < 3 && c->key.tex.gl_clamp_mask[i] & (1 << sampler)) - inst->saturate = true; - + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i), coordinate); coordinate.reg_offset++; } /* gen4's SIMD8 sampler always has the slots for u,v,r present. */ @@ -665,10 +664,7 @@ mlen++; } else if (ir->op == ir_tex) { for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - fs_inst *inst = emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i), - coordinate); - if (i < 3 && c->key.tex.gl_clamp_mask[i] & (1 << sampler)) - inst->saturate = true; + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i), coordinate); coordinate.reg_offset++; } /* gen4's SIMD8 sampler always has the slots for u,v,r present. */ @@ -726,12 +722,8 @@ assert(ir->op == ir_txb || ir->op == ir_txl || ir->op == ir_txf); for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - fs_inst *inst = emit(BRW_OPCODE_MOV, fs_reg(MRF, - base_mrf + mlen + i * 2, - coordinate.type), - coordinate); - if (i < 3 && c->key.tex.gl_clamp_mask[i] & (1 << sampler)) - inst->saturate = true; + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i * 2, coordinate.type), + coordinate); coordinate.reg_offset++; } @@ -838,12 +830,9 @@ } for (int i = 0; i < vector_elements; i++) { - fs_inst *inst = emit(BRW_OPCODE_MOV, - fs_reg(MRF, base_mrf + mlen + i * reg_width, - coordinate.type), - coordinate); - if (i < 3 && c->key.tex.gl_clamp_mask[i] & (1 << sampler)) - inst->saturate = true; + emit(BRW_OPCODE_MOV, + fs_reg(MRF, base_mrf + mlen + i * reg_width, coordinate.type), + coordinate); coordinate.reg_offset++; } mlen += vector_elements * reg_width; @@ -988,10 +977,7 @@ * [hdr], [ref], x, dPdx.x, dPdy.x, y, dPdx.y, dPdy.y, z, dPdx.z, dPdy.z */ for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - fs_inst *inst = emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), - coordinate); - if (i < 3 && c->key.tex.gl_clamp_mask[i] & (1 << sampler)) - inst->saturate = true; + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), coordinate); coordinate.reg_offset++; mlen += reg_width; @@ -1033,10 +1019,7 @@ /* Set up the coordinate (except for cases where it was done above) */ if (ir->op != ir_txd && ir->op != ir_txs && ir->op != ir_txf) { for (int i = 0; i < ir->coordinate->type->vector_elements; i++) { - fs_inst *inst = emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), - coordinate); - if (i < 3 && c->key.tex.gl_clamp_mask[i] & (1 << sampler)) - inst->saturate = true; + emit(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen), coordinate); coordinate.reg_offset++; mlen += reg_width; } @@ -1105,12 +1088,18 @@ /* Should be lowered by do_lower_texture_projection */ assert(!ir->projector); + bool needs_gl_clamp = true; + + fs_reg scale_x, scale_y; + /* The 965 requires the EU to do the normalization of GL rectangle * texture coordinates. We use the program parameter state * tracking to get the scaling factor. */ - if (intel->gen < 6 && - ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_RECT) { + if (ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_RECT && + (intel->gen < 6 || + (intel->gen >= 6 && (c->key.tex.gl_clamp_mask[0] & (1 << sampler) || + c->key.tex.gl_clamp_mask[1] & (1 << sampler))))) { struct gl_program_parameter_list *params = c->fp->program.Base.Parameters; int tokens[STATE_LENGTH] = { STATE_INTERNAL, @@ -1131,8 +1120,9 @@ c->prog_data.param_convert[c->prog_data.nr_params + 1] = PARAM_NO_CONVERT; - fs_reg scale_x = fs_reg(UNIFORM, c->prog_data.nr_params); - fs_reg scale_y = fs_reg(UNIFORM, c->prog_data.nr_params + 1); + scale_x = fs_reg(UNIFORM, c->prog_data.nr_params); + scale_y = fs_reg(UNIFORM, c->prog_data.nr_params + 1); + GLuint index = _mesa_add_state_reference(params, (gl_state_index *)tokens); @@ -1142,7 +1132,14 @@ this->param_index[c->prog_data.nr_params] = index; this->param_offset[c->prog_data.nr_params] = 1; c->prog_data.nr_params++; + } + /* The 965 requires the EU to do the normalization of GL rectangle + * texture coordinates. We use the program parameter state + * tracking to get the scaling factor. + */ + if (intel->gen < 6 && + ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_RECT) { fs_reg dst = fs_reg(this, ir->coordinate->type); fs_reg src = coordinate; coordinate = dst; @@ -1151,6 +1148,48 @@ dst.reg_offset++; src.reg_offset++; emit(BRW_OPCODE_MUL, dst, src, scale_y); + } else if (ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_RECT) { + /* On gen6+, the sampler handles the rectangle coordinates + * natively, without needing rescaling. But that means we have + * to do GL_CLAMP clamping at the [0, width], [0, height] scale, + * not [0, 1] like the default case below. + */ + needs_gl_clamp = false; + + for (int i = 0; i < 2; i++) { + if (c->key.tex.gl_clamp_mask[i] & (1 << sampler)) { + fs_reg chan = coordinate; + chan.reg_offset += i; + + inst = emit(BRW_OPCODE_SEL, chan, chan, brw_imm_f(0.0)); + inst->conditional_mod = BRW_CONDITIONAL_G; + + /* Our parameter comes in as 1.0/width or 1.0/height, + * because that's what people normally want for doing + * texture rectangle handling. We need width or height + * for clamping, but we don't care enough to make a new + * parameter type, so just invert back. + */ + fs_reg limit = fs_reg(this, glsl_type::float_type); + emit(BRW_OPCODE_MOV, limit, i == 0 ? scale_x : scale_y); + emit(SHADER_OPCODE_RCP, limit, limit); + + inst = emit(BRW_OPCODE_SEL, chan, chan, limit); + inst->conditional_mod = BRW_CONDITIONAL_L; + } + } + } + + if (ir->coordinate && needs_gl_clamp) { + for (int i = 0; i < MIN2(ir->coordinate->type->vector_elements, 3); i++) { + if (c->key.tex.gl_clamp_mask[i] & (1 << sampler)) { + fs_reg chan = coordinate; + chan.reg_offset += i; + + fs_inst *inst = emit(BRW_OPCODE_MOV, chan, chan); + inst->saturate = true; + } + } } /* Writemasking doesn't eliminate channels on SIMD8 texture @@ -1723,15 +1762,19 @@ void fs_visitor::emit_dummy_fs() { + int reg_width = c->dispatch_width / 8; + /* Everyone's favorite color. */ - emit(BRW_OPCODE_MOV, fs_reg(MRF, 2), fs_reg(1.0f)); - emit(BRW_OPCODE_MOV, fs_reg(MRF, 3), fs_reg(0.0f)); - emit(BRW_OPCODE_MOV, fs_reg(MRF, 4), fs_reg(1.0f)); - emit(BRW_OPCODE_MOV, fs_reg(MRF, 5), fs_reg(0.0f)); + emit(BRW_OPCODE_MOV, fs_reg(MRF, 2 + 0 * reg_width), fs_reg(1.0f)); + emit(BRW_OPCODE_MOV, fs_reg(MRF, 2 + 1 * reg_width), fs_reg(0.0f)); + emit(BRW_OPCODE_MOV, fs_reg(MRF, 2 + 2 * reg_width), fs_reg(1.0f)); + emit(BRW_OPCODE_MOV, fs_reg(MRF, 2 + 3 * reg_width), fs_reg(0.0f)); fs_inst *write; write = emit(FS_OPCODE_FB_WRITE, fs_reg(0), fs_reg(0)); write->base_mrf = 2; + write->mlen = 4 * reg_width; + write->eot = true; } /* The register location here is relative to the start of the URB @@ -1921,7 +1964,10 @@ { this->current_annotation = "FB write header"; bool header_present = true; - int base_mrf = 2; + /* We can potentially have a message length of up to 15, so we have to set + * base_mrf to either 0 or 1 in order to fit in m0..m15. + */ + int base_mrf = 1; int nr = base_mrf; int reg_width = c->dispatch_width / 8; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/brw_tex_layout.c mesa-8.0.3/src/mesa/drivers/dri/i965/brw_tex_layout.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/brw_tex_layout.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/brw_tex_layout.c 2012-05-18 04:27:14.000000000 +0000 @@ -115,6 +115,8 @@ intel_miptree_set_image_offset(mt, level, q, x, y); x += pack_x_pitch; } + if (x > mt->total_width) + mt->total_width = x; x = 0; y += pack_y_pitch; @@ -135,10 +137,9 @@ pack_x_nr <<= 1; } } else { + pack_x_nr <<= 1; if (pack_x_pitch > 4) { pack_x_pitch >>= 1; - pack_x_nr <<= 1; - assert(pack_x_pitch * pack_x_nr <= mt->total_width); } if (pack_y_pitch > 2) { diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp mesa-8.0.3/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp --- mesa-8.0.2/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp 2012-05-18 23:08:34.000000000 +0000 @@ -1436,7 +1436,7 @@ } /* If the type is smaller than a vec4, replicate the last channel out. */ - if (ir->type->is_scalar() || ir->type->is_vector()) + if (ir->type->is_scalar() || ir->type->is_vector() || ir->type->is_matrix()) src.swizzle = swizzle_for_size(ir->type->vector_elements); else src.swizzle = BRW_SWIZZLE_NOOP; @@ -1461,7 +1461,7 @@ } /* If the type is smaller than a vec4, replicate the last channel out. */ - if (ir->type->is_scalar() || ir->type->is_vector()) + if (ir->type->is_scalar() || ir->type->is_vector() || ir->type->is_matrix()) this->result.swizzle = swizzle_for_size(ir->type->vector_elements); else this->result.swizzle = BRW_SWIZZLE_NOOP; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/brw_wm_surface_state.c mesa-8.0.3/src/mesa/drivers/dri/i965/brw_wm_surface_state.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/brw_wm_surface_state.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/brw_wm_surface_state.c 2012-05-18 04:27:14.000000000 +0000 @@ -327,7 +327,7 @@ [MESA_FORMAT_S8_Z24] = 0, [MESA_FORMAT_Z16] = 0, [MESA_FORMAT_X8_Z24] = 0, - [MESA_FORMAT_Z24_S8] = 0, + [MESA_FORMAT_Z24_X8] = 0, [MESA_FORMAT_Z32] = 0, [MESA_FORMAT_S8] = 0, @@ -916,12 +916,48 @@ struct gl_context *ctx = &intel->ctx; struct intel_renderbuffer *irb = intel_renderbuffer(rb); struct intel_mipmap_tree *mt = irb->mt; - struct intel_region *region = irb->mt->region; + struct intel_region *region; uint32_t *surf; uint32_t tile_x, tile_y; uint32_t format = 0; gl_format rb_format = intel_rb_format(irb); + if (irb->tex_image && !brw->has_surface_tile_offset) { + intel_renderbuffer_tile_offsets(irb, &tile_x, &tile_y); + + if (tile_x != 0 || tile_y != 0) { + /* Original gen4 hardware couldn't draw to a non-tile-aligned + * destination in a miptree unless you actually setup your renderbuffer + * as a miptree and used the fragile lod/array_index/etc. controls to + * select the image. So, instead, we just make a new single-level + * miptree and render into that. + */ + struct intel_context *intel = intel_context(ctx); + struct intel_texture_image *intel_image = + intel_texture_image(irb->tex_image); + struct intel_mipmap_tree *new_mt; + int width, height, depth; + + intel_miptree_get_dimensions_for_image(irb->tex_image, &width, &height, &depth); + + new_mt = intel_miptree_create(intel, irb->tex_image->TexObject->Target, + intel_image->base.Base.TexFormat, + intel_image->base.Base.Level, + intel_image->base.Base.Level, + width, height, depth, + true); + + intel_miptree_copy_teximage(intel, intel_image, new_mt); + intel_miptree_reference(&irb->mt, intel_image->mt); + intel_renderbuffer_set_draw_offset(irb); + intel_miptree_release(&new_mt); + + mt = irb->mt; + } + } + + region = irb->mt->region; + surf = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE, 6 * 4, 32, &brw->bind.surf_offset[unit]); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/gen6_sampler_state.c mesa-8.0.3/src/mesa/drivers/dri/i965/gen6_sampler_state.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/gen6_sampler_state.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/gen6_sampler_state.c 2012-05-18 04:27:14.000000000 +0000 @@ -41,7 +41,7 @@ GS_SAMPLER_STATE_CHANGE | PS_SAMPLER_STATE_CHANGE | (4 - 2)); - OUT_BATCH(0); /* VS */ + OUT_BATCH(brw->sampler.offset); /* VS */ OUT_BATCH(0); /* GS */ OUT_BATCH(brw->sampler.offset); ADVANCE_BATCH(); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_context.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_context.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_context.c 2012-03-21 17:55:52.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_context.c 2012-05-18 04:27:14.000000000 +0000 @@ -183,6 +183,7 @@ chipset = "Intel(R) Ivybridge Mobile"; break; case PCI_CHIP_IVYBRIDGE_S_GT1: + case PCI_CHIP_IVYBRIDGE_S_GT2: chipset = "Intel(R) Ivybridge Server"; break; default: @@ -1225,6 +1226,10 @@ if (!rb) return; + /* Check if we failed to allocate the depth miptree earlier. */ + if (buffer->attachment == __DRI_BUFFER_HIZ && rb->mt == NULL) + return; + /* If the renderbuffer's and DRIbuffer's regions match, then continue. */ if ((buffer->attachment != __DRI_BUFFER_HIZ && rb->mt && @@ -1266,6 +1271,7 @@ * due to failure to allocate new storage. */ if (buffer->attachment == __DRI_BUFFER_HIZ) { + assert(rb->mt); intel_miptree_release(&rb->mt->hiz_mt); } else { intel_miptree_release(&rb->mt); @@ -1291,6 +1297,7 @@ /* Associate buffer with new storage. */ if (buffer->attachment == __DRI_BUFFER_HIZ) { + assert(rb->mt); rb->mt->hiz_mt = mt; } else { rb->mt = mt; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_extensions_es.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_extensions_es.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_extensions_es.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_extensions_es.c 2012-05-18 23:08:34.000000000 +0000 @@ -66,7 +66,6 @@ "GL_EXT_blend_func_separate", "GL_EXT_blend_subtract", "GL_OES_draw_texture", - "GL_ARB_framebuffer_object", "GL_EXT_framebuffer_object", "GL_ARB_point_sprite", "GL_EXT_stencil_wrap", @@ -92,7 +91,6 @@ "GL_NV_blend_square", /* Optional GLES2 */ - "GL_ARB_framebuffer_object", "GL_ARB_depth_texture", "GL_EXT_framebuffer_object", diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_fbo.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_fbo.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_fbo.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_fbo.c 2012-05-18 23:08:34.000000000 +0000 @@ -237,6 +237,9 @@ _mesa_lookup_enum_by_nr(internalFormat), _mesa_get_format_name(rb->Format), width, height); + if (width == 0 || height == 0) + return true; + irb->mt = intel_miptree_create_for_renderbuffer(intel, rb->Format, width, height); if (!irb->mt) @@ -553,22 +556,6 @@ } } -#ifndef I915 -static bool -need_tile_offset_workaround(struct brw_context *brw, - struct intel_renderbuffer *irb) -{ - uint32_t tile_x, tile_y; - - if (brw->has_surface_tile_offset) - return false; - - intel_renderbuffer_tile_offsets(irb, &tile_x, &tile_y); - - return tile_x != 0 || tile_y != 0; -} -#endif - /** * Called by glFramebufferTexture[123]DEXT() (and other places) to * prepare for rendering into texture memory. This might be called @@ -626,42 +613,13 @@ return; } + irb->tex_image = image; + DBG("Begin render %s texture tex=%u w=%d h=%d refcount=%d\n", _mesa_get_format_name(image->TexFormat), att->Texture->Name, image->Width, image->Height, irb->Base.Base.RefCount); - intel_image->used_as_render_target = true; - -#ifndef I915 - if (need_tile_offset_workaround(brw_context(ctx), irb)) { - /* Original gen4 hardware couldn't draw to a non-tile-aligned - * destination in a miptree unless you actually setup your - * renderbuffer as a miptree and used the fragile - * lod/array_index/etc. controls to select the image. So, - * instead, we just make a new single-level miptree and render - * into that. - */ - struct intel_context *intel = intel_context(ctx); - struct intel_mipmap_tree *new_mt; - int width, height, depth; - - intel_miptree_get_dimensions_for_image(image, &width, &height, &depth); - - new_mt = intel_miptree_create(intel, image->TexObject->Target, - intel_image->base.Base.TexFormat, - intel_image->base.Base.Level, - intel_image->base.Base.Level, - width, height, depth, - true); - - intel_miptree_copy_teximage(intel, intel_image, new_mt); - intel_renderbuffer_set_draw_offset(irb); - - intel_miptree_reference(&irb->mt, intel_image->mt); - intel_miptree_release(&new_mt); - } -#endif /* update drawing region, etc */ intel_draw_buffer(ctx); } @@ -678,14 +636,13 @@ struct gl_texture_object *tex_obj = att->Texture; struct gl_texture_image *image = tex_obj->Image[att->CubeMapFace][att->TextureLevel]; - struct intel_texture_image *intel_image = intel_texture_image(image); + struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer); DBG("Finish render %s texture tex=%u\n", _mesa_get_format_name(image->TexFormat), att->Texture->Name); - /* Flag that this image may now be validated into the object's miptree. */ - if (intel_image) - intel_image->used_as_render_target = false; + if (irb) + irb->tex_image = NULL; /* Since we've (probably) rendered to the texture and will (likely) use * it in the texture domain later on in this batchbuffer, flush the diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_mipmap_tree.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_mipmap_tree.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_mipmap_tree.c 2012-03-21 17:55:52.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_mipmap_tree.c 2012-05-18 06:13:50.000000000 +0000 @@ -702,15 +702,20 @@ y /= bh; base = intel_region_map(intel, mt->region, map->mode); - /* Note that in the case of cube maps, the caller must have passed the slice - * number referencing the face. - */ - intel_miptree_get_image_offset(mt, level, 0, slice, &image_x, &image_y); - x += image_x; - y += image_y; - map->stride = mt->region->pitch * mt->cpp; - map->ptr = base + y * map->stride + x * mt->cpp; + if (base == NULL) + map->ptr = NULL; + else { + /* Note that in the case of cube maps, the caller must have passed the + * slice number referencing the face. + */ + intel_miptree_get_image_offset(mt, level, 0, slice, &image_x, &image_y); + x += image_x; + y += image_y; + + map->stride = mt->region->pitch * mt->cpp; + map->ptr = base + y * map->stride + x * mt->cpp; + } DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __FUNCTION__, map->x, map->y, map->w, map->h, @@ -1067,6 +1072,11 @@ *out_ptr = map->ptr; *out_stride = map->stride; + + if (map->ptr == NULL) { + mt->level[level].slice[slice].map = NULL; + free(map); + } } void diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c 2012-05-18 23:08:34.000000000 +0000 @@ -337,9 +337,5 @@ unpack, pixels)) return; - /* FIXME */ - if (intel->gen == 6) - return _swrast_Bitmap(ctx, x, y, width, height, unpack, pixels); - _mesa_meta_Bitmap(ctx, x, y, width, height, unpack, pixels); } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_regions.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_regions.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_regions.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_regions.c 2012-05-18 06:38:07.000000000 +0000 @@ -124,7 +124,7 @@ */ _DBG("%s %p\n", __FUNCTION__, region); - if (!region->map_refcount++) { + if (!region->map_refcount) { intel_flush(&intel->ctx); if (region->tiling != I915_TILING_NONE) @@ -133,7 +133,10 @@ drm_intel_bo_map(region->bo, true); region->map = region->bo->virtual; - ++intel->num_mapped_regions; + } + if (region->map) { + intel->num_mapped_regions++; + region->map_refcount++; } return region->map; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_tex.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_tex.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_tex.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_tex.c 2012-05-18 06:05:12.000000000 +0000 @@ -84,6 +84,8 @@ assert(!intel_image->base.ImageOffsets); intel_image->base.ImageOffsets = malloc(slices * sizeof(GLuint)); + _swrast_init_texture_image(image, width, height, depth); + if (intel_texobj->mt && intel_miptree_match_image(intel_texobj->mt, image)) { intel_miptree_reference(&intel_image->mt, intel_texobj->mt); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_tex_image.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_tex_image.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_tex_image.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_tex_image.c 2012-05-18 23:08:33.000000000 +0000 @@ -341,13 +341,18 @@ if (!rb || !rb->mt) return; - if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + if (rb->mt->cpp == 4) { + if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + internalFormat = GL_RGB; + texFormat = MESA_FORMAT_XRGB8888; + } + else { + internalFormat = GL_RGBA; + texFormat = MESA_FORMAT_ARGB8888; + } + } else if (rb->mt->cpp == 2) { internalFormat = GL_RGB; - texFormat = MESA_FORMAT_XRGB8888; - } - else { - internalFormat = GL_RGBA; - texFormat = MESA_FORMAT_ARGB8888; + texFormat = MESA_FORMAT_RGB565; } _mesa_lock_texture(&intel->ctx, texObj); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/i965/intel_tex_validate.c mesa-8.0.3/src/mesa/drivers/dri/i965/intel_tex_validate.c --- mesa-8.0.2/src/mesa/drivers/dri/i965/intel_tex_validate.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/i965/intel_tex_validate.c 2012-05-18 04:27:14.000000000 +0000 @@ -97,14 +97,8 @@ /* skip too small size mipmap */ if (intelImage == NULL) break; - /* Need to import images in main memory or held in other trees. - * If it's a render target, then its data isn't needed to be in - * the object tree (otherwise we'd be FBO incomplete), and we need - * to keep track of the image's MT as needing to be pulled in still, - * or we'll lose the rendering that's done to it. - */ - if (intelObj->mt != intelImage->mt && - !intelImage->used_as_render_target) { + + if (intelObj->mt != intelImage->mt) { intel_miptree_copy_teximage(intel, intelImage, intelObj->mt); } } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_chipset.h mesa-8.0.3/src/mesa/drivers/dri/intel/intel_chipset.h --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_chipset.h 2011-07-05 04:34:17.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_chipset.h 2012-05-18 04:27:14.000000000 +0000 @@ -85,6 +85,7 @@ #define PCI_CHIP_IVYBRIDGE_M_GT1 0x0156 /* Mobile */ #define PCI_CHIP_IVYBRIDGE_M_GT2 0x0166 #define PCI_CHIP_IVYBRIDGE_S_GT1 0x015a /* Server */ +#define PCI_CHIP_IVYBRIDGE_S_GT2 0x016a #define IS_MOBILE(devid) (devid == PCI_CHIP_I855_GM || \ devid == PCI_CHIP_I915_GM || \ @@ -147,7 +148,8 @@ devid == PCI_CHIP_IVYBRIDGE_S_GT1) #define IS_IVB_GT2(devid) (devid == PCI_CHIP_IVYBRIDGE_GT2 || \ - devid == PCI_CHIP_IVYBRIDGE_M_GT2) + devid == PCI_CHIP_IVYBRIDGE_M_GT2 || \ + devid == PCI_CHIP_IVYBRIDGE_S_GT2) #define IS_IVYBRIDGE(devid) (IS_IVB_GT1(devid) || IS_IVB_GT2(devid)) diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_context.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_context.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_context.c 2012-03-21 17:55:52.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_context.c 2012-05-18 04:27:14.000000000 +0000 @@ -183,6 +183,7 @@ chipset = "Intel(R) Ivybridge Mobile"; break; case PCI_CHIP_IVYBRIDGE_S_GT1: + case PCI_CHIP_IVYBRIDGE_S_GT2: chipset = "Intel(R) Ivybridge Server"; break; default: @@ -1225,6 +1226,10 @@ if (!rb) return; + /* Check if we failed to allocate the depth miptree earlier. */ + if (buffer->attachment == __DRI_BUFFER_HIZ && rb->mt == NULL) + return; + /* If the renderbuffer's and DRIbuffer's regions match, then continue. */ if ((buffer->attachment != __DRI_BUFFER_HIZ && rb->mt && @@ -1266,6 +1271,7 @@ * due to failure to allocate new storage. */ if (buffer->attachment == __DRI_BUFFER_HIZ) { + assert(rb->mt); intel_miptree_release(&rb->mt->hiz_mt); } else { intel_miptree_release(&rb->mt); @@ -1291,6 +1297,7 @@ /* Associate buffer with new storage. */ if (buffer->attachment == __DRI_BUFFER_HIZ) { + assert(rb->mt); rb->mt->hiz_mt = mt; } else { rb->mt = mt; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_extensions_es.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_extensions_es.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_extensions_es.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_extensions_es.c 2012-05-18 23:08:34.000000000 +0000 @@ -66,7 +66,6 @@ "GL_EXT_blend_func_separate", "GL_EXT_blend_subtract", "GL_OES_draw_texture", - "GL_ARB_framebuffer_object", "GL_EXT_framebuffer_object", "GL_ARB_point_sprite", "GL_EXT_stencil_wrap", @@ -92,7 +91,6 @@ "GL_NV_blend_square", /* Optional GLES2 */ - "GL_ARB_framebuffer_object", "GL_ARB_depth_texture", "GL_EXT_framebuffer_object", diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_fbo.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_fbo.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_fbo.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_fbo.c 2012-05-18 23:08:34.000000000 +0000 @@ -237,6 +237,9 @@ _mesa_lookup_enum_by_nr(internalFormat), _mesa_get_format_name(rb->Format), width, height); + if (width == 0 || height == 0) + return true; + irb->mt = intel_miptree_create_for_renderbuffer(intel, rb->Format, width, height); if (!irb->mt) @@ -553,22 +556,6 @@ } } -#ifndef I915 -static bool -need_tile_offset_workaround(struct brw_context *brw, - struct intel_renderbuffer *irb) -{ - uint32_t tile_x, tile_y; - - if (brw->has_surface_tile_offset) - return false; - - intel_renderbuffer_tile_offsets(irb, &tile_x, &tile_y); - - return tile_x != 0 || tile_y != 0; -} -#endif - /** * Called by glFramebufferTexture[123]DEXT() (and other places) to * prepare for rendering into texture memory. This might be called @@ -626,42 +613,13 @@ return; } + irb->tex_image = image; + DBG("Begin render %s texture tex=%u w=%d h=%d refcount=%d\n", _mesa_get_format_name(image->TexFormat), att->Texture->Name, image->Width, image->Height, irb->Base.Base.RefCount); - intel_image->used_as_render_target = true; - -#ifndef I915 - if (need_tile_offset_workaround(brw_context(ctx), irb)) { - /* Original gen4 hardware couldn't draw to a non-tile-aligned - * destination in a miptree unless you actually setup your - * renderbuffer as a miptree and used the fragile - * lod/array_index/etc. controls to select the image. So, - * instead, we just make a new single-level miptree and render - * into that. - */ - struct intel_context *intel = intel_context(ctx); - struct intel_mipmap_tree *new_mt; - int width, height, depth; - - intel_miptree_get_dimensions_for_image(image, &width, &height, &depth); - - new_mt = intel_miptree_create(intel, image->TexObject->Target, - intel_image->base.Base.TexFormat, - intel_image->base.Base.Level, - intel_image->base.Base.Level, - width, height, depth, - true); - - intel_miptree_copy_teximage(intel, intel_image, new_mt); - intel_renderbuffer_set_draw_offset(irb); - - intel_miptree_reference(&irb->mt, intel_image->mt); - intel_miptree_release(&new_mt); - } -#endif /* update drawing region, etc */ intel_draw_buffer(ctx); } @@ -678,14 +636,13 @@ struct gl_texture_object *tex_obj = att->Texture; struct gl_texture_image *image = tex_obj->Image[att->CubeMapFace][att->TextureLevel]; - struct intel_texture_image *intel_image = intel_texture_image(image); + struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer); DBG("Finish render %s texture tex=%u\n", _mesa_get_format_name(image->TexFormat), att->Texture->Name); - /* Flag that this image may now be validated into the object's miptree. */ - if (intel_image) - intel_image->used_as_render_target = false; + if (irb) + irb->tex_image = NULL; /* Since we've (probably) rendered to the texture and will (likely) use * it in the texture domain later on in this batchbuffer, flush the diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_fbo.h mesa-8.0.3/src/mesa/drivers/dri/intel/intel_fbo.h --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_fbo.h 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_fbo.h 2012-05-18 04:27:14.000000000 +0000 @@ -47,6 +47,9 @@ struct intel_mipmap_tree *mt; /**< The renderbuffer storage. */ drm_intel_bo *map_bo; + /* Current texture image this renderbuffer is attached to. */ + struct gl_texture_image *tex_image; + /** * \name Miptree view * \{ diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_mipmap_tree.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_mipmap_tree.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_mipmap_tree.c 2012-03-21 17:55:52.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_mipmap_tree.c 2012-05-18 06:13:50.000000000 +0000 @@ -702,15 +702,20 @@ y /= bh; base = intel_region_map(intel, mt->region, map->mode); - /* Note that in the case of cube maps, the caller must have passed the slice - * number referencing the face. - */ - intel_miptree_get_image_offset(mt, level, 0, slice, &image_x, &image_y); - x += image_x; - y += image_y; - map->stride = mt->region->pitch * mt->cpp; - map->ptr = base + y * map->stride + x * mt->cpp; + if (base == NULL) + map->ptr = NULL; + else { + /* Note that in the case of cube maps, the caller must have passed the + * slice number referencing the face. + */ + intel_miptree_get_image_offset(mt, level, 0, slice, &image_x, &image_y); + x += image_x; + y += image_y; + + map->stride = mt->region->pitch * mt->cpp; + map->ptr = base + y * map->stride + x * mt->cpp; + } DBG("%s: %d,%d %dx%d from mt %p (%s) %d,%d = %p/%d\n", __FUNCTION__, map->x, map->y, map->w, map->h, @@ -1067,6 +1072,11 @@ *out_ptr = map->ptr; *out_stride = map->stride; + + if (map->ptr == NULL) { + mt->level[level].slice[slice].map = NULL; + free(map); + } } void diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c 2012-05-18 23:08:34.000000000 +0000 @@ -337,9 +337,5 @@ unpack, pixels)) return; - /* FIXME */ - if (intel->gen == 6) - return _swrast_Bitmap(ctx, x, y, width, height, unpack, pixels); - _mesa_meta_Bitmap(ctx, x, y, width, height, unpack, pixels); } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_regions.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_regions.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_regions.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_regions.c 2012-05-18 06:38:07.000000000 +0000 @@ -124,7 +124,7 @@ */ _DBG("%s %p\n", __FUNCTION__, region); - if (!region->map_refcount++) { + if (!region->map_refcount) { intel_flush(&intel->ctx); if (region->tiling != I915_TILING_NONE) @@ -133,7 +133,10 @@ drm_intel_bo_map(region->bo, true); region->map = region->bo->virtual; - ++intel->num_mapped_regions; + } + if (region->map) { + intel->num_mapped_regions++; + region->map_refcount++; } return region->map; diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_tex.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_tex.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_tex.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_tex.c 2012-05-18 06:05:12.000000000 +0000 @@ -84,6 +84,8 @@ assert(!intel_image->base.ImageOffsets); intel_image->base.ImageOffsets = malloc(slices * sizeof(GLuint)); + _swrast_init_texture_image(image, width, height, depth); + if (intel_texobj->mt && intel_miptree_match_image(intel_texobj->mt, image)) { intel_miptree_reference(&intel_image->mt, intel_texobj->mt); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_tex_image.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_tex_image.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_tex_image.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_tex_image.c 2012-05-18 23:08:33.000000000 +0000 @@ -341,13 +341,18 @@ if (!rb || !rb->mt) return; - if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + if (rb->mt->cpp == 4) { + if (texture_format == __DRI_TEXTURE_FORMAT_RGB) { + internalFormat = GL_RGB; + texFormat = MESA_FORMAT_XRGB8888; + } + else { + internalFormat = GL_RGBA; + texFormat = MESA_FORMAT_ARGB8888; + } + } else if (rb->mt->cpp == 2) { internalFormat = GL_RGB; - texFormat = MESA_FORMAT_XRGB8888; - } - else { - internalFormat = GL_RGBA; - texFormat = MESA_FORMAT_ARGB8888; + texFormat = MESA_FORMAT_RGB565; } _mesa_lock_texture(&intel->ctx, texObj); diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_tex_obj.h mesa-8.0.3/src/mesa/drivers/dri/intel/intel_tex_obj.h --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_tex_obj.h 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_tex_obj.h 2012-05-18 04:27:14.000000000 +0000 @@ -65,7 +65,6 @@ * Else there is no image data. */ struct intel_mipmap_tree *mt; - bool used_as_render_target; }; static INLINE struct intel_texture_object * diff -Nru mesa-8.0.2/src/mesa/drivers/dri/intel/intel_tex_validate.c mesa-8.0.3/src/mesa/drivers/dri/intel/intel_tex_validate.c --- mesa-8.0.2/src/mesa/drivers/dri/intel/intel_tex_validate.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/intel/intel_tex_validate.c 2012-05-18 04:27:14.000000000 +0000 @@ -97,14 +97,8 @@ /* skip too small size mipmap */ if (intelImage == NULL) break; - /* Need to import images in main memory or held in other trees. - * If it's a render target, then its data isn't needed to be in - * the object tree (otherwise we'd be FBO incomplete), and we need - * to keep track of the image's MT as needing to be pulled in still, - * or we'll lose the rendering that's done to it. - */ - if (intelObj->mt != intelImage->mt && - !intelImage->used_as_render_target) { + + if (intelObj->mt != intelImage->mt) { intel_miptree_copy_teximage(intel, intelImage, intelObj->mt); } } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/r200/r200_maos_arrays.c mesa-8.0.3/src/mesa/drivers/dri/r200/r200_maos_arrays.c --- mesa-8.0.2/src/mesa/drivers/dri/r200/r200_maos_arrays.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/r200/r200_maos_arrays.c 2012-05-18 04:27:14.000000000 +0000 @@ -83,7 +83,7 @@ count = 1; aos->stride = 0; } else { - radeonAllocDmaRegion(rmesa, &aos->bo, &aos->offset, size * 4, 32); + radeonAllocDmaRegion(rmesa, &aos->bo, &aos->offset, size * count * 4, 32); aos->stride = size; } diff -Nru mesa-8.0.2/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c mesa-8.0.3/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c --- mesa-8.0.2/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c 2012-05-18 04:27:14.000000000 +0000 @@ -66,7 +66,7 @@ aos->stride = 0; } else { - radeonAllocDmaRegion(rmesa, &aos->bo, &aos->offset, size * 4, 32); + radeonAllocDmaRegion(rmesa, &aos->bo, &aos->offset, size * count * 4, 32); aos->stride = size; } diff -Nru mesa-8.0.2/src/mesa/drivers/windows/gdi/wmesa.c mesa-8.0.3/src/mesa/drivers/windows/gdi/wmesa.c --- mesa-8.0.2/src/mesa/drivers/windows/gdi/wmesa.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/drivers/windows/gdi/wmesa.c 2012-05-18 04:27:14.000000000 +0000 @@ -243,39 +243,9 @@ /***** CLEAR Functions *****/ /**********************************************************************/ -/* If we do not implement these, Mesa clears the buffers via the pixel - * span writing interface, which is very slow for a clear operation. - */ - -/* - * Set the color used to clear the color buffer. - */ -static void clear_color(struct gl_context *ctx, - const union gl_color_union color) -{ - WMesaContext pwc = wmesa_context(ctx); - GLubyte col[3]; - - UNCLAMPED_FLOAT_TO_UBYTE(col[0], color.f[0]); - UNCLAMPED_FLOAT_TO_UBYTE(col[1], color.f[1]); - UNCLAMPED_FLOAT_TO_UBYTE(col[2], color.f[2]); - pwc->clearColorRef = RGB(col[0], col[1], col[2]); - DeleteObject(pwc->clearPen); - DeleteObject(pwc->clearBrush); - pwc->clearPen = CreatePen(PS_SOLID, 1, pwc->clearColorRef); - pwc->clearBrush = CreateSolidBrush(pwc->clearColorRef); -} - - /* - * Clear the specified region of the color buffer using the clear color - * or index as specified by one of the two functions above. - * - * This procedure clears either the front and/or the back COLOR buffers. - * Only the "left" buffer is cleared since we are not stereo. - * Clearing of the other non-color buffers is left to the swrast. + * Clear the color/depth/stencil buffers. */ - static void clear(struct gl_context *ctx, GLbitfield mask) { #define FLIP(Y) (ctx->DrawBuffer->Height - (Y) - 1) @@ -298,6 +268,20 @@ return; } + if (mask & BUFFER_BITS_COLOR) { + /* setup the clearing color */ + const union gl_color_union color = ctx->Color.ClearColor; + GLubyte col[3]; + UNCLAMPED_FLOAT_TO_UBYTE(col[0], color.f[0]); + UNCLAMPED_FLOAT_TO_UBYTE(col[1], color.f[1]); + UNCLAMPED_FLOAT_TO_UBYTE(col[2], color.f[2]); + pwc->clearColorRef = RGB(col[0], col[1], col[2]); + DeleteObject(pwc->clearPen); + DeleteObject(pwc->clearBrush); + pwc->clearPen = CreatePen(PS_SOLID, 1, pwc->clearColorRef); + pwc->clearBrush = CreateSolidBrush(pwc->clearColorRef); + } + /* Back buffer */ if (mask & BUFFER_BIT_BACK_LEFT) { @@ -940,54 +924,6 @@ /** - * Plug in the Get/PutRow/Values functions for a renderbuffer depending - * on if we're drawing to the front or back color buffer. - */ -static void -wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat, - int cColorBits, int double_buffer) -{ - if (double_buffer) { - /* back buffer */ - /* Picking the correct span functions is important because - * the DIB was allocated with the indicated depth. */ - switch(pixelformat) { - case PF_5R6G5B: - rb->PutRow = write_rgba_span_16; - rb->PutValues = write_rgba_pixels_16; - rb->GetRow = read_rgba_span_16; - rb->GetValues = read_rgba_pixels_16; - break; - case PF_8R8G8B: - if (cColorBits == 24) - { - rb->PutRow = write_rgba_span_24; - rb->PutValues = write_rgba_pixels_24; - rb->GetRow = read_rgba_span_24; - rb->GetValues = read_rgba_pixels_24; - } - else - { - rb->PutRow = write_rgba_span_32; - rb->PutValues = write_rgba_pixels_32; - rb->GetRow = read_rgba_span_32; - rb->GetValues = read_rgba_pixels_32; - } - break; - default: - break; - } - } - else { - /* front buffer (actual Windows window) */ - rb->PutRow = write_rgba_span_front; - rb->PutValues = write_rgba_pixels_front; - rb->GetRow = read_rgba_span_front; - rb->GetValues = read_rgba_pixels_front; - } -} - -/** * Called by ctx->Driver.ResizeBuffers() * Resize the front/back colorbuffers to match the latest window size. */ @@ -1143,7 +1079,6 @@ functions.GetBufferSize = wmesa_get_buffer_size; functions.Flush = wmesa_flush; functions.Clear = clear; - functions.ClearColor = clear_color; functions.ResizeBuffers = wmesa_resize_buffers; functions.Viewport = wmesa_viewport; @@ -1275,11 +1210,9 @@ if (visual->doubleBufferMode == 1) { rb = wmesa_new_renderbuffer(); _mesa_add_renderbuffer(&pwfb->Base, BUFFER_BACK_LEFT, rb); - wmesa_set_renderbuffer_funcs(rb, pwfb->pixelformat, pwfb->cColorBits, 1); } rb = wmesa_new_renderbuffer(); _mesa_add_renderbuffer(&pwfb->Base, BUFFER_FRONT_LEFT, rb); - wmesa_set_renderbuffer_funcs(rb, pwfb->pixelformat, pwfb->cColorBits, 0); /* Let Mesa own the Depth, Stencil, and Accum buffers */ _swrast_add_soft_renderbuffers(&pwfb->Base, diff -Nru mesa-8.0.2/src/mesa/main/api_arrayelt.c mesa-8.0.3/src/mesa/main/api_arrayelt.c --- mesa-8.0.2/src/mesa/main/api_arrayelt.c 2012-03-20 11:56:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/api_arrayelt.c 2012-05-18 23:08:34.000000000 +0000 @@ -1643,12 +1643,20 @@ const struct _glapi_table * const disp = GET_DISPATCH(); GLboolean do_map; + /* If PrimitiveRestart is enabled and the index is the RestartIndex + * then we call PrimitiveRestartNV and return. + */ + if (ctx->Array.PrimitiveRestart && (elt == ctx->Array.RestartIndex)) { + CALL_PrimitiveRestartNV((struct _glapi_table *)disp, ()); + return; + } + if (actx->NewState) { assert(!actx->mapped_vbos); _ae_update_state( ctx ); } - /* Determine if w need to map/unmap VBOs */ + /* Determine if we need to map/unmap VBOs */ do_map = actx->nr_vbos && !actx->mapped_vbos; if (do_map) diff -Nru mesa-8.0.2/src/mesa/main/api_exec_es1.c mesa-8.0.3/src/mesa/main/api_exec_es1.c --- mesa-8.0.2/src/mesa/main/api_exec_es1.c 2012-03-21 17:17:25.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/api_exec_es1.c 2012-05-18 23:12:03.000000000 +0000 @@ -2,7 +2,7 @@ * THIS FILE AUTOMATICALLY GENERATED BY THE es_generator.py SCRIPT * API specification file: main/APIspec.xml * GLES version: GLES1.1 - * date: 2012-03-21 17:17:25 + * date: 2012-05-18 16:12:03 */ diff -Nru mesa-8.0.2/src/mesa/main/api_exec_es1_dispatch.h mesa-8.0.3/src/mesa/main/api_exec_es1_dispatch.h --- mesa-8.0.2/src/mesa/main/api_exec_es1_dispatch.h 2012-03-21 17:17:33.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/api_exec_es1_dispatch.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,2712 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * 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 - * 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 THEIR 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. - */ - -#if !defined( _DISPATCH_H_ ) -# define _DISPATCH_H_ - - -/** - * \file main/dispatch.h - * Macros for handling GL dispatch tables. - * - * For each known GL function, there are 3 macros in this file. The first - * macro is named CALL_FuncName and is used to call that GL function using - * the specified dispatch table. The other 2 macros, called GET_FuncName - * can SET_FuncName, are used to get and set the dispatch pointer for the - * named function in the specified dispatch table. - */ - -/* GLXEXT is defined when building the GLX extension in the xserver. - */ -#if !defined(GLXEXT) -#include "main/mfeatures.h" -#endif - -#define CALL_by_offset(disp, cast, offset, parameters) \ - (*(cast (GET_by_offset(disp, offset)))) parameters -#define GET_by_offset(disp, offset) \ - (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL -#define SET_by_offset(disp, offset, fn) \ - do { \ - if ( (offset) < 0 ) { \ - /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \ - /* __func__, __LINE__, disp, offset, # fn); */ \ - /* abort(); */ \ - } \ - else { \ - ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \ - } \ - } while(0) - -/* total number of offsets below */ -#define _gloffset_COUNT 188 - -#define _gloffset_Color4f 29 -#define _gloffset_Color4ub 35 -#define _gloffset_Normal3f 56 -#define _gloffset_CullFace 152 -#define _gloffset_Fogf 153 -#define _gloffset_Fogfv 154 -#define _gloffset_FrontFace 157 -#define _gloffset_Hint 158 -#define _gloffset_Lightf 159 -#define _gloffset_Lightfv 160 -#define _gloffset_LightModelf 163 -#define _gloffset_LightModelfv 164 -#define _gloffset_LineWidth 168 -#define _gloffset_Materialf 169 -#define _gloffset_Materialfv 170 -#define _gloffset_PointSize 173 -#define _gloffset_Scissor 176 -#define _gloffset_ShadeModel 177 -#define _gloffset_TexParameterf 178 -#define _gloffset_TexParameterfv 179 -#define _gloffset_TexParameteri 180 -#define _gloffset_TexParameteriv 181 -#define _gloffset_TexImage2D 183 -#define _gloffset_TexEnvf 184 -#define _gloffset_TexEnvfv 185 -#define _gloffset_TexEnvi 186 -#define _gloffset_TexEnviv 187 -#define _gloffset_TexGenfOES 190 -#define _gloffset_TexGenfvOES 191 -#define _gloffset_TexGeniOES 192 -#define _gloffset_TexGenivOES 193 -#define _gloffset_Clear 203 -#define _gloffset_ClearColor 206 -#define _gloffset_ClearStencil 207 -#define _gloffset_StencilMask 209 -#define _gloffset_ColorMask 210 -#define _gloffset_DepthMask 211 -#define _gloffset_Disable 214 -#define _gloffset_Enable 215 -#define _gloffset_Finish 216 -#define _gloffset_Flush 217 -#define _gloffset_AlphaFunc 240 -#define _gloffset_BlendFunc 241 -#define _gloffset_LogicOp 242 -#define _gloffset_StencilFunc 243 -#define _gloffset_StencilOp 244 -#define _gloffset_DepthFunc 245 -#define _gloffset_PixelStorei 250 -#define _gloffset_ReadPixels 256 -#define _gloffset_GetBooleanv 258 -#define _gloffset_GetError 261 -#define _gloffset_GetFloatv 262 -#define _gloffset_GetIntegerv 263 -#define _gloffset_GetLightfv 264 -#define _gloffset_GetMaterialfv 269 -#define _gloffset_GetString 275 -#define _gloffset_GetTexEnvfv 276 -#define _gloffset_GetTexEnviv 277 -#define _gloffset_GetTexGenfvOES 279 -#define _gloffset_GetTexGenivOES 280 -#define _gloffset_GetTexParameterfv 282 -#define _gloffset_GetTexParameteriv 283 -#define _gloffset_IsEnabled 286 -#define _gloffset_LoadIdentity 290 -#define _gloffset_LoadMatrixf 291 -#define _gloffset_MatrixMode 293 -#define _gloffset_MultMatrixf 294 -#define _gloffset_PopMatrix 297 -#define _gloffset_PushMatrix 298 -#define _gloffset_Rotatef 300 -#define _gloffset_Scalef 302 -#define _gloffset_Translatef 304 -#define _gloffset_Viewport 305 -#define _gloffset_BindTexture 307 -#define _gloffset_ColorPointer 308 -#define _gloffset_DisableClientState 309 -#define _gloffset_DrawArrays 310 -#define _gloffset_DrawElements 311 -#define _gloffset_EnableClientState 313 -#define _gloffset_NormalPointer 318 -#define _gloffset_PolygonOffset 319 -#define _gloffset_TexCoordPointer 320 -#define _gloffset_VertexPointer 321 -#define _gloffset_CopyTexImage2D 324 -#define _gloffset_CopyTexSubImage2D 326 -#define _gloffset_DeleteTextures 327 -#define _gloffset_GenTextures 328 -#define _gloffset_GetPointerv 329 -#define _gloffset_IsTexture 330 -#define _gloffset_TexSubImage2D 333 -#define _gloffset_BlendEquationOES 337 -#define _gloffset_ActiveTexture 374 -#define _gloffset_ClientActiveTexture 375 -#define _gloffset_MultiTexCoord4f 402 - -#if !FEATURE_remap_table - -#define _gloffset_SampleCoverage 445 -#define _gloffset_CompressedTexImage2D 447 -#define _gloffset_CompressedTexSubImage2D 450 -#define _gloffset_BindBuffer 510 -#define _gloffset_BufferData 511 -#define _gloffset_BufferSubData 512 -#define _gloffset_DeleteBuffers 513 -#define _gloffset_GenBuffers 514 -#define _gloffset_GetBufferParameteriv 515 -#define _gloffset_GetBufferPointervOES 516 -#define _gloffset_IsBuffer 518 -#define _gloffset_MapBufferOES 519 -#define _gloffset_UnmapBufferOES 520 -#define _gloffset_ClearDepthf 660 -#define _gloffset_DepthRangef 661 -#define _gloffset_DrawTexfOES 695 -#define _gloffset_DrawTexfvOES 696 -#define _gloffset_DrawTexiOES 697 -#define _gloffset_DrawTexivOES 698 -#define _gloffset_DrawTexsOES 699 -#define _gloffset_DrawTexsvOES 700 -#define _gloffset_DrawTexxOES 701 -#define _gloffset_DrawTexxvOES 702 -#define _gloffset_PointSizePointerOES 703 -#define _gloffset_QueryMatrixxOES 710 -#define _gloffset_PointParameterf 719 -#define _gloffset_PointParameterfv 720 -#define _gloffset_MultiDrawArraysEXT 740 -#define _gloffset_MultiDrawElementsEXT 741 -#define _gloffset_BlendFuncSeparateOES 748 -#define _gloffset_AlphaFuncxOES 891 -#define _gloffset_ClearColorxOES 892 -#define _gloffset_ClearDepthxOES 893 -#define _gloffset_ClipPlanexOES 894 -#define _gloffset_Color4xOES 895 -#define _gloffset_DepthRangexOES 896 -#define _gloffset_FogxOES 897 -#define _gloffset_FogxvOES 898 -#define _gloffset_FrustumxOES 899 -#define _gloffset_GetClipPlanexOES 900 -#define _gloffset_GetFixedvOES 901 -#define _gloffset_GetLightxvOES 902 -#define _gloffset_GetMaterialxvOES 903 -#define _gloffset_GetTexEnvxvOES 904 -#define _gloffset_GetTexGenxvOES 905 -#define _gloffset_GetTexParameterxvOES 906 -#define _gloffset_LightModelxOES 907 -#define _gloffset_LightModelxvOES 908 -#define _gloffset_LightxOES 909 -#define _gloffset_LightxvOES 910 -#define _gloffset_LineWidthxOES 911 -#define _gloffset_LoadMatrixxOES 912 -#define _gloffset_MaterialxOES 913 -#define _gloffset_MaterialxvOES 914 -#define _gloffset_MultMatrixxOES 915 -#define _gloffset_MultiTexCoord4xOES 916 -#define _gloffset_Normal3xOES 917 -#define _gloffset_OrthoxOES 918 -#define _gloffset_PointParameterxOES 919 -#define _gloffset_PointParameterxvOES 920 -#define _gloffset_PointSizexOES 921 -#define _gloffset_PolygonOffsetxOES 922 -#define _gloffset_RotatexOES 923 -#define _gloffset_SampleCoveragexOES 924 -#define _gloffset_ScalexOES 925 -#define _gloffset_TexEnvxOES 926 -#define _gloffset_TexEnvxvOES 927 -#define _gloffset_TexGenxOES 928 -#define _gloffset_TexGenxvOES 929 -#define _gloffset_TexParameterxOES 930 -#define _gloffset_TexParameterxvOES 931 -#define _gloffset_TranslatexOES 932 -#define _gloffset_ClipPlanefOES 933 -#define _gloffset_FrustumfOES 934 -#define _gloffset_GetClipPlanefOES 935 -#define _gloffset_OrthofOES 936 -#define _gloffset_BlendEquationSeparateOES 938 -#define _gloffset_BindFramebufferOES 939 -#define _gloffset_BindRenderbufferOES 940 -#define _gloffset_CheckFramebufferStatusOES 941 -#define _gloffset_DeleteFramebuffersOES 942 -#define _gloffset_DeleteRenderbuffersOES 943 -#define _gloffset_FramebufferRenderbufferOES 944 -#define _gloffset_FramebufferTexture2DOES 946 -#define _gloffset_GenFramebuffersOES 948 -#define _gloffset_GenRenderbuffersOES 949 -#define _gloffset_GenerateMipmapOES 950 -#define _gloffset_GetFramebufferAttachmentParameterivOES 951 -#define _gloffset_GetRenderbufferParameterivOES 952 -#define _gloffset_IsFramebufferOES 953 -#define _gloffset_IsRenderbufferOES 954 -#define _gloffset_RenderbufferStorageOES 955 -#define _gloffset_EGLImageTargetRenderbufferStorageOES 1030 -#define _gloffset_EGLImageTargetTexture2DOES 1031 - -#else /* !FEATURE_remap_table */ - -#define esLocalRemapTable_size 94 -static int esLocalRemapTable[ esLocalRemapTable_size ]; - -#define SampleCoverage_remap_index 0 -#define CompressedTexImage2D_remap_index 1 -#define CompressedTexSubImage2D_remap_index 2 -#define BindBuffer_remap_index 3 -#define BufferData_remap_index 4 -#define BufferSubData_remap_index 5 -#define DeleteBuffers_remap_index 6 -#define GenBuffers_remap_index 7 -#define GetBufferParameteriv_remap_index 8 -#define GetBufferPointervOES_remap_index 9 -#define IsBuffer_remap_index 10 -#define MapBufferOES_remap_index 11 -#define UnmapBufferOES_remap_index 12 -#define ClearDepthf_remap_index 13 -#define DepthRangef_remap_index 14 -#define DrawTexfOES_remap_index 15 -#define DrawTexfvOES_remap_index 16 -#define DrawTexiOES_remap_index 17 -#define DrawTexivOES_remap_index 18 -#define DrawTexsOES_remap_index 19 -#define DrawTexsvOES_remap_index 20 -#define DrawTexxOES_remap_index 21 -#define DrawTexxvOES_remap_index 22 -#define PointSizePointerOES_remap_index 23 -#define QueryMatrixxOES_remap_index 24 -#define PointParameterf_remap_index 25 -#define PointParameterfv_remap_index 26 -#define MultiDrawArraysEXT_remap_index 27 -#define MultiDrawElementsEXT_remap_index 28 -#define BlendFuncSeparateOES_remap_index 29 -#define AlphaFuncxOES_remap_index 30 -#define ClearColorxOES_remap_index 31 -#define ClearDepthxOES_remap_index 32 -#define ClipPlanexOES_remap_index 33 -#define Color4xOES_remap_index 34 -#define DepthRangexOES_remap_index 35 -#define FogxOES_remap_index 36 -#define FogxvOES_remap_index 37 -#define FrustumxOES_remap_index 38 -#define GetClipPlanexOES_remap_index 39 -#define GetFixedvOES_remap_index 40 -#define GetLightxvOES_remap_index 41 -#define GetMaterialxvOES_remap_index 42 -#define GetTexEnvxvOES_remap_index 43 -#define GetTexGenxvOES_remap_index 44 -#define GetTexParameterxvOES_remap_index 45 -#define LightModelxOES_remap_index 46 -#define LightModelxvOES_remap_index 47 -#define LightxOES_remap_index 48 -#define LightxvOES_remap_index 49 -#define LineWidthxOES_remap_index 50 -#define LoadMatrixxOES_remap_index 51 -#define MaterialxOES_remap_index 52 -#define MaterialxvOES_remap_index 53 -#define MultMatrixxOES_remap_index 54 -#define MultiTexCoord4xOES_remap_index 55 -#define Normal3xOES_remap_index 56 -#define OrthoxOES_remap_index 57 -#define PointParameterxOES_remap_index 58 -#define PointParameterxvOES_remap_index 59 -#define PointSizexOES_remap_index 60 -#define PolygonOffsetxOES_remap_index 61 -#define RotatexOES_remap_index 62 -#define SampleCoveragexOES_remap_index 63 -#define ScalexOES_remap_index 64 -#define TexEnvxOES_remap_index 65 -#define TexEnvxvOES_remap_index 66 -#define TexGenxOES_remap_index 67 -#define TexGenxvOES_remap_index 68 -#define TexParameterxOES_remap_index 69 -#define TexParameterxvOES_remap_index 70 -#define TranslatexOES_remap_index 71 -#define ClipPlanefOES_remap_index 72 -#define FrustumfOES_remap_index 73 -#define GetClipPlanefOES_remap_index 74 -#define OrthofOES_remap_index 75 -#define BlendEquationSeparateOES_remap_index 76 -#define BindFramebufferOES_remap_index 77 -#define BindRenderbufferOES_remap_index 78 -#define CheckFramebufferStatusOES_remap_index 79 -#define DeleteFramebuffersOES_remap_index 80 -#define DeleteRenderbuffersOES_remap_index 81 -#define FramebufferRenderbufferOES_remap_index 82 -#define FramebufferTexture2DOES_remap_index 83 -#define GenFramebuffersOES_remap_index 84 -#define GenRenderbuffersOES_remap_index 85 -#define GenerateMipmapOES_remap_index 86 -#define GetFramebufferAttachmentParameterivOES_remap_index 87 -#define GetRenderbufferParameterivOES_remap_index 88 -#define IsFramebufferOES_remap_index 89 -#define IsRenderbufferOES_remap_index 90 -#define RenderbufferStorageOES_remap_index 91 -#define EGLImageTargetRenderbufferStorageOES_remap_index 92 -#define EGLImageTargetTexture2DOES_remap_index 93 - -#define _gloffset_SampleCoverage esLocalRemapTable[SampleCoverage_remap_index] -#define _gloffset_CompressedTexImage2D esLocalRemapTable[CompressedTexImage2D_remap_index] -#define _gloffset_CompressedTexSubImage2D esLocalRemapTable[CompressedTexSubImage2D_remap_index] -#define _gloffset_BindBuffer esLocalRemapTable[BindBuffer_remap_index] -#define _gloffset_BufferData esLocalRemapTable[BufferData_remap_index] -#define _gloffset_BufferSubData esLocalRemapTable[BufferSubData_remap_index] -#define _gloffset_DeleteBuffers esLocalRemapTable[DeleteBuffers_remap_index] -#define _gloffset_GenBuffers esLocalRemapTable[GenBuffers_remap_index] -#define _gloffset_GetBufferParameteriv esLocalRemapTable[GetBufferParameteriv_remap_index] -#define _gloffset_GetBufferPointervOES esLocalRemapTable[GetBufferPointervOES_remap_index] -#define _gloffset_IsBuffer esLocalRemapTable[IsBuffer_remap_index] -#define _gloffset_MapBufferOES esLocalRemapTable[MapBufferOES_remap_index] -#define _gloffset_UnmapBufferOES esLocalRemapTable[UnmapBufferOES_remap_index] -#define _gloffset_ClearDepthf esLocalRemapTable[ClearDepthf_remap_index] -#define _gloffset_DepthRangef esLocalRemapTable[DepthRangef_remap_index] -#define _gloffset_DrawTexfOES esLocalRemapTable[DrawTexfOES_remap_index] -#define _gloffset_DrawTexfvOES esLocalRemapTable[DrawTexfvOES_remap_index] -#define _gloffset_DrawTexiOES esLocalRemapTable[DrawTexiOES_remap_index] -#define _gloffset_DrawTexivOES esLocalRemapTable[DrawTexivOES_remap_index] -#define _gloffset_DrawTexsOES esLocalRemapTable[DrawTexsOES_remap_index] -#define _gloffset_DrawTexsvOES esLocalRemapTable[DrawTexsvOES_remap_index] -#define _gloffset_DrawTexxOES esLocalRemapTable[DrawTexxOES_remap_index] -#define _gloffset_DrawTexxvOES esLocalRemapTable[DrawTexxvOES_remap_index] -#define _gloffset_PointSizePointerOES esLocalRemapTable[PointSizePointerOES_remap_index] -#define _gloffset_QueryMatrixxOES esLocalRemapTable[QueryMatrixxOES_remap_index] -#define _gloffset_PointParameterf esLocalRemapTable[PointParameterf_remap_index] -#define _gloffset_PointParameterfv esLocalRemapTable[PointParameterfv_remap_index] -#define _gloffset_MultiDrawArraysEXT esLocalRemapTable[MultiDrawArraysEXT_remap_index] -#define _gloffset_MultiDrawElementsEXT esLocalRemapTable[MultiDrawElementsEXT_remap_index] -#define _gloffset_BlendFuncSeparateOES esLocalRemapTable[BlendFuncSeparateOES_remap_index] -#define _gloffset_AlphaFuncxOES esLocalRemapTable[AlphaFuncxOES_remap_index] -#define _gloffset_ClearColorxOES esLocalRemapTable[ClearColorxOES_remap_index] -#define _gloffset_ClearDepthxOES esLocalRemapTable[ClearDepthxOES_remap_index] -#define _gloffset_ClipPlanexOES esLocalRemapTable[ClipPlanexOES_remap_index] -#define _gloffset_Color4xOES esLocalRemapTable[Color4xOES_remap_index] -#define _gloffset_DepthRangexOES esLocalRemapTable[DepthRangexOES_remap_index] -#define _gloffset_FogxOES esLocalRemapTable[FogxOES_remap_index] -#define _gloffset_FogxvOES esLocalRemapTable[FogxvOES_remap_index] -#define _gloffset_FrustumxOES esLocalRemapTable[FrustumxOES_remap_index] -#define _gloffset_GetClipPlanexOES esLocalRemapTable[GetClipPlanexOES_remap_index] -#define _gloffset_GetFixedvOES esLocalRemapTable[GetFixedvOES_remap_index] -#define _gloffset_GetLightxvOES esLocalRemapTable[GetLightxvOES_remap_index] -#define _gloffset_GetMaterialxvOES esLocalRemapTable[GetMaterialxvOES_remap_index] -#define _gloffset_GetTexEnvxvOES esLocalRemapTable[GetTexEnvxvOES_remap_index] -#define _gloffset_GetTexGenxvOES esLocalRemapTable[GetTexGenxvOES_remap_index] -#define _gloffset_GetTexParameterxvOES esLocalRemapTable[GetTexParameterxvOES_remap_index] -#define _gloffset_LightModelxOES esLocalRemapTable[LightModelxOES_remap_index] -#define _gloffset_LightModelxvOES esLocalRemapTable[LightModelxvOES_remap_index] -#define _gloffset_LightxOES esLocalRemapTable[LightxOES_remap_index] -#define _gloffset_LightxvOES esLocalRemapTable[LightxvOES_remap_index] -#define _gloffset_LineWidthxOES esLocalRemapTable[LineWidthxOES_remap_index] -#define _gloffset_LoadMatrixxOES esLocalRemapTable[LoadMatrixxOES_remap_index] -#define _gloffset_MaterialxOES esLocalRemapTable[MaterialxOES_remap_index] -#define _gloffset_MaterialxvOES esLocalRemapTable[MaterialxvOES_remap_index] -#define _gloffset_MultMatrixxOES esLocalRemapTable[MultMatrixxOES_remap_index] -#define _gloffset_MultiTexCoord4xOES esLocalRemapTable[MultiTexCoord4xOES_remap_index] -#define _gloffset_Normal3xOES esLocalRemapTable[Normal3xOES_remap_index] -#define _gloffset_OrthoxOES esLocalRemapTable[OrthoxOES_remap_index] -#define _gloffset_PointParameterxOES esLocalRemapTable[PointParameterxOES_remap_index] -#define _gloffset_PointParameterxvOES esLocalRemapTable[PointParameterxvOES_remap_index] -#define _gloffset_PointSizexOES esLocalRemapTable[PointSizexOES_remap_index] -#define _gloffset_PolygonOffsetxOES esLocalRemapTable[PolygonOffsetxOES_remap_index] -#define _gloffset_RotatexOES esLocalRemapTable[RotatexOES_remap_index] -#define _gloffset_SampleCoveragexOES esLocalRemapTable[SampleCoveragexOES_remap_index] -#define _gloffset_ScalexOES esLocalRemapTable[ScalexOES_remap_index] -#define _gloffset_TexEnvxOES esLocalRemapTable[TexEnvxOES_remap_index] -#define _gloffset_TexEnvxvOES esLocalRemapTable[TexEnvxvOES_remap_index] -#define _gloffset_TexGenxOES esLocalRemapTable[TexGenxOES_remap_index] -#define _gloffset_TexGenxvOES esLocalRemapTable[TexGenxvOES_remap_index] -#define _gloffset_TexParameterxOES esLocalRemapTable[TexParameterxOES_remap_index] -#define _gloffset_TexParameterxvOES esLocalRemapTable[TexParameterxvOES_remap_index] -#define _gloffset_TranslatexOES esLocalRemapTable[TranslatexOES_remap_index] -#define _gloffset_ClipPlanefOES esLocalRemapTable[ClipPlanefOES_remap_index] -#define _gloffset_FrustumfOES esLocalRemapTable[FrustumfOES_remap_index] -#define _gloffset_GetClipPlanefOES esLocalRemapTable[GetClipPlanefOES_remap_index] -#define _gloffset_OrthofOES esLocalRemapTable[OrthofOES_remap_index] -#define _gloffset_BlendEquationSeparateOES esLocalRemapTable[BlendEquationSeparateOES_remap_index] -#define _gloffset_BindFramebufferOES esLocalRemapTable[BindFramebufferOES_remap_index] -#define _gloffset_BindRenderbufferOES esLocalRemapTable[BindRenderbufferOES_remap_index] -#define _gloffset_CheckFramebufferStatusOES esLocalRemapTable[CheckFramebufferStatusOES_remap_index] -#define _gloffset_DeleteFramebuffersOES esLocalRemapTable[DeleteFramebuffersOES_remap_index] -#define _gloffset_DeleteRenderbuffersOES esLocalRemapTable[DeleteRenderbuffersOES_remap_index] -#define _gloffset_FramebufferRenderbufferOES esLocalRemapTable[FramebufferRenderbufferOES_remap_index] -#define _gloffset_FramebufferTexture2DOES esLocalRemapTable[FramebufferTexture2DOES_remap_index] -#define _gloffset_GenFramebuffersOES esLocalRemapTable[GenFramebuffersOES_remap_index] -#define _gloffset_GenRenderbuffersOES esLocalRemapTable[GenRenderbuffersOES_remap_index] -#define _gloffset_GenerateMipmapOES esLocalRemapTable[GenerateMipmapOES_remap_index] -#define _gloffset_GetFramebufferAttachmentParameterivOES esLocalRemapTable[GetFramebufferAttachmentParameterivOES_remap_index] -#define _gloffset_GetRenderbufferParameterivOES esLocalRemapTable[GetRenderbufferParameterivOES_remap_index] -#define _gloffset_IsFramebufferOES esLocalRemapTable[IsFramebufferOES_remap_index] -#define _gloffset_IsRenderbufferOES esLocalRemapTable[IsRenderbufferOES_remap_index] -#define _gloffset_RenderbufferStorageOES esLocalRemapTable[RenderbufferStorageOES_remap_index] -#define _gloffset_EGLImageTargetRenderbufferStorageOES esLocalRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index] -#define _gloffset_EGLImageTargetTexture2DOES esLocalRemapTable[EGLImageTargetTexture2DOES_remap_index] - -#endif /* !FEATURE_remap_table */ - -typedef void (GLAPIENTRYP _glptr_Color4f)(GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_Color4f(disp, parameters) \ - (* GET_Color4f(disp)) parameters -static inline _glptr_Color4f GET_Color4f(struct _glapi_table *disp) { - return (_glptr_Color4f) (GET_by_offset(disp, _gloffset_Color4f)); -} - -static inline void SET_Color4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Color4f, fn); -} - -typedef void (GLAPIENTRYP _glptr_Color4ub)(GLubyte, GLubyte, GLubyte, GLubyte); -#define CALL_Color4ub(disp, parameters) \ - (* GET_Color4ub(disp)) parameters -static inline _glptr_Color4ub GET_Color4ub(struct _glapi_table *disp) { - return (_glptr_Color4ub) (GET_by_offset(disp, _gloffset_Color4ub)); -} - -static inline void SET_Color4ub(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte, GLubyte, GLubyte, GLubyte)) { - SET_by_offset(disp, _gloffset_Color4ub, fn); -} - -typedef void (GLAPIENTRYP _glptr_Normal3f)(GLfloat, GLfloat, GLfloat); -#define CALL_Normal3f(disp, parameters) \ - (* GET_Normal3f(disp)) parameters -static inline _glptr_Normal3f GET_Normal3f(struct _glapi_table *disp) { - return (_glptr_Normal3f) (GET_by_offset(disp, _gloffset_Normal3f)); -} - -static inline void SET_Normal3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Normal3f, fn); -} - -typedef void (GLAPIENTRYP _glptr_CullFace)(GLenum); -#define CALL_CullFace(disp, parameters) \ - (* GET_CullFace(disp)) parameters -static inline _glptr_CullFace GET_CullFace(struct _glapi_table *disp) { - return (_glptr_CullFace) (GET_by_offset(disp, _gloffset_CullFace)); -} - -static inline void SET_CullFace(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_CullFace, fn); -} - -typedef void (GLAPIENTRYP _glptr_Fogf)(GLenum, GLfloat); -#define CALL_Fogf(disp, parameters) \ - (* GET_Fogf(disp)) parameters -static inline _glptr_Fogf GET_Fogf(struct _glapi_table *disp) { - return (_glptr_Fogf) (GET_by_offset(disp, _gloffset_Fogf)); -} - -static inline void SET_Fogf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_Fogf, fn); -} - -typedef void (GLAPIENTRYP _glptr_Fogfv)(GLenum, const GLfloat *); -#define CALL_Fogfv(disp, parameters) \ - (* GET_Fogfv(disp)) parameters -static inline _glptr_Fogfv GET_Fogfv(struct _glapi_table *disp) { - return (_glptr_Fogfv) (GET_by_offset(disp, _gloffset_Fogfv)); -} - -static inline void SET_Fogfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Fogfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_FrontFace)(GLenum); -#define CALL_FrontFace(disp, parameters) \ - (* GET_FrontFace(disp)) parameters -static inline _glptr_FrontFace GET_FrontFace(struct _glapi_table *disp) { - return (_glptr_FrontFace) (GET_by_offset(disp, _gloffset_FrontFace)); -} - -static inline void SET_FrontFace(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_FrontFace, fn); -} - -typedef void (GLAPIENTRYP _glptr_Hint)(GLenum, GLenum); -#define CALL_Hint(disp, parameters) \ - (* GET_Hint(disp)) parameters -static inline _glptr_Hint GET_Hint(struct _glapi_table *disp) { - return (_glptr_Hint) (GET_by_offset(disp, _gloffset_Hint)); -} - -static inline void SET_Hint(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_Hint, fn); -} - -typedef void (GLAPIENTRYP _glptr_Lightf)(GLenum, GLenum, GLfloat); -#define CALL_Lightf(disp, parameters) \ - (* GET_Lightf(disp)) parameters -static inline _glptr_Lightf GET_Lightf(struct _glapi_table *disp) { - return (_glptr_Lightf) (GET_by_offset(disp, _gloffset_Lightf)); -} - -static inline void SET_Lightf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_Lightf, fn); -} - -typedef void (GLAPIENTRYP _glptr_Lightfv)(GLenum, GLenum, const GLfloat *); -#define CALL_Lightfv(disp, parameters) \ - (* GET_Lightfv(disp)) parameters -static inline _glptr_Lightfv GET_Lightfv(struct _glapi_table *disp) { - return (_glptr_Lightfv) (GET_by_offset(disp, _gloffset_Lightfv)); -} - -static inline void SET_Lightfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Lightfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_LightModelf)(GLenum, GLfloat); -#define CALL_LightModelf(disp, parameters) \ - (* GET_LightModelf(disp)) parameters -static inline _glptr_LightModelf GET_LightModelf(struct _glapi_table *disp) { - return (_glptr_LightModelf) (GET_by_offset(disp, _gloffset_LightModelf)); -} - -static inline void SET_LightModelf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_LightModelf, fn); -} - -typedef void (GLAPIENTRYP _glptr_LightModelfv)(GLenum, const GLfloat *); -#define CALL_LightModelfv(disp, parameters) \ - (* GET_LightModelfv(disp)) parameters -static inline _glptr_LightModelfv GET_LightModelfv(struct _glapi_table *disp) { - return (_glptr_LightModelfv) (GET_by_offset(disp, _gloffset_LightModelfv)); -} - -static inline void SET_LightModelfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_LightModelfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_LineWidth)(GLfloat); -#define CALL_LineWidth(disp, parameters) \ - (* GET_LineWidth(disp)) parameters -static inline _glptr_LineWidth GET_LineWidth(struct _glapi_table *disp) { - return (_glptr_LineWidth) (GET_by_offset(disp, _gloffset_LineWidth)); -} - -static inline void SET_LineWidth(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { - SET_by_offset(disp, _gloffset_LineWidth, fn); -} - -typedef void (GLAPIENTRYP _glptr_Materialf)(GLenum, GLenum, GLfloat); -#define CALL_Materialf(disp, parameters) \ - (* GET_Materialf(disp)) parameters -static inline _glptr_Materialf GET_Materialf(struct _glapi_table *disp) { - return (_glptr_Materialf) (GET_by_offset(disp, _gloffset_Materialf)); -} - -static inline void SET_Materialf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_Materialf, fn); -} - -typedef void (GLAPIENTRYP _glptr_Materialfv)(GLenum, GLenum, const GLfloat *); -#define CALL_Materialfv(disp, parameters) \ - (* GET_Materialfv(disp)) parameters -static inline _glptr_Materialfv GET_Materialfv(struct _glapi_table *disp) { - return (_glptr_Materialfv) (GET_by_offset(disp, _gloffset_Materialfv)); -} - -static inline void SET_Materialfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Materialfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_PointSize)(GLfloat); -#define CALL_PointSize(disp, parameters) \ - (* GET_PointSize(disp)) parameters -static inline _glptr_PointSize GET_PointSize(struct _glapi_table *disp) { - return (_glptr_PointSize) (GET_by_offset(disp, _gloffset_PointSize)); -} - -static inline void SET_PointSize(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { - SET_by_offset(disp, _gloffset_PointSize, fn); -} - -typedef void (GLAPIENTRYP _glptr_Scissor)(GLint, GLint, GLsizei, GLsizei); -#define CALL_Scissor(disp, parameters) \ - (* GET_Scissor(disp)) parameters -static inline _glptr_Scissor GET_Scissor(struct _glapi_table *disp) { - return (_glptr_Scissor) (GET_by_offset(disp, _gloffset_Scissor)); -} - -static inline void SET_Scissor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_Scissor, fn); -} - -typedef void (GLAPIENTRYP _glptr_ShadeModel)(GLenum); -#define CALL_ShadeModel(disp, parameters) \ - (* GET_ShadeModel(disp)) parameters -static inline _glptr_ShadeModel GET_ShadeModel(struct _glapi_table *disp) { - return (_glptr_ShadeModel) (GET_by_offset(disp, _gloffset_ShadeModel)); -} - -static inline void SET_ShadeModel(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_ShadeModel, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameterf)(GLenum, GLenum, GLfloat); -#define CALL_TexParameterf(disp, parameters) \ - (* GET_TexParameterf(disp)) parameters -static inline _glptr_TexParameterf GET_TexParameterf(struct _glapi_table *disp) { - return (_glptr_TexParameterf) (GET_by_offset(disp, _gloffset_TexParameterf)); -} - -static inline void SET_TexParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_TexParameterf, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameterfv)(GLenum, GLenum, const GLfloat *); -#define CALL_TexParameterfv(disp, parameters) \ - (* GET_TexParameterfv(disp)) parameters -static inline _glptr_TexParameterfv GET_TexParameterfv(struct _glapi_table *disp) { - return (_glptr_TexParameterfv) (GET_by_offset(disp, _gloffset_TexParameterfv)); -} - -static inline void SET_TexParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_TexParameterfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameteri)(GLenum, GLenum, GLint); -#define CALL_TexParameteri(disp, parameters) \ - (* GET_TexParameteri(disp)) parameters -static inline _glptr_TexParameteri GET_TexParameteri(struct _glapi_table *disp) { - return (_glptr_TexParameteri) (GET_by_offset(disp, _gloffset_TexParameteri)); -} - -static inline void SET_TexParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { - SET_by_offset(disp, _gloffset_TexParameteri, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameteriv)(GLenum, GLenum, const GLint *); -#define CALL_TexParameteriv(disp, parameters) \ - (* GET_TexParameteriv(disp)) parameters -static inline _glptr_TexParameteriv GET_TexParameteriv(struct _glapi_table *disp) { - return (_glptr_TexParameteriv) (GET_by_offset(disp, _gloffset_TexParameteriv)); -} - -static inline void SET_TexParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_TexParameteriv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -#define CALL_TexImage2D(disp, parameters) \ - (* GET_TexImage2D(disp)) parameters -static inline _glptr_TexImage2D GET_TexImage2D(struct _glapi_table *disp) { - return (_glptr_TexImage2D) (GET_by_offset(disp, _gloffset_TexImage2D)); -} - -static inline void SET_TexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { - SET_by_offset(disp, _gloffset_TexImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexEnvf)(GLenum, GLenum, GLfloat); -#define CALL_TexEnvf(disp, parameters) \ - (* GET_TexEnvf(disp)) parameters -static inline _glptr_TexEnvf GET_TexEnvf(struct _glapi_table *disp) { - return (_glptr_TexEnvf) (GET_by_offset(disp, _gloffset_TexEnvf)); -} - -static inline void SET_TexEnvf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_TexEnvf, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexEnvfv)(GLenum, GLenum, const GLfloat *); -#define CALL_TexEnvfv(disp, parameters) \ - (* GET_TexEnvfv(disp)) parameters -static inline _glptr_TexEnvfv GET_TexEnvfv(struct _glapi_table *disp) { - return (_glptr_TexEnvfv) (GET_by_offset(disp, _gloffset_TexEnvfv)); -} - -static inline void SET_TexEnvfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_TexEnvfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexEnvi)(GLenum, GLenum, GLint); -#define CALL_TexEnvi(disp, parameters) \ - (* GET_TexEnvi(disp)) parameters -static inline _glptr_TexEnvi GET_TexEnvi(struct _glapi_table *disp) { - return (_glptr_TexEnvi) (GET_by_offset(disp, _gloffset_TexEnvi)); -} - -static inline void SET_TexEnvi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { - SET_by_offset(disp, _gloffset_TexEnvi, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexEnviv)(GLenum, GLenum, const GLint *); -#define CALL_TexEnviv(disp, parameters) \ - (* GET_TexEnviv(disp)) parameters -static inline _glptr_TexEnviv GET_TexEnviv(struct _glapi_table *disp) { - return (_glptr_TexEnviv) (GET_by_offset(disp, _gloffset_TexEnviv)); -} - -static inline void SET_TexEnviv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_TexEnviv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexGenfOES)(GLenum, GLenum, GLfloat); -#define CALL_TexGenfOES(disp, parameters) \ - (* GET_TexGenfOES(disp)) parameters -static inline _glptr_TexGenfOES GET_TexGenfOES(struct _glapi_table *disp) { - return (_glptr_TexGenfOES) (GET_by_offset(disp, _gloffset_TexGenfOES)); -} - -static inline void SET_TexGenfOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_TexGenfOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexGenfvOES)(GLenum, GLenum, const GLfloat *); -#define CALL_TexGenfvOES(disp, parameters) \ - (* GET_TexGenfvOES(disp)) parameters -static inline _glptr_TexGenfvOES GET_TexGenfvOES(struct _glapi_table *disp) { - return (_glptr_TexGenfvOES) (GET_by_offset(disp, _gloffset_TexGenfvOES)); -} - -static inline void SET_TexGenfvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_TexGenfvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexGeniOES)(GLenum, GLenum, GLint); -#define CALL_TexGeniOES(disp, parameters) \ - (* GET_TexGeniOES(disp)) parameters -static inline _glptr_TexGeniOES GET_TexGeniOES(struct _glapi_table *disp) { - return (_glptr_TexGeniOES) (GET_by_offset(disp, _gloffset_TexGeniOES)); -} - -static inline void SET_TexGeniOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { - SET_by_offset(disp, _gloffset_TexGeniOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexGenivOES)(GLenum, GLenum, const GLint *); -#define CALL_TexGenivOES(disp, parameters) \ - (* GET_TexGenivOES(disp)) parameters -static inline _glptr_TexGenivOES GET_TexGenivOES(struct _glapi_table *disp) { - return (_glptr_TexGenivOES) (GET_by_offset(disp, _gloffset_TexGenivOES)); -} - -static inline void SET_TexGenivOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_TexGenivOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_Clear)(GLbitfield); -#define CALL_Clear(disp, parameters) \ - (* GET_Clear(disp)) parameters -static inline _glptr_Clear GET_Clear(struct _glapi_table *disp) { - return (_glptr_Clear) (GET_by_offset(disp, _gloffset_Clear)); -} - -static inline void SET_Clear(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbitfield)) { - SET_by_offset(disp, _gloffset_Clear, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf); -#define CALL_ClearColor(disp, parameters) \ - (* GET_ClearColor(disp)) parameters -static inline _glptr_ClearColor GET_ClearColor(struct _glapi_table *disp) { - return (_glptr_ClearColor) (GET_by_offset(disp, _gloffset_ClearColor)); -} - -static inline void SET_ClearColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf, GLclampf, GLclampf)) { - SET_by_offset(disp, _gloffset_ClearColor, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearStencil)(GLint); -#define CALL_ClearStencil(disp, parameters) \ - (* GET_ClearStencil(disp)) parameters -static inline _glptr_ClearStencil GET_ClearStencil(struct _glapi_table *disp) { - return (_glptr_ClearStencil) (GET_by_offset(disp, _gloffset_ClearStencil)); -} - -static inline void SET_ClearStencil(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { - SET_by_offset(disp, _gloffset_ClearStencil, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilMask)(GLuint); -#define CALL_StencilMask(disp, parameters) \ - (* GET_StencilMask(disp)) parameters -static inline _glptr_StencilMask GET_StencilMask(struct _glapi_table *disp) { - return (_glptr_StencilMask) (GET_by_offset(disp, _gloffset_StencilMask)); -} - -static inline void SET_StencilMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_StencilMask, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorMask)(GLboolean, GLboolean, GLboolean, GLboolean); -#define CALL_ColorMask(disp, parameters) \ - (* GET_ColorMask(disp)) parameters -static inline _glptr_ColorMask GET_ColorMask(struct _glapi_table *disp) { - return (_glptr_ColorMask) (GET_by_offset(disp, _gloffset_ColorMask)); -} - -static inline void SET_ColorMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean, GLboolean, GLboolean, GLboolean)) { - SET_by_offset(disp, _gloffset_ColorMask, fn); -} - -typedef void (GLAPIENTRYP _glptr_DepthMask)(GLboolean); -#define CALL_DepthMask(disp, parameters) \ - (* GET_DepthMask(disp)) parameters -static inline _glptr_DepthMask GET_DepthMask(struct _glapi_table *disp) { - return (_glptr_DepthMask) (GET_by_offset(disp, _gloffset_DepthMask)); -} - -static inline void SET_DepthMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean)) { - SET_by_offset(disp, _gloffset_DepthMask, fn); -} - -typedef void (GLAPIENTRYP _glptr_Disable)(GLenum); -#define CALL_Disable(disp, parameters) \ - (* GET_Disable(disp)) parameters -static inline _glptr_Disable GET_Disable(struct _glapi_table *disp) { - return (_glptr_Disable) (GET_by_offset(disp, _gloffset_Disable)); -} - -static inline void SET_Disable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_Disable, fn); -} - -typedef void (GLAPIENTRYP _glptr_Enable)(GLenum); -#define CALL_Enable(disp, parameters) \ - (* GET_Enable(disp)) parameters -static inline _glptr_Enable GET_Enable(struct _glapi_table *disp) { - return (_glptr_Enable) (GET_by_offset(disp, _gloffset_Enable)); -} - -static inline void SET_Enable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_Enable, fn); -} - -typedef void (GLAPIENTRYP _glptr_Finish)(void); -#define CALL_Finish(disp, parameters) \ - (* GET_Finish(disp)) parameters -static inline _glptr_Finish GET_Finish(struct _glapi_table *disp) { - return (_glptr_Finish) (GET_by_offset(disp, _gloffset_Finish)); -} - -static inline void SET_Finish(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_Finish, fn); -} - -typedef void (GLAPIENTRYP _glptr_Flush)(void); -#define CALL_Flush(disp, parameters) \ - (* GET_Flush(disp)) parameters -static inline _glptr_Flush GET_Flush(struct _glapi_table *disp) { - return (_glptr_Flush) (GET_by_offset(disp, _gloffset_Flush)); -} - -static inline void SET_Flush(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_Flush, fn); -} - -typedef void (GLAPIENTRYP _glptr_AlphaFunc)(GLenum, GLclampf); -#define CALL_AlphaFunc(disp, parameters) \ - (* GET_AlphaFunc(disp)) parameters -static inline _glptr_AlphaFunc GET_AlphaFunc(struct _glapi_table *disp) { - return (_glptr_AlphaFunc) (GET_by_offset(disp, _gloffset_AlphaFunc)); -} - -static inline void SET_AlphaFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLclampf)) { - SET_by_offset(disp, _gloffset_AlphaFunc, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendFunc)(GLenum, GLenum); -#define CALL_BlendFunc(disp, parameters) \ - (* GET_BlendFunc(disp)) parameters -static inline _glptr_BlendFunc GET_BlendFunc(struct _glapi_table *disp) { - return (_glptr_BlendFunc) (GET_by_offset(disp, _gloffset_BlendFunc)); -} - -static inline void SET_BlendFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendFunc, fn); -} - -typedef void (GLAPIENTRYP _glptr_LogicOp)(GLenum); -#define CALL_LogicOp(disp, parameters) \ - (* GET_LogicOp(disp)) parameters -static inline _glptr_LogicOp GET_LogicOp(struct _glapi_table *disp) { - return (_glptr_LogicOp) (GET_by_offset(disp, _gloffset_LogicOp)); -} - -static inline void SET_LogicOp(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_LogicOp, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilFunc)(GLenum, GLint, GLuint); -#define CALL_StencilFunc(disp, parameters) \ - (* GET_StencilFunc(disp)) parameters -static inline _glptr_StencilFunc GET_StencilFunc(struct _glapi_table *disp) { - return (_glptr_StencilFunc) (GET_by_offset(disp, _gloffset_StencilFunc)); -} - -static inline void SET_StencilFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLuint)) { - SET_by_offset(disp, _gloffset_StencilFunc, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilOp)(GLenum, GLenum, GLenum); -#define CALL_StencilOp(disp, parameters) \ - (* GET_StencilOp(disp)) parameters -static inline _glptr_StencilOp GET_StencilOp(struct _glapi_table *disp) { - return (_glptr_StencilOp) (GET_by_offset(disp, _gloffset_StencilOp)); -} - -static inline void SET_StencilOp(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_StencilOp, fn); -} - -typedef void (GLAPIENTRYP _glptr_DepthFunc)(GLenum); -#define CALL_DepthFunc(disp, parameters) \ - (* GET_DepthFunc(disp)) parameters -static inline _glptr_DepthFunc GET_DepthFunc(struct _glapi_table *disp) { - return (_glptr_DepthFunc) (GET_by_offset(disp, _gloffset_DepthFunc)); -} - -static inline void SET_DepthFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_DepthFunc, fn); -} - -typedef void (GLAPIENTRYP _glptr_PixelStorei)(GLenum, GLint); -#define CALL_PixelStorei(disp, parameters) \ - (* GET_PixelStorei(disp)) parameters -static inline _glptr_PixelStorei GET_PixelStorei(struct _glapi_table *disp) { - return (_glptr_PixelStorei) (GET_by_offset(disp, _gloffset_PixelStorei)); -} - -static inline void SET_PixelStorei(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { - SET_by_offset(disp, _gloffset_PixelStorei, fn); -} - -typedef void (GLAPIENTRYP _glptr_ReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *); -#define CALL_ReadPixels(disp, parameters) \ - (* GET_ReadPixels(disp)) parameters -static inline _glptr_ReadPixels GET_ReadPixels(struct _glapi_table *disp) { - return (_glptr_ReadPixels) (GET_by_offset(disp, _gloffset_ReadPixels)); -} - -static inline void SET_ReadPixels(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_ReadPixels, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetBooleanv)(GLenum, GLboolean *); -#define CALL_GetBooleanv(disp, parameters) \ - (* GET_GetBooleanv(disp)) parameters -static inline _glptr_GetBooleanv GET_GetBooleanv(struct _glapi_table *disp) { - return (_glptr_GetBooleanv) (GET_by_offset(disp, _gloffset_GetBooleanv)); -} - -static inline void SET_GetBooleanv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean *)) { - SET_by_offset(disp, _gloffset_GetBooleanv, fn); -} - -typedef GLenum (GLAPIENTRYP _glptr_GetError)(void); -#define CALL_GetError(disp, parameters) \ - (* GET_GetError(disp)) parameters -static inline _glptr_GetError GET_GetError(struct _glapi_table *disp) { - return (_glptr_GetError) (GET_by_offset(disp, _gloffset_GetError)); -} - -static inline void SET_GetError(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_GetError, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetFloatv)(GLenum, GLfloat *); -#define CALL_GetFloatv(disp, parameters) \ - (* GET_GetFloatv(disp)) parameters -static inline _glptr_GetFloatv GET_GetFloatv(struct _glapi_table *disp) { - return (_glptr_GetFloatv) (GET_by_offset(disp, _gloffset_GetFloatv)); -} - -static inline void SET_GetFloatv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetFloatv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetIntegerv)(GLenum, GLint *); -#define CALL_GetIntegerv(disp, parameters) \ - (* GET_GetIntegerv(disp)) parameters -static inline _glptr_GetIntegerv GET_GetIntegerv(struct _glapi_table *disp) { - return (_glptr_GetIntegerv) (GET_by_offset(disp, _gloffset_GetIntegerv)); -} - -static inline void SET_GetIntegerv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetIntegerv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetLightfv)(GLenum, GLenum, GLfloat *); -#define CALL_GetLightfv(disp, parameters) \ - (* GET_GetLightfv(disp)) parameters -static inline _glptr_GetLightfv GET_GetLightfv(struct _glapi_table *disp) { - return (_glptr_GetLightfv) (GET_by_offset(disp, _gloffset_GetLightfv)); -} - -static inline void SET_GetLightfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetLightfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetMaterialfv)(GLenum, GLenum, GLfloat *); -#define CALL_GetMaterialfv(disp, parameters) \ - (* GET_GetMaterialfv(disp)) parameters -static inline _glptr_GetMaterialfv GET_GetMaterialfv(struct _glapi_table *disp) { - return (_glptr_GetMaterialfv) (GET_by_offset(disp, _gloffset_GetMaterialfv)); -} - -static inline void SET_GetMaterialfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetMaterialfv, fn); -} - -typedef const GLubyte * (GLAPIENTRYP _glptr_GetString)(GLenum); -#define CALL_GetString(disp, parameters) \ - (* GET_GetString(disp)) parameters -static inline _glptr_GetString GET_GetString(struct _glapi_table *disp) { - return (_glptr_GetString) (GET_by_offset(disp, _gloffset_GetString)); -} - -static inline void SET_GetString(struct _glapi_table *disp, const GLubyte * (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_GetString, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexEnvfv)(GLenum, GLenum, GLfloat *); -#define CALL_GetTexEnvfv(disp, parameters) \ - (* GET_GetTexEnvfv(disp)) parameters -static inline _glptr_GetTexEnvfv GET_GetTexEnvfv(struct _glapi_table *disp) { - return (_glptr_GetTexEnvfv) (GET_by_offset(disp, _gloffset_GetTexEnvfv)); -} - -static inline void SET_GetTexEnvfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetTexEnvfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexEnviv)(GLenum, GLenum, GLint *); -#define CALL_GetTexEnviv(disp, parameters) \ - (* GET_GetTexEnviv(disp)) parameters -static inline _glptr_GetTexEnviv GET_GetTexEnviv(struct _glapi_table *disp) { - return (_glptr_GetTexEnviv) (GET_by_offset(disp, _gloffset_GetTexEnviv)); -} - -static inline void SET_GetTexEnviv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetTexEnviv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexGenfvOES)(GLenum, GLenum, GLfloat *); -#define CALL_GetTexGenfvOES(disp, parameters) \ - (* GET_GetTexGenfvOES(disp)) parameters -static inline _glptr_GetTexGenfvOES GET_GetTexGenfvOES(struct _glapi_table *disp) { - return (_glptr_GetTexGenfvOES) (GET_by_offset(disp, _gloffset_GetTexGenfvOES)); -} - -static inline void SET_GetTexGenfvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetTexGenfvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexGenivOES)(GLenum, GLenum, GLint *); -#define CALL_GetTexGenivOES(disp, parameters) \ - (* GET_GetTexGenivOES(disp)) parameters -static inline _glptr_GetTexGenivOES GET_GetTexGenivOES(struct _glapi_table *disp) { - return (_glptr_GetTexGenivOES) (GET_by_offset(disp, _gloffset_GetTexGenivOES)); -} - -static inline void SET_GetTexGenivOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetTexGenivOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexParameterfv)(GLenum, GLenum, GLfloat *); -#define CALL_GetTexParameterfv(disp, parameters) \ - (* GET_GetTexParameterfv(disp)) parameters -static inline _glptr_GetTexParameterfv GET_GetTexParameterfv(struct _glapi_table *disp) { - return (_glptr_GetTexParameterfv) (GET_by_offset(disp, _gloffset_GetTexParameterfv)); -} - -static inline void SET_GetTexParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetTexParameterfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexParameteriv)(GLenum, GLenum, GLint *); -#define CALL_GetTexParameteriv(disp, parameters) \ - (* GET_GetTexParameteriv(disp)) parameters -static inline _glptr_GetTexParameteriv GET_GetTexParameteriv(struct _glapi_table *disp) { - return (_glptr_GetTexParameteriv) (GET_by_offset(disp, _gloffset_GetTexParameteriv)); -} - -static inline void SET_GetTexParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetTexParameteriv, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsEnabled)(GLenum); -#define CALL_IsEnabled(disp, parameters) \ - (* GET_IsEnabled(disp)) parameters -static inline _glptr_IsEnabled GET_IsEnabled(struct _glapi_table *disp) { - return (_glptr_IsEnabled) (GET_by_offset(disp, _gloffset_IsEnabled)); -} - -static inline void SET_IsEnabled(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_IsEnabled, fn); -} - -typedef void (GLAPIENTRYP _glptr_LoadIdentity)(void); -#define CALL_LoadIdentity(disp, parameters) \ - (* GET_LoadIdentity(disp)) parameters -static inline _glptr_LoadIdentity GET_LoadIdentity(struct _glapi_table *disp) { - return (_glptr_LoadIdentity) (GET_by_offset(disp, _gloffset_LoadIdentity)); -} - -static inline void SET_LoadIdentity(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_LoadIdentity, fn); -} - -typedef void (GLAPIENTRYP _glptr_LoadMatrixf)(const GLfloat *); -#define CALL_LoadMatrixf(disp, parameters) \ - (* GET_LoadMatrixf(disp)) parameters -static inline _glptr_LoadMatrixf GET_LoadMatrixf(struct _glapi_table *disp) { - return (_glptr_LoadMatrixf) (GET_by_offset(disp, _gloffset_LoadMatrixf)); -} - -static inline void SET_LoadMatrixf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { - SET_by_offset(disp, _gloffset_LoadMatrixf, fn); -} - -typedef void (GLAPIENTRYP _glptr_MatrixMode)(GLenum); -#define CALL_MatrixMode(disp, parameters) \ - (* GET_MatrixMode(disp)) parameters -static inline _glptr_MatrixMode GET_MatrixMode(struct _glapi_table *disp) { - return (_glptr_MatrixMode) (GET_by_offset(disp, _gloffset_MatrixMode)); -} - -static inline void SET_MatrixMode(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_MatrixMode, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultMatrixf)(const GLfloat *); -#define CALL_MultMatrixf(disp, parameters) \ - (* GET_MultMatrixf(disp)) parameters -static inline _glptr_MultMatrixf GET_MultMatrixf(struct _glapi_table *disp) { - return (_glptr_MultMatrixf) (GET_by_offset(disp, _gloffset_MultMatrixf)); -} - -static inline void SET_MultMatrixf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { - SET_by_offset(disp, _gloffset_MultMatrixf, fn); -} - -typedef void (GLAPIENTRYP _glptr_PopMatrix)(void); -#define CALL_PopMatrix(disp, parameters) \ - (* GET_PopMatrix(disp)) parameters -static inline _glptr_PopMatrix GET_PopMatrix(struct _glapi_table *disp) { - return (_glptr_PopMatrix) (GET_by_offset(disp, _gloffset_PopMatrix)); -} - -static inline void SET_PopMatrix(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_PopMatrix, fn); -} - -typedef void (GLAPIENTRYP _glptr_PushMatrix)(void); -#define CALL_PushMatrix(disp, parameters) \ - (* GET_PushMatrix(disp)) parameters -static inline _glptr_PushMatrix GET_PushMatrix(struct _glapi_table *disp) { - return (_glptr_PushMatrix) (GET_by_offset(disp, _gloffset_PushMatrix)); -} - -static inline void SET_PushMatrix(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_PushMatrix, fn); -} - -typedef void (GLAPIENTRYP _glptr_Rotatef)(GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_Rotatef(disp, parameters) \ - (* GET_Rotatef(disp)) parameters -static inline _glptr_Rotatef GET_Rotatef(struct _glapi_table *disp) { - return (_glptr_Rotatef) (GET_by_offset(disp, _gloffset_Rotatef)); -} - -static inline void SET_Rotatef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Rotatef, fn); -} - -typedef void (GLAPIENTRYP _glptr_Scalef)(GLfloat, GLfloat, GLfloat); -#define CALL_Scalef(disp, parameters) \ - (* GET_Scalef(disp)) parameters -static inline _glptr_Scalef GET_Scalef(struct _glapi_table *disp) { - return (_glptr_Scalef) (GET_by_offset(disp, _gloffset_Scalef)); -} - -static inline void SET_Scalef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Scalef, fn); -} - -typedef void (GLAPIENTRYP _glptr_Translatef)(GLfloat, GLfloat, GLfloat); -#define CALL_Translatef(disp, parameters) \ - (* GET_Translatef(disp)) parameters -static inline _glptr_Translatef GET_Translatef(struct _glapi_table *disp) { - return (_glptr_Translatef) (GET_by_offset(disp, _gloffset_Translatef)); -} - -static inline void SET_Translatef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Translatef, fn); -} - -typedef void (GLAPIENTRYP _glptr_Viewport)(GLint, GLint, GLsizei, GLsizei); -#define CALL_Viewport(disp, parameters) \ - (* GET_Viewport(disp)) parameters -static inline _glptr_Viewport GET_Viewport(struct _glapi_table *disp) { - return (_glptr_Viewport) (GET_by_offset(disp, _gloffset_Viewport)); -} - -static inline void SET_Viewport(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_Viewport, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindTexture)(GLenum, GLuint); -#define CALL_BindTexture(disp, parameters) \ - (* GET_BindTexture(disp)) parameters -static inline _glptr_BindTexture GET_BindTexture(struct _glapi_table *disp) { - return (_glptr_BindTexture) (GET_by_offset(disp, _gloffset_BindTexture)); -} - -static inline void SET_BindTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindTexture, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorPointer)(GLint, GLenum, GLsizei, const GLvoid *); -#define CALL_ColorPointer(disp, parameters) \ - (* GET_ColorPointer(disp)) parameters -static inline _glptr_ColorPointer GET_ColorPointer(struct _glapi_table *disp) { - return (_glptr_ColorPointer) (GET_by_offset(disp, _gloffset_ColorPointer)); -} - -static inline void SET_ColorPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_ColorPointer, fn); -} - -typedef void (GLAPIENTRYP _glptr_DisableClientState)(GLenum); -#define CALL_DisableClientState(disp, parameters) \ - (* GET_DisableClientState(disp)) parameters -static inline _glptr_DisableClientState GET_DisableClientState(struct _glapi_table *disp) { - return (_glptr_DisableClientState) (GET_by_offset(disp, _gloffset_DisableClientState)); -} - -static inline void SET_DisableClientState(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_DisableClientState, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawArrays)(GLenum, GLint, GLsizei); -#define CALL_DrawArrays(disp, parameters) \ - (* GET_DrawArrays(disp)) parameters -static inline _glptr_DrawArrays GET_DrawArrays(struct _glapi_table *disp) { - return (_glptr_DrawArrays) (GET_by_offset(disp, _gloffset_DrawArrays)); -} - -static inline void SET_DrawArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei)) { - SET_by_offset(disp, _gloffset_DrawArrays, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawElements)(GLenum, GLsizei, GLenum, const GLvoid *); -#define CALL_DrawElements(disp, parameters) \ - (* GET_DrawElements(disp)) parameters -static inline _glptr_DrawElements GET_DrawElements(struct _glapi_table *disp) { - return (_glptr_DrawElements) (GET_by_offset(disp, _gloffset_DrawElements)); -} - -static inline void SET_DrawElements(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *)) { - SET_by_offset(disp, _gloffset_DrawElements, fn); -} - -typedef void (GLAPIENTRYP _glptr_EnableClientState)(GLenum); -#define CALL_EnableClientState(disp, parameters) \ - (* GET_EnableClientState(disp)) parameters -static inline _glptr_EnableClientState GET_EnableClientState(struct _glapi_table *disp) { - return (_glptr_EnableClientState) (GET_by_offset(disp, _gloffset_EnableClientState)); -} - -static inline void SET_EnableClientState(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_EnableClientState, fn); -} - -typedef void (GLAPIENTRYP _glptr_NormalPointer)(GLenum, GLsizei, const GLvoid *); -#define CALL_NormalPointer(disp, parameters) \ - (* GET_NormalPointer(disp)) parameters -static inline _glptr_NormalPointer GET_NormalPointer(struct _glapi_table *disp) { - return (_glptr_NormalPointer) (GET_by_offset(disp, _gloffset_NormalPointer)); -} - -static inline void SET_NormalPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_NormalPointer, fn); -} - -typedef void (GLAPIENTRYP _glptr_PolygonOffset)(GLfloat, GLfloat); -#define CALL_PolygonOffset(disp, parameters) \ - (* GET_PolygonOffset(disp)) parameters -static inline _glptr_PolygonOffset GET_PolygonOffset(struct _glapi_table *disp) { - return (_glptr_PolygonOffset) (GET_by_offset(disp, _gloffset_PolygonOffset)); -} - -static inline void SET_PolygonOffset(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_PolygonOffset, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordPointer)(GLint, GLenum, GLsizei, const GLvoid *); -#define CALL_TexCoordPointer(disp, parameters) \ - (* GET_TexCoordPointer(disp)) parameters -static inline _glptr_TexCoordPointer GET_TexCoordPointer(struct _glapi_table *disp) { - return (_glptr_TexCoordPointer) (GET_by_offset(disp, _gloffset_TexCoordPointer)); -} - -static inline void SET_TexCoordPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_TexCoordPointer, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexPointer)(GLint, GLenum, GLsizei, const GLvoid *); -#define CALL_VertexPointer(disp, parameters) \ - (* GET_VertexPointer(disp)) parameters -static inline _glptr_VertexPointer GET_VertexPointer(struct _glapi_table *disp) { - return (_glptr_VertexPointer) (GET_by_offset(disp, _gloffset_VertexPointer)); -} - -static inline void SET_VertexPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_VertexPointer, fn); -} - -typedef void (GLAPIENTRYP _glptr_CopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); -#define CALL_CopyTexImage2D(disp, parameters) \ - (* GET_CopyTexImage2D(disp)) parameters -static inline _glptr_CopyTexImage2D GET_CopyTexImage2D(struct _glapi_table *disp) { - return (_glptr_CopyTexImage2D) (GET_by_offset(disp, _gloffset_CopyTexImage2D)); -} - -static inline void SET_CopyTexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) { - SET_by_offset(disp, _gloffset_CopyTexImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_CopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -#define CALL_CopyTexSubImage2D(disp, parameters) \ - (* GET_CopyTexSubImage2D(disp)) parameters -static inline _glptr_CopyTexSubImage2D GET_CopyTexSubImage2D(struct _glapi_table *disp) { - return (_glptr_CopyTexSubImage2D) (GET_by_offset(disp, _gloffset_CopyTexSubImage2D)); -} - -static inline void SET_CopyTexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteTextures)(GLsizei, const GLuint *); -#define CALL_DeleteTextures(disp, parameters) \ - (* GET_DeleteTextures(disp)) parameters -static inline _glptr_DeleteTextures GET_DeleteTextures(struct _glapi_table *disp) { - return (_glptr_DeleteTextures) (GET_by_offset(disp, _gloffset_DeleteTextures)); -} - -static inline void SET_DeleteTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteTextures, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenTextures)(GLsizei, GLuint *); -#define CALL_GenTextures(disp, parameters) \ - (* GET_GenTextures(disp)) parameters -static inline _glptr_GenTextures GET_GenTextures(struct _glapi_table *disp) { - return (_glptr_GenTextures) (GET_by_offset(disp, _gloffset_GenTextures)); -} - -static inline void SET_GenTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenTextures, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetPointerv)(GLenum, GLvoid **); -#define CALL_GetPointerv(disp, parameters) \ - (* GET_GetPointerv(disp)) parameters -static inline _glptr_GetPointerv GET_GetPointerv(struct _glapi_table *disp) { - return (_glptr_GetPointerv) (GET_by_offset(disp, _gloffset_GetPointerv)); -} - -static inline void SET_GetPointerv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid **)) { - SET_by_offset(disp, _gloffset_GetPointerv, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsTexture)(GLuint); -#define CALL_IsTexture(disp, parameters) \ - (* GET_IsTexture(disp)) parameters -static inline _glptr_IsTexture GET_IsTexture(struct _glapi_table *disp) { - return (_glptr_IsTexture) (GET_by_offset(disp, _gloffset_IsTexture)); -} - -static inline void SET_IsTexture(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsTexture, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#define CALL_TexSubImage2D(disp, parameters) \ - (* GET_TexSubImage2D(disp)) parameters -static inline _glptr_TexSubImage2D GET_TexSubImage2D(struct _glapi_table *disp) { - return (_glptr_TexSubImage2D) (GET_by_offset(disp, _gloffset_TexSubImage2D)); -} - -static inline void SET_TexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { - SET_by_offset(disp, _gloffset_TexSubImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendEquationOES)(GLenum); -#define CALL_BlendEquationOES(disp, parameters) \ - (* GET_BlendEquationOES(disp)) parameters -static inline _glptr_BlendEquationOES GET_BlendEquationOES(struct _glapi_table *disp) { - return (_glptr_BlendEquationOES) (GET_by_offset(disp, _gloffset_BlendEquationOES)); -} - -static inline void SET_BlendEquationOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_BlendEquationOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ActiveTexture)(GLenum); -#define CALL_ActiveTexture(disp, parameters) \ - (* GET_ActiveTexture(disp)) parameters -static inline _glptr_ActiveTexture GET_ActiveTexture(struct _glapi_table *disp) { - return (_glptr_ActiveTexture) (GET_by_offset(disp, _gloffset_ActiveTexture)); -} - -static inline void SET_ActiveTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_ActiveTexture, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClientActiveTexture)(GLenum); -#define CALL_ClientActiveTexture(disp, parameters) \ - (* GET_ClientActiveTexture(disp)) parameters -static inline _glptr_ClientActiveTexture GET_ClientActiveTexture(struct _glapi_table *disp) { - return (_glptr_ClientActiveTexture) (GET_by_offset(disp, _gloffset_ClientActiveTexture)); -} - -static inline void SET_ClientActiveTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_ClientActiveTexture, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4f)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_MultiTexCoord4f(disp, parameters) \ - (* GET_MultiTexCoord4f(disp)) parameters -static inline _glptr_MultiTexCoord4f GET_MultiTexCoord4f(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4f) (GET_by_offset(disp, _gloffset_MultiTexCoord4f)); -} - -static inline void SET_MultiTexCoord4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4f, fn); -} - -typedef void (GLAPIENTRYP _glptr_SampleCoverage)(GLclampf, GLboolean); -#define CALL_SampleCoverage(disp, parameters) \ - (* GET_SampleCoverage(disp)) parameters -static inline _glptr_SampleCoverage GET_SampleCoverage(struct _glapi_table *disp) { - return (_glptr_SampleCoverage) (GET_by_offset(disp, _gloffset_SampleCoverage)); -} - -static inline void SET_SampleCoverage(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLboolean)) { - SET_by_offset(disp, _gloffset_SampleCoverage, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexImage2D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -#define CALL_CompressedTexImage2D(disp, parameters) \ - (* GET_CompressedTexImage2D(disp)) parameters -static inline _glptr_CompressedTexImage2D GET_CompressedTexImage2D(struct _glapi_table *disp) { - return (_glptr_CompressedTexImage2D) (GET_by_offset(disp, _gloffset_CompressedTexImage2D)); -} - -static inline void SET_CompressedTexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -#define CALL_CompressedTexSubImage2D(disp, parameters) \ - (* GET_CompressedTexSubImage2D(disp)) parameters -static inline _glptr_CompressedTexSubImage2D GET_CompressedTexSubImage2D(struct _glapi_table *disp) { - return (_glptr_CompressedTexSubImage2D) (GET_by_offset(disp, _gloffset_CompressedTexSubImage2D)); -} - -static inline void SET_CompressedTexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexSubImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindBuffer)(GLenum, GLuint); -#define CALL_BindBuffer(disp, parameters) \ - (* GET_BindBuffer(disp)) parameters -static inline _glptr_BindBuffer GET_BindBuffer(struct _glapi_table *disp) { - return (_glptr_BindBuffer) (GET_by_offset(disp, _gloffset_BindBuffer)); -} - -static inline void SET_BindBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindBuffer, fn); -} - -typedef void (GLAPIENTRYP _glptr_BufferData)(GLenum, GLsizeiptr, const GLvoid *, GLenum); -#define CALL_BufferData(disp, parameters) \ - (* GET_BufferData(disp)) parameters -static inline _glptr_BufferData GET_BufferData(struct _glapi_table *disp) { - return (_glptr_BufferData) (GET_by_offset(disp, _gloffset_BufferData)); -} - -static inline void SET_BufferData(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizeiptr, const GLvoid *, GLenum)) { - SET_by_offset(disp, _gloffset_BufferData, fn); -} - -typedef void (GLAPIENTRYP _glptr_BufferSubData)(GLenum, GLintptr, GLsizeiptr, const GLvoid *); -#define CALL_BufferSubData(disp, parameters) \ - (* GET_BufferSubData(disp)) parameters -static inline _glptr_BufferSubData GET_BufferSubData(struct _glapi_table *disp) { - return (_glptr_BufferSubData) (GET_by_offset(disp, _gloffset_BufferSubData)); -} - -static inline void SET_BufferSubData(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptr, GLsizeiptr, const GLvoid *)) { - SET_by_offset(disp, _gloffset_BufferSubData, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteBuffers)(GLsizei, const GLuint *); -#define CALL_DeleteBuffers(disp, parameters) \ - (* GET_DeleteBuffers(disp)) parameters -static inline _glptr_DeleteBuffers GET_DeleteBuffers(struct _glapi_table *disp) { - return (_glptr_DeleteBuffers) (GET_by_offset(disp, _gloffset_DeleteBuffers)); -} - -static inline void SET_DeleteBuffers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteBuffers, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenBuffers)(GLsizei, GLuint *); -#define CALL_GenBuffers(disp, parameters) \ - (* GET_GenBuffers(disp)) parameters -static inline _glptr_GenBuffers GET_GenBuffers(struct _glapi_table *disp) { - return (_glptr_GenBuffers) (GET_by_offset(disp, _gloffset_GenBuffers)); -} - -static inline void SET_GenBuffers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenBuffers, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetBufferParameteriv)(GLenum, GLenum, GLint *); -#define CALL_GetBufferParameteriv(disp, parameters) \ - (* GET_GetBufferParameteriv(disp)) parameters -static inline _glptr_GetBufferParameteriv GET_GetBufferParameteriv(struct _glapi_table *disp) { - return (_glptr_GetBufferParameteriv) (GET_by_offset(disp, _gloffset_GetBufferParameteriv)); -} - -static inline void SET_GetBufferParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetBufferParameteriv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetBufferPointervOES)(GLenum, GLenum, GLvoid **); -#define CALL_GetBufferPointervOES(disp, parameters) \ - (* GET_GetBufferPointervOES(disp)) parameters -static inline _glptr_GetBufferPointervOES GET_GetBufferPointervOES(struct _glapi_table *disp) { - return (_glptr_GetBufferPointervOES) (GET_by_offset(disp, _gloffset_GetBufferPointervOES)); -} - -static inline void SET_GetBufferPointervOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid **)) { - SET_by_offset(disp, _gloffset_GetBufferPointervOES, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsBuffer)(GLuint); -#define CALL_IsBuffer(disp, parameters) \ - (* GET_IsBuffer(disp)) parameters -static inline _glptr_IsBuffer GET_IsBuffer(struct _glapi_table *disp) { - return (_glptr_IsBuffer) (GET_by_offset(disp, _gloffset_IsBuffer)); -} - -static inline void SET_IsBuffer(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsBuffer, fn); -} - -typedef GLvoid * (GLAPIENTRYP _glptr_MapBufferOES)(GLenum, GLenum); -#define CALL_MapBufferOES(disp, parameters) \ - (* GET_MapBufferOES(disp)) parameters -static inline _glptr_MapBufferOES GET_MapBufferOES(struct _glapi_table *disp) { - return (_glptr_MapBufferOES) (GET_by_offset(disp, _gloffset_MapBufferOES)); -} - -static inline void SET_MapBufferOES(struct _glapi_table *disp, GLvoid * (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_MapBufferOES, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_UnmapBufferOES)(GLenum); -#define CALL_UnmapBufferOES(disp, parameters) \ - (* GET_UnmapBufferOES(disp)) parameters -static inline _glptr_UnmapBufferOES GET_UnmapBufferOES(struct _glapi_table *disp) { - return (_glptr_UnmapBufferOES) (GET_by_offset(disp, _gloffset_UnmapBufferOES)); -} - -static inline void SET_UnmapBufferOES(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_UnmapBufferOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearDepthf)(GLclampf); -#define CALL_ClearDepthf(disp, parameters) \ - (* GET_ClearDepthf(disp)) parameters -static inline _glptr_ClearDepthf GET_ClearDepthf(struct _glapi_table *disp) { - return (_glptr_ClearDepthf) (GET_by_offset(disp, _gloffset_ClearDepthf)); -} - -static inline void SET_ClearDepthf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf)) { - SET_by_offset(disp, _gloffset_ClearDepthf, fn); -} - -typedef void (GLAPIENTRYP _glptr_DepthRangef)(GLclampf, GLclampf); -#define CALL_DepthRangef(disp, parameters) \ - (* GET_DepthRangef(disp)) parameters -static inline _glptr_DepthRangef GET_DepthRangef(struct _glapi_table *disp) { - return (_glptr_DepthRangef) (GET_by_offset(disp, _gloffset_DepthRangef)); -} - -static inline void SET_DepthRangef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf)) { - SET_by_offset(disp, _gloffset_DepthRangef, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTexfOES)(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_DrawTexfOES(disp, parameters) \ - (* GET_DrawTexfOES(disp)) parameters -static inline _glptr_DrawTexfOES GET_DrawTexfOES(struct _glapi_table *disp) { - return (_glptr_DrawTexfOES) (GET_by_offset(disp, _gloffset_DrawTexfOES)); -} - -static inline void SET_DrawTexfOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_DrawTexfOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTexfvOES)(const GLfloat *); -#define CALL_DrawTexfvOES(disp, parameters) \ - (* GET_DrawTexfvOES(disp)) parameters -static inline _glptr_DrawTexfvOES GET_DrawTexfvOES(struct _glapi_table *disp) { - return (_glptr_DrawTexfvOES) (GET_by_offset(disp, _gloffset_DrawTexfvOES)); -} - -static inline void SET_DrawTexfvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { - SET_by_offset(disp, _gloffset_DrawTexfvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTexiOES)(GLint, GLint, GLint, GLint, GLint); -#define CALL_DrawTexiOES(disp, parameters) \ - (* GET_DrawTexiOES(disp)) parameters -static inline _glptr_DrawTexiOES GET_DrawTexiOES(struct _glapi_table *disp) { - return (_glptr_DrawTexiOES) (GET_by_offset(disp, _gloffset_DrawTexiOES)); -} - -static inline void SET_DrawTexiOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_DrawTexiOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTexivOES)(const GLint *); -#define CALL_DrawTexivOES(disp, parameters) \ - (* GET_DrawTexivOES(disp)) parameters -static inline _glptr_DrawTexivOES GET_DrawTexivOES(struct _glapi_table *disp) { - return (_glptr_DrawTexivOES) (GET_by_offset(disp, _gloffset_DrawTexivOES)); -} - -static inline void SET_DrawTexivOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { - SET_by_offset(disp, _gloffset_DrawTexivOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTexsOES)(GLshort, GLshort, GLshort, GLshort, GLshort); -#define CALL_DrawTexsOES(disp, parameters) \ - (* GET_DrawTexsOES(disp)) parameters -static inline _glptr_DrawTexsOES GET_DrawTexsOES(struct _glapi_table *disp) { - return (_glptr_DrawTexsOES) (GET_by_offset(disp, _gloffset_DrawTexsOES)); -} - -static inline void SET_DrawTexsOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort, GLshort)) { - SET_by_offset(disp, _gloffset_DrawTexsOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTexsvOES)(const GLshort *); -#define CALL_DrawTexsvOES(disp, parameters) \ - (* GET_DrawTexsvOES(disp)) parameters -static inline _glptr_DrawTexsvOES GET_DrawTexsvOES(struct _glapi_table *disp) { - return (_glptr_DrawTexsvOES) (GET_by_offset(disp, _gloffset_DrawTexsvOES)); -} - -static inline void SET_DrawTexsvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { - SET_by_offset(disp, _gloffset_DrawTexsvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTexxOES)(GLfixed, GLfixed, GLfixed, GLfixed, GLfixed); -#define CALL_DrawTexxOES(disp, parameters) \ - (* GET_DrawTexxOES(disp)) parameters -static inline _glptr_DrawTexxOES GET_DrawTexxOES(struct _glapi_table *disp) { - return (_glptr_DrawTexxOES) (GET_by_offset(disp, _gloffset_DrawTexxOES)); -} - -static inline void SET_DrawTexxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed, GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_DrawTexxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTexxvOES)(const GLfixed *); -#define CALL_DrawTexxvOES(disp, parameters) \ - (* GET_DrawTexxvOES(disp)) parameters -static inline _glptr_DrawTexxvOES GET_DrawTexxvOES(struct _glapi_table *disp) { - return (_glptr_DrawTexxvOES) (GET_by_offset(disp, _gloffset_DrawTexxvOES)); -} - -static inline void SET_DrawTexxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfixed *)) { - SET_by_offset(disp, _gloffset_DrawTexxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_PointSizePointerOES)(GLenum, GLsizei, const GLvoid *); -#define CALL_PointSizePointerOES(disp, parameters) \ - (* GET_PointSizePointerOES(disp)) parameters -static inline _glptr_PointSizePointerOES GET_PointSizePointerOES(struct _glapi_table *disp) { - return (_glptr_PointSizePointerOES) (GET_by_offset(disp, _gloffset_PointSizePointerOES)); -} - -static inline void SET_PointSizePointerOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_PointSizePointerOES, fn); -} - -typedef GLbitfield (GLAPIENTRYP _glptr_QueryMatrixxOES)(GLfixed *, GLint *); -#define CALL_QueryMatrixxOES(disp, parameters) \ - (* GET_QueryMatrixxOES(disp)) parameters -static inline _glptr_QueryMatrixxOES GET_QueryMatrixxOES(struct _glapi_table *disp) { - return (_glptr_QueryMatrixxOES) (GET_by_offset(disp, _gloffset_QueryMatrixxOES)); -} - -static inline void SET_QueryMatrixxOES(struct _glapi_table *disp, GLbitfield (GLAPIENTRYP fn)(GLfixed *, GLint *)) { - SET_by_offset(disp, _gloffset_QueryMatrixxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_PointParameterf)(GLenum, GLfloat); -#define CALL_PointParameterf(disp, parameters) \ - (* GET_PointParameterf(disp)) parameters -static inline _glptr_PointParameterf GET_PointParameterf(struct _glapi_table *disp) { - return (_glptr_PointParameterf) (GET_by_offset(disp, _gloffset_PointParameterf)); -} - -static inline void SET_PointParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_PointParameterf, fn); -} - -typedef void (GLAPIENTRYP _glptr_PointParameterfv)(GLenum, const GLfloat *); -#define CALL_PointParameterfv(disp, parameters) \ - (* GET_PointParameterfv(disp)) parameters -static inline _glptr_PointParameterfv GET_PointParameterfv(struct _glapi_table *disp) { - return (_glptr_PointParameterfv) (GET_by_offset(disp, _gloffset_PointParameterfv)); -} - -static inline void SET_PointParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_PointParameterfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiDrawArraysEXT)(GLenum, const GLint *, const GLsizei *, GLsizei); -#define CALL_MultiDrawArraysEXT(disp, parameters) \ - (* GET_MultiDrawArraysEXT(disp)) parameters -static inline _glptr_MultiDrawArraysEXT GET_MultiDrawArraysEXT(struct _glapi_table *disp) { - return (_glptr_MultiDrawArraysEXT) (GET_by_offset(disp, _gloffset_MultiDrawArraysEXT)); -} - -static inline void SET_MultiDrawArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *, const GLsizei *, GLsizei)) { - SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiDrawElementsEXT)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei); -#define CALL_MultiDrawElementsEXT(disp, parameters) \ - (* GET_MultiDrawElementsEXT(disp)) parameters -static inline _glptr_MultiDrawElementsEXT GET_MultiDrawElementsEXT(struct _glapi_table *disp) { - return (_glptr_MultiDrawElementsEXT) (GET_by_offset(disp, _gloffset_MultiDrawElementsEXT)); -} - -static inline void SET_MultiDrawElementsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)) { - SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendFuncSeparateOES)(GLenum, GLenum, GLenum, GLenum); -#define CALL_BlendFuncSeparateOES(disp, parameters) \ - (* GET_BlendFuncSeparateOES(disp)) parameters -static inline _glptr_BlendFuncSeparateOES GET_BlendFuncSeparateOES(struct _glapi_table *disp) { - return (_glptr_BlendFuncSeparateOES) (GET_by_offset(disp, _gloffset_BlendFuncSeparateOES)); -} - -static inline void SET_BlendFuncSeparateOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendFuncSeparateOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_AlphaFuncxOES)(GLenum, GLclampx); -#define CALL_AlphaFuncxOES(disp, parameters) \ - (* GET_AlphaFuncxOES(disp)) parameters -static inline _glptr_AlphaFuncxOES GET_AlphaFuncxOES(struct _glapi_table *disp) { - return (_glptr_AlphaFuncxOES) (GET_by_offset(disp, _gloffset_AlphaFuncxOES)); -} - -static inline void SET_AlphaFuncxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLclampx)) { - SET_by_offset(disp, _gloffset_AlphaFuncxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearColorxOES)(GLclampx, GLclampx, GLclampx, GLclampx); -#define CALL_ClearColorxOES(disp, parameters) \ - (* GET_ClearColorxOES(disp)) parameters -static inline _glptr_ClearColorxOES GET_ClearColorxOES(struct _glapi_table *disp) { - return (_glptr_ClearColorxOES) (GET_by_offset(disp, _gloffset_ClearColorxOES)); -} - -static inline void SET_ClearColorxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampx, GLclampx, GLclampx, GLclampx)) { - SET_by_offset(disp, _gloffset_ClearColorxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearDepthxOES)(GLclampx); -#define CALL_ClearDepthxOES(disp, parameters) \ - (* GET_ClearDepthxOES(disp)) parameters -static inline _glptr_ClearDepthxOES GET_ClearDepthxOES(struct _glapi_table *disp) { - return (_glptr_ClearDepthxOES) (GET_by_offset(disp, _gloffset_ClearDepthxOES)); -} - -static inline void SET_ClearDepthxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampx)) { - SET_by_offset(disp, _gloffset_ClearDepthxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClipPlanexOES)(GLenum, const GLfixed *); -#define CALL_ClipPlanexOES(disp, parameters) \ - (* GET_ClipPlanexOES(disp)) parameters -static inline _glptr_ClipPlanexOES GET_ClipPlanexOES(struct _glapi_table *disp) { - return (_glptr_ClipPlanexOES) (GET_by_offset(disp, _gloffset_ClipPlanexOES)); -} - -static inline void SET_ClipPlanexOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_ClipPlanexOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_Color4xOES)(GLfixed, GLfixed, GLfixed, GLfixed); -#define CALL_Color4xOES(disp, parameters) \ - (* GET_Color4xOES(disp)) parameters -static inline _glptr_Color4xOES GET_Color4xOES(struct _glapi_table *disp) { - return (_glptr_Color4xOES) (GET_by_offset(disp, _gloffset_Color4xOES)); -} - -static inline void SET_Color4xOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_Color4xOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DepthRangexOES)(GLclampx, GLclampx); -#define CALL_DepthRangexOES(disp, parameters) \ - (* GET_DepthRangexOES(disp)) parameters -static inline _glptr_DepthRangexOES GET_DepthRangexOES(struct _glapi_table *disp) { - return (_glptr_DepthRangexOES) (GET_by_offset(disp, _gloffset_DepthRangexOES)); -} - -static inline void SET_DepthRangexOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampx, GLclampx)) { - SET_by_offset(disp, _gloffset_DepthRangexOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_FogxOES)(GLenum, GLfixed); -#define CALL_FogxOES(disp, parameters) \ - (* GET_FogxOES(disp)) parameters -static inline _glptr_FogxOES GET_FogxOES(struct _glapi_table *disp) { - return (_glptr_FogxOES) (GET_by_offset(disp, _gloffset_FogxOES)); -} - -static inline void SET_FogxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfixed)) { - SET_by_offset(disp, _gloffset_FogxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_FogxvOES)(GLenum, const GLfixed *); -#define CALL_FogxvOES(disp, parameters) \ - (* GET_FogxvOES(disp)) parameters -static inline _glptr_FogxvOES GET_FogxvOES(struct _glapi_table *disp) { - return (_glptr_FogxvOES) (GET_by_offset(disp, _gloffset_FogxvOES)); -} - -static inline void SET_FogxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_FogxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_FrustumxOES)(GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed); -#define CALL_FrustumxOES(disp, parameters) \ - (* GET_FrustumxOES(disp)) parameters -static inline _glptr_FrustumxOES GET_FrustumxOES(struct _glapi_table *disp) { - return (_glptr_FrustumxOES) (GET_by_offset(disp, _gloffset_FrustumxOES)); -} - -static inline void SET_FrustumxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_FrustumxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetClipPlanexOES)(GLenum, GLfixed *); -#define CALL_GetClipPlanexOES(disp, parameters) \ - (* GET_GetClipPlanexOES(disp)) parameters -static inline _glptr_GetClipPlanexOES GET_GetClipPlanexOES(struct _glapi_table *disp) { - return (_glptr_GetClipPlanexOES) (GET_by_offset(disp, _gloffset_GetClipPlanexOES)); -} - -static inline void SET_GetClipPlanexOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfixed *)) { - SET_by_offset(disp, _gloffset_GetClipPlanexOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetFixedvOES)(GLenum, GLfixed *); -#define CALL_GetFixedvOES(disp, parameters) \ - (* GET_GetFixedvOES(disp)) parameters -static inline _glptr_GetFixedvOES GET_GetFixedvOES(struct _glapi_table *disp) { - return (_glptr_GetFixedvOES) (GET_by_offset(disp, _gloffset_GetFixedvOES)); -} - -static inline void SET_GetFixedvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfixed *)) { - SET_by_offset(disp, _gloffset_GetFixedvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetLightxvOES)(GLenum, GLenum, GLfixed *); -#define CALL_GetLightxvOES(disp, parameters) \ - (* GET_GetLightxvOES(disp)) parameters -static inline _glptr_GetLightxvOES GET_GetLightxvOES(struct _glapi_table *disp) { - return (_glptr_GetLightxvOES) (GET_by_offset(disp, _gloffset_GetLightxvOES)); -} - -static inline void SET_GetLightxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed *)) { - SET_by_offset(disp, _gloffset_GetLightxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetMaterialxvOES)(GLenum, GLenum, GLfixed *); -#define CALL_GetMaterialxvOES(disp, parameters) \ - (* GET_GetMaterialxvOES(disp)) parameters -static inline _glptr_GetMaterialxvOES GET_GetMaterialxvOES(struct _glapi_table *disp) { - return (_glptr_GetMaterialxvOES) (GET_by_offset(disp, _gloffset_GetMaterialxvOES)); -} - -static inline void SET_GetMaterialxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed *)) { - SET_by_offset(disp, _gloffset_GetMaterialxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexEnvxvOES)(GLenum, GLenum, GLfixed *); -#define CALL_GetTexEnvxvOES(disp, parameters) \ - (* GET_GetTexEnvxvOES(disp)) parameters -static inline _glptr_GetTexEnvxvOES GET_GetTexEnvxvOES(struct _glapi_table *disp) { - return (_glptr_GetTexEnvxvOES) (GET_by_offset(disp, _gloffset_GetTexEnvxvOES)); -} - -static inline void SET_GetTexEnvxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed *)) { - SET_by_offset(disp, _gloffset_GetTexEnvxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexGenxvOES)(GLenum, GLenum, GLfixed *); -#define CALL_GetTexGenxvOES(disp, parameters) \ - (* GET_GetTexGenxvOES(disp)) parameters -static inline _glptr_GetTexGenxvOES GET_GetTexGenxvOES(struct _glapi_table *disp) { - return (_glptr_GetTexGenxvOES) (GET_by_offset(disp, _gloffset_GetTexGenxvOES)); -} - -static inline void SET_GetTexGenxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed *)) { - SET_by_offset(disp, _gloffset_GetTexGenxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexParameterxvOES)(GLenum, GLenum, GLfixed *); -#define CALL_GetTexParameterxvOES(disp, parameters) \ - (* GET_GetTexParameterxvOES(disp)) parameters -static inline _glptr_GetTexParameterxvOES GET_GetTexParameterxvOES(struct _glapi_table *disp) { - return (_glptr_GetTexParameterxvOES) (GET_by_offset(disp, _gloffset_GetTexParameterxvOES)); -} - -static inline void SET_GetTexParameterxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed *)) { - SET_by_offset(disp, _gloffset_GetTexParameterxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_LightModelxOES)(GLenum, GLfixed); -#define CALL_LightModelxOES(disp, parameters) \ - (* GET_LightModelxOES(disp)) parameters -static inline _glptr_LightModelxOES GET_LightModelxOES(struct _glapi_table *disp) { - return (_glptr_LightModelxOES) (GET_by_offset(disp, _gloffset_LightModelxOES)); -} - -static inline void SET_LightModelxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfixed)) { - SET_by_offset(disp, _gloffset_LightModelxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_LightModelxvOES)(GLenum, const GLfixed *); -#define CALL_LightModelxvOES(disp, parameters) \ - (* GET_LightModelxvOES(disp)) parameters -static inline _glptr_LightModelxvOES GET_LightModelxvOES(struct _glapi_table *disp) { - return (_glptr_LightModelxvOES) (GET_by_offset(disp, _gloffset_LightModelxvOES)); -} - -static inline void SET_LightModelxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_LightModelxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_LightxOES)(GLenum, GLenum, GLfixed); -#define CALL_LightxOES(disp, parameters) \ - (* GET_LightxOES(disp)) parameters -static inline _glptr_LightxOES GET_LightxOES(struct _glapi_table *disp) { - return (_glptr_LightxOES) (GET_by_offset(disp, _gloffset_LightxOES)); -} - -static inline void SET_LightxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed)) { - SET_by_offset(disp, _gloffset_LightxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_LightxvOES)(GLenum, GLenum, const GLfixed *); -#define CALL_LightxvOES(disp, parameters) \ - (* GET_LightxvOES(disp)) parameters -static inline _glptr_LightxvOES GET_LightxvOES(struct _glapi_table *disp) { - return (_glptr_LightxvOES) (GET_by_offset(disp, _gloffset_LightxvOES)); -} - -static inline void SET_LightxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_LightxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_LineWidthxOES)(GLfixed); -#define CALL_LineWidthxOES(disp, parameters) \ - (* GET_LineWidthxOES(disp)) parameters -static inline _glptr_LineWidthxOES GET_LineWidthxOES(struct _glapi_table *disp) { - return (_glptr_LineWidthxOES) (GET_by_offset(disp, _gloffset_LineWidthxOES)); -} - -static inline void SET_LineWidthxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed)) { - SET_by_offset(disp, _gloffset_LineWidthxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_LoadMatrixxOES)(const GLfixed *); -#define CALL_LoadMatrixxOES(disp, parameters) \ - (* GET_LoadMatrixxOES(disp)) parameters -static inline _glptr_LoadMatrixxOES GET_LoadMatrixxOES(struct _glapi_table *disp) { - return (_glptr_LoadMatrixxOES) (GET_by_offset(disp, _gloffset_LoadMatrixxOES)); -} - -static inline void SET_LoadMatrixxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfixed *)) { - SET_by_offset(disp, _gloffset_LoadMatrixxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_MaterialxOES)(GLenum, GLenum, GLfixed); -#define CALL_MaterialxOES(disp, parameters) \ - (* GET_MaterialxOES(disp)) parameters -static inline _glptr_MaterialxOES GET_MaterialxOES(struct _glapi_table *disp) { - return (_glptr_MaterialxOES) (GET_by_offset(disp, _gloffset_MaterialxOES)); -} - -static inline void SET_MaterialxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed)) { - SET_by_offset(disp, _gloffset_MaterialxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_MaterialxvOES)(GLenum, GLenum, const GLfixed *); -#define CALL_MaterialxvOES(disp, parameters) \ - (* GET_MaterialxvOES(disp)) parameters -static inline _glptr_MaterialxvOES GET_MaterialxvOES(struct _glapi_table *disp) { - return (_glptr_MaterialxvOES) (GET_by_offset(disp, _gloffset_MaterialxvOES)); -} - -static inline void SET_MaterialxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_MaterialxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultMatrixxOES)(const GLfixed *); -#define CALL_MultMatrixxOES(disp, parameters) \ - (* GET_MultMatrixxOES(disp)) parameters -static inline _glptr_MultMatrixxOES GET_MultMatrixxOES(struct _glapi_table *disp) { - return (_glptr_MultMatrixxOES) (GET_by_offset(disp, _gloffset_MultMatrixxOES)); -} - -static inline void SET_MultMatrixxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfixed *)) { - SET_by_offset(disp, _gloffset_MultMatrixxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4xOES)(GLenum, GLfixed, GLfixed, GLfixed, GLfixed); -#define CALL_MultiTexCoord4xOES(disp, parameters) \ - (* GET_MultiTexCoord4xOES(disp)) parameters -static inline _glptr_MultiTexCoord4xOES GET_MultiTexCoord4xOES(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4xOES) (GET_by_offset(disp, _gloffset_MultiTexCoord4xOES)); -} - -static inline void SET_MultiTexCoord4xOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfixed, GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4xOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_Normal3xOES)(GLfixed, GLfixed, GLfixed); -#define CALL_Normal3xOES(disp, parameters) \ - (* GET_Normal3xOES(disp)) parameters -static inline _glptr_Normal3xOES GET_Normal3xOES(struct _glapi_table *disp) { - return (_glptr_Normal3xOES) (GET_by_offset(disp, _gloffset_Normal3xOES)); -} - -static inline void SET_Normal3xOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_Normal3xOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_OrthoxOES)(GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed); -#define CALL_OrthoxOES(disp, parameters) \ - (* GET_OrthoxOES(disp)) parameters -static inline _glptr_OrthoxOES GET_OrthoxOES(struct _glapi_table *disp) { - return (_glptr_OrthoxOES) (GET_by_offset(disp, _gloffset_OrthoxOES)); -} - -static inline void SET_OrthoxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_OrthoxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_PointParameterxOES)(GLenum, GLfixed); -#define CALL_PointParameterxOES(disp, parameters) \ - (* GET_PointParameterxOES(disp)) parameters -static inline _glptr_PointParameterxOES GET_PointParameterxOES(struct _glapi_table *disp) { - return (_glptr_PointParameterxOES) (GET_by_offset(disp, _gloffset_PointParameterxOES)); -} - -static inline void SET_PointParameterxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfixed)) { - SET_by_offset(disp, _gloffset_PointParameterxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_PointParameterxvOES)(GLenum, const GLfixed *); -#define CALL_PointParameterxvOES(disp, parameters) \ - (* GET_PointParameterxvOES(disp)) parameters -static inline _glptr_PointParameterxvOES GET_PointParameterxvOES(struct _glapi_table *disp) { - return (_glptr_PointParameterxvOES) (GET_by_offset(disp, _gloffset_PointParameterxvOES)); -} - -static inline void SET_PointParameterxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_PointParameterxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_PointSizexOES)(GLfixed); -#define CALL_PointSizexOES(disp, parameters) \ - (* GET_PointSizexOES(disp)) parameters -static inline _glptr_PointSizexOES GET_PointSizexOES(struct _glapi_table *disp) { - return (_glptr_PointSizexOES) (GET_by_offset(disp, _gloffset_PointSizexOES)); -} - -static inline void SET_PointSizexOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed)) { - SET_by_offset(disp, _gloffset_PointSizexOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_PolygonOffsetxOES)(GLfixed, GLfixed); -#define CALL_PolygonOffsetxOES(disp, parameters) \ - (* GET_PolygonOffsetxOES(disp)) parameters -static inline _glptr_PolygonOffsetxOES GET_PolygonOffsetxOES(struct _glapi_table *disp) { - return (_glptr_PolygonOffsetxOES) (GET_by_offset(disp, _gloffset_PolygonOffsetxOES)); -} - -static inline void SET_PolygonOffsetxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_PolygonOffsetxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_RotatexOES)(GLfixed, GLfixed, GLfixed, GLfixed); -#define CALL_RotatexOES(disp, parameters) \ - (* GET_RotatexOES(disp)) parameters -static inline _glptr_RotatexOES GET_RotatexOES(struct _glapi_table *disp) { - return (_glptr_RotatexOES) (GET_by_offset(disp, _gloffset_RotatexOES)); -} - -static inline void SET_RotatexOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_RotatexOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_SampleCoveragexOES)(GLclampx, GLboolean); -#define CALL_SampleCoveragexOES(disp, parameters) \ - (* GET_SampleCoveragexOES(disp)) parameters -static inline _glptr_SampleCoveragexOES GET_SampleCoveragexOES(struct _glapi_table *disp) { - return (_glptr_SampleCoveragexOES) (GET_by_offset(disp, _gloffset_SampleCoveragexOES)); -} - -static inline void SET_SampleCoveragexOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampx, GLboolean)) { - SET_by_offset(disp, _gloffset_SampleCoveragexOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ScalexOES)(GLfixed, GLfixed, GLfixed); -#define CALL_ScalexOES(disp, parameters) \ - (* GET_ScalexOES(disp)) parameters -static inline _glptr_ScalexOES GET_ScalexOES(struct _glapi_table *disp) { - return (_glptr_ScalexOES) (GET_by_offset(disp, _gloffset_ScalexOES)); -} - -static inline void SET_ScalexOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_ScalexOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexEnvxOES)(GLenum, GLenum, GLfixed); -#define CALL_TexEnvxOES(disp, parameters) \ - (* GET_TexEnvxOES(disp)) parameters -static inline _glptr_TexEnvxOES GET_TexEnvxOES(struct _glapi_table *disp) { - return (_glptr_TexEnvxOES) (GET_by_offset(disp, _gloffset_TexEnvxOES)); -} - -static inline void SET_TexEnvxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed)) { - SET_by_offset(disp, _gloffset_TexEnvxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexEnvxvOES)(GLenum, GLenum, const GLfixed *); -#define CALL_TexEnvxvOES(disp, parameters) \ - (* GET_TexEnvxvOES(disp)) parameters -static inline _glptr_TexEnvxvOES GET_TexEnvxvOES(struct _glapi_table *disp) { - return (_glptr_TexEnvxvOES) (GET_by_offset(disp, _gloffset_TexEnvxvOES)); -} - -static inline void SET_TexEnvxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_TexEnvxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexGenxOES)(GLenum, GLenum, GLint); -#define CALL_TexGenxOES(disp, parameters) \ - (* GET_TexGenxOES(disp)) parameters -static inline _glptr_TexGenxOES GET_TexGenxOES(struct _glapi_table *disp) { - return (_glptr_TexGenxOES) (GET_by_offset(disp, _gloffset_TexGenxOES)); -} - -static inline void SET_TexGenxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { - SET_by_offset(disp, _gloffset_TexGenxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexGenxvOES)(GLenum, GLenum, const GLfixed *); -#define CALL_TexGenxvOES(disp, parameters) \ - (* GET_TexGenxvOES(disp)) parameters -static inline _glptr_TexGenxvOES GET_TexGenxvOES(struct _glapi_table *disp) { - return (_glptr_TexGenxvOES) (GET_by_offset(disp, _gloffset_TexGenxvOES)); -} - -static inline void SET_TexGenxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_TexGenxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameterxOES)(GLenum, GLenum, GLfixed); -#define CALL_TexParameterxOES(disp, parameters) \ - (* GET_TexParameterxOES(disp)) parameters -static inline _glptr_TexParameterxOES GET_TexParameterxOES(struct _glapi_table *disp) { - return (_glptr_TexParameterxOES) (GET_by_offset(disp, _gloffset_TexParameterxOES)); -} - -static inline void SET_TexParameterxOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfixed)) { - SET_by_offset(disp, _gloffset_TexParameterxOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameterxvOES)(GLenum, GLenum, const GLfixed *); -#define CALL_TexParameterxvOES(disp, parameters) \ - (* GET_TexParameterxvOES(disp)) parameters -static inline _glptr_TexParameterxvOES GET_TexParameterxvOES(struct _glapi_table *disp) { - return (_glptr_TexParameterxvOES) (GET_by_offset(disp, _gloffset_TexParameterxvOES)); -} - -static inline void SET_TexParameterxvOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfixed *)) { - SET_by_offset(disp, _gloffset_TexParameterxvOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TranslatexOES)(GLfixed, GLfixed, GLfixed); -#define CALL_TranslatexOES(disp, parameters) \ - (* GET_TranslatexOES(disp)) parameters -static inline _glptr_TranslatexOES GET_TranslatexOES(struct _glapi_table *disp) { - return (_glptr_TranslatexOES) (GET_by_offset(disp, _gloffset_TranslatexOES)); -} - -static inline void SET_TranslatexOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfixed, GLfixed, GLfixed)) { - SET_by_offset(disp, _gloffset_TranslatexOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClipPlanefOES)(GLenum, const GLfloat *); -#define CALL_ClipPlanefOES(disp, parameters) \ - (* GET_ClipPlanefOES(disp)) parameters -static inline _glptr_ClipPlanefOES GET_ClipPlanefOES(struct _glapi_table *disp) { - return (_glptr_ClipPlanefOES) (GET_by_offset(disp, _gloffset_ClipPlanefOES)); -} - -static inline void SET_ClipPlanefOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_ClipPlanefOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_FrustumfOES)(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_FrustumfOES(disp, parameters) \ - (* GET_FrustumfOES(disp)) parameters -static inline _glptr_FrustumfOES GET_FrustumfOES(struct _glapi_table *disp) { - return (_glptr_FrustumfOES) (GET_by_offset(disp, _gloffset_FrustumfOES)); -} - -static inline void SET_FrustumfOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_FrustumfOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetClipPlanefOES)(GLenum, GLfloat *); -#define CALL_GetClipPlanefOES(disp, parameters) \ - (* GET_GetClipPlanefOES(disp)) parameters -static inline _glptr_GetClipPlanefOES GET_GetClipPlanefOES(struct _glapi_table *disp) { - return (_glptr_GetClipPlanefOES) (GET_by_offset(disp, _gloffset_GetClipPlanefOES)); -} - -static inline void SET_GetClipPlanefOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetClipPlanefOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_OrthofOES)(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_OrthofOES(disp, parameters) \ - (* GET_OrthofOES(disp)) parameters -static inline _glptr_OrthofOES GET_OrthofOES(struct _glapi_table *disp) { - return (_glptr_OrthofOES) (GET_by_offset(disp, _gloffset_OrthofOES)); -} - -static inline void SET_OrthofOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_OrthofOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendEquationSeparateOES)(GLenum, GLenum); -#define CALL_BlendEquationSeparateOES(disp, parameters) \ - (* GET_BlendEquationSeparateOES(disp)) parameters -static inline _glptr_BlendEquationSeparateOES GET_BlendEquationSeparateOES(struct _glapi_table *disp) { - return (_glptr_BlendEquationSeparateOES) (GET_by_offset(disp, _gloffset_BlendEquationSeparateOES)); -} - -static inline void SET_BlendEquationSeparateOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendEquationSeparateOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindFramebufferOES)(GLenum, GLuint); -#define CALL_BindFramebufferOES(disp, parameters) \ - (* GET_BindFramebufferOES(disp)) parameters -static inline _glptr_BindFramebufferOES GET_BindFramebufferOES(struct _glapi_table *disp) { - return (_glptr_BindFramebufferOES) (GET_by_offset(disp, _gloffset_BindFramebufferOES)); -} - -static inline void SET_BindFramebufferOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindFramebufferOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindRenderbufferOES)(GLenum, GLuint); -#define CALL_BindRenderbufferOES(disp, parameters) \ - (* GET_BindRenderbufferOES(disp)) parameters -static inline _glptr_BindRenderbufferOES GET_BindRenderbufferOES(struct _glapi_table *disp) { - return (_glptr_BindRenderbufferOES) (GET_by_offset(disp, _gloffset_BindRenderbufferOES)); -} - -static inline void SET_BindRenderbufferOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindRenderbufferOES, fn); -} - -typedef GLenum (GLAPIENTRYP _glptr_CheckFramebufferStatusOES)(GLenum); -#define CALL_CheckFramebufferStatusOES(disp, parameters) \ - (* GET_CheckFramebufferStatusOES(disp)) parameters -static inline _glptr_CheckFramebufferStatusOES GET_CheckFramebufferStatusOES(struct _glapi_table *disp) { - return (_glptr_CheckFramebufferStatusOES) (GET_by_offset(disp, _gloffset_CheckFramebufferStatusOES)); -} - -static inline void SET_CheckFramebufferStatusOES(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_CheckFramebufferStatusOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteFramebuffersOES)(GLsizei, const GLuint *); -#define CALL_DeleteFramebuffersOES(disp, parameters) \ - (* GET_DeleteFramebuffersOES(disp)) parameters -static inline _glptr_DeleteFramebuffersOES GET_DeleteFramebuffersOES(struct _glapi_table *disp) { - return (_glptr_DeleteFramebuffersOES) (GET_by_offset(disp, _gloffset_DeleteFramebuffersOES)); -} - -static inline void SET_DeleteFramebuffersOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteFramebuffersOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteRenderbuffersOES)(GLsizei, const GLuint *); -#define CALL_DeleteRenderbuffersOES(disp, parameters) \ - (* GET_DeleteRenderbuffersOES(disp)) parameters -static inline _glptr_DeleteRenderbuffersOES GET_DeleteRenderbuffersOES(struct _glapi_table *disp) { - return (_glptr_DeleteRenderbuffersOES) (GET_by_offset(disp, _gloffset_DeleteRenderbuffersOES)); -} - -static inline void SET_DeleteRenderbuffersOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteRenderbuffersOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferRenderbufferOES)(GLenum, GLenum, GLenum, GLuint); -#define CALL_FramebufferRenderbufferOES(disp, parameters) \ - (* GET_FramebufferRenderbufferOES(disp)) parameters -static inline _glptr_FramebufferRenderbufferOES GET_FramebufferRenderbufferOES(struct _glapi_table *disp) { - return (_glptr_FramebufferRenderbufferOES) (GET_by_offset(disp, _gloffset_FramebufferRenderbufferOES)); -} - -static inline void SET_FramebufferRenderbufferOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_FramebufferRenderbufferOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTexture2DOES)(GLenum, GLenum, GLenum, GLuint, GLint); -#define CALL_FramebufferTexture2DOES(disp, parameters) \ - (* GET_FramebufferTexture2DOES(disp)) parameters -static inline _glptr_FramebufferTexture2DOES GET_FramebufferTexture2DOES(struct _glapi_table *disp) { - return (_glptr_FramebufferTexture2DOES) (GET_by_offset(disp, _gloffset_FramebufferTexture2DOES)); -} - -static inline void SET_FramebufferTexture2DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTexture2DOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenFramebuffersOES)(GLsizei, GLuint *); -#define CALL_GenFramebuffersOES(disp, parameters) \ - (* GET_GenFramebuffersOES(disp)) parameters -static inline _glptr_GenFramebuffersOES GET_GenFramebuffersOES(struct _glapi_table *disp) { - return (_glptr_GenFramebuffersOES) (GET_by_offset(disp, _gloffset_GenFramebuffersOES)); -} - -static inline void SET_GenFramebuffersOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenFramebuffersOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenRenderbuffersOES)(GLsizei, GLuint *); -#define CALL_GenRenderbuffersOES(disp, parameters) \ - (* GET_GenRenderbuffersOES(disp)) parameters -static inline _glptr_GenRenderbuffersOES GET_GenRenderbuffersOES(struct _glapi_table *disp) { - return (_glptr_GenRenderbuffersOES) (GET_by_offset(disp, _gloffset_GenRenderbuffersOES)); -} - -static inline void SET_GenRenderbuffersOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenRenderbuffersOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenerateMipmapOES)(GLenum); -#define CALL_GenerateMipmapOES(disp, parameters) \ - (* GET_GenerateMipmapOES(disp)) parameters -static inline _glptr_GenerateMipmapOES GET_GenerateMipmapOES(struct _glapi_table *disp) { - return (_glptr_GenerateMipmapOES) (GET_by_offset(disp, _gloffset_GenerateMipmapOES)); -} - -static inline void SET_GenerateMipmapOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_GenerateMipmapOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetFramebufferAttachmentParameterivOES)(GLenum, GLenum, GLenum, GLint *); -#define CALL_GetFramebufferAttachmentParameterivOES(disp, parameters) \ - (* GET_GetFramebufferAttachmentParameterivOES(disp)) parameters -static inline _glptr_GetFramebufferAttachmentParameterivOES GET_GetFramebufferAttachmentParameterivOES(struct _glapi_table *disp) { - return (_glptr_GetFramebufferAttachmentParameterivOES) (GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivOES)); -} - -static inline void SET_GetFramebufferAttachmentParameterivOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetRenderbufferParameterivOES)(GLenum, GLenum, GLint *); -#define CALL_GetRenderbufferParameterivOES(disp, parameters) \ - (* GET_GetRenderbufferParameterivOES(disp)) parameters -static inline _glptr_GetRenderbufferParameterivOES GET_GetRenderbufferParameterivOES(struct _glapi_table *disp) { - return (_glptr_GetRenderbufferParameterivOES) (GET_by_offset(disp, _gloffset_GetRenderbufferParameterivOES)); -} - -static inline void SET_GetRenderbufferParameterivOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetRenderbufferParameterivOES, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsFramebufferOES)(GLuint); -#define CALL_IsFramebufferOES(disp, parameters) \ - (* GET_IsFramebufferOES(disp)) parameters -static inline _glptr_IsFramebufferOES GET_IsFramebufferOES(struct _glapi_table *disp) { - return (_glptr_IsFramebufferOES) (GET_by_offset(disp, _gloffset_IsFramebufferOES)); -} - -static inline void SET_IsFramebufferOES(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsFramebufferOES, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsRenderbufferOES)(GLuint); -#define CALL_IsRenderbufferOES(disp, parameters) \ - (* GET_IsRenderbufferOES(disp)) parameters -static inline _glptr_IsRenderbufferOES GET_IsRenderbufferOES(struct _glapi_table *disp) { - return (_glptr_IsRenderbufferOES) (GET_by_offset(disp, _gloffset_IsRenderbufferOES)); -} - -static inline void SET_IsRenderbufferOES(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsRenderbufferOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_RenderbufferStorageOES)(GLenum, GLenum, GLsizei, GLsizei); -#define CALL_RenderbufferStorageOES(disp, parameters) \ - (* GET_RenderbufferStorageOES(disp)) parameters -static inline _glptr_RenderbufferStorageOES GET_RenderbufferStorageOES(struct _glapi_table *disp) { - return (_glptr_RenderbufferStorageOES) (GET_by_offset(disp, _gloffset_RenderbufferStorageOES)); -} - -static inline void SET_RenderbufferStorageOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_RenderbufferStorageOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_EGLImageTargetRenderbufferStorageOES)(GLenum, GLvoid *); -#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) \ - (* GET_EGLImageTargetRenderbufferStorageOES(disp)) parameters -static inline _glptr_EGLImageTargetRenderbufferStorageOES GET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp) { - return (_glptr_EGLImageTargetRenderbufferStorageOES) (GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES)); -} - -static inline void SET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_EGLImageTargetTexture2DOES)(GLenum, GLvoid *); -#define CALL_EGLImageTargetTexture2DOES(disp, parameters) \ - (* GET_EGLImageTargetTexture2DOES(disp)) parameters -static inline _glptr_EGLImageTargetTexture2DOES GET_EGLImageTargetTexture2DOES(struct _glapi_table *disp) { - return (_glptr_EGLImageTargetTexture2DOES) (GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES)); -} - -static inline void SET_EGLImageTargetTexture2DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn); -} - - -/* define aliases for compatibility */ -#define CALL_ClearDepthfOES(disp, parameters) CALL_ClearDepthf(disp, parameters) -#define GET_ClearDepthfOES(disp) GET_ClearDepthf(disp) -#define SET_ClearDepthfOES(disp, fn) SET_ClearDepthf(disp, fn) -#define CALL_DepthRangefOES(disp, parameters) CALL_DepthRangef(disp, parameters) -#define GET_DepthRangefOES(disp) GET_DepthRangef(disp) -#define SET_DepthRangefOES(disp, fn) SET_DepthRangef(disp, fn) -#define CALL_AlphaFuncx(disp, parameters) CALL_AlphaFuncxOES(disp, parameters) -#define GET_AlphaFuncx(disp) GET_AlphaFuncxOES(disp) -#define SET_AlphaFuncx(disp, fn) SET_AlphaFuncxOES(disp, fn) -#define CALL_ClearColorx(disp, parameters) CALL_ClearColorxOES(disp, parameters) -#define GET_ClearColorx(disp) GET_ClearColorxOES(disp) -#define SET_ClearColorx(disp, fn) SET_ClearColorxOES(disp, fn) -#define CALL_ClearDepthx(disp, parameters) CALL_ClearDepthxOES(disp, parameters) -#define GET_ClearDepthx(disp) GET_ClearDepthxOES(disp) -#define SET_ClearDepthx(disp, fn) SET_ClearDepthxOES(disp, fn) -#define CALL_ClipPlanex(disp, parameters) CALL_ClipPlanexOES(disp, parameters) -#define GET_ClipPlanex(disp) GET_ClipPlanexOES(disp) -#define SET_ClipPlanex(disp, fn) SET_ClipPlanexOES(disp, fn) -#define CALL_Color4x(disp, parameters) CALL_Color4xOES(disp, parameters) -#define GET_Color4x(disp) GET_Color4xOES(disp) -#define SET_Color4x(disp, fn) SET_Color4xOES(disp, fn) -#define CALL_DepthRangex(disp, parameters) CALL_DepthRangexOES(disp, parameters) -#define GET_DepthRangex(disp) GET_DepthRangexOES(disp) -#define SET_DepthRangex(disp, fn) SET_DepthRangexOES(disp, fn) -#define CALL_Fogx(disp, parameters) CALL_FogxOES(disp, parameters) -#define GET_Fogx(disp) GET_FogxOES(disp) -#define SET_Fogx(disp, fn) SET_FogxOES(disp, fn) -#define CALL_Fogxv(disp, parameters) CALL_FogxvOES(disp, parameters) -#define GET_Fogxv(disp) GET_FogxvOES(disp) -#define SET_Fogxv(disp, fn) SET_FogxvOES(disp, fn) -#define CALL_Frustumx(disp, parameters) CALL_FrustumxOES(disp, parameters) -#define GET_Frustumx(disp) GET_FrustumxOES(disp) -#define SET_Frustumx(disp, fn) SET_FrustumxOES(disp, fn) -#define CALL_GetClipPlanex(disp, parameters) CALL_GetClipPlanexOES(disp, parameters) -#define GET_GetClipPlanex(disp) GET_GetClipPlanexOES(disp) -#define SET_GetClipPlanex(disp, fn) SET_GetClipPlanexOES(disp, fn) -#define CALL_GetFixedv(disp, parameters) CALL_GetFixedvOES(disp, parameters) -#define GET_GetFixedv(disp) GET_GetFixedvOES(disp) -#define SET_GetFixedv(disp, fn) SET_GetFixedvOES(disp, fn) -#define CALL_GetLightxv(disp, parameters) CALL_GetLightxvOES(disp, parameters) -#define GET_GetLightxv(disp) GET_GetLightxvOES(disp) -#define SET_GetLightxv(disp, fn) SET_GetLightxvOES(disp, fn) -#define CALL_GetMaterialxv(disp, parameters) CALL_GetMaterialxvOES(disp, parameters) -#define GET_GetMaterialxv(disp) GET_GetMaterialxvOES(disp) -#define SET_GetMaterialxv(disp, fn) SET_GetMaterialxvOES(disp, fn) -#define CALL_GetTexEnvxv(disp, parameters) CALL_GetTexEnvxvOES(disp, parameters) -#define GET_GetTexEnvxv(disp) GET_GetTexEnvxvOES(disp) -#define SET_GetTexEnvxv(disp, fn) SET_GetTexEnvxvOES(disp, fn) -#define CALL_GetTexParameterxv(disp, parameters) CALL_GetTexParameterxvOES(disp, parameters) -#define GET_GetTexParameterxv(disp) GET_GetTexParameterxvOES(disp) -#define SET_GetTexParameterxv(disp, fn) SET_GetTexParameterxvOES(disp, fn) -#define CALL_LightModelx(disp, parameters) CALL_LightModelxOES(disp, parameters) -#define GET_LightModelx(disp) GET_LightModelxOES(disp) -#define SET_LightModelx(disp, fn) SET_LightModelxOES(disp, fn) -#define CALL_LightModelxv(disp, parameters) CALL_LightModelxvOES(disp, parameters) -#define GET_LightModelxv(disp) GET_LightModelxvOES(disp) -#define SET_LightModelxv(disp, fn) SET_LightModelxvOES(disp, fn) -#define CALL_Lightx(disp, parameters) CALL_LightxOES(disp, parameters) -#define GET_Lightx(disp) GET_LightxOES(disp) -#define SET_Lightx(disp, fn) SET_LightxOES(disp, fn) -#define CALL_Lightxv(disp, parameters) CALL_LightxvOES(disp, parameters) -#define GET_Lightxv(disp) GET_LightxvOES(disp) -#define SET_Lightxv(disp, fn) SET_LightxvOES(disp, fn) -#define CALL_LineWidthx(disp, parameters) CALL_LineWidthxOES(disp, parameters) -#define GET_LineWidthx(disp) GET_LineWidthxOES(disp) -#define SET_LineWidthx(disp, fn) SET_LineWidthxOES(disp, fn) -#define CALL_LoadMatrixx(disp, parameters) CALL_LoadMatrixxOES(disp, parameters) -#define GET_LoadMatrixx(disp) GET_LoadMatrixxOES(disp) -#define SET_LoadMatrixx(disp, fn) SET_LoadMatrixxOES(disp, fn) -#define CALL_Materialx(disp, parameters) CALL_MaterialxOES(disp, parameters) -#define GET_Materialx(disp) GET_MaterialxOES(disp) -#define SET_Materialx(disp, fn) SET_MaterialxOES(disp, fn) -#define CALL_Materialxv(disp, parameters) CALL_MaterialxvOES(disp, parameters) -#define GET_Materialxv(disp) GET_MaterialxvOES(disp) -#define SET_Materialxv(disp, fn) SET_MaterialxvOES(disp, fn) -#define CALL_MultMatrixx(disp, parameters) CALL_MultMatrixxOES(disp, parameters) -#define GET_MultMatrixx(disp) GET_MultMatrixxOES(disp) -#define SET_MultMatrixx(disp, fn) SET_MultMatrixxOES(disp, fn) -#define CALL_MultiTexCoord4x(disp, parameters) CALL_MultiTexCoord4xOES(disp, parameters) -#define GET_MultiTexCoord4x(disp) GET_MultiTexCoord4xOES(disp) -#define SET_MultiTexCoord4x(disp, fn) SET_MultiTexCoord4xOES(disp, fn) -#define CALL_Normal3x(disp, parameters) CALL_Normal3xOES(disp, parameters) -#define GET_Normal3x(disp) GET_Normal3xOES(disp) -#define SET_Normal3x(disp, fn) SET_Normal3xOES(disp, fn) -#define CALL_Orthox(disp, parameters) CALL_OrthoxOES(disp, parameters) -#define GET_Orthox(disp) GET_OrthoxOES(disp) -#define SET_Orthox(disp, fn) SET_OrthoxOES(disp, fn) -#define CALL_PointParameterx(disp, parameters) CALL_PointParameterxOES(disp, parameters) -#define GET_PointParameterx(disp) GET_PointParameterxOES(disp) -#define SET_PointParameterx(disp, fn) SET_PointParameterxOES(disp, fn) -#define CALL_PointParameterxv(disp, parameters) CALL_PointParameterxvOES(disp, parameters) -#define GET_PointParameterxv(disp) GET_PointParameterxvOES(disp) -#define SET_PointParameterxv(disp, fn) SET_PointParameterxvOES(disp, fn) -#define CALL_PointSizex(disp, parameters) CALL_PointSizexOES(disp, parameters) -#define GET_PointSizex(disp) GET_PointSizexOES(disp) -#define SET_PointSizex(disp, fn) SET_PointSizexOES(disp, fn) -#define CALL_PolygonOffsetx(disp, parameters) CALL_PolygonOffsetxOES(disp, parameters) -#define GET_PolygonOffsetx(disp) GET_PolygonOffsetxOES(disp) -#define SET_PolygonOffsetx(disp, fn) SET_PolygonOffsetxOES(disp, fn) -#define CALL_Rotatex(disp, parameters) CALL_RotatexOES(disp, parameters) -#define GET_Rotatex(disp) GET_RotatexOES(disp) -#define SET_Rotatex(disp, fn) SET_RotatexOES(disp, fn) -#define CALL_SampleCoveragex(disp, parameters) CALL_SampleCoveragexOES(disp, parameters) -#define GET_SampleCoveragex(disp) GET_SampleCoveragexOES(disp) -#define SET_SampleCoveragex(disp, fn) SET_SampleCoveragexOES(disp, fn) -#define CALL_Scalex(disp, parameters) CALL_ScalexOES(disp, parameters) -#define GET_Scalex(disp) GET_ScalexOES(disp) -#define SET_Scalex(disp, fn) SET_ScalexOES(disp, fn) -#define CALL_TexEnvx(disp, parameters) CALL_TexEnvxOES(disp, parameters) -#define GET_TexEnvx(disp) GET_TexEnvxOES(disp) -#define SET_TexEnvx(disp, fn) SET_TexEnvxOES(disp, fn) -#define CALL_TexEnvxv(disp, parameters) CALL_TexEnvxvOES(disp, parameters) -#define GET_TexEnvxv(disp) GET_TexEnvxvOES(disp) -#define SET_TexEnvxv(disp, fn) SET_TexEnvxvOES(disp, fn) -#define CALL_TexParameterx(disp, parameters) CALL_TexParameterxOES(disp, parameters) -#define GET_TexParameterx(disp) GET_TexParameterxOES(disp) -#define SET_TexParameterx(disp, fn) SET_TexParameterxOES(disp, fn) -#define CALL_TexParameterxv(disp, parameters) CALL_TexParameterxvOES(disp, parameters) -#define GET_TexParameterxv(disp) GET_TexParameterxvOES(disp) -#define SET_TexParameterxv(disp, fn) SET_TexParameterxvOES(disp, fn) -#define CALL_Translatex(disp, parameters) CALL_TranslatexOES(disp, parameters) -#define GET_Translatex(disp) GET_TranslatexOES(disp) -#define SET_Translatex(disp, fn) SET_TranslatexOES(disp, fn) -#define CALL_ClipPlanef(disp, parameters) CALL_ClipPlanefOES(disp, parameters) -#define GET_ClipPlanef(disp) GET_ClipPlanefOES(disp) -#define SET_ClipPlanef(disp, fn) SET_ClipPlanefOES(disp, fn) -#define CALL_Frustumf(disp, parameters) CALL_FrustumfOES(disp, parameters) -#define GET_Frustumf(disp) GET_FrustumfOES(disp) -#define SET_Frustumf(disp, fn) SET_FrustumfOES(disp, fn) -#define CALL_GetClipPlanef(disp, parameters) CALL_GetClipPlanefOES(disp, parameters) -#define GET_GetClipPlanef(disp) GET_GetClipPlanefOES(disp) -#define SET_GetClipPlanef(disp, fn) SET_GetClipPlanefOES(disp, fn) -#define CALL_Orthof(disp, parameters) CALL_OrthofOES(disp, parameters) -#define GET_Orthof(disp) GET_OrthofOES(disp) -#define SET_Orthof(disp, fn) SET_OrthofOES(disp, fn) - -#if FEATURE_remap_table -#define ClearDepthfOES_remap_index ClearDepthf_remap_index -#define DepthRangefOES_remap_index DepthRangef_remap_index -#define AlphaFuncx_remap_index AlphaFuncxOES_remap_index -#define ClearColorx_remap_index ClearColorxOES_remap_index -#define ClearDepthx_remap_index ClearDepthxOES_remap_index -#define ClipPlanex_remap_index ClipPlanexOES_remap_index -#define Color4x_remap_index Color4xOES_remap_index -#define DepthRangex_remap_index DepthRangexOES_remap_index -#define Fogx_remap_index FogxOES_remap_index -#define Fogxv_remap_index FogxvOES_remap_index -#define Frustumx_remap_index FrustumxOES_remap_index -#define GetClipPlanex_remap_index GetClipPlanexOES_remap_index -#define GetFixedv_remap_index GetFixedvOES_remap_index -#define GetLightxv_remap_index GetLightxvOES_remap_index -#define GetMaterialxv_remap_index GetMaterialxvOES_remap_index -#define GetTexEnvxv_remap_index GetTexEnvxvOES_remap_index -#define GetTexParameterxv_remap_index GetTexParameterxvOES_remap_index -#define LightModelx_remap_index LightModelxOES_remap_index -#define LightModelxv_remap_index LightModelxvOES_remap_index -#define Lightx_remap_index LightxOES_remap_index -#define Lightxv_remap_index LightxvOES_remap_index -#define LineWidthx_remap_index LineWidthxOES_remap_index -#define LoadMatrixx_remap_index LoadMatrixxOES_remap_index -#define Materialx_remap_index MaterialxOES_remap_index -#define Materialxv_remap_index MaterialxvOES_remap_index -#define MultMatrixx_remap_index MultMatrixxOES_remap_index -#define MultiTexCoord4x_remap_index MultiTexCoord4xOES_remap_index -#define Normal3x_remap_index Normal3xOES_remap_index -#define Orthox_remap_index OrthoxOES_remap_index -#define PointParameterx_remap_index PointParameterxOES_remap_index -#define PointParameterxv_remap_index PointParameterxvOES_remap_index -#define PointSizex_remap_index PointSizexOES_remap_index -#define PolygonOffsetx_remap_index PolygonOffsetxOES_remap_index -#define Rotatex_remap_index RotatexOES_remap_index -#define SampleCoveragex_remap_index SampleCoveragexOES_remap_index -#define Scalex_remap_index ScalexOES_remap_index -#define TexEnvx_remap_index TexEnvxOES_remap_index -#define TexEnvxv_remap_index TexEnvxvOES_remap_index -#define TexParameterx_remap_index TexParameterxOES_remap_index -#define TexParameterxv_remap_index TexParameterxvOES_remap_index -#define Translatex_remap_index TranslatexOES_remap_index -#define ClipPlanef_remap_index ClipPlanefOES_remap_index -#define Frustumf_remap_index FrustumfOES_remap_index -#define GetClipPlanef_remap_index GetClipPlanefOES_remap_index -#define Orthof_remap_index OrthofOES_remap_index -#endif /* FEATURE_remap_table */ - - -#endif /* !defined( _DISPATCH_H_ ) */ diff -Nru mesa-8.0.2/src/mesa/main/api_exec_es1_remap_helper.h mesa-8.0.3/src/mesa/main/api_exec_es1_remap_helper.h --- mesa-8.0.2/src/mesa/main/api_exec_es1_remap_helper.h 2012-03-21 17:17:33.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/api_exec_es1_remap_helper.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,940 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by remap_helper.py (from Mesa) script */ - -/* - * Copyright (C) 2009 Chia-I Wu - * 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 - * 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 - * Chia-I Wu, - * AND/OR THEIR 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. - */ - -#include "main/dispatch.h" -#include "main/remap.h" - -/* this is internal to remap.c */ -#ifndef need_MESA_remap_table -#error Only remap.c should include this file! -#endif /* need_MESA_remap_table */ - - -static const char _mesa_function_pool[] = - /* _mesa_function_pool[0]: GetTexParameteriv (offset 283) */ - "iip\0" - "glGetTexParameteriv\0" - "\0" - /* _mesa_function_pool[25]: DisableClientState (offset 309) */ - "i\0" - "glDisableClientState\0" - "\0" - /* _mesa_function_pool[49]: MapBufferOES (will be remapped) */ - "ii\0" - "glMapBufferOES\0" - "\0" - /* _mesa_function_pool[68]: MultMatrixxOES (will be remapped) */ - "p\0" - "glMultMatrixxOES\0" - "glMultMatrixx\0" - "\0" - /* _mesa_function_pool[102]: DrawTexfOES (will be remapped) */ - "fffff\0" - "glDrawTexfOES\0" - "\0" - /* _mesa_function_pool[123]: BindRenderbufferOES (will be remapped) */ - "ii\0" - "glBindRenderbufferOES\0" - "\0" - /* _mesa_function_pool[149]: LoadIdentity (offset 290) */ - "\0" - "glLoadIdentity\0" - "\0" - /* _mesa_function_pool[166]: GetTexParameterfv (offset 282) */ - "iip\0" - "glGetTexParameterfv\0" - "\0" - /* _mesa_function_pool[191]: ColorPointer (offset 308) */ - "iiip\0" - "glColorPointer\0" - "\0" - /* _mesa_function_pool[212]: MaterialxvOES (will be remapped) */ - "iip\0" - "glMaterialxvOES\0" - "glMaterialxv\0" - "\0" - /* _mesa_function_pool[246]: IsFramebufferOES (will be remapped) */ - "i\0" - "glIsFramebufferOES\0" - "\0" - /* _mesa_function_pool[268]: EGLImageTargetRenderbufferStorageOES (will be remapped) */ - "ip\0" - "glEGLImageTargetRenderbufferStorageOES\0" - "\0" - /* _mesa_function_pool[311]: LineWidth (offset 168) */ - "f\0" - "glLineWidth\0" - "\0" - /* _mesa_function_pool[326]: GetBufferPointervOES (will be remapped) */ - "iip\0" - "glGetBufferPointervOES\0" - "\0" - /* _mesa_function_pool[354]: DepthRangexOES (will be remapped) */ - "ii\0" - "glDepthRangexOES\0" - "glDepthRangex\0" - "\0" - /* _mesa_function_pool[389]: FramebufferTexture2DOES (will be remapped) */ - "iiiii\0" - "glFramebufferTexture2DOES\0" - "\0" - /* _mesa_function_pool[422]: Finish (offset 216) */ - "\0" - "glFinish\0" - "\0" - /* _mesa_function_pool[433]: ClearStencil (offset 207) */ - "i\0" - "glClearStencil\0" - "\0" - /* _mesa_function_pool[451]: GetTexGenfvOES (offset 279) */ - "iip\0" - "glGetTexGenfvOES\0" - "\0" - /* _mesa_function_pool[473]: GenBuffers (will be remapped) */ - "ip\0" - "glGenBuffers\0" - "\0" - /* _mesa_function_pool[490]: MatrixMode (offset 293) */ - "i\0" - "glMatrixMode\0" - "\0" - /* _mesa_function_pool[506]: DrawTexivOES (will be remapped) */ - "p\0" - "glDrawTexivOES\0" - "\0" - /* _mesa_function_pool[524]: LineWidthxOES (will be remapped) */ - "i\0" - "glLineWidthxOES\0" - "glLineWidthx\0" - "\0" - /* _mesa_function_pool[556]: Color4f (offset 29) */ - "ffff\0" - "glColor4f\0" - "\0" - /* _mesa_function_pool[572]: TexGenfOES (offset 190) */ - "iif\0" - "glTexGenfOES\0" - "\0" - /* _mesa_function_pool[590]: GetMaterialfv (offset 269) */ - "iip\0" - "glGetMaterialfv\0" - "\0" - /* _mesa_function_pool[611]: BlendFuncSeparateOES (will be remapped) */ - "iiii\0" - "glBlendFuncSeparateOES\0" - "\0" - /* _mesa_function_pool[640]: IsEnabled (offset 286) */ - "i\0" - "glIsEnabled\0" - "\0" - /* _mesa_function_pool[655]: ShadeModel (offset 177) */ - "i\0" - "glShadeModel\0" - "\0" - /* _mesa_function_pool[671]: Materialfv (offset 170) */ - "iip\0" - "glMaterialfv\0" - "\0" - /* _mesa_function_pool[689]: Hint (offset 158) */ - "ii\0" - "glHint\0" - "\0" - /* _mesa_function_pool[700]: TexGenfvOES (offset 191) */ - "iip\0" - "glTexGenfvOES\0" - "\0" - /* _mesa_function_pool[719]: GetTexGenxvOES (will be remapped) */ - "iip\0" - "glGetTexGenxvOES\0" - "\0" - /* _mesa_function_pool[741]: CopyTexSubImage2D (offset 326) */ - "iiiiiiii\0" - "glCopyTexSubImage2D\0" - "\0" - /* _mesa_function_pool[771]: SampleCoverage (will be remapped) */ - "fi\0" - "glSampleCoverage\0" - "\0" - /* _mesa_function_pool[792]: VertexPointer (offset 321) */ - "iiip\0" - "glVertexPointer\0" - "\0" - /* _mesa_function_pool[814]: PixelStorei (offset 250) */ - "ii\0" - "glPixelStorei\0" - "\0" - /* _mesa_function_pool[832]: DrawElements (offset 311) */ - "iiip\0" - "glDrawElements\0" - "\0" - /* _mesa_function_pool[853]: PointSizexOES (will be remapped) */ - "i\0" - "glPointSizexOES\0" - "glPointSizex\0" - "\0" - /* _mesa_function_pool[885]: TexParameterxvOES (will be remapped) */ - "iip\0" - "glTexParameterxvOES\0" - "glTexParameterxv\0" - "\0" - /* _mesa_function_pool[927]: IsBuffer (will be remapped) */ - "i\0" - "glIsBuffer\0" - "\0" - /* _mesa_function_pool[941]: TexGenxOES (will be remapped) */ - "iii\0" - "glTexGenxOES\0" - "\0" - /* _mesa_function_pool[959]: Disable (offset 214) */ - "i\0" - "glDisable\0" - "\0" - /* _mesa_function_pool[972]: Fogfv (offset 154) */ - "ip\0" - "glFogfv\0" - "\0" - /* _mesa_function_pool[984]: TexGenxvOES (will be remapped) */ - "iip\0" - "glTexGenxvOES\0" - "\0" - /* _mesa_function_pool[1003]: TexEnvxvOES (will be remapped) */ - "iip\0" - "glTexEnvxvOES\0" - "glTexEnvxv\0" - "\0" - /* _mesa_function_pool[1033]: TexEnvxOES (will be remapped) */ - "iii\0" - "glTexEnvxOES\0" - "glTexEnvx\0" - "\0" - /* _mesa_function_pool[1061]: BufferData (will be remapped) */ - "iipi\0" - "glBufferData\0" - "\0" - /* _mesa_function_pool[1080]: BlendEquationOES (offset 337) */ - "i\0" - "glBlendEquationOES\0" - "\0" - /* _mesa_function_pool[1102]: IsTexture (offset 330) */ - "i\0" - "glIsTexture\0" - "\0" - /* _mesa_function_pool[1117]: Color4xOES (will be remapped) */ - "iiii\0" - "glColor4xOES\0" - "glColor4x\0" - "\0" - /* _mesa_function_pool[1146]: TexSubImage2D (offset 333) */ - "iiiiiiiip\0" - "glTexSubImage2D\0" - "\0" - /* _mesa_function_pool[1173]: LightxvOES (will be remapped) */ - "iip\0" - "glLightxvOES\0" - "glLightxv\0" - "\0" - /* _mesa_function_pool[1201]: ClipPlanexOES (will be remapped) */ - "ip\0" - "glClipPlanexOES\0" - "glClipPlanex\0" - "\0" - /* _mesa_function_pool[1234]: LightxOES (will be remapped) */ - "iii\0" - "glLightxOES\0" - "glLightx\0" - "\0" - /* _mesa_function_pool[1260]: GetFixedvOES (will be remapped) */ - "ip\0" - "glGetFixedvOES\0" - "glGetFixedv\0" - "\0" - /* _mesa_function_pool[1291]: DrawTexiOES (will be remapped) */ - "iiiii\0" - "glDrawTexiOES\0" - "\0" - /* _mesa_function_pool[1312]: GetTexEnvxvOES (will be remapped) */ - "iip\0" - "glGetTexEnvxvOES\0" - "glGetTexEnvxv\0" - "\0" - /* _mesa_function_pool[1348]: MultiTexCoord4f (offset 402) */ - "iffff\0" - "glMultiTexCoord4f\0" - "\0" - /* _mesa_function_pool[1373]: Viewport (offset 305) */ - "iiii\0" - "glViewport\0" - "\0" - /* _mesa_function_pool[1390]: GetError (offset 261) */ - "\0" - "glGetError\0" - "\0" - /* _mesa_function_pool[1403]: RenderbufferStorageOES (will be remapped) */ - "iiii\0" - "glRenderbufferStorageOES\0" - "\0" - /* _mesa_function_pool[1434]: AlphaFuncxOES (will be remapped) */ - "ii\0" - "glAlphaFuncxOES\0" - "glAlphaFuncx\0" - "\0" - /* _mesa_function_pool[1467]: LightModelfv (offset 164) */ - "ip\0" - "glLightModelfv\0" - "\0" - /* _mesa_function_pool[1486]: CompressedTexSubImage2D (will be remapped) */ - "iiiiiiiip\0" - "glCompressedTexSubImage2D\0" - "\0" - /* _mesa_function_pool[1523]: Normal3f (offset 56) */ - "fff\0" - "glNormal3f\0" - "\0" - /* _mesa_function_pool[1539]: StencilMask (offset 209) */ - "i\0" - "glStencilMask\0" - "\0" - /* _mesa_function_pool[1556]: EGLImageTargetTexture2DOES (will be remapped) */ - "ip\0" - "glEGLImageTargetTexture2DOES\0" - "\0" - /* _mesa_function_pool[1589]: LightModelxOES (will be remapped) */ - "ii\0" - "glLightModelxOES\0" - "glLightModelx\0" - "\0" - /* _mesa_function_pool[1624]: MultiDrawElementsEXT (will be remapped) */ - "ipipi\0" - "glMultiDrawElementsEXT\0" - "\0" - /* _mesa_function_pool[1654]: OrthoxOES (will be remapped) */ - "iiiiii\0" - "glOrthoxOES\0" - "glOrthox\0" - "\0" - /* _mesa_function_pool[1683]: DepthMask (offset 211) */ - "i\0" - "glDepthMask\0" - "\0" - /* _mesa_function_pool[1698]: SampleCoveragexOES (will be remapped) */ - "ii\0" - "glSampleCoveragexOES\0" - "glSampleCoveragex\0" - "\0" - /* _mesa_function_pool[1741]: TexCoordPointer (offset 320) */ - "iiip\0" - "glTexCoordPointer\0" - "\0" - /* _mesa_function_pool[1765]: StencilOp (offset 244) */ - "iii\0" - "glStencilOp\0" - "\0" - /* _mesa_function_pool[1782]: FrontFace (offset 157) */ - "i\0" - "glFrontFace\0" - "\0" - /* _mesa_function_pool[1797]: TexEnvfv (offset 185) */ - "iip\0" - "glTexEnvfv\0" - "\0" - /* _mesa_function_pool[1813]: FrustumxOES (will be remapped) */ - "iiiiii\0" - "glFrustumxOES\0" - "glFrustumx\0" - "\0" - /* _mesa_function_pool[1846]: BindFramebufferOES (will be remapped) */ - "ii\0" - "glBindFramebufferOES\0" - "\0" - /* _mesa_function_pool[1871]: DrawTexsOES (will be remapped) */ - "iiiii\0" - "glDrawTexsOES\0" - "\0" - /* _mesa_function_pool[1892]: DrawTexfvOES (will be remapped) */ - "p\0" - "glDrawTexfvOES\0" - "\0" - /* _mesa_function_pool[1910]: GetClipPlanefOES (will be remapped) */ - "ip\0" - "glGetClipPlanefOES\0" - "glGetClipPlanef\0" - "\0" - /* _mesa_function_pool[1949]: Lightf (offset 159) */ - "iif\0" - "glLightf\0" - "\0" - /* _mesa_function_pool[1963]: EnableClientState (offset 313) */ - "i\0" - "glEnableClientState\0" - "\0" - /* _mesa_function_pool[1986]: LoadMatrixf (offset 291) */ - "p\0" - "glLoadMatrixf\0" - "\0" - /* _mesa_function_pool[2003]: MaterialxOES (will be remapped) */ - "iii\0" - "glMaterialxOES\0" - "glMaterialx\0" - "\0" - /* _mesa_function_pool[2035]: ClearDepthf (will be remapped) */ - "f\0" - "glClearDepthf\0" - "glClearDepthfOES\0" - "\0" - /* _mesa_function_pool[2069]: GetMaterialxvOES (will be remapped) */ - "iip\0" - "glGetMaterialxvOES\0" - "glGetMaterialxv\0" - "\0" - /* _mesa_function_pool[2109]: IsRenderbufferOES (will be remapped) */ - "i\0" - "glIsRenderbufferOES\0" - "\0" - /* _mesa_function_pool[2132]: MultiTexCoord4xOES (will be remapped) */ - "iiiii\0" - "glMultiTexCoord4xOES\0" - "glMultiTexCoord4x\0" - "\0" - /* _mesa_function_pool[2178]: CullFace (offset 152) */ - "i\0" - "glCullFace\0" - "\0" - /* _mesa_function_pool[2192]: BindTexture (offset 307) */ - "ii\0" - "glBindTexture\0" - "\0" - /* _mesa_function_pool[2210]: LogicOp (offset 242) */ - "i\0" - "glLogicOp\0" - "\0" - /* _mesa_function_pool[2223]: Translatef (offset 304) */ - "fff\0" - "glTranslatef\0" - "\0" - /* _mesa_function_pool[2241]: ActiveTexture (offset 374) */ - "i\0" - "glActiveTexture\0" - "\0" - /* _mesa_function_pool[2260]: PointSize (offset 173) */ - "f\0" - "glPointSize\0" - "\0" - /* _mesa_function_pool[2275]: StencilFunc (offset 243) */ - "iii\0" - "glStencilFunc\0" - "\0" - /* _mesa_function_pool[2294]: MultMatrixf (offset 294) */ - "p\0" - "glMultMatrixf\0" - "\0" - /* _mesa_function_pool[2311]: GetFramebufferAttachmentParameterivOES (will be remapped) */ - "iiip\0" - "glGetFramebufferAttachmentParameterivOES\0" - "\0" - /* _mesa_function_pool[2358]: PointParameterxOES (will be remapped) */ - "ii\0" - "glPointParameterxOES\0" - "glPointParameterx\0" - "\0" - /* _mesa_function_pool[2401]: TexParameteriv (offset 181) */ - "iip\0" - "glTexParameteriv\0" - "\0" - /* _mesa_function_pool[2423]: GenRenderbuffersOES (will be remapped) */ - "ip\0" - "glGenRenderbuffersOES\0" - "\0" - /* _mesa_function_pool[2449]: Materialf (offset 169) */ - "iif\0" - "glMaterialf\0" - "\0" - /* _mesa_function_pool[2466]: DrawTexxOES (will be remapped) */ - "iiiii\0" - "glDrawTexxOES\0" - "\0" - /* _mesa_function_pool[2487]: DeleteRenderbuffersOES (will be remapped) */ - "ip\0" - "glDeleteRenderbuffersOES\0" - "\0" - /* _mesa_function_pool[2516]: GenTextures (offset 328) */ - "ip\0" - "glGenTextures\0" - "\0" - /* _mesa_function_pool[2534]: TexParameterfv (offset 179) */ - "iip\0" - "glTexParameterfv\0" - "\0" - /* _mesa_function_pool[2556]: NormalPointer (offset 318) */ - "iip\0" - "glNormalPointer\0" - "\0" - /* _mesa_function_pool[2577]: TranslatexOES (will be remapped) */ - "iii\0" - "glTranslatexOES\0" - "glTranslatex\0" - "\0" - /* _mesa_function_pool[2611]: DrawTexxvOES (will be remapped) */ - "p\0" - "glDrawTexxvOES\0" - "\0" - /* _mesa_function_pool[2629]: GetTexEnvfv (offset 276) */ - "iip\0" - "glGetTexEnvfv\0" - "\0" - /* _mesa_function_pool[2648]: FrustumfOES (will be remapped) */ - "ffffff\0" - "glFrustumfOES\0" - "glFrustumf\0" - "\0" - /* _mesa_function_pool[2681]: PolygonOffsetxOES (will be remapped) */ - "ii\0" - "glPolygonOffsetxOES\0" - "glPolygonOffsetx\0" - "\0" - /* _mesa_function_pool[2722]: ClearColor (offset 206) */ - "ffff\0" - "glClearColor\0" - "\0" - /* _mesa_function_pool[2741]: ClearColorxOES (will be remapped) */ - "iiii\0" - "glClearColorxOES\0" - "glClearColorx\0" - "\0" - /* _mesa_function_pool[2778]: ClearDepthxOES (will be remapped) */ - "i\0" - "glClearDepthxOES\0" - "glClearDepthx\0" - "\0" - /* _mesa_function_pool[2812]: GetPointerv (offset 329) */ - "ip\0" - "glGetPointerv\0" - "\0" - /* _mesa_function_pool[2830]: GetTexParameterxvOES (will be remapped) */ - "iip\0" - "glGetTexParameterxvOES\0" - "glGetTexParameterxv\0" - "\0" - /* _mesa_function_pool[2878]: PointParameterf (will be remapped) */ - "if\0" - "glPointParameterf\0" - "\0" - /* _mesa_function_pool[2900]: GetLightxvOES (will be remapped) */ - "iip\0" - "glGetLightxvOES\0" - "glGetLightxv\0" - "\0" - /* _mesa_function_pool[2934]: GenFramebuffersOES (will be remapped) */ - "ip\0" - "glGenFramebuffersOES\0" - "\0" - /* _mesa_function_pool[2959]: TexEnviv (offset 187) */ - "iip\0" - "glTexEnviv\0" - "\0" - /* _mesa_function_pool[2975]: OrthofOES (will be remapped) */ - "ffffff\0" - "glOrthofOES\0" - "glOrthof\0" - "\0" - /* _mesa_function_pool[3004]: GetFloatv (offset 262) */ - "ip\0" - "glGetFloatv\0" - "\0" - /* _mesa_function_pool[3020]: BlendFunc (offset 241) */ - "ii\0" - "glBlendFunc\0" - "\0" - /* _mesa_function_pool[3036]: RotatexOES (will be remapped) */ - "iiii\0" - "glRotatexOES\0" - "glRotatex\0" - "\0" - /* _mesa_function_pool[3065]: CompressedTexImage2D (will be remapped) */ - "iiiiiiip\0" - "glCompressedTexImage2D\0" - "\0" - /* _mesa_function_pool[3098]: TexGeniOES (offset 192) */ - "iii\0" - "glTexGeniOES\0" - "\0" - /* _mesa_function_pool[3116]: Scalef (offset 302) */ - "fff\0" - "glScalef\0" - "\0" - /* _mesa_function_pool[3130]: QueryMatrixxOES (will be remapped) */ - "pp\0" - "glQueryMatrixxOES\0" - "\0" - /* _mesa_function_pool[3152]: Flush (offset 217) */ - "\0" - "glFlush\0" - "\0" - /* _mesa_function_pool[3162]: UnmapBufferOES (will be remapped) */ - "i\0" - "glUnmapBufferOES\0" - "\0" - /* _mesa_function_pool[3182]: GetIntegerv (offset 263) */ - "ip\0" - "glGetIntegerv\0" - "\0" - /* _mesa_function_pool[3200]: AlphaFunc (offset 240) */ - "if\0" - "glAlphaFunc\0" - "\0" - /* _mesa_function_pool[3216]: GetBooleanv (offset 258) */ - "ip\0" - "glGetBooleanv\0" - "\0" - /* _mesa_function_pool[3234]: BlendEquationSeparateOES (will be remapped) */ - "ii\0" - "glBlendEquationSeparateOES\0" - "\0" - /* _mesa_function_pool[3265]: ReadPixels (offset 256) */ - "iiiiiip\0" - "glReadPixels\0" - "\0" - /* _mesa_function_pool[3287]: DeleteBuffers (will be remapped) */ - "ip\0" - "glDeleteBuffers\0" - "\0" - /* _mesa_function_pool[3307]: Normal3xOES (will be remapped) */ - "iii\0" - "glNormal3xOES\0" - "glNormal3x\0" - "\0" - /* _mesa_function_pool[3337]: GetTexEnviv (offset 277) */ - "iip\0" - "glGetTexEnviv\0" - "\0" - /* _mesa_function_pool[3356]: FogxOES (will be remapped) */ - "ii\0" - "glFogxOES\0" - "glFogx\0" - "\0" - /* _mesa_function_pool[3377]: TexGenivOES (offset 193) */ - "iip\0" - "glTexGenivOES\0" - "\0" - /* _mesa_function_pool[3396]: TexParameterf (offset 178) */ - "iif\0" - "glTexParameterf\0" - "\0" - /* _mesa_function_pool[3417]: TexParameteri (offset 180) */ - "iii\0" - "glTexParameteri\0" - "\0" - /* _mesa_function_pool[3438]: FogxvOES (will be remapped) */ - "ip\0" - "glFogxvOES\0" - "glFogxv\0" - "\0" - /* _mesa_function_pool[3461]: BufferSubData (will be remapped) */ - "iiip\0" - "glBufferSubData\0" - "\0" - /* _mesa_function_pool[3483]: GetRenderbufferParameterivOES (will be remapped) */ - "iip\0" - "glGetRenderbufferParameterivOES\0" - "\0" - /* _mesa_function_pool[3520]: PointParameterfv (will be remapped) */ - "ip\0" - "glPointParameterfv\0" - "\0" - /* _mesa_function_pool[3543]: TexEnvi (offset 186) */ - "iii\0" - "glTexEnvi\0" - "\0" - /* _mesa_function_pool[3558]: TexParameterxOES (will be remapped) */ - "iii\0" - "glTexParameterxOES\0" - "glTexParameterx\0" - "\0" - /* _mesa_function_pool[3598]: TexEnvf (offset 184) */ - "iif\0" - "glTexEnvf\0" - "\0" - /* _mesa_function_pool[3613]: TexImage2D (offset 183) */ - "iiiiiiiip\0" - "glTexImage2D\0" - "\0" - /* _mesa_function_pool[3637]: LightModelf (offset 163) */ - "if\0" - "glLightModelf\0" - "\0" - /* _mesa_function_pool[3655]: DrawTexsvOES (will be remapped) */ - "p\0" - "glDrawTexsvOES\0" - "\0" - /* _mesa_function_pool[3673]: GetLightfv (offset 264) */ - "iip\0" - "glGetLightfv\0" - "\0" - /* _mesa_function_pool[3691]: DeleteFramebuffersOES (will be remapped) */ - "ip\0" - "glDeleteFramebuffersOES\0" - "\0" - /* _mesa_function_pool[3719]: CheckFramebufferStatusOES (will be remapped) */ - "i\0" - "glCheckFramebufferStatusOES\0" - "\0" - /* _mesa_function_pool[3750]: PushMatrix (offset 298) */ - "\0" - "glPushMatrix\0" - "\0" - /* _mesa_function_pool[3765]: DeleteTextures (offset 327) */ - "ip\0" - "glDeleteTextures\0" - "\0" - /* _mesa_function_pool[3786]: DrawArrays (offset 310) */ - "iii\0" - "glDrawArrays\0" - "\0" - /* _mesa_function_pool[3804]: DepthRangef (will be remapped) */ - "ff\0" - "glDepthRangef\0" - "glDepthRangefOES\0" - "\0" - /* _mesa_function_pool[3839]: Rotatef (offset 300) */ - "ffff\0" - "glRotatef\0" - "\0" - /* _mesa_function_pool[3855]: BindBuffer (will be remapped) */ - "ii\0" - "glBindBuffer\0" - "\0" - /* _mesa_function_pool[3872]: ColorMask (offset 210) */ - "iiii\0" - "glColorMask\0" - "\0" - /* _mesa_function_pool[3890]: Clear (offset 203) */ - "i\0" - "glClear\0" - "\0" - /* _mesa_function_pool[3901]: PopMatrix (offset 297) */ - "\0" - "glPopMatrix\0" - "\0" - /* _mesa_function_pool[3915]: GetTexGenivOES (offset 280) */ - "iip\0" - "glGetTexGenivOES\0" - "\0" - /* _mesa_function_pool[3937]: ClipPlanefOES (will be remapped) */ - "ip\0" - "glClipPlanefOES\0" - "glClipPlanef\0" - "\0" - /* _mesa_function_pool[3970]: Scissor (offset 176) */ - "iiii\0" - "glScissor\0" - "\0" - /* _mesa_function_pool[3986]: Fogf (offset 153) */ - "if\0" - "glFogf\0" - "\0" - /* _mesa_function_pool[3997]: Enable (offset 215) */ - "i\0" - "glEnable\0" - "\0" - /* _mesa_function_pool[4009]: PolygonOffset (offset 319) */ - "ff\0" - "glPolygonOffset\0" - "\0" - /* _mesa_function_pool[4029]: PointParameterxvOES (will be remapped) */ - "ip\0" - "glPointParameterxvOES\0" - "glPointParameterxv\0" - "\0" - /* _mesa_function_pool[4074]: ScalexOES (will be remapped) */ - "iii\0" - "glScalexOES\0" - "glScalex\0" - "\0" - /* _mesa_function_pool[4100]: GetBufferParameteriv (will be remapped) */ - "iip\0" - "glGetBufferParameteriv\0" - "\0" - /* _mesa_function_pool[4128]: MultiDrawArraysEXT (will be remapped) */ - "ippi\0" - "glMultiDrawArraysEXT\0" - "\0" - /* _mesa_function_pool[4155]: FramebufferRenderbufferOES (will be remapped) */ - "iiii\0" - "glFramebufferRenderbufferOES\0" - "\0" - /* _mesa_function_pool[4190]: ClientActiveTexture (offset 375) */ - "i\0" - "glClientActiveTexture\0" - "\0" - /* _mesa_function_pool[4215]: DepthFunc (offset 245) */ - "i\0" - "glDepthFunc\0" - "\0" - /* _mesa_function_pool[4230]: GetString (offset 275) */ - "i\0" - "glGetString\0" - "\0" - /* _mesa_function_pool[4245]: GetClipPlanexOES (will be remapped) */ - "ip\0" - "glGetClipPlanexOES\0" - "glGetClipPlanex\0" - "\0" - /* _mesa_function_pool[4284]: Color4ub (offset 35) */ - "iiii\0" - "glColor4ub\0" - "\0" - /* _mesa_function_pool[4301]: CopyTexImage2D (offset 324) */ - "iiiiiiii\0" - "glCopyTexImage2D\0" - "\0" - /* _mesa_function_pool[4328]: Lightfv (offset 160) */ - "iip\0" - "glLightfv\0" - "\0" - /* _mesa_function_pool[4343]: LoadMatrixxOES (will be remapped) */ - "p\0" - "glLoadMatrixxOES\0" - "glLoadMatrixx\0" - "\0" - /* _mesa_function_pool[4377]: LightModelxvOES (will be remapped) */ - "ip\0" - "glLightModelxvOES\0" - "glLightModelxv\0" - "\0" - /* _mesa_function_pool[4414]: PointSizePointerOES (will be remapped) */ - "iip\0" - "glPointSizePointerOES\0" - "\0" - /* _mesa_function_pool[4441]: GenerateMipmapOES (will be remapped) */ - "i\0" - "glGenerateMipmapOES\0" - "\0" - ; - -/* these functions need to be remapped */ -static const struct gl_function_pool_remap MESA_remap_table_functions[] = { - { 771, SampleCoverage_remap_index }, - { 3065, CompressedTexImage2D_remap_index }, - { 1486, CompressedTexSubImage2D_remap_index }, - { 3855, BindBuffer_remap_index }, - { 1061, BufferData_remap_index }, - { 3461, BufferSubData_remap_index }, - { 3287, DeleteBuffers_remap_index }, - { 473, GenBuffers_remap_index }, - { 4100, GetBufferParameteriv_remap_index }, - { 326, GetBufferPointervOES_remap_index }, - { 927, IsBuffer_remap_index }, - { 49, MapBufferOES_remap_index }, - { 3162, UnmapBufferOES_remap_index }, - { 2035, ClearDepthf_remap_index }, - { 3804, DepthRangef_remap_index }, - { 102, DrawTexfOES_remap_index }, - { 1892, DrawTexfvOES_remap_index }, - { 1291, DrawTexiOES_remap_index }, - { 506, DrawTexivOES_remap_index }, - { 1871, DrawTexsOES_remap_index }, - { 3655, DrawTexsvOES_remap_index }, - { 2466, DrawTexxOES_remap_index }, - { 2611, DrawTexxvOES_remap_index }, - { 4414, PointSizePointerOES_remap_index }, - { 3130, QueryMatrixxOES_remap_index }, - { 2878, PointParameterf_remap_index }, - { 3520, PointParameterfv_remap_index }, - { 4128, MultiDrawArraysEXT_remap_index }, - { 1624, MultiDrawElementsEXT_remap_index }, - { 611, BlendFuncSeparateOES_remap_index }, - { 1434, AlphaFuncxOES_remap_index }, - { 2741, ClearColorxOES_remap_index }, - { 2778, ClearDepthxOES_remap_index }, - { 1201, ClipPlanexOES_remap_index }, - { 1117, Color4xOES_remap_index }, - { 354, DepthRangexOES_remap_index }, - { 3356, FogxOES_remap_index }, - { 3438, FogxvOES_remap_index }, - { 1813, FrustumxOES_remap_index }, - { 4245, GetClipPlanexOES_remap_index }, - { 1260, GetFixedvOES_remap_index }, - { 2900, GetLightxvOES_remap_index }, - { 2069, GetMaterialxvOES_remap_index }, - { 1312, GetTexEnvxvOES_remap_index }, - { 719, GetTexGenxvOES_remap_index }, - { 2830, GetTexParameterxvOES_remap_index }, - { 1589, LightModelxOES_remap_index }, - { 4377, LightModelxvOES_remap_index }, - { 1234, LightxOES_remap_index }, - { 1173, LightxvOES_remap_index }, - { 524, LineWidthxOES_remap_index }, - { 4343, LoadMatrixxOES_remap_index }, - { 2003, MaterialxOES_remap_index }, - { 212, MaterialxvOES_remap_index }, - { 68, MultMatrixxOES_remap_index }, - { 2132, MultiTexCoord4xOES_remap_index }, - { 3307, Normal3xOES_remap_index }, - { 1654, OrthoxOES_remap_index }, - { 2358, PointParameterxOES_remap_index }, - { 4029, PointParameterxvOES_remap_index }, - { 853, PointSizexOES_remap_index }, - { 2681, PolygonOffsetxOES_remap_index }, - { 3036, RotatexOES_remap_index }, - { 1698, SampleCoveragexOES_remap_index }, - { 4074, ScalexOES_remap_index }, - { 1033, TexEnvxOES_remap_index }, - { 1003, TexEnvxvOES_remap_index }, - { 941, TexGenxOES_remap_index }, - { 984, TexGenxvOES_remap_index }, - { 3558, TexParameterxOES_remap_index }, - { 885, TexParameterxvOES_remap_index }, - { 2577, TranslatexOES_remap_index }, - { 3937, ClipPlanefOES_remap_index }, - { 2648, FrustumfOES_remap_index }, - { 1910, GetClipPlanefOES_remap_index }, - { 2975, OrthofOES_remap_index }, - { 3234, BlendEquationSeparateOES_remap_index }, - { 1846, BindFramebufferOES_remap_index }, - { 123, BindRenderbufferOES_remap_index }, - { 3719, CheckFramebufferStatusOES_remap_index }, - { 3691, DeleteFramebuffersOES_remap_index }, - { 2487, DeleteRenderbuffersOES_remap_index }, - { 4155, FramebufferRenderbufferOES_remap_index }, - { 389, FramebufferTexture2DOES_remap_index }, - { 2934, GenFramebuffersOES_remap_index }, - { 2423, GenRenderbuffersOES_remap_index }, - { 4441, GenerateMipmapOES_remap_index }, - { 2311, GetFramebufferAttachmentParameterivOES_remap_index }, - { 3483, GetRenderbufferParameterivOES_remap_index }, - { 246, IsFramebufferOES_remap_index }, - { 2109, IsRenderbufferOES_remap_index }, - { 1403, RenderbufferStorageOES_remap_index }, - { 268, EGLImageTargetRenderbufferStorageOES_remap_index }, - { 1556, EGLImageTargetTexture2DOES_remap_index }, - { -1, -1 } -}; - -/* these functions are in the ABI, but have alternative names */ -static const struct gl_function_remap MESA_alt_functions[] = { - { -1, -1 } -}; - diff -Nru mesa-8.0.2/src/mesa/main/api_exec_es2.c mesa-8.0.3/src/mesa/main/api_exec_es2.c --- mesa-8.0.2/src/mesa/main/api_exec_es2.c 2012-03-21 17:17:25.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/api_exec_es2.c 2012-05-18 23:12:03.000000000 +0000 @@ -2,7 +2,7 @@ * THIS FILE AUTOMATICALLY GENERATED BY THE es_generator.py SCRIPT * API specification file: main/APIspec.xml * GLES version: GLES2.0 - * date: 2012-03-21 17:17:25 + * date: 2012-05-18 16:12:03 */ diff -Nru mesa-8.0.2/src/mesa/main/api_exec_es2_dispatch.h mesa-8.0.3/src/mesa/main/api_exec_es2_dispatch.h --- mesa-8.0.2/src/mesa/main/api_exec_es2_dispatch.h 2012-03-21 17:17:33.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/api_exec_es2_dispatch.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,2192 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * 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 - * 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 THEIR 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. - */ - -#if !defined( _DISPATCH_H_ ) -# define _DISPATCH_H_ - - -/** - * \file main/dispatch.h - * Macros for handling GL dispatch tables. - * - * For each known GL function, there are 3 macros in this file. The first - * macro is named CALL_FuncName and is used to call that GL function using - * the specified dispatch table. The other 2 macros, called GET_FuncName - * can SET_FuncName, are used to get and set the dispatch pointer for the - * named function in the specified dispatch table. - */ - -/* GLXEXT is defined when building the GLX extension in the xserver. - */ -#if !defined(GLXEXT) -#include "main/mfeatures.h" -#endif - -#define CALL_by_offset(disp, cast, offset, parameters) \ - (*(cast (GET_by_offset(disp, offset)))) parameters -#define GET_by_offset(disp, offset) \ - (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL -#define SET_by_offset(disp, offset, fn) \ - do { \ - if ( (offset) < 0 ) { \ - /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \ - /* __func__, __LINE__, disp, offset, # fn); */ \ - /* abort(); */ \ - } \ - else { \ - ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \ - } \ - } while(0) - -/* total number of offsets below */ -#define _gloffset_COUNT 158 - -#define _gloffset_CullFace 152 -#define _gloffset_FrontFace 157 -#define _gloffset_Hint 158 -#define _gloffset_LineWidth 168 -#define _gloffset_Scissor 176 -#define _gloffset_TexParameterf 178 -#define _gloffset_TexParameterfv 179 -#define _gloffset_TexParameteri 180 -#define _gloffset_TexParameteriv 181 -#define _gloffset_TexImage2D 183 -#define _gloffset_Clear 203 -#define _gloffset_ClearColor 206 -#define _gloffset_ClearStencil 207 -#define _gloffset_StencilMask 209 -#define _gloffset_ColorMask 210 -#define _gloffset_DepthMask 211 -#define _gloffset_Disable 214 -#define _gloffset_Enable 215 -#define _gloffset_Finish 216 -#define _gloffset_Flush 217 -#define _gloffset_BlendFunc 241 -#define _gloffset_StencilFunc 243 -#define _gloffset_StencilOp 244 -#define _gloffset_DepthFunc 245 -#define _gloffset_PixelStorei 250 -#define _gloffset_ReadPixels 256 -#define _gloffset_GetBooleanv 258 -#define _gloffset_GetError 261 -#define _gloffset_GetFloatv 262 -#define _gloffset_GetIntegerv 263 -#define _gloffset_GetString 275 -#define _gloffset_GetTexParameterfv 282 -#define _gloffset_GetTexParameteriv 283 -#define _gloffset_IsEnabled 286 -#define _gloffset_Viewport 305 -#define _gloffset_BindTexture 307 -#define _gloffset_DrawArrays 310 -#define _gloffset_DrawElements 311 -#define _gloffset_PolygonOffset 319 -#define _gloffset_CopyTexImage2D 324 -#define _gloffset_CopyTexSubImage2D 326 -#define _gloffset_DeleteTextures 327 -#define _gloffset_GenTextures 328 -#define _gloffset_IsTexture 330 -#define _gloffset_TexSubImage2D 333 -#define _gloffset_BlendColor 336 -#define _gloffset_BlendEquation 337 -#define _gloffset_TexImage3DOES 371 -#define _gloffset_TexSubImage3DOES 372 -#define _gloffset_CopyTexSubImage3DOES 373 -#define _gloffset_ActiveTexture 374 - -#if !FEATURE_remap_table - -#define _gloffset_AttachShader 408 -#define _gloffset_CreateProgram 409 -#define _gloffset_CreateShader 410 -#define _gloffset_DeleteProgram 411 -#define _gloffset_DeleteShader 412 -#define _gloffset_DetachShader 413 -#define _gloffset_GetAttachedShaders 414 -#define _gloffset_GetProgramInfoLog 415 -#define _gloffset_GetProgramiv 416 -#define _gloffset_GetShaderInfoLog 417 -#define _gloffset_GetShaderiv 418 -#define _gloffset_IsProgram 419 -#define _gloffset_IsShader 420 -#define _gloffset_StencilFuncSeparate 421 -#define _gloffset_StencilMaskSeparate 422 -#define _gloffset_StencilOpSeparate 423 -#define _gloffset_SampleCoverage 445 -#define _gloffset_CompressedTexImage2D 447 -#define _gloffset_CompressedTexImage3DOES 448 -#define _gloffset_CompressedTexSubImage2D 450 -#define _gloffset_CompressedTexSubImage3DOES 451 -#define _gloffset_DisableVertexAttribArray 453 -#define _gloffset_EnableVertexAttribArray 454 -#define _gloffset_GetVertexAttribfv 462 -#define _gloffset_GetVertexAttribiv 463 -#define _gloffset_VertexAttrib1f 475 -#define _gloffset_VertexAttrib1fv 476 -#define _gloffset_VertexAttrib2f 481 -#define _gloffset_VertexAttrib2fv 482 -#define _gloffset_VertexAttrib3f 487 -#define _gloffset_VertexAttrib3fv 488 -#define _gloffset_VertexAttrib4f 501 -#define _gloffset_VertexAttrib4fv 502 -#define _gloffset_VertexAttribPointer 509 -#define _gloffset_BindBuffer 510 -#define _gloffset_BufferData 511 -#define _gloffset_BufferSubData 512 -#define _gloffset_DeleteBuffers 513 -#define _gloffset_GenBuffers 514 -#define _gloffset_GetBufferParameteriv 515 -#define _gloffset_GetBufferPointervOES 516 -#define _gloffset_IsBuffer 518 -#define _gloffset_MapBufferOES 519 -#define _gloffset_UnmapBufferOES 520 -#define _gloffset_CompileShader 530 -#define _gloffset_GetActiveUniform 535 -#define _gloffset_GetShaderSource 541 -#define _gloffset_GetUniformLocation 542 -#define _gloffset_GetUniformfv 543 -#define _gloffset_GetUniformiv 544 -#define _gloffset_LinkProgram 545 -#define _gloffset_ShaderSource 546 -#define _gloffset_Uniform1f 547 -#define _gloffset_Uniform1fv 548 -#define _gloffset_Uniform1i 549 -#define _gloffset_Uniform1iv 550 -#define _gloffset_Uniform2f 551 -#define _gloffset_Uniform2fv 552 -#define _gloffset_Uniform2i 553 -#define _gloffset_Uniform2iv 554 -#define _gloffset_Uniform3f 555 -#define _gloffset_Uniform3fv 556 -#define _gloffset_Uniform3i 557 -#define _gloffset_Uniform3iv 558 -#define _gloffset_Uniform4f 559 -#define _gloffset_Uniform4fv 560 -#define _gloffset_Uniform4i 561 -#define _gloffset_Uniform4iv 562 -#define _gloffset_UniformMatrix2fv 563 -#define _gloffset_UniformMatrix3fv 564 -#define _gloffset_UniformMatrix4fv 565 -#define _gloffset_UseProgram 566 -#define _gloffset_ValidateProgram 567 -#define _gloffset_BindAttribLocation 568 -#define _gloffset_GetActiveAttrib 569 -#define _gloffset_GetAttribLocation 570 -#define _gloffset_DrawBuffersNV 571 -#define _gloffset_ClearDepthf 660 -#define _gloffset_DepthRangef 661 -#define _gloffset_GetShaderPrecisionFormat 662 -#define _gloffset_ReleaseShaderCompiler 663 -#define _gloffset_ShaderBinary 664 -#define _gloffset_GetProgramBinaryOES 665 -#define _gloffset_ProgramBinaryOES 666 -#define _gloffset_MultiDrawArraysEXT 740 -#define _gloffset_MultiDrawElementsEXT 741 -#define _gloffset_BlendFuncSeparate 748 -#define _gloffset_GetVertexAttribPointerv 808 -#define _gloffset_BlendEquationSeparate 938 -#define _gloffset_BindFramebuffer 939 -#define _gloffset_BindRenderbuffer 940 -#define _gloffset_CheckFramebufferStatus 941 -#define _gloffset_DeleteFramebuffers 942 -#define _gloffset_DeleteRenderbuffers 943 -#define _gloffset_FramebufferRenderbuffer 944 -#define _gloffset_FramebufferTexture2D 946 -#define _gloffset_FramebufferTexture3DOES 947 -#define _gloffset_GenFramebuffers 948 -#define _gloffset_GenRenderbuffers 949 -#define _gloffset_GenerateMipmap 950 -#define _gloffset_GetFramebufferAttachmentParameteriv 951 -#define _gloffset_GetRenderbufferParameteriv 952 -#define _gloffset_IsFramebuffer 953 -#define _gloffset_IsRenderbuffer 954 -#define _gloffset_RenderbufferStorage 955 -#define _gloffset_EGLImageTargetRenderbufferStorageOES 1030 -#define _gloffset_EGLImageTargetTexture2DOES 1031 - -#else /* !FEATURE_remap_table */ - -#define esLocalRemapTable_size 107 -static int esLocalRemapTable[ esLocalRemapTable_size ]; - -#define AttachShader_remap_index 0 -#define CreateProgram_remap_index 1 -#define CreateShader_remap_index 2 -#define DeleteProgram_remap_index 3 -#define DeleteShader_remap_index 4 -#define DetachShader_remap_index 5 -#define GetAttachedShaders_remap_index 6 -#define GetProgramInfoLog_remap_index 7 -#define GetProgramiv_remap_index 8 -#define GetShaderInfoLog_remap_index 9 -#define GetShaderiv_remap_index 10 -#define IsProgram_remap_index 11 -#define IsShader_remap_index 12 -#define StencilFuncSeparate_remap_index 13 -#define StencilMaskSeparate_remap_index 14 -#define StencilOpSeparate_remap_index 15 -#define SampleCoverage_remap_index 16 -#define CompressedTexImage2D_remap_index 17 -#define CompressedTexImage3DOES_remap_index 18 -#define CompressedTexSubImage2D_remap_index 19 -#define CompressedTexSubImage3DOES_remap_index 20 -#define DisableVertexAttribArray_remap_index 21 -#define EnableVertexAttribArray_remap_index 22 -#define GetVertexAttribfv_remap_index 23 -#define GetVertexAttribiv_remap_index 24 -#define VertexAttrib1f_remap_index 25 -#define VertexAttrib1fv_remap_index 26 -#define VertexAttrib2f_remap_index 27 -#define VertexAttrib2fv_remap_index 28 -#define VertexAttrib3f_remap_index 29 -#define VertexAttrib3fv_remap_index 30 -#define VertexAttrib4f_remap_index 31 -#define VertexAttrib4fv_remap_index 32 -#define VertexAttribPointer_remap_index 33 -#define BindBuffer_remap_index 34 -#define BufferData_remap_index 35 -#define BufferSubData_remap_index 36 -#define DeleteBuffers_remap_index 37 -#define GenBuffers_remap_index 38 -#define GetBufferParameteriv_remap_index 39 -#define GetBufferPointervOES_remap_index 40 -#define IsBuffer_remap_index 41 -#define MapBufferOES_remap_index 42 -#define UnmapBufferOES_remap_index 43 -#define CompileShader_remap_index 44 -#define GetActiveUniform_remap_index 45 -#define GetShaderSource_remap_index 46 -#define GetUniformLocation_remap_index 47 -#define GetUniformfv_remap_index 48 -#define GetUniformiv_remap_index 49 -#define LinkProgram_remap_index 50 -#define ShaderSource_remap_index 51 -#define Uniform1f_remap_index 52 -#define Uniform1fv_remap_index 53 -#define Uniform1i_remap_index 54 -#define Uniform1iv_remap_index 55 -#define Uniform2f_remap_index 56 -#define Uniform2fv_remap_index 57 -#define Uniform2i_remap_index 58 -#define Uniform2iv_remap_index 59 -#define Uniform3f_remap_index 60 -#define Uniform3fv_remap_index 61 -#define Uniform3i_remap_index 62 -#define Uniform3iv_remap_index 63 -#define Uniform4f_remap_index 64 -#define Uniform4fv_remap_index 65 -#define Uniform4i_remap_index 66 -#define Uniform4iv_remap_index 67 -#define UniformMatrix2fv_remap_index 68 -#define UniformMatrix3fv_remap_index 69 -#define UniformMatrix4fv_remap_index 70 -#define UseProgram_remap_index 71 -#define ValidateProgram_remap_index 72 -#define BindAttribLocation_remap_index 73 -#define GetActiveAttrib_remap_index 74 -#define GetAttribLocation_remap_index 75 -#define DrawBuffersNV_remap_index 76 -#define ClearDepthf_remap_index 77 -#define DepthRangef_remap_index 78 -#define GetShaderPrecisionFormat_remap_index 79 -#define ReleaseShaderCompiler_remap_index 80 -#define ShaderBinary_remap_index 81 -#define GetProgramBinaryOES_remap_index 82 -#define ProgramBinaryOES_remap_index 83 -#define MultiDrawArraysEXT_remap_index 84 -#define MultiDrawElementsEXT_remap_index 85 -#define BlendFuncSeparate_remap_index 86 -#define GetVertexAttribPointerv_remap_index 87 -#define BlendEquationSeparate_remap_index 88 -#define BindFramebuffer_remap_index 89 -#define BindRenderbuffer_remap_index 90 -#define CheckFramebufferStatus_remap_index 91 -#define DeleteFramebuffers_remap_index 92 -#define DeleteRenderbuffers_remap_index 93 -#define FramebufferRenderbuffer_remap_index 94 -#define FramebufferTexture2D_remap_index 95 -#define FramebufferTexture3DOES_remap_index 96 -#define GenFramebuffers_remap_index 97 -#define GenRenderbuffers_remap_index 98 -#define GenerateMipmap_remap_index 99 -#define GetFramebufferAttachmentParameteriv_remap_index 100 -#define GetRenderbufferParameteriv_remap_index 101 -#define IsFramebuffer_remap_index 102 -#define IsRenderbuffer_remap_index 103 -#define RenderbufferStorage_remap_index 104 -#define EGLImageTargetRenderbufferStorageOES_remap_index 105 -#define EGLImageTargetTexture2DOES_remap_index 106 - -#define _gloffset_AttachShader esLocalRemapTable[AttachShader_remap_index] -#define _gloffset_CreateProgram esLocalRemapTable[CreateProgram_remap_index] -#define _gloffset_CreateShader esLocalRemapTable[CreateShader_remap_index] -#define _gloffset_DeleteProgram esLocalRemapTable[DeleteProgram_remap_index] -#define _gloffset_DeleteShader esLocalRemapTable[DeleteShader_remap_index] -#define _gloffset_DetachShader esLocalRemapTable[DetachShader_remap_index] -#define _gloffset_GetAttachedShaders esLocalRemapTable[GetAttachedShaders_remap_index] -#define _gloffset_GetProgramInfoLog esLocalRemapTable[GetProgramInfoLog_remap_index] -#define _gloffset_GetProgramiv esLocalRemapTable[GetProgramiv_remap_index] -#define _gloffset_GetShaderInfoLog esLocalRemapTable[GetShaderInfoLog_remap_index] -#define _gloffset_GetShaderiv esLocalRemapTable[GetShaderiv_remap_index] -#define _gloffset_IsProgram esLocalRemapTable[IsProgram_remap_index] -#define _gloffset_IsShader esLocalRemapTable[IsShader_remap_index] -#define _gloffset_StencilFuncSeparate esLocalRemapTable[StencilFuncSeparate_remap_index] -#define _gloffset_StencilMaskSeparate esLocalRemapTable[StencilMaskSeparate_remap_index] -#define _gloffset_StencilOpSeparate esLocalRemapTable[StencilOpSeparate_remap_index] -#define _gloffset_SampleCoverage esLocalRemapTable[SampleCoverage_remap_index] -#define _gloffset_CompressedTexImage2D esLocalRemapTable[CompressedTexImage2D_remap_index] -#define _gloffset_CompressedTexImage3DOES esLocalRemapTable[CompressedTexImage3DOES_remap_index] -#define _gloffset_CompressedTexSubImage2D esLocalRemapTable[CompressedTexSubImage2D_remap_index] -#define _gloffset_CompressedTexSubImage3DOES esLocalRemapTable[CompressedTexSubImage3DOES_remap_index] -#define _gloffset_DisableVertexAttribArray esLocalRemapTable[DisableVertexAttribArray_remap_index] -#define _gloffset_EnableVertexAttribArray esLocalRemapTable[EnableVertexAttribArray_remap_index] -#define _gloffset_GetVertexAttribfv esLocalRemapTable[GetVertexAttribfv_remap_index] -#define _gloffset_GetVertexAttribiv esLocalRemapTable[GetVertexAttribiv_remap_index] -#define _gloffset_VertexAttrib1f esLocalRemapTable[VertexAttrib1f_remap_index] -#define _gloffset_VertexAttrib1fv esLocalRemapTable[VertexAttrib1fv_remap_index] -#define _gloffset_VertexAttrib2f esLocalRemapTable[VertexAttrib2f_remap_index] -#define _gloffset_VertexAttrib2fv esLocalRemapTable[VertexAttrib2fv_remap_index] -#define _gloffset_VertexAttrib3f esLocalRemapTable[VertexAttrib3f_remap_index] -#define _gloffset_VertexAttrib3fv esLocalRemapTable[VertexAttrib3fv_remap_index] -#define _gloffset_VertexAttrib4f esLocalRemapTable[VertexAttrib4f_remap_index] -#define _gloffset_VertexAttrib4fv esLocalRemapTable[VertexAttrib4fv_remap_index] -#define _gloffset_VertexAttribPointer esLocalRemapTable[VertexAttribPointer_remap_index] -#define _gloffset_BindBuffer esLocalRemapTable[BindBuffer_remap_index] -#define _gloffset_BufferData esLocalRemapTable[BufferData_remap_index] -#define _gloffset_BufferSubData esLocalRemapTable[BufferSubData_remap_index] -#define _gloffset_DeleteBuffers esLocalRemapTable[DeleteBuffers_remap_index] -#define _gloffset_GenBuffers esLocalRemapTable[GenBuffers_remap_index] -#define _gloffset_GetBufferParameteriv esLocalRemapTable[GetBufferParameteriv_remap_index] -#define _gloffset_GetBufferPointervOES esLocalRemapTable[GetBufferPointervOES_remap_index] -#define _gloffset_IsBuffer esLocalRemapTable[IsBuffer_remap_index] -#define _gloffset_MapBufferOES esLocalRemapTable[MapBufferOES_remap_index] -#define _gloffset_UnmapBufferOES esLocalRemapTable[UnmapBufferOES_remap_index] -#define _gloffset_CompileShader esLocalRemapTable[CompileShader_remap_index] -#define _gloffset_GetActiveUniform esLocalRemapTable[GetActiveUniform_remap_index] -#define _gloffset_GetShaderSource esLocalRemapTable[GetShaderSource_remap_index] -#define _gloffset_GetUniformLocation esLocalRemapTable[GetUniformLocation_remap_index] -#define _gloffset_GetUniformfv esLocalRemapTable[GetUniformfv_remap_index] -#define _gloffset_GetUniformiv esLocalRemapTable[GetUniformiv_remap_index] -#define _gloffset_LinkProgram esLocalRemapTable[LinkProgram_remap_index] -#define _gloffset_ShaderSource esLocalRemapTable[ShaderSource_remap_index] -#define _gloffset_Uniform1f esLocalRemapTable[Uniform1f_remap_index] -#define _gloffset_Uniform1fv esLocalRemapTable[Uniform1fv_remap_index] -#define _gloffset_Uniform1i esLocalRemapTable[Uniform1i_remap_index] -#define _gloffset_Uniform1iv esLocalRemapTable[Uniform1iv_remap_index] -#define _gloffset_Uniform2f esLocalRemapTable[Uniform2f_remap_index] -#define _gloffset_Uniform2fv esLocalRemapTable[Uniform2fv_remap_index] -#define _gloffset_Uniform2i esLocalRemapTable[Uniform2i_remap_index] -#define _gloffset_Uniform2iv esLocalRemapTable[Uniform2iv_remap_index] -#define _gloffset_Uniform3f esLocalRemapTable[Uniform3f_remap_index] -#define _gloffset_Uniform3fv esLocalRemapTable[Uniform3fv_remap_index] -#define _gloffset_Uniform3i esLocalRemapTable[Uniform3i_remap_index] -#define _gloffset_Uniform3iv esLocalRemapTable[Uniform3iv_remap_index] -#define _gloffset_Uniform4f esLocalRemapTable[Uniform4f_remap_index] -#define _gloffset_Uniform4fv esLocalRemapTable[Uniform4fv_remap_index] -#define _gloffset_Uniform4i esLocalRemapTable[Uniform4i_remap_index] -#define _gloffset_Uniform4iv esLocalRemapTable[Uniform4iv_remap_index] -#define _gloffset_UniformMatrix2fv esLocalRemapTable[UniformMatrix2fv_remap_index] -#define _gloffset_UniformMatrix3fv esLocalRemapTable[UniformMatrix3fv_remap_index] -#define _gloffset_UniformMatrix4fv esLocalRemapTable[UniformMatrix4fv_remap_index] -#define _gloffset_UseProgram esLocalRemapTable[UseProgram_remap_index] -#define _gloffset_ValidateProgram esLocalRemapTable[ValidateProgram_remap_index] -#define _gloffset_BindAttribLocation esLocalRemapTable[BindAttribLocation_remap_index] -#define _gloffset_GetActiveAttrib esLocalRemapTable[GetActiveAttrib_remap_index] -#define _gloffset_GetAttribLocation esLocalRemapTable[GetAttribLocation_remap_index] -#define _gloffset_DrawBuffersNV esLocalRemapTable[DrawBuffersNV_remap_index] -#define _gloffset_ClearDepthf esLocalRemapTable[ClearDepthf_remap_index] -#define _gloffset_DepthRangef esLocalRemapTable[DepthRangef_remap_index] -#define _gloffset_GetShaderPrecisionFormat esLocalRemapTable[GetShaderPrecisionFormat_remap_index] -#define _gloffset_ReleaseShaderCompiler esLocalRemapTable[ReleaseShaderCompiler_remap_index] -#define _gloffset_ShaderBinary esLocalRemapTable[ShaderBinary_remap_index] -#define _gloffset_GetProgramBinaryOES esLocalRemapTable[GetProgramBinaryOES_remap_index] -#define _gloffset_ProgramBinaryOES esLocalRemapTable[ProgramBinaryOES_remap_index] -#define _gloffset_MultiDrawArraysEXT esLocalRemapTable[MultiDrawArraysEXT_remap_index] -#define _gloffset_MultiDrawElementsEXT esLocalRemapTable[MultiDrawElementsEXT_remap_index] -#define _gloffset_BlendFuncSeparate esLocalRemapTable[BlendFuncSeparate_remap_index] -#define _gloffset_GetVertexAttribPointerv esLocalRemapTable[GetVertexAttribPointerv_remap_index] -#define _gloffset_BlendEquationSeparate esLocalRemapTable[BlendEquationSeparate_remap_index] -#define _gloffset_BindFramebuffer esLocalRemapTable[BindFramebuffer_remap_index] -#define _gloffset_BindRenderbuffer esLocalRemapTable[BindRenderbuffer_remap_index] -#define _gloffset_CheckFramebufferStatus esLocalRemapTable[CheckFramebufferStatus_remap_index] -#define _gloffset_DeleteFramebuffers esLocalRemapTable[DeleteFramebuffers_remap_index] -#define _gloffset_DeleteRenderbuffers esLocalRemapTable[DeleteRenderbuffers_remap_index] -#define _gloffset_FramebufferRenderbuffer esLocalRemapTable[FramebufferRenderbuffer_remap_index] -#define _gloffset_FramebufferTexture2D esLocalRemapTable[FramebufferTexture2D_remap_index] -#define _gloffset_FramebufferTexture3DOES esLocalRemapTable[FramebufferTexture3DOES_remap_index] -#define _gloffset_GenFramebuffers esLocalRemapTable[GenFramebuffers_remap_index] -#define _gloffset_GenRenderbuffers esLocalRemapTable[GenRenderbuffers_remap_index] -#define _gloffset_GenerateMipmap esLocalRemapTable[GenerateMipmap_remap_index] -#define _gloffset_GetFramebufferAttachmentParameteriv esLocalRemapTable[GetFramebufferAttachmentParameteriv_remap_index] -#define _gloffset_GetRenderbufferParameteriv esLocalRemapTable[GetRenderbufferParameteriv_remap_index] -#define _gloffset_IsFramebuffer esLocalRemapTable[IsFramebuffer_remap_index] -#define _gloffset_IsRenderbuffer esLocalRemapTable[IsRenderbuffer_remap_index] -#define _gloffset_RenderbufferStorage esLocalRemapTable[RenderbufferStorage_remap_index] -#define _gloffset_EGLImageTargetRenderbufferStorageOES esLocalRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index] -#define _gloffset_EGLImageTargetTexture2DOES esLocalRemapTable[EGLImageTargetTexture2DOES_remap_index] - -#endif /* !FEATURE_remap_table */ - -typedef void (GLAPIENTRYP _glptr_CullFace)(GLenum); -#define CALL_CullFace(disp, parameters) \ - (* GET_CullFace(disp)) parameters -static inline _glptr_CullFace GET_CullFace(struct _glapi_table *disp) { - return (_glptr_CullFace) (GET_by_offset(disp, _gloffset_CullFace)); -} - -static inline void SET_CullFace(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_CullFace, fn); -} - -typedef void (GLAPIENTRYP _glptr_FrontFace)(GLenum); -#define CALL_FrontFace(disp, parameters) \ - (* GET_FrontFace(disp)) parameters -static inline _glptr_FrontFace GET_FrontFace(struct _glapi_table *disp) { - return (_glptr_FrontFace) (GET_by_offset(disp, _gloffset_FrontFace)); -} - -static inline void SET_FrontFace(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_FrontFace, fn); -} - -typedef void (GLAPIENTRYP _glptr_Hint)(GLenum, GLenum); -#define CALL_Hint(disp, parameters) \ - (* GET_Hint(disp)) parameters -static inline _glptr_Hint GET_Hint(struct _glapi_table *disp) { - return (_glptr_Hint) (GET_by_offset(disp, _gloffset_Hint)); -} - -static inline void SET_Hint(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_Hint, fn); -} - -typedef void (GLAPIENTRYP _glptr_LineWidth)(GLfloat); -#define CALL_LineWidth(disp, parameters) \ - (* GET_LineWidth(disp)) parameters -static inline _glptr_LineWidth GET_LineWidth(struct _glapi_table *disp) { - return (_glptr_LineWidth) (GET_by_offset(disp, _gloffset_LineWidth)); -} - -static inline void SET_LineWidth(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { - SET_by_offset(disp, _gloffset_LineWidth, fn); -} - -typedef void (GLAPIENTRYP _glptr_Scissor)(GLint, GLint, GLsizei, GLsizei); -#define CALL_Scissor(disp, parameters) \ - (* GET_Scissor(disp)) parameters -static inline _glptr_Scissor GET_Scissor(struct _glapi_table *disp) { - return (_glptr_Scissor) (GET_by_offset(disp, _gloffset_Scissor)); -} - -static inline void SET_Scissor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_Scissor, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameterf)(GLenum, GLenum, GLfloat); -#define CALL_TexParameterf(disp, parameters) \ - (* GET_TexParameterf(disp)) parameters -static inline _glptr_TexParameterf GET_TexParameterf(struct _glapi_table *disp) { - return (_glptr_TexParameterf) (GET_by_offset(disp, _gloffset_TexParameterf)); -} - -static inline void SET_TexParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_TexParameterf, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameterfv)(GLenum, GLenum, const GLfloat *); -#define CALL_TexParameterfv(disp, parameters) \ - (* GET_TexParameterfv(disp)) parameters -static inline _glptr_TexParameterfv GET_TexParameterfv(struct _glapi_table *disp) { - return (_glptr_TexParameterfv) (GET_by_offset(disp, _gloffset_TexParameterfv)); -} - -static inline void SET_TexParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_TexParameterfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameteri)(GLenum, GLenum, GLint); -#define CALL_TexParameteri(disp, parameters) \ - (* GET_TexParameteri(disp)) parameters -static inline _glptr_TexParameteri GET_TexParameteri(struct _glapi_table *disp) { - return (_glptr_TexParameteri) (GET_by_offset(disp, _gloffset_TexParameteri)); -} - -static inline void SET_TexParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { - SET_by_offset(disp, _gloffset_TexParameteri, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexParameteriv)(GLenum, GLenum, const GLint *); -#define CALL_TexParameteriv(disp, parameters) \ - (* GET_TexParameteriv(disp)) parameters -static inline _glptr_TexParameteriv GET_TexParameteriv(struct _glapi_table *disp) { - return (_glptr_TexParameteriv) (GET_by_offset(disp, _gloffset_TexParameteriv)); -} - -static inline void SET_TexParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_TexParameteriv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -#define CALL_TexImage2D(disp, parameters) \ - (* GET_TexImage2D(disp)) parameters -static inline _glptr_TexImage2D GET_TexImage2D(struct _glapi_table *disp) { - return (_glptr_TexImage2D) (GET_by_offset(disp, _gloffset_TexImage2D)); -} - -static inline void SET_TexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { - SET_by_offset(disp, _gloffset_TexImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_Clear)(GLbitfield); -#define CALL_Clear(disp, parameters) \ - (* GET_Clear(disp)) parameters -static inline _glptr_Clear GET_Clear(struct _glapi_table *disp) { - return (_glptr_Clear) (GET_by_offset(disp, _gloffset_Clear)); -} - -static inline void SET_Clear(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbitfield)) { - SET_by_offset(disp, _gloffset_Clear, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf); -#define CALL_ClearColor(disp, parameters) \ - (* GET_ClearColor(disp)) parameters -static inline _glptr_ClearColor GET_ClearColor(struct _glapi_table *disp) { - return (_glptr_ClearColor) (GET_by_offset(disp, _gloffset_ClearColor)); -} - -static inline void SET_ClearColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf, GLclampf, GLclampf)) { - SET_by_offset(disp, _gloffset_ClearColor, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearStencil)(GLint); -#define CALL_ClearStencil(disp, parameters) \ - (* GET_ClearStencil(disp)) parameters -static inline _glptr_ClearStencil GET_ClearStencil(struct _glapi_table *disp) { - return (_glptr_ClearStencil) (GET_by_offset(disp, _gloffset_ClearStencil)); -} - -static inline void SET_ClearStencil(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { - SET_by_offset(disp, _gloffset_ClearStencil, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilMask)(GLuint); -#define CALL_StencilMask(disp, parameters) \ - (* GET_StencilMask(disp)) parameters -static inline _glptr_StencilMask GET_StencilMask(struct _glapi_table *disp) { - return (_glptr_StencilMask) (GET_by_offset(disp, _gloffset_StencilMask)); -} - -static inline void SET_StencilMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_StencilMask, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorMask)(GLboolean, GLboolean, GLboolean, GLboolean); -#define CALL_ColorMask(disp, parameters) \ - (* GET_ColorMask(disp)) parameters -static inline _glptr_ColorMask GET_ColorMask(struct _glapi_table *disp) { - return (_glptr_ColorMask) (GET_by_offset(disp, _gloffset_ColorMask)); -} - -static inline void SET_ColorMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean, GLboolean, GLboolean, GLboolean)) { - SET_by_offset(disp, _gloffset_ColorMask, fn); -} - -typedef void (GLAPIENTRYP _glptr_DepthMask)(GLboolean); -#define CALL_DepthMask(disp, parameters) \ - (* GET_DepthMask(disp)) parameters -static inline _glptr_DepthMask GET_DepthMask(struct _glapi_table *disp) { - return (_glptr_DepthMask) (GET_by_offset(disp, _gloffset_DepthMask)); -} - -static inline void SET_DepthMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean)) { - SET_by_offset(disp, _gloffset_DepthMask, fn); -} - -typedef void (GLAPIENTRYP _glptr_Disable)(GLenum); -#define CALL_Disable(disp, parameters) \ - (* GET_Disable(disp)) parameters -static inline _glptr_Disable GET_Disable(struct _glapi_table *disp) { - return (_glptr_Disable) (GET_by_offset(disp, _gloffset_Disable)); -} - -static inline void SET_Disable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_Disable, fn); -} - -typedef void (GLAPIENTRYP _glptr_Enable)(GLenum); -#define CALL_Enable(disp, parameters) \ - (* GET_Enable(disp)) parameters -static inline _glptr_Enable GET_Enable(struct _glapi_table *disp) { - return (_glptr_Enable) (GET_by_offset(disp, _gloffset_Enable)); -} - -static inline void SET_Enable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_Enable, fn); -} - -typedef void (GLAPIENTRYP _glptr_Finish)(void); -#define CALL_Finish(disp, parameters) \ - (* GET_Finish(disp)) parameters -static inline _glptr_Finish GET_Finish(struct _glapi_table *disp) { - return (_glptr_Finish) (GET_by_offset(disp, _gloffset_Finish)); -} - -static inline void SET_Finish(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_Finish, fn); -} - -typedef void (GLAPIENTRYP _glptr_Flush)(void); -#define CALL_Flush(disp, parameters) \ - (* GET_Flush(disp)) parameters -static inline _glptr_Flush GET_Flush(struct _glapi_table *disp) { - return (_glptr_Flush) (GET_by_offset(disp, _gloffset_Flush)); -} - -static inline void SET_Flush(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_Flush, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendFunc)(GLenum, GLenum); -#define CALL_BlendFunc(disp, parameters) \ - (* GET_BlendFunc(disp)) parameters -static inline _glptr_BlendFunc GET_BlendFunc(struct _glapi_table *disp) { - return (_glptr_BlendFunc) (GET_by_offset(disp, _gloffset_BlendFunc)); -} - -static inline void SET_BlendFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendFunc, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilFunc)(GLenum, GLint, GLuint); -#define CALL_StencilFunc(disp, parameters) \ - (* GET_StencilFunc(disp)) parameters -static inline _glptr_StencilFunc GET_StencilFunc(struct _glapi_table *disp) { - return (_glptr_StencilFunc) (GET_by_offset(disp, _gloffset_StencilFunc)); -} - -static inline void SET_StencilFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLuint)) { - SET_by_offset(disp, _gloffset_StencilFunc, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilOp)(GLenum, GLenum, GLenum); -#define CALL_StencilOp(disp, parameters) \ - (* GET_StencilOp(disp)) parameters -static inline _glptr_StencilOp GET_StencilOp(struct _glapi_table *disp) { - return (_glptr_StencilOp) (GET_by_offset(disp, _gloffset_StencilOp)); -} - -static inline void SET_StencilOp(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_StencilOp, fn); -} - -typedef void (GLAPIENTRYP _glptr_DepthFunc)(GLenum); -#define CALL_DepthFunc(disp, parameters) \ - (* GET_DepthFunc(disp)) parameters -static inline _glptr_DepthFunc GET_DepthFunc(struct _glapi_table *disp) { - return (_glptr_DepthFunc) (GET_by_offset(disp, _gloffset_DepthFunc)); -} - -static inline void SET_DepthFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_DepthFunc, fn); -} - -typedef void (GLAPIENTRYP _glptr_PixelStorei)(GLenum, GLint); -#define CALL_PixelStorei(disp, parameters) \ - (* GET_PixelStorei(disp)) parameters -static inline _glptr_PixelStorei GET_PixelStorei(struct _glapi_table *disp) { - return (_glptr_PixelStorei) (GET_by_offset(disp, _gloffset_PixelStorei)); -} - -static inline void SET_PixelStorei(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { - SET_by_offset(disp, _gloffset_PixelStorei, fn); -} - -typedef void (GLAPIENTRYP _glptr_ReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *); -#define CALL_ReadPixels(disp, parameters) \ - (* GET_ReadPixels(disp)) parameters -static inline _glptr_ReadPixels GET_ReadPixels(struct _glapi_table *disp) { - return (_glptr_ReadPixels) (GET_by_offset(disp, _gloffset_ReadPixels)); -} - -static inline void SET_ReadPixels(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_ReadPixels, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetBooleanv)(GLenum, GLboolean *); -#define CALL_GetBooleanv(disp, parameters) \ - (* GET_GetBooleanv(disp)) parameters -static inline _glptr_GetBooleanv GET_GetBooleanv(struct _glapi_table *disp) { - return (_glptr_GetBooleanv) (GET_by_offset(disp, _gloffset_GetBooleanv)); -} - -static inline void SET_GetBooleanv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean *)) { - SET_by_offset(disp, _gloffset_GetBooleanv, fn); -} - -typedef GLenum (GLAPIENTRYP _glptr_GetError)(void); -#define CALL_GetError(disp, parameters) \ - (* GET_GetError(disp)) parameters -static inline _glptr_GetError GET_GetError(struct _glapi_table *disp) { - return (_glptr_GetError) (GET_by_offset(disp, _gloffset_GetError)); -} - -static inline void SET_GetError(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_GetError, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetFloatv)(GLenum, GLfloat *); -#define CALL_GetFloatv(disp, parameters) \ - (* GET_GetFloatv(disp)) parameters -static inline _glptr_GetFloatv GET_GetFloatv(struct _glapi_table *disp) { - return (_glptr_GetFloatv) (GET_by_offset(disp, _gloffset_GetFloatv)); -} - -static inline void SET_GetFloatv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetFloatv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetIntegerv)(GLenum, GLint *); -#define CALL_GetIntegerv(disp, parameters) \ - (* GET_GetIntegerv(disp)) parameters -static inline _glptr_GetIntegerv GET_GetIntegerv(struct _glapi_table *disp) { - return (_glptr_GetIntegerv) (GET_by_offset(disp, _gloffset_GetIntegerv)); -} - -static inline void SET_GetIntegerv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetIntegerv, fn); -} - -typedef const GLubyte * (GLAPIENTRYP _glptr_GetString)(GLenum); -#define CALL_GetString(disp, parameters) \ - (* GET_GetString(disp)) parameters -static inline _glptr_GetString GET_GetString(struct _glapi_table *disp) { - return (_glptr_GetString) (GET_by_offset(disp, _gloffset_GetString)); -} - -static inline void SET_GetString(struct _glapi_table *disp, const GLubyte * (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_GetString, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexParameterfv)(GLenum, GLenum, GLfloat *); -#define CALL_GetTexParameterfv(disp, parameters) \ - (* GET_GetTexParameterfv(disp)) parameters -static inline _glptr_GetTexParameterfv GET_GetTexParameterfv(struct _glapi_table *disp) { - return (_glptr_GetTexParameterfv) (GET_by_offset(disp, _gloffset_GetTexParameterfv)); -} - -static inline void SET_GetTexParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetTexParameterfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexParameteriv)(GLenum, GLenum, GLint *); -#define CALL_GetTexParameteriv(disp, parameters) \ - (* GET_GetTexParameteriv(disp)) parameters -static inline _glptr_GetTexParameteriv GET_GetTexParameteriv(struct _glapi_table *disp) { - return (_glptr_GetTexParameteriv) (GET_by_offset(disp, _gloffset_GetTexParameteriv)); -} - -static inline void SET_GetTexParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetTexParameteriv, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsEnabled)(GLenum); -#define CALL_IsEnabled(disp, parameters) \ - (* GET_IsEnabled(disp)) parameters -static inline _glptr_IsEnabled GET_IsEnabled(struct _glapi_table *disp) { - return (_glptr_IsEnabled) (GET_by_offset(disp, _gloffset_IsEnabled)); -} - -static inline void SET_IsEnabled(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_IsEnabled, fn); -} - -typedef void (GLAPIENTRYP _glptr_Viewport)(GLint, GLint, GLsizei, GLsizei); -#define CALL_Viewport(disp, parameters) \ - (* GET_Viewport(disp)) parameters -static inline _glptr_Viewport GET_Viewport(struct _glapi_table *disp) { - return (_glptr_Viewport) (GET_by_offset(disp, _gloffset_Viewport)); -} - -static inline void SET_Viewport(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_Viewport, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindTexture)(GLenum, GLuint); -#define CALL_BindTexture(disp, parameters) \ - (* GET_BindTexture(disp)) parameters -static inline _glptr_BindTexture GET_BindTexture(struct _glapi_table *disp) { - return (_glptr_BindTexture) (GET_by_offset(disp, _gloffset_BindTexture)); -} - -static inline void SET_BindTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindTexture, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawArrays)(GLenum, GLint, GLsizei); -#define CALL_DrawArrays(disp, parameters) \ - (* GET_DrawArrays(disp)) parameters -static inline _glptr_DrawArrays GET_DrawArrays(struct _glapi_table *disp) { - return (_glptr_DrawArrays) (GET_by_offset(disp, _gloffset_DrawArrays)); -} - -static inline void SET_DrawArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei)) { - SET_by_offset(disp, _gloffset_DrawArrays, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawElements)(GLenum, GLsizei, GLenum, const GLvoid *); -#define CALL_DrawElements(disp, parameters) \ - (* GET_DrawElements(disp)) parameters -static inline _glptr_DrawElements GET_DrawElements(struct _glapi_table *disp) { - return (_glptr_DrawElements) (GET_by_offset(disp, _gloffset_DrawElements)); -} - -static inline void SET_DrawElements(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *)) { - SET_by_offset(disp, _gloffset_DrawElements, fn); -} - -typedef void (GLAPIENTRYP _glptr_PolygonOffset)(GLfloat, GLfloat); -#define CALL_PolygonOffset(disp, parameters) \ - (* GET_PolygonOffset(disp)) parameters -static inline _glptr_PolygonOffset GET_PolygonOffset(struct _glapi_table *disp) { - return (_glptr_PolygonOffset) (GET_by_offset(disp, _gloffset_PolygonOffset)); -} - -static inline void SET_PolygonOffset(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_PolygonOffset, fn); -} - -typedef void (GLAPIENTRYP _glptr_CopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); -#define CALL_CopyTexImage2D(disp, parameters) \ - (* GET_CopyTexImage2D(disp)) parameters -static inline _glptr_CopyTexImage2D GET_CopyTexImage2D(struct _glapi_table *disp) { - return (_glptr_CopyTexImage2D) (GET_by_offset(disp, _gloffset_CopyTexImage2D)); -} - -static inline void SET_CopyTexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) { - SET_by_offset(disp, _gloffset_CopyTexImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_CopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -#define CALL_CopyTexSubImage2D(disp, parameters) \ - (* GET_CopyTexSubImage2D(disp)) parameters -static inline _glptr_CopyTexSubImage2D GET_CopyTexSubImage2D(struct _glapi_table *disp) { - return (_glptr_CopyTexSubImage2D) (GET_by_offset(disp, _gloffset_CopyTexSubImage2D)); -} - -static inline void SET_CopyTexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteTextures)(GLsizei, const GLuint *); -#define CALL_DeleteTextures(disp, parameters) \ - (* GET_DeleteTextures(disp)) parameters -static inline _glptr_DeleteTextures GET_DeleteTextures(struct _glapi_table *disp) { - return (_glptr_DeleteTextures) (GET_by_offset(disp, _gloffset_DeleteTextures)); -} - -static inline void SET_DeleteTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteTextures, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenTextures)(GLsizei, GLuint *); -#define CALL_GenTextures(disp, parameters) \ - (* GET_GenTextures(disp)) parameters -static inline _glptr_GenTextures GET_GenTextures(struct _glapi_table *disp) { - return (_glptr_GenTextures) (GET_by_offset(disp, _gloffset_GenTextures)); -} - -static inline void SET_GenTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenTextures, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsTexture)(GLuint); -#define CALL_IsTexture(disp, parameters) \ - (* GET_IsTexture(disp)) parameters -static inline _glptr_IsTexture GET_IsTexture(struct _glapi_table *disp) { - return (_glptr_IsTexture) (GET_by_offset(disp, _gloffset_IsTexture)); -} - -static inline void SET_IsTexture(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsTexture, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#define CALL_TexSubImage2D(disp, parameters) \ - (* GET_TexSubImage2D(disp)) parameters -static inline _glptr_TexSubImage2D GET_TexSubImage2D(struct _glapi_table *disp) { - return (_glptr_TexSubImage2D) (GET_by_offset(disp, _gloffset_TexSubImage2D)); -} - -static inline void SET_TexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { - SET_by_offset(disp, _gloffset_TexSubImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendColor)(GLclampf, GLclampf, GLclampf, GLclampf); -#define CALL_BlendColor(disp, parameters) \ - (* GET_BlendColor(disp)) parameters -static inline _glptr_BlendColor GET_BlendColor(struct _glapi_table *disp) { - return (_glptr_BlendColor) (GET_by_offset(disp, _gloffset_BlendColor)); -} - -static inline void SET_BlendColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf, GLclampf, GLclampf)) { - SET_by_offset(disp, _gloffset_BlendColor, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendEquation)(GLenum); -#define CALL_BlendEquation(disp, parameters) \ - (* GET_BlendEquation(disp)) parameters -static inline _glptr_BlendEquation GET_BlendEquation(struct _glapi_table *disp) { - return (_glptr_BlendEquation) (GET_by_offset(disp, _gloffset_BlendEquation)); -} - -static inline void SET_BlendEquation(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_BlendEquation, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexImage3DOES)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -#define CALL_TexImage3DOES(disp, parameters) \ - (* GET_TexImage3DOES(disp)) parameters -static inline _glptr_TexImage3DOES GET_TexImage3DOES(struct _glapi_table *disp) { - return (_glptr_TexImage3DOES) (GET_by_offset(disp, _gloffset_TexImage3DOES)); -} - -static inline void SET_TexImage3DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { - SET_by_offset(disp, _gloffset_TexImage3DOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexSubImage3DOES)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#define CALL_TexSubImage3DOES(disp, parameters) \ - (* GET_TexSubImage3DOES(disp)) parameters -static inline _glptr_TexSubImage3DOES GET_TexSubImage3DOES(struct _glapi_table *disp) { - return (_glptr_TexSubImage3DOES) (GET_by_offset(disp, _gloffset_TexSubImage3DOES)); -} - -static inline void SET_TexSubImage3DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { - SET_by_offset(disp, _gloffset_TexSubImage3DOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_CopyTexSubImage3DOES)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -#define CALL_CopyTexSubImage3DOES(disp, parameters) \ - (* GET_CopyTexSubImage3DOES(disp)) parameters -static inline _glptr_CopyTexSubImage3DOES GET_CopyTexSubImage3DOES(struct _glapi_table *disp) { - return (_glptr_CopyTexSubImage3DOES) (GET_by_offset(disp, _gloffset_CopyTexSubImage3DOES)); -} - -static inline void SET_CopyTexSubImage3DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_CopyTexSubImage3DOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ActiveTexture)(GLenum); -#define CALL_ActiveTexture(disp, parameters) \ - (* GET_ActiveTexture(disp)) parameters -static inline _glptr_ActiveTexture GET_ActiveTexture(struct _glapi_table *disp) { - return (_glptr_ActiveTexture) (GET_by_offset(disp, _gloffset_ActiveTexture)); -} - -static inline void SET_ActiveTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_ActiveTexture, fn); -} - -typedef void (GLAPIENTRYP _glptr_AttachShader)(GLuint, GLuint); -#define CALL_AttachShader(disp, parameters) \ - (* GET_AttachShader(disp)) parameters -static inline _glptr_AttachShader GET_AttachShader(struct _glapi_table *disp) { - return (_glptr_AttachShader) (GET_by_offset(disp, _gloffset_AttachShader)); -} - -static inline void SET_AttachShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_AttachShader, fn); -} - -typedef GLuint (GLAPIENTRYP _glptr_CreateProgram)(void); -#define CALL_CreateProgram(disp, parameters) \ - (* GET_CreateProgram(disp)) parameters -static inline _glptr_CreateProgram GET_CreateProgram(struct _glapi_table *disp) { - return (_glptr_CreateProgram) (GET_by_offset(disp, _gloffset_CreateProgram)); -} - -static inline void SET_CreateProgram(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_CreateProgram, fn); -} - -typedef GLuint (GLAPIENTRYP _glptr_CreateShader)(GLenum); -#define CALL_CreateShader(disp, parameters) \ - (* GET_CreateShader(disp)) parameters -static inline _glptr_CreateShader GET_CreateShader(struct _glapi_table *disp) { - return (_glptr_CreateShader) (GET_by_offset(disp, _gloffset_CreateShader)); -} - -static inline void SET_CreateShader(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_CreateShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteProgram)(GLuint); -#define CALL_DeleteProgram(disp, parameters) \ - (* GET_DeleteProgram(disp)) parameters -static inline _glptr_DeleteProgram GET_DeleteProgram(struct _glapi_table *disp) { - return (_glptr_DeleteProgram) (GET_by_offset(disp, _gloffset_DeleteProgram)); -} - -static inline void SET_DeleteProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_DeleteProgram, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteShader)(GLuint); -#define CALL_DeleteShader(disp, parameters) \ - (* GET_DeleteShader(disp)) parameters -static inline _glptr_DeleteShader GET_DeleteShader(struct _glapi_table *disp) { - return (_glptr_DeleteShader) (GET_by_offset(disp, _gloffset_DeleteShader)); -} - -static inline void SET_DeleteShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_DeleteShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_DetachShader)(GLuint, GLuint); -#define CALL_DetachShader(disp, parameters) \ - (* GET_DetachShader(disp)) parameters -static inline _glptr_DetachShader GET_DetachShader(struct _glapi_table *disp) { - return (_glptr_DetachShader) (GET_by_offset(disp, _gloffset_DetachShader)); -} - -static inline void SET_DetachShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_DetachShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetAttachedShaders)(GLuint, GLsizei, GLsizei *, GLuint *); -#define CALL_GetAttachedShaders(disp, parameters) \ - (* GET_GetAttachedShaders(disp)) parameters -static inline _glptr_GetAttachedShaders GET_GetAttachedShaders(struct _glapi_table *disp) { - return (_glptr_GetAttachedShaders) (GET_by_offset(disp, _gloffset_GetAttachedShaders)); -} - -static inline void SET_GetAttachedShaders(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLuint *)) { - SET_by_offset(disp, _gloffset_GetAttachedShaders, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *); -#define CALL_GetProgramInfoLog(disp, parameters) \ - (* GET_GetProgramInfoLog(disp)) parameters -static inline _glptr_GetProgramInfoLog GET_GetProgramInfoLog(struct _glapi_table *disp) { - return (_glptr_GetProgramInfoLog) (GET_by_offset(disp, _gloffset_GetProgramInfoLog)); -} - -static inline void SET_GetProgramInfoLog(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { - SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramiv)(GLuint, GLenum, GLint *); -#define CALL_GetProgramiv(disp, parameters) \ - (* GET_GetProgramiv(disp)) parameters -static inline _glptr_GetProgramiv GET_GetProgramiv(struct _glapi_table *disp) { - return (_glptr_GetProgramiv) (GET_by_offset(disp, _gloffset_GetProgramiv)); -} - -static inline void SET_GetProgramiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetProgramiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetShaderInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *); -#define CALL_GetShaderInfoLog(disp, parameters) \ - (* GET_GetShaderInfoLog(disp)) parameters -static inline _glptr_GetShaderInfoLog GET_GetShaderInfoLog(struct _glapi_table *disp) { - return (_glptr_GetShaderInfoLog) (GET_by_offset(disp, _gloffset_GetShaderInfoLog)); -} - -static inline void SET_GetShaderInfoLog(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { - SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetShaderiv)(GLuint, GLenum, GLint *); -#define CALL_GetShaderiv(disp, parameters) \ - (* GET_GetShaderiv(disp)) parameters -static inline _glptr_GetShaderiv GET_GetShaderiv(struct _glapi_table *disp) { - return (_glptr_GetShaderiv) (GET_by_offset(disp, _gloffset_GetShaderiv)); -} - -static inline void SET_GetShaderiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetShaderiv, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsProgram)(GLuint); -#define CALL_IsProgram(disp, parameters) \ - (* GET_IsProgram(disp)) parameters -static inline _glptr_IsProgram GET_IsProgram(struct _glapi_table *disp) { - return (_glptr_IsProgram) (GET_by_offset(disp, _gloffset_IsProgram)); -} - -static inline void SET_IsProgram(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsProgram, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsShader)(GLuint); -#define CALL_IsShader(disp, parameters) \ - (* GET_IsShader(disp)) parameters -static inline _glptr_IsShader GET_IsShader(struct _glapi_table *disp) { - return (_glptr_IsShader) (GET_by_offset(disp, _gloffset_IsShader)); -} - -static inline void SET_IsShader(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilFuncSeparate)(GLenum, GLenum, GLint, GLuint); -#define CALL_StencilFuncSeparate(disp, parameters) \ - (* GET_StencilFuncSeparate(disp)) parameters -static inline _glptr_StencilFuncSeparate GET_StencilFuncSeparate(struct _glapi_table *disp) { - return (_glptr_StencilFuncSeparate) (GET_by_offset(disp, _gloffset_StencilFuncSeparate)); -} - -static inline void SET_StencilFuncSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLuint)) { - SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilMaskSeparate)(GLenum, GLuint); -#define CALL_StencilMaskSeparate(disp, parameters) \ - (* GET_StencilMaskSeparate(disp)) parameters -static inline _glptr_StencilMaskSeparate GET_StencilMaskSeparate(struct _glapi_table *disp) { - return (_glptr_StencilMaskSeparate) (GET_by_offset(disp, _gloffset_StencilMaskSeparate)); -} - -static inline void SET_StencilMaskSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilOpSeparate)(GLenum, GLenum, GLenum, GLenum); -#define CALL_StencilOpSeparate(disp, parameters) \ - (* GET_StencilOpSeparate(disp)) parameters -static inline _glptr_StencilOpSeparate GET_StencilOpSeparate(struct _glapi_table *disp) { - return (_glptr_StencilOpSeparate) (GET_by_offset(disp, _gloffset_StencilOpSeparate)); -} - -static inline void SET_StencilOpSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_StencilOpSeparate, fn); -} - -typedef void (GLAPIENTRYP _glptr_SampleCoverage)(GLclampf, GLboolean); -#define CALL_SampleCoverage(disp, parameters) \ - (* GET_SampleCoverage(disp)) parameters -static inline _glptr_SampleCoverage GET_SampleCoverage(struct _glapi_table *disp) { - return (_glptr_SampleCoverage) (GET_by_offset(disp, _gloffset_SampleCoverage)); -} - -static inline void SET_SampleCoverage(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLboolean)) { - SET_by_offset(disp, _gloffset_SampleCoverage, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexImage2D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -#define CALL_CompressedTexImage2D(disp, parameters) \ - (* GET_CompressedTexImage2D(disp)) parameters -static inline _glptr_CompressedTexImage2D GET_CompressedTexImage2D(struct _glapi_table *disp) { - return (_glptr_CompressedTexImage2D) (GET_by_offset(disp, _gloffset_CompressedTexImage2D)); -} - -static inline void SET_CompressedTexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexImage3DOES)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -#define CALL_CompressedTexImage3DOES(disp, parameters) \ - (* GET_CompressedTexImage3DOES(disp)) parameters -static inline _glptr_CompressedTexImage3DOES GET_CompressedTexImage3DOES(struct _glapi_table *disp) { - return (_glptr_CompressedTexImage3DOES) (GET_by_offset(disp, _gloffset_CompressedTexImage3DOES)); -} - -static inline void SET_CompressedTexImage3DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexImage3DOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -#define CALL_CompressedTexSubImage2D(disp, parameters) \ - (* GET_CompressedTexSubImage2D(disp)) parameters -static inline _glptr_CompressedTexSubImage2D GET_CompressedTexSubImage2D(struct _glapi_table *disp) { - return (_glptr_CompressedTexSubImage2D) (GET_by_offset(disp, _gloffset_CompressedTexSubImage2D)); -} - -static inline void SET_CompressedTexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexSubImage2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage3DOES)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -#define CALL_CompressedTexSubImage3DOES(disp, parameters) \ - (* GET_CompressedTexSubImage3DOES(disp)) parameters -static inline _glptr_CompressedTexSubImage3DOES GET_CompressedTexSubImage3DOES(struct _glapi_table *disp) { - return (_glptr_CompressedTexSubImage3DOES) (GET_by_offset(disp, _gloffset_CompressedTexSubImage3DOES)); -} - -static inline void SET_CompressedTexSubImage3DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexSubImage3DOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_DisableVertexAttribArray)(GLuint); -#define CALL_DisableVertexAttribArray(disp, parameters) \ - (* GET_DisableVertexAttribArray(disp)) parameters -static inline _glptr_DisableVertexAttribArray GET_DisableVertexAttribArray(struct _glapi_table *disp) { - return (_glptr_DisableVertexAttribArray) (GET_by_offset(disp, _gloffset_DisableVertexAttribArray)); -} - -static inline void SET_DisableVertexAttribArray(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_DisableVertexAttribArray, fn); -} - -typedef void (GLAPIENTRYP _glptr_EnableVertexAttribArray)(GLuint); -#define CALL_EnableVertexAttribArray(disp, parameters) \ - (* GET_EnableVertexAttribArray(disp)) parameters -static inline _glptr_EnableVertexAttribArray GET_EnableVertexAttribArray(struct _glapi_table *disp) { - return (_glptr_EnableVertexAttribArray) (GET_by_offset(disp, _gloffset_EnableVertexAttribArray)); -} - -static inline void SET_EnableVertexAttribArray(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_EnableVertexAttribArray, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribfv)(GLuint, GLenum, GLfloat *); -#define CALL_GetVertexAttribfv(disp, parameters) \ - (* GET_GetVertexAttribfv(disp)) parameters -static inline _glptr_GetVertexAttribfv GET_GetVertexAttribfv(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribfv) (GET_by_offset(disp, _gloffset_GetVertexAttribfv)); -} - -static inline void SET_GetVertexAttribfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribiv)(GLuint, GLenum, GLint *); -#define CALL_GetVertexAttribiv(disp, parameters) \ - (* GET_GetVertexAttribiv(disp)) parameters -static inline _glptr_GetVertexAttribiv GET_GetVertexAttribiv(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribiv) (GET_by_offset(disp, _gloffset_GetVertexAttribiv)); -} - -static inline void SET_GetVertexAttribiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib1f)(GLuint, GLfloat); -#define CALL_VertexAttrib1f(disp, parameters) \ - (* GET_VertexAttrib1f(disp)) parameters -static inline _glptr_VertexAttrib1f GET_VertexAttrib1f(struct _glapi_table *disp) { - return (_glptr_VertexAttrib1f) (GET_by_offset(disp, _gloffset_VertexAttrib1f)); -} - -static inline void SET_VertexAttrib1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat)) { - SET_by_offset(disp, _gloffset_VertexAttrib1f, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib1fv)(GLuint, const GLfloat *); -#define CALL_VertexAttrib1fv(disp, parameters) \ - (* GET_VertexAttrib1fv(disp)) parameters -static inline _glptr_VertexAttrib1fv GET_VertexAttrib1fv(struct _glapi_table *disp) { - return (_glptr_VertexAttrib1fv) (GET_by_offset(disp, _gloffset_VertexAttrib1fv)); -} - -static inline void SET_VertexAttrib1fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_VertexAttrib1fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib2f)(GLuint, GLfloat, GLfloat); -#define CALL_VertexAttrib2f(disp, parameters) \ - (* GET_VertexAttrib2f(disp)) parameters -static inline _glptr_VertexAttrib2f GET_VertexAttrib2f(struct _glapi_table *disp) { - return (_glptr_VertexAttrib2f) (GET_by_offset(disp, _gloffset_VertexAttrib2f)); -} - -static inline void SET_VertexAttrib2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_VertexAttrib2f, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib2fv)(GLuint, const GLfloat *); -#define CALL_VertexAttrib2fv(disp, parameters) \ - (* GET_VertexAttrib2fv(disp)) parameters -static inline _glptr_VertexAttrib2fv GET_VertexAttrib2fv(struct _glapi_table *disp) { - return (_glptr_VertexAttrib2fv) (GET_by_offset(disp, _gloffset_VertexAttrib2fv)); -} - -static inline void SET_VertexAttrib2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_VertexAttrib2fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib3f)(GLuint, GLfloat, GLfloat, GLfloat); -#define CALL_VertexAttrib3f(disp, parameters) \ - (* GET_VertexAttrib3f(disp)) parameters -static inline _glptr_VertexAttrib3f GET_VertexAttrib3f(struct _glapi_table *disp) { - return (_glptr_VertexAttrib3f) (GET_by_offset(disp, _gloffset_VertexAttrib3f)); -} - -static inline void SET_VertexAttrib3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_VertexAttrib3f, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib3fv)(GLuint, const GLfloat *); -#define CALL_VertexAttrib3fv(disp, parameters) \ - (* GET_VertexAttrib3fv(disp)) parameters -static inline _glptr_VertexAttrib3fv GET_VertexAttrib3fv(struct _glapi_table *disp) { - return (_glptr_VertexAttrib3fv) (GET_by_offset(disp, _gloffset_VertexAttrib3fv)); -} - -static inline void SET_VertexAttrib3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_VertexAttrib3fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4f)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_VertexAttrib4f(disp, parameters) \ - (* GET_VertexAttrib4f(disp)) parameters -static inline _glptr_VertexAttrib4f GET_VertexAttrib4f(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4f) (GET_by_offset(disp, _gloffset_VertexAttrib4f)); -} - -static inline void SET_VertexAttrib4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_VertexAttrib4f, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4fv)(GLuint, const GLfloat *); -#define CALL_VertexAttrib4fv(disp, parameters) \ - (* GET_VertexAttrib4fv(disp)) parameters -static inline _glptr_VertexAttrib4fv GET_VertexAttrib4fv(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4fv) (GET_by_offset(disp, _gloffset_VertexAttrib4fv)); -} - -static inline void SET_VertexAttrib4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribPointer)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); -#define CALL_VertexAttribPointer(disp, parameters) \ - (* GET_VertexAttribPointer(disp)) parameters -static inline _glptr_VertexAttribPointer GET_VertexAttribPointer(struct _glapi_table *disp) { - return (_glptr_VertexAttribPointer) (GET_by_offset(disp, _gloffset_VertexAttribPointer)); -} - -static inline void SET_VertexAttribPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_VertexAttribPointer, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindBuffer)(GLenum, GLuint); -#define CALL_BindBuffer(disp, parameters) \ - (* GET_BindBuffer(disp)) parameters -static inline _glptr_BindBuffer GET_BindBuffer(struct _glapi_table *disp) { - return (_glptr_BindBuffer) (GET_by_offset(disp, _gloffset_BindBuffer)); -} - -static inline void SET_BindBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindBuffer, fn); -} - -typedef void (GLAPIENTRYP _glptr_BufferData)(GLenum, GLsizeiptr, const GLvoid *, GLenum); -#define CALL_BufferData(disp, parameters) \ - (* GET_BufferData(disp)) parameters -static inline _glptr_BufferData GET_BufferData(struct _glapi_table *disp) { - return (_glptr_BufferData) (GET_by_offset(disp, _gloffset_BufferData)); -} - -static inline void SET_BufferData(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizeiptr, const GLvoid *, GLenum)) { - SET_by_offset(disp, _gloffset_BufferData, fn); -} - -typedef void (GLAPIENTRYP _glptr_BufferSubData)(GLenum, GLintptr, GLsizeiptr, const GLvoid *); -#define CALL_BufferSubData(disp, parameters) \ - (* GET_BufferSubData(disp)) parameters -static inline _glptr_BufferSubData GET_BufferSubData(struct _glapi_table *disp) { - return (_glptr_BufferSubData) (GET_by_offset(disp, _gloffset_BufferSubData)); -} - -static inline void SET_BufferSubData(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptr, GLsizeiptr, const GLvoid *)) { - SET_by_offset(disp, _gloffset_BufferSubData, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteBuffers)(GLsizei, const GLuint *); -#define CALL_DeleteBuffers(disp, parameters) \ - (* GET_DeleteBuffers(disp)) parameters -static inline _glptr_DeleteBuffers GET_DeleteBuffers(struct _glapi_table *disp) { - return (_glptr_DeleteBuffers) (GET_by_offset(disp, _gloffset_DeleteBuffers)); -} - -static inline void SET_DeleteBuffers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteBuffers, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenBuffers)(GLsizei, GLuint *); -#define CALL_GenBuffers(disp, parameters) \ - (* GET_GenBuffers(disp)) parameters -static inline _glptr_GenBuffers GET_GenBuffers(struct _glapi_table *disp) { - return (_glptr_GenBuffers) (GET_by_offset(disp, _gloffset_GenBuffers)); -} - -static inline void SET_GenBuffers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenBuffers, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetBufferParameteriv)(GLenum, GLenum, GLint *); -#define CALL_GetBufferParameteriv(disp, parameters) \ - (* GET_GetBufferParameteriv(disp)) parameters -static inline _glptr_GetBufferParameteriv GET_GetBufferParameteriv(struct _glapi_table *disp) { - return (_glptr_GetBufferParameteriv) (GET_by_offset(disp, _gloffset_GetBufferParameteriv)); -} - -static inline void SET_GetBufferParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetBufferParameteriv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetBufferPointervOES)(GLenum, GLenum, GLvoid **); -#define CALL_GetBufferPointervOES(disp, parameters) \ - (* GET_GetBufferPointervOES(disp)) parameters -static inline _glptr_GetBufferPointervOES GET_GetBufferPointervOES(struct _glapi_table *disp) { - return (_glptr_GetBufferPointervOES) (GET_by_offset(disp, _gloffset_GetBufferPointervOES)); -} - -static inline void SET_GetBufferPointervOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid **)) { - SET_by_offset(disp, _gloffset_GetBufferPointervOES, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsBuffer)(GLuint); -#define CALL_IsBuffer(disp, parameters) \ - (* GET_IsBuffer(disp)) parameters -static inline _glptr_IsBuffer GET_IsBuffer(struct _glapi_table *disp) { - return (_glptr_IsBuffer) (GET_by_offset(disp, _gloffset_IsBuffer)); -} - -static inline void SET_IsBuffer(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsBuffer, fn); -} - -typedef GLvoid * (GLAPIENTRYP _glptr_MapBufferOES)(GLenum, GLenum); -#define CALL_MapBufferOES(disp, parameters) \ - (* GET_MapBufferOES(disp)) parameters -static inline _glptr_MapBufferOES GET_MapBufferOES(struct _glapi_table *disp) { - return (_glptr_MapBufferOES) (GET_by_offset(disp, _gloffset_MapBufferOES)); -} - -static inline void SET_MapBufferOES(struct _glapi_table *disp, GLvoid * (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_MapBufferOES, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_UnmapBufferOES)(GLenum); -#define CALL_UnmapBufferOES(disp, parameters) \ - (* GET_UnmapBufferOES(disp)) parameters -static inline _glptr_UnmapBufferOES GET_UnmapBufferOES(struct _glapi_table *disp) { - return (_glptr_UnmapBufferOES) (GET_by_offset(disp, _gloffset_UnmapBufferOES)); -} - -static inline void SET_UnmapBufferOES(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_UnmapBufferOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompileShader)(GLuint); -#define CALL_CompileShader(disp, parameters) \ - (* GET_CompileShader(disp)) parameters -static inline _glptr_CompileShader GET_CompileShader(struct _glapi_table *disp) { - return (_glptr_CompileShader) (GET_by_offset(disp, _gloffset_CompileShader)); -} - -static inline void SET_CompileShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_CompileShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetActiveUniform)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); -#define CALL_GetActiveUniform(disp, parameters) \ - (* GET_GetActiveUniform(disp)) parameters -static inline _glptr_GetActiveUniform GET_GetActiveUniform(struct _glapi_table *disp) { - return (_glptr_GetActiveUniform) (GET_by_offset(disp, _gloffset_GetActiveUniform)); -} - -static inline void SET_GetActiveUniform(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *)) { - SET_by_offset(disp, _gloffset_GetActiveUniform, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetShaderSource)(GLuint, GLsizei, GLsizei *, GLchar *); -#define CALL_GetShaderSource(disp, parameters) \ - (* GET_GetShaderSource(disp)) parameters -static inline _glptr_GetShaderSource GET_GetShaderSource(struct _glapi_table *disp) { - return (_glptr_GetShaderSource) (GET_by_offset(disp, _gloffset_GetShaderSource)); -} - -static inline void SET_GetShaderSource(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { - SET_by_offset(disp, _gloffset_GetShaderSource, fn); -} - -typedef GLint (GLAPIENTRYP _glptr_GetUniformLocation)(GLuint, const GLchar *); -#define CALL_GetUniformLocation(disp, parameters) \ - (* GET_GetUniformLocation(disp)) parameters -static inline _glptr_GetUniformLocation GET_GetUniformLocation(struct _glapi_table *disp) { - return (_glptr_GetUniformLocation) (GET_by_offset(disp, _gloffset_GetUniformLocation)); -} - -static inline void SET_GetUniformLocation(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLuint, const GLchar *)) { - SET_by_offset(disp, _gloffset_GetUniformLocation, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetUniformfv)(GLuint, GLint, GLfloat *); -#define CALL_GetUniformfv(disp, parameters) \ - (* GET_GetUniformfv(disp)) parameters -static inline _glptr_GetUniformfv GET_GetUniformfv(struct _glapi_table *disp) { - return (_glptr_GetUniformfv) (GET_by_offset(disp, _gloffset_GetUniformfv)); -} - -static inline void SET_GetUniformfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetUniformfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetUniformiv)(GLuint, GLint, GLint *); -#define CALL_GetUniformiv(disp, parameters) \ - (* GET_GetUniformiv(disp)) parameters -static inline _glptr_GetUniformiv GET_GetUniformiv(struct _glapi_table *disp) { - return (_glptr_GetUniformiv) (GET_by_offset(disp, _gloffset_GetUniformiv)); -} - -static inline void SET_GetUniformiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint *)) { - SET_by_offset(disp, _gloffset_GetUniformiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_LinkProgram)(GLuint); -#define CALL_LinkProgram(disp, parameters) \ - (* GET_LinkProgram(disp)) parameters -static inline _glptr_LinkProgram GET_LinkProgram(struct _glapi_table *disp) { - return (_glptr_LinkProgram) (GET_by_offset(disp, _gloffset_LinkProgram)); -} - -static inline void SET_LinkProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_LinkProgram, fn); -} - -typedef void (GLAPIENTRYP _glptr_ShaderSource)(GLuint, GLsizei, const GLchar **, const GLint *); -#define CALL_ShaderSource(disp, parameters) \ - (* GET_ShaderSource(disp)) parameters -static inline _glptr_ShaderSource GET_ShaderSource(struct _glapi_table *disp) { - return (_glptr_ShaderSource) (GET_by_offset(disp, _gloffset_ShaderSource)); -} - -static inline void SET_ShaderSource(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLchar **, const GLint *)) { - SET_by_offset(disp, _gloffset_ShaderSource, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1f)(GLint, GLfloat); -#define CALL_Uniform1f(disp, parameters) \ - (* GET_Uniform1f(disp)) parameters -static inline _glptr_Uniform1f GET_Uniform1f(struct _glapi_table *disp) { - return (_glptr_Uniform1f) (GET_by_offset(disp, _gloffset_Uniform1f)); -} - -static inline void SET_Uniform1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat)) { - SET_by_offset(disp, _gloffset_Uniform1f, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1fv)(GLint, GLsizei, const GLfloat *); -#define CALL_Uniform1fv(disp, parameters) \ - (* GET_Uniform1fv(disp)) parameters -static inline _glptr_Uniform1fv GET_Uniform1fv(struct _glapi_table *disp) { - return (_glptr_Uniform1fv) (GET_by_offset(disp, _gloffset_Uniform1fv)); -} - -static inline void SET_Uniform1fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Uniform1fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1i)(GLint, GLint); -#define CALL_Uniform1i(disp, parameters) \ - (* GET_Uniform1i(disp)) parameters -static inline _glptr_Uniform1i GET_Uniform1i(struct _glapi_table *disp) { - return (_glptr_Uniform1i) (GET_by_offset(disp, _gloffset_Uniform1i)); -} - -static inline void SET_Uniform1i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { - SET_by_offset(disp, _gloffset_Uniform1i, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1iv)(GLint, GLsizei, const GLint *); -#define CALL_Uniform1iv(disp, parameters) \ - (* GET_Uniform1iv(disp)) parameters -static inline _glptr_Uniform1iv GET_Uniform1iv(struct _glapi_table *disp) { - return (_glptr_Uniform1iv) (GET_by_offset(disp, _gloffset_Uniform1iv)); -} - -static inline void SET_Uniform1iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_Uniform1iv, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2f)(GLint, GLfloat, GLfloat); -#define CALL_Uniform2f(disp, parameters) \ - (* GET_Uniform2f(disp)) parameters -static inline _glptr_Uniform2f GET_Uniform2f(struct _glapi_table *disp) { - return (_glptr_Uniform2f) (GET_by_offset(disp, _gloffset_Uniform2f)); -} - -static inline void SET_Uniform2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Uniform2f, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2fv)(GLint, GLsizei, const GLfloat *); -#define CALL_Uniform2fv(disp, parameters) \ - (* GET_Uniform2fv(disp)) parameters -static inline _glptr_Uniform2fv GET_Uniform2fv(struct _glapi_table *disp) { - return (_glptr_Uniform2fv) (GET_by_offset(disp, _gloffset_Uniform2fv)); -} - -static inline void SET_Uniform2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Uniform2fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2i)(GLint, GLint, GLint); -#define CALL_Uniform2i(disp, parameters) \ - (* GET_Uniform2i(disp)) parameters -static inline _glptr_Uniform2i GET_Uniform2i(struct _glapi_table *disp) { - return (_glptr_Uniform2i) (GET_by_offset(disp, _gloffset_Uniform2i)); -} - -static inline void SET_Uniform2i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_Uniform2i, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2iv)(GLint, GLsizei, const GLint *); -#define CALL_Uniform2iv(disp, parameters) \ - (* GET_Uniform2iv(disp)) parameters -static inline _glptr_Uniform2iv GET_Uniform2iv(struct _glapi_table *disp) { - return (_glptr_Uniform2iv) (GET_by_offset(disp, _gloffset_Uniform2iv)); -} - -static inline void SET_Uniform2iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_Uniform2iv, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3f)(GLint, GLfloat, GLfloat, GLfloat); -#define CALL_Uniform3f(disp, parameters) \ - (* GET_Uniform3f(disp)) parameters -static inline _glptr_Uniform3f GET_Uniform3f(struct _glapi_table *disp) { - return (_glptr_Uniform3f) (GET_by_offset(disp, _gloffset_Uniform3f)); -} - -static inline void SET_Uniform3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Uniform3f, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3fv)(GLint, GLsizei, const GLfloat *); -#define CALL_Uniform3fv(disp, parameters) \ - (* GET_Uniform3fv(disp)) parameters -static inline _glptr_Uniform3fv GET_Uniform3fv(struct _glapi_table *disp) { - return (_glptr_Uniform3fv) (GET_by_offset(disp, _gloffset_Uniform3fv)); -} - -static inline void SET_Uniform3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Uniform3fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3i)(GLint, GLint, GLint, GLint); -#define CALL_Uniform3i(disp, parameters) \ - (* GET_Uniform3i(disp)) parameters -static inline _glptr_Uniform3i GET_Uniform3i(struct _glapi_table *disp) { - return (_glptr_Uniform3i) (GET_by_offset(disp, _gloffset_Uniform3i)); -} - -static inline void SET_Uniform3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_Uniform3i, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3iv)(GLint, GLsizei, const GLint *); -#define CALL_Uniform3iv(disp, parameters) \ - (* GET_Uniform3iv(disp)) parameters -static inline _glptr_Uniform3iv GET_Uniform3iv(struct _glapi_table *disp) { - return (_glptr_Uniform3iv) (GET_by_offset(disp, _gloffset_Uniform3iv)); -} - -static inline void SET_Uniform3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_Uniform3iv, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4f)(GLint, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_Uniform4f(disp, parameters) \ - (* GET_Uniform4f(disp)) parameters -static inline _glptr_Uniform4f GET_Uniform4f(struct _glapi_table *disp) { - return (_glptr_Uniform4f) (GET_by_offset(disp, _gloffset_Uniform4f)); -} - -static inline void SET_Uniform4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Uniform4f, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4fv)(GLint, GLsizei, const GLfloat *); -#define CALL_Uniform4fv(disp, parameters) \ - (* GET_Uniform4fv(disp)) parameters -static inline _glptr_Uniform4fv GET_Uniform4fv(struct _glapi_table *disp) { - return (_glptr_Uniform4fv) (GET_by_offset(disp, _gloffset_Uniform4fv)); -} - -static inline void SET_Uniform4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Uniform4fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4i)(GLint, GLint, GLint, GLint, GLint); -#define CALL_Uniform4i(disp, parameters) \ - (* GET_Uniform4i(disp)) parameters -static inline _glptr_Uniform4i GET_Uniform4i(struct _glapi_table *disp) { - return (_glptr_Uniform4i) (GET_by_offset(disp, _gloffset_Uniform4i)); -} - -static inline void SET_Uniform4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_Uniform4i, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4iv)(GLint, GLsizei, const GLint *); -#define CALL_Uniform4iv(disp, parameters) \ - (* GET_Uniform4iv(disp)) parameters -static inline _glptr_Uniform4iv GET_Uniform4iv(struct _glapi_table *disp) { - return (_glptr_Uniform4iv) (GET_by_offset(disp, _gloffset_Uniform4iv)); -} - -static inline void SET_Uniform4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_Uniform4iv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix2fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix2fv(disp, parameters) \ - (* GET_UniformMatrix2fv(disp)) parameters -static inline _glptr_UniformMatrix2fv GET_UniformMatrix2fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix2fv) (GET_by_offset(disp, _gloffset_UniformMatrix2fv)); -} - -static inline void SET_UniformMatrix2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix2fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix3fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix3fv(disp, parameters) \ - (* GET_UniformMatrix3fv(disp)) parameters -static inline _glptr_UniformMatrix3fv GET_UniformMatrix3fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix3fv) (GET_by_offset(disp, _gloffset_UniformMatrix3fv)); -} - -static inline void SET_UniformMatrix3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix3fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix4fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix4fv(disp, parameters) \ - (* GET_UniformMatrix4fv(disp)) parameters -static inline _glptr_UniformMatrix4fv GET_UniformMatrix4fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix4fv) (GET_by_offset(disp, _gloffset_UniformMatrix4fv)); -} - -static inline void SET_UniformMatrix4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix4fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UseProgram)(GLuint); -#define CALL_UseProgram(disp, parameters) \ - (* GET_UseProgram(disp)) parameters -static inline _glptr_UseProgram GET_UseProgram(struct _glapi_table *disp) { - return (_glptr_UseProgram) (GET_by_offset(disp, _gloffset_UseProgram)); -} - -static inline void SET_UseProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_UseProgram, fn); -} - -typedef void (GLAPIENTRYP _glptr_ValidateProgram)(GLuint); -#define CALL_ValidateProgram(disp, parameters) \ - (* GET_ValidateProgram(disp)) parameters -static inline _glptr_ValidateProgram GET_ValidateProgram(struct _glapi_table *disp) { - return (_glptr_ValidateProgram) (GET_by_offset(disp, _gloffset_ValidateProgram)); -} - -static inline void SET_ValidateProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_ValidateProgram, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindAttribLocation)(GLuint, GLuint, const GLchar *); -#define CALL_BindAttribLocation(disp, parameters) \ - (* GET_BindAttribLocation(disp)) parameters -static inline _glptr_BindAttribLocation GET_BindAttribLocation(struct _glapi_table *disp) { - return (_glptr_BindAttribLocation) (GET_by_offset(disp, _gloffset_BindAttribLocation)); -} - -static inline void SET_BindAttribLocation(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, const GLchar *)) { - SET_by_offset(disp, _gloffset_BindAttribLocation, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetActiveAttrib)(GLuint, GLuint, GLsizei , GLsizei *, GLint *, GLenum *, GLchar *); -#define CALL_GetActiveAttrib(disp, parameters) \ - (* GET_GetActiveAttrib(disp)) parameters -static inline _glptr_GetActiveAttrib GET_GetActiveAttrib(struct _glapi_table *disp) { - return (_glptr_GetActiveAttrib) (GET_by_offset(disp, _gloffset_GetActiveAttrib)); -} - -static inline void SET_GetActiveAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLsizei , GLsizei *, GLint *, GLenum *, GLchar *)) { - SET_by_offset(disp, _gloffset_GetActiveAttrib, fn); -} - -typedef GLint (GLAPIENTRYP _glptr_GetAttribLocation)(GLuint, const GLchar *); -#define CALL_GetAttribLocation(disp, parameters) \ - (* GET_GetAttribLocation(disp)) parameters -static inline _glptr_GetAttribLocation GET_GetAttribLocation(struct _glapi_table *disp) { - return (_glptr_GetAttribLocation) (GET_by_offset(disp, _gloffset_GetAttribLocation)); -} - -static inline void SET_GetAttribLocation(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLuint, const GLchar *)) { - SET_by_offset(disp, _gloffset_GetAttribLocation, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawBuffersNV)(GLsizei, const GLenum *); -#define CALL_DrawBuffersNV(disp, parameters) \ - (* GET_DrawBuffersNV(disp)) parameters -static inline _glptr_DrawBuffersNV GET_DrawBuffersNV(struct _glapi_table *disp) { - return (_glptr_DrawBuffersNV) (GET_by_offset(disp, _gloffset_DrawBuffersNV)); -} - -static inline void SET_DrawBuffersNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLenum *)) { - SET_by_offset(disp, _gloffset_DrawBuffersNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearDepthf)(GLclampf); -#define CALL_ClearDepthf(disp, parameters) \ - (* GET_ClearDepthf(disp)) parameters -static inline _glptr_ClearDepthf GET_ClearDepthf(struct _glapi_table *disp) { - return (_glptr_ClearDepthf) (GET_by_offset(disp, _gloffset_ClearDepthf)); -} - -static inline void SET_ClearDepthf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf)) { - SET_by_offset(disp, _gloffset_ClearDepthf, fn); -} - -typedef void (GLAPIENTRYP _glptr_DepthRangef)(GLclampf, GLclampf); -#define CALL_DepthRangef(disp, parameters) \ - (* GET_DepthRangef(disp)) parameters -static inline _glptr_DepthRangef GET_DepthRangef(struct _glapi_table *disp) { - return (_glptr_DepthRangef) (GET_by_offset(disp, _gloffset_DepthRangef)); -} - -static inline void SET_DepthRangef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf)) { - SET_by_offset(disp, _gloffset_DepthRangef, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetShaderPrecisionFormat)(GLenum, GLenum, GLint *, GLint *); -#define CALL_GetShaderPrecisionFormat(disp, parameters) \ - (* GET_GetShaderPrecisionFormat(disp)) parameters -static inline _glptr_GetShaderPrecisionFormat GET_GetShaderPrecisionFormat(struct _glapi_table *disp) { - return (_glptr_GetShaderPrecisionFormat) (GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat)); -} - -static inline void SET_GetShaderPrecisionFormat(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *, GLint *)) { - SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn); -} - -typedef void (GLAPIENTRYP _glptr_ReleaseShaderCompiler)(void); -#define CALL_ReleaseShaderCompiler(disp, parameters) \ - (* GET_ReleaseShaderCompiler(disp)) parameters -static inline _glptr_ReleaseShaderCompiler GET_ReleaseShaderCompiler(struct _glapi_table *disp) { - return (_glptr_ReleaseShaderCompiler) (GET_by_offset(disp, _gloffset_ReleaseShaderCompiler)); -} - -static inline void SET_ReleaseShaderCompiler(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn); -} - -typedef void (GLAPIENTRYP _glptr_ShaderBinary)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei); -#define CALL_ShaderBinary(disp, parameters) \ - (* GET_ShaderBinary(disp)) parameters -static inline _glptr_ShaderBinary GET_ShaderBinary(struct _glapi_table *disp) { - return (_glptr_ShaderBinary) (GET_by_offset(disp, _gloffset_ShaderBinary)); -} - -static inline void SET_ShaderBinary(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)) { - SET_by_offset(disp, _gloffset_ShaderBinary, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramBinaryOES)(GLuint, GLsizei, GLsizei *, GLenum *, GLvoid *); -#define CALL_GetProgramBinaryOES(disp, parameters) \ - (* GET_GetProgramBinaryOES(disp)) parameters -static inline _glptr_GetProgramBinaryOES GET_GetProgramBinaryOES(struct _glapi_table *disp) { - return (_glptr_GetProgramBinaryOES) (GET_by_offset(disp, _gloffset_GetProgramBinaryOES)); -} - -static inline void SET_GetProgramBinaryOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLenum *, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetProgramBinaryOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramBinaryOES)(GLuint, GLenum, const GLvoid *, GLint); -#define CALL_ProgramBinaryOES(disp, parameters) \ - (* GET_ProgramBinaryOES(disp)) parameters -static inline _glptr_ProgramBinaryOES GET_ProgramBinaryOES(struct _glapi_table *disp) { - return (_glptr_ProgramBinaryOES) (GET_by_offset(disp, _gloffset_ProgramBinaryOES)); -} - -static inline void SET_ProgramBinaryOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLvoid *, GLint)) { - SET_by_offset(disp, _gloffset_ProgramBinaryOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiDrawArraysEXT)(GLenum, const GLint *, const GLsizei *, GLsizei); -#define CALL_MultiDrawArraysEXT(disp, parameters) \ - (* GET_MultiDrawArraysEXT(disp)) parameters -static inline _glptr_MultiDrawArraysEXT GET_MultiDrawArraysEXT(struct _glapi_table *disp) { - return (_glptr_MultiDrawArraysEXT) (GET_by_offset(disp, _gloffset_MultiDrawArraysEXT)); -} - -static inline void SET_MultiDrawArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *, const GLsizei *, GLsizei)) { - SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiDrawElementsEXT)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei); -#define CALL_MultiDrawElementsEXT(disp, parameters) \ - (* GET_MultiDrawElementsEXT(disp)) parameters -static inline _glptr_MultiDrawElementsEXT GET_MultiDrawElementsEXT(struct _glapi_table *disp) { - return (_glptr_MultiDrawElementsEXT) (GET_by_offset(disp, _gloffset_MultiDrawElementsEXT)); -} - -static inline void SET_MultiDrawElementsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)) { - SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendFuncSeparate)(GLenum, GLenum, GLenum, GLenum); -#define CALL_BlendFuncSeparate(disp, parameters) \ - (* GET_BlendFuncSeparate(disp)) parameters -static inline _glptr_BlendFuncSeparate GET_BlendFuncSeparate(struct _glapi_table *disp) { - return (_glptr_BlendFuncSeparate) (GET_by_offset(disp, _gloffset_BlendFuncSeparate)); -} - -static inline void SET_BlendFuncSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendFuncSeparate, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribPointerv)(GLuint, GLenum, GLvoid **); -#define CALL_GetVertexAttribPointerv(disp, parameters) \ - (* GET_GetVertexAttribPointerv(disp)) parameters -static inline _glptr_GetVertexAttribPointerv GET_GetVertexAttribPointerv(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribPointerv) (GET_by_offset(disp, _gloffset_GetVertexAttribPointerv)); -} - -static inline void SET_GetVertexAttribPointerv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLvoid **)) { - SET_by_offset(disp, _gloffset_GetVertexAttribPointerv, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendEquationSeparate)(GLenum, GLenum); -#define CALL_BlendEquationSeparate(disp, parameters) \ - (* GET_BlendEquationSeparate(disp)) parameters -static inline _glptr_BlendEquationSeparate GET_BlendEquationSeparate(struct _glapi_table *disp) { - return (_glptr_BlendEquationSeparate) (GET_by_offset(disp, _gloffset_BlendEquationSeparate)); -} - -static inline void SET_BlendEquationSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendEquationSeparate, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindFramebuffer)(GLenum, GLuint); -#define CALL_BindFramebuffer(disp, parameters) \ - (* GET_BindFramebuffer(disp)) parameters -static inline _glptr_BindFramebuffer GET_BindFramebuffer(struct _glapi_table *disp) { - return (_glptr_BindFramebuffer) (GET_by_offset(disp, _gloffset_BindFramebuffer)); -} - -static inline void SET_BindFramebuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindFramebuffer, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindRenderbuffer)(GLenum, GLuint); -#define CALL_BindRenderbuffer(disp, parameters) \ - (* GET_BindRenderbuffer(disp)) parameters -static inline _glptr_BindRenderbuffer GET_BindRenderbuffer(struct _glapi_table *disp) { - return (_glptr_BindRenderbuffer) (GET_by_offset(disp, _gloffset_BindRenderbuffer)); -} - -static inline void SET_BindRenderbuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindRenderbuffer, fn); -} - -typedef GLenum (GLAPIENTRYP _glptr_CheckFramebufferStatus)(GLenum); -#define CALL_CheckFramebufferStatus(disp, parameters) \ - (* GET_CheckFramebufferStatus(disp)) parameters -static inline _glptr_CheckFramebufferStatus GET_CheckFramebufferStatus(struct _glapi_table *disp) { - return (_glptr_CheckFramebufferStatus) (GET_by_offset(disp, _gloffset_CheckFramebufferStatus)); -} - -static inline void SET_CheckFramebufferStatus(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_CheckFramebufferStatus, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteFramebuffers)(GLsizei, const GLuint *); -#define CALL_DeleteFramebuffers(disp, parameters) \ - (* GET_DeleteFramebuffers(disp)) parameters -static inline _glptr_DeleteFramebuffers GET_DeleteFramebuffers(struct _glapi_table *disp) { - return (_glptr_DeleteFramebuffers) (GET_by_offset(disp, _gloffset_DeleteFramebuffers)); -} - -static inline void SET_DeleteFramebuffers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteFramebuffers, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteRenderbuffers)(GLsizei, const GLuint *); -#define CALL_DeleteRenderbuffers(disp, parameters) \ - (* GET_DeleteRenderbuffers(disp)) parameters -static inline _glptr_DeleteRenderbuffers GET_DeleteRenderbuffers(struct _glapi_table *disp) { - return (_glptr_DeleteRenderbuffers) (GET_by_offset(disp, _gloffset_DeleteRenderbuffers)); -} - -static inline void SET_DeleteRenderbuffers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteRenderbuffers, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferRenderbuffer)(GLenum, GLenum, GLenum, GLuint); -#define CALL_FramebufferRenderbuffer(disp, parameters) \ - (* GET_FramebufferRenderbuffer(disp)) parameters -static inline _glptr_FramebufferRenderbuffer GET_FramebufferRenderbuffer(struct _glapi_table *disp) { - return (_glptr_FramebufferRenderbuffer) (GET_by_offset(disp, _gloffset_FramebufferRenderbuffer)); -} - -static inline void SET_FramebufferRenderbuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_FramebufferRenderbuffer, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTexture2D)(GLenum, GLenum, GLenum, GLuint, GLint); -#define CALL_FramebufferTexture2D(disp, parameters) \ - (* GET_FramebufferTexture2D(disp)) parameters -static inline _glptr_FramebufferTexture2D GET_FramebufferTexture2D(struct _glapi_table *disp) { - return (_glptr_FramebufferTexture2D) (GET_by_offset(disp, _gloffset_FramebufferTexture2D)); -} - -static inline void SET_FramebufferTexture2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTexture2D, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTexture3DOES)(GLenum, GLenum, GLenum, GLuint, GLint, GLint); -#define CALL_FramebufferTexture3DOES(disp, parameters) \ - (* GET_FramebufferTexture3DOES(disp)) parameters -static inline _glptr_FramebufferTexture3DOES GET_FramebufferTexture3DOES(struct _glapi_table *disp) { - return (_glptr_FramebufferTexture3DOES) (GET_by_offset(disp, _gloffset_FramebufferTexture3DOES)); -} - -static inline void SET_FramebufferTexture3DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTexture3DOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenFramebuffers)(GLsizei, GLuint *); -#define CALL_GenFramebuffers(disp, parameters) \ - (* GET_GenFramebuffers(disp)) parameters -static inline _glptr_GenFramebuffers GET_GenFramebuffers(struct _glapi_table *disp) { - return (_glptr_GenFramebuffers) (GET_by_offset(disp, _gloffset_GenFramebuffers)); -} - -static inline void SET_GenFramebuffers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenFramebuffers, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenRenderbuffers)(GLsizei, GLuint *); -#define CALL_GenRenderbuffers(disp, parameters) \ - (* GET_GenRenderbuffers(disp)) parameters -static inline _glptr_GenRenderbuffers GET_GenRenderbuffers(struct _glapi_table *disp) { - return (_glptr_GenRenderbuffers) (GET_by_offset(disp, _gloffset_GenRenderbuffers)); -} - -static inline void SET_GenRenderbuffers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenRenderbuffers, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenerateMipmap)(GLenum); -#define CALL_GenerateMipmap(disp, parameters) \ - (* GET_GenerateMipmap(disp)) parameters -static inline _glptr_GenerateMipmap GET_GenerateMipmap(struct _glapi_table *disp) { - return (_glptr_GenerateMipmap) (GET_by_offset(disp, _gloffset_GenerateMipmap)); -} - -static inline void SET_GenerateMipmap(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_GenerateMipmap, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetFramebufferAttachmentParameteriv)(GLenum, GLenum, GLenum, GLint *); -#define CALL_GetFramebufferAttachmentParameteriv(disp, parameters) \ - (* GET_GetFramebufferAttachmentParameteriv(disp)) parameters -static inline _glptr_GetFramebufferAttachmentParameteriv GET_GetFramebufferAttachmentParameteriv(struct _glapi_table *disp) { - return (_glptr_GetFramebufferAttachmentParameteriv) (GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameteriv)); -} - -static inline void SET_GetFramebufferAttachmentParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameteriv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetRenderbufferParameteriv)(GLenum, GLenum, GLint *); -#define CALL_GetRenderbufferParameteriv(disp, parameters) \ - (* GET_GetRenderbufferParameteriv(disp)) parameters -static inline _glptr_GetRenderbufferParameteriv GET_GetRenderbufferParameteriv(struct _glapi_table *disp) { - return (_glptr_GetRenderbufferParameteriv) (GET_by_offset(disp, _gloffset_GetRenderbufferParameteriv)); -} - -static inline void SET_GetRenderbufferParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetRenderbufferParameteriv, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsFramebuffer)(GLuint); -#define CALL_IsFramebuffer(disp, parameters) \ - (* GET_IsFramebuffer(disp)) parameters -static inline _glptr_IsFramebuffer GET_IsFramebuffer(struct _glapi_table *disp) { - return (_glptr_IsFramebuffer) (GET_by_offset(disp, _gloffset_IsFramebuffer)); -} - -static inline void SET_IsFramebuffer(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsFramebuffer, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsRenderbuffer)(GLuint); -#define CALL_IsRenderbuffer(disp, parameters) \ - (* GET_IsRenderbuffer(disp)) parameters -static inline _glptr_IsRenderbuffer GET_IsRenderbuffer(struct _glapi_table *disp) { - return (_glptr_IsRenderbuffer) (GET_by_offset(disp, _gloffset_IsRenderbuffer)); -} - -static inline void SET_IsRenderbuffer(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsRenderbuffer, fn); -} - -typedef void (GLAPIENTRYP _glptr_RenderbufferStorage)(GLenum, GLenum, GLsizei, GLsizei); -#define CALL_RenderbufferStorage(disp, parameters) \ - (* GET_RenderbufferStorage(disp)) parameters -static inline _glptr_RenderbufferStorage GET_RenderbufferStorage(struct _glapi_table *disp) { - return (_glptr_RenderbufferStorage) (GET_by_offset(disp, _gloffset_RenderbufferStorage)); -} - -static inline void SET_RenderbufferStorage(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_RenderbufferStorage, fn); -} - -typedef void (GLAPIENTRYP _glptr_EGLImageTargetRenderbufferStorageOES)(GLenum, GLvoid *); -#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) \ - (* GET_EGLImageTargetRenderbufferStorageOES(disp)) parameters -static inline _glptr_EGLImageTargetRenderbufferStorageOES GET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp) { - return (_glptr_EGLImageTargetRenderbufferStorageOES) (GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES)); -} - -static inline void SET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_EGLImageTargetTexture2DOES)(GLenum, GLvoid *); -#define CALL_EGLImageTargetTexture2DOES(disp, parameters) \ - (* GET_EGLImageTargetTexture2DOES(disp)) parameters -static inline _glptr_EGLImageTargetTexture2DOES GET_EGLImageTargetTexture2DOES(struct _glapi_table *disp) { - return (_glptr_EGLImageTargetTexture2DOES) (GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES)); -} - -static inline void SET_EGLImageTargetTexture2DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn); -} - - -#endif /* !defined( _DISPATCH_H_ ) */ diff -Nru mesa-8.0.2/src/mesa/main/api_exec_es2_remap_helper.h mesa-8.0.3/src/mesa/main/api_exec_es2_remap_helper.h --- mesa-8.0.2/src/mesa/main/api_exec_es2_remap_helper.h 2012-03-21 17:17:32.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/api_exec_es2_remap_helper.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,788 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by remap_helper.py (from Mesa) script */ - -/* - * Copyright (C) 2009 Chia-I Wu - * 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 - * 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 - * Chia-I Wu, - * AND/OR THEIR 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. - */ - -#include "main/dispatch.h" -#include "main/remap.h" - -/* this is internal to remap.c */ -#ifndef need_MESA_remap_table -#error Only remap.c should include this file! -#endif /* need_MESA_remap_table */ - - -static const char _mesa_function_pool[] = - /* _mesa_function_pool[0]: GetTexParameteriv (offset 283) */ - "iip\0" - "glGetTexParameteriv\0" - "\0" - /* _mesa_function_pool[25]: MapBufferOES (will be remapped) */ - "ii\0" - "glMapBufferOES\0" - "\0" - /* _mesa_function_pool[44]: DeleteShader (will be remapped) */ - "i\0" - "glDeleteShader\0" - "\0" - /* _mesa_function_pool[62]: VertexAttrib2f (will be remapped) */ - "iff\0" - "glVertexAttrib2f\0" - "\0" - /* _mesa_function_pool[84]: Uniform2f (will be remapped) */ - "iff\0" - "glUniform2f\0" - "\0" - /* _mesa_function_pool[101]: CompileShader (will be remapped) */ - "i\0" - "glCompileShader\0" - "\0" - /* _mesa_function_pool[120]: GetProgramiv (will be remapped) */ - "iip\0" - "glGetProgramiv\0" - "\0" - /* _mesa_function_pool[140]: LineWidth (offset 168) */ - "f\0" - "glLineWidth\0" - "\0" - /* _mesa_function_pool[155]: GetBufferPointervOES (will be remapped) */ - "iip\0" - "glGetBufferPointervOES\0" - "\0" - /* _mesa_function_pool[183]: Uniform2i (will be remapped) */ - "iii\0" - "glUniform2i\0" - "\0" - /* _mesa_function_pool[200]: Finish (offset 216) */ - "\0" - "glFinish\0" - "\0" - /* _mesa_function_pool[211]: ClearStencil (offset 207) */ - "i\0" - "glClearStencil\0" - "\0" - /* _mesa_function_pool[229]: Uniform1fv (will be remapped) */ - "iip\0" - "glUniform1fv\0" - "\0" - /* _mesa_function_pool[247]: GenBuffers (will be remapped) */ - "ip\0" - "glGenBuffers\0" - "\0" - /* _mesa_function_pool[264]: GetProgramInfoLog (will be remapped) */ - "iipp\0" - "glGetProgramInfoLog\0" - "\0" - /* _mesa_function_pool[290]: Uniform2fv (will be remapped) */ - "iip\0" - "glUniform2fv\0" - "\0" - /* _mesa_function_pool[308]: EnableVertexAttribArray (will be remapped) */ - "i\0" - "glEnableVertexAttribArray\0" - "\0" - /* _mesa_function_pool[337]: GetAttachedShaders (will be remapped) */ - "iipp\0" - "glGetAttachedShaders\0" - "\0" - /* _mesa_function_pool[364]: TexImage3DOES (offset 371) */ - "iiiiiiiiip\0" - "glTexImage3DOES\0" - "\0" - /* _mesa_function_pool[392]: VertexAttrib4fv (will be remapped) */ - "ip\0" - "glVertexAttrib4fv\0" - "\0" - /* _mesa_function_pool[414]: IsEnabled (offset 286) */ - "i\0" - "glIsEnabled\0" - "\0" - /* _mesa_function_pool[429]: LinkProgram (will be remapped) */ - "i\0" - "glLinkProgram\0" - "\0" - /* _mesa_function_pool[446]: DeleteProgram (will be remapped) */ - "i\0" - "glDeleteProgram\0" - "\0" - /* _mesa_function_pool[465]: CompressedTexSubImage3DOES (will be remapped) */ - "iiiiiiiiiip\0" - "glCompressedTexSubImage3DOES\0" - "\0" - /* _mesa_function_pool[507]: Uniform1f (will be remapped) */ - "if\0" - "glUniform1f\0" - "\0" - /* _mesa_function_pool[523]: DetachShader (will be remapped) */ - "ii\0" - "glDetachShader\0" - "\0" - /* _mesa_function_pool[542]: Uniform1i (will be remapped) */ - "ii\0" - "glUniform1i\0" - "\0" - /* _mesa_function_pool[558]: CopyTexSubImage2D (offset 326) */ - "iiiiiiii\0" - "glCopyTexSubImage2D\0" - "\0" - /* _mesa_function_pool[588]: SampleCoverage (will be remapped) */ - "fi\0" - "glSampleCoverage\0" - "\0" - /* _mesa_function_pool[609]: VertexAttrib4f (will be remapped) */ - "iffff\0" - "glVertexAttrib4f\0" - "\0" - /* _mesa_function_pool[633]: DrawElements (offset 311) */ - "iiip\0" - "glDrawElements\0" - "\0" - /* _mesa_function_pool[654]: GetShaderiv (will be remapped) */ - "iip\0" - "glGetShaderiv\0" - "\0" - /* _mesa_function_pool[673]: BindFramebuffer (will be remapped) */ - "ii\0" - "glBindFramebuffer\0" - "\0" - /* _mesa_function_pool[695]: Uniform4iv (will be remapped) */ - "iip\0" - "glUniform4iv\0" - "\0" - /* _mesa_function_pool[713]: ReleaseShaderCompiler (will be remapped) */ - "\0" - "glReleaseShaderCompiler\0" - "\0" - /* _mesa_function_pool[739]: BlendEquation (offset 337) */ - "i\0" - "glBlendEquation\0" - "\0" - /* _mesa_function_pool[758]: StencilFuncSeparate (will be remapped) */ - "iiii\0" - "glStencilFuncSeparate\0" - "\0" - /* _mesa_function_pool[786]: ShaderSource (will be remapped) */ - "iipp\0" - "glShaderSource\0" - "\0" - /* _mesa_function_pool[807]: Uniform2iv (will be remapped) */ - "iip\0" - "glUniform2iv\0" - "\0" - /* _mesa_function_pool[825]: BindRenderbuffer (will be remapped) */ - "ii\0" - "glBindRenderbuffer\0" - "\0" - /* _mesa_function_pool[848]: UseProgram (will be remapped) */ - "i\0" - "glUseProgram\0" - "\0" - /* _mesa_function_pool[864]: CreateShader (will be remapped) */ - "i\0" - "glCreateShader\0" - "\0" - /* _mesa_function_pool[882]: GetVertexAttribfv (will be remapped) */ - "iip\0" - "glGetVertexAttribfv\0" - "\0" - /* _mesa_function_pool[907]: DeleteFramebuffers (will be remapped) */ - "ip\0" - "glDeleteFramebuffers\0" - "\0" - /* _mesa_function_pool[932]: BufferData (will be remapped) */ - "iipi\0" - "glBufferData\0" - "\0" - /* _mesa_function_pool[951]: RenderbufferStorage (will be remapped) */ - "iiii\0" - "glRenderbufferStorage\0" - "\0" - /* _mesa_function_pool[979]: BindTexture (offset 307) */ - "ii\0" - "glBindTexture\0" - "\0" - /* _mesa_function_pool[997]: FramebufferRenderbuffer (will be remapped) */ - "iiii\0" - "glFramebufferRenderbuffer\0" - "\0" - /* _mesa_function_pool[1029]: ClearColor (offset 206) */ - "ffff\0" - "glClearColor\0" - "\0" - /* _mesa_function_pool[1048]: TexSubImage2D (offset 333) */ - "iiiiiiiip\0" - "glTexSubImage2D\0" - "\0" - /* _mesa_function_pool[1075]: Uniform3i (will be remapped) */ - "iiii\0" - "glUniform3i\0" - "\0" - /* _mesa_function_pool[1093]: Enable (offset 215) */ - "i\0" - "glEnable\0" - "\0" - /* _mesa_function_pool[1105]: BlendColor (offset 336) */ - "ffff\0" - "glBlendColor\0" - "\0" - /* _mesa_function_pool[1124]: UniformMatrix3fv (will be remapped) */ - "iiip\0" - "glUniformMatrix3fv\0" - "\0" - /* _mesa_function_pool[1149]: GetVertexAttribiv (will be remapped) */ - "iip\0" - "glGetVertexAttribiv\0" - "\0" - /* _mesa_function_pool[1174]: ShaderBinary (will be remapped) */ - "ipipi\0" - "glShaderBinary\0" - "\0" - /* _mesa_function_pool[1196]: Uniform3f (will be remapped) */ - "ifff\0" - "glUniform3f\0" - "\0" - /* _mesa_function_pool[1214]: IsBuffer (will be remapped) */ - "i\0" - "glIsBuffer\0" - "\0" - /* _mesa_function_pool[1228]: GetUniformLocation (will be remapped) */ - "ip\0" - "glGetUniformLocation\0" - "\0" - /* _mesa_function_pool[1253]: PixelStorei (offset 250) */ - "ii\0" - "glPixelStorei\0" - "\0" - /* _mesa_function_pool[1271]: Viewport (offset 305) */ - "iiii\0" - "glViewport\0" - "\0" - /* _mesa_function_pool[1288]: BlendFuncSeparate (will be remapped) */ - "iiii\0" - "glBlendFuncSeparate\0" - "\0" - /* _mesa_function_pool[1314]: TexSubImage3DOES (offset 372) */ - "iiiiiiiiiip\0" - "glTexSubImage3DOES\0" - "\0" - /* _mesa_function_pool[1346]: GetError (offset 261) */ - "\0" - "glGetError\0" - "\0" - /* _mesa_function_pool[1359]: DrawArrays (offset 310) */ - "iii\0" - "glDrawArrays\0" - "\0" - /* _mesa_function_pool[1377]: VertexAttrib3f (will be remapped) */ - "ifff\0" - "glVertexAttrib3f\0" - "\0" - /* _mesa_function_pool[1400]: DeleteRenderbuffers (will be remapped) */ - "ip\0" - "glDeleteRenderbuffers\0" - "\0" - /* _mesa_function_pool[1426]: CompressedTexSubImage2D (will be remapped) */ - "iiiiiiiip\0" - "glCompressedTexSubImage2D\0" - "\0" - /* _mesa_function_pool[1463]: CopyTexSubImage3DOES (offset 373) */ - "iiiiiiiii\0" - "glCopyTexSubImage3DOES\0" - "\0" - /* _mesa_function_pool[1497]: StencilMask (offset 209) */ - "i\0" - "glStencilMask\0" - "\0" - /* _mesa_function_pool[1514]: EGLImageTargetTexture2DOES (will be remapped) */ - "ip\0" - "glEGLImageTargetTexture2DOES\0" - "\0" - /* _mesa_function_pool[1547]: MultiDrawElementsEXT (will be remapped) */ - "ipipi\0" - "glMultiDrawElementsEXT\0" - "\0" - /* _mesa_function_pool[1577]: StencilMaskSeparate (will be remapped) */ - "ii\0" - "glStencilMaskSeparate\0" - "\0" - /* _mesa_function_pool[1603]: CheckFramebufferStatus (will be remapped) */ - "i\0" - "glCheckFramebufferStatus\0" - "\0" - /* _mesa_function_pool[1631]: DepthMask (offset 211) */ - "i\0" - "glDepthMask\0" - "\0" - /* _mesa_function_pool[1646]: IsShader (will be remapped) */ - "i\0" - "glIsShader\0" - "\0" - /* _mesa_function_pool[1660]: StencilOp (offset 244) */ - "iii\0" - "glStencilOp\0" - "\0" - /* _mesa_function_pool[1677]: GetShaderInfoLog (will be remapped) */ - "iipp\0" - "glGetShaderInfoLog\0" - "\0" - /* _mesa_function_pool[1702]: EGLImageTargetRenderbufferStorageOES (will be remapped) */ - "ip\0" - "glEGLImageTargetRenderbufferStorageOES\0" - "\0" - /* _mesa_function_pool[1745]: BindBuffer (will be remapped) */ - "ii\0" - "glBindBuffer\0" - "\0" - /* _mesa_function_pool[1762]: Uniform1iv (will be remapped) */ - "iip\0" - "glUniform1iv\0" - "\0" - /* _mesa_function_pool[1780]: GenFramebuffers (will be remapped) */ - "ip\0" - "glGenFramebuffers\0" - "\0" - /* _mesa_function_pool[1802]: ClearDepthf (will be remapped) */ - "f\0" - "glClearDepthf\0" - "\0" - /* _mesa_function_pool[1819]: FramebufferTexture2D (will be remapped) */ - "iiiii\0" - "glFramebufferTexture2D\0" - "\0" - /* _mesa_function_pool[1849]: IsFramebuffer (will be remapped) */ - "i\0" - "glIsFramebuffer\0" - "\0" - /* _mesa_function_pool[1868]: StencilFunc (offset 243) */ - "iii\0" - "glStencilFunc\0" - "\0" - /* _mesa_function_pool[1887]: CullFace (offset 152) */ - "i\0" - "glCullFace\0" - "\0" - /* _mesa_function_pool[1901]: CompressedTexImage3DOES (will be remapped) */ - "iiiiiiiip\0" - "glCompressedTexImage3DOES\0" - "\0" - /* _mesa_function_pool[1938]: BlendEquationSeparate (will be remapped) */ - "ii\0" - "glBlendEquationSeparate\0" - "\0" - /* _mesa_function_pool[1966]: Uniform4fv (will be remapped) */ - "iip\0" - "glUniform4fv\0" - "\0" - /* _mesa_function_pool[1984]: ActiveTexture (offset 374) */ - "i\0" - "glActiveTexture\0" - "\0" - /* _mesa_function_pool[2003]: IsProgram (will be remapped) */ - "i\0" - "glIsProgram\0" - "\0" - /* _mesa_function_pool[2018]: VertexAttrib1f (will be remapped) */ - "if\0" - "glVertexAttrib1f\0" - "\0" - /* _mesa_function_pool[2039]: Hint (offset 158) */ - "ii\0" - "glHint\0" - "\0" - /* _mesa_function_pool[2050]: GenTextures (offset 328) */ - "ip\0" - "glGenTextures\0" - "\0" - /* _mesa_function_pool[2068]: TexParameterfv (offset 179) */ - "iip\0" - "glTexParameterfv\0" - "\0" - /* _mesa_function_pool[2090]: BindAttribLocation (will be remapped) */ - "iip\0" - "glBindAttribLocation\0" - "\0" - /* _mesa_function_pool[2116]: GetProgramBinaryOES (will be remapped) */ - "iippp\0" - "glGetProgramBinaryOES\0" - "\0" - /* _mesa_function_pool[2145]: VertexAttribPointer (will be remapped) */ - "iiiiip\0" - "glVertexAttribPointer\0" - "\0" - /* _mesa_function_pool[2175]: GetAttribLocation (will be remapped) */ - "ip\0" - "glGetAttribLocation\0" - "\0" - /* _mesa_function_pool[2199]: ReadPixels (offset 256) */ - "iiiiiip\0" - "glReadPixels\0" - "\0" - /* _mesa_function_pool[2221]: GetFloatv (offset 262) */ - "ip\0" - "glGetFloatv\0" - "\0" - /* _mesa_function_pool[2237]: BlendFunc (offset 241) */ - "ii\0" - "glBlendFunc\0" - "\0" - /* _mesa_function_pool[2253]: Uniform4i (will be remapped) */ - "iiiii\0" - "glUniform4i\0" - "\0" - /* _mesa_function_pool[2272]: FramebufferTexture3DOES (will be remapped) */ - "iiiiii\0" - "glFramebufferTexture3DOES\0" - "\0" - /* _mesa_function_pool[2306]: Uniform4f (will be remapped) */ - "iffff\0" - "glUniform4f\0" - "\0" - /* _mesa_function_pool[2325]: GetShaderPrecisionFormat (will be remapped) */ - "iipp\0" - "glGetShaderPrecisionFormat\0" - "\0" - /* _mesa_function_pool[2358]: IsRenderbuffer (will be remapped) */ - "i\0" - "glIsRenderbuffer\0" - "\0" - /* _mesa_function_pool[2378]: Flush (offset 217) */ - "\0" - "glFlush\0" - "\0" - /* _mesa_function_pool[2388]: UnmapBufferOES (will be remapped) */ - "i\0" - "glUnmapBufferOES\0" - "\0" - /* _mesa_function_pool[2408]: GetIntegerv (offset 263) */ - "ip\0" - "glGetIntegerv\0" - "\0" - /* _mesa_function_pool[2426]: GetUniformfv (will be remapped) */ - "iip\0" - "glGetUniformfv\0" - "\0" - /* _mesa_function_pool[2446]: Disable (offset 214) */ - "i\0" - "glDisable\0" - "\0" - /* _mesa_function_pool[2459]: GetShaderSource (will be remapped) */ - "iipp\0" - "glGetShaderSource\0" - "\0" - /* _mesa_function_pool[2483]: DrawBuffersNV (will be remapped) */ - "ip\0" - "glDrawBuffersNV\0" - "\0" - /* _mesa_function_pool[2503]: Uniform3iv (will be remapped) */ - "iip\0" - "glUniform3iv\0" - "\0" - /* _mesa_function_pool[2521]: GetBooleanv (offset 258) */ - "ip\0" - "glGetBooleanv\0" - "\0" - /* _mesa_function_pool[2539]: TexParameteriv (offset 181) */ - "iip\0" - "glTexParameteriv\0" - "\0" - /* _mesa_function_pool[2561]: DisableVertexAttribArray (will be remapped) */ - "i\0" - "glDisableVertexAttribArray\0" - "\0" - /* _mesa_function_pool[2591]: GetActiveUniform (will be remapped) */ - "iiipppp\0" - "glGetActiveUniform\0" - "\0" - /* _mesa_function_pool[2619]: DeleteBuffers (will be remapped) */ - "ip\0" - "glDeleteBuffers\0" - "\0" - /* _mesa_function_pool[2639]: IsTexture (offset 330) */ - "i\0" - "glIsTexture\0" - "\0" - /* _mesa_function_pool[2654]: TexParameterf (offset 178) */ - "iif\0" - "glTexParameterf\0" - "\0" - /* _mesa_function_pool[2675]: TexParameteri (offset 180) */ - "iii\0" - "glTexParameteri\0" - "\0" - /* _mesa_function_pool[2696]: BufferSubData (will be remapped) */ - "iiip\0" - "glBufferSubData\0" - "\0" - /* _mesa_function_pool[2718]: VertexAttrib2fv (will be remapped) */ - "ip\0" - "glVertexAttrib2fv\0" - "\0" - /* _mesa_function_pool[2740]: GetString (offset 275) */ - "i\0" - "glGetString\0" - "\0" - /* _mesa_function_pool[2755]: TexImage2D (offset 183) */ - "iiiiiiiip\0" - "glTexImage2D\0" - "\0" - /* _mesa_function_pool[2779]: UniformMatrix2fv (will be remapped) */ - "iiip\0" - "glUniformMatrix2fv\0" - "\0" - /* _mesa_function_pool[2804]: GetTexParameterfv (offset 282) */ - "iip\0" - "glGetTexParameterfv\0" - "\0" - /* _mesa_function_pool[2829]: VertexAttrib3fv (will be remapped) */ - "ip\0" - "glVertexAttrib3fv\0" - "\0" - /* _mesa_function_pool[2851]: GetUniformiv (will be remapped) */ - "iip\0" - "glGetUniformiv\0" - "\0" - /* _mesa_function_pool[2871]: FrontFace (offset 157) */ - "i\0" - "glFrontFace\0" - "\0" - /* _mesa_function_pool[2886]: DeleteTextures (offset 327) */ - "ip\0" - "glDeleteTextures\0" - "\0" - /* _mesa_function_pool[2907]: CreateProgram (will be remapped) */ - "\0" - "glCreateProgram\0" - "\0" - /* _mesa_function_pool[2925]: DepthRangef (will be remapped) */ - "ff\0" - "glDepthRangef\0" - "\0" - /* _mesa_function_pool[2943]: ColorMask (offset 210) */ - "iiii\0" - "glColorMask\0" - "\0" - /* _mesa_function_pool[2961]: Uniform3fv (will be remapped) */ - "iip\0" - "glUniform3fv\0" - "\0" - /* _mesa_function_pool[2979]: Clear (offset 203) */ - "i\0" - "glClear\0" - "\0" - /* _mesa_function_pool[2990]: ValidateProgram (will be remapped) */ - "i\0" - "glValidateProgram\0" - "\0" - /* _mesa_function_pool[3011]: Scissor (offset 176) */ - "iiii\0" - "glScissor\0" - "\0" - /* _mesa_function_pool[3027]: GetRenderbufferParameteriv (will be remapped) */ - "iip\0" - "glGetRenderbufferParameteriv\0" - "\0" - /* _mesa_function_pool[3061]: PolygonOffset (offset 319) */ - "ff\0" - "glPolygonOffset\0" - "\0" - /* _mesa_function_pool[3081]: GetFramebufferAttachmentParameteriv (will be remapped) */ - "iiip\0" - "glGetFramebufferAttachmentParameteriv\0" - "\0" - /* _mesa_function_pool[3125]: GetBufferParameteriv (will be remapped) */ - "iip\0" - "glGetBufferParameteriv\0" - "\0" - /* _mesa_function_pool[3153]: GenRenderbuffers (will be remapped) */ - "ip\0" - "glGenRenderbuffers\0" - "\0" - /* _mesa_function_pool[3176]: UniformMatrix4fv (will be remapped) */ - "iiip\0" - "glUniformMatrix4fv\0" - "\0" - /* _mesa_function_pool[3201]: GetActiveAttrib (will be remapped) */ - "iiipppp\0" - "glGetActiveAttrib\0" - "\0" - /* _mesa_function_pool[3228]: GenerateMipmap (will be remapped) */ - "i\0" - "glGenerateMipmap\0" - "\0" - /* _mesa_function_pool[3248]: DepthFunc (offset 245) */ - "i\0" - "glDepthFunc\0" - "\0" - /* _mesa_function_pool[3263]: ProgramBinaryOES (will be remapped) */ - "iipi\0" - "glProgramBinaryOES\0" - "\0" - /* _mesa_function_pool[3288]: VertexAttrib1fv (will be remapped) */ - "ip\0" - "glVertexAttrib1fv\0" - "\0" - /* _mesa_function_pool[3310]: CompressedTexImage2D (will be remapped) */ - "iiiiiiip\0" - "glCompressedTexImage2D\0" - "\0" - /* _mesa_function_pool[3343]: CopyTexImage2D (offset 324) */ - "iiiiiiii\0" - "glCopyTexImage2D\0" - "\0" - /* _mesa_function_pool[3370]: AttachShader (will be remapped) */ - "ii\0" - "glAttachShader\0" - "\0" - /* _mesa_function_pool[3389]: MultiDrawArraysEXT (will be remapped) */ - "ippi\0" - "glMultiDrawArraysEXT\0" - "\0" - /* _mesa_function_pool[3416]: StencilOpSeparate (will be remapped) */ - "iiii\0" - "glStencilOpSeparate\0" - "\0" - /* _mesa_function_pool[3442]: GetVertexAttribPointerv (will be remapped) */ - "iip\0" - "glGetVertexAttribPointerv\0" - "\0" - ; - -/* these functions need to be remapped */ -static const struct gl_function_pool_remap MESA_remap_table_functions[] = { - { 3370, AttachShader_remap_index }, - { 2907, CreateProgram_remap_index }, - { 864, CreateShader_remap_index }, - { 446, DeleteProgram_remap_index }, - { 44, DeleteShader_remap_index }, - { 523, DetachShader_remap_index }, - { 337, GetAttachedShaders_remap_index }, - { 264, GetProgramInfoLog_remap_index }, - { 120, GetProgramiv_remap_index }, - { 1677, GetShaderInfoLog_remap_index }, - { 654, GetShaderiv_remap_index }, - { 2003, IsProgram_remap_index }, - { 1646, IsShader_remap_index }, - { 758, StencilFuncSeparate_remap_index }, - { 1577, StencilMaskSeparate_remap_index }, - { 3416, StencilOpSeparate_remap_index }, - { 588, SampleCoverage_remap_index }, - { 3310, CompressedTexImage2D_remap_index }, - { 1901, CompressedTexImage3DOES_remap_index }, - { 1426, CompressedTexSubImage2D_remap_index }, - { 465, CompressedTexSubImage3DOES_remap_index }, - { 2561, DisableVertexAttribArray_remap_index }, - { 308, EnableVertexAttribArray_remap_index }, - { 882, GetVertexAttribfv_remap_index }, - { 1149, GetVertexAttribiv_remap_index }, - { 2018, VertexAttrib1f_remap_index }, - { 3288, VertexAttrib1fv_remap_index }, - { 62, VertexAttrib2f_remap_index }, - { 2718, VertexAttrib2fv_remap_index }, - { 1377, VertexAttrib3f_remap_index }, - { 2829, VertexAttrib3fv_remap_index }, - { 609, VertexAttrib4f_remap_index }, - { 392, VertexAttrib4fv_remap_index }, - { 2145, VertexAttribPointer_remap_index }, - { 1745, BindBuffer_remap_index }, - { 932, BufferData_remap_index }, - { 2696, BufferSubData_remap_index }, - { 2619, DeleteBuffers_remap_index }, - { 247, GenBuffers_remap_index }, - { 3125, GetBufferParameteriv_remap_index }, - { 155, GetBufferPointervOES_remap_index }, - { 1214, IsBuffer_remap_index }, - { 25, MapBufferOES_remap_index }, - { 2388, UnmapBufferOES_remap_index }, - { 101, CompileShader_remap_index }, - { 2591, GetActiveUniform_remap_index }, - { 2459, GetShaderSource_remap_index }, - { 1228, GetUniformLocation_remap_index }, - { 2426, GetUniformfv_remap_index }, - { 2851, GetUniformiv_remap_index }, - { 429, LinkProgram_remap_index }, - { 786, ShaderSource_remap_index }, - { 507, Uniform1f_remap_index }, - { 229, Uniform1fv_remap_index }, - { 542, Uniform1i_remap_index }, - { 1762, Uniform1iv_remap_index }, - { 84, Uniform2f_remap_index }, - { 290, Uniform2fv_remap_index }, - { 183, Uniform2i_remap_index }, - { 807, Uniform2iv_remap_index }, - { 1196, Uniform3f_remap_index }, - { 2961, Uniform3fv_remap_index }, - { 1075, Uniform3i_remap_index }, - { 2503, Uniform3iv_remap_index }, - { 2306, Uniform4f_remap_index }, - { 1966, Uniform4fv_remap_index }, - { 2253, Uniform4i_remap_index }, - { 695, Uniform4iv_remap_index }, - { 2779, UniformMatrix2fv_remap_index }, - { 1124, UniformMatrix3fv_remap_index }, - { 3176, UniformMatrix4fv_remap_index }, - { 848, UseProgram_remap_index }, - { 2990, ValidateProgram_remap_index }, - { 2090, BindAttribLocation_remap_index }, - { 3201, GetActiveAttrib_remap_index }, - { 2175, GetAttribLocation_remap_index }, - { 2483, DrawBuffersNV_remap_index }, - { 1802, ClearDepthf_remap_index }, - { 2925, DepthRangef_remap_index }, - { 2325, GetShaderPrecisionFormat_remap_index }, - { 713, ReleaseShaderCompiler_remap_index }, - { 1174, ShaderBinary_remap_index }, - { 2116, GetProgramBinaryOES_remap_index }, - { 3263, ProgramBinaryOES_remap_index }, - { 3389, MultiDrawArraysEXT_remap_index }, - { 1547, MultiDrawElementsEXT_remap_index }, - { 1288, BlendFuncSeparate_remap_index }, - { 3442, GetVertexAttribPointerv_remap_index }, - { 1938, BlendEquationSeparate_remap_index }, - { 673, BindFramebuffer_remap_index }, - { 825, BindRenderbuffer_remap_index }, - { 1603, CheckFramebufferStatus_remap_index }, - { 907, DeleteFramebuffers_remap_index }, - { 1400, DeleteRenderbuffers_remap_index }, - { 997, FramebufferRenderbuffer_remap_index }, - { 1819, FramebufferTexture2D_remap_index }, - { 2272, FramebufferTexture3DOES_remap_index }, - { 1780, GenFramebuffers_remap_index }, - { 3153, GenRenderbuffers_remap_index }, - { 3228, GenerateMipmap_remap_index }, - { 3081, GetFramebufferAttachmentParameteriv_remap_index }, - { 3027, GetRenderbufferParameteriv_remap_index }, - { 1849, IsFramebuffer_remap_index }, - { 2358, IsRenderbuffer_remap_index }, - { 951, RenderbufferStorage_remap_index }, - { 1702, EGLImageTargetRenderbufferStorageOES_remap_index }, - { 1514, EGLImageTargetTexture2DOES_remap_index }, - { -1, -1 } -}; - -/* these functions are in the ABI, but have alternative names */ -static const struct gl_function_remap MESA_alt_functions[] = { - { -1, -1 } -}; - diff -Nru mesa-8.0.2/src/mesa/main/api_validate.c mesa-8.0.3/src/mesa/main/api_validate.c --- mesa-8.0.2/src/mesa/main/api_validate.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/api_validate.c 2012-05-18 06:06:13.000000000 +0000 @@ -187,7 +187,7 @@ vbo_get_minmax_index(ctx, &prim, &ib, &min, &max); if ((int)(min + basevertex) < 0 || - max + basevertex > ctx->Array.ArrayObj->_MaxElement) { + max + basevertex >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDrawElements() index=%u is out of bounds (max=%u)", max, ctx->Array.ArrayObj->_MaxElement); @@ -383,6 +383,12 @@ return GL_FALSE; } + if (first < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glDrawArraysInstanced(start=%d)", first); + return GL_FALSE; + } + if (!_mesa_valid_prim_mode(ctx, mode)) { _mesa_error(ctx, GL_INVALID_ENUM, "glDrawArraysInstanced(mode=0x%x)", mode); @@ -399,12 +405,6 @@ if (!check_valid_to_render(ctx, "glDrawArraysInstanced(invalid to render)")) return GL_FALSE; - if (ctx->CompileFlag) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawArraysInstanced(display list"); - return GL_FALSE; - } - if (ctx->Const.CheckArrayBounds) { if (first + count > (GLint) ctx->Array.ArrayObj->_MaxElement) return GL_FALSE; diff -Nru mesa-8.0.2/src/mesa/main/attrib.c mesa-8.0.3/src/mesa/main/attrib.c --- mesa-8.0.2/src/mesa/main/attrib.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/attrib.c 2012-05-18 04:28:20.000000000 +0000 @@ -122,7 +122,6 @@ GLboolean SampleAlphaToCoverage; /* GL_ARB_multisample */ GLboolean SampleAlphaToOne; /* GL_ARB_multisample */ GLboolean SampleCoverage; /* GL_ARB_multisample */ - GLboolean SampleCoverageInvert; /* GL_ARB_multisample */ GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */ GLbitfield Texture[MAX_TEXTURE_UNITS]; @@ -314,7 +313,6 @@ attr->SampleAlphaToCoverage = ctx->Multisample.SampleAlphaToCoverage; attr->SampleAlphaToOne = ctx->Multisample.SampleAlphaToOne; attr->SampleCoverage = ctx->Multisample.SampleCoverage; - attr->SampleCoverageInvert = ctx->Multisample.SampleCoverageInvert; for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { attr->Texture[i] = ctx->Texture.Unit[i].Enabled; attr->TexGen[i] = ctx->Texture.Unit[i].TexGenEnabled; @@ -608,9 +606,6 @@ TEST_AND_UPDATE(ctx->Multisample.SampleCoverage, enable->SampleCoverage, GL_SAMPLE_COVERAGE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleCoverageInvert, - enable->SampleCoverageInvert, - GL_SAMPLE_COVERAGE_INVERT_ARB); /* GL_ARB_vertex_program, GL_NV_vertex_program */ TEST_AND_UPDATE(ctx->VertexProgram.Enabled, enable->VertexProgram, @@ -622,8 +617,6 @@ enable->VertexProgramTwoSide, GL_VERTEX_PROGRAM_TWO_SIDE_ARB); -#undef TEST_AND_UPDATE - /* texture unit enables */ for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { const GLbitfield enabled = enable->Texture[i]; @@ -1276,6 +1269,23 @@ { const struct gl_multisample_attrib *ms; ms = (const struct gl_multisample_attrib *) attr->data; + + TEST_AND_UPDATE(ctx->Multisample.Enabled, + ms->Enabled, + GL_MULTISAMPLE); + + TEST_AND_UPDATE(ctx->Multisample.SampleCoverage, + ms->SampleCoverage, + GL_SAMPLE_COVERAGE); + + TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToCoverage, + ms->SampleAlphaToCoverage, + GL_SAMPLE_ALPHA_TO_COVERAGE); + + TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToOne, + ms->SampleAlphaToOne, + GL_SAMPLE_ALPHA_TO_ONE); + _mesa_SampleCoverageARB(ms->SampleCoverageValue, ms->SampleCoverageInvert); } diff -Nru mesa-8.0.2/src/mesa/main/bufferobj.c mesa-8.0.3/src/mesa/main/bufferobj.c --- mesa-8.0.2/src/mesa/main/bufferobj.c 2012-03-21 15:54:27.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/bufferobj.c 2012-05-18 04:27:14.000000000 +0000 @@ -530,11 +530,23 @@ assert(!_mesa_bufferobj_mapped(src)); assert(!_mesa_bufferobj_mapped(dst)); - srcPtr = ctx->Driver.MapBufferRange(ctx, readOffset, size, - GL_MAP_READ_BIT, src); - dstPtr = ctx->Driver.MapBufferRange(ctx, writeOffset, size, - (GL_MAP_WRITE_BIT | - GL_MAP_INVALIDATE_RANGE_BIT), dst); + if (src == dst) { + srcPtr = dstPtr = ctx->Driver.MapBufferRange(ctx, 0, src->Size, + GL_MAP_READ_BIT | + GL_MAP_WRITE_BIT, src); + + if (!srcPtr) + return; + + srcPtr += readOffset; + dstPtr += writeOffset; + } else { + srcPtr = ctx->Driver.MapBufferRange(ctx, readOffset, size, + GL_MAP_READ_BIT, src); + dstPtr = ctx->Driver.MapBufferRange(ctx, writeOffset, size, + (GL_MAP_WRITE_BIT | + GL_MAP_INVALIDATE_RANGE_BIT), dst); + } /* Note: the src and dst regions will never overlap. Trying to do so * would generate GL_INVALID_VALUE earlier. @@ -543,7 +555,8 @@ memcpy(dstPtr, srcPtr, size); ctx->Driver.UnmapBuffer(ctx, src); - ctx->Driver.UnmapBuffer(ctx, dst); + if (dst != src) + ctx->Driver.UnmapBuffer(ctx, dst); } diff -Nru mesa-8.0.2/src/mesa/main/dlist.c mesa-8.0.3/src/mesa/main/dlist.c --- mesa-8.0.2/src/mesa/main/dlist.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/dlist.c 2012-05-18 06:06:13.000000000 +0000 @@ -1300,6 +1300,43 @@ } +/* GL_ARB_draw_instanced. */ +static void GLAPIENTRY +save_DrawArraysInstancedARB(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDrawArraysInstanced() during display list compile"); +} + +static void GLAPIENTRY +save_DrawElementsInstancedARB(GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei primcount) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDrawElementsInstanced() during display list compile"); +} + +static void GLAPIENTRY +save_DrawElementsInstancedBaseVertexARB(GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + GLsizei primcount, + GLint basevertex) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDrawElementsInstancedBaseVertex() during display list compile"); +} + static void invalidate_saved_current_state( struct gl_context *ctx ) { GLint i; @@ -9672,8 +9709,6 @@ modestride)); } - - /** * Setup the given dispatch table to point to Mesa's display list * building functions. @@ -10751,6 +10786,13 @@ vfmt->Rectf = save_Rectf; + /* GL_ARB_draw_instanced */ + vfmt->DrawArraysInstanced = save_DrawArraysInstancedARB; + vfmt->DrawElementsInstanced = save_DrawElementsInstancedARB; + + /* GL_ARB_draw_elements_base_vertex */ + vfmt->DrawElementsInstancedBaseVertex = save_DrawElementsInstancedBaseVertexARB; + /* The driver is required to implement these as * 1) They can probably do a better job. * 2) A lot of new mechanisms would have to be added to this module diff -Nru mesa-8.0.2/src/mesa/main/extensions.c mesa-8.0.3/src/mesa/main/extensions.c --- mesa-8.0.2/src/mesa/main/extensions.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/extensions.c 2012-05-18 23:08:33.000000000 +0000 @@ -747,6 +747,8 @@ } } + free(env); + /* Remove trailing space. */ len = strlen(extra_exts); if (extra_exts[len - 1] == ' ') diff -Nru mesa-8.0.2/src/mesa/main/fbobject.c mesa-8.0.3/src/mesa/main/fbobject.c --- mesa-8.0.2/src/mesa/main/fbobject.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/fbobject.c 2012-05-18 06:08:05.000000000 +0000 @@ -1934,6 +1934,7 @@ struct gl_renderbuffer_attachment *att; struct gl_texture_object *texObj = NULL; struct gl_framebuffer *fb; + GLenum maxLevelsTarget; ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -2003,8 +2004,9 @@ } } + maxLevelsTarget = textarget ? textarget : texObj->Target; if ((level < 0) || - (level >= _mesa_max_texture_levels(ctx, texObj->Target))) { + (level >= _mesa_max_texture_levels(ctx, maxLevelsTarget))) { _mesa_error(ctx, GL_INVALID_VALUE, "glFramebufferTexture%sEXT(level)", caller); return; diff -Nru mesa-8.0.2/src/mesa/main/formats.c mesa-8.0.3/src/mesa/main/formats.c --- mesa-8.0.2/src/mesa/main/formats.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/formats.c 2012-05-18 04:27:14.000000000 +0000 @@ -2568,10 +2568,10 @@ return GL_FALSE; case MESA_FORMAT_RGB888: - return format == GL_RGB && type == GL_UNSIGNED_BYTE && littleEndian; + return format == GL_BGR && type == GL_UNSIGNED_BYTE && littleEndian; case MESA_FORMAT_BGR888: - return GL_FALSE; + return format == GL_RGB && type == GL_UNSIGNED_BYTE && littleEndian; case MESA_FORMAT_RGB565: return format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5; diff -Nru mesa-8.0.2/src/mesa/main/format_unpack.c mesa-8.0.3/src/mesa/main/format_unpack.c --- mesa-8.0.2/src/mesa/main/format_unpack.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/format_unpack.c 2012-05-18 04:27:14.000000000 +0000 @@ -2393,6 +2393,51 @@ } static void +unpack_int_rgba_LUMINANCE_UINT16(const GLushort *src, GLuint dst[][4], GLuint n) +{ + unsigned int i; + + for (i = 0; i < n; i++) { + dst[i][0] = dst[i][1] = dst[i][2] = src[i]; + dst[i][3] = 1; + } +} + +static void +unpack_int_rgba_LUMINANCE_INT16(const GLshort *src, GLuint dst[][4], GLuint n) +{ + unsigned int i; + + for (i = 0; i < n; i++) { + dst[i][0] = dst[i][1] = dst[i][2] = src[i]; + dst[i][3] = 1; + } +} + +static void +unpack_int_rgba_LUMINANCE_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n) +{ + unsigned int i; + + for (i = 0; i < n; i++) { + dst[i][0] = dst[i][1] = dst[i][2] = src[i]; + dst[i][3] = 1; + } +} + +static void +unpack_int_rgba_LUMINANCE_INT8(const GLbyte *src, GLuint dst[][4], GLuint n) +{ + unsigned int i; + + for (i = 0; i < n; i++) { + dst[i][0] = dst[i][1] = dst[i][2] = src[i]; + dst[i][3] = 1; + } +} + + +static void unpack_int_rgba_LUMINANCE_ALPHA_UINT32(const GLuint *src, GLuint dst[][4], GLuint n) { unsigned int i; @@ -2618,6 +2663,19 @@ case MESA_FORMAT_LUMINANCE_INT32: unpack_int_rgba_LUMINANCE_UINT32(src, dst, n); break; + case MESA_FORMAT_LUMINANCE_UINT16: + unpack_int_rgba_LUMINANCE_UINT16(src, dst, n); + break; + case MESA_FORMAT_LUMINANCE_INT16: + unpack_int_rgba_LUMINANCE_INT16(src, dst, n); + break; + + case MESA_FORMAT_LUMINANCE_UINT8: + unpack_int_rgba_LUMINANCE_UINT8(src, dst, n); + break; + case MESA_FORMAT_LUMINANCE_INT8: + unpack_int_rgba_LUMINANCE_INT8(src, dst, n); + break; case MESA_FORMAT_LUMINANCE_ALPHA_UINT32: case MESA_FORMAT_LUMINANCE_ALPHA_INT32: diff -Nru mesa-8.0.2/src/mesa/main/imports.c mesa-8.0.3/src/mesa/main/imports.c --- mesa-8.0.2/src/mesa/main/imports.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/imports.c 2012-05-18 04:27:14.000000000 +0000 @@ -767,7 +767,7 @@ _mesa_strtof( const char *s, char **end ) { #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \ - !defined(ANDROID) + !defined(ANDROID) && !defined(__HAIKU__) static locale_t loc = NULL; if (!loc) { loc = newlocale(LC_CTYPE_MASK, "C", NULL); diff -Nru mesa-8.0.2/src/mesa/main/light.c mesa-8.0.3/src/mesa/main/light.c --- mesa-8.0.2/src/mesa/main/light.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/light.c 2012-05-18 23:08:34.000000000 +0000 @@ -743,6 +743,8 @@ _mesa_lookup_enum_by_nr(mode)); bitmask = _mesa_material_bitmask(ctx, face, mode, legal, "glColorMaterial"); + if (bitmask == 0) + return; /* error was recorded */ if (ctx->Light.ColorMaterialBitmask == bitmask && ctx->Light.ColorMaterialFace == face && diff -Nru mesa-8.0.2/src/mesa/main/mipmap.c mesa-8.0.3/src/mesa/main/mipmap.c --- mesa-8.0.2/src/mesa/main/mipmap.c 2012-03-20 14:13:55.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/mipmap.c 2012-05-18 23:08:34.000000000 +0000 @@ -2128,6 +2128,7 @@ dstWidth, dstHeight, dstDepth, border, srcImage->InternalFormat, srcImage->TexFormat)) { + free(temp_dst); return; } diff -Nru mesa-8.0.2/src/mesa/main/readpix.c mesa-8.0.3/src/mesa/main/readpix.c --- mesa-8.0.2/src/mesa/main/readpix.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/readpix.c 2012-05-18 23:08:34.000000000 +0000 @@ -196,6 +196,11 @@ ctx->Driver.UnmapRenderbuffer(ctx, rb); } + +/** + * Try to do glReadPixels of RGBA data using a simple memcpy or swizzle. + * \return GL_TRUE if successful, GL_FALSE otherwise (use the slow path) + */ static GLboolean fast_read_rgba_pixels_memcpy( struct gl_context *ctx, GLint x, GLint y, @@ -208,13 +213,24 @@ struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer; GLubyte *dst, *map; int dstStride, stride, j, texelBytes; + GLboolean swizzle_rb = GL_FALSE, copy_xrgb = GL_FALSE; - if (!_mesa_format_matches_format_and_type(rb->Format, format, type)) + /* XXX we could check for other swizzle/special cases here as needed */ + if (rb->Format == MESA_FORMAT_RGBA8888_REV && + format == GL_BGRA && + type == GL_UNSIGNED_INT_8_8_8_8_REV) { + swizzle_rb = GL_TRUE; + } + else if (rb->Format == MESA_FORMAT_XRGB8888 && + format == GL_BGRA && + type == GL_UNSIGNED_INT_8_8_8_8_REV) { + copy_xrgb = GL_TRUE; + } + else if (!_mesa_format_matches_format_and_type(rb->Format, format, type)) return GL_FALSE; /* check for things we can't handle here */ - if (packing->SwapBytes || - packing->LsbFirst) { + if (packing->SwapBytes) { return GL_FALSE; } @@ -240,10 +256,39 @@ } texelBytes = _mesa_get_format_bytes(rb->Format); - for (j = 0; j < height; j++) { - memcpy(dst, map, width * texelBytes); - dst += dstStride; - map += stride; + + if (swizzle_rb) { + /* swap R/B */ + for (j = 0; j < height; j++) { + int i; + for (i = 0; i < width; i++) { + GLuint *dst4 = (GLuint *) dst, *map4 = (GLuint *) map; + GLuint pixel = map4[i]; + dst4[i] = (pixel & 0xff00ff00) + | ((pixel & 0x00ff0000) >> 16) + | ((pixel & 0x000000ff) << 16); + } + dst += dstStride; + map += stride; + } + } else if (copy_xrgb) { + /* convert xrgb -> argb */ + for (j = 0; j < height; j++) { + GLuint *dst4 = (GLuint *) dst, *map4 = (GLuint *) map; + int i; + for (i = 0; i < width; i++) { + dst4[i] = map4[i] | 0xff000000; /* set A=0xff */ + } + dst += dstStride; + map += stride; + } + } else { + /* just memcpy */ + for (j = 0; j < height; j++) { + memcpy(dst, map, width * texelBytes); + dst += dstStride; + map += stride; + } } ctx->Driver.UnmapRenderbuffer(ctx, rb); @@ -774,6 +819,12 @@ return; } + if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, + "glReadPixels(incomplete framebuffer)" ); + return; + } + /* Check that the destination format and source buffer are both * integer-valued or both non-integer-valued. */ @@ -788,12 +839,6 @@ } } - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glReadPixels(incomplete framebuffer)" ); - return; - } - if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(multisample FBO)"); return; diff -Nru mesa-8.0.2/src/mesa/main/teximage.c mesa-8.0.3/src/mesa/main/teximage.c --- mesa-8.0.2/src/mesa/main/teximage.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/teximage.c 2012-05-18 23:08:34.000000000 +0000 @@ -526,6 +526,32 @@ /** + * Is the given texture format a generic compressed format? + */ +static GLboolean +is_generic_compressed_format(GLenum format) +{ + switch (format) { + case GL_COMPRESSED_RED: + case GL_COMPRESSED_RG: + case GL_COMPRESSED_RGB: + case GL_COMPRESSED_RGBA: + case GL_COMPRESSED_ALPHA: + case GL_COMPRESSED_LUMINANCE: + case GL_COMPRESSED_LUMINANCE_ALPHA: + case GL_COMPRESSED_INTENSITY: + case GL_COMPRESSED_SRGB: + case GL_COMPRESSED_SRGB_ALPHA: + case GL_COMPRESSED_SLUMINANCE: + case GL_COMPRESSED_SLUMINANCE_ALPHA: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** * For cube map faces, return a face index in [0,5]. * For other targets return 0; */ @@ -911,7 +937,6 @@ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_ARB: case GL_PROXY_TEXTURE_CUBE_MAP_ARB: return ctx->Extensions.ARB_texture_cube_map ? ctx->Const.MaxCubeTextureLevels : 0; @@ -1077,11 +1102,13 @@ GLint border, GLenum internalFormat, gl_format format) { + GLenum target; ASSERT(img); ASSERT(width >= 0); ASSERT(height >= 0); ASSERT(depth >= 0); + target = img->TexObject->Target; img->_BaseFormat = _mesa_base_tex_format( ctx, internalFormat ); ASSERT(img->_BaseFormat > 0); img->InternalFormat = internalFormat; @@ -1093,26 +1120,72 @@ img->Width2 = width - 2 * border; /* == 1 << img->WidthLog2; */ img->WidthLog2 = _mesa_logbase2(img->Width2); - if (height == 1) { /* 1-D texture */ - img->Height2 = 1; + switch(target) { + case GL_TEXTURE_1D: + case GL_TEXTURE_BUFFER: + case GL_PROXY_TEXTURE_1D: + if (height == 0) + img->Height2 = 0; + else + img->Height2 = 1; img->HeightLog2 = 0; - } - else { + if (depth == 0) + img->Depth2 = 0; + else + img->Depth2 = 1; + img->DepthLog2 = 0; + break; + case GL_TEXTURE_1D_ARRAY: + case GL_PROXY_TEXTURE_1D_ARRAY: + img->Height2 = height; /* no border */ + img->HeightLog2 = 0; /* not used */ + if (depth == 0) + img->Depth2 = 0; + else + img->Depth2 = 1; + img->DepthLog2 = 0; + break; + case GL_TEXTURE_2D: + case GL_TEXTURE_RECTANGLE: + case GL_TEXTURE_CUBE_MAP: + case GL_TEXTURE_CUBE_MAP_POSITIVE_X: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: + case GL_TEXTURE_EXTERNAL_OES: + case GL_PROXY_TEXTURE_2D: + case GL_PROXY_TEXTURE_RECTANGLE: + case GL_PROXY_TEXTURE_CUBE_MAP: img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ img->HeightLog2 = _mesa_logbase2(img->Height2); - } - - if (depth == 1) { /* 2-D texture */ - img->Depth2 = 1; + if (depth == 0) + img->Depth2 = 0; + else + img->Depth2 = 1; img->DepthLog2 = 0; - } - else { + break; + case GL_TEXTURE_2D_ARRAY: + case GL_PROXY_TEXTURE_2D_ARRAY: + img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ + img->HeightLog2 = _mesa_logbase2(img->Height2); + img->Depth2 = depth; /* no border */ + img->DepthLog2 = 0; /* not used */ + break; + case GL_TEXTURE_3D: + case GL_PROXY_TEXTURE_3D: + img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ + img->HeightLog2 = _mesa_logbase2(img->Height2); img->Depth2 = depth - 2 * border; /* == 1 << img->DepthLog2; */ img->DepthLog2 = _mesa_logbase2(img->Depth2); + break; + default: + _mesa_problem(NULL, "invalid target 0x%x in _mesa_init_teximage_fields()", + target); } img->MaxLog2 = MAX2(img->WidthLog2, img->HeightLog2); - img->TexFormat = format; } @@ -1658,7 +1731,8 @@ } /* additional checks for compressed textures */ - if (_mesa_is_compressed_format(ctx, internalFormat)) { + if (_mesa_is_compressed_format(ctx, internalFormat) || + is_generic_compressed_format(internalFormat)) { if (!target_can_be_compressed(ctx, target, internalFormat)) { if (!isProxy) _mesa_error(ctx, GL_INVALID_ENUM, @@ -1853,6 +1927,17 @@ } } + if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) { + /* both source and dest must be integer-valued, or neither */ + if (_mesa_is_format_integer_color(destTex->TexFormat) != + _mesa_is_integer_format(format)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTexSubImage%dD(integer/non-integer format mismatch)", + dimensions); + return GL_TRUE; + } + } + return GL_FALSE; } @@ -1978,7 +2063,8 @@ return GL_TRUE; } - if (_mesa_is_compressed_format(ctx, internalFormat)) { + if (_mesa_is_compressed_format(ctx, internalFormat) || + is_generic_compressed_format(internalFormat)) { if (!target_can_be_compressed(ctx, target, internalFormat)) { _mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexImage%dD(target)", dimensions); diff -Nru mesa-8.0.2/src/mesa/main/uniform_query.cpp mesa-8.0.3/src/mesa/main/uniform_query.cpp --- mesa-8.0.2/src/mesa/main/uniform_query.cpp 2012-03-20 14:13:55.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/uniform_query.cpp 2012-05-18 23:08:34.000000000 +0000 @@ -46,6 +46,8 @@ struct gl_shader_program *shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveUniform"); + ASSERT_OUTSIDE_BEGIN_END(ctx); + if (!shProg) return; @@ -905,8 +907,10 @@ name_copy[i-1] = '\0'; offset = strtol(&name[i], NULL, 10); - if (offset < 0) + if (offset < 0) { + free(name_copy); return -1; + } array_lookup = true; } else { diff -Nru mesa-8.0.2/src/mesa/main/varray.c mesa-8.0.3/src/mesa/main/varray.c --- mesa-8.0.2/src/mesa/main/varray.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/varray.c 2012-05-18 19:03:57.000000000 +0000 @@ -185,6 +185,7 @@ (type == GL_UNSIGNED_INT_2_10_10_10_REV || type == GL_INT_2_10_10_10_REV) && size != 4) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(size=%d)", func, size); + return; } ASSERT(size <= 4); diff -Nru mesa-8.0.2/src/mesa/main/version.h mesa-8.0.3/src/mesa/main/version.h --- mesa-8.0.2/src/mesa/main/version.h 2012-03-21 17:55:53.000000000 +0000 +++ mesa-8.0.3/src/mesa/main/version.h 2012-05-18 23:08:34.000000000 +0000 @@ -34,8 +34,8 @@ /* Mesa version */ #define MESA_MAJOR 8 #define MESA_MINOR 0 -#define MESA_PATCH 2 -#define MESA_VERSION_STRING "8.0.2" +#define MESA_PATCH 3 +#define MESA_VERSION_STRING "8.0.3" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) diff -Nru mesa-8.0.2/src/mesa/program/ir_to_mesa.cpp mesa-8.0.3/src/mesa/program/ir_to_mesa.cpp --- mesa-8.0.2/src/mesa/program/ir_to_mesa.cpp 2012-03-20 11:56:54.000000000 +0000 +++ mesa-8.0.3/src/mesa/program/ir_to_mesa.cpp 2012-05-18 23:08:33.000000000 +0000 @@ -2494,7 +2494,7 @@ public: add_uniform_to_shader(struct gl_shader_program *shader_program, struct gl_program_parameter_list *params) - : shader_program(shader_program), params(params) + : shader_program(shader_program), params(params), idx(-1) { /* empty */ } diff -Nru mesa-8.0.2/src/mesa/program/lex.yy.c mesa-8.0.3/src/mesa/program/lex.yy.c --- mesa-8.0.2/src/mesa/program/lex.yy.c 2012-03-21 17:17:25.000000000 +0000 +++ mesa-8.0.3/src/mesa/program/lex.yy.c 2012-05-18 23:12:03.000000000 +0000 @@ -54,6 +54,7 @@ typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -84,8 +85,6 @@ #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -159,15 +158,7 @@ /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -1174,7 +1165,7 @@ int yyget_column (yyscan_t yyscanner); void yyset_column (int column_no , yyscan_t yyscanner); -#line 1178 "program/lex.yy.c" +#line 1169 "program/lex.yy.c" #define INITIAL 0 @@ -1269,6 +1260,10 @@ void yyset_lineno (int line_number ,yyscan_t yyscanner ); +int yyget_column (yyscan_t yyscanner ); + +void yyset_column (int column_no ,yyscan_t yyscanner ); + YYSTYPE * yyget_lval (yyscan_t yyscanner ); void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); @@ -1311,12 +1306,7 @@ /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1335,7 +1325,7 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1423,7 +1413,7 @@ #line 169 "program/program_lexer.l" -#line 1427 "program/lex.yy.c" +#line 1417 "program/lex.yy.c" yylval = yylval_param; @@ -2487,7 +2477,7 @@ #line 493 "program/program_lexer.l" ECHO; YY_BREAK -#line 2491 "program/lex.yy.c" +#line 2481 "program/lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3255,8 +3245,8 @@ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ diff -Nru mesa-8.0.2/src/mesa/program/program_parse.tab.c mesa-8.0.3/src/mesa/program/program_parse.tab.c --- mesa-8.0.2/src/mesa/program/program_parse.tab.c 2012-03-21 17:17:25.000000000 +0000 +++ mesa-8.0.3/src/mesa/program/program_parse.tab.c 2012-05-18 23:12:03.000000000 +0000 @@ -1,10 +1,9 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.4.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,7 +45,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.4.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -189,7 +188,7 @@ /* Line 189 of yacc.c */ -#line 193 "program/program_parse.tab.c" +#line 192 "program/program_parse.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -360,7 +359,7 @@ /* Line 214 of yacc.c */ -#line 364 "program/program_parse.tab.c" +#line 363 "program/program_parse.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -391,7 +390,7 @@ /* Line 264 of yacc.c */ -#line 395 "program/program_parse.tab.c" +#line 394 "program/program_parse.tab.c" #ifdef short # undef short @@ -441,7 +440,7 @@ #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -1293,9 +1292,18 @@ /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif #define YYRECOVERING() (!!yyerrstatus) @@ -1352,7 +1360,7 @@ we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -1894,7 +1902,7 @@ YYLTYPE *yylsp; /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + YYLTYPE yyerror_range[3]; YYSIZE_T yystacksize; @@ -1941,7 +1949,7 @@ yyvsp = yyvs; yylsp = yyls; -#if YYLTYPE_IS_TRIVIAL +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; @@ -2131,7 +2139,7 @@ { case 3: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 282 "program/program_parse.y" { if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) { @@ -2144,7 +2152,7 @@ case 4: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 290 "program/program_parse.y" { if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) { @@ -2159,7 +2167,7 @@ case 7: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 306 "program/program_parse.y" { int valid = 0; @@ -2186,7 +2194,7 @@ case 10: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 334 "program/program_parse.y" { if ((yyvsp[(1) - (2)].inst) != NULL) { @@ -2206,7 +2214,7 @@ case 12: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 352 "program/program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); @@ -2216,7 +2224,7 @@ case 13: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 357 "program/program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); @@ -2226,7 +2234,7 @@ case 24: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 378 "program/program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); @@ -2235,7 +2243,7 @@ case 25: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 384 "program/program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); @@ -2244,7 +2252,7 @@ case 26: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 390 "program/program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); @@ -2253,7 +2261,7 @@ case 27: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 396 "program/program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); @@ -2262,7 +2270,7 @@ case 28: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 403 "program/program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); @@ -2271,7 +2279,7 @@ case 29: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 410 "program/program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg)); @@ -2280,7 +2288,7 @@ case 30: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 416 "program/program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL); @@ -2327,7 +2335,7 @@ case 31: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 460 "program/program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL); @@ -2337,7 +2345,7 @@ case 32: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 465 "program/program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL_NV, NULL, NULL, NULL, NULL); @@ -2350,7 +2358,7 @@ case 33: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 475 "program/program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg)); @@ -2397,7 +2405,7 @@ case 34: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 519 "program/program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); @@ -2406,91 +2414,91 @@ case 35: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 524 "program/program_parse.y" { (yyval.integer) = TEXTURE_1D_INDEX; ;} break; case 36: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 525 "program/program_parse.y" { (yyval.integer) = TEXTURE_2D_INDEX; ;} break; case 37: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 526 "program/program_parse.y" { (yyval.integer) = TEXTURE_3D_INDEX; ;} break; case 38: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 527 "program/program_parse.y" { (yyval.integer) = TEXTURE_CUBE_INDEX; ;} break; case 39: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 528 "program/program_parse.y" { (yyval.integer) = TEXTURE_RECT_INDEX; ;} break; case 40: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 529 "program/program_parse.y" { (yyval.integer) = -TEXTURE_1D_INDEX; ;} break; case 41: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 530 "program/program_parse.y" { (yyval.integer) = -TEXTURE_2D_INDEX; ;} break; case 42: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 531 "program/program_parse.y" { (yyval.integer) = -TEXTURE_RECT_INDEX; ;} break; case 43: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 532 "program/program_parse.y" { (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;} break; case 44: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 533 "program/program_parse.y" { (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;} break; case 45: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 534 "program/program_parse.y" { (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;} break; case 46: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 535 "program/program_parse.y" { (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;} break; case 47: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 539 "program/program_parse.y" { /* FIXME: Is this correct? Should the extenedSwizzle be applied @@ -2505,7 +2513,7 @@ case 48: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 551 "program/program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (2)].src_reg); @@ -2518,7 +2526,7 @@ case 49: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 559 "program/program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (4)].src_reg); @@ -2538,7 +2546,7 @@ case 50: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 576 "program/program_parse.y" { (yyval.src_reg) = (yyvsp[(1) - (2)].src_reg); @@ -2550,7 +2558,7 @@ case 51: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 583 "program/program_parse.y" { struct asm_symbol temp_sym; @@ -2572,7 +2580,7 @@ case 52: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 602 "program/program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2588,7 +2596,7 @@ case 53: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 613 "program/program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (5)].src_reg); @@ -2610,7 +2618,7 @@ case 54: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 633 "program/program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (3)].dst_reg); @@ -2638,7 +2646,7 @@ case 55: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 658 "program/program_parse.y" { set_dst_reg(& (yyval.dst_reg), PROGRAM_ADDRESS, 0); @@ -2648,7 +2656,7 @@ case 56: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 665 "program/program_parse.y" { const unsigned xyzw_valid = @@ -2684,7 +2692,7 @@ case 57: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 698 "program/program_parse.y" { (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); @@ -2694,7 +2702,7 @@ case 58: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 705 "program/program_parse.y" { if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { @@ -2714,7 +2722,7 @@ case 59: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 720 "program/program_parse.y" { char s; @@ -2772,7 +2780,7 @@ case 60: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 775 "program/program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) @@ -2820,7 +2828,7 @@ case 61: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 818 "program/program_parse.y" { set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, (yyvsp[(1) - (1)].attrib)); @@ -2834,7 +2842,7 @@ case 62: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 827 "program/program_parse.y" { if (! (yyvsp[(3) - (4)].src_reg).Base.RelAddr @@ -2861,7 +2869,7 @@ case 63: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 849 "program/program_parse.y" { gl_register_file file = ((yyvsp[(1) - (1)].temp_sym).name != NULL) @@ -2874,7 +2882,7 @@ case 64: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 859 "program/program_parse.y" { set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, (yyvsp[(1) - (1)].result)); @@ -2883,7 +2891,7 @@ case 65: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 863 "program/program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) @@ -2915,7 +2923,7 @@ case 66: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 892 "program/program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) @@ -2937,7 +2945,7 @@ case 69: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 913 "program/program_parse.y" { init_src_reg(& (yyval.src_reg)); @@ -2947,7 +2955,7 @@ case 70: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 920 "program/program_parse.y" { /* FINISHME: Add support for multiple address registers. @@ -2962,28 +2970,28 @@ case 71: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 931 "program/program_parse.y" { (yyval.integer) = 0; ;} break; case 72: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 932 "program/program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 73: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 933 "program/program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; case 74: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 937 "program/program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > (state->limits->MaxAddressOffset - 1))) { @@ -3000,7 +3008,7 @@ case 75: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 951 "program/program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > state->limits->MaxAddressOffset)) { @@ -3017,7 +3025,7 @@ case 76: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 965 "program/program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) @@ -3040,7 +3048,7 @@ case 77: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 985 "program/program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { @@ -3054,7 +3062,7 @@ case 78: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 996 "program/program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { @@ -3069,21 +3077,21 @@ case 83: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1012 "program/program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 88: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1016 "program/program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 89: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1020 "program/program_parse.y" { (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); @@ -3092,7 +3100,7 @@ case 90: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1024 "program/program_parse.y" { (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); @@ -3101,7 +3109,7 @@ case 91: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1028 "program/program_parse.y" { (yyval.dst_reg).CondMask = COND_TR; @@ -3112,7 +3120,7 @@ case 92: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1036 "program/program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); @@ -3122,7 +3130,7 @@ case 93: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1043 "program/program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); @@ -3132,7 +3140,7 @@ case 94: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1050 "program/program_parse.y" { const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); @@ -3158,7 +3166,7 @@ case 95: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1073 "program/program_parse.y" { const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); @@ -3184,7 +3192,7 @@ case 102: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1104 "program/program_parse.y" { struct asm_symbol *const s = @@ -3206,7 +3214,7 @@ case 103: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1123 "program/program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); @@ -3215,7 +3223,7 @@ case 104: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1127 "program/program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); @@ -3224,7 +3232,7 @@ case 105: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1133 "program/program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; @@ -3233,7 +3241,7 @@ case 106: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1137 "program/program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; @@ -3242,7 +3250,7 @@ case 107: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1141 "program/program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; @@ -3251,7 +3259,7 @@ case 108: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1145 "program/program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { @@ -3265,7 +3273,7 @@ case 109: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1154 "program/program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { @@ -3279,7 +3287,7 @@ case 110: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1163 "program/program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); @@ -3288,7 +3296,7 @@ case 111: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1167 "program/program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); @@ -3298,7 +3306,7 @@ case 112: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1172 "program/program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); @@ -3307,7 +3315,7 @@ case 113: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1178 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { @@ -3321,7 +3329,7 @@ case 117: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1192 "program/program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; @@ -3330,7 +3338,7 @@ case 118: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1196 "program/program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); @@ -3339,7 +3347,7 @@ case 119: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1200 "program/program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; @@ -3348,7 +3356,7 @@ case 120: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1204 "program/program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); @@ -3357,7 +3365,7 @@ case 123: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1212 "program/program_parse.y" { struct asm_symbol *const s = @@ -3378,7 +3386,7 @@ case 124: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1230 "program/program_parse.y" { if (((yyvsp[(4) - (6)].integer) != 0) && ((unsigned) (yyvsp[(4) - (6)].integer) != (yyvsp[(6) - (6)].temp_sym).param_binding_length)) { @@ -3406,7 +3414,7 @@ case 125: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1255 "program/program_parse.y" { (yyval.integer) = 0; @@ -3415,7 +3423,7 @@ case 126: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1259 "program/program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 1) || ((unsigned) (yyvsp[(1) - (1)].integer) > state->limits->MaxParameters)) { @@ -3433,7 +3441,7 @@ case 127: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1274 "program/program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); @@ -3442,7 +3450,7 @@ case 128: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1280 "program/program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); @@ -3451,7 +3459,7 @@ case 130: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1287 "program/program_parse.y" { (yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length; @@ -3461,7 +3469,7 @@ case 131: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1294 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3472,7 +3480,7 @@ case 132: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1300 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3483,7 +3491,7 @@ case 133: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1306 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3494,7 +3502,7 @@ case 134: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1314 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3505,7 +3513,7 @@ case 135: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1320 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3516,7 +3524,7 @@ case 136: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1326 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3527,7 +3535,7 @@ case 137: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1334 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3538,7 +3546,7 @@ case 138: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1340 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3549,7 +3557,7 @@ case 139: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1346 "program/program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); @@ -3560,98 +3568,98 @@ case 140: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1353 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; case 141: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1354 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 142: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1357 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 143: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1358 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 144: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1359 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 145: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1360 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 146: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1361 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 147: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1362 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 148: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1363 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 149: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1364 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 150: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1365 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 151: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1366 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 152: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1367 "program/program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 153: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1371 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3663,7 +3671,7 @@ case 154: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1380 "program/program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); @@ -3672,7 +3680,7 @@ case 155: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1384 "program/program_parse.y" { (yyval.integer) = STATE_EMISSION; @@ -3681,7 +3689,7 @@ case 156: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1388 "program/program_parse.y" { (yyval.integer) = STATE_SHININESS; @@ -3690,7 +3698,7 @@ case 157: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1394 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3702,7 +3710,7 @@ case 158: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1403 "program/program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); @@ -3711,7 +3719,7 @@ case 159: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1407 "program/program_parse.y" { (yyval.integer) = STATE_POSITION; @@ -3720,7 +3728,7 @@ case 160: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1411 "program/program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { @@ -3734,7 +3742,7 @@ case 161: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1420 "program/program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); @@ -3743,7 +3751,7 @@ case 162: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1424 "program/program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; @@ -3752,7 +3760,7 @@ case 163: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1430 "program/program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; @@ -3761,7 +3769,7 @@ case 164: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1436 "program/program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; @@ -3771,7 +3779,7 @@ case 165: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1443 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3781,7 +3789,7 @@ case 166: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1448 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3792,7 +3800,7 @@ case 167: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1456 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3805,7 +3813,7 @@ case 169: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1468 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3816,7 +3824,7 @@ case 170: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1476 "program/program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; @@ -3825,7 +3833,7 @@ case 171: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1482 "program/program_parse.y" { (yyval.integer) = STATE_AMBIENT; @@ -3834,7 +3842,7 @@ case 172: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1486 "program/program_parse.y" { (yyval.integer) = STATE_DIFFUSE; @@ -3843,7 +3851,7 @@ case 173: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1490 "program/program_parse.y" { (yyval.integer) = STATE_SPECULAR; @@ -3852,7 +3860,7 @@ case 174: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1496 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { @@ -3866,7 +3874,7 @@ case 175: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1507 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3878,7 +3886,7 @@ case 176: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1516 "program/program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; @@ -3887,7 +3895,7 @@ case 177: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1520 "program/program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; @@ -3896,7 +3904,7 @@ case 178: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1525 "program/program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; @@ -3905,7 +3913,7 @@ case 179: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1529 "program/program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; @@ -3914,7 +3922,7 @@ case 180: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1533 "program/program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; @@ -3923,7 +3931,7 @@ case 181: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1537 "program/program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; @@ -3932,7 +3940,7 @@ case 182: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1543 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3942,7 +3950,7 @@ case 183: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1550 "program/program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; @@ -3951,7 +3959,7 @@ case 184: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1554 "program/program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; @@ -3960,7 +3968,7 @@ case 185: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1560 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3971,7 +3979,7 @@ case 186: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1568 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { @@ -3985,7 +3993,7 @@ case 187: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1579 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -3995,7 +4003,7 @@ case 188: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1586 "program/program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; @@ -4004,7 +4012,7 @@ case 189: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1590 "program/program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; @@ -4013,7 +4021,7 @@ case 190: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1596 "program/program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; @@ -4026,7 +4034,7 @@ case 191: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1606 "program/program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; @@ -4039,7 +4047,7 @@ case 192: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1616 "program/program_parse.y" { (yyval.state)[2] = 0; @@ -4049,7 +4057,7 @@ case 193: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1621 "program/program_parse.y" { /* It seems logical that the matrix row range specifier would have @@ -4070,7 +4078,7 @@ case 194: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1639 "program/program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; @@ -4081,7 +4089,7 @@ case 195: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1647 "program/program_parse.y" { (yyval.integer) = 0; @@ -4090,7 +4098,7 @@ case 196: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1651 "program/program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); @@ -4099,7 +4107,7 @@ case 197: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1657 "program/program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; @@ -4108,7 +4116,7 @@ case 198: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1661 "program/program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; @@ -4117,7 +4125,7 @@ case 199: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1665 "program/program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; @@ -4126,7 +4134,7 @@ case 200: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1671 "program/program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { @@ -4140,7 +4148,7 @@ case 201: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1682 "program/program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; @@ -4150,7 +4158,7 @@ case 202: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1687 "program/program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; @@ -4160,7 +4168,7 @@ case 203: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1692 "program/program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; @@ -4170,7 +4178,7 @@ case 204: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1697 "program/program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; @@ -4180,7 +4188,7 @@ case 205: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1702 "program/program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); @@ -4190,7 +4198,7 @@ case 206: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1707 "program/program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; @@ -4200,7 +4208,7 @@ case 207: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1714 "program/program_parse.y" { (yyval.integer) = 0; @@ -4209,7 +4217,7 @@ case 208: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1718 "program/program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); @@ -4218,7 +4226,7 @@ case 209: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1723 "program/program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix @@ -4235,7 +4243,7 @@ case 210: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1736 "program/program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value @@ -4247,7 +4255,7 @@ case 211: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1744 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { @@ -4261,7 +4269,7 @@ case 212: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1755 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -4271,7 +4279,7 @@ case 217: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1767 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -4284,7 +4292,7 @@ case 218: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1777 "program/program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); @@ -4294,7 +4302,7 @@ case 219: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1782 "program/program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); @@ -4304,7 +4312,7 @@ case 220: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1789 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -4317,7 +4325,7 @@ case 221: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1799 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -4330,7 +4338,7 @@ case 222: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1808 "program/program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); @@ -4340,7 +4348,7 @@ case 223: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1813 "program/program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); @@ -4350,7 +4358,7 @@ case 224: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1820 "program/program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); @@ -4363,7 +4371,7 @@ case 225: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1830 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { @@ -4376,7 +4384,7 @@ case 226: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1840 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { @@ -4389,7 +4397,7 @@ case 231: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1855 "program/program_parse.y" { (yyval.vector).count = 4; @@ -4402,7 +4410,7 @@ case 232: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1865 "program/program_parse.y" { (yyval.vector).count = 1; @@ -4415,7 +4423,7 @@ case 233: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1873 "program/program_parse.y" { (yyval.vector).count = 1; @@ -4428,7 +4436,7 @@ case 234: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1883 "program/program_parse.y" { (yyval.vector).count = 4; @@ -4441,7 +4449,7 @@ case 235: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1891 "program/program_parse.y" { (yyval.vector).count = 4; @@ -4454,7 +4462,7 @@ case 236: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1900 "program/program_parse.y" { (yyval.vector).count = 4; @@ -4467,7 +4475,7 @@ case 237: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1909 "program/program_parse.y" { (yyval.vector).count = 4; @@ -4480,7 +4488,7 @@ case 238: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1919 "program/program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); @@ -4489,7 +4497,7 @@ case 239: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1923 "program/program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); @@ -4498,35 +4506,35 @@ case 240: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1928 "program/program_parse.y" { (yyval.negate) = FALSE; ;} break; case 241: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1929 "program/program_parse.y" { (yyval.negate) = TRUE; ;} break; case 242: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1930 "program/program_parse.y" { (yyval.negate) = FALSE; ;} break; case 243: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1933 "program/program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 245: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1937 "program/program_parse.y" { /* NV_fragment_program_option defines the size qualifiers in a @@ -4565,7 +4573,7 @@ case 246: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1971 "program/program_parse.y" { ;} @@ -4573,14 +4581,14 @@ case 247: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1975 "program/program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; case 249: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1979 "program/program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { @@ -4592,7 +4600,7 @@ case 250: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1986 "program/program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { @@ -4604,7 +4612,7 @@ case 251: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 1995 "program/program_parse.y" { struct asm_symbol *const s = @@ -4621,7 +4629,7 @@ case 252: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2009 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4635,7 +4643,7 @@ case 253: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2018 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4649,7 +4657,7 @@ case 254: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2027 "program/program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); @@ -4658,7 +4666,7 @@ case 255: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2031 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4672,7 +4680,7 @@ case 256: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2040 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4686,7 +4694,7 @@ case 257: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2049 "program/program_parse.y" { if (state->mode == ARB_fragment) { @@ -4700,7 +4708,7 @@ case 258: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2060 "program/program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); @@ -4709,7 +4717,7 @@ case 259: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2066 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4725,7 +4733,7 @@ case 260: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2077 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4758,7 +4766,7 @@ case 261: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2105 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4772,7 +4780,7 @@ case 262: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2114 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4786,7 +4794,7 @@ case 263: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2125 "program/program_parse.y" { (yyval.integer) = 0; @@ -4795,7 +4803,7 @@ case 264: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2129 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4809,7 +4817,7 @@ case 265: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2138 "program/program_parse.y" { if (state->mode == ARB_vertex) { @@ -4823,91 +4831,91 @@ case 266: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2148 "program/program_parse.y" { (yyval.integer) = 0; ;} break; case 267: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2149 "program/program_parse.y" { (yyval.integer) = 0; ;} break; case 268: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2150 "program/program_parse.y" { (yyval.integer) = 1; ;} break; case 269: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2153 "program/program_parse.y" { (yyval.integer) = 0; ;} break; case 270: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2154 "program/program_parse.y" { (yyval.integer) = 0; ;} break; case 271: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2155 "program/program_parse.y" { (yyval.integer) = 1; ;} break; case 272: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2158 "program/program_parse.y" { (yyval.integer) = 0; ;} break; case 273: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2159 "program/program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 274: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2162 "program/program_parse.y" { (yyval.integer) = 0; ;} break; case 275: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2163 "program/program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 276: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2166 "program/program_parse.y" { (yyval.integer) = 0; ;} break; case 277: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2167 "program/program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 278: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2171 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { @@ -4921,7 +4929,7 @@ case 279: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2182 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { @@ -4935,7 +4943,7 @@ case 280: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2193 "program/program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { @@ -4949,7 +4957,7 @@ case 281: -/* Line 1455 of yacc.c */ +/* Line 1464 of yacc.c */ #line 2204 "program/program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) @@ -4978,8 +4986,8 @@ -/* Line 1455 of yacc.c */ -#line 4983 "program/program_parse.tab.c" +/* Line 1464 of yacc.c */ +#line 4991 "program/program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -5051,7 +5059,7 @@ #endif } - yyerror_range[0] = yylloc; + yyerror_range[1] = yylloc; if (yyerrstatus == 3) { @@ -5088,7 +5096,7 @@ if (/*CONSTCOND*/ 0) goto yyerrorlab; - yyerror_range[0] = yylsp[1-yylen]; + yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -5122,7 +5130,7 @@ if (yyssp == yyss) YYABORT; - yyerror_range[0] = *yylsp; + yyerror_range[1] = *yylsp; yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp, state); YYPOPSTACK (1); @@ -5132,10 +5140,10 @@ *++yyvsp = yylval; - yyerror_range[1] = yylloc; + yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc; /* Shift the error token. */ @@ -5197,7 +5205,7 @@ -/* Line 1675 of yacc.c */ +/* Line 1684 of yacc.c */ #line 2233 "program/program_parse.y" diff -Nru mesa-8.0.2/src/mesa/program/program_parse.tab.h mesa-8.0.3/src/mesa/program/program_parse.tab.h --- mesa-8.0.2/src/mesa/program/program_parse.tab.h 2012-03-21 17:17:25.000000000 +0000 +++ mesa-8.0.3/src/mesa/program/program_parse.tab.h 2012-05-18 23:12:03.000000000 +0000 @@ -1,10 +1,9 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.4.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -153,7 +152,7 @@ typedef union YYSTYPE { -/* Line 1676 of yacc.c */ +/* Line 1685 of yacc.c */ #line 126 "program/program_parse.y" struct asm_instruction *inst; @@ -182,8 +181,8 @@ -/* Line 1676 of yacc.c */ -#line 187 "program/program_parse.tab.h" +/* Line 1685 of yacc.c */ +#line 186 "program/program_parse.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff -Nru mesa-8.0.2/src/mesa/state_tracker/st_cb_drawpixels.c mesa-8.0.3/src/mesa/state_tracker/st_cb_drawpixels.c --- mesa-8.0.2/src/mesa/state_tracker/st_cb_drawpixels.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/state_tracker/st_cb_drawpixels.c 2012-05-18 23:08:34.000000000 +0000 @@ -1543,7 +1543,15 @@ readY = srcy; readW = width; readH = height; - _mesa_clip_readpixels(ctx, &readX, &readY, &readW, &readH, &pack); + if (!_mesa_clip_readpixels(ctx, &readX, &readY, &readW, &readH, &pack)) { + /* The source region is completely out of bounds. Do nothing. + * The GL spec says "Results of copies from outside the window, + * or from regions of the window that are not exposed, are + * hardware dependent and undefined." + */ + return; + } + readW = MAX2(0, readW); readH = MAX2(0, readH); diff -Nru mesa-8.0.2/src/mesa/state_tracker/st_extensions.c mesa-8.0.3/src/mesa/state_tracker/st_extensions.c --- mesa-8.0.2/src/mesa/state_tracker/st_extensions.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/state_tracker/st_extensions.c 2012-05-18 23:08:33.000000000 +0000 @@ -208,6 +208,8 @@ if (options->EmitNoLoops) options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536); + else + options->MaxUnrollIterations = 255; /* SM3 limit */ } /* PIPE_SHADER_CAP_MAX_INPUTS for the FS specifies the maximum number diff -Nru mesa-8.0.2/src/mesa/swrast/s_aaline.c mesa-8.0.3/src/mesa/swrast/s_aaline.c --- mesa-8.0.2/src/mesa/swrast/s_aaline.c 2012-03-20 14:13:55.000000000 +0000 +++ mesa-8.0.3/src/mesa/swrast/s_aaline.c 2012-05-18 04:27:14.000000000 +0000 @@ -29,6 +29,7 @@ #include "main/mtypes.h" #include "swrast/s_aaline.h" #include "swrast/s_context.h" +#include "swrast/s_fragprog.h" #include "swrast/s_span.h" #include "swrast/swrast.h" diff -Nru mesa-8.0.2/src/mesa/swrast/s_aatriangle.c mesa-8.0.3/src/mesa/swrast/s_aatriangle.c --- mesa-8.0.2/src/mesa/swrast/s_aatriangle.c 2012-03-20 14:13:55.000000000 +0000 +++ mesa-8.0.3/src/mesa/swrast/s_aatriangle.c 2012-05-18 04:27:14.000000000 +0000 @@ -36,6 +36,7 @@ #include "main/state.h" #include "s_aatriangle.h" #include "s_context.h" +#include "s_fragprog.h" #include "s_span.h" diff -Nru mesa-8.0.2/src/mesa/swrast/s_blit.c mesa-8.0.3/src/mesa/swrast/s_blit.c --- mesa-8.0.2/src/mesa/swrast/s_blit.c 2012-03-20 11:56:54.000000000 +0000 +++ mesa-8.0.3/src/mesa/swrast/s_blit.c 2012-05-18 23:08:33.000000000 +0000 @@ -566,6 +566,9 @@ GL_MAP_READ_BIT | GL_MAP_WRITE_BIT, &srcMap, &srcRowStride); if (!srcMap) { + free(srcBuffer0); + free(srcBuffer1); + free(dstBuffer); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer"); return; } @@ -582,6 +585,9 @@ 0, 0, readRb->Width, readRb->Height, GL_MAP_READ_BIT, &srcMap, &srcRowStride); if (!srcMap) { + free(srcBuffer0); + free(srcBuffer1); + free(dstBuffer); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer"); return; } @@ -590,6 +596,9 @@ GL_MAP_WRITE_BIT, &dstMap, &dstRowStride); if (!dstMap) { ctx->Driver.UnmapRenderbuffer(ctx, readRb); + free(srcBuffer0); + free(srcBuffer1); + free(dstBuffer); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer"); return; } diff -Nru mesa-8.0.2/src/mesa/swrast/s_context.c mesa-8.0.3/src/mesa/swrast/s_context.c --- mesa-8.0.2/src/mesa/swrast/s_context.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/swrast/s_context.c 2012-05-18 04:27:14.000000000 +0000 @@ -36,6 +36,7 @@ #include "swrast.h" #include "s_blend.h" #include "s_context.h" +#include "s_fragprog.h" #include "s_lines.h" #include "s_points.h" #include "s_span.h" diff -Nru mesa-8.0.2/src/mesa/swrast/s_lines.c mesa-8.0.3/src/mesa/swrast/s_lines.c --- mesa-8.0.2/src/mesa/swrast/s_lines.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/swrast/s_lines.c 2012-05-18 04:27:14.000000000 +0000 @@ -30,6 +30,7 @@ #include "s_aaline.h" #include "s_context.h" #include "s_feedback.h" +#include "s_fragprog.h" #include "s_lines.h" #include "s_span.h" diff -Nru mesa-8.0.2/src/mesa/swrast/s_texture.c mesa-8.0.3/src/mesa/swrast/s_texture.c --- mesa-8.0.2/src/mesa/swrast/s_texture.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/swrast/s_texture.c 2012-05-18 06:05:12.000000000 +0000 @@ -96,6 +96,25 @@ swImg->ImageOffsets[i] = i * width * height; } + _swrast_init_texture_image(texImage, width, height, depth); + + return GL_TRUE; +} + + +/** + * Code that overrides ctx->Driver.AllocTextureImageBuffer may use this to + * initialize the fields of swrast_texture_image without allocating the image + * buffer or initializing ImageOffsets or RowStride. + * + * Returns GL_TRUE on success, GL_FALSE on memory allocation failure. + */ +void +_swrast_init_texture_image(struct gl_texture_image *texImage, GLsizei width, + GLsizei height, GLsizei depth) +{ + struct swrast_texture_image *swImg = swrast_texture_image(texImage); + if ((width == 1 || _mesa_is_pow_two(texImage->Width2)) && (height == 1 || _mesa_is_pow_two(texImage->Height2)) && (depth == 1 || _mesa_is_pow_two(texImage->Depth2))) @@ -115,8 +134,6 @@ swImg->HeightScale = (GLfloat) texImage->Height; swImg->DepthScale = (GLfloat) texImage->Depth; } - - return GL_TRUE; } diff -Nru mesa-8.0.2/src/mesa/swrast/s_triangle.c mesa-8.0.3/src/mesa/swrast/s_triangle.c --- mesa-8.0.2/src/mesa/swrast/s_triangle.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/swrast/s_triangle.c 2012-05-18 04:27:14.000000000 +0000 @@ -41,6 +41,7 @@ #include "s_aatriangle.h" #include "s_context.h" #include "s_feedback.h" +#include "s_fragprog.h" #include "s_span.h" #include "s_triangle.h" diff -Nru mesa-8.0.2/src/mesa/swrast/swrast.h mesa-8.0.3/src/mesa/swrast/swrast.h --- mesa-8.0.2/src/mesa/swrast/swrast.h 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/swrast/swrast.h 2012-05-18 06:05:12.000000000 +0000 @@ -192,6 +192,10 @@ GLsizei height, GLsizei depth); extern void +_swrast_init_texture_image(struct gl_texture_image *texImage, GLsizei width, + GLsizei height, GLsizei depth); + +extern void _swrast_free_texture_image_buffer(struct gl_context *ctx, struct gl_texture_image *texImage); diff -Nru mesa-8.0.2/src/mesa/vbo/vbo_attrib_tmp.h mesa-8.0.3/src/mesa/vbo/vbo_attrib_tmp.h --- mesa-8.0.2/src/mesa/vbo/vbo_attrib_tmp.h 2012-03-20 11:56:54.000000000 +0000 +++ mesa-8.0.3/src/mesa/vbo/vbo_attrib_tmp.h 2012-05-18 23:08:34.000000000 +0000 @@ -792,63 +792,6 @@ } - -#define MAT( ATTR, N, face, params ) \ -do { \ - if (face != GL_BACK) \ - MAT_ATTR( ATTR, N, params ); /* front */ \ - if (face != GL_FRONT) \ - MAT_ATTR( ATTR + 1, N, params ); /* back */ \ -} while (0) - - -/* Colormaterial conflicts are dealt with later. - */ -static void GLAPIENTRY -TAG(Materialfv)(GLenum face, GLenum pname, - const GLfloat * params) -{ - GET_CURRENT_CONTEXT(ctx); - - if (face != GL_FRONT && face != GL_BACK && face != GL_FRONT_AND_BACK) { - _mesa_error(ctx, GL_INVALID_ENUM, "glMaterial(invalid face)"); - return; - } - - switch (pname) { - case GL_EMISSION: - MAT(VBO_ATTRIB_MAT_FRONT_EMISSION, 4, face, params); - break; - case GL_AMBIENT: - MAT(VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params); - break; - case GL_DIFFUSE: - MAT(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params); - break; - case GL_SPECULAR: - MAT(VBO_ATTRIB_MAT_FRONT_SPECULAR, 4, face, params); - break; - case GL_SHININESS: - if (*params < 0 || *params > ctx->Const.MaxShininess) - _mesa_error(ctx, GL_INVALID_VALUE, - "glMaterial(invalid shininess: %f out range [0, %f])", - *params, ctx->Const.MaxShininess); - else - MAT(VBO_ATTRIB_MAT_FRONT_SHININESS, 1, face, params); - break; - case GL_COLOR_INDEXES: - MAT(VBO_ATTRIB_MAT_FRONT_INDEXES, 3, face, params); - break; - case GL_AMBIENT_AND_DIFFUSE: - MAT(VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params); - MAT(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params); - break; - default: - ERROR(GL_INVALID_ENUM); - return; - } -} - static void GLAPIENTRY TAG(VertexP2ui)(GLenum type, GLuint value) { @@ -1145,4 +1088,3 @@ #undef ATTR_UI #undef MAT -#undef MAT_ATTR diff -Nru mesa-8.0.2/src/mesa/vbo/vbo_exec_api.c mesa-8.0.3/src/mesa/vbo/vbo_exec_api.c --- mesa-8.0.2/src/mesa/vbo/vbo_exec_api.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/vbo/vbo_exec_api.c 2012-05-18 23:08:34.000000000 +0000 @@ -433,6 +433,101 @@ #include "vbo_attrib_tmp.h" + +/** + * Execute a glMaterial call. Note that if GL_COLOR_MATERIAL is enabled, + * this may be a (partial) no-op. + */ +static void GLAPIENTRY +vbo_Materialfv(GLenum face, GLenum pname, const GLfloat *params) +{ + GLbitfield updateMats; + GET_CURRENT_CONTEXT(ctx); + + /* This function should be a no-op when it tries to update material + * attributes which are currently tracking glColor via glColorMaterial. + * The updateMats var will be a mask of the MAT_BIT_FRONT/BACK_x bits + * indicating which material attributes can actually be updated below. + */ + if (ctx->Light.ColorMaterialEnabled) { + updateMats = ~ctx->Light.ColorMaterialBitmask; + } + else { + /* GL_COLOR_MATERIAL is disabled so don't skip any material updates */ + updateMats = ALL_MATERIAL_BITS; + } + + if (face == GL_FRONT) { + updateMats &= FRONT_MATERIAL_BITS; + } + else if (face == GL_BACK) { + updateMats &= BACK_MATERIAL_BITS; + } + else if (face != GL_FRONT_AND_BACK) { + _mesa_error(ctx, GL_INVALID_ENUM, "glMaterial(invalid face)"); + return; + } + + switch (pname) { + case GL_EMISSION: + if (updateMats & MAT_BIT_FRONT_EMISSION) + MAT_ATTR(VBO_ATTRIB_MAT_FRONT_EMISSION, 4, params); + if (updateMats & MAT_BIT_BACK_EMISSION) + MAT_ATTR(VBO_ATTRIB_MAT_BACK_EMISSION, 4, params); + break; + case GL_AMBIENT: + if (updateMats & MAT_BIT_FRONT_AMBIENT) + MAT_ATTR(VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, params); + if (updateMats & MAT_BIT_BACK_AMBIENT) + MAT_ATTR(VBO_ATTRIB_MAT_BACK_AMBIENT, 4, params); + break; + case GL_DIFFUSE: + if (updateMats & MAT_BIT_FRONT_DIFFUSE) + MAT_ATTR(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, params); + if (updateMats & MAT_BIT_BACK_DIFFUSE) + MAT_ATTR(VBO_ATTRIB_MAT_BACK_DIFFUSE, 4, params); + break; + case GL_SPECULAR: + if (updateMats & MAT_BIT_FRONT_SPECULAR) + MAT_ATTR(VBO_ATTRIB_MAT_FRONT_SPECULAR, 4, params); + if (updateMats & MAT_BIT_BACK_SPECULAR) + MAT_ATTR(VBO_ATTRIB_MAT_BACK_SPECULAR, 4, params); + break; + case GL_SHININESS: + if (*params < 0 || *params > ctx->Const.MaxShininess) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glMaterial(invalid shininess: %f out range [0, %f])", + *params, ctx->Const.MaxShininess); + return; + } + if (updateMats & MAT_BIT_FRONT_SHININESS) + MAT_ATTR(VBO_ATTRIB_MAT_FRONT_SHININESS, 1, params); + if (updateMats & MAT_BIT_BACK_SHININESS) + MAT_ATTR(VBO_ATTRIB_MAT_BACK_SHININESS, 1, params); + break; + case GL_COLOR_INDEXES: + if (updateMats & MAT_BIT_FRONT_INDEXES) + MAT_ATTR(VBO_ATTRIB_MAT_FRONT_INDEXES, 3, params); + if (updateMats & MAT_BIT_BACK_INDEXES) + MAT_ATTR(VBO_ATTRIB_MAT_BACK_INDEXES, 3, params); + break; + case GL_AMBIENT_AND_DIFFUSE: + if (updateMats & MAT_BIT_FRONT_AMBIENT) + MAT_ATTR(VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, params); + if (updateMats & MAT_BIT_FRONT_DIFFUSE) + MAT_ATTR(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, params); + if (updateMats & MAT_BIT_BACK_AMBIENT) + MAT_ATTR(VBO_ATTRIB_MAT_BACK_AMBIENT, 4, params); + if (updateMats & MAT_BIT_BACK_DIFFUSE) + MAT_ATTR(VBO_ATTRIB_MAT_BACK_DIFFUSE, 4, params); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glMaterialfv(pname)"); + return; + } +} + + /** * Flush (draw) vertices. * \param unmap - leave VBO unmapped after flushing? diff -Nru mesa-8.0.2/src/mesa/vbo/vbo_exec_array.c mesa-8.0.3/src/mesa/vbo/vbo_exec_array.c --- mesa-8.0.2/src/mesa/vbo/vbo_exec_array.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/vbo/vbo_exec_array.c 2012-05-18 06:05:12.000000000 +0000 @@ -673,6 +673,7 @@ * Map GL_ELEMENT_ARRAY_BUFFER and print contents. * For debugging. */ +#if 0 static void dump_element_buffer(struct gl_context *ctx, GLenum type) { @@ -724,6 +725,7 @@ ctx->Driver.UnmapBuffer(ctx, ctx->Array.ArrayObj->ElementArrayBufferObj); } +#endif /** @@ -822,6 +824,7 @@ GLint basevertex) { static GLuint warnCount = 0; + GLboolean index_bounds_valid = GL_TRUE; GET_CURRENT_CONTEXT(ctx); if (MESA_VERBOSE & VERBOSE_DRAW) @@ -834,6 +837,26 @@ type, indices, basevertex )) return; + if ((int) end + basevertex < 0 || + start + basevertex >= ctx->Array.ArrayObj->_MaxElement) { + /* The application requested we draw using a range of indices that's + * outside the bounds of the current VBO. This is invalid and appears + * to give undefined results. The safest thing to do is to simply + * ignore the range, in case the application botched their range tracking + * but did provide valid indices. Also issue a warning indicating that + * the application is broken. + */ + if (warnCount++ < 10) { + _mesa_warning(ctx, "glDrawRangeElements(start %u, end %u, " + "basevertex %d, count %d, type 0x%x, indices=%p):\n" + "\trange is outside VBO bounds (max=%u); ignoring.\n" + "\tThis should be fixed in the application.", + start, end, basevertex, count, type, indices, + ctx->Array.ArrayObj->_MaxElement - 1); + } + index_bounds_valid = GL_FALSE; + } + /* NOTE: It's important that 'end' is a reasonable value. * in _tnl_draw_prims(), we use end to determine how many vertices * to transform. If it's too large, we can unnecessarily split prims @@ -850,62 +873,6 @@ end = MIN2(end, 0xffff); } - if (end >= ctx->Array.ArrayObj->_MaxElement) { - /* the max element is out of bounds of one or more enabled arrays */ - warnCount++; - - if (warnCount < 10) { - _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, " - "type 0x%x, indices=%p)\n" - "\tend is out of bounds (max=%u) " - "Element Buffer %u (size %d)\n" - "\tThis should probably be fixed in the application.", - start, end, count, type, indices, - ctx->Array.ArrayObj->_MaxElement - 1, - ctx->Array.ArrayObj->ElementArrayBufferObj->Name, - (int) ctx->Array.ArrayObj->ElementArrayBufferObj->Size); - } - - if (0) - dump_element_buffer(ctx, type); - - if (0) - _mesa_print_arrays(ctx); - - /* 'end' was out of bounds, but now let's check the actual array - * indexes to see if any of them are out of bounds. - */ - if (0) { - GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, - ctx->Array.ArrayObj->ElementArrayBufferObj); - if (max >= ctx->Array.ArrayObj->_MaxElement) { - if (warnCount < 10) { - _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, " - "count %d, type 0x%x, indices=%p)\n" - "\tindex=%u is out of bounds (max=%u) " - "Element Buffer %u (size %d)\n" - "\tSkipping the glDrawRangeElements() call", - start, end, count, type, indices, max, - ctx->Array.ArrayObj->_MaxElement - 1, - ctx->Array.ArrayObj->ElementArrayBufferObj->Name, - (int) ctx->Array.ArrayObj->ElementArrayBufferObj->Size); - } - } - /* XXX we could also find the min index and compare to 'start' - * to see if start is correct. But it's more likely to get the - * upper bound wrong. - */ - } - - /* Set 'end' to the max possible legal value */ - assert(ctx->Array.ArrayObj->_MaxElement >= 1); - end = ctx->Array.ArrayObj->_MaxElement - 1; - - if (end < start) { - return; - } - } - if (0) { printf("glDraw[Range]Elements{,BaseVertex}" "(start %u, end %u, type 0x%x, count %d) ElemBuf %u, " @@ -915,13 +882,17 @@ basevertex); } + if ((int) start + basevertex < 0 || + end + basevertex >= ctx->Array.ArrayObj->_MaxElement) + index_bounds_valid = GL_FALSE; + #if 0 check_draw_elements_data(ctx, count, type, indices); #else (void) check_draw_elements_data; #endif - vbo_validated_drawrangeelements(ctx, mode, GL_TRUE, start, end, + vbo_validated_drawrangeelements(ctx, mode, index_bounds_valid, start, end, count, type, indices, basevertex, 1); } diff -Nru mesa-8.0.2/src/mesa/vbo/vbo_save_api.c mesa-8.0.3/src/mesa/vbo/vbo_save_api.c --- mesa-8.0.2/src/mesa/vbo/vbo_save_api.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/vbo/vbo_save_api.c 2012-05-18 23:08:34.000000000 +0000 @@ -724,6 +724,63 @@ +#define MAT( ATTR, N, face, params ) \ +do { \ + if (face != GL_BACK) \ + MAT_ATTR( ATTR, N, params ); /* front */ \ + if (face != GL_FRONT) \ + MAT_ATTR( ATTR + 1, N, params ); /* back */ \ +} while (0) + + +/** + * Save a glMaterial call found between glBegin/End. + * glMaterial calls outside Begin/End are handled in dlist.c. + */ +static void GLAPIENTRY +_save_Materialfv(GLenum face, GLenum pname, const GLfloat *params) +{ + GET_CURRENT_CONTEXT(ctx); + + if (face != GL_FRONT && face != GL_BACK && face != GL_FRONT_AND_BACK) { + _mesa_compile_error(ctx, GL_INVALID_ENUM, "glMaterial(face)"); + return; + } + + switch (pname) { + case GL_EMISSION: + MAT(VBO_ATTRIB_MAT_FRONT_EMISSION, 4, face, params); + break; + case GL_AMBIENT: + MAT(VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params); + break; + case GL_DIFFUSE: + MAT(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params); + break; + case GL_SPECULAR: + MAT(VBO_ATTRIB_MAT_FRONT_SPECULAR, 4, face, params); + break; + case GL_SHININESS: + if (*params < 0 || *params > ctx->Const.MaxShininess) { + _mesa_compile_error(ctx, GL_INVALID_VALUE, "glMaterial(shininess)"); + } + else { + MAT(VBO_ATTRIB_MAT_FRONT_SHININESS, 1, face, params); + } + break; + case GL_COLOR_INDEXES: + MAT(VBO_ATTRIB_MAT_FRONT_INDEXES, 3, face, params); + break; + case GL_AMBIENT_AND_DIFFUSE: + MAT(VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params); + MAT(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params); + break; + default: + _mesa_compile_error(ctx, GL_INVALID_ENUM, "glMaterial(pname)"); + return; + } +} + /* Cope with EvalCoord/CallList called within a begin/end object: * -- Flush current buffer diff -Nru mesa-8.0.2/src/mesa/vbo/vbo_save_draw.c mesa-8.0.3/src/mesa/vbo/vbo_save_draw.c --- mesa-8.0.2/src/mesa/vbo/vbo_save_draw.c 2012-03-21 15:54:28.000000000 +0000 +++ mesa-8.0.3/src/mesa/vbo/vbo_save_draw.c 2012-05-18 04:27:14.000000000 +0000 @@ -191,7 +191,7 @@ save->inputs[attr] = &arrays[attr]; arrays[attr].Ptr = (const GLubyte *) NULL + buffer_offset; - arrays[attr].Size = node->attrsz[src]; + arrays[attr].Size = node_attrsz[src]; arrays[attr].StrideB = node->vertex_size * sizeof(GLfloat); arrays[attr].Stride = node->vertex_size * sizeof(GLfloat); arrays[attr].Type = GL_FLOAT; @@ -205,7 +205,7 @@ assert(arrays[attr].BufferObj->Name); - buffer_offset += node->attrsz[src] * sizeof(GLfloat); + buffer_offset += node_attrsz[src] * sizeof(GLfloat); varying_inputs |= VERT_BIT(attr); ctx->NewState |= _NEW_ARRAY; }