diff options
330 files changed, 13747 insertions, 13176 deletions
diff --git a/X11/xtrans/Xtransint.h b/X11/xtrans/Xtransint.h index b2b6821d3..9a2780b13 100644 --- a/X11/xtrans/Xtransint.h +++ b/X11/xtrans/Xtransint.h @@ -72,10 +72,6 @@ from The Open Group. # define XTRANSDEBUG 1 #endif -#if XTRANS_SEND_FDS && !(defined(linux) || defined(__sun)) -#error "FD passing support only on Linux & Solaris" -#endif - #ifdef WIN32 # define _WILLWINSOCK_ #endif diff --git a/X11/xtrans/Xtranssock.c b/X11/xtrans/Xtranssock.c index 6d4207f1c..6d4207f1c 100755..100644 --- a/X11/xtrans/Xtranssock.c +++ b/X11/xtrans/Xtranssock.c diff --git a/X11/xtrans/Xtransutil.c b/X11/xtrans/Xtransutil.c index a6928bb87..63f0fc355 100644 --- a/X11/xtrans/Xtransutil.c +++ b/X11/xtrans/Xtransutil.c @@ -306,24 +306,12 @@ static jmp_buf env; #ifdef SIGALRM static volatile int nameserver_timedout = 0; -static -#ifdef RETSIGTYPE /* set by autoconf AC_TYPE_SIGNAL */ -RETSIGTYPE -#else /* Imake */ -#ifdef SIGNALRETURNSINT -int -#else -void -#endif -#endif +static void nameserver_lost(int sig _X_UNUSED) { nameserver_timedout = 1; longjmp (env, -1); /* NOTREACHED */ -#ifdef SIGNALRETURNSINT - return -1; /* for picky compilers */ -#endif } #endif /* SIGALARM */ diff --git a/X11/xtrans/xtrans.m4 b/X11/xtrans/xtrans.m4 index d84442e86..fe128b47e 100644 --- a/X11/xtrans/xtrans.m4 +++ b/X11/xtrans/xtrans.m4 @@ -29,12 +29,12 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[ AC_SEARCH_LIBS(socket, [socket]) AC_SEARCH_LIBS(gethostbyname, [nsl]) if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then - AC_HAVE_LIBRARY([ws2_32]) + AC_CHECK_LIB([ws2_32],[main]) fi # Needs to come after above checks for libsocket & libnsl for SVR4 systems AC_ARG_ENABLE(ipv6, - AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), + AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), [IPV6CONN=$enableval], [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) AC_MSG_CHECKING([if IPv6 support should be built]) @@ -100,13 +100,12 @@ AC_INCLUDES_DEFAULT # that use Xtrans functions AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_TYPE_SIGNAL]) [case $host_os in mingw*) unixdef="no" ;; *) unixdef="yes" ;; esac] AC_ARG_ENABLE(unix-transport, - AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), + AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) if test "$UNIXCONN" = "yes"; then @@ -114,7 +113,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ fi AC_MSG_RESULT($UNIXCONN) AC_ARG_ENABLE(tcp-transport, - AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), + AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), [TCPCONN=$enableval], [TCPCONN=yes]) AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) AC_MSG_RESULT($TCPCONN) @@ -127,7 +126,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ *) localdef="no" ;; esac] AC_ARG_ENABLE(local-transport, - AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), + AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), [LOCALCONN=$enableval], [LOCALCONN=$localdef]) AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) AC_MSG_RESULT($LOCALCONN) @@ -145,7 +144,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], [AC_REQUIRE([XTRANS_TCP_FLAGS]) AC_ARG_ENABLE(secure-rpc, - AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), + AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), [SECURE_RPC=$enableval], [SECURE_RPC="try"]) if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then diff --git a/fontconfig/autogen.sh b/fontconfig/autogen.sh index 1482e401c..29c1fd26c 100644 --- a/fontconfig/autogen.sh +++ b/fontconfig/autogen.sh @@ -24,10 +24,19 @@ LIBTOOLIZE=${LIBTOOLIZE-libtoolize} AUTOMAKE=${AUTOMAKE-automake} AUTOHEADER=${AUTOHEADER-autoheader} AUTOCONF=${AUTOCONF-autoconf} +GPERF=${GPERF-gperf} LIBTOOLIZE_FLAGS="--copy --force" DIE=0 +($GPERF --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have gperf installed to compile $PROJECT." + echo "Install the appropriate package for your distribution." + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + have_libtool=false if $LIBTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then libtool_version=`$LIBTOOLIZE --version | sed 's/^.* \([0-9][.][0-9.]*\)[^ ]*$/\1/'` diff --git a/fontconfig/conf.d/10-no-sub-pixel.conf b/fontconfig/conf.d/10-no-sub-pixel.conf index cf1246561..635847c40 100644 --- a/fontconfig/conf.d/10-no-sub-pixel.conf +++ b/fontconfig/conf.d/10-no-sub-pixel.conf @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> -<!-- Enable sub-pixel rendering --> +<!-- Disable sub-pixel rendering --> <match target="pattern"> <!-- This configuration is available on the major desktop environments. diff --git a/fontconfig/conf.d/30-metric-aliases.conf b/fontconfig/conf.d/30-metric-aliases.conf index d0d9ea2e0..49a960247 100644 --- a/fontconfig/conf.d/30-metric-aliases.conf +++ b/fontconfig/conf.d/30-metric-aliases.conf @@ -22,8 +22,11 @@ Microsoft fonts: Liberation fonts: Google CrOS core fonts: StarOffice fo ================ ====================== ======================= ================= ============== Arial Liberation Sans Arimo Albany Albany AMT Arial Narrow Liberation Sans Narrow -Times New Roman Liberation Serif Cousine Thorndale Thorndale AMT -Courier New Liberation Mono Tinos Cumberland Cumberland AMT +Times New Roman Liberation Serif Tinos Thorndale Thorndale AMT +Courier New Liberation Mono Cousine Cumberland Cumberland AMT +Cambria Caladea +Calibri Carlito +Symbol SymbolNeu Microsoft fonts: Other fonts: ================ ============ @@ -307,7 +310,26 @@ but in an order preferring similar designs first. We do this in three steps: </default> </alias> + <alias binding="same"> + <family>Caladea</family> + <default> + <family>Cambria</family> + </default> + </alias> + <alias binding="same"> + <family>Carlito</family> + <default> + <family>Calibri</family> + </default> + </alias> + + <alias binding="same"> + <family>SymbolNeu</family> + <default> + <family>Symbol</family> + </default> + </alias> <!-- Accept the other group as fallback --> @@ -494,4 +516,25 @@ but in an order preferring similar designs first. We do this in three steps: </accept> </alias> + <alias binding="same"> + <family>Cambria</family> + <accept> + <family>Caladea</family> + </accept> + </alias> + + <alias binding="same"> + <family>Calibri</family> + <accept> + <family>Carlito</family> + </accept> + </alias> + + <alias binding="same"> + <family>Symbol</family> + <accept> + <family>SymbolNeu</family> + </accept> + </alias> + </fontconfig> diff --git a/fontconfig/configure.ac b/fontconfig/configure.ac index 44789149b..728a55099 100644 --- a/fontconfig/configure.ac +++ b/fontconfig/configure.ac @@ -148,52 +148,42 @@ AC_TYPE_PID_T # Checks for library functions. AC_FUNC_VPRINTF AC_FUNC_MMAP -AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat]) +AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink regcomp regerror regexec regfree fstatvfs fstatfs lstat]) dnl AC_CHECK_FUNCS doesn't check for header files. dnl posix_fadvise() may be not available in older libc. -fc_saved_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS $WARN_CFLAGS -Werror" -AC_MSG_CHECKING([for posix_fadvise]) -AC_LINK_IFELSE([AC_LANG_SOURCE([[ - #include <fcntl.h> - int main(void) { - return posix_fadvise(0, 0, 0, 0); - } - ]])],[ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_POSIX_FADVISE], [1], [Define to 1 if you have the 'posix_fadvise' function.]) - ],[AC_MSG_RESULT([no])]) +AC_CHECK_SYMBOL([posix_fadvise], [fcntl.h], [fc_func_posix_fadvise=1], [fc_func_posix_fadvise=0]) +AC_DEFINE_UNQUOTED([HAVE_POSIX_FADVISE], [$fc_func_posix_fadvise], [Define to 1 if you have the 'posix_fadivse' function.]) if test "$os_win32" = "no"; then AC_MSG_CHECKING([for scandir]) - AC_LINK_IFELSE([AC_LANG_SOURCE([[ + fc_saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $WARN_CFLAGS -Werror" + AC_TRY_COMPILE([ #include <dirent.h> - int comp(const struct dirent **, const struct dirent **); - int comp(const struct dirent **a, const struct dirent **b) { return 0; } - int main(void) { - struct dirent **d; - return scandir(".", &d, 0, &comp) >= 0; - } - ]])],[ + int main(void); + ], [ + int (* comp) (const struct dirent **, const struct dirent **) = 0; + struct dirent **d; + return scandir(".", &d, 0, comp) >= 0; + ], [ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_SCANDIR], [1], [Define to 1 if you have the 'scandir' function.]) + ], [ + AC_TRY_COMPILE([ + #include <dirent.h> + int main(void); + ], [ + int (* comp) (const void *, const void *) = 0; + struct dirent **d; + return scandir(".", &d, 0, comp) >= 0; + ], [ AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SCANDIR], [1], [Define to 1 if you have the 'scandir' function.]) + AC_DEFINE([HAVE_SCANDIR_VOID_P], [1], [Define to 1 if you have the 'scandir' function with int (* compar)(const void *, const void *)]) ],[ - AC_LINK_IFELSE([AC_LANG_SOURCE([[ - #include <dirent.h> - int comp(const void *, const void *); - int comp(const void *a, const void *b) { return 0; } - int main(void) { - struct dirent **d; - return scandir(".", &d, 0, &comp) >= 0; - } - ]])],[ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_SCANDIR_VOID_P], [1], [Define to 1 if you have the 'scandir' function with int (* compar)(const void *, const void *)]) - ],[ - AC_MSG_ERROR([ + AC_MSG_ERROR([ *** No scandir function available.]) - ]) ]) + ]) fi CFLAGS="$fc_saved_CFLAGS" @@ -531,7 +521,7 @@ AC_ARG_WITH(cache-dir, case $fc_cachedir in no|yes) if test "$os_win32" = "yes"; then - fc_cachedir="WINDOWSTEMPDIR_FONTCONFIG_CACHE" + fc_cachedir="LOCAL_APPDATA_FONTCONFIG_CACHE" else fc_cachedir='${localstatedir}/cache/${PACKAGE}' fi diff --git a/fontconfig/m4/ac_check_symbol.m4 b/fontconfig/m4/ac_check_symbol.m4 new file mode 100644 index 000000000..41c15286a --- /dev/null +++ b/fontconfig/m4/ac_check_symbol.m4 @@ -0,0 +1,48 @@ +dnl @synopsis AC_CHECK_SYMBOL(SYMBOL, HEADER... [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) +dnl +dnl a wrapper around AC_EGREP_HEADER the shellvar $ac_found will hold +dnl the HEADER-name that had been containing the symbol. This value is +dnl shown to the user. +dnl +dnl @category C +dnl @author Guido U. Draheim <guidod@gmx.de> +dnl @version 2006-10-13 +dnl @license GPLWithACException + +AC_DEFUN([AC_CHECK_SYMBOL], +[AC_MSG_CHECKING([for $1 in $2]) +AC_CACHE_VAL(ac_cv_func_$1, +[AC_REQUIRE_CPP()dnl +changequote(, )dnl +symbol="[^a-zA-Z_0-9]$1[^a-zA-Z_0-9]" +changequote([, ])dnl +ac_found=no +for ac_header in $2 ; do + ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%' ` + if test $ac_found != "yes" ; then + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + AC_EGREP_HEADER( $symbol, $ac_header, [ac_found="$ac_header"] ) + fi + fi +done +if test "$ac_found" != "no" ; then + AC_MSG_RESULT($ac_found) + ifelse([$3], , :, [$3]) +else + AC_MSG_RESULT(no) + ifelse([$4], , , [$4 +])dnl +fi +])]) + +dnl AC_CHECK_SYMBOLS( symbol..., header... [, action-if-found [, action-if-not-found]]) +AC_DEFUN([AC_CHECK_SYMBOLS], +[for ac_func in $1 +do +P4_CHECK_SYMBOL($ac_func, $2, +[changequote(, )dnl + ac_tr_func=HAVE_`echo $ac_func | sed -e 'y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:' -e 's:[[^A-Z0-9]]:_:'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl +done +]) diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c index c7f243749..10eacffdf 100644 --- a/fontconfig/src/fccache.c +++ b/fontconfig/src/fccache.c @@ -573,7 +573,7 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat) { #if defined(HAVE_MMAP) || defined(__CYGWIN__) cache = mmap (0, fd_stat->st_size, PROT_READ, MAP_SHARED, fd, 0); -#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED) +#if (HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED) posix_fadvise (fd, 0, fd_stat->st_size, POSIX_FADV_WILLNEED); #endif if (cache == MAP_FAILED) diff --git a/fontconfig/src/fcdefault.c b/fontconfig/src/fcdefault.c index c6397c0c2..4beda7c00 100644 --- a/fontconfig/src/fcdefault.c +++ b/fontconfig/src/fcdefault.c @@ -149,7 +149,7 @@ retry: #else # if defined (HAVE_GETEXECNAME) const char *p = getexecname (); -# else +# elif defined (HAVE_READLINK) char buf[PATH_MAX + 1]; int len; char *p = NULL; @@ -160,6 +160,8 @@ retry: buf[len] = '\0'; p = buf; } +# else + char *p = NULL; # endif if (p) { diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c index 627aa1a16..93e013f9b 100644 --- a/fontconfig/src/fcmatch.c +++ b/fontconfig/src/fcmatch.c @@ -743,6 +743,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr { FcBool ret = FcFalse; FcCharSet *cs; + int i; cs = 0; if (trim || csp) @@ -752,7 +753,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr goto bail; } - while (nnode--) + for (i = 0; i < nnode; i++) { FcSortNode *node = *n++; FcBool adds_chars = FcFalse; @@ -776,7 +777,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr * If this font isn't a subset of the previous fonts, * add it to the list */ - if (!trim || adds_chars) + if (!i || !trim || adds_chars) { FcPatternReference (node->pattern); if (FcDebug () & FC_DBG_MATCHV) diff --git a/gl/configure.ac b/gl/configure.ac index 04511930e..7b0c60899 100644 --- a/gl/configure.ac +++ b/gl/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.60]) -AC_INIT([GLProto], [1.4.16], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AC_INIT([GLProto], [1.4.17], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) # Require xorg-macros: XORG_DEFAULT_OPTIONS diff --git a/gl/glxtokens.h b/gl/glxtokens.h index 5e6bbea11..a95082e47 100644 --- a/gl/glxtokens.h +++ b/gl/glxtokens.h @@ -107,6 +107,8 @@ extern "C" { /* GLX_RENDER_TYPE bits */ #define GLX_RGBA_BIT 0x00000001 #define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 /* GLX_DRAWABLE_TYPE bits */ #define GLX_WINDOW_BIT 0x00000001 diff --git a/libX11/include/X11/Xlib.h b/libX11/include/X11/Xlib.h index f29976354..8ecaea48f 100644 --- a/libX11/include/X11/Xlib.h +++ b/libX11/include/X11/Xlib.h @@ -58,23 +58,11 @@ typedef unsigned long wchar_t; #endif #endif -#if defined(ISC) && defined(USE_XMBTOWC) -#define wctomb(a,b) _Xwctomb(a,b) -#define mblen(a,b) _Xmblen(a,b) -#ifndef USE_XWCHAR_STRING -#define mbtowc(a,b,c) _Xmbtowc(a,b,c) -#endif -#endif extern int _Xmblen( -#ifdef ISC - char const *str, - size_t len -#else char *str, int len -#endif ); /* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in @@ -3999,13 +3987,8 @@ extern void XSetAuthorization( extern int _Xmbtowc( wchar_t * /* wstr */, -#ifdef ISC - char const * /* str */, - size_t /* len */ -#else char * /* str */, int /* len */ -#endif ); extern int _Xwctomb( diff --git a/libX11/modules/om/generic/omGeneric.c b/libX11/modules/om/generic/omGeneric.c index e263d595e..d9dc18bb3 100644 --- a/libX11/modules/om/generic/omGeneric.c +++ b/libX11/modules/om/generic/omGeneric.c @@ -834,7 +834,7 @@ parse_omit_name( return True; /* This may mot be needed anymore as XListFonts() takes care of this */ - while (num_fields < 12) { + if (num_fields < 12) { if ((last - buf) > (XLFD_MAX_LEN - 2)) return -1; *last = '*'; diff --git a/libX11/src/xlibi18n/lcStd.c b/libX11/src/xlibi18n/lcStd.c index 87f6b60b3..9d452bcae 100644 --- a/libX11/src/xlibi18n/lcStd.c +++ b/libX11/src/xlibi18n/lcStd.c @@ -199,13 +199,8 @@ _Xlcwcstombs( int _Xmbtowc( wchar_t *wstr, -#ifdef ISC - char const *str, - size_t len -#else char *str, int len -#endif ) { return _Xlcmbtowc((XLCd) NULL, wstr, str, len); @@ -213,13 +208,8 @@ _Xmbtowc( int _Xmblen( -#ifdef ISC - char const *str, - size_t len -#else char *str, int len -#endif ) { return _Xmbtowc((wchar_t *) NULL, str, len); diff --git a/libX11/src/xlibi18n/makefile b/libX11/src/xlibi18n/makefile index 01fcfa26d..01fcfa26d 100755..100644 --- a/libX11/src/xlibi18n/makefile +++ b/libX11/src/xlibi18n/makefile diff --git a/libXft/src/xftglyphs.c b/libXft/src/xftglyphs.c index 2f3dc5a6b..4b5fb82e5 100644 --- a/libXft/src/xftglyphs.c +++ b/libXft/src/xftglyphs.c @@ -21,10 +21,10 @@ */ #include "xftint.h" -#include <freetype/ftoutln.h> -#include <freetype/ftlcdfil.h> +#include FT_OUTLINE_H +#include FT_LCD_FILTER_H -#include <freetype/ftsynth.h> +#include FT_SYNTHESIS_H /* * Validate the memory info for a font diff --git a/libXinerama/src/Xinerama.c b/libXinerama/src/Xinerama.c index 8472ec5d0..8472ec5d0 100755..100644 --- a/libXinerama/src/Xinerama.c +++ b/libXinerama/src/Xinerama.c diff --git a/libXmu/src/ShapeWidg.c b/libXmu/src/ShapeWidg.c index 32388ee46..3ca711648 100644 --- a/libXmu/src/ShapeWidg.c +++ b/libXmu/src/ShapeWidg.c @@ -201,7 +201,7 @@ ShapeEllipseOrRoundedRectangle(Widget w, Bool ellipse, int ew, int eh) GC gc; unsigned long mask; - if (width < 3 || width < 3) + if (width < 3 || height < 3) return; width += w->core.border_width << 1; height += w->core.border_width << 1; diff --git a/libxcb/NEWS b/libxcb/NEWS index 533d72b87..d0198f59c 100644 --- a/libxcb/NEWS +++ b/libxcb/NEWS @@ -1,6 +1,43 @@ +Release 1.10 (2013-12-XX) +========================= +* Bump libxcb-xkb SONAME due to ABI break introduced in 1.9.2 +* Enable libxcb-xkb by default +* Bump libxcb-sync SONAME +* c_client.py: Fix _sizeof() functions +* c_client.py: Do not create pointers in unions +* c_client.py: Always initialize xcb_align_to +* Re-introduce xcb_ge_event_t (deprecated, xcb_ge_generic_event_t should be + used instead) +* Fix alignment issues in FD passing code +* Fix poll() if POLLIN == ROLLRDNORM|POLLRDBAND +* Use /usr/spool/sockets/X11/ on HP-UX for UNIX sockets +* Make xsltproc optional + +Release 1.9.3 (2013-11-07) +========================== +* Check if we need to define _XOPEN_SOURCE for struct msghdr.msg_control +* Add configure option to enable or disable fd passing with sendmsg +* Switch to using the CMSG_* macros for FD passing +* Initialize automake earlier (bugfix for #66413) + +Release 1.9.2 (2013-11-07) +========================== +* Add Present extension +* Add DRI3 library +* Add event queue splitting +* Add support for receiving fds in replies +* Add xcb_send_fd API +* Remove xcb_ge_event_t from xcb.h +* c_client.py: Inject full_sequence into GE events +* c_client.py: Handle multiple expr. in a bitcase + +Release 1.9.1 (2013-05-30) +========================== +* Fix python code to work with python-3 +* Security fix for integer overflow in read_packet() [CVE-2013-2064] + Release 1.9 (2012-10-05) ======================== - * Always include "config.h" at the start of all C source files. * Add AC_USE_SYSTEM_EXTENSIONS to allow use of more system functionality * Return connection failure if display string specifies non-existent screen diff --git a/libxcb/configure.ac b/libxcb/configure.ac index 87804ba26..294bd1a92 100644 --- a/libxcb/configure.ac +++ b/libxcb/configure.ac @@ -41,7 +41,7 @@ fi AC_SUBST(HTML_CHECK_RESULT) # Checks for pkg-config packages -PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.9) +PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.10) NEEDED="pthread-stubs xau >= 0.99.2" PKG_CHECK_MODULES(NEEDED, $NEEDED) diff --git a/libxcb/src/Makefile.am b/libxcb/src/Makefile.am index 346ee03cc..f2875dd18 100644 --- a/libxcb/src/Makefile.am +++ b/libxcb/src/Makefile.am @@ -139,7 +139,7 @@ endif EXTSOURCES += sync.c if BUILD_SYNC lib_LTLIBRARIES += libxcb-sync.la -libxcb_sync_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@ +libxcb_sync_la_LDFLAGS = -version-info 1:0:0 -no-undefined @lt_enable_auto_import@ libxcb_sync_la_LIBADD = $(XCB_LIBS) nodist_libxcb_sync_la_SOURCES = sync.c sync.h endif @@ -179,7 +179,7 @@ endif EXTSOURCES += xinput.c if BUILD_XINPUT lib_LTLIBRARIES += libxcb-xinput.la -libxcb_xinput_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@ +libxcb_xinput_la_LDFLAGS = -version-info 1:0:1 -no-undefined @lt_enable_auto_import@ libxcb_xinput_la_LIBADD = $(XCB_LIBS) nodist_libxcb_xinput_la_SOURCES = xinput.c xinput.h endif @@ -187,7 +187,7 @@ endif EXTSOURCES += xkb.c if BUILD_XKB lib_LTLIBRARIES += libxcb-xkb.la -libxcb_xkb_la_LDFLAGS = -version-info 0:0:0 -no-undefined +libxcb_xkb_la_LDFLAGS = -version-info 1:0:0 -no-undefined libxcb_xkb_la_LIBADD = $(XCB_LIBS) nodist_libxcb_xkb_la_SOURCES = xkb.c xkb.h endif diff --git a/libxcb/src/c_client.py b/libxcb/src/c_client.py index 3f7c00859..407c06259 100644 --- a/libxcb/src/c_client.py +++ b/libxcb/src/c_client.py @@ -1062,8 +1062,8 @@ def _c_serialize_helper(context, complex_type, if context in ('unserialize', 'unpack', 'sizeof') and not self.var_followed_by_fixed_fields: code_lines.append('%s xcb_block_len += sizeof(%s);' % (space, self.c_type)) code_lines.append('%s xcb_tmp += xcb_block_len;' % space) - # probably not needed - #_c_serialize_helper_insert_padding(context, code_lines, space, False) + code_lines.append('%s xcb_buffer_len += xcb_block_len;' % space) + code_lines.append('%s xcb_block_len = 0;' % space) count += _c_serialize_helper_fields(context, self, code_lines, temp_vars, diff --git a/libxcb/src/xcb.h b/libxcb/src/xcb.h index 8cdba0550..6571ee693 100644 --- a/libxcb/src/xcb.h +++ b/libxcb/src/xcb.h @@ -142,6 +142,26 @@ typedef struct { } xcb_generic_event_t; /** + * @brief GE event + * + * An event as sent by the XGE extension. The length field specifies the + * number of 4-byte blocks trailing the struct. + * + * @deprecated Since some fields in this struct have unfortunate names, it is + * recommended to use xcb_ge_generic_event_t instead. + */ +typedef struct { + uint8_t response_type; /**< Type of the response */ + uint8_t pad0; /**< Padding */ + uint16_t sequence; /**< Sequence number */ + uint32_t length; + uint16_t event_type; + uint16_t pad1; + uint32_t pad[5]; /**< Padding */ + uint32_t full_sequence; /**< full sequence */ +} xcb_ge_event_t; + +/** * @brief Generic error. * * A generic error structure. diff --git a/libxcb/src/xcb_in.c b/libxcb/src/xcb_in.c index 5506e3088..1eef6caf5 100644 --- a/libxcb/src/xcb_in.c +++ b/libxcb/src/xcb_in.c @@ -919,11 +919,13 @@ int _xcb_in_read(xcb_connection_t *c) #if HAVE_SENDMSG struct cmsghdr *hdr; - for (hdr = CMSG_FIRSTHDR(&msg); hdr; hdr = CMSG_NXTHDR(&msg, hdr)) { - if (hdr->cmsg_level == SOL_SOCKET && hdr->cmsg_type == SCM_RIGHTS) { - int nfd = (hdr->cmsg_len - CMSG_LEN(0)) / sizeof (int); - memcpy(&c->in.in_fd.fd[c->in.in_fd.nfd], CMSG_DATA(hdr), nfd * sizeof (int)); - c->in.in_fd.nfd += nfd; + if (msg.msg_controllen >= sizeof (struct cmsghdr)) { + for (hdr = CMSG_FIRSTHDR(&msg); hdr; hdr = CMSG_NXTHDR(&msg, hdr)) { + if (hdr->cmsg_level == SOL_SOCKET && hdr->cmsg_type == SCM_RIGHTS) { + int nfd = (hdr->cmsg_len - CMSG_LEN(0)) / sizeof (int); + memcpy(&c->in.in_fd.fd[c->in.in_fd.nfd], CMSG_DATA(hdr), nfd * sizeof (int)); + c->in.in_fd.nfd += nfd; + } } } #endif diff --git a/libxcb/xcb-proto/NEWS b/libxcb/xcb-proto/NEWS index ebe184532..50ced6186 100644 --- a/libxcb/xcb-proto/NEWS +++ b/libxcb/xcb-proto/NEWS @@ -1,3 +1,64 @@ +Release 1.10 (2013-12-XX) +========================= +* xkb: comment out portions that libxcb doesn't handle properly +* Present: Remove reference to nonexistent enum +* sync: Add missing namespace for the INT64 struct +* sync: VALUETYPE and TESTTYPE are enum +* xinput: Add XI2 event enum. for event selection +* Rename ge events to GeGeneric events to avoid clash with libxcb + +Release 1.9 (2013-11-07) +======================== +* Add Present protocol specification +* Add DRI3 +* Add MIT-SHM AttachFd and CreateSegment requests +* Add support for file descriptor request fields +* Define X generic event structure +* Add CARD64/INT64 protocol types +* XKB: Rewrite AXOption +* XKB: Fix values of AXFBOpt enum +* xkb: Fix struct ExtensionDeviceNotify +* xkb: Pad structs CommonDoodad and SALockDeviceBtn +* randr: Fix GetProviderProperty reply +* Enforce a bit or value in enum items +* xkb: Add missing LedClass and BellClass enum values +* xkb: Add missing 'supported' field to GetNamedIndicator reply +* xkb: Unify Overlay1Behavior and Overlay2Behavior +* xkb: Change DfltBtnAbsolute to the value used by the server +* xkb: Fix key type map entry field order +* xkb: Work around alignment problems in GetNames and GetMap replies +* xinput: Use BARRIER from xfixes +* xinput: Unlock uninterpreted lists +* xinput: Add XI v2.3 +* xinput: Add XI v2.2 +* xinput: Add XI v2.1 +* xinput: Add XI v2.0 +* xinput: Add XI v1.5 +* xinput: Cleanup implementation of XI up to v1.4 +* Add support for X Generic Extension events +* sync: Change value list param of CreateAlarm and ChangeAlarm into switch +* res: Add ClientIdMask enum +* res: Fix and rename list in ClientIdValue +* randr: Add provider object support (RandR v1.4) +* xtest: Version bump 2.1..2.2 +* glx: Version bump 1.3..1.4 +* composite: Version bump 0.3..0.4 +* xfixes: Rename enum DirectionMask to BarrierDirec. +* XKB: Correct enum to mask +* screensaver: Use enum and mask attributes +* screensaver: Remove wrong fields from Notify event +* Prototype for XRes v1.2 +* XKB: Fix calculation in GetIndicatorMap +* XKB: Fix GetKbdByName +* Allow multiple <enumref> in a <bitcase> +* XKB: Change CARD8 to char where ASCII is expected +* XKB: Fix VirtualMods +* XKB: Fix SymInterpret +* XKB: Fix CountedString16 padding +* xkb: Revert half of d42d791 XKB: Fix broken events +* xfixes: Update to version 5 +* autogen.sh: Implement GNOME Build API + Release 1.8 (2012-10-05) ======================== * dri2: Update to DRI2 1.4 diff --git a/libxcb/xcb-proto/src/xinput.xml b/libxcb/xcb-proto/src/xinput.xml index dd3f18438..fa115bdcd 100644 --- a/libxcb/xcb-proto/src/xinput.xml +++ b/libxcb/xcb-proto/src/xinput.xml @@ -1790,10 +1790,10 @@ authorization from the authors. <eventcopy name="DeviceMotionNotify" number="5" ref="DeviceKeyPress" /> <event name="DeviceFocusIn" number="6"> - <field type="BYTE" name="detail" enum="NotifyDetail" /> + <field type="BYTE" name="detail" enum="xproto:NotifyDetail" /> <field type="TIMESTAMP" name="time" /> <field type="WINDOW" name="window" /> - <field type="BYTE" name="mode" enum="NotifyMode" /> + <field type="BYTE" name="mode" enum="xproto:NotifyMode" /> <field type="CARD8" name="device_id" /> <pad bytes="18" /> </event> @@ -2003,8 +2003,8 @@ authorization from the authors. <field type="TIMESTAMP" name="time" altenum="Time" /> <!-- event specific fields --> <field type="DeviceId" name="sourceid" altenum="Device" /> - <field type="CARD8" name="mode" enum="NotifyMode" /> - <field type="CARD8" name="detail" enum="NotifyDetail" /> + <field type="CARD8" name="mode" enum="xinput:NotifyMode" /> + <field type="CARD8" name="detail" enum="xinput:NotifyDetail" /> <field type="WINDOW" name="root" /> <field type="WINDOW" name="event" /> <field type="WINDOW" name="child" /> diff --git a/libxcb/xcb-proto/src/xproto.xml b/libxcb/xcb-proto/src/xproto.xml index defa11e6e..07795682c 100644 --- a/libxcb/xcb-proto/src/xproto.xml +++ b/libxcb/xcb-proto/src/xproto.xml @@ -1080,7 +1080,7 @@ The number of keycodes altered. </doc> </event> - <event name="ge" number="35" xge="true"> + <event name="GeGeneric" number="35" xge="true"> <pad bytes="22" /> <doc> <brief>generic event (with length)</brief> diff --git a/mesalib/Makefile.am b/mesalib/Makefile.am index 361fb5122..4780510ad 100644 --- a/mesalib/Makefile.am +++ b/mesalib/Makefile.am @@ -36,7 +36,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION) EXTRA_FILES = \ aclocal.m4 \ configure \ - VERSION \ bin/ar-lib \ bin/compile \ bin/config.sub \ @@ -46,6 +45,7 @@ EXTRA_FILES = \ bin/ltmain.sh \ bin/missing \ bin/ylwrap \ + bin/test-driver \ src/glsl/glsl_parser.cpp \ src/glsl/glsl_parser.h \ src/glsl/glsl_lexer.cpp \ diff --git a/mesalib/configure.ac b/mesalib/configure.ac index 8c52535e6..f75325d33 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -28,7 +28,7 @@ AC_SUBST([OSMESA_VERSION]) dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.24 -LIBDRM_RADEON_REQUIRED=2.4.49 +LIBDRM_RADEON_REQUIRED=2.4.50 LIBDRM_INTEL_REQUIRED=2.4.49 LIBDRM_NVVIEUX_REQUIRED=2.4.33 LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41" @@ -231,6 +231,12 @@ AC_SUBST([VISIBILITY_CFLAGS]) AC_SUBST([VISIBILITY_CXXFLAGS]) dnl +dnl Optional flags, check for compiler support +dnl +AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_SUPPORTED=1], [SSE41_SUPPORTED=0]) +AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1]) + +dnl dnl Hacks to enable 32 or 64 bit build dnl AC_ARG_ENABLE([32-bit], @@ -761,6 +767,9 @@ AC_SUBST([MESA_LLVM]) # Check for libdrm PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED], [have_libdrm=yes], [have_libdrm=no]) +if test "x$have_libdrm" = xyes; then + DEFINES="$DEFINES -DHAVE_LIBDRM" +fi PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED], have_libudev=yes, have_libudev=no) @@ -833,7 +842,7 @@ xyesno) dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8" if test x"$enable_dri3" = xyes; then - dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence" + dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= 1.1" fi # add xf86vidmode if available @@ -1439,6 +1448,8 @@ for plat in $egl_platforms; do drm) test "x$enable_gbm" = "xno" && AC_MSG_ERROR([EGL platform drm needs gbm]) + test "x$have_libdrm" != xyes && + AC_MSG_ERROR([EGL platform drm requires libdrm >= $LIBDRM_REQUIRED]) ;; android|fbdev|gdi|null) @@ -1541,6 +1552,7 @@ strip_unwanted_llvm_flags() { -e 's/-O.\>//g' \ -e 's/-g\>//g' \ -e 's/-Wall\>//g' \ + -e 's/-fcolor-diagnostics\>//g' \ -e 's/-fomit-frame-pointer\>//g' } @@ -1938,7 +1950,7 @@ AC_SUBST([XVMC_MAJOR], 1) AC_SUBST([XVMC_MINOR], 0) AC_SUBST([XA_MAJOR], 2) -AC_SUBST([XA_MINOR], 0) +AC_SUBST([XA_MINOR], 1) AC_SUBST([XA_TINY], 0) AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY") diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt index 059ae9840..f98a54a78 100644 --- a/mesalib/docs/GL3.txt +++ b/mesalib/docs/GL3.txt @@ -30,14 +30,15 @@ GL 3.0 --- all DONE: i965, nv50, nvc0, r600, radeonsi GL_EXT_texture_shared_exponent DONE (swrast) Float depth buffers (GL_ARB_depth_buffer_float) DONE () Framebuffer objects (GL_ARB_framebuffer_object) DONE (r300, swrast) - Half-float DONE (r300, swrast) - Non-normalized Integer texture/framebuffer formats DONE () - 1D/2D Texture arrays DONE () + GL_ARB_half_float_pixel DONE (r300, swrast) + GL_ARB_half_float_vertex DONE (r300, swrast) + GL_EXT_texture_integer DONE () + GL_EXT_texture_array DONE () Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE (swrast) GL_EXT_texture_compression_rgtc DONE (r300, swrast) - Red and red/green texture formats DONE (r300, swrast) + GL_ARB_texture_rg DONE (r300, swrast) Transform feedback (GL_EXT_transform_feedback) DONE () - Vertex array objects (GL_APPLE_vertex_array_object) DONE + Vertex array objects (GL_ARB_vertex_array_object) DONE (all drivers) sRGB framebuffer format (GL_EXT_framebuffer_sRGB) DONE () glClearBuffer commands DONE glGetStringi command DONE @@ -45,6 +46,7 @@ GL 3.0 --- all DONE: i965, nv50, nvc0, r600, radeonsi glVertexAttribI commands DONE Depth format cube textures DONE () GLX_ARB_create_context (GLX 1.4 is required) DONE + Multisample anti-aliasing DONE (r300) GL 3.1 --- all DONE: i965, nv50, nvc0, r600, radeonsi diff --git a/mesalib/docs/devinfo.html b/mesalib/docs/devinfo.html index b495097c9..a9d8b4f7d 100644 --- a/mesalib/docs/devinfo.html +++ b/mesalib/docs/devinfo.html @@ -17,7 +17,7 @@ <h1>Development Notes</h1> -<h2>Adding Extentions</h2> +<h2>Adding Extensions</h2> <p> To add a new GL extension to Mesa you have to do at least the following. @@ -190,11 +190,26 @@ you should add an appropriate note to the commit message. Here are some examples of such a note: </p> <ul> - <li>NOTE: This is a candidate for the 9.0 branch.</li> - <li>NOTE: This is a candidate for the 8.0 and 9.0 branches.</li> - <li>NOTE: This is a candidate for the stable branches.</li> + <li>CC: <mesa-stable@lists.freedesktop.org></li> + <li>CC: "9.2 10.0" <mesa-stable@lists.freedesktop.org></li> + <li>CC: "10.0" <mesa-stable@lists.freedesktop.org></li> </ul> +Simply adding the CC to the mesa-stable list address is adequate to nominate +the commit for the most-recently-created stable branch. It is only necessary +to specify a specific branch name, (such as "9.2 10.0" or "10.0" in the +examples above), if you want to nominate the commit for an older stable +branch. And, as in these examples, you can nominate the commit for the older +branch in addition to the more recent branch, or nominate the commit +exclusively for the older branch. + +This "CC" syntax for patch nomination will cause patches to automatically be +copied to the mesa-stable@ mailing list when you use "git send-email" to send +patches to the mesa-dev@ mailing list. Also, if you realize that a commit +should be nominate for the stable branch after it has already been commited, +you can send a note directly to the mesa-stable@lists.freedesktop.org where +the Mesa stable-branch maintainers will receive it. Be sure to mention the +commit ID of the commit of interest (as it appears in the mesa master branch). <h2>Cherry-picking candidates for a stable branch</h2> diff --git a/mesalib/docs/index.html b/mesalib/docs/index.html index 3b8dd31cd..e26e9e5b7 100644 --- a/mesalib/docs/index.html +++ b/mesalib/docs/index.html @@ -16,6 +16,20 @@ <h1>News</h1> +<h2>December 12, 2013</h2> +<p> +<a href="relnotes/10.0.1.html">Mesa 10.0.1</a> +and <a href="relnotes/9.2.5.html">Mesa 9.2.5</a> are released. +These are both bug-fix releases +</p> + +<h2>November 30, 2013</h2> +<p> +<a href="relnotes/10.0.html">Mesa 10.0</a> is released. +This is a new development release. +See the release notes for more information about the release. +</p> + <h2>November 27, 2013</h2> <p> <a href="relnotes/9.2.4.html">Mesa 9.2.4</a> is released. diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html index 24c0153b2..70e5862fa 100644 --- a/mesalib/docs/relnotes.html +++ b/mesalib/docs/relnotes.html @@ -22,7 +22,9 @@ The release notes summarize what's new or changed in each Mesa release. <ul> <li><a href="relnotes/10.1.html">10.1 release notes</a> +<li><a href="relnotes/10.0.1.html">10.0.1 release notes</a> <li><a href="relnotes/10.0.html">10.0 release notes</a> +<li><a href="relnotes/9.2.5.html">9.2.5 release notes</a> <li><a href="relnotes/9.2.4.html">9.2.4 release notes</a> <li><a href="relnotes/9.2.3.html">9.2.3 release notes</a> <li><a href="relnotes/9.2.2.html">9.2.2 release notes</a> diff --git a/mesalib/docs/relnotes/10.0.1.html b/mesalib/docs/relnotes/10.0.1.html new file mode 100644 index 000000000..b3f900b5f --- /dev/null +++ b/mesalib/docs/relnotes/10.0.1.html @@ -0,0 +1,150 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>Mesa Release Notes</title> + <link rel="stylesheet" type="text/css" href="../mesa.css"> +</head> +<body> + +<div class="header"> + <h1>The Mesa 3D Graphics Library</h1> +</div> + +<iframe src="../contents.html"></iframe> +<div class="content"> + +<h1>Mesa 10.0.1 Release Notes / (December 12, 2013)</h1> + +<p> +Mesa 10.0.1 is a bug fix release which fixes bugs found since the 10.0 release. +</p> +<p> +Mesa 10.0.1 implements the OpenGL 3.3 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.3. OpenGL +3.3 is <strong>only</strong> available if requested at context creation +because compatibility contexts not supported. +</p> + + +<h2>MD5 checksums</h2> +<pre> +0a72ca5b36046a658bf6038326ff32ed MesaLib-10.0.1.tar.bz2 +01bde35c912e504ba62caf1ef9f7022c MesaLib-10.0.1.tar.gz +59a174a11a89e6b1b8ee9c3f7e3c388c MesaLib-10.0.1.zip +</pre> + + +<h2>New features</h2> +<p>None</p> + +<h2>Bug fixes</h2> + +<p>This list is likely incomplete.</p> + +<ul> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64323">Bug 64323</a> - Severe misrendering in Left 4 Dead 2</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68838">Bug 68838</a> - GLSL: struct declarations produce a "empty declaration warning" in 9.2</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">Bug 69155</a> - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70250">Bug 70250</a> - weston-terminal rendering corrupted with output transform 90 and 270</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70601">Bug 70601</a> - [SNB Bisected]Piglit spec/ARB_texture_float/multisample-formats 2 GL_ARB_texture_float fails</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72230">Bug 72230</a> - Unable to extract MesaLib-10.0.0.tar.{gz,bz2} with bsdtar</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72325">Bug 72325</a> - [swrast] piglit glean fbo regression</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72327">Bug 72327</a> - [swrast] piglit glean pointSprite regression</li> + +</ul> + +<h2>Changes</h2> + +<p>The full set of changes can be viewed by using the following git command:</p> + +<pre> + git log mesa-10.0..mesa-10.0.1 +</pre> + +<p>Axel Davy (2):</p> +<ul> + <li>egl/wayland: Flush the wl_display at the end of SwapBuffers</li> + <li>Enable throttling in SwapBuffers</li> +</ul> + +<p>Chad Versace (2):</p> +<ul> + <li>i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs</li> + <li>i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)</li> +</ul> + +<p>Dave Airlie (1):</p> +<ul> + <li>swrast: fix readback regression since inversion fix</li> +</ul> + +<p>Emil Velikov (1):</p> +<ul> + <li>automake: include only one copy VERSION in tarball</li> +</ul> + +<p>Ian Romanick (3):</p> +<ul> + <li>docs: Add 10.0 release md5sums</li> + <li>Remove a057b83 from the pick list</li> + <li>glsl: Don't emit empty declaration warning for a struct specifier</li> +</ul> + +<p>Ilia Mirkin (8):</p> +<ul> + <li>mesa: don't leak performance monitors on context destroy</li> + <li>nv50: Fix GPU_READING/WRITING bit removal</li> + <li>nouveau: avoid leaking fences while waiting</li> + <li>nv50: wait on the buf's fence before sticking it into pushbuf</li> + <li>nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)</li> + <li>nouveau/video: update h264 picparm field names based on usage</li> + <li>nouveau/video: update a few more h264 picparm field names</li> + <li>nv50: report 15 max inputs for fragment programs</li> +</ul> + +<p>Jordan Justen (1):</p> +<ul> + <li>dri megadriver_stub: add compatibility for older DRI loaders</li> +</ul> + +<p>Kristian Høgsberg (2):</p> +<ul> + <li>egl/wayland: Damage INT32_MAX x INT32_MAX region for eglSwapBuffers</li> + <li>egl/wayland: Send commit after flushing the driver context</li> +</ul> + +<p>Maarten Lankhorst (1):</p> +<ul> + <li>nouveau: Fix compiler warning regression</li> +</ul> + +<p>Paul Berry (1):</p> +<ul> + <li>i965/gen6: Fix multisample resolve blits for luminance/intensity 32F formats.</li> +</ul> + +<p>Thomas Hellstrom (1):</p> +<ul> + <li>st/xa: Bump major version number to 2</li> +</ul> + +<p>Tom Stellard (2):</p> +<ul> + <li>r300/compiler/tests: Fix segfault</li> + <li>r300/compiler/tests: Fix line length check in test parser</li> +</ul> + +</div> +</body> +</html> diff --git a/mesalib/docs/relnotes/10.0.html b/mesalib/docs/relnotes/10.0.html index 1e4f7716f..4622f456f 100644 --- a/mesalib/docs/relnotes/10.0.html +++ b/mesalib/docs/relnotes/10.0.html @@ -14,7 +14,7 @@ <iframe src="../contents.html"></iframe> <div class="content"> -<h1>Mesa 10.0 Release Notes / TBD</h1> +<h1>Mesa 10.0 Release Notes / (November 30th, 2013)</h1> <p> Mesa 10.0 is a new development release. @@ -33,7 +33,9 @@ because compatibility contexts are not supported. <h2>MD5 checksums</h2> <pre> -TBD. +b38626b96c664db67a534d7859682436 MesaLib-10.0.0.tar.gz +f3fe55d9735bea158bbe97ed9a0da819 MesaLib-10.0.0.tar.bz2 +c6ee1ce51e3bf35947d2978b872daf51 MesaLib-10.0.0.zip </pre> @@ -61,7 +63,75 @@ Note: some of the new features are only available with certain drivers. <h2>Bug fixes</h2> -TBD. +<p>Attempts have been made to <b>not</b> include bugs fixed in previous 9.2 +releases or bugs that were regressions during 10.0 development. This list is +likely incomplete.</p> + +<ul> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47755">Bug 47755</a> - [glsl-compiler] no error checking when Interpolation qualifier for built-in variable is different in vertex and fragment shader</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=52171">Bug 52171</a> - [gallium/r600/clover] Simple benchmarks failed to run</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=53077">Bug 53077</a> - [IVB] Output error with msaa when both of framebuffer and source color's alpha are not 1</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54867">Bug 54867</a> - bug in r300 compiler</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60929">Bug 60929</a> - [r600-llvm] mono games with opengl are blocking on start</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62142">Bug 62142</a> - Mesa/demo mipmap_limits upside down with running by SOFTWARE</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62698">Bug 62698</a> - [bisected] WebGL demo "Consumed": texstate.c:628: update_texture_state: Assertion „__builtin_popcount(enabledTargets) == 1“ failed.</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64225">Bug 64225</a> - bfgminer --scyte generates Segmentation Fault on Northern Island</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64226">Bug 64226</a> - python-opencl package generate segmentation fault at pipe_r600.so</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64261">Bug 64261</a> - [SNB Bisected]Ogles3conform GL3Tests_color_buffer_float_color_buffer_float_clamp_fixed.test fail</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66213">Bug 66213</a> - Certain Mesa Demos Rendering Inverted (vertically)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66806">Bug 66806</a> - [softpipe] glxgears floating point exception</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=67921">Bug 67921</a> - [bisected commit 883987] crosscompiling fails with util/u_cpu_detect.c:247:4: error: 'asm' undeclared (first use in this function)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68162">Bug 68162</a> - [radeonsi] texture rendering is broken in Source-Engine games</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68451">Bug 68451</a> - Texture flicker in native Dota2 in mesa 9.2.0rc1</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68503">Bug 68503</a> - Graphical glitches in Serious Sam 3 when SB is enabled</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68792">Bug 68792</a> - Problems during playback of h264 files using UVD and VLC on AMD E-350 CPU</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68845">Bug 68845</a> - VDPAU/UVD regression</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69078">Bug 69078</a> - Modern Warfare (1, 2 and 3) broken in Wine on SNB</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69321">Bug 69321</a> - starting openCL crashes/boots system</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70042">Bug 70042</a> - Major texture flickering in Dota 2 (r600g on HD 6950)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70088">Bug 70088</a> - Glamor on r600g crashes Xserver</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70123">Bug 70123</a> - Freeze caused by 'winsys/radeon: remove cs_queue_empty' commit</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70327">Bug 70327</a> - Casting floating point variable to integer not working properly while constant gets converted properly</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70891">Bug 70891</a> - CL_INVALID_BUILD_OPTIONS results in CL_INVALID_DEVICE when asking for build log</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70913">Bug 70913</a> - [PIGLIT,radeonsi] crash in "spec/EXT_framebuffer_multisample/sample-alpha-to-coverage 4 depth" (buffer overflow)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71022">Bug 71022</a> - configure: error: Expat required for DRI.</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71110">Bug 71110</a> - xorg_driver.c:1030:2: error: too many arguments to function ‘DamageUnregister’</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71172">Bug 71172</a> - Segfault when running glxinfo. NV25GL [Quadro4 900 XGL]</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71512">Bug 71512</a> - dlopen.h:54: undefined reference to `dlopen'</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71870">Bug 71870</a> - Metro: Last Light rendering issues</li> + +</ul> <h2>Changes</h2> diff --git a/mesalib/docs/relnotes/10.1.html b/mesalib/docs/relnotes/10.1.html index 1b8ea22f8..778ae6a57 100644 --- a/mesalib/docs/relnotes/10.1.html +++ b/mesalib/docs/relnotes/10.1.html @@ -45,6 +45,7 @@ Note: some of the new features are only available with certain drivers. <ul> <li>GL_ARB_draw_indirect on i965.</li> +<li>GL_ARB_clear_buffer_object</li> </ul> @@ -54,7 +55,11 @@ TBD. <h2>Changes</h2> -TBD. +<ul> +<li>Removed support for the GL_MESA_texture_array extension. This extension + enabled the use of texture array with fixed-function and assembly fragment + shaders. No applications are known to use this extension.</li> +</ul> </div> </body> diff --git a/mesalib/docs/relnotes/9.2.4.html b/mesalib/docs/relnotes/9.2.4.html index 1ca6b1d13..e4a6fd4e5 100644 --- a/mesalib/docs/relnotes/9.2.4.html +++ b/mesalib/docs/relnotes/9.2.4.html @@ -31,6 +31,9 @@ because GL_ARB_compatibility is not supported. <h2>MD5 checksums</h2> <pre> +28190b831b0271d69dbc44b2686eab1c MesaLib-9.2.4.tar.gz +e630c0a307cec4f0f70ddd029d2fe084 MesaLib-9.2.4.tar.bz2 +8ef5e1e92e1d30fbedec31f716a7619e MesaLib-9.2.4.zip </pre> diff --git a/mesalib/docs/relnotes/9.2.5.html b/mesalib/docs/relnotes/9.2.5.html new file mode 100644 index 000000000..027e1a40a --- /dev/null +++ b/mesalib/docs/relnotes/9.2.5.html @@ -0,0 +1,120 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>Mesa Release Notes</title> + <link rel="stylesheet" type="text/css" href="../mesa.css"> +</head> +<body> + +<div class="header"> + <h1>The Mesa 3D Graphics Library</h1> +</div> + +<iframe src="../contents.html"></iframe> +<div class="content"> + +<h1>Mesa 9.2.5 Release Notes / (December 12, 2013)</h1> + +<p> +Mesa 9.2.5 is a bug fix release which fixes bugs found since the 9.2.4 release. +</p> +<p> +Mesa 9.2 implements the OpenGL 3.1 API, but the version reported by +glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / +glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 3.1. OpenGL +3.1 is <strong>only</strong> available if requested at context creation +because GL_ARB_compatibility is not supported. +</p> + + +<h2>MD5 checksums</h2> +<pre> +9fb4de29ca1d9cfd03cbdefa123ba336 MesaLib-9.2.5.tar.bz2 +1146c7c332767174f3de782b88d8e8ca MesaLib-9.2.5.tar.gz +a9a6c46dac7ea26fd272bf14894d95f3 MesaLib-9.2.5.zip +</pre> + + +<h2>New features</h2> +<p>None</p> + +<h2>Bug fixes</h2> + +<p>This list is likely incomplete.</p> + +<ul> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62142">Bug 62142</a> - Mesa/demo mipmap_limits upside down with running by SOFTWARE</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=64323">Bug 64323</a> - Severe misrendering in Left 4 Dead 2</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66213">Bug 66213</a> - Certain Mesa Demos Rendering Inverted (vertically)</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68838">Bug 68838</a> - GLSL: struct declarations produce a "empty declaration warning" in 9.2</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">Bug 69155</a> - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72325">Bug 72325</a> - [swrast] piglit glean fbo regression</li> + +<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72327">Bug 72327</a> - [swrast] piglit glean pointSprite regression</li> + +</ul> + +<h2>Changes</h2> + +<p>The full set of changes can be viewed by using the following GIT command:</p> + +<pre> + git log mesa-9.2.4..mesa-9.2.5 +</pre> + +<p>Chad Versace (2):</p> +<ul> + <li>i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs</li> + <li>i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)</li> +</ul> + +<p>Chris Forbes (4):</p> +<ul> + <li>i965: Gen4-5: Don't enable hardware alpha test with MRT</li> + <li>i965: Gen4-5: Include alpha func/ref in program key</li> + <li>i965/fs: Gen4-5: Setup discard masks for MRT alpha test</li> + <li>i965/fs: Gen4-5: Implement alpha test in shader for MRT</li> +</ul> + +<p>Chí-Thanh Christopher Nguyễn (1):</p> +<ul> + <li>st/xorg: Handle new DamageUnregister API which has only one argument</li> +</ul> + +<p>Dave Airlie (3):</p> +<ul> + <li>mesa/swrast: fix inverted front buffer rendering with old-school swrast</li> + <li>glx: don't fail out when no configs if we have visuals</li> + <li>swrast: fix readback regression since inversion fix</li> +</ul> + +<p>Ian Romanick (1):</p> +<ul> + <li>glsl: Don't emit empty declaration warning for a struct specifier</li> +</ul> + +<p>Ilia Mirkin (4):</p> +<ul> + <li>nv50: Fix GPU_READING/WRITING bit removal</li> + <li>nouveau: avoid leaking fences while waiting</li> + <li>nv50: wait on the buf's fence before sticking it into pushbuf</li> + <li>nv50: report 15 max inputs for fragment programs</li> +</ul> + +<p>Tom Stellard (2):</p> +<ul> + <li>r300/compiler/tests: Fix segfault</li> + <li>r300/compiler/tests: Fix line length check in test parser</li> +</ul> + +</div> +</body> +</html> diff --git a/mesalib/docs/specs/MESA_texture_array.spec b/mesalib/docs/specs/MESA_texture_array.spec index b146821f7..3e3e82cf3 100644 --- a/mesalib/docs/specs/MESA_texture_array.spec +++ b/mesalib/docs/specs/MESA_texture_array.spec @@ -16,7 +16,7 @@ IP Status Status - Shipping in Mesa 7.1 + DEPRECATED - Support removed in Mesa 10.1. Version diff --git a/mesalib/docs/specs/WL_create_wayland_buffer_from_image.spec b/mesalib/docs/specs/WL_create_wayland_buffer_from_image.spec new file mode 100644 index 000000000..aa5eb4d24 --- /dev/null +++ b/mesalib/docs/specs/WL_create_wayland_buffer_from_image.spec @@ -0,0 +1,101 @@ +Name + + WL_create_wayland_buffer_from_image + +Name Strings + + EGL_WL_create_wayland_buffer_from_image + +Contributors + + Neil Roberts + Axel Davy + Daniel Stone + +Contact + + Neil Roberts <neil.s.roberts@intel.com> + +Status + + Proposal + +Version + + Version 2, October 25, 2013 + +Number + + EGL Extension #not assigned + +Dependencies + + Requires EGL 1.4 or later. This extension is written against the + wording of the EGL 1.4 specification. + + EGL_KHR_base_image is required. + +Overview + + This extension provides an entry point to create a wl_buffer which shares + its contents with a given EGLImage. The expected use case for this is in a + nested Wayland compositor which is using subsurfaces to present buffers + from its clients. Using this extension it can attach the client buffers + directly to the subsurface without having to blit the contents into an + intermediate buffer. The compositing can then be done in the parent + compositor. + + The nested compositor can create an EGLImage from a client buffer resource + using the existing WL_bind_wayland_display extension. It should also be + possible to create buffers using other types of images although there is + no expected use case for that. + +IP Status + + Open-source; freely implementable. + +New Procedures and Functions + + struct wl_buffer *eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, + EGLImageKHR image); + +New Tokens + + None. + +Additions to the EGL 1.4 Specification: + + To create a client-side wl_buffer from an EGLImage call + + struct wl_buffer *eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, + EGLImageKHR image); + + The returned buffer will share the contents with the given EGLImage. Any + updates to the image will also be updated in the wl_buffer. Typically the + EGLImage will be generated in a nested Wayland compositor using a buffer + resource from a client via the EGL_WL_bind_wayland_display extension. + + If there was an error then the function will return NULL. In particular it + will generate EGL_BAD_MATCH if the implementation is not able to represent + the image as a wl_buffer. The possible reasons for this error are + implementation-dependant but may include problems such as an unsupported + format or tiling mode or that the buffer is in memory that is inaccessible + to the GPU that the given EGLDisplay is using. + +Issues + + 1) Under what circumstances can the EGL_BAD_MATCH error be generated? Does + this include for example unsupported tiling modes? + + RESOLVED: Yes, the EGL_BAD_MATCH error can be generated for any reason + which prevents the implementation from representing the image as a + wl_buffer. For example, these problems can be but are not limited to + unsupported tiling modes, inaccessible memory or an unsupported pixel + format. + +Revision History + + Version 1, September 6, 2013 + Initial draft (Neil Roberts) + Version 2, October 25, 2013 + Added a note about more possible reasons for returning EGL_BAD_FORMAT. diff --git a/mesalib/docs/vmware-guest.html b/mesalib/docs/vmware-guest.html index b5f136f33..833f06ceb 100644 --- a/mesalib/docs/vmware-guest.html +++ b/mesalib/docs/vmware-guest.html @@ -134,7 +134,7 @@ As before, if you're on a 32-bit system, you should skip the --libdir configure option. <pre> cd $TOP/mesa - ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa + ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-gallium-drivers=svga --with-dri-drivers= --enable-xa --disable-dri3 make sudo make install </pre> diff --git a/mesalib/include/EGL/eglmesaext.h b/mesalib/include/EGL/eglmesaext.h index 1f07d4cde..14fb07a71 100644 --- a/mesalib/include/EGL/eglmesaext.h +++ b/mesalib/include/EGL/eglmesaext.h @@ -134,6 +134,16 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, st #endif +#ifndef EGL_WL_create_wayland_buffer_from_image +#define EGL_WL_create_wayland_buffer_from_image 1 + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image); +#endif +typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image); + +#endif + #ifndef EGL_NOK_swap_region #define EGL_NOK_swap_region 1 diff --git a/mesalib/include/GL/gl.h b/mesalib/include/GL/gl.h index b484b96ce..48343f65d 100644 --- a/mesalib/include/GL/gl.h +++ b/mesalib/include/GL/gl.h @@ -2078,39 +2078,6 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh #endif /* GL_MESA_packed_depth_stencil */ -#ifndef GL_MESA_texture_array -#define GL_MESA_texture_array 1 - -/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array. - */ -#ifndef GL_EXT_texture_array - -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target, - GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif /* GL_GLEXT_PROTOTYPES */ - -#if 0 -/* (temporarily) disabled because of collision with typedef in glext.h - * that happens if apps include both gl.h and glext.h - */ -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, - GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif - -#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 -#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D -#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#endif - -#endif - - #ifndef GL_ATI_blend_equation_separate #define GL_ATI_blend_equation_separate 1 diff --git a/mesalib/include/GL/glext.h b/mesalib/include/GL/glext.h index e70266447..7d6033e10 100644 --- a/mesalib/include/GL/glext.h +++ b/mesalib/include/GL/glext.h @@ -33,7 +33,7 @@ extern "C" { ** used to make the header, and the header can be found at ** http://www.opengl.org/registry/ ** -** Khronos $Revision: 23855 $ on $Date: 2013-11-02 22:54:48 -0700 (Sat, 02 Nov 2013) $ +** Khronos $Revision: 24502 $ on $Date: 2013-12-12 13:14:39 -0800 (Thu, 12 Dec 2013) $ */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) @@ -53,7 +53,7 @@ extern "C" { #define GLAPI extern #endif -#define GL_GLEXT_VERSION 20131102 +#define GL_GLEXT_VERSION 20131212 /* Generated C header for: * API: gl @@ -2144,6 +2144,10 @@ GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data) #define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD #define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF +#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C +#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D +#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E +#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F #define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); @@ -4836,6 +4840,20 @@ GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); #endif #endif /* GL_AMD_name_gen_delete */ +#ifndef GL_AMD_occlusion_query_event +#define GL_AMD_occlusion_query_event 1 +#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F +#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001 +#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002 +#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004 +#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008 +#define GL_QUERY_ALL_EVENT_BITS_AMD 0xFFFFFFFF +typedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param); +#endif +#endif /* GL_AMD_occlusion_query_event */ + #ifndef GL_AMD_performance_monitor #define GL_AMD_performance_monitor 1 #define GL_COUNTER_TYPE_AMD 0x8BC0 @@ -6163,7 +6181,7 @@ typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintp typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); @@ -6419,7 +6437,7 @@ GLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, G GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); GLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags); GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data); -GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data); GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param); GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); @@ -8248,6 +8266,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); #define GL_NV_blend_equation_advanced 1 #define GL_BLEND_OVERLAP_NV 0x9281 #define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 +#define GL_BLUE_NV 0x1905 #define GL_COLORBURN_NV 0x929A #define GL_COLORDODGE_NV 0x9299 #define GL_CONJOINT_NV 0x9284 @@ -8261,6 +8280,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); #define GL_DST_OUT_NV 0x928D #define GL_DST_OVER_NV 0x9289 #define GL_EXCLUSION_NV 0x92A0 +#define GL_GREEN_NV 0x1904 #define GL_HARDLIGHT_NV 0x929B #define GL_HARDMIX_NV 0x92A9 #define GL_HSL_COLOR_NV 0x92AF @@ -8282,6 +8302,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); #define GL_PLUS_CLAMPED_NV 0x92B1 #define GL_PLUS_DARKER_NV 0x9292 #define GL_PLUS_NV 0x9291 +#define GL_RED_NV 0x1903 #define GL_SCREEN_NV 0x9295 #define GL_SOFTLIGHT_NV 0x929C #define GL_SRC_ATOP_NV 0x928E @@ -8291,6 +8312,7 @@ GLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle); #define GL_SRC_OVER_NV 0x9288 #define GL_UNCORRELATED_NV 0x9282 #define GL_VIVIDLIGHT_NV 0x92A6 +#define GL_XOR_NV 0x1506 typedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); typedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); #ifdef GL_GLEXT_PROTOTYPES diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h index 89b559b4e..dc94cf255 100644 --- a/mesalib/include/GL/internal/dri_interface.h +++ b/mesalib/include/GL/internal/dri_interface.h @@ -441,7 +441,7 @@ struct __DRIdamageExtensionRec { * SWRast Loader extension. */ #define __DRI_SWRAST_LOADER "DRI_SWRastLoader" -#define __DRI_SWRAST_LOADER_VERSION 1 +#define __DRI_SWRAST_LOADER_VERSION 2 struct __DRIswrastLoaderExtensionRec { __DRIextension base; @@ -465,6 +465,13 @@ struct __DRIswrastLoaderExtensionRec { void (*getImage)(__DRIdrawable *readable, int x, int y, int width, int height, char *data, void *loaderPrivate); + + /** + * Put image to drawable + */ + void (*putImage2)(__DRIdrawable *drawable, int op, + int x, int y, int width, int height, int stride, + char *data, void *loaderPrivate); }; /** diff --git a/mesalib/include/HaikuGL/GLRenderer.h b/mesalib/include/HaikuGL/GLRenderer.h new file mode 100644 index 000000000..7ffcc34bb --- /dev/null +++ b/mesalib/include/HaikuGL/GLRenderer.h @@ -0,0 +1,76 @@ +/* + * Copyright 2006, Philippe Houdoin. All rights reserved. + * Distributed under the terms of the MIT License. + + * This header defines BGLRenderer, the base class making up + * the Haiku GL renderer add-ons (essentially selfcontained C++ + * shared libraries that do the actual rendering such as + * libswpipe.so and libswrast.so) + */ +#ifndef GLRENDERER_H +#define GLRENDERER_H + + +#include <BeBuild.h> +#include <GLView.h> + + +class BGLDispatcher; +class GLRendererRoster; + +typedef unsigned long renderer_id; + +class BGLRenderer +{ + // Private unimplemented copy constructors + BGLRenderer(const BGLRenderer &); + BGLRenderer & operator=(const BGLRenderer &); + +public: + BGLRenderer(BGLView *view, ulong bgl_options, + BGLDispatcher *dispatcher); + virtual ~BGLRenderer(); + + void Acquire(); + void Release(); + + virtual void LockGL(); + virtual void UnlockGL(); + + virtual void SwapBuffers(bool VSync = false); + virtual void Draw(BRect updateRect); + virtual status_t CopyPixelsOut(BPoint source, BBitmap *dest); + virtual status_t CopyPixelsIn(BBitmap *source, BPoint dest); + + virtual void FrameResized(float width, float height); + + virtual void DirectConnected(direct_buffer_info *info); + virtual void EnableDirectMode(bool enabled); + + inline int32 ReferenceCount() const { return fRefCount; }; + inline ulong Options() const { return fOptions; }; + inline BGLView* GLView() { return fView; }; + inline BGLDispatcher* GLDispatcher() { return fDispatcher; }; + +private: + friend class GLRendererRoster; + + virtual status_t _Reserved_Renderer_0(int32, void *); + virtual status_t _Reserved_Renderer_1(int32, void *); + virtual status_t _Reserved_Renderer_2(int32, void *); + virtual status_t _Reserved_Renderer_3(int32, void *); + virtual status_t _Reserved_Renderer_4(int32, void *); + + volatile int32 fRefCount; // How much we're still usefull? + BGLView* fView; // Never forget who is the boss! + ulong fOptions; // Keep that tune in memory + BGLDispatcher* fDispatcher;// Our personal GL API call dispatcher + + GLRendererRoster* fOwningRoster; + renderer_id fID; +}; + +extern "C" _EXPORT BGLRenderer* instantiate_gl_renderer(BGLView *view, ulong options, BGLDispatcher *dispatcher); + + +#endif // GLRENDERER_H diff --git a/mesalib/include/HaikuGL/GLView.h b/mesalib/include/HaikuGL/GLView.h new file mode 100644 index 000000000..b848578f6 --- /dev/null +++ b/mesalib/include/HaikuGL/GLView.h @@ -0,0 +1,193 @@ +/* + * Copyright 2008-2013, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + * + * This header defines BGLView, the base class making up + * the Haiku GL Kit. + * + */ +#ifndef BGLVIEW_H +#define BGLVIEW_H + + +#include <GL/gl.h> + +#define BGL_RGB 0 +#define BGL_INDEX 1 +#define BGL_SINGLE 0 +#define BGL_DOUBLE 2 +#define BGL_DIRECT 0 +#define BGL_INDIRECT 4 +#define BGL_ACCUM 8 +#define BGL_ALPHA 16 +#define BGL_DEPTH 32 +#define BGL_OVERLAY 64 +#define BGL_UNDERLAY 128 +#define BGL_STENCIL 512 + +#ifdef __cplusplus + +#include <AppKit.h> +#include <Bitmap.h> +#include <DirectWindow.h> +#include <View.h> +#include <Window.h> +#include <WindowScreen.h> + + +struct glview_direct_info; +class BGLRenderer; +class GLRendererRoster; + +class BGLView : public BView { +public: + BGLView(BRect rect, const char* name, + ulong resizingMode, ulong mode, + ulong options); + virtual ~BGLView(); + + void LockGL(); + void UnlockGL(); + void SwapBuffers(); + void SwapBuffers(bool vSync); + + BView* EmbeddedView(); // deprecated, returns NULL + void* GetGLProcAddress(const char* procName); + + status_t CopyPixelsOut(BPoint source, BBitmap *dest); + status_t CopyPixelsIn(BBitmap *source, BPoint dest); + + // Mesa's GLenum is uint where Be's ones was ulong! + virtual void ErrorCallback(unsigned long errorCode); + + virtual void Draw(BRect updateRect); + virtual void AttachedToWindow(); + virtual void AllAttached(); + virtual void DetachedFromWindow(); + virtual void AllDetached(); + + virtual void FrameResized(float newWidth, float newHeight); + virtual status_t Perform(perform_code d, void *arg); + + virtual status_t Archive(BMessage *data, bool deep = true) const; + + virtual void MessageReceived(BMessage *message); + virtual void SetResizingMode(uint32 mode); + + virtual void Show(); + virtual void Hide(); + + virtual BHandler* ResolveSpecifier(BMessage *msg, int32 index, + BMessage *specifier, int32 form, + const char *property); + virtual status_t GetSupportedSuites(BMessage *data); + + void DirectConnected(direct_buffer_info *info); + void EnableDirectMode(bool enabled); + + void* getGC() { return fGc; } // ??? + + virtual void GetPreferredSize(float* width, float* height); + +private: + + virtual void _ReservedGLView1(); + virtual void _ReservedGLView2(); + virtual void _ReservedGLView3(); + virtual void _ReservedGLView4(); + virtual void _ReservedGLView5(); + virtual void _ReservedGLView6(); + virtual void _ReservedGLView7(); + virtual void _ReservedGLView8(); + + BGLView(const BGLView &); + BGLView &operator=(const BGLView &); + + void _DitherFront(); + bool _ConfirmDither(); + void _Draw(BRect rect); + void _CallDirectConnected(); + + void* fGc; + uint32 fOptions; + uint32 fDitherCount; + BLocker fDrawLock; + BLocker fDisplayLock; + glview_direct_info* fClipInfo; + + BGLRenderer* fRenderer; + GLRendererRoster* fRoster; + + BBitmap* fDitherMap; + BRect fBounds; + int16* fErrorBuffer[2]; + uint64 _reserved[8]; + + void _LockDraw(); + void _UnlockDraw(); + +// BeOS compatibility +private: + BGLView(BRect rect, char* name, + ulong resizingMode, ulong mode, + ulong options); +}; + + +class BGLScreen : public BWindowScreen { +public: + BGLScreen(char* name, + ulong screenMode, ulong options, + status_t *error, bool debug=false); + ~BGLScreen(); + + void LockGL(); + void UnlockGL(); + void SwapBuffers(); + // Mesa's GLenum is uint where Be's ones was ulong! + virtual void ErrorCallback(unsigned long errorCode); + + virtual void ScreenConnected(bool connected); + virtual void FrameResized(float width, float height); + virtual status_t Perform(perform_code code, void *arg); + + virtual status_t Archive(BMessage *data, bool deep = true) const; + virtual void MessageReceived(BMessage *message); + + virtual void Show(); + virtual void Hide(); + + virtual BHandler* ResolveSpecifier(BMessage *message, + int32 index, + BMessage *specifier, + int32 form, + const char *property); + virtual status_t GetSupportedSuites(BMessage *data); + +private: + + virtual void _ReservedGLScreen1(); + virtual void _ReservedGLScreen2(); + virtual void _ReservedGLScreen3(); + virtual void _ReservedGLScreen4(); + virtual void _ReservedGLScreen5(); + virtual void _ReservedGLScreen6(); + virtual void _ReservedGLScreen7(); + virtual void _ReservedGLScreen8(); + + BGLScreen(const BGLScreen &); + BGLScreen &operator=(const BGLScreen &); + + void* fGc; + long fOptions; + BLocker fDrawLock; + + int32 fColorSpace; + uint32 fScreenMode; + + uint64 _reserved[7]; +}; + +#endif // __cplusplus + +#endif // BGLVIEW_H diff --git a/mesalib/include/HaikuGL/OpenGLKit.h b/mesalib/include/HaikuGL/OpenGLKit.h new file mode 100644 index 000000000..f4828714c --- /dev/null +++ b/mesalib/include/HaikuGL/OpenGLKit.h @@ -0,0 +1,10 @@ +/* + * Master include file for the Haiku OpenGL Kit. + */ + +#include <GL/gl.h> +#include <GLView.h> + +// Projects needing GL/glu.h and GL/glut.h should now +// include these headers independently as glu and glut +// are no longe core parts of mesa diff --git a/mesalib/include/HaikuGL/README b/mesalib/include/HaikuGL/README new file mode 100644 index 000000000..0f8503f08 --- /dev/null +++ b/mesalib/include/HaikuGL/README @@ -0,0 +1,28 @@ +These headers make up the Haiku Op*nGL kit. + +Headers in this directory preserve some BeOS™ compatibility +compatibility, so changes should be mentioned to the Haiku +project mailing list. + +http://haiku-os.org + +Normal Haiku Op*enGL layout: + + * headers/os/OpenGLKit.h + * headers/os/opengl/GLView.h + * headers/os/opengl/GLRenderer.h + * headers/os/opengl/GL/gl.h + * headers/os/opengl/GL/gl_mangle.h + * headers/os/opengl/GL/glext.h + * headers/os/opengl/GL/osmesa.h (needed?) + +Extras: + + * headers/os/opengl/GL/glu.h + * headers/os/opengl/GL/glut.h + +OpenGL™ is a trademark of SGI. The usage of this trademark +in the Haiku GL Kit is not a sign of any certification or +endorsement by SGI or its affiliates. Usage is purely to +allow legacy compatibility with the BeOS™ and its 3D GL +rendering subsystem. diff --git a/mesalib/m4/ax_check_compile_flag.m4 b/mesalib/m4/ax_check_compile_flag.m4 new file mode 100644 index 000000000..c3a8d695a --- /dev/null +++ b/mesalib/m4/ax_check_compile_flag.m4 @@ -0,0 +1,72 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> +# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> +# +# 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 the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c index b95cbab12..9246bd722 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.c +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c @@ -51,6 +51,12 @@ #define INVALID_PTR ((void*)~0) +#define GET_CLEAR_BLEND_STATE_IDX(clear_buffers) \ + ((clear_buffers) / PIPE_CLEAR_COLOR0) + +#define NUM_RESOLVE_FRAG_SHADERS 5 /* MSAA 2x, 4x, 8x, 16x, 32x */ +#define GET_MSAA_RESOLVE_FS_IDX(nr_samples) (util_logbase2(nr_samples)-1) + struct blitter_context_priv { struct blitter_context base; @@ -65,6 +71,7 @@ struct blitter_context_priv /* Vertex shaders. */ void *vs; /**< Vertex shader which passes {pos, generic} to the output.*/ void *vs_pos_only; /**< Vertex shader which passes pos to the output.*/ + void *vs_layered; /**< Vertex shader which sets LAYER = INSTANCEID. */ /* Fragment shaders. */ void *fs_empty; @@ -87,8 +94,14 @@ struct blitter_context_priv void *fs_texfetch_depthstencil_msaa[PIPE_MAX_TEXTURE_TYPES]; void *fs_texfetch_stencil_msaa[PIPE_MAX_TEXTURE_TYPES]; + /* FS which outputs an average of all samples. */ + void *fs_resolve[PIPE_MAX_TEXTURE_TYPES][NUM_RESOLVE_FRAG_SHADERS][2]; + void *fs_resolve_sint[PIPE_MAX_TEXTURE_TYPES][NUM_RESOLVE_FRAG_SHADERS][2]; + void *fs_resolve_uint[PIPE_MAX_TEXTURE_TYPES][NUM_RESOLVE_FRAG_SHADERS][2]; + /* Blend state. */ void *blend[PIPE_MASK_RGBA+1]; /**< blend state with writemask */ + void *blend_clear[GET_CLEAR_BLEND_STATE_IDX(PIPE_CLEAR_COLOR)+1]; /* Depth stencil alpha state. */ void *dsa_write_depth_stencil; @@ -295,6 +308,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) util_make_vertex_passthrough_shader(pipe, 2, semantic_names, semantic_indices); } + if (ctx->has_stream_out) { struct pipe_stream_output_info so; const uint semantic_names[] = { TGSI_SEMANTIC_POSITION }; @@ -310,6 +324,11 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe) semantic_indices, &so); } + if (pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_INSTANCEID) && + pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_VS_LAYER)) { + ctx->vs_layered = util_make_layered_clear_vertex_shader(pipe); + } + /* set invariant vertex coordinates */ for (i = 0; i < 4; i++) ctx->vertices[i][0][3] = 1; /*v.w*/ @@ -323,11 +342,15 @@ void util_blitter_destroy(struct blitter_context *blitter) { struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; struct pipe_context *pipe = blitter->pipe; - int i; + int i, j, f; for (i = 0; i <= PIPE_MASK_RGBA; i++) { pipe->delete_blend_state(pipe, ctx->blend[i]); } + for (i = 0; i < Elements(ctx->blend_clear); i++) { + if (ctx->blend_clear[i]) + pipe->delete_blend_state(pipe, ctx->blend_clear[i]); + } pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil); @@ -357,7 +380,23 @@ void util_blitter_destroy(struct blitter_context *blitter) ctx->delete_fs_state(pipe, ctx->fs_texfetch_depthstencil[i]); if (ctx->fs_texfetch_stencil[i]) ctx->delete_fs_state(pipe, ctx->fs_texfetch_stencil[i]); + + for (j = 0; j< Elements(ctx->fs_resolve[i]); j++) + for (f = 0; f < 2; f++) + if (ctx->fs_resolve[i][j][f]) + ctx->delete_fs_state(pipe, ctx->fs_resolve[i][j][f]); + + for (j = 0; j< Elements(ctx->fs_resolve_sint[i]); j++) + for (f = 0; f < 2; f++) + if (ctx->fs_resolve_sint[i][j][f]) + ctx->delete_fs_state(pipe, ctx->fs_resolve_sint[i][j][f]); + + for (j = 0; j< Elements(ctx->fs_resolve_uint[i]); j++) + for (f = 0; f < 2; f++) + if (ctx->fs_resolve_uint[i][j][f]) + ctx->delete_fs_state(pipe, ctx->fs_resolve_uint[i][j][f]); } + ctx->delete_fs_state(pipe, ctx->fs_empty); ctx->delete_fs_state(pipe, ctx->fs_write_one_cbuf); ctx->delete_fs_state(pipe, ctx->fs_write_all_cbufs); @@ -711,22 +750,60 @@ static void blitter_set_dst_dimensions(struct blitter_context_priv *ctx, } static void *blitter_get_fs_texfetch_col(struct blitter_context_priv *ctx, + enum pipe_format format, enum pipe_texture_target target, - unsigned nr_samples) + unsigned src_nr_samples, + unsigned dst_nr_samples, + unsigned filter) { struct pipe_context *pipe = ctx->base.pipe; + unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, src_nr_samples); assert(target < PIPE_MAX_TEXTURE_TYPES); - if (nr_samples > 1) { - void **shader = &ctx->fs_texfetch_col_msaa[target]; + if (src_nr_samples > 1) { + void **shader; - /* Create the fragment shader on-demand. */ - if (!*shader) { - unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, - nr_samples); + if (dst_nr_samples <= 1) { + /* The destination has one sample, so we'll do color resolve. */ + boolean is_uint, is_sint; + unsigned index = GET_MSAA_RESOLVE_FS_IDX(src_nr_samples); - *shader = util_make_fs_blit_msaa_color(pipe, tgsi_tex); + is_uint = util_format_is_pure_uint(format); + is_sint = util_format_is_pure_sint(format); + + assert(filter < 2); + + if (is_uint) + shader = &ctx->fs_resolve_uint[target][index][filter]; + else if (is_sint) + shader = &ctx->fs_resolve_sint[target][index][filter]; + else + shader = &ctx->fs_resolve[target][index][filter]; + + if (!*shader) { + if (filter == PIPE_TEX_FILTER_LINEAR) { + *shader = util_make_fs_msaa_resolve_bilinear(pipe, tgsi_tex, + src_nr_samples, + is_uint, is_sint); + } + else { + *shader = util_make_fs_msaa_resolve(pipe, tgsi_tex, + src_nr_samples, + is_uint, is_sint); + } + } + } + else { + /* The destination has multiple samples, we'll do + * an MSAA->MSAA copy. + */ + shader = &ctx->fs_texfetch_col_msaa[target]; + + /* Create the fragment shader on-demand. */ + if (!*shader) { + *shader = util_make_fs_blit_msaa_color(pipe, tgsi_tex); + } } return *shader; @@ -735,11 +812,8 @@ static void *blitter_get_fs_texfetch_col(struct blitter_context_priv *ctx, /* Create the fragment shader on-demand. */ if (!*shader) { - unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(target, 0); - - *shader = - util_make_fragment_tex_shader(pipe, tgsi_tex, - TGSI_INTERPOLATE_LINEAR); + *shader = util_make_fragment_tex_shader(pipe, tgsi_tex, + TGSI_INTERPOLATE_LINEAR); } return *shader; @@ -864,7 +938,7 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter) { struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; struct pipe_screen *screen = blitter->pipe->screen; - unsigned i, target, max_samples; + unsigned samples, j, f, target, max_samples; boolean has_arraytex, has_cubearraytex; max_samples = ctx->has_texture_multisample ? 2 : 1; @@ -874,7 +948,7 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter) PIPE_CAP_CUBE_MAP_ARRAY) != 0; /* It only matters if i <= 1 or > 1. */ - for (i = 1; i <= max_samples; i++) { + for (samples = 1; samples <= max_samples; samples++) { for (target = PIPE_TEXTURE_1D; target < PIPE_MAX_TEXTURE_TYPES; target++) { if (!has_arraytex && (target == PIPE_TEXTURE_1D_ARRAY || @@ -885,29 +959,55 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter) (target == PIPE_TEXTURE_CUBE_ARRAY)) continue; - if (i > 1 && + if (samples > 1 && (target != PIPE_TEXTURE_2D && target != PIPE_TEXTURE_2D_ARRAY)) continue; - blitter_get_fs_texfetch_col(ctx, target, i); - blitter_get_fs_texfetch_depth(ctx, target, i); + /* If samples == 1, the shaders read one texel. If samples >= 1, + * they read one sample. + */ + blitter_get_fs_texfetch_col(ctx, PIPE_FORMAT_R32_FLOAT, target, + samples, samples, 0); + blitter_get_fs_texfetch_depth(ctx, target, samples); if (ctx->has_stencil_export) { - blitter_get_fs_texfetch_depthstencil(ctx, target, i); - blitter_get_fs_texfetch_stencil(ctx, target, i); + blitter_get_fs_texfetch_depthstencil(ctx, target, samples); + blitter_get_fs_texfetch_stencil(ctx, target, samples); + } + + if (samples == 1) + continue; + + /* MSAA resolve shaders. */ + for (j = 2; j < 32; j++) { + if (!screen->is_format_supported(screen, PIPE_FORMAT_R32_FLOAT, + target, j, + PIPE_BIND_SAMPLER_VIEW)) { + continue; + } + + for (f = 0; f < 2; f++) { + blitter_get_fs_texfetch_col(ctx, PIPE_FORMAT_R32_FLOAT, target, + j, 1, f); + blitter_get_fs_texfetch_col(ctx, PIPE_FORMAT_R32_UINT, target, + j, 1, f); + blitter_get_fs_texfetch_col(ctx, PIPE_FORMAT_R32_SINT, target, + j, 1, f); + } } } } } static void blitter_set_common_draw_rect_state(struct blitter_context_priv *ctx, - boolean scissor) + boolean scissor, + boolean vs_layered) { struct pipe_context *pipe = ctx->base.pipe; pipe->bind_rasterizer_state(pipe, scissor ? ctx->rs_state_scissor : ctx->rs_state); - pipe->bind_vs_state(pipe, ctx->vs); + pipe->bind_vs_state(pipe, vs_layered ? ctx->vs_layered : ctx->vs); if (ctx->has_geometry_shader) pipe->bind_gs_state(pipe, NULL); if (ctx->has_stream_out) @@ -915,19 +1015,24 @@ static void blitter_set_common_draw_rect_state(struct blitter_context_priv *ctx, } static void blitter_draw(struct blitter_context_priv *ctx, - int x1, int y1, int x2, int y2, float depth) + int x1, int y1, int x2, int y2, float depth, + unsigned num_instances) { - struct pipe_resource *buf = NULL; - unsigned offset = 0; + struct pipe_context *pipe = ctx->base.pipe; + struct pipe_vertex_buffer vb = {0}; blitter_set_rectangle(ctx, x1, y1, x2, y2, depth); + vb.stride = 8 * sizeof(float); + u_upload_data(ctx->upload, 0, sizeof(ctx->vertices), ctx->vertices, - &offset, &buf); + &vb.buffer_offset, &vb.buffer); u_upload_unmap(ctx->upload); - util_draw_vertex_buffer(ctx->base.pipe, NULL, buf, ctx->base.vb_slot, - offset, PIPE_PRIM_TRIANGLE_FAN, 4, 2); - pipe_resource_reference(&buf, NULL); + + pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb); + util_draw_arrays_instanced(pipe, PIPE_PRIM_TRIANGLE_FAN, 0, 4, + 0, num_instances); + pipe_resource_reference(&vb.buffer, NULL); } void util_blitter_draw_rectangle(struct blitter_context *blitter, @@ -949,11 +1054,47 @@ void util_blitter_draw_rectangle(struct blitter_context *blitter, default:; } - blitter_draw(ctx, x1, y1, x2, y2, depth); + blitter_draw(ctx, x1, y1, x2, y2, depth, 1); +} + +static void *get_clear_blend_state(struct blitter_context_priv *ctx, + unsigned clear_buffers) +{ + struct pipe_context *pipe = ctx->base.pipe; + int index; + + clear_buffers &= PIPE_CLEAR_COLOR; + + /* Return an existing blend state. */ + if (!clear_buffers) + return ctx->blend[0]; + + index = GET_CLEAR_BLEND_STATE_IDX(clear_buffers); + + if (ctx->blend_clear[index]) + return ctx->blend_clear[index]; + + /* Create a new one. */ + { + struct pipe_blend_state blend = {0}; + unsigned i; + + blend.independent_blend_enable = 1; + + for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { + if (clear_buffers & (PIPE_CLEAR_COLOR0 << i)) { + blend.rt[i].colormask = PIPE_MASK_RGBA; + } + } + + ctx->blend_clear[index] = pipe->create_blend_state(pipe, &blend); + } + return ctx->blend_clear[index]; } static void util_blitter_clear_custom(struct blitter_context *blitter, unsigned width, unsigned height, + unsigned num_layers, unsigned clear_buffers, const union pipe_color_union *color, double depth, unsigned stencil, @@ -963,6 +1104,8 @@ static void util_blitter_clear_custom(struct blitter_context *blitter, struct pipe_context *pipe = ctx->base.pipe; struct pipe_stencil_ref sr = { { 0 } }; + assert(ctx->vs_layered || num_layers <= 1); + blitter_set_running_flag(ctx); blitter_check_saved_vertex_states(ctx); blitter_check_saved_fragment_states(ctx); @@ -971,10 +1114,8 @@ static void util_blitter_clear_custom(struct blitter_context *blitter, /* bind states */ if (custom_blend) { pipe->bind_blend_state(pipe, custom_blend); - } else if (clear_buffers & PIPE_CLEAR_COLOR) { - pipe->bind_blend_state(pipe, ctx->blend[PIPE_MASK_RGBA]); } else { - pipe->bind_blend_state(pipe, ctx->blend[0]); + pipe->bind_blend_state(pipe, get_clear_blend_state(ctx, clear_buffers)); } if (custom_dsa) { @@ -996,10 +1137,18 @@ static void util_blitter_clear_custom(struct blitter_context *blitter, ctx->bind_fs_state(pipe, ctx->fs_write_all_cbufs); pipe->set_sample_mask(pipe, ~0); - blitter_set_common_draw_rect_state(ctx, FALSE); blitter_set_dst_dimensions(ctx, width, height); - blitter->draw_rectangle(blitter, 0, 0, width, height, (float) depth, - UTIL_BLITTER_ATTRIB_COLOR, color); + + if (num_layers > 1 && ctx->vs_layered) { + blitter_set_common_draw_rect_state(ctx, FALSE, TRUE); + blitter_set_clear_color(ctx, color); + blitter_draw(ctx, 0, 0, width, height, depth, num_layers); + } + else { + blitter_set_common_draw_rect_state(ctx, FALSE, FALSE); + blitter->draw_rectangle(blitter, 0, 0, width, height, (float) depth, + UTIL_BLITTER_ATTRIB_COLOR, color); + } blitter_restore_vertex_states(ctx); blitter_restore_fragment_states(ctx); @@ -1008,12 +1157,12 @@ static void util_blitter_clear_custom(struct blitter_context *blitter, } void util_blitter_clear(struct blitter_context *blitter, - unsigned width, unsigned height, + unsigned width, unsigned height, unsigned num_layers, unsigned clear_buffers, const union pipe_color_union *color, double depth, unsigned stencil) { - util_blitter_clear_custom(blitter, width, height, + util_blitter_clear_custom(blitter, width, height, num_layers, clear_buffers, color, depth, stencil, NULL, NULL); } @@ -1023,7 +1172,7 @@ void util_blitter_custom_clear_depth(struct blitter_context *blitter, double depth, void *custom_dsa) { static const union pipe_color_union color; - util_blitter_clear_custom(blitter, width, height, 0, &color, depth, 0, + util_blitter_clear_custom(blitter, width, height, 0, 0, &color, depth, 0, NULL, custom_dsa); } @@ -1137,11 +1286,10 @@ static boolean is_blit_generic_supported(struct blitter_context *blitter, boolean util_blitter_is_copy_supported(struct blitter_context *blitter, const struct pipe_resource *dst, - const struct pipe_resource *src, - unsigned mask) + const struct pipe_resource *src) { return is_blit_generic_supported(blitter, dst, dst->format, - src, src->format, mask); + src, src->format, PIPE_MASK_RGBAZS); } boolean util_blitter_is_blit_supported(struct blitter_context *blitter, @@ -1159,8 +1307,7 @@ void util_blitter_copy_texture(struct blitter_context *blitter, unsigned dstx, unsigned dsty, unsigned dstz, struct pipe_resource *src, unsigned src_level, - const struct pipe_box *srcbox, unsigned mask, - boolean copy_all_samples) + const struct pipe_box *srcbox) { struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; struct pipe_context *pipe = ctx->base.pipe; @@ -1185,8 +1332,7 @@ void util_blitter_copy_texture(struct blitter_context *blitter, /* Copy. */ util_blitter_blit_generic(blitter, dst_view, &dstbox, src_view, srcbox, src->width0, src->height0, - mask, PIPE_TEX_FILTER_NEAREST, NULL, - copy_all_samples); + PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL); pipe_surface_reference(&dst_view, NULL); pipe_sampler_view_reference(&src_view, NULL); @@ -1199,14 +1345,14 @@ void util_blitter_blit_generic(struct blitter_context *blitter, const struct pipe_box *srcbox, unsigned src_width0, unsigned src_height0, unsigned mask, unsigned filter, - const struct pipe_scissor_state *scissor, - boolean copy_all_samples) + const struct pipe_scissor_state *scissor) { struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; struct pipe_context *pipe = ctx->base.pipe; struct pipe_framebuffer_state fb_state; enum pipe_texture_target src_target = src->texture->target; unsigned src_samples = src->texture->nr_samples; + unsigned dst_samples = dst->texture->nr_samples; boolean has_depth, has_stencil, has_color; boolean blit_stencil, blit_depth, blit_color; void *sampler_state; @@ -1231,6 +1377,12 @@ void util_blitter_blit_generic(struct blitter_context *blitter, return; } + if (blit_stencil || + (dstbox->width == abs(srcbox->width) && + dstbox->height == abs(srcbox->height))) { + filter = PIPE_TEX_FILTER_NEAREST; + } + /* Check whether the states are properly saved. */ blitter_set_running_flag(ctx); blitter_check_saved_vertex_states(ctx); @@ -1273,16 +1425,12 @@ void util_blitter_blit_generic(struct blitter_context *blitter, pipe->bind_blend_state(pipe, ctx->blend[mask & PIPE_MASK_RGBA]); pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); ctx->bind_fs_state(pipe, - blitter_get_fs_texfetch_col(ctx, src_target, - src_samples)); + blitter_get_fs_texfetch_col(ctx, src->format, src_target, + src_samples, dst_samples, filter)); } /* Set the linear filter only for scaled color non-MSAA blits. */ - if (filter == PIPE_TEX_FILTER_LINEAR && - !blit_depth && !blit_stencil && - src_samples <= 1 && - (dstbox->width != abs(srcbox->width) || - dstbox->height != abs(srcbox->height))) { + if (filter == PIPE_TEX_FILTER_LINEAR) { if (src_target == PIPE_TEXTURE_RECT) { sampler_state = ctx->sampler_state_rect_linear; } else { @@ -1341,7 +1489,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter, pipe->set_scissor_states(pipe, 0, 1, scissor); } - blitter_set_common_draw_rect_state(ctx, scissor != NULL); + blitter_set_common_draw_rect_state(ctx, scissor != NULL, FALSE); blitter_set_dst_dimensions(ctx, dst->width, dst->height); if ((src_target == PIPE_TEXTURE_1D || @@ -1388,10 +1536,9 @@ void util_blitter_blit_generic(struct blitter_context *blitter, pipe->set_framebuffer_state(pipe, &fb_state); /* See if we need to blit a multisample or singlesample buffer. */ - if (copy_all_samples && - src_samples == dst->texture->nr_samples && - dst->texture->nr_samples > 1) { - unsigned i, max_sample = MAX2(dst->texture->nr_samples, 1) - 1; + if (src_samples == dst_samples && dst_samples > 1) { + /* MSAA copy. */ + unsigned i, max_sample = dst_samples - 1; for (i = 0; i <= max_sample; i++) { pipe->set_sample_mask(pipe, 1 << i); @@ -1402,9 +1549,10 @@ void util_blitter_blit_generic(struct blitter_context *blitter, srcbox->y + srcbox->height); blitter_draw(ctx, dstbox->x, dstbox->y, dstbox->x + dstbox->width, - dstbox->y + dstbox->height, 0); + dstbox->y + dstbox->height, 0, 1); } } else { + /* Normal copy, MSAA upsampling, or MSAA resolve. */ pipe->set_sample_mask(pipe, ~0); blitter_set_texcoords(ctx, src, src_width0, src_height0, srcbox->z + z, 0, @@ -1413,7 +1561,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter, srcbox->y + srcbox->height); blitter_draw(ctx, dstbox->x, dstbox->y, dstbox->x + dstbox->width, - dstbox->y + dstbox->height, 0); + dstbox->y + dstbox->height, 0, 1); } /* Get the next surface or (if this is the last iteration) @@ -1465,7 +1613,7 @@ util_blitter_blit(struct blitter_context *blitter, util_blitter_blit_generic(blitter, dst_view, &info->dst.box, src_view, &info->src.box, src->width0, src->height0, info->mask, info->filter, - info->scissor_enable ? &info->scissor : NULL, TRUE); + info->scissor_enable ? &info->scissor : NULL); pipe_surface_reference(&dst_view, NULL); pipe_sampler_view_reference(&src_view, NULL); @@ -1508,7 +1656,7 @@ void util_blitter_clear_render_target(struct blitter_context *blitter, pipe->set_framebuffer_state(pipe, &fb_state); pipe->set_sample_mask(pipe, ~0); - blitter_set_common_draw_rect_state(ctx, FALSE); + blitter_set_common_draw_rect_state(ctx, FALSE, FALSE); blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height); blitter->draw_rectangle(blitter, dstx, dsty, dstx+width, dsty+height, 0, UTIL_BLITTER_ATTRIB_COLOR, color); @@ -1576,7 +1724,7 @@ void util_blitter_clear_depth_stencil(struct blitter_context *blitter, pipe->set_framebuffer_state(pipe, &fb_state); pipe->set_sample_mask(pipe, ~0); - blitter_set_common_draw_rect_state(ctx, FALSE); + blitter_set_common_draw_rect_state(ctx, FALSE, FALSE); blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height); blitter->draw_rectangle(blitter, dstx, dsty, dstx+width, dsty+height, (float) depth, @@ -1633,7 +1781,7 @@ void util_blitter_custom_depth_stencil(struct blitter_context *blitter, pipe->set_framebuffer_state(pipe, &fb_state); pipe->set_sample_mask(pipe, sample_mask); - blitter_set_common_draw_rect_state(ctx, FALSE); + blitter_set_common_draw_rect_state(ctx, FALSE, FALSE); blitter_set_dst_dimensions(ctx, zsurf->width, zsurf->height); blitter->draw_rectangle(blitter, 0, 0, zsurf->width, zsurf->height, depth, UTIL_BLITTER_ATTRIB_NONE, NULL); @@ -1818,7 +1966,7 @@ void util_blitter_custom_resolve_color(struct blitter_context *blitter, fb_state.zsbuf = NULL; pipe->set_framebuffer_state(pipe, &fb_state); - blitter_set_common_draw_rect_state(ctx, FALSE); + blitter_set_common_draw_rect_state(ctx, FALSE, FALSE); blitter_set_dst_dimensions(ctx, src->width0, src->height0); blitter->draw_rectangle(blitter, 0, 0, src->width0, src->height0, 0, 0, NULL); @@ -1868,7 +2016,7 @@ void util_blitter_custom_color(struct blitter_context *blitter, pipe->set_framebuffer_state(pipe, &fb_state); pipe->set_sample_mask(pipe, ~0); - blitter_set_common_draw_rect_state(ctx, FALSE); + blitter_set_common_draw_rect_state(ctx, FALSE, FALSE); blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height); blitter->draw_rectangle(blitter, 0, 0, dstsurf->width, dstsurf->height, 0, 0, NULL); diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h index d9cefde50..a30cdc36a 100644 --- a/mesalib/src/gallium/auxiliary/util/u_blitter.h +++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h @@ -183,7 +183,7 @@ void util_blitter_draw_rectangle(struct blitter_context *blitter, * - blend state */ void util_blitter_clear(struct blitter_context *blitter, - unsigned width, unsigned height, + unsigned width, unsigned height, unsigned num_layers, unsigned clear_buffers, const union pipe_color_union *color, double depth, unsigned stencil); @@ -191,13 +191,10 @@ void util_blitter_clear(struct blitter_context *blitter, /** * Check if the blitter (with the help of the driver) can blit between * the two resources. - * The mask is a combination of the PIPE_MASK_* flags. - * Set to PIPE_MASK_RGBAZS if unsure. */ boolean util_blitter_is_copy_supported(struct blitter_context *blitter, const struct pipe_resource *dst, - const struct pipe_resource *src, - unsigned mask); + const struct pipe_resource *src); boolean util_blitter_is_blit_supported(struct blitter_context *blitter, const struct pipe_blit_info *info); @@ -221,8 +218,7 @@ void util_blitter_copy_texture(struct blitter_context *blitter, unsigned dstx, unsigned dsty, unsigned dstz, struct pipe_resource *src, unsigned src_level, - const struct pipe_box *srcbox, unsigned mask, - boolean copy_all_samples); + const struct pipe_box *srcbox); /** * This is a generic implementation of pipe->blit, which accepts @@ -250,8 +246,7 @@ void util_blitter_blit_generic(struct blitter_context *blitter, const struct pipe_box *srcbox, unsigned src_width0, unsigned src_height0, unsigned mask, unsigned filter, - const struct pipe_scissor_state *scissor, - boolean copy_all_samples); + const struct pipe_scissor_state *scissor); void util_blitter_blit(struct blitter_context *blitter, const struct pipe_blit_info *info); diff --git a/mesalib/src/gallium/auxiliary/util/u_clear.h b/mesalib/src/gallium/auxiliary/util/u_clear.h index e9fd874b1..75047c16b 100644 --- a/mesalib/src/gallium/auxiliary/util/u_clear.h +++ b/mesalib/src/gallium/auxiliary/util/u_clear.h @@ -42,9 +42,10 @@ util_clear(struct pipe_context *pipe, struct pipe_framebuffer_state *framebuffer, unsigned buffers, const union pipe_color_union *color, double depth, unsigned stencil) { - if (buffers & PIPE_CLEAR_COLOR) { - unsigned i; - for (i = 0; i < framebuffer->nr_cbufs; i++) { + unsigned i; + + for (i = 0; i < framebuffer->nr_cbufs; i++) { + if (buffers & (PIPE_CLEAR_COLOR0 << i)) { struct pipe_surface *ps = framebuffer->cbufs[i]; pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width, ps->height); } diff --git a/mesalib/src/gallium/auxiliary/util/u_framebuffer.c b/mesalib/src/gallium/auxiliary/util/u_framebuffer.c index f84485d1f..683967237 100644 --- a/mesalib/src/gallium/auxiliary/util/u_framebuffer.c +++ b/mesalib/src/gallium/auxiliary/util/u_framebuffer.c @@ -147,3 +147,27 @@ util_framebuffer_min_size(const struct pipe_framebuffer_state *fb, return TRUE; } } + + +/** + * Return the number of layers set in the framebuffer state. + */ +unsigned +util_framebuffer_get_num_layers(const struct pipe_framebuffer_state *fb) +{ + unsigned i, num_layers = 0; + + for (i = 0; i < fb->nr_cbufs; i++) { + if (fb->cbufs[i]) { + unsigned num = fb->cbufs[i]->u.tex.last_layer - + fb->cbufs[i]->u.tex.first_layer + 1; + num_layers = MAX2(num_layers, num); + } + } + if (fb->zsbuf) { + unsigned num = fb->zsbuf->u.tex.last_layer - + fb->zsbuf->u.tex.first_layer + 1; + num_layers = MAX2(num_layers, num); + } + return num_layers; +} diff --git a/mesalib/src/gallium/auxiliary/util/u_framebuffer.h b/mesalib/src/gallium/auxiliary/util/u_framebuffer.h index a89066230..0e6c98363 100644 --- a/mesalib/src/gallium/auxiliary/util/u_framebuffer.h +++ b/mesalib/src/gallium/auxiliary/util/u_framebuffer.h @@ -55,6 +55,11 @@ util_framebuffer_min_size(const struct pipe_framebuffer_state *fb, unsigned *width, unsigned *height); + +extern unsigned +util_framebuffer_get_num_layers(const struct pipe_framebuffer_state *fb); + + #ifdef __cplusplus } #endif diff --git a/mesalib/src/gallium/auxiliary/util/u_simple_shaders.c b/mesalib/src/gallium/auxiliary/util/u_simple_shaders.c index c93d75469..82f23ebec 100644 --- a/mesalib/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/mesalib/src/gallium/auxiliary/util/u_simple_shaders.c @@ -99,6 +99,32 @@ util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe, } +void *util_make_layered_clear_vertex_shader(struct pipe_context *pipe) +{ + static const char text[] = + "VERT\n" + "DCL IN[0]\n" + "DCL IN[1]\n" + "DCL SV[0], INSTANCEID\n" + "DCL OUT[0], POSITION\n" + "DCL OUT[1], GENERIC[0]\n" + "DCL OUT[2], LAYER\n" + + "MOV OUT[0], IN[0]\n" + "MOV OUT[1], IN[1]\n" + "MOV OUT[2], SV[0]\n" + "END\n"; + struct tgsi_token tokens[1000]; + struct pipe_shader_state state = {tokens}; + + if (!tgsi_text_translate(text, tokens, Elements(tokens))) { + assert(0); + return NULL; + } + return pipe->create_vs_state(pipe, &state); +} + + /** * Make simple fragment texture shader: * IMM {0,0,0,1} // (if writemask != 0xf) @@ -527,3 +553,157 @@ util_make_fs_blit_msaa_depthstencil(struct pipe_context *pipe, return pipe->create_fs_state(pipe, &state); } + + +void * +util_make_fs_msaa_resolve(struct pipe_context *pipe, + unsigned tgsi_tex, unsigned nr_samples, + boolean is_uint, boolean is_sint) +{ + struct ureg_program *ureg; + struct ureg_src sampler, coord; + struct ureg_dst out, tmp_sum, tmp_coord, tmp; + int i; + + ureg = ureg_create(TGSI_PROCESSOR_FRAGMENT); + if (!ureg) + return NULL; + + /* Declarations. */ + sampler = ureg_DECL_sampler(ureg, 0); + coord = ureg_DECL_fs_input(ureg, TGSI_SEMANTIC_GENERIC, 0, + TGSI_INTERPOLATE_LINEAR); + out = ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 0); + tmp_sum = ureg_DECL_temporary(ureg); + tmp_coord = ureg_DECL_temporary(ureg); + tmp = ureg_DECL_temporary(ureg); + + /* Instructions. */ + ureg_MOV(ureg, tmp_sum, ureg_imm1f(ureg, 0)); + ureg_F2U(ureg, tmp_coord, coord); + + for (i = 0; i < nr_samples; i++) { + /* Read one sample. */ + ureg_MOV(ureg, ureg_writemask(tmp_coord, TGSI_WRITEMASK_W), + ureg_imm1u(ureg, i)); + ureg_TXF(ureg, tmp, tgsi_tex, ureg_src(tmp_coord), sampler); + + if (is_uint) + ureg_U2F(ureg, tmp, ureg_src(tmp)); + else if (is_sint) + ureg_I2F(ureg, tmp, ureg_src(tmp)); + + /* Add it to the sum.*/ + ureg_ADD(ureg, tmp_sum, ureg_src(tmp_sum), ureg_src(tmp)); + } + + /* Calculate the average and return. */ + ureg_MUL(ureg, tmp_sum, ureg_src(tmp_sum), + ureg_imm1f(ureg, 1.0 / nr_samples)); + + if (is_uint) + ureg_F2U(ureg, out, ureg_src(tmp_sum)); + else if (is_sint) + ureg_F2I(ureg, out, ureg_src(tmp_sum)); + else + ureg_MOV(ureg, out, ureg_src(tmp_sum)); + + ureg_END(ureg); + + return ureg_create_shader_and_destroy(ureg, pipe); +} + + +void * +util_make_fs_msaa_resolve_bilinear(struct pipe_context *pipe, + unsigned tgsi_tex, unsigned nr_samples, + boolean is_uint, boolean is_sint) +{ + struct ureg_program *ureg; + struct ureg_src sampler, coord; + struct ureg_dst out, tmp, top, bottom; + struct ureg_dst tmp_coord[4], tmp_sum[4]; + int i, c; + + ureg = ureg_create(TGSI_PROCESSOR_FRAGMENT); + if (!ureg) + return NULL; + + /* Declarations. */ + sampler = ureg_DECL_sampler(ureg, 0); + coord = ureg_DECL_fs_input(ureg, TGSI_SEMANTIC_GENERIC, 0, + TGSI_INTERPOLATE_LINEAR); + out = ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 0); + for (c = 0; c < 4; c++) + tmp_sum[c] = ureg_DECL_temporary(ureg); + for (c = 0; c < 4; c++) + tmp_coord[c] = ureg_DECL_temporary(ureg); + tmp = ureg_DECL_temporary(ureg); + top = ureg_DECL_temporary(ureg); + bottom = ureg_DECL_temporary(ureg); + + /* Instructions. */ + for (c = 0; c < 4; c++) + ureg_MOV(ureg, tmp_sum[c], ureg_imm1f(ureg, 0)); + + /* Get 4 texture coordinates for the bilinear filter. */ + ureg_F2U(ureg, tmp_coord[0], coord); /* top-left */ + ureg_UADD(ureg, tmp_coord[1], ureg_src(tmp_coord[0]), + ureg_imm4u(ureg, 1, 0, 0, 0)); /* top-right */ + ureg_UADD(ureg, tmp_coord[2], ureg_src(tmp_coord[0]), + ureg_imm4u(ureg, 0, 1, 0, 0)); /* bottom-left */ + ureg_UADD(ureg, tmp_coord[3], ureg_src(tmp_coord[0]), + ureg_imm4u(ureg, 1, 1, 0, 0)); /* bottom-right */ + + for (i = 0; i < nr_samples; i++) { + for (c = 0; c < 4; c++) { + /* Read one sample. */ + ureg_MOV(ureg, ureg_writemask(tmp_coord[c], TGSI_WRITEMASK_W), + ureg_imm1u(ureg, i)); + ureg_TXF(ureg, tmp, tgsi_tex, ureg_src(tmp_coord[c]), sampler); + + if (is_uint) + ureg_U2F(ureg, tmp, ureg_src(tmp)); + else if (is_sint) + ureg_I2F(ureg, tmp, ureg_src(tmp)); + + /* Add it to the sum.*/ + ureg_ADD(ureg, tmp_sum[c], ureg_src(tmp_sum[c]), ureg_src(tmp)); + } + } + + /* Calculate the average. */ + for (c = 0; c < 4; c++) + ureg_MUL(ureg, tmp_sum[c], ureg_src(tmp_sum[c]), + ureg_imm1f(ureg, 1.0 / nr_samples)); + + /* Take the 4 average values and apply a standard bilinear filter. */ + ureg_FRC(ureg, tmp, coord); + + ureg_LRP(ureg, top, + ureg_scalar(ureg_src(tmp), 0), + ureg_src(tmp_sum[1]), + ureg_src(tmp_sum[0])); + + ureg_LRP(ureg, bottom, + ureg_scalar(ureg_src(tmp), 0), + ureg_src(tmp_sum[3]), + ureg_src(tmp_sum[2])); + + ureg_LRP(ureg, tmp, + ureg_scalar(ureg_src(tmp), 1), + ureg_src(bottom), + ureg_src(top)); + + /* Convert to the texture format and return. */ + if (is_uint) + ureg_F2U(ureg, out, ureg_src(tmp)); + else if (is_sint) + ureg_F2I(ureg, out, ureg_src(tmp)); + else + ureg_MOV(ureg, out, ureg_src(tmp)); + + ureg_END(ureg); + + return ureg_create_shader_and_destroy(ureg, pipe); +} diff --git a/mesalib/src/gallium/auxiliary/util/u_simple_shaders.h b/mesalib/src/gallium/auxiliary/util/u_simple_shaders.h index 016664d1b..e81d99414 100644 --- a/mesalib/src/gallium/auxiliary/util/u_simple_shaders.h +++ b/mesalib/src/gallium/auxiliary/util/u_simple_shaders.h @@ -56,6 +56,8 @@ util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe, const uint *semantic_indexes, const struct pipe_stream_output_info *so); +extern void * +util_make_layered_clear_vertex_shader(struct pipe_context *pipe); extern void * util_make_fragment_tex_shader_writemask(struct pipe_context *pipe, @@ -122,6 +124,18 @@ void * util_make_fs_blit_msaa_stencil(struct pipe_context *pipe, unsigned tgsi_tex); + +void * +util_make_fs_msaa_resolve(struct pipe_context *pipe, + unsigned tgsi_tex, unsigned nr_samples, + boolean is_uint, boolean is_sint); + + +void * +util_make_fs_msaa_resolve_bilinear(struct pipe_context *pipe, + unsigned tgsi_tex, unsigned nr_samples, + boolean is_uint, boolean is_sint); + #ifdef __cplusplus } #endif diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h index 9c43920a4..344277803 100644 --- a/mesalib/src/glsl/ast.h +++ b/mesalib/src/glsl/ast.h @@ -361,6 +361,7 @@ struct ast_type_qualifier { unsigned in:1; unsigned out:1; unsigned centroid:1; + unsigned sample:1; unsigned uniform:1; unsigned smooth:1; unsigned flat:1; diff --git a/mesalib/src/glsl/ast_array_index.cpp b/mesalib/src/glsl/ast_array_index.cpp index f7b5e8350..a5f23206a 100644 --- a/mesalib/src/glsl/ast_array_index.cpp +++ b/mesalib/src/glsl/ast_array_index.cpp @@ -41,8 +41,8 @@ update_max_array_access(ir_rvalue *ir, unsigned idx, YYLTYPE *loc, { if (ir_dereference_variable *deref_var = ir->as_dereference_variable()) { ir_variable *var = deref_var->var; - if (idx > var->max_array_access) { - var->max_array_access = idx; + if (idx > var->data.max_array_access) { + var->data.max_array_access = idx; /* Check whether this access will, as a side effect, implicitly cause * the size of a built-in array to be too large. @@ -168,7 +168,7 @@ _mesa_ast_array_index_to_hir(void *mem_ctx, if (array->type->is_unsized_array()) { _mesa_glsl_error(&loc, state, "unsized array index must be constant"); } else if (array->type->fields.array->is_interface() - && array->variable_referenced()->mode == ir_var_uniform) { + && array->variable_referenced()->data.mode == ir_var_uniform) { /* Page 46 in section 4.3.7 of the OpenGL ES 3.00 spec says: * * "All indexes used to index a uniform block array must be @@ -184,7 +184,7 @@ _mesa_ast_array_index_to_hir(void *mem_ctx, */ ir_variable *v = array->whole_variable_referenced(); if (v != NULL) - v->max_array_access = array->type->array_size() - 1; + v->data.max_array_access = array->type->array_size() - 1; } /* From page 23 (29 of the PDF) of the GLSL 1.30 spec: diff --git a/mesalib/src/glsl/ast_function.cpp b/mesalib/src/glsl/ast_function.cpp index 2707522ef..e4c0fd1c4 100644 --- a/mesalib/src/glsl/ast_function.cpp +++ b/mesalib/src/glsl/ast_function.cpp @@ -123,7 +123,7 @@ verify_parameter_modes(_mesa_glsl_parse_state *state, YYLTYPE loc = actual_ast->get_location(); /* Verify that 'const_in' parameters are ir_constants. */ - if (formal->mode == ir_var_const_in && + if (formal->data.mode == ir_var_const_in && actual->ir_type != ir_type_constant) { _mesa_glsl_error(&loc, state, "parameter `in %s' must be a constant expression", @@ -132,10 +132,10 @@ verify_parameter_modes(_mesa_glsl_parse_state *state, } /* Verify that 'out' and 'inout' actual parameters are lvalues. */ - if (formal->mode == ir_var_function_out - || formal->mode == ir_var_function_inout) { + if (formal->data.mode == ir_var_function_out + || formal->data.mode == ir_var_function_inout) { const char *mode = NULL; - switch (formal->mode) { + switch (formal->data.mode) { case ir_var_function_out: mode = "out"; break; case ir_var_function_inout: mode = "inout"; break; default: assert(false); break; @@ -155,9 +155,9 @@ verify_parameter_modes(_mesa_glsl_parse_state *state, ir_variable *var = actual->variable_referenced(); if (var) - var->assigned = true; + var->data.assigned = true; - if (var && var->read_only) { + if (var && var->data.read_only) { _mesa_glsl_error(&loc, state, "function parameter '%s %s' references the " "read-only variable '%s'", @@ -274,20 +274,20 @@ fix_parameter(void *mem_ctx, ir_rvalue *actual, const glsl_type *formal_type, } /** - * If a function call is generated, \c call_ir will point to it on exit. - * Otherwise \c call_ir will be set to \c NULL. + * Generate a function call. + * + * For non-void functions, this returns a dereference of the temporary variable + * which stores the return value for the call. For void functions, this returns + * NULL. */ static ir_rvalue * generate_call(exec_list *instructions, ir_function_signature *sig, exec_list *actual_parameters, - ir_call **call_ir, struct _mesa_glsl_parse_state *state) { void *ctx = state; exec_list post_call_conversions; - *call_ir = NULL; - /* Perform implicit conversion of arguments. For out parameters, we need * to place them in a temporary variable and do the conversion after the * call takes place. Since we haven't emitted the call yet, we'll place @@ -304,7 +304,7 @@ generate_call(exec_list *instructions, ir_function_signature *sig, assert(formal != NULL); if (formal->type->is_numeric() || formal->type->is_boolean()) { - switch (formal->mode) { + switch (formal->data.mode) { case ir_var_const_in: case ir_var_function_in: { ir_rvalue *converted @@ -316,7 +316,7 @@ generate_call(exec_list *instructions, ir_function_signature *sig, case ir_var_function_inout: fix_parameter(ctx, actual, formal->type, instructions, &post_call_conversions, - formal->mode == ir_var_function_inout); + formal->data.mode == ir_var_function_inout); break; default: assert (!"Illegal formal parameter mode"); @@ -421,6 +421,25 @@ done: return sig; } +static void +print_function_prototypes(_mesa_glsl_parse_state *state, YYLTYPE *loc, + ir_function *f) +{ + if (f == NULL) + return; + + foreach_list (node, &f->signatures) { + ir_function_signature *sig = (ir_function_signature *) node; + + if (sig->is_builtin() && !sig->is_builtin_available(state)) + continue; + + char *str = prototype_string(sig->return_type, f->name, &sig->parameters); + _mesa_glsl_error(loc, state, " %s", str); + ralloc_free(str); + } +} + /** * Raise a "no matching function" error, listing all possible overloads the * compiler considered so developers can figure out what went wrong. @@ -431,30 +450,23 @@ no_matching_function_error(const char *name, exec_list *actual_parameters, _mesa_glsl_parse_state *state) { - char *str = prototype_string(NULL, name, actual_parameters); - _mesa_glsl_error(loc, state, "no matching function for call to `%s'", str); - ralloc_free(str); - - const char *prefix = "candidates are: "; + gl_shader *sh = _mesa_glsl_get_builtin_function_shader(); - for (int i = -1; i < (int) state->num_builtins_to_link; i++) { - glsl_symbol_table *syms = i >= 0 ? state->builtins_to_link[i]->symbols - : state->symbols; - ir_function *f = syms->get_function(name); - if (f == NULL) - continue; - - foreach_list (node, &f->signatures) { - ir_function_signature *sig = (ir_function_signature *) node; - - if (sig->is_builtin() && !sig->is_builtin_available(state)) - continue; + if (state->symbols->get_function(name) == NULL + && (!state->uses_builtin_functions + || sh->symbols->get_function(name) == NULL)) { + _mesa_glsl_error(loc, state, "no function with name '%s'", name); + } else { + char *str = prototype_string(NULL, name, actual_parameters); + _mesa_glsl_error(loc, state, + "no matching function for call to `%s'; candidates are:", + str); + ralloc_free(str); - str = prototype_string(sig->return_type, f->name, &sig->parameters); - _mesa_glsl_error(loc, state, "%s%s", prefix, str); - ralloc_free(str); + print_function_prototypes(state, loc, state->symbols->get_function(name)); - prefix = " "; + if (state->uses_builtin_functions) { + print_function_prototypes(state, loc, sh->symbols->get_function(name)); } } } @@ -1651,7 +1663,7 @@ ast_function_expression::hir(exec_list *instructions, } else { const ast_expression *id = subexpressions[0]; const char *func_name = id->primary_expression.identifier; - YYLTYPE loc = id->get_location(); + YYLTYPE loc = get_location(); exec_list actual_parameters; process_parameters(instructions, &actual_parameters, &this->expressions, @@ -1660,7 +1672,6 @@ ast_function_expression::hir(exec_list *instructions, ir_function_signature *sig = match_function_by_name(func_name, &actual_parameters, state); - ir_call *call = NULL; ir_rvalue *value = NULL; if (sig == NULL) { no_matching_function_error(func_name, &loc, &actual_parameters, state); @@ -1669,8 +1680,7 @@ ast_function_expression::hir(exec_list *instructions, /* an error has already been emitted */ value = ir_rvalue::error_value(ctx); } else { - value = generate_call(instructions, sig, &actual_parameters, - &call, state); + value = generate_call(instructions, sig, &actual_parameters, state); } return value; diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp index 43cf49745..3bc181e87 100644 --- a/mesalib/src/glsl/ast_to_hir.cpp +++ b/mesalib/src/glsl/ast_to_hir.cpp @@ -728,7 +728,7 @@ mark_whole_array_access(ir_rvalue *access) ir_dereference_variable *deref = access->as_dereference_variable(); if (deref && deref->var) { - deref->var->max_array_access = deref->type->length - 1; + deref->var->data.max_array_access = deref->type->length - 1; } } @@ -767,7 +767,7 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, ir_variable *lhs_var = lhs->variable_referenced(); if (lhs_var) - lhs_var->assigned = true; + lhs_var->data.assigned = true; if (!error_emitted) { if (non_lvalue_description != NULL) { @@ -776,7 +776,7 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, non_lvalue_description); error_emitted = true; } else if (lhs->variable_referenced() != NULL - && lhs->variable_referenced()->read_only) { + && lhs->variable_referenced()->data.read_only) { _mesa_glsl_error(&lhs_loc, state, "assignment to read-only variable '%s'", lhs->variable_referenced()->name); @@ -819,11 +819,11 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, assert(var != NULL); - if (var->max_array_access >= unsigned(rhs->type->array_size())) { + if (var->data.max_array_access >= unsigned(rhs->type->array_size())) { /* FINISHME: This should actually log the location of the RHS. */ _mesa_glsl_error(& lhs_loc, state, "array size must be > %u due to " "previous access", - var->max_array_access); + var->data.max_array_access); } var->type = glsl_type::get_array_instance(lhs->type->element_type(), @@ -866,7 +866,7 @@ get_lvalue_copy(exec_list *instructions, ir_rvalue *lvalue) var = new(ctx) ir_variable(lvalue->type, "_post_incdec_tmp", ir_var_temporary); instructions->push_tail(var); - var->mode = ir_var_auto; + var->data.mode = ir_var_auto; instructions->push_tail(new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var), lvalue)); @@ -1639,7 +1639,7 @@ ast_expression::hir(exec_list *instructions, state->symbols->get_variable(this->primary_expression.identifier); if (var != NULL) { - var->used = true; + var->data.used = true; result = new(ctx) ir_dereference_variable(var); } else { _mesa_glsl_error(& loc, state, "`%s' undeclared", @@ -1860,7 +1860,7 @@ ast_fully_specified_type::glsl_type(const char **name, if (type->base_type == GLSL_TYPE_FLOAT && state->es_shader - && state->target == fragment_shader + && state->target == MESA_SHADER_FRAGMENT && this->qualifier.precision == ast_precision_none && state->symbols->get_variable("#default precision") == NULL) { YYLTYPE loc = this->get_location(); @@ -1882,15 +1882,15 @@ ast_fully_specified_type::glsl_type(const char **name, * this function will produce undefined results. */ static bool -is_varying_var(ir_variable *var, _mesa_glsl_parser_targets target) +is_varying_var(ir_variable *var, gl_shader_type target) { switch (target) { - case vertex_shader: - return var->mode == ir_var_shader_out; - case fragment_shader: - return var->mode == ir_var_shader_in; + case MESA_SHADER_VERTEX: + return var->data.mode == ir_var_shader_out; + case MESA_SHADER_FRAGMENT: + return var->data.mode == ir_var_shader_in; default: - return var->mode == ir_var_shader_out || var->mode == ir_var_shader_in; + return var->data.mode == ir_var_shader_out || var->data.mode == ir_var_shader_in; } } @@ -1941,7 +1941,7 @@ validate_binding_qualifier(struct _mesa_glsl_parse_state *state, ir_variable *var, const ast_type_qualifier *qual) { - if (var->mode != ir_var_uniform) { + if (var->data.mode != ir_var_uniform) { _mesa_glsl_error(loc, state, "the \"binding\" qualifier only applies to uniforms"); return false; @@ -1985,13 +1985,13 @@ validate_binding_qualifier(struct _mesa_glsl_parse_state *state, */ unsigned limit = 0; switch (state->target) { - case vertex_shader: + case MESA_SHADER_VERTEX: limit = ctx->Const.VertexProgram.MaxTextureImageUnits; break; - case geometry_shader: + case MESA_SHADER_GEOMETRY: limit = ctx->Const.GeometryProgram.MaxTextureImageUnits; break; - case fragment_shader: + case MESA_SHADER_FRAGMENT: limit = ctx->Const.FragmentProgram.MaxTextureImageUnits; break; } @@ -2049,8 +2049,8 @@ interpret_interpolation_qualifier(const struct ast_type_qualifier *qual, } - if ((state->target == vertex_shader && mode == ir_var_shader_in) || - (state->target == fragment_shader && mode == ir_var_shader_out)) { + if ((state->target == MESA_SHADER_VERTEX && mode == ir_var_shader_in) || + (state->target == MESA_SHADER_FRAGMENT && mode == ir_var_shader_out)) { _mesa_glsl_error(loc, state, "interpolation qualifier `%s' cannot be applied to " "vertex shader inputs or fragment shader outputs", @@ -2077,8 +2077,8 @@ validate_explicit_location(const struct ast_type_qualifier *qual, * locations. */ switch (state->target) { - case vertex_shader: - if (var->mode == ir_var_shader_in) { + case MESA_SHADER_VERTEX: + if (var->data.mode == ir_var_shader_in) { if (!state->check_explicit_attrib_location_allowed(loc, var)) return; @@ -2088,14 +2088,14 @@ validate_explicit_location(const struct ast_type_qualifier *qual, fail = true; break; - case geometry_shader: + case MESA_SHADER_GEOMETRY: _mesa_glsl_error(loc, state, "geometry shader variables cannot be given " "explicit locations"); return; - case fragment_shader: - if (var->mode == ir_var_shader_out) { + case MESA_SHADER_FRAGMENT: + if (var->data.mode == ir_var_shader_out) { if (!state->check_explicit_attrib_location_allowed(loc, var)) return; @@ -2112,7 +2112,7 @@ validate_explicit_location(const struct ast_type_qualifier *qual, mode_string(var), _mesa_glsl_shader_target_name(state->target)); } else { - var->explicit_location = true; + var->data.explicit_location = true; /* This bit of silliness is needed because invalid explicit locations * are supposed to be flagged during linking. Small negative values @@ -2122,11 +2122,11 @@ validate_explicit_location(const struct ast_type_qualifier *qual, * ensures that negative values stay negative. */ if (qual->location >= 0) { - var->location = (state->target == vertex_shader) + var->data.location = (state->target == MESA_SHADER_VERTEX) ? (qual->location + VERT_ATTRIB_GENERIC0) : (qual->location + FRAG_RESULT_DATA0); } else { - var->location = qual->location; + var->data.location = qual->location; } if (qual->flags.q.explicit_index) { @@ -2143,8 +2143,8 @@ validate_explicit_location(const struct ast_type_qualifier *qual, _mesa_glsl_error(loc, state, "explicit index may only be 0 or 1"); } else { - var->explicit_index = true; - var->index = qual->index; + var->data.explicit_index = true; + var->data.index = qual->index; } } } @@ -2162,25 +2162,28 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, STATIC_ASSERT(sizeof(qual->flags.q) <= sizeof(qual->flags.i)); if (qual->flags.q.invariant) { - if (var->used) { + if (var->data.used) { _mesa_glsl_error(loc, state, "variable `%s' may not be redeclared " "`invariant' after being used", var->name); } else { - var->invariant = 1; + var->data.invariant = 1; } } if (qual->flags.q.constant || qual->flags.q.attribute || qual->flags.q.uniform - || (qual->flags.q.varying && (state->target == fragment_shader))) - var->read_only = 1; + || (qual->flags.q.varying && (state->target == MESA_SHADER_FRAGMENT))) + var->data.read_only = 1; if (qual->flags.q.centroid) - var->centroid = 1; + var->data.centroid = 1; - if (qual->flags.q.attribute && state->target != vertex_shader) { + if (qual->flags.q.sample) + var->data.sample = 1; + + if (qual->flags.q.attribute && state->target != MESA_SHADER_VERTEX) { var->type = glsl_type::error_type; _mesa_glsl_error(loc, state, "`attribute' variables may not be declared in the " @@ -2207,18 +2210,18 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, * the setting alone. */ if (qual->flags.q.in && qual->flags.q.out) - var->mode = ir_var_function_inout; + var->data.mode = ir_var_function_inout; else if (qual->flags.q.in) - var->mode = is_parameter ? ir_var_function_in : ir_var_shader_in; + var->data.mode = is_parameter ? ir_var_function_in : ir_var_shader_in; else if (qual->flags.q.attribute - || (qual->flags.q.varying && (state->target == fragment_shader))) - var->mode = ir_var_shader_in; + || (qual->flags.q.varying && (state->target == MESA_SHADER_FRAGMENT))) + var->data.mode = ir_var_shader_in; else if (qual->flags.q.out) - var->mode = is_parameter ? ir_var_function_out : ir_var_shader_out; - else if (qual->flags.q.varying && (state->target == vertex_shader)) - var->mode = ir_var_shader_out; + var->data.mode = is_parameter ? ir_var_function_out : ir_var_shader_out; + else if (qual->flags.q.varying && (state->target == MESA_SHADER_VERTEX)) + var->data.mode = ir_var_shader_out; else if (qual->flags.q.uniform) - var->mode = ir_var_uniform; + var->data.mode = ir_var_uniform; if (!is_parameter && is_varying_var(var, state->target)) { /* This variable is being used to link data between shader stages (in @@ -2270,28 +2273,28 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, if (state->all_invariant && (state->current_function == NULL)) { switch (state->target) { - case vertex_shader: - if (var->mode == ir_var_shader_out) - var->invariant = true; + case MESA_SHADER_VERTEX: + if (var->data.mode == ir_var_shader_out) + var->data.invariant = true; break; - case geometry_shader: - if ((var->mode == ir_var_shader_in) - || (var->mode == ir_var_shader_out)) - var->invariant = true; + case MESA_SHADER_GEOMETRY: + if ((var->data.mode == ir_var_shader_in) + || (var->data.mode == ir_var_shader_out)) + var->data.invariant = true; break; - case fragment_shader: - if (var->mode == ir_var_shader_in) - var->invariant = true; + case MESA_SHADER_FRAGMENT: + if (var->data.mode == ir_var_shader_in) + var->data.invariant = true; break; } } - var->interpolation = - interpret_interpolation_qualifier(qual, (ir_variable_mode) var->mode, + var->data.interpolation = + interpret_interpolation_qualifier(qual, (ir_variable_mode) var->data.mode, state, loc); - var->pixel_center_integer = qual->flags.q.pixel_center_integer; - var->origin_upper_left = qual->flags.q.origin_upper_left; + var->data.pixel_center_integer = qual->flags.q.pixel_center_integer; + var->data.origin_upper_left = qual->flags.q.origin_upper_left; if ((qual->flags.q.origin_upper_left || qual->flags.q.pixel_center_integer) && (strcmp(var->name, "gl_FragCoord") != 0)) { const char *const qual_string = (qual->flags.q.origin_upper_left) @@ -2312,27 +2315,28 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, if (qual->flags.q.explicit_binding && validate_binding_qualifier(state, loc, var, qual)) { - var->explicit_binding = true; - var->binding = qual->binding; + var->data.explicit_binding = true; + var->data.binding = qual->binding; } if (var->type->contains_atomic()) { - if (var->mode == ir_var_uniform) { - if (var->explicit_binding) { - unsigned *offset = &state->atomic_counter_offsets[var->binding]; + if (var->data.mode == ir_var_uniform) { + if (var->data.explicit_binding) { + unsigned *offset = + &state->atomic_counter_offsets[var->data.binding]; if (*offset % ATOMIC_COUNTER_SIZE) _mesa_glsl_error(loc, state, "misaligned atomic counter offset"); - var->atomic.offset = *offset; + var->data.atomic.offset = *offset; *offset += var->type->atomic_size(); } else { _mesa_glsl_error(loc, state, "atomic counters require explicit binding point"); } - } else if (var->mode != ir_var_function_in) { + } else if (var->data.mode != ir_var_function_in) { _mesa_glsl_error(loc, state, "atomic counters may only be declared as " "function parameters or uniform-qualified " "global variables"); @@ -2406,15 +2410,15 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, "gl_FragDepth"); } if (qual->flags.q.depth_any) - var->depth_layout = ir_depth_layout_any; + var->data.depth_layout = ir_depth_layout_any; else if (qual->flags.q.depth_greater) - var->depth_layout = ir_depth_layout_greater; + var->data.depth_layout = ir_depth_layout_greater; else if (qual->flags.q.depth_less) - var->depth_layout = ir_depth_layout_less; + var->data.depth_layout = ir_depth_layout_less; else if (qual->flags.q.depth_unchanged) - var->depth_layout = ir_depth_layout_unchanged; + var->data.depth_layout = ir_depth_layout_unchanged; else - var->depth_layout = ir_depth_layout_none; + var->data.depth_layout = ir_depth_layout_none; if (qual->flags.q.std140 || qual->flags.q.packed || @@ -2475,10 +2479,10 @@ get_variable_being_redeclared(ir_variable *var, YYLTYPE loc, const unsigned size = unsigned(var->type->array_size()); check_builtin_array_max_size(var->name, size, loc, state); - if ((size > 0) && (size <= earlier->max_array_access)) { + if ((size > 0) && (size <= earlier->data.max_array_access)) { _mesa_glsl_error(& loc, state, "array size must be > %u due to " "previous access", - earlier->max_array_access); + earlier->data.max_array_access); } earlier->type = var->type; @@ -2488,12 +2492,12 @@ get_variable_being_redeclared(ir_variable *var, YYLTYPE loc, state->is_version(150, 0)) && strcmp(var->name, "gl_FragCoord") == 0 && earlier->type == var->type - && earlier->mode == var->mode) { + && earlier->data.mode == var->data.mode) { /* Allow redeclaration of gl_FragCoord for ARB_fcc layout * qualifiers. */ - earlier->origin_upper_left = var->origin_upper_left; - earlier->pixel_center_integer = var->pixel_center_integer; + earlier->data.origin_upper_left = var->data.origin_upper_left; + earlier->data.pixel_center_integer = var->data.pixel_center_integer; /* According to section 4.3.7 of the GLSL 1.30 spec, * the following built-in varaibles can be redeclared with an @@ -2513,41 +2517,41 @@ get_variable_being_redeclared(ir_variable *var, YYLTYPE loc, || strcmp(var->name, "gl_Color") == 0 || strcmp(var->name, "gl_SecondaryColor") == 0) && earlier->type == var->type - && earlier->mode == var->mode) { - earlier->interpolation = var->interpolation; + && earlier->data.mode == var->data.mode) { + earlier->data.interpolation = var->data.interpolation; /* Layout qualifiers for gl_FragDepth. */ } else if ((state->AMD_conservative_depth_enable || state->ARB_conservative_depth_enable) && strcmp(var->name, "gl_FragDepth") == 0 && earlier->type == var->type - && earlier->mode == var->mode) { + && earlier->data.mode == var->data.mode) { /** From the AMD_conservative_depth spec: * Within any shader, the first redeclarations of gl_FragDepth * must appear before any use of gl_FragDepth. */ - if (earlier->used) { + if (earlier->data.used) { _mesa_glsl_error(&loc, state, "the first redeclaration of gl_FragDepth " "must appear before any use of gl_FragDepth"); } /* Prevent inconsistent redeclaration of depth layout qualifier. */ - if (earlier->depth_layout != ir_depth_layout_none - && earlier->depth_layout != var->depth_layout) { + if (earlier->data.depth_layout != ir_depth_layout_none + && earlier->data.depth_layout != var->data.depth_layout) { _mesa_glsl_error(&loc, state, "gl_FragDepth: depth layout is declared here " "as '%s, but it was previously declared as " "'%s'", - depth_layout_string(var->depth_layout), - depth_layout_string(earlier->depth_layout)); + depth_layout_string(var->data.depth_layout), + depth_layout_string(earlier->data.depth_layout)); } - earlier->depth_layout = var->depth_layout; + earlier->data.depth_layout = var->data.depth_layout; } else if (allow_all_redeclarations) { - if (earlier->mode != var->mode) { + if (earlier->data.mode != var->data.mode) { _mesa_glsl_error(&loc, state, "redeclaration of `%s' with incorrect qualifiers", var->name); @@ -2582,7 +2586,7 @@ process_initializer(ir_variable *var, ast_declaration *decl, * directly by an application via API commands, or indirectly by * OpenGL." */ - if (var->mode == ir_var_uniform) { + if (var->data.mode == ir_var_uniform) { state->check_version(120, 0, &initializer_loc, "cannot initialize uniforms"); } @@ -2592,11 +2596,11 @@ process_initializer(ir_variable *var, ast_declaration *decl, "cannot initialize samplers"); } - if ((var->mode == ir_var_shader_in) && (state->current_function == NULL)) { + if ((var->data.mode == ir_var_shader_in) && (state->current_function == NULL)) { _mesa_glsl_error(& initializer_loc, state, "cannot initialize %s shader input / %s", _mesa_glsl_shader_target_name(state->target), - (state->target == vertex_shader) + (state->target == MESA_SHADER_VERTEX) ? "attribute" : "varying"); } @@ -2647,9 +2651,9 @@ process_initializer(ir_variable *var, ast_declaration *decl, } if (rhs && !rhs->type->is_error()) { - bool temp = var->read_only; + bool temp = var->data.read_only; if (type->qualifier.flags.q.constant) - var->read_only = false; + var->data.read_only = false; /* Never emit code to initialize a uniform. */ @@ -2664,7 +2668,7 @@ process_initializer(ir_variable *var, ast_declaration *decl, initializer_type = rhs->type; var->constant_initializer = rhs->constant_expression_value(); - var->has_initializer = true; + var->data.has_initializer = true; /* If the declared variable is an unsized array, it must inherrit * its full type from the initializer. A declaration such as @@ -2688,7 +2692,7 @@ process_initializer(ir_variable *var, ast_declaration *decl, */ var->type = initializer_type; - var->read_only = temp; + var->data.read_only = temp; } return result; @@ -2840,23 +2844,23 @@ ast_declarator_list::hir(exec_list *instructions, _mesa_glsl_error(& loc, state, "undeclared variable `%s' cannot be marked " "invariant", decl->identifier); - } else if ((state->target == vertex_shader) - && (earlier->mode != ir_var_shader_out)) { + } else if ((state->target == MESA_SHADER_VERTEX) + && (earlier->data.mode != ir_var_shader_out)) { _mesa_glsl_error(& loc, state, "`%s' cannot be marked invariant, vertex shader " "outputs only", decl->identifier); - } else if ((state->target == fragment_shader) - && (earlier->mode != ir_var_shader_in)) { + } else if ((state->target == MESA_SHADER_FRAGMENT) + && (earlier->data.mode != ir_var_shader_in)) { _mesa_glsl_error(& loc, state, "`%s' cannot be marked invariant, fragment shader " "inputs only", decl->identifier); - } else if (earlier->used) { + } else if (earlier->data.used) { _mesa_glsl_error(& loc, state, "variable `%s' may not be redeclared " "`invariant' after being used", earlier->name); } else { - earlier->invariant = true; + earlier->data.invariant = true; } } @@ -2940,7 +2944,7 @@ ast_declarator_list::hir(exec_list *instructions, precision_names[this->type->qualifier.precision], type_name); } - } else { + } else if (this->type->specifier->structure == NULL) { _mesa_glsl_warning(&loc, state, "empty declaration"); } } @@ -3030,13 +3034,13 @@ ast_declarator_list::hir(exec_list *instructions, & loc, false); if (this->type->qualifier.flags.q.invariant) { - if ((state->target == vertex_shader) && - var->mode != ir_var_shader_out) { + if ((state->target == MESA_SHADER_VERTEX) && + var->data.mode != ir_var_shader_out) { _mesa_glsl_error(& loc, state, "`%s' cannot be marked invariant, vertex shader " "outputs only", var->name); - } else if ((state->target == fragment_shader) && - var->mode != ir_var_shader_in) { + } else if ((state->target == MESA_SHADER_FRAGMENT) && + var->data.mode != ir_var_shader_in) { /* FINISHME: Note that this doesn't work for invariant on * a function signature inval */ @@ -3073,10 +3077,10 @@ ast_declarator_list::hir(exec_list *instructions, "global scope%s", mode, var->name, extra); } - } else if (var->mode == ir_var_shader_in) { - var->read_only = true; + } else if (var->data.mode == ir_var_shader_in) { + var->data.read_only = true; - if (state->target == vertex_shader) { + if (state->target == MESA_SHADER_VERTEX) { bool error_emitted = false; /* From page 31 (page 37 of the PDF) of the GLSL 1.50 spec: @@ -3131,7 +3135,7 @@ ast_declarator_list::hir(exec_list *instructions, "cannot have array type")) { error_emitted = true; } - } else if (state->target == geometry_shader) { + } else if (state->target == MESA_SHADER_GEOMETRY) { /* From section 4.3.4 (Inputs) of the GLSL 1.50 spec: * * Geometry shader input variables get the per-vertex values @@ -3180,11 +3184,11 @@ ast_declarator_list::hir(exec_list *instructions, */ if (state->is_version(130, 300) && var->type->contains_integer() && - var->interpolation != INTERP_QUALIFIER_FLAT && - ((state->target == fragment_shader && var->mode == ir_var_shader_in) - || (state->target == vertex_shader && var->mode == ir_var_shader_out + var->data.interpolation != INTERP_QUALIFIER_FLAT && + ((state->target == MESA_SHADER_FRAGMENT && var->data.mode == ir_var_shader_in) + || (state->target == MESA_SHADER_VERTEX && var->data.mode == ir_var_shader_out && state->es_shader))) { - const char *var_type = (state->target == vertex_shader) ? + const char *var_type = (state->target == MESA_SHADER_VERTEX) ? "vertex output" : "fragment input"; _mesa_glsl_error(&loc, state, "if a %s is (or contains) " "an integer, then it must be qualified with 'flat'", @@ -3241,14 +3245,14 @@ ast_declarator_list::hir(exec_list *instructions, assert(i != NULL); switch (state->target) { - case vertex_shader: + case MESA_SHADER_VERTEX: if (this->type->qualifier.flags.q.in) { _mesa_glsl_error(&loc, state, "qualifier '%s' cannot be applied to vertex " "shader inputs", i); } break; - case fragment_shader: + case MESA_SHADER_FRAGMENT: if (this->type->qualifier.flags.q.out) { _mesa_glsl_error(&loc, state, "qualifier '%s' cannot be applied to fragment " @@ -3271,12 +3275,20 @@ ast_declarator_list::hir(exec_list *instructions, if (state->is_version(130, 300) && this->type->qualifier.flags.q.centroid && this->type->qualifier.flags.q.in - && state->target == vertex_shader) { + && state->target == MESA_SHADER_VERTEX) { _mesa_glsl_error(&loc, state, "'centroid in' cannot be used in a vertex shader"); } + if (state->target == MESA_SHADER_VERTEX + && this->type->qualifier.flags.q.sample + && this->type->qualifier.flags.q.in) { + + _mesa_glsl_error(&loc, state, + "'sample in' cannot be used in a vertex shader"); + } + /* Section 4.3.6 of the GLSL 1.30 specification states: * "It is an error to use centroid out in a fragment shader." * @@ -3284,7 +3296,7 @@ ast_declarator_list::hir(exec_list *instructions, * "It is an error to use auxiliary storage qualifiers or interpolation * qualifiers on an output in a fragment shader." */ - if (state->target == fragment_shader && + if (state->target == MESA_SHADER_FRAGMENT && this->type->qualifier.flags.q.out && this->type->qualifier.has_auxiliary_storage()) { _mesa_glsl_error(&loc, state, @@ -3363,12 +3375,12 @@ ast_declarator_list::hir(exec_list *instructions, false /* allow_all_redeclarations */); if (earlier != NULL) { if (strncmp(var->name, "gl_", 3) == 0 && - earlier->how_declared == ir_var_declared_in_block) { + earlier->data.how_declared == ir_var_declared_in_block) { _mesa_glsl_error(&loc, state, "`%s' has already been redeclared using " "gl_PerVertex", var->name); } - earlier->how_declared = ir_var_declared_normally; + earlier->data.how_declared = ir_var_declared_normally; } if (decl->initializer != NULL) { @@ -3548,7 +3560,7 @@ ast_parameter_declarator::hir(exec_list *instructions, * as out or inout function parameters, nor can they be assigned * into." */ - if ((var->mode == ir_var_function_inout || var->mode == ir_var_function_out) + if ((var->data.mode == ir_var_function_inout || var->data.mode == ir_var_function_out) && type->contains_sampler()) { _mesa_glsl_error(&loc, state, "out and inout parameters cannot contain samplers"); type = glsl_type::error_type; @@ -3568,7 +3580,7 @@ ast_parameter_declarator::hir(exec_list *instructions, * So for GLSL 1.10, passing an array as an out or inout parameter is not * allowed. This restriction is removed in GLSL 1.20, and in GLSL ES. */ - if ((var->mode == ir_var_function_inout || var->mode == ir_var_function_out) + if ((var->data.mode == ir_var_function_inout || var->data.mode == ir_var_function_out) && type->is_array() && !state->check_version(120, 100, &loc, "arrays cannot be out or inout parameters")) { @@ -3942,7 +3954,7 @@ ast_jump_statement::hir(exec_list *instructions, } case ast_discard: - if (state->target != fragment_shader) { + if (state->target != MESA_SHADER_FRAGMENT) { YYLTYPE loc = this->get_location(); _mesa_glsl_error(& loc, state, @@ -4480,7 +4492,7 @@ ast_type_specifier::hir(exec_list *instructions, if (type->base_type == GLSL_TYPE_FLOAT && state->es_shader - && state->target == fragment_shader) { + && state->target == MESA_SHADER_FRAGMENT) { /* Section 4.5.3 (Default Precision Qualifiers) of the GLSL ES 1.00 * spec says: * @@ -4662,6 +4674,7 @@ ast_process_structure_or_interface_block(exec_list *instructions, fields[i].interpolation = interpret_interpolation_qualifier(qual, var_mode, state, &loc); fields[i].centroid = qual->flags.q.centroid ? 1 : 0; + fields[i].sample = qual->flags.q.sample ? 1 : 0; if (qual->flags.q.row_major || qual->flags.q.column_major) { if (!qual->flags.q.uniform) { @@ -4782,7 +4795,7 @@ public: virtual ir_visitor_status visit(ir_dereference_variable *ir) { - if (ir->var->mode == mode && ir->var->get_interface_type() == block) { + if (ir->var->data.mode == mode && ir->var->get_interface_type() == block) { found = true; return visit_stop; } @@ -4930,6 +4943,8 @@ ast_interface_block::hir(exec_list *instructions, earlier_per_vertex->fields.structure[j].interpolation; fields[i].centroid = earlier_per_vertex->fields.structure[j].centroid; + fields[i].sample = + earlier_per_vertex->fields.structure[j].sample; } } @@ -4980,7 +4995,7 @@ ast_interface_block::hir(exec_list *instructions, * variable (or input block, see interface blocks below) needs to be * declared as an array. */ - if (state->target == geometry_shader && !this->is_array && + if (state->target == MESA_SHADER_GEOMETRY && !this->is_array && var_mode == ir_var_shader_in) { _mesa_glsl_error(&loc, state, "geometry shader inputs must be arrays"); } @@ -5035,7 +5050,7 @@ ast_interface_block::hir(exec_list *instructions, * geometry shader input. */ if (this->array_size == NULL && - (state->target != geometry_shader || !this->layout.flags.q.in)) { + (state->target != MESA_SHADER_GEOMETRY || !this->layout.flags.q.in)) { _mesa_glsl_error(&loc, state, "only geometry shader inputs may be unsized " "instance block arrays"); @@ -5054,7 +5069,7 @@ ast_interface_block::hir(exec_list *instructions, var_mode); } - if (state->target == geometry_shader && var_mode == ir_var_shader_in) + if (state->target == MESA_SHADER_GEOMETRY && var_mode == ir_var_shader_in) handle_geometry_shader_input_decl(state, loc, var); if (ir_variable *earlier = @@ -5063,7 +5078,7 @@ ast_interface_block::hir(exec_list *instructions, _mesa_glsl_error(&loc, state, "`%s' redeclared", this->instance_name); } - earlier->how_declared = ir_var_declared_normally; + earlier->data.how_declared = ir_var_declared_normally; earlier->type = var->type; earlier->reinit_interface_type(block_type); delete var; @@ -5082,8 +5097,9 @@ ast_interface_block::hir(exec_list *instructions, new(state) ir_variable(fields[i].type, ralloc_strdup(state, fields[i].name), var_mode); - var->interpolation = fields[i].interpolation; - var->centroid = fields[i].centroid; + var->data.interpolation = fields[i].interpolation; + var->data.centroid = fields[i].centroid; + var->data.sample = fields[i].sample; var->init_interface_type(block_type); if (redeclaring_per_vertex) { @@ -5094,11 +5110,11 @@ ast_interface_block::hir(exec_list *instructions, _mesa_glsl_error(&loc, state, "redeclaration of gl_PerVertex can only " "include built-in variables"); - } else if (earlier->how_declared == ir_var_declared_normally) { + } else if (earlier->data.how_declared == ir_var_declared_normally) { _mesa_glsl_error(&loc, state, "`%s' has already been redeclared", var->name); } else { - earlier->how_declared = ir_var_declared_in_block; + earlier->data.how_declared = ir_var_declared_in_block; earlier->reinit_interface_type(block_type); } continue; @@ -5111,8 +5127,8 @@ ast_interface_block::hir(exec_list *instructions, * the UBO declaration itself doesn't get an ir_variable unless it * has an instance name. This is ugly. */ - var->explicit_binding = this->layout.flags.q.explicit_binding; - var->binding = this->layout.binding; + var->data.explicit_binding = this->layout.flags.q.explicit_binding; + var->data.binding = this->layout.binding; state->symbols->add_variable(var); instructions->push_tail(var); @@ -5144,8 +5160,8 @@ ast_interface_block::hir(exec_list *instructions, ir_variable *const var = ((ir_instruction *) node)->as_variable(); if (var != NULL && var->get_interface_type() == earlier_per_vertex && - var->mode == var_mode) { - if (var->how_declared == ir_var_declared_normally) { + var->data.mode == var_mode) { + if (var->data.how_declared == ir_var_declared_normally) { _mesa_glsl_error(&loc, state, "redeclaration of gl_PerVertex cannot " "follow a redeclaration of `%s'", @@ -5200,7 +5216,7 @@ ast_gs_input_layout::hir(exec_list *instructions, */ foreach_list (node, instructions) { ir_variable *var = ((ir_instruction *) node)->as_variable(); - if (var == NULL || var->mode != ir_var_shader_in) + if (var == NULL || var->data.mode != ir_var_shader_in) continue; /* Note: gl_PrimitiveIDIn has mode ir_var_shader_in, but it's not an @@ -5208,12 +5224,12 @@ ast_gs_input_layout::hir(exec_list *instructions, */ if (var->type->is_unsized_array()) { - if (var->max_array_access >= num_vertices) { + if (var->data.max_array_access >= num_vertices) { _mesa_glsl_error(&loc, state, "this geometry shader input layout implies %u" " vertices, but an access to element %u of input" " `%s' already exists", num_vertices, - var->max_array_access, var->name); + var->data.max_array_access, var->name); } else { var->type = glsl_type::get_array_instance(var->type->fields.array, num_vertices); @@ -5241,7 +5257,7 @@ detect_conflicting_assignments(struct _mesa_glsl_parse_state *state, foreach_list(node, instructions) { ir_variable *var = ((ir_instruction *)node)->as_variable(); - if (!var || !var->assigned) + if (!var || !var->data.assigned) continue; if (strcmp(var->name, "gl_FragColor") == 0) @@ -5249,8 +5265,8 @@ detect_conflicting_assignments(struct _mesa_glsl_parse_state *state, else if (strcmp(var->name, "gl_FragData") == 0) gl_FragData_assigned = true; else if (strncmp(var->name, "gl_", 3) != 0) { - if (state->target == fragment_shader && - var->mode == ir_var_shader_out) { + if (state->target == MESA_SHADER_FRAGMENT && + var->data.mode == ir_var_shader_out) { user_defined_fs_output_assigned = true; user_defined_fs_output = var; } @@ -5331,7 +5347,7 @@ remove_per_vertex_blocks(exec_list *instructions, foreach_list_safe(node, instructions) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); if (var != NULL && var->get_interface_type() == per_vertex && - var->mode == mode) { + var->data.mode == mode) { state->symbols->disable_variable(var->name); var->remove(); } diff --git a/mesalib/src/glsl/ast_type.cpp b/mesalib/src/glsl/ast_type.cpp index 2b088bf8b..d758bfa1f 100644 --- a/mesalib/src/glsl/ast_type.cpp +++ b/mesalib/src/glsl/ast_type.cpp @@ -90,7 +90,8 @@ ast_type_qualifier::has_storage() const bool ast_type_qualifier::has_auxiliary_storage() const { - return this->flags.q.centroid; + return this->flags.q.centroid + || this->flags.q.sample; } const char* diff --git a/mesalib/src/glsl/builtin_functions.cpp b/mesalib/src/glsl/builtin_functions.cpp index a45de091b..f22ace19d 100644 --- a/mesalib/src/glsl/builtin_functions.cpp +++ b/mesalib/src/glsl/builtin_functions.cpp @@ -77,7 +77,7 @@ always_available(const _mesa_glsl_parse_state *state) static bool compatibility_vs_only(const _mesa_glsl_parse_state *state) { - return state->target == vertex_shader && + return state->target == MESA_SHADER_VERTEX && state->language_version <= 130 && !state->es_shader; } @@ -85,13 +85,13 @@ compatibility_vs_only(const _mesa_glsl_parse_state *state) static bool fs_only(const _mesa_glsl_parse_state *state) { - return state->target == fragment_shader; + return state->target == MESA_SHADER_FRAGMENT; } static bool gs_only(const _mesa_glsl_parse_state *state) { - return state->target == geometry_shader; + return state->target == MESA_SHADER_GEOMETRY; } static bool @@ -103,7 +103,7 @@ v110(const _mesa_glsl_parse_state *state) static bool v110_fs_only(const _mesa_glsl_parse_state *state) { - return !state->es_shader && state->target == fragment_shader; + return !state->es_shader && state->target == MESA_SHADER_FRAGMENT; } static bool @@ -122,7 +122,7 @@ static bool v130_fs_only(const _mesa_glsl_parse_state *state) { return state->is_version(130, 300) && - state->target == fragment_shader; + state->target == MESA_SHADER_FRAGMENT; } static bool @@ -155,7 +155,7 @@ lod_exists_in_stage(const _mesa_glsl_parse_state *state) * Since ARB_shader_texture_lod can only be enabled on desktop GLSL, we * don't need to explicitly check state->es_shader. */ - return state->target == vertex_shader || + return state->target == MESA_SHADER_VERTEX || state->is_version(130, 300) || state->ARB_shader_texture_lod_enable; } @@ -223,7 +223,7 @@ texture_array_lod(const _mesa_glsl_parse_state *state) static bool fs_texture_array(const _mesa_glsl_parse_state *state) { - return state->target == fragment_shader && + return state->target == MESA_SHADER_FRAGMENT && state->EXT_texture_array_enable; } @@ -243,7 +243,7 @@ texture_multisample(const _mesa_glsl_parse_state *state) static bool fs_texture_cube_map_array(const _mesa_glsl_parse_state *state) { - return state->target == fragment_shader && + return state->target == MESA_SHADER_FRAGMENT && (state->is_version(400, 0) || state->ARB_texture_cube_map_array_enable); } @@ -265,7 +265,7 @@ texture_query_levels(const _mesa_glsl_parse_state *state) static bool texture_query_lod(const _mesa_glsl_parse_state *state) { - return state->target == fragment_shader && + return state->target == MESA_SHADER_FRAGMENT && state->ARB_texture_query_lod_enable; } @@ -292,7 +292,7 @@ texture_gather_only(const _mesa_glsl_parse_state *state) static bool fs_oes_derivatives(const _mesa_glsl_parse_state *state) { - return state->target == fragment_shader && + return state->target == MESA_SHADER_FRAGMENT && (state->is_version(110, 300) || state->OES_standard_derivatives_enable); } @@ -318,7 +318,7 @@ tex3d(const _mesa_glsl_parse_state *state) static bool fs_tex3d(const _mesa_glsl_parse_state *state) { - return state->target == fragment_shader && + return state->target == MESA_SHADER_FRAGMENT && (!state->es_shader || state->OES_texture_3D_enable); } @@ -357,8 +357,6 @@ public: ir_function_signature *find(_mesa_glsl_parse_state *state, const char *name, exec_list *actual_parameters); -private: - void *mem_ctx; /** * A shader to hold all the built-in signatures; created by this module. * @@ -368,6 +366,9 @@ private: */ gl_shader *shader; +private: + void *mem_ctx; + /** Global variables used by built-in functions. */ ir_variable *gl_ModelViewProjectionMatrix; ir_variable *gl_Vertex; @@ -608,8 +609,7 @@ builtin_builder::find(_mesa_glsl_parse_state *state, * that the "no matching signature" error will list potential candidates * from the available built-ins. */ - state->builtins_to_link[0] = shader; - state->num_builtins_to_link = 1; + state->uses_builtin_functions = true; ir_function *f = shader->symbols->get_function(name); if (f == NULL) @@ -4020,4 +4020,11 @@ _mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state, { return builtins.find(state, name, actual_parameters); } + +gl_shader * +_mesa_glsl_get_builtin_function_shader() +{ + return builtins.shader; +} + /** @} */ diff --git a/mesalib/src/glsl/builtin_variables.cpp b/mesalib/src/glsl/builtin_variables.cpp index d57324c2f..ff9acb8d0 100644 --- a/mesalib/src/glsl/builtin_variables.cpp +++ b/mesalib/src/glsl/builtin_variables.cpp @@ -332,6 +332,7 @@ per_vertex_accumulator::add_field(int slot, const glsl_type *type, this->fields[this->num_fields].location = slot; this->fields[this->num_fields].interpolation = INTERP_QUALIFIER_NONE; this->fields[this->num_fields].centroid = 0; + this->fields[this->num_fields].sample = 0; this->num_fields++; } @@ -434,14 +435,14 @@ builtin_variable_generator::add_variable(const char *name, enum ir_variable_mode mode, int slot) { ir_variable *var = new(symtab) ir_variable(type, name, mode); - var->how_declared = ir_var_declared_implicitly; + var->data.how_declared = ir_var_declared_implicitly; - switch (var->mode) { + switch (var->data.mode) { case ir_var_auto: case ir_var_shader_in: case ir_var_uniform: case ir_var_system_value: - var->read_only = true; + var->data.read_only = true; break; case ir_var_shader_out: break; @@ -454,9 +455,9 @@ builtin_variable_generator::add_variable(const char *name, break; } - var->location = slot; - var->explicit_location = (slot >= 0); - var->explicit_index = 0; + var->data.location = slot; + var->data.explicit_location = (slot >= 0); + var->data.explicit_index = 0; /* Once the variable is created an initialized, add it to the symbol table * and add the declaration to the IR stream. @@ -523,7 +524,7 @@ builtin_variable_generator::add_const(const char *name, int value) ir_var_auto, -1); var->constant_value = new(var) ir_constant(value); var->constant_initializer = new(var) ir_constant(value); - var->has_initializer = true; + var->data.has_initializer = true; return var; } @@ -792,9 +793,9 @@ builtin_variable_generator::generate_gs_special_vars() */ ir_variable *var; var = add_input(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveIDIn"); - var->interpolation = INTERP_QUALIFIER_FLAT; + var->data.interpolation = INTERP_QUALIFIER_FLAT; var = add_output(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveID"); - var->interpolation = INTERP_QUALIFIER_FLAT; + var->data.interpolation = INTERP_QUALIFIER_FLAT; } @@ -812,7 +813,7 @@ builtin_variable_generator::generate_fs_special_vars() if (state->is_version(150, 0)) { ir_variable *var = add_input(VARYING_SLOT_PRIMITIVE_ID, int_t, "gl_PrimitiveID"); - var->interpolation = INTERP_QUALIFIER_FLAT; + var->data.interpolation = INTERP_QUALIFIER_FLAT; } /* gl_FragColor and gl_FragData were deprecated starting in desktop GLSL @@ -857,6 +858,10 @@ builtin_variable_generator::generate_fs_special_vars() */ add_output(FRAG_RESULT_SAMPLE_MASK, array(int_t, 1), "gl_SampleMask"); } + + if (state->ARB_gpu_shader5_enable) { + add_system_value(SYSTEM_VALUE_SAMPLE_MASK_IN, array(int_t, 1), "gl_SampleMaskIn"); + } } @@ -872,13 +877,13 @@ builtin_variable_generator::add_varying(int slot, const glsl_type *type, const char *name_as_gs_input) { switch (state->target) { - case geometry_shader: + case MESA_SHADER_GEOMETRY: this->per_vertex_in.add_field(slot, type, name); /* FALLTHROUGH */ - case vertex_shader: + case MESA_SHADER_VERTEX: this->per_vertex_out.add_field(slot, type, name); break; - case fragment_shader: + case MESA_SHADER_FRAGMENT: add_input(slot, type, name); break; } @@ -896,7 +901,7 @@ builtin_variable_generator::generate_varyings() add_varying(loc, type, name, name "In") /* gl_Position and gl_PointSize are not visible from fragment shaders. */ - if (state->target != fragment_shader) { + if (state->target != MESA_SHADER_FRAGMENT) { ADD_VARYING(VARYING_SLOT_POS, vec4_t, "gl_Position"); ADD_VARYING(VARYING_SLOT_PSIZ, float_t, "gl_PointSize"); } @@ -909,7 +914,7 @@ builtin_variable_generator::generate_varyings() if (compatibility) { ADD_VARYING(VARYING_SLOT_TEX0, array(vec4_t, 0), "gl_TexCoord"); ADD_VARYING(VARYING_SLOT_FOGC, float_t, "gl_FogFragCoord"); - if (state->target == fragment_shader) { + if (state->target == MESA_SHADER_FRAGMENT) { ADD_VARYING(VARYING_SLOT_COL0, vec4_t, "gl_Color"); ADD_VARYING(VARYING_SLOT_COL1, vec4_t, "gl_SecondaryColor"); } else { @@ -921,13 +926,13 @@ builtin_variable_generator::generate_varyings() } } - if (state->target == geometry_shader) { + if (state->target == MESA_SHADER_GEOMETRY) { const glsl_type *per_vertex_in_type = this->per_vertex_in.construct_interface_instance(); add_variable("gl_in", array(per_vertex_in_type, 0), ir_var_shader_in, -1); } - if (state->target == vertex_shader || state->target == geometry_shader) { + if (state->target == MESA_SHADER_VERTEX || state->target == MESA_SHADER_GEOMETRY) { const glsl_type *per_vertex_out_type = this->per_vertex_out.construct_interface_instance(); const glsl_struct_field *fields = per_vertex_out_type->fields.structure; @@ -935,8 +940,9 @@ builtin_variable_generator::generate_varyings() ir_variable *var = add_variable(fields[i].name, fields[i].type, ir_var_shader_out, fields[i].location); - var->interpolation = fields[i].interpolation; - var->centroid = fields[i].centroid; + var->data.interpolation = fields[i].interpolation; + var->data.centroid = fields[i].centroid; + var->data.sample = fields[i].sample; var->init_interface_type(per_vertex_out_type); } } @@ -958,13 +964,13 @@ _mesa_glsl_initialize_variables(exec_list *instructions, gen.generate_varyings(); switch (state->target) { - case vertex_shader: + case MESA_SHADER_VERTEX: gen.generate_vs_special_vars(); break; - case geometry_shader: + case MESA_SHADER_GEOMETRY: gen.generate_gs_special_vars(); break; - case fragment_shader: + case MESA_SHADER_FRAGMENT: gen.generate_fs_special_vars(); break; } diff --git a/mesalib/src/glsl/glsl_lexer.ll b/mesalib/src/glsl/glsl_lexer.ll index 822d70d6b..50875bf3b 100644 --- a/mesalib/src/glsl/glsl_lexer.ll +++ b/mesalib/src/glsl/glsl_lexer.ll @@ -520,7 +520,7 @@ readonly KEYWORD(0, 300, 0, 0, READONLY); writeonly KEYWORD(0, 300, 0, 0, WRITEONLY); resource KEYWORD(0, 300, 0, 0, RESOURCE); patch KEYWORD(0, 300, 0, 0, PATCH); -sample KEYWORD(0, 300, 0, 0, SAMPLE); +sample KEYWORD_WITH_ALT(400, 300, 400, 0, yyextra->ARB_gpu_shader5_enable, SAMPLE); subroutine KEYWORD(0, 300, 0, 0, SUBROUTINE); diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy index 8ad7484fb..6cd129cae 100644 --- a/mesalib/src/glsl/glsl_parser.yy +++ b/mesalib/src/glsl/glsl_parser.yy @@ -1522,7 +1522,7 @@ type_qualifier: { if ($2.has_auxiliary_storage()) { _mesa_glsl_error(&@1, state, - "duplicate auxiliary storage qualifier (centroid)"); + "duplicate auxiliary storage qualifier (centroid or sample)"); } if (!state->ARB_shading_language_420pack_enable && @@ -1572,7 +1572,12 @@ auxiliary_storage_qualifier: memset(& $$, 0, sizeof($$)); $$.flags.q.centroid = 1; } - /* TODO: "sample" and "patch" also go here someday. */ + | SAMPLE + { + memset(& $$, 0, sizeof($$)); + $$.flags.q.sample = 1; + } + /* TODO: "patch" also goes here someday. */ storage_qualifier: CONST_TOK @@ -2215,11 +2220,11 @@ basic_interface_block: * "It is illegal to have an input block in a vertex shader * or an output block in a fragment shader" */ - if ((state->target == vertex_shader) && $1.flags.q.in) { + if ((state->target == MESA_SHADER_VERTEX) && $1.flags.q.in) { _mesa_glsl_error(& @1, state, "`in' interface block is not allowed for " "a vertex shader"); - } else if ((state->target == fragment_shader) && $1.flags.q.out) { + } else if ((state->target == MESA_SHADER_FRAGMENT) && $1.flags.q.out) { _mesa_glsl_error(& @1, state, "`out' interface block is not allowed for " "a fragment shader"); @@ -2373,7 +2378,7 @@ layout_defaults: { void *ctx = state; $$ = NULL; - if (state->target != geometry_shader) { + if (state->target != MESA_SHADER_GEOMETRY) { _mesa_glsl_error(& @1, state, "input layout qualifiers only valid in " "geometry shaders"); @@ -2401,7 +2406,7 @@ layout_defaults: | layout_qualifier OUT_TOK ';' { - if (state->target != geometry_shader) { + if (state->target != MESA_SHADER_GEOMETRY) { _mesa_glsl_error(& @1, state, "out layout qualifiers only valid in " "geometry shaders"); diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp index d76d94b7a..5f19368d8 100644 --- a/mesalib/src/glsl/glsl_parser_extras.cpp +++ b/mesalib/src/glsl/glsl_parser_extras.cpp @@ -58,9 +58,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, : ctx(_ctx), switch_state() { switch (target) { - case GL_VERTEX_SHADER: this->target = vertex_shader; break; - case GL_FRAGMENT_SHADER: this->target = fragment_shader; break; - case GL_GEOMETRY_SHADER: this->target = geometry_shader; break; + case GL_VERTEX_SHADER: this->target = MESA_SHADER_VERTEX; break; + case GL_FRAGMENT_SHADER: this->target = MESA_SHADER_FRAGMENT; break; + case GL_GEOMETRY_SHADER: this->target = MESA_SHADER_GEOMETRY; break; } this->scanner = NULL; @@ -76,7 +76,8 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->loop_nesting_ast = NULL; this->struct_specifier_depth = 0; - this->num_builtins_to_link = 0; + + this->uses_builtin_functions = false; /* Set default language version and extensions */ this->language_version = ctx->Const.ForceGLSLVersion ? @@ -366,12 +367,12 @@ _mesa_glsl_shader_target_name(GLenum type) * our internal enum into short stage names. */ const char * -_mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target) +_mesa_glsl_shader_target_name(gl_shader_type target) { switch (target) { - case vertex_shader: return "vertex"; - case fragment_shader: return "fragment"; - case geometry_shader: return "geometry"; + case MESA_SHADER_VERTEX: return "vertex"; + case MESA_SHADER_FRAGMENT: return "fragment"; + case MESA_SHADER_GEOMETRY: return "geometry"; } assert(!"Should not get here."); @@ -877,6 +878,8 @@ _mesa_ast_type_qualifier_print(const struct ast_type_qualifier *q) if (q->flags.q.centroid) printf("centroid "); + if (q->flags.q.sample) + printf("sample "); if (q->flags.q.uniform) printf("uniform "); if (q->flags.q.smooth) @@ -1532,10 +1535,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader, shader->InfoLog = state->info_log; shader->Version = state->language_version; shader->IsES = state->es_shader; - - memcpy(shader->builtins_to_link, state->builtins_to_link, - sizeof(shader->builtins_to_link[0]) * state->num_builtins_to_link); - shader->num_builtins_to_link = state->num_builtins_to_link; + shader->uses_builtin_functions = state->uses_builtin_functions; if (shader->UniformBlocks) ralloc_free(shader->UniformBlocks); diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h index cb998d80e..7aa78d611 100644 --- a/mesalib/src/glsl/glsl_parser_extras.h +++ b/mesalib/src/glsl/glsl_parser_extras.h @@ -34,12 +34,6 @@ #include <stdlib.h> #include "glsl_symbol_table.h" -enum _mesa_glsl_parser_targets { - vertex_shader, - geometry_shader, - fragment_shader -}; - struct gl_context; struct glsl_switch_state { @@ -175,7 +169,7 @@ struct _mesa_glsl_parse_state { bool es_shader; unsigned language_version; - enum _mesa_glsl_parser_targets target; + gl_shader_type target; /** * Number of nested struct_specifier levels @@ -365,9 +359,7 @@ struct _mesa_glsl_parse_state { /** Extensions supported by the OpenGL implementation. */ const struct gl_extensions *extensions; - /** Shaders containing built-in functions that are used for linking. */ - struct gl_shader *builtins_to_link[16]; - unsigned num_builtins_to_link; + bool uses_builtin_functions; /** * For geometry shaders, size of the most recently seen input declaration @@ -437,7 +429,7 @@ extern bool _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp, * Get the textual name of the specified shader target */ extern const char * -_mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target); +_mesa_glsl_shader_target_name(gl_shader_type target); #endif /* __cplusplus */ diff --git a/mesalib/src/glsl/glsl_types.cpp b/mesalib/src/glsl/glsl_types.cpp index f74013096..12d4ac0ee 100644 --- a/mesalib/src/glsl/glsl_types.cpp +++ b/mesalib/src/glsl/glsl_types.cpp @@ -103,6 +103,7 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields, this->fields.structure[i].location = fields[i].location; this->fields.structure[i].interpolation = fields[i].interpolation; this->fields.structure[i].centroid = fields[i].centroid; + this->fields.structure[i].sample = fields[i].sample; this->fields.structure[i].row_major = fields[i].row_major; } } @@ -130,6 +131,7 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields, this->fields.structure[i].location = fields[i].location; this->fields.structure[i].interpolation = fields[i].interpolation; this->fields.structure[i].centroid = fields[i].centroid; + this->fields.structure[i].sample = fields[i].sample; this->fields.structure[i].row_major = fields[i].row_major; } } @@ -483,6 +485,9 @@ glsl_type::record_key_compare(const void *a, const void *b) if (key1->fields.structure[i].centroid != key2->fields.structure[i].centroid) return 1; + if (key1->fields.structure[i].sample + != key2->fields.structure[i].sample) + return 1; } return 0; diff --git a/mesalib/src/glsl/glsl_types.h b/mesalib/src/glsl/glsl_types.h index 96eee5e64..fb7c9288d 100644 --- a/mesalib/src/glsl/glsl_types.h +++ b/mesalib/src/glsl/glsl_types.h @@ -634,6 +634,12 @@ struct glsl_struct_field { * in ir_variable::centroid). 0 otherwise. */ unsigned centroid:1; + + /** + * For interface blocks, 1 if this variable uses sample interpolation (as + * in ir_variable::sample). 0 otherwise. + */ + unsigned sample:1; }; static inline unsigned int diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp index 64a2c5af9..8af58b847 100644 --- a/mesalib/src/glsl/ir.cpp +++ b/mesalib/src/glsl/ir.cpp @@ -1277,11 +1277,6 @@ ir_constant::is_basis() const ir_loop::ir_loop() { this->ir_type = ir_type_loop; - this->cmp = ir_unop_neg; - this->from = NULL; - this->to = NULL; - this->increment = NULL; - this->counter = NULL; } @@ -1364,7 +1359,7 @@ ir_dereference::is_lvalue() const /* Every l-value derference chain eventually ends in a variable. */ - if ((var == NULL) || var->read_only) + if ((var == NULL) || var->data.read_only) return false; /* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec: @@ -1584,29 +1579,36 @@ ir_swizzle::variable_referenced() const ir_variable::ir_variable(const struct glsl_type *type, const char *name, ir_variable_mode mode) - : max_array_access(0), max_ifc_array_access(NULL), - read_only(false), centroid(false), invariant(false), - how_declared(ir_var_declared_normally), mode(mode), - interpolation(INTERP_QUALIFIER_NONE), atomic() + : max_ifc_array_access(NULL) { this->ir_type = ir_type_variable; this->type = type; this->name = ralloc_strdup(this, name); - this->explicit_location = false; - this->has_initializer = false; - this->location = -1; - this->location_frac = 0; + this->data.explicit_location = false; + this->data.has_initializer = false; + this->data.location = -1; + this->data.location_frac = 0; this->warn_extension = NULL; this->constant_value = NULL; this->constant_initializer = NULL; - this->origin_upper_left = false; - this->pixel_center_integer = false; - this->depth_layout = ir_depth_layout_none; - this->used = false; + this->data.origin_upper_left = false; + this->data.pixel_center_integer = false; + this->data.depth_layout = ir_depth_layout_none; + this->data.used = false; + this->data.read_only = false; + this->data.centroid = false; + this->data.sample = false; + this->data.invariant = false; + this->data.how_declared = ir_var_declared_normally; + this->data.mode = mode; + this->data.interpolation = INTERP_QUALIFIER_NONE; + this->data.max_array_access = 0; + this->data.atomic.buffer_index = 0; + this->data.atomic.offset = 0; if (type != NULL) { if (type->base_type == GLSL_TYPE_SAMPLER) - this->read_only = true; + this->data.read_only = true; if (type->is_interface()) this->init_interface_type(type); @@ -1634,9 +1636,9 @@ interpolation_string(unsigned interpolation) glsl_interp_qualifier ir_variable::determine_interpolation_mode(bool flat_shade) { - if (this->interpolation != INTERP_QUALIFIER_NONE) - return (glsl_interp_qualifier) this->interpolation; - int location = this->location; + if (this->data.interpolation != INTERP_QUALIFIER_NONE) + return (glsl_interp_qualifier) this->data.interpolation; + int location = this->data.location; bool is_gl_Color = location == VARYING_SLOT_COL0 || location == VARYING_SLOT_COL1; if (flat_shade && is_gl_Color) @@ -1706,10 +1708,11 @@ ir_function_signature::qualifiers_match(exec_list *params) ir_variable *a = (ir_variable *)iter_a.get(); ir_variable *b = (ir_variable *)iter_b.get(); - if (a->read_only != b->read_only || - !modes_match(a->mode, b->mode) || - a->interpolation != b->interpolation || - a->centroid != b->centroid) { + if (a->data.read_only != b->data.read_only || + !modes_match(a->data.mode, b->data.mode) || + a->data.interpolation != b->data.interpolation || + a->data.centroid != b->data.centroid || + a->data.sample != b->data.sample) { /* parameter a's qualifiers don't match */ return a->name; @@ -1729,12 +1732,6 @@ ir_function_signature::replace_parameters(exec_list *new_params) * parameter information comes from the function prototype, it may either * specify incorrect parameter names or not have names at all. */ - foreach_iter(exec_list_iterator, iter, parameters) { - assert(((ir_instruction *) iter.get())->as_variable() != NULL); - - iter.remove(); - } - new_params->move_nodes_to(¶meters); } @@ -1899,9 +1896,9 @@ vertices_per_prim(GLenum prim) const char * mode_string(const ir_variable *var) { - switch (var->mode) { + switch (var->data.mode) { case ir_var_auto: - return (var->read_only) ? "global constant" : "global variable"; + return (var->data.read_only) ? "global constant" : "global variable"; case ir_var_uniform: return "uniform"; diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h index 4f775da4b..780959b73 100644 --- a/mesalib/src/glsl/ir.h +++ b/mesalib/src/glsl/ir.h @@ -86,6 +86,7 @@ enum ir_node_type { ir_type_max /**< maximum ir_type enum number, for validation */ }; + /** * Base class of all IR instructions */ @@ -402,7 +403,7 @@ public: */ inline bool is_in_uniform_block() const { - return this->mode == ir_var_uniform && this->interface_type != NULL; + return this->data.mode == ir_var_uniform && this->interface_type != NULL; } /** @@ -502,13 +503,6 @@ public: const char *name; /** - * Highest element accessed with a constant expression array index - * - * Not used for non-array variables. - */ - unsigned max_array_access; - - /** * For variables which satisfy the is_interface_instance() predicate, this * points to an array of integers such that if the ith member of the * interface block is an array, max_ifc_array_access[i] is the maximum @@ -521,177 +515,189 @@ public: */ unsigned *max_ifc_array_access; - /** - * Is the variable read-only? - * - * This is set for variables declared as \c const, shader inputs, - * and uniforms. - */ - unsigned read_only:1; - unsigned centroid:1; - unsigned invariant:1; - - /** - * Has this variable been used for reading or writing? - * - * Several GLSL semantic checks require knowledge of whether or not a - * variable has been used. For example, it is an error to redeclare a - * variable as invariant after it has been used. - * - * This is only maintained in the ast_to_hir.cpp path, not in - * Mesa's fixed function or ARB program paths. - */ - unsigned used:1; - - /** - * Has this variable been statically assigned? - * - * This answers whether the variable was assigned in any path of - * the shader during ast_to_hir. This doesn't answer whether it is - * still written after dead code removal, nor is it maintained in - * non-ast_to_hir.cpp (GLSL parsing) paths. - */ - unsigned assigned:1; - - /** - * Enum indicating how the variable was declared. See - * ir_var_declaration_type. - * - * This is used to detect certain kinds of illegal variable redeclarations. - */ - unsigned how_declared:2; - - /** - * Storage class of the variable. - * - * \sa ir_variable_mode - */ - unsigned mode:4; - - /** - * Interpolation mode for shader inputs / outputs - * - * \sa ir_variable_interpolation - */ - unsigned interpolation:2; - - /** - * \name ARB_fragment_coord_conventions - * @{ - */ - unsigned origin_upper_left:1; - unsigned pixel_center_integer:1; - /*@}*/ + struct ir_variable_data { - /** - * Was the location explicitly set in the shader? - * - * If the location is explicitly set in the shader, it \b cannot be changed - * by the linker or by the API (e.g., calls to \c glBindAttribLocation have - * no effect). - */ - unsigned explicit_location:1; - unsigned explicit_index:1; - - /** - * Was an initial binding explicitly set in the shader? - * - * If so, constant_value contains an integer ir_constant representing the - * initial binding point. - */ - unsigned explicit_binding:1; + /** + * Is the variable read-only? + * + * This is set for variables declared as \c const, shader inputs, + * and uniforms. + */ + unsigned read_only:1; + unsigned centroid:1; + unsigned sample:1; + unsigned invariant:1; + + /** + * Has this variable been used for reading or writing? + * + * Several GLSL semantic checks require knowledge of whether or not a + * variable has been used. For example, it is an error to redeclare a + * variable as invariant after it has been used. + * + * This is only maintained in the ast_to_hir.cpp path, not in + * Mesa's fixed function or ARB program paths. + */ + unsigned used:1; + + /** + * Has this variable been statically assigned? + * + * This answers whether the variable was assigned in any path of + * the shader during ast_to_hir. This doesn't answer whether it is + * still written after dead code removal, nor is it maintained in + * non-ast_to_hir.cpp (GLSL parsing) paths. + */ + unsigned assigned:1; - /** - * Does this variable have an initializer? - * - * This is used by the linker to cross-validiate initializers of global - * variables. - */ - unsigned has_initializer:1; + /** + * Enum indicating how the variable was declared. See + * ir_var_declaration_type. + * + * This is used to detect certain kinds of illegal variable redeclarations. + */ + unsigned how_declared:2; - /** - * Is this variable a generic output or input that has not yet been matched - * up to a variable in another stage of the pipeline? - * - * This is used by the linker as scratch storage while assigning locations - * to generic inputs and outputs. - */ - unsigned is_unmatched_generic_inout:1; + /** + * Storage class of the variable. + * + * \sa ir_variable_mode + */ + unsigned mode:4; - /** - * If non-zero, then this variable may be packed along with other variables - * into a single varying slot, so this offset should be applied when - * accessing components. For example, an offset of 1 means that the x - * component of this variable is actually stored in component y of the - * location specified by \c location. - */ - unsigned location_frac:2; + /** + * Interpolation mode for shader inputs / outputs + * + * \sa ir_variable_interpolation + */ + unsigned interpolation:2; - /** - * Non-zero if this variable was created by lowering a named interface - * block which was not an array. - * - * Note that this variable and \c from_named_ifc_block_array will never - * both be non-zero. - */ - unsigned from_named_ifc_block_nonarray:1; + /** + * \name ARB_fragment_coord_conventions + * @{ + */ + unsigned origin_upper_left:1; + unsigned pixel_center_integer:1; + /*@}*/ + + /** + * Was the location explicitly set in the shader? + * + * If the location is explicitly set in the shader, it \b cannot be changed + * by the linker or by the API (e.g., calls to \c glBindAttribLocation have + * no effect). + */ + unsigned explicit_location:1; + unsigned explicit_index:1; + + /** + * Was an initial binding explicitly set in the shader? + * + * If so, constant_value contains an integer ir_constant representing the + * initial binding point. + */ + unsigned explicit_binding:1; - /** - * Non-zero if this variable was created by lowering a named interface - * block which was an array. - * - * Note that this variable and \c from_named_ifc_block_nonarray will never - * both be non-zero. - */ - unsigned from_named_ifc_block_array:1; + /** + * Does this variable have an initializer? + * + * This is used by the linker to cross-validiate initializers of global + * variables. + */ + unsigned has_initializer:1; + + /** + * Is this variable a generic output or input that has not yet been matched + * up to a variable in another stage of the pipeline? + * + * This is used by the linker as scratch storage while assigning locations + * to generic inputs and outputs. + */ + unsigned is_unmatched_generic_inout:1; + + /** + * If non-zero, then this variable may be packed along with other variables + * into a single varying slot, so this offset should be applied when + * accessing components. For example, an offset of 1 means that the x + * component of this variable is actually stored in component y of the + * location specified by \c location. + */ + unsigned location_frac:2; + + /** + * Non-zero if this variable was created by lowering a named interface + * block which was not an array. + * + * Note that this variable and \c from_named_ifc_block_array will never + * both be non-zero. + */ + unsigned from_named_ifc_block_nonarray:1; + + /** + * Non-zero if this variable was created by lowering a named interface + * block which was an array. + * + * Note that this variable and \c from_named_ifc_block_nonarray will never + * both be non-zero. + */ + unsigned from_named_ifc_block_array:1; - /** - * \brief Layout qualifier for gl_FragDepth. - * - * This is not equal to \c ir_depth_layout_none if and only if this - * variable is \c gl_FragDepth and a layout qualifier is specified. - */ - ir_depth_layout depth_layout; + /** + * \brief Layout qualifier for gl_FragDepth. + * + * This is not equal to \c ir_depth_layout_none if and only if this + * variable is \c gl_FragDepth and a layout qualifier is specified. + */ + ir_depth_layout depth_layout; + + /** + * Storage location of the base of this variable + * + * The precise meaning of this field depends on the nature of the variable. + * + * - Vertex shader input: one of the values from \c gl_vert_attrib. + * - Vertex shader output: one of the values from \c gl_varying_slot. + * - Geometry shader input: one of the values from \c gl_varying_slot. + * - Geometry shader output: one of the values from \c gl_varying_slot. + * - Fragment shader input: one of the values from \c gl_varying_slot. + * - Fragment shader output: one of the values from \c gl_frag_result. + * - Uniforms: Per-stage uniform slot number for default uniform block. + * - Uniforms: Index within the uniform block definition for UBO members. + * - Other: This field is not currently used. + * + * If the variable is a uniform, shader input, or shader output, and the + * slot has not been assigned, the value will be -1. + */ + int location; - /** - * Storage location of the base of this variable - * - * The precise meaning of this field depends on the nature of the variable. - * - * - Vertex shader input: one of the values from \c gl_vert_attrib. - * - Vertex shader output: one of the values from \c gl_varying_slot. - * - Geometry shader input: one of the values from \c gl_varying_slot. - * - Geometry shader output: one of the values from \c gl_varying_slot. - * - Fragment shader input: one of the values from \c gl_varying_slot. - * - Fragment shader output: one of the values from \c gl_frag_result. - * - Uniforms: Per-stage uniform slot number for default uniform block. - * - Uniforms: Index within the uniform block definition for UBO members. - * - Other: This field is not currently used. - * - * If the variable is a uniform, shader input, or shader output, and the - * slot has not been assigned, the value will be -1. - */ - int location; + /** + * output index for dual source blending. + */ + int index; - /** - * output index for dual source blending. - */ - int index; + /** + * Initial binding point for a sampler or UBO. + * + * For array types, this represents the binding point for the first element. + */ + int binding; - /** - * Initial binding point for a sampler or UBO. - * - * For array types, this represents the binding point for the first element. - */ - int binding; + /** + * Location an atomic counter is stored at. + */ + struct { + unsigned buffer_index; + unsigned offset; + } atomic; + + /** + * Highest element accessed with a constant expression array index + * + * Not used for non-array variables. + */ + unsigned max_array_access; - /** - * Location an atomic counter is stored at. - */ - struct { - unsigned buffer_index; - unsigned offset; - } atomic; + } data; /** * Built-in state that backs this uniform @@ -1022,34 +1028,6 @@ public: /** List of ir_instruction that make up the body of the loop. */ exec_list body_instructions; - - /** - * \name Loop counter and controls - * - * Represents a loop like a FORTRAN \c do-loop. - * - * \note - * If \c from and \c to are the same value, the loop will execute once. - */ - /*@{*/ - ir_rvalue *from; /** Value of the loop counter on the first - * iteration of the loop. - */ - ir_rvalue *to; /** Value of the loop counter on the last - * iteration of the loop. - */ - ir_rvalue *increment; - ir_variable *counter; - - /** - * Comparison operation in the loop terminator. - * - * If any of the loop control fields are non-\c NULL, this field must be - * one of \c ir_binop_less, \c ir_binop_greater, \c ir_binop_lequal, - * \c ir_binop_gequal, \c ir_binop_equal, or \c ir_binop_nequal. - */ - int cmp; - /*@}*/ }; @@ -2344,6 +2322,9 @@ extern ir_function_signature * _mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state, const char *name, exec_list *actual_parameters); +extern gl_shader * +_mesa_glsl_get_builtin_function_shader(void); + extern void _mesa_glsl_release_functions(void); diff --git a/mesalib/src/glsl/ir_clone.cpp b/mesalib/src/glsl/ir_clone.cpp index 40ed33afc..4e5cf68ca 100644 --- a/mesalib/src/glsl/ir_clone.cpp +++ b/mesalib/src/glsl/ir_clone.cpp @@ -41,35 +41,19 @@ ir_variable * ir_variable::clone(void *mem_ctx, struct hash_table *ht) const { ir_variable *var = new(mem_ctx) ir_variable(this->type, this->name, - (ir_variable_mode) this->mode); + (ir_variable_mode) this->data.mode); - var->max_array_access = this->max_array_access; + var->data.max_array_access = this->data.max_array_access; if (this->is_interface_instance()) { var->max_ifc_array_access = rzalloc_array(var, unsigned, this->interface_type->length); memcpy(var->max_ifc_array_access, this->max_ifc_array_access, this->interface_type->length * sizeof(unsigned)); } - var->read_only = this->read_only; - var->centroid = this->centroid; - var->invariant = this->invariant; - var->interpolation = this->interpolation; - var->location = this->location; - var->index = this->index; - var->binding = this->binding; - var->atomic.buffer_index = this->atomic.buffer_index; - var->atomic.offset = this->atomic.offset; + + memcpy(&var->data, &this->data, sizeof(var->data)); + var->warn_extension = this->warn_extension; - var->origin_upper_left = this->origin_upper_left; - var->pixel_center_integer = this->pixel_center_integer; - var->explicit_location = this->explicit_location; - var->explicit_index = this->explicit_index; - var->explicit_binding = this->explicit_binding; - var->has_initializer = this->has_initializer; - var->depth_layout = this->depth_layout; - var->assigned = this->assigned; - var->how_declared = this->how_declared; - var->used = this->used; var->num_state_slots = this->num_state_slots; if (this->state_slots) { @@ -157,20 +141,11 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const { ir_loop *new_loop = new(mem_ctx) ir_loop(); - if (this->from) - new_loop->from = this->from->clone(mem_ctx, ht); - if (this->to) - new_loop->to = this->to->clone(mem_ctx, ht); - if (this->increment) - new_loop->increment = this->increment->clone(mem_ctx, ht); - new_loop->counter = counter; - foreach_iter(exec_list_iterator, iter, this->body_instructions) { ir_instruction *ir = (ir_instruction *)iter.get(); new_loop->body_instructions.push_tail(ir->clone(mem_ctx, ht)); } - new_loop->cmp = this->cmp; return new_loop; } diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp index 54bfe5832..c24d3c96b 100755 --- a/mesalib/src/glsl/ir_constant_expression.cpp +++ b/mesalib/src/glsl/ir_constant_expression.cpp @@ -1576,7 +1576,7 @@ ir_dereference_variable::constant_expression_value(struct hash_table *variable_c /* The constant_value of a uniform variable is its initializer, * not the lifetime constant value of the uniform. */ - if (var->mode == ir_var_uniform) + if (var->data.mode == ir_var_uniform) return NULL; if (!var->constant_value) diff --git a/mesalib/src/glsl/ir_function.cpp b/mesalib/src/glsl/ir_function.cpp index 53cf469d9..bd5318d23 100644 --- a/mesalib/src/glsl/ir_function.cpp +++ b/mesalib/src/glsl/ir_function.cpp @@ -66,7 +66,7 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b) /* Try to find an implicit conversion from actual to param. */ inexact_match = true; - switch ((enum ir_variable_mode)(param->mode)) { + switch ((enum ir_variable_mode)(param->data.mode)) { case ir_var_auto: case ir_var_uniform: case ir_var_temporary: diff --git a/mesalib/src/glsl/ir_hv_accept.cpp b/mesalib/src/glsl/ir_hv_accept.cpp index 941b25e97..2a1f70e5b 100644 --- a/mesalib/src/glsl/ir_hv_accept.cpp +++ b/mesalib/src/glsl/ir_hv_accept.cpp @@ -91,26 +91,6 @@ ir_loop::accept(ir_hierarchical_visitor *v) if (s == visit_stop) return s; - if (s != visit_continue_with_parent) { - if (this->from) { - s = this->from->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - if (this->to) { - s = this->to->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - if (this->increment) { - s = this->increment->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - } - return v->visit_leave(this); } diff --git a/mesalib/src/glsl/ir_print_visitor.cpp b/mesalib/src/glsl/ir_print_visitor.cpp index f85e573c4..01c5f7f1c 100644 --- a/mesalib/src/glsl/ir_print_visitor.cpp +++ b/mesalib/src/glsl/ir_print_visitor.cpp @@ -148,8 +148,9 @@ void ir_print_visitor::visit(ir_variable *ir) { printf("(declare "); - const char *const cent = (ir->centroid) ? "centroid " : ""; - const char *const inv = (ir->invariant) ? "invariant " : ""; + const char *const cent = (ir->data.centroid) ? "centroid " : ""; + const char *const samp = (ir->data.sample) ? "sample " : ""; + const char *const inv = (ir->data.invariant) ? "invariant " : ""; const char *const mode[] = { "", "uniform ", "shader_in ", "shader_out ", "in ", "out ", "inout ", "const_in ", "sys ", "temporary " }; @@ -157,8 +158,8 @@ void ir_print_visitor::visit(ir_variable *ir) const char *const interp[] = { "", "smooth", "flat", "noperspective" }; STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_QUALIFIER_COUNT); - printf("(%s%s%s%s) ", - cent, inv, mode[ir->mode], interp[ir->interpolation]); + printf("(%s%s%s%s%s) ", + cent, samp, inv, mode[ir->data.mode], interp[ir->data.interpolation]); print_type(ir->type); printf(" %s)", unique_name(ir)); @@ -416,9 +417,9 @@ void ir_print_visitor::visit(ir_constant *ir) if (ir->value.f[i] == 0.0f) /* 0.0 == -0.0, so print with %f to get the proper sign. */ printf("%.1f", ir->value.f[i]); - else if (abs(ir->value.f[i]) < 0.000001f) + else if (fabs(ir->value.f[i]) < 0.000001f) printf("%a", ir->value.f[i]); - else if (abs(ir->value.f[i]) > 1000000.0f) + else if (fabs(ir->value.f[i]) > 1000000.0f) printf("%e", ir->value.f[i]); else printf("%f", ir->value.f[i]); @@ -522,19 +523,7 @@ ir_print_visitor::visit(ir_if *ir) void ir_print_visitor::visit(ir_loop *ir) { - printf("(loop ("); - if (ir->counter != NULL) - ir->counter->accept(this); - printf(") ("); - if (ir->from != NULL) - ir->from->accept(this); - printf(") ("); - if (ir->to != NULL) - ir->to->accept(this); - printf(") ("); - if (ir->increment != NULL) - ir->increment->accept(this); - printf(") (\n"); + printf("(loop (\n"); indentation++; foreach_iter(exec_list_iterator, iter, ir->body_instructions) { diff --git a/mesalib/src/glsl/ir_reader.cpp b/mesalib/src/glsl/ir_reader.cpp index 00e2db9a3..7970112ec 100644 --- a/mesalib/src/glsl/ir_reader.cpp +++ b/mesalib/src/glsl/ir_reader.cpp @@ -412,33 +412,35 @@ ir_reader::read_declaration(s_expression *expr) // FINISHME: Check for duplicate/conflicting qualifiers. if (strcmp(qualifier->value(), "centroid") == 0) { - var->centroid = 1; + var->data.centroid = 1; + } else if (strcmp(qualifier->value(), "sample") == 0) { + var->data.sample = 1; } else if (strcmp(qualifier->value(), "invariant") == 0) { - var->invariant = 1; + var->data.invariant = 1; } else if (strcmp(qualifier->value(), "uniform") == 0) { - var->mode = ir_var_uniform; + var->data.mode = ir_var_uniform; } else if (strcmp(qualifier->value(), "auto") == 0) { - var->mode = ir_var_auto; + var->data.mode = ir_var_auto; } else if (strcmp(qualifier->value(), "in") == 0) { - var->mode = ir_var_function_in; + var->data.mode = ir_var_function_in; } else if (strcmp(qualifier->value(), "shader_in") == 0) { - var->mode = ir_var_shader_in; + var->data.mode = ir_var_shader_in; } else if (strcmp(qualifier->value(), "const_in") == 0) { - var->mode = ir_var_const_in; + var->data.mode = ir_var_const_in; } else if (strcmp(qualifier->value(), "out") == 0) { - var->mode = ir_var_function_out; + var->data.mode = ir_var_function_out; } else if (strcmp(qualifier->value(), "shader_out") == 0) { - var->mode = ir_var_shader_out; + var->data.mode = ir_var_shader_out; } else if (strcmp(qualifier->value(), "inout") == 0) { - var->mode = ir_var_function_inout; + var->data.mode = ir_var_function_inout; } else if (strcmp(qualifier->value(), "temporary") == 0) { - var->mode = ir_var_temporary; + var->data.mode = ir_var_temporary; } else if (strcmp(qualifier->value(), "smooth") == 0) { - var->interpolation = INTERP_QUALIFIER_SMOOTH; + var->data.interpolation = INTERP_QUALIFIER_SMOOTH; } else if (strcmp(qualifier->value(), "flat") == 0) { - var->interpolation = INTERP_QUALIFIER_FLAT; + var->data.interpolation = INTERP_QUALIFIER_FLAT; } else if (strcmp(qualifier->value(), "noperspective") == 0) { - var->interpolation = INTERP_QUALIFIER_NOPERSPECTIVE; + var->data.interpolation = INTERP_QUALIFIER_NOPERSPECTIVE; } else { ir_read_error(expr, "unknown qualifier: %s", qualifier->value()); return NULL; @@ -486,18 +488,16 @@ ir_reader::read_if(s_expression *expr, ir_loop *loop_ctx) ir_loop * ir_reader::read_loop(s_expression *expr) { - s_expression *s_counter, *s_from, *s_to, *s_inc, *s_body; + s_expression *s_body; - s_pattern pat[] = { "loop", s_counter, s_from, s_to, s_inc, s_body }; - if (!MATCH(expr, pat)) { - ir_read_error(expr, "expected (loop <counter> <from> <to> " - "<increment> <body>)"); + s_pattern loop_pat[] = { "loop", s_body }; + if (!MATCH(expr, loop_pat)) { + ir_read_error(expr, "expected (loop <body>)"); return NULL; } - // FINISHME: actually read the count/from/to fields. - ir_loop *loop = new(mem_ctx) ir_loop; + read_instructions(&loop->body_instructions, s_body, loop); if (state->error) { delete loop; diff --git a/mesalib/src/glsl/ir_set_program_inouts.cpp b/mesalib/src/glsl/ir_set_program_inouts.cpp index ab23538c3..0b49eb2b6 100644 --- a/mesalib/src/glsl/ir_set_program_inouts.cpp +++ b/mesalib/src/glsl/ir_set_program_inouts.cpp @@ -27,7 +27,7 @@ * Sets the InputsRead and OutputsWritten of Mesa programs. * * Additionally, for fragment shaders, sets the InterpQualifier array, the - * IsCentroid bitfield, and the UsesDFdy flag. + * IsCentroid and IsSample bitfields, and the UsesDFdy flag. * * Mesa programs (gl_program, not gl_shader_program) have a set of * flags indicating which varyings are read and written. Computing @@ -75,9 +75,9 @@ private: static inline bool is_shader_inout(ir_variable *var) { - return var->mode == ir_var_shader_in || - var->mode == ir_var_shader_out || - var->mode == ir_var_system_value; + return var->data.mode == ir_var_shader_in || + var->data.mode == ir_var_shader_out || + var->data.mode == ir_var_system_value; } static void @@ -93,20 +93,24 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len, */ for (int i = 0; i < len; i++) { - GLbitfield64 bitfield = BITFIELD64_BIT(var->location + var->index + offset + i); - if (var->mode == ir_var_shader_in) { + GLbitfield64 bitfield = + BITFIELD64_BIT(var->data.location + var->data.index + offset + i); + if (var->data.mode == ir_var_shader_in) { prog->InputsRead |= bitfield; if (is_fragment_shader) { gl_fragment_program *fprog = (gl_fragment_program *) prog; - fprog->InterpQualifier[var->location + var->index + offset + i] = - (glsl_interp_qualifier) var->interpolation; - if (var->centroid) + fprog->InterpQualifier[var->data.location + + var->data.index + offset + i] = + (glsl_interp_qualifier) var->data.interpolation; + if (var->data.centroid) fprog->IsCentroid |= bitfield; + if (var->data.sample) + fprog->IsSample |= bitfield; } - } else if (var->mode == ir_var_system_value) { + } else if (var->data.mode == ir_var_system_value) { prog->SystemValuesRead |= bitfield; } else { - assert(var->mode == ir_var_shader_out); + assert(var->data.mode == ir_var_shader_out); prog->OutputsWritten |= bitfield; } } @@ -121,7 +125,7 @@ ir_set_program_inouts_visitor::mark_whole_variable(ir_variable *var) { const glsl_type *type = var->type; if (this->shader_type == GL_GEOMETRY_SHADER && - var->mode == ir_var_shader_in && type->is_array()) { + var->data.mode == ir_var_shader_in && type->is_array()) { type = type->fields.array; } @@ -160,7 +164,7 @@ ir_set_program_inouts_visitor::try_mark_partial_variable(ir_variable *var, const glsl_type *type = var->type; if (this->shader_type == GL_GEOMETRY_SHADER && - var->mode == ir_var_shader_in) { + var->data.mode == ir_var_shader_in) { /* The only geometry shader input that is not an array is * gl_PrimitiveIDIn, and in that case, this code will never be reached, * because gl_PrimitiveIDIn can't be indexed into in array fashion. @@ -242,7 +246,7 @@ ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir) if (ir_dereference_variable * const deref_var = inner_array->array->as_dereference_variable()) { if (this->shader_type == GL_GEOMETRY_SHADER && - deref_var->var->mode == ir_var_shader_in) { + deref_var->var->data.mode == ir_var_shader_in) { /* foo is a geometry shader input, so i is the vertex, and j the * part of the input we're accessing. */ @@ -261,7 +265,7 @@ ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir) ir->array->as_dereference_variable()) { /* ir => foo[i], where foo is a variable. */ if (this->shader_type == GL_GEOMETRY_SHADER && - deref_var->var->mode == ir_var_shader_in) { + deref_var->var->data.mode == ir_var_shader_in) { /* foo is a geometry shader input, so i is the vertex, and we're * accessing the entire input. */ @@ -341,6 +345,7 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog, gl_fragment_program *fprog = (gl_fragment_program *) prog; memset(fprog->InterpQualifier, 0, sizeof(fprog->InterpQualifier)); fprog->IsCentroid = 0; + fprog->IsSample = 0; fprog->UsesDFdy = false; fprog->UsesKill = false; } diff --git a/mesalib/src/glsl/ir_validate.cpp b/mesalib/src/glsl/ir_validate.cpp index 13e41a089..4bbb3ce65 100644 --- a/mesalib/src/glsl/ir_validate.cpp +++ b/mesalib/src/glsl/ir_validate.cpp @@ -63,7 +63,6 @@ public: virtual ir_visitor_status visit_enter(ir_if *ir); - virtual ir_visitor_status visit_leave(ir_loop *ir); virtual ir_visitor_status visit_enter(ir_function *ir); virtual ir_visitor_status visit_leave(ir_function *ir); virtual ir_visitor_status visit_enter(ir_function_signature *ir); @@ -149,42 +148,6 @@ ir_validate::visit_enter(ir_if *ir) ir_visitor_status -ir_validate::visit_leave(ir_loop *ir) -{ - if (ir->counter != NULL) { - if ((ir->from == NULL) || (ir->to == NULL) || (ir->increment == NULL)) { - printf("ir_loop has invalid loop controls:\n" - " counter: %p\n" - " from: %p\n" - " to: %p\n" - " increment: %p\n", - (void *) ir->counter, (void *) ir->from, (void *) ir->to, - (void *) ir->increment); - abort(); - } - - if ((ir->cmp < ir_binop_less) || (ir->cmp > ir_binop_nequal)) { - printf("ir_loop has invalid comparitor %d\n", ir->cmp); - abort(); - } - } else { - if ((ir->from != NULL) || (ir->to != NULL) || (ir->increment != NULL)) { - printf("ir_loop has invalid loop controls:\n" - " counter: %p\n" - " from: %p\n" - " to: %p\n" - " increment: %p\n", - (void *) ir->counter, (void *) ir->from, (void *) ir->to, - (void *) ir->increment); - abort(); - } - } - - return visit_continue; -} - - -ir_visitor_status ir_validate::visit_enter(ir_function *ir) { /* Function definitions cannot be nested. @@ -679,9 +642,9 @@ ir_validate::visit(ir_variable *ir) * to be out of bounds. */ if (ir->type->array_size() > 0) { - if (ir->max_array_access >= ir->type->length) { + if (ir->data.max_array_access >= ir->type->length) { printf("ir_variable has maximum access out of bounds (%d vs %d)\n", - ir->max_array_access, ir->type->length - 1); + ir->data.max_array_access, ir->type->length - 1); ir->print(); abort(); } @@ -707,7 +670,7 @@ ir_validate::visit(ir_variable *ir) } } - if (ir->constant_initializer != NULL && !ir->has_initializer) { + if (ir->constant_initializer != NULL && !ir->data.has_initializer) { printf("ir_variable didn't have an initializer, but has a constant " "initializer value.\n"); ir->print(); @@ -789,8 +752,8 @@ ir_validate::visit_enter(ir_call *ir) printf("ir_call parameter type mismatch:\n"); goto dump_ir; } - if (formal_param->mode == ir_var_function_out - || formal_param->mode == ir_var_function_inout) { + if (formal_param->data.mode == ir_var_function_out + || formal_param->data.mode == ir_var_function_inout) { if (!actual_param->is_lvalue()) { printf("ir_call out/inout parameters must be lvalues:\n"); goto dump_ir; diff --git a/mesalib/src/glsl/link_atomics.cpp b/mesalib/src/glsl/link_atomics.cpp index 2466bbd79..33903ad54 100644 --- a/mesalib/src/glsl/link_atomics.cpp +++ b/mesalib/src/glsl/link_atomics.cpp @@ -73,16 +73,16 @@ namespace { const active_atomic_counter *const first = (active_atomic_counter *) a; const active_atomic_counter *const second = (active_atomic_counter *) b; - return int(first->var->atomic.offset) - int(second->var->atomic.offset); + return int(first->var->data.atomic.offset) - int(second->var->data.atomic.offset); } bool check_atomic_counters_overlap(const ir_variable *x, const ir_variable *y) { - return ((x->atomic.offset >= y->atomic.offset && - x->atomic.offset < y->atomic.offset + y->type->atomic_size()) || - (y->atomic.offset >= x->atomic.offset && - y->atomic.offset < x->atomic.offset + x->type->atomic_size())); + return ((x->data.atomic.offset >= y->data.atomic.offset && + x->data.atomic.offset < y->data.atomic.offset + y->type->atomic_size()) || + (y->data.atomic.offset >= x->data.atomic.offset && + y->data.atomic.offset < x->data.atomic.offset + x->type->atomic_size())); } active_atomic_buffer * @@ -107,7 +107,7 @@ namespace { unsigned id; bool found = prog->UniformHash->get(id, var->name); assert(found); - active_atomic_buffer *buf = &buffers[var->binding]; + active_atomic_buffer *buf = &buffers[var->data.binding]; /* If this is the first time the buffer is used, increment * the counter of buffers used. @@ -118,7 +118,7 @@ namespace { buf->push_back(id, var); buf->stage_references[i]++; - buf->size = MAX2(buf->size, var->atomic.offset + + buf->size = MAX2(buf->size, var->data.atomic.offset + var->type->atomic_size()); } } @@ -143,7 +143,7 @@ namespace { linker_error(prog, "Atomic counter %s declared at offset %d " "which is already in use.", buffers[i].counters[j].var->name, - buffers[i].counters[j].var->atomic.offset); + buffers[i].counters[j].var->data.atomic.offset); } } } @@ -190,9 +190,9 @@ link_assign_atomic_counter_resources(struct gl_context *ctx, gl_uniform_storage *const storage = &prog->UniformStorage[id]; mab.Uniforms[j] = id; - var->atomic.buffer_index = i; + var->data.atomic.buffer_index = i; storage->atomic_buffer_index = i; - storage->offset = var->atomic.offset; + storage->offset = var->data.atomic.offset; storage->array_stride = (var->type->is_array() ? var->type->element_type()->atomic_size() : 0); } diff --git a/mesalib/src/glsl/link_functions.cpp b/mesalib/src/glsl/link_functions.cpp index 68aa62032..56f3f207e 100644 --- a/mesalib/src/glsl/link_functions.cpp +++ b/mesalib/src/glsl/link_functions.cpp @@ -201,8 +201,9 @@ public: if (formal_param->type->is_array()) { ir_dereference_variable *deref = actual_param->as_dereference_variable(); if (deref && deref->var && deref->var->type->is_array()) { - deref->var->max_array_access = - MAX2(formal_param->max_array_access, deref->var->max_array_access); + deref->var->data.max_array_access = + MAX2(formal_param->data.max_array_access, + deref->var->data.max_array_access); } } } @@ -234,8 +235,9 @@ public: * we need to track the maximal access to the array as linking * pulls more functions in that access the array. */ - var->max_array_access = - MAX2(var->max_array_access, ir->var->max_array_access); + var->data.max_array_access = + MAX2(var->data.max_array_access, + ir->var->data.max_array_access); if (var->type->length == 0 && ir->var->type->length != 0) var->type = ir->var->type; diff --git a/mesalib/src/glsl/link_interface_blocks.cpp b/mesalib/src/glsl/link_interface_blocks.cpp index 6900fa94e..476963642 100644 --- a/mesalib/src/glsl/link_interface_blocks.cpp +++ b/mesalib/src/glsl/link_interface_blocks.cpp @@ -60,7 +60,7 @@ struct interface_block_definition if (var->type->is_array()) array_size = var->type->length; } - explicitly_declared = (var->how_declared != ir_var_declared_implicitly); + explicitly_declared = (var->data.how_declared != ir_var_declared_implicitly); } /** @@ -270,7 +270,7 @@ validate_intrastage_interface_blocks(struct gl_shader_program *prog, continue; interface_block_definitions *definitions; - switch (var->mode) { + switch (var->data.mode) { case ir_var_shader_in: definitions = &in_interfaces; break; @@ -298,7 +298,7 @@ validate_intrastage_interface_blocks(struct gl_shader_program *prog, */ definitions->store(def); } else if (!intrastage_match(prev_def, &def, - (ir_variable_mode) var->mode)) { + (ir_variable_mode) var->data.mode)) { linker_error(prog, "definitions of interface block `%s' do not" " match\n", iface_type->name); return; @@ -318,7 +318,7 @@ validate_interstage_inout_blocks(struct gl_shader_program *prog, /* Add input interfaces from the consumer to the symbol table. */ foreach_list(node, consumer->ir) { ir_variable *var = ((ir_instruction *) node)->as_variable(); - if (!var || !var->get_interface_type() || var->mode != ir_var_shader_in) + if (!var || !var->get_interface_type() || var->data.mode != ir_var_shader_in) continue; definitions.store(interface_block_definition(var)); @@ -327,7 +327,7 @@ validate_interstage_inout_blocks(struct gl_shader_program *prog, /* Verify that the producer's output interfaces match. */ foreach_list(node, producer->ir) { ir_variable *var = ((ir_instruction *) node)->as_variable(); - if (!var || !var->get_interface_type() || var->mode != ir_var_shader_out) + if (!var || !var->get_interface_type() || var->data.mode != ir_var_shader_out) continue; interface_block_definition *consumer_def = @@ -361,7 +361,7 @@ validate_interstage_uniform_blocks(struct gl_shader_program *prog, const gl_shader *stage = stages[i]; foreach_list(node, stage->ir) { ir_variable *var = ((ir_instruction *) node)->as_variable(); - if (!var || !var->get_interface_type() || var->mode != ir_var_uniform) + if (!var || !var->get_interface_type() || var->data.mode != ir_var_uniform) continue; interface_block_definition *old_def = diff --git a/mesalib/src/glsl/link_uniform_initializers.cpp b/mesalib/src/glsl/link_uniform_initializers.cpp index 786aaf0b4..04daa1760 100644 --- a/mesalib/src/glsl/link_uniform_initializers.cpp +++ b/mesalib/src/glsl/link_uniform_initializers.cpp @@ -224,15 +224,15 @@ link_set_uniform_initializers(struct gl_shader_program *prog) foreach_list(node, shader->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if (!var || var->mode != ir_var_uniform) + if (!var || var->data.mode != ir_var_uniform) continue; if (!mem_ctx) mem_ctx = ralloc_context(NULL); - if (var->explicit_binding) { + if (var->data.explicit_binding) { linker::set_uniform_binding(mem_ctx, prog, var->name, - var->type, var->binding); + var->type, var->data.binding); } else if (var->constant_value) { linker::set_uniform_initializer(mem_ctx, prog, var->name, var->type, var->constant_value); diff --git a/mesalib/src/glsl/link_uniforms.cpp b/mesalib/src/glsl/link_uniforms.cpp index 95e75d73d..1cbe80b2e 100644 --- a/mesalib/src/glsl/link_uniforms.cpp +++ b/mesalib/src/glsl/link_uniforms.cpp @@ -75,7 +75,7 @@ program_resource_visitor::process(ir_variable *var) */ /* Only strdup the name if we actually will need to modify it. */ - if (var->from_named_ifc_block_array) { + if (var->data.from_named_ifc_block_array) { /* lower_named_interface_blocks created this variable by lowering an * interface block array to an array variable. For example if the * original source code was: @@ -108,7 +108,7 @@ program_resource_visitor::process(ir_variable *var) recursion(var->type, &name, new_length, false, NULL); } ralloc_free(name); - } else if (var->from_named_ifc_block_nonarray) { + } else if (var->data.from_named_ifc_block_nonarray) { /* lower_named_interface_blocks created this variable by lowering a * named interface block (non-array) to an ordinary variable. For * example if the original source code was: @@ -408,10 +408,10 @@ public: const struct gl_uniform_block *const block = &prog->UniformBlocks[ubo_block_index]; - assert(var->location != -1); + assert(var->data.location != -1); const struct gl_uniform_buffer_variable *const ubo_var = - &block->Uniforms[var->location]; + &block->Uniforms[var->data.location]; ubo_row_major = ubo_var->RowMajor; ubo_byte_offset = ubo_var->Offset; @@ -637,10 +637,10 @@ link_update_uniform_buffer_variables(struct gl_shader *shader) if ((var == NULL) || !var->is_in_uniform_block()) continue; - assert(var->mode == ir_var_uniform); + assert(var->data.mode == ir_var_uniform); if (var->is_interface_instance()) { - var->location = 0; + var->data.location = 0; continue; } @@ -669,13 +669,13 @@ link_update_uniform_buffer_variables(struct gl_shader *shader) if (strncmp(var->name, begin, l) == 0) { found = true; - var->location = j; + var->data.location = j; break; } } else if (!strcmp(var->name, shader->UniformBlocks[i].Uniforms[j].Name)) { found = true; - var->location = j; + var->data.location = j; break; } } @@ -767,7 +767,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog) foreach_list(node, sh->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if ((var == NULL) || (var->mode != ir_var_uniform)) + if ((var == NULL) || (var->data.mode != ir_var_uniform)) continue; /* FINISHME: Update code to process built-in uniforms! @@ -818,7 +818,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog) foreach_list(node, prog->_LinkedShaders[i]->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if ((var == NULL) || (var->mode != ir_var_uniform)) + if ((var == NULL) || (var->data.mode != ir_var_uniform)) continue; /* FINISHME: Update code to process built-in uniforms! diff --git a/mesalib/src/glsl/link_varyings.cpp b/mesalib/src/glsl/link_varyings.cpp index be36b5f8f..229a4cb85 100644 --- a/mesalib/src/glsl/link_varyings.cpp +++ b/mesalib/src/glsl/link_varyings.cpp @@ -93,31 +93,43 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, /* Check that all of the qualifiers match between stages. */ - if (input->centroid != output->centroid) { + if (input->data.centroid != output->data.centroid) { linker_error(prog, "%s shader output `%s' %s centroid qualifier, " "but %s shader input %s centroid qualifier\n", _mesa_glsl_shader_target_name(producer_type), output->name, - (output->centroid) ? "has" : "lacks", + (output->data.centroid) ? "has" : "lacks", _mesa_glsl_shader_target_name(consumer_type), - (input->centroid) ? "has" : "lacks"); + (input->data.centroid) ? "has" : "lacks"); return; } - if (input->invariant != output->invariant) { + if (input->data.sample != output->data.sample) { + linker_error(prog, + "%s shader output `%s' %s sample qualifier, " + "but %s shader input %s sample qualifier\n", + _mesa_glsl_shader_target_name(producer_type), + output->name, + (output->data.sample) ? "has" : "lacks", + _mesa_glsl_shader_target_name(consumer_type), + (input->data.sample) ? "has" : "lacks"); + return; + } + + if (input->data.invariant != output->data.invariant) { linker_error(prog, "%s shader output `%s' %s invariant qualifier, " "but %s shader input %s invariant qualifier\n", _mesa_glsl_shader_target_name(producer_type), output->name, - (output->invariant) ? "has" : "lacks", + (output->data.invariant) ? "has" : "lacks", _mesa_glsl_shader_target_name(consumer_type), - (input->invariant) ? "has" : "lacks"); + (input->data.invariant) ? "has" : "lacks"); return; } - if (input->interpolation != output->interpolation) { + if (input->data.interpolation != output->data.interpolation) { linker_error(prog, "%s shader output `%s' specifies %s " "interpolation qualifier, " @@ -125,9 +137,9 @@ cross_validate_types_and_qualifiers(struct gl_shader_program *prog, "interpolation qualifier\n", _mesa_glsl_shader_target_name(producer_type), output->name, - interpolation_string(output->interpolation), + interpolation_string(output->data.interpolation), _mesa_glsl_shader_target_name(consumer_type), - interpolation_string(input->interpolation)); + interpolation_string(input->data.interpolation)); return; } } @@ -143,11 +155,11 @@ cross_validate_front_and_back_color(struct gl_shader_program *prog, GLenum consumer_type, GLenum producer_type) { - if (front_color != NULL && front_color->assigned) + if (front_color != NULL && front_color->data.assigned) cross_validate_types_and_qualifiers(prog, input, front_color, consumer_type, producer_type); - if (back_color != NULL && back_color->assigned) + if (back_color != NULL && back_color->data.assigned) cross_validate_types_and_qualifiers(prog, input, back_color, consumer_type, producer_type); } @@ -166,7 +178,7 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog, foreach_list(node, producer->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if ((var == NULL) || (var->mode != ir_var_shader_out)) + if ((var == NULL) || (var->data.mode != ir_var_shader_out)) continue; parameters.add_variable(var); @@ -184,10 +196,10 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog, foreach_list(node, consumer->ir) { ir_variable *const input = ((ir_instruction *) node)->as_variable(); - if ((input == NULL) || (input->mode != ir_var_shader_in)) + if ((input == NULL) || (input->data.mode != ir_var_shader_in)) continue; - if (strcmp(input->name, "gl_Color") == 0 && input->used) { + if (strcmp(input->name, "gl_Color") == 0 && input->data.used) { const ir_variable *const front_color = parameters.get_variable("gl_FrontColor"); @@ -197,7 +209,7 @@ cross_validate_outputs_to_inputs(struct gl_shader_program *prog, cross_validate_front_and_back_color(prog, input, front_color, back_color, consumer->Type, producer->Type); - } else if (strcmp(input->name, "gl_SecondaryColor") == 0 && input->used) { + } else if (strcmp(input->name, "gl_SecondaryColor") == 0 && input->data.used) { const ir_variable *const front_color = parameters.get_variable("gl_FrontSecondaryColor"); @@ -317,8 +329,8 @@ tfeedback_decl::assign_location(struct gl_context *ctx, assert(this->is_varying()); unsigned fine_location - = this->matched_candidate->toplevel_var->location * 4 - + this->matched_candidate->toplevel_var->location_frac + = this->matched_candidate->toplevel_var->data.location * 4 + + this->matched_candidate->toplevel_var->data.location_frac + this->matched_candidate->offset; if (this->matched_candidate->type->is_array()) { @@ -734,7 +746,7 @@ varying_matches::~varying_matches() void varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var) { - if (!producer_var->is_unmatched_generic_inout) { + if (!producer_var->data.is_unmatched_generic_inout) { /* Either a location already exists for this variable (since it is part * of fixed functionality), or it has already been recorded as part of a * previous match. @@ -752,12 +764,14 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var) * regardless of where they appear. We can trivially satisfy that * requirement by changing the interpolation type to flat here. */ - producer_var->centroid = false; - producer_var->interpolation = INTERP_QUALIFIER_FLAT; + producer_var->data.centroid = false; + producer_var->data.sample = false; + producer_var->data.interpolation = INTERP_QUALIFIER_FLAT; if (consumer_var) { - consumer_var->centroid = false; - consumer_var->interpolation = INTERP_QUALIFIER_FLAT; + consumer_var->data.centroid = false; + consumer_var->data.sample = false; + consumer_var->data.interpolation = INTERP_QUALIFIER_FLAT; } } @@ -784,9 +798,9 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var) this->matches[this->num_matches].producer_var = producer_var; this->matches[this->num_matches].consumer_var = consumer_var; this->num_matches++; - producer_var->is_unmatched_generic_inout = 0; + producer_var->data.is_unmatched_generic_inout = 0; if (consumer_var) - consumer_var->is_unmatched_generic_inout = 0; + consumer_var->data.is_unmatched_generic_inout = 0; } @@ -838,12 +852,12 @@ varying_matches::store_locations(unsigned producer_base, unsigned slot = generic_location / 4; unsigned offset = generic_location % 4; - producer_var->location = producer_base + slot; - producer_var->location_frac = offset; + producer_var->data.location = producer_base + slot; + producer_var->data.location_frac = offset; if (consumer_var) { - assert(consumer_var->location == -1); - consumer_var->location = consumer_base + slot; - consumer_var->location_frac = offset; + assert(consumer_var->data.location == -1); + consumer_var->data.location = consumer_base + slot; + consumer_var->data.location_frac = offset; } } } @@ -873,9 +887,9 @@ varying_matches::compute_packing_class(ir_variable *var) * * Therefore, the packing class depends only on the interpolation type. */ - unsigned packing_class = var->centroid ? 1 : 0; + unsigned packing_class = var->data.centroid | (var->data.sample << 1); packing_class *= 4; - packing_class += var->interpolation; + packing_class += var->data.interpolation; return packing_class; } @@ -933,8 +947,8 @@ is_varying_var(GLenum shaderType, const ir_variable *var) { /* Only fragment shaders will take a varying variable as an input */ if (shaderType == GL_FRAGMENT_SHADER && - var->mode == ir_var_shader_in) { - switch (var->location) { + var->data.mode == ir_var_shader_in) { + switch (var->data.location) { case VARYING_SLOT_POS: case VARYING_SLOT_FACE: case VARYING_SLOT_PNTC: @@ -1082,7 +1096,7 @@ assign_varying_locations(struct gl_context *ctx, ir_variable *const input_var = ((ir_instruction *) node)->as_variable(); - if ((input_var != NULL) && (input_var->mode == ir_var_shader_in)) { + if ((input_var != NULL) && (input_var->data.mode == ir_var_shader_in)) { if (input_var->get_interface_type() != NULL) { char *const iface_field_name = ralloc_asprintf(mem_ctx, "%s.%s", @@ -1101,7 +1115,7 @@ assign_varying_locations(struct gl_context *ctx, foreach_list(node, producer->ir) { ir_variable *const output_var = ((ir_instruction *) node)->as_variable(); - if ((output_var == NULL) || (output_var->mode != ir_var_shader_out)) + if ((output_var == NULL) || (output_var->data.mode != ir_var_shader_out)) continue; tfeedback_candidate_generator g(mem_ctx, tfeedback_candidates); @@ -1121,7 +1135,7 @@ assign_varying_locations(struct gl_context *ctx, (ir_variable *) hash_table_find(consumer_inputs, output_var->name); } - if (input_var && input_var->mode != ir_var_shader_in) + if (input_var && input_var->data.mode != ir_var_shader_in) input_var = NULL; if (input_var) { @@ -1143,7 +1157,7 @@ assign_varying_locations(struct gl_context *ctx, return false; } - if (matched_candidate->toplevel_var->is_unmatched_generic_inout) + if (matched_candidate->toplevel_var->data.is_unmatched_generic_inout) matches.record(matched_candidate->toplevel_var, NULL); } @@ -1185,8 +1199,8 @@ assign_varying_locations(struct gl_context *ctx, foreach_list(node, consumer->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if (var && var->mode == ir_var_shader_in && - var->is_unmatched_generic_inout) { + if (var && var->data.mode == ir_var_shader_in && + var->data.is_unmatched_generic_inout) { if (prog->Version <= 120) { /* On page 25 (page 31 of the PDF) of the GLSL 1.20 spec: * @@ -1211,7 +1225,7 @@ assign_varying_locations(struct gl_context *ctx, /* An 'in' variable is only really a shader input if its * value is written by the previous stage. */ - var->mode = ir_var_auto; + var->data.mode = ir_var_auto; } } } @@ -1229,7 +1243,7 @@ check_against_output_limit(struct gl_context *ctx, foreach_list(node, producer->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if (var && var->mode == ir_var_shader_out && + if (var && var->data.mode == ir_var_shader_out && is_varying_var(producer->Type, var)) { output_vectors += var->type->count_attribute_slots(); } @@ -1278,7 +1292,7 @@ check_against_input_limit(struct gl_context *ctx, foreach_list(node, consumer->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if (var && var->mode == ir_var_shader_in && + if (var && var->data.mode == ir_var_shader_in && is_varying_var(consumer->Type, var)) { input_vectors += var->type->count_attribute_slots(); } diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp index 1366077f7..a6133ea9c 100644 --- a/mesalib/src/glsl/linker.cpp +++ b/mesalib/src/glsl/linker.cpp @@ -114,8 +114,8 @@ public: ir_rvalue *param_rval = (ir_rvalue *)iter.get(); ir_variable *sig_param = (ir_variable *)sig_iter.get(); - if (sig_param->mode == ir_var_function_out || - sig_param->mode == ir_var_function_inout) { + if (sig_param->data.mode == ir_var_function_out || + sig_param->data.mode == ir_var_function_inout) { ir_variable *var = param_rval->variable_referenced(); if (var && strcmp(name, var->name) == 0) { found = true; @@ -198,7 +198,7 @@ public: virtual ir_visitor_status visit(ir_variable *var) { - if (!var->type->is_array() || var->mode != ir_var_shader_in) + if (!var->type->is_array() || var->data.mode != ir_var_shader_in) return visit_continue; unsigned size = var->type->length; @@ -217,16 +217,16 @@ public: * array using an index too large for its actual size assigned at link * time. */ - if (var->max_array_access >= this->num_vertices) { + if (var->data.max_array_access >= this->num_vertices) { linker_error(this->prog, "geometry shader accesses element %i of " "%s, but only %i input vertices\n", - var->max_array_access, var->name, this->num_vertices); + var->data.max_array_access, var->name, this->num_vertices); return visit_continue; } var->type = glsl_type::get_array_instance(var->type->element_type(), this->num_vertices); - var->max_array_access = this->num_vertices - 1; + var->data.max_array_access = this->num_vertices - 1; return visit_continue; } @@ -379,9 +379,9 @@ link_invalidate_variable_locations(exec_list *ir) * shader inputs (via layout(location=...)), and generic fragment shader * outputs (also via layout(location=...)). */ - if (!var->explicit_location) { - var->location = -1; - var->location_frac = 0; + if (!var->data.explicit_location) { + var->data.location = -1; + var->data.location_frac = 0; } /* ir_variable::is_unmatched_generic_inout is used by the linker while @@ -396,10 +396,10 @@ link_invalidate_variable_locations(exec_list *ir) * GL_ARB_separate_shader_objects is supported. When that extension is * implemented, this function will need some modifications. */ - if (!var->explicit_location) { - var->is_unmatched_generic_inout = 1; + if (!var->data.explicit_location) { + var->data.is_unmatched_generic_inout = 1; } else { - var->is_unmatched_generic_inout = 0; + var->data.is_unmatched_generic_inout = 0; } } } @@ -580,13 +580,13 @@ cross_validate_globals(struct gl_shader_program *prog, if (var == NULL) continue; - if (uniforms_only && (var->mode != ir_var_uniform)) + if (uniforms_only && (var->data.mode != ir_var_uniform)) continue; /* Don't cross validate temporaries that are at global scope. These * will eventually get pulled into the shaders 'main'. */ - if (var->mode == ir_var_temporary) + if (var->data.mode == ir_var_temporary) continue; /* If a global with this name has already been seen, verify that the @@ -619,17 +619,17 @@ cross_validate_globals(struct gl_shader_program *prog, } } - if (var->explicit_location) { - if (existing->explicit_location - && (var->location != existing->location)) { + if (var->data.explicit_location) { + if (existing->data.explicit_location + && (var->data.location != existing->data.location)) { linker_error(prog, "explicit locations for %s " "`%s' have differing values\n", mode_string(var), var->name); return; } - existing->location = var->location; - existing->explicit_location = true; + existing->data.location = var->data.location; + existing->data.explicit_location = true; } /* From the GLSL 4.20 specification: @@ -638,21 +638,21 @@ cross_validate_globals(struct gl_shader_program *prog, * opaque-uniform name. However, it is not an error to specify a * binding on some but not all declarations for the same name" */ - if (var->explicit_binding) { - if (existing->explicit_binding && - var->binding != existing->binding) { + if (var->data.explicit_binding) { + if (existing->data.explicit_binding && + var->data.binding != existing->data.binding) { linker_error(prog, "explicit bindings for %s " "`%s' have differing values\n", mode_string(var), var->name); return; } - existing->binding = var->binding; - existing->explicit_binding = true; + existing->data.binding = var->data.binding; + existing->data.explicit_binding = true; } if (var->type->contains_atomic() && - var->atomic.offset != existing->atomic.offset) { + var->data.atomic.offset != existing->data.atomic.offset) { linker_error(prog, "offset specifications for %s " "`%s' have differing values\n", mode_string(var), var->name); @@ -671,9 +671,9 @@ cross_validate_globals(struct gl_shader_program *prog, * of qualifiers." */ if (strcmp(var->name, "gl_FragDepth") == 0) { - bool layout_declared = var->depth_layout != ir_depth_layout_none; + bool layout_declared = var->data.depth_layout != ir_depth_layout_none; bool layout_differs = - var->depth_layout != existing->depth_layout; + var->data.depth_layout != existing->data.depth_layout; if (layout_declared && layout_differs) { linker_error(prog, @@ -682,7 +682,7 @@ cross_validate_globals(struct gl_shader_program *prog, "the same set of qualifiers."); } - if (var->used && layout_differs) { + if (var->data.used && layout_differs) { linker_error(prog, "If gl_FragDepth is redeclared with a layout " "qualifier in any fragment shader, it must be " @@ -734,8 +734,8 @@ cross_validate_globals(struct gl_shader_program *prog, } } - if (var->has_initializer) { - if (existing->has_initializer + if (var->data.has_initializer) { + if (existing->data.has_initializer && (var->constant_initializer == NULL || existing->constant_initializer == NULL)) { linker_error(prog, @@ -750,21 +750,27 @@ cross_validate_globals(struct gl_shader_program *prog, * otherwise) will propagate the existence to the variable * stored in the symbol table. */ - existing->has_initializer = true; + existing->data.has_initializer = true; } - if (existing->invariant != var->invariant) { + if (existing->data.invariant != var->data.invariant) { linker_error(prog, "declarations for %s `%s' have " "mismatching invariant qualifiers\n", mode_string(var), var->name); return; } - if (existing->centroid != var->centroid) { + if (existing->data.centroid != var->data.centroid) { linker_error(prog, "declarations for %s `%s' have " "mismatching centroid qualifiers\n", mode_string(var), var->name); return; } + if (existing->data.sample != var->data.sample) { + linker_error(prog, "declarations for %s `%s` have " + "mismatching sample qualifiers\n", + mode_string(var), var->name); + return; + } } else variables.add_variable(var); } @@ -884,7 +890,7 @@ remap_variables(ir_instruction *inst, struct gl_shader *target, virtual ir_visitor_status visit(ir_dereference_variable *ir) { - if (ir->var->mode == ir_var_temporary) { + if (ir->var->data.mode == ir_var_temporary) { ir_variable *var = (ir_variable *) hash_table_find(temps, ir->var); assert(var != NULL); @@ -958,13 +964,13 @@ move_non_declarations(exec_list *instructions, exec_node *last, continue; ir_variable *var = inst->as_variable(); - if ((var != NULL) && (var->mode != ir_var_temporary)) + if ((var != NULL) && (var->data.mode != ir_var_temporary)) continue; assert(inst->as_assignment() || inst->as_call() || inst->as_if() /* for initializers with the ?: operator */ - || ((var != NULL) && (var->mode == ir_var_temporary))); + || ((var != NULL) && (var->data.mode == ir_var_temporary))); if (make_copies) { inst = inst->clone(target, NULL); @@ -1036,7 +1042,7 @@ public: virtual ir_visitor_status visit(ir_variable *var) { - fixup_type(&var->type, var->max_array_access); + fixup_type(&var->type, var->data.max_array_access); if (var->type->is_interface()) { if (interface_contains_unsized_arrays(var->type)) { const glsl_type *new_type = @@ -1405,36 +1411,38 @@ link_intrastage_shaders(void *mem_ctx, insertion_point, true, linked); } - /* Resolve initializers for global variables in the linked shader. - */ - unsigned num_linking_shaders = num_shaders; - for (unsigned i = 0; i < num_shaders; i++) - num_linking_shaders += shader_list[i]->num_builtins_to_link; + /* Check if any shader needs built-in functions. */ + bool need_builtins = false; + for (unsigned i = 0; i < num_shaders; i++) { + if (shader_list[i]->uses_builtin_functions) { + need_builtins = true; + break; + } + } - gl_shader **linking_shaders = - (gl_shader **) calloc(num_linking_shaders, sizeof(gl_shader *)); + bool ok; + if (need_builtins) { + /* Make a temporary array one larger than shader_list, which will hold + * the built-in function shader as well. + */ + gl_shader **linking_shaders = (gl_shader **) + calloc(num_shaders + 1, sizeof(gl_shader *)); + memcpy(linking_shaders, shader_list, num_shaders * sizeof(gl_shader *)); + linking_shaders[num_shaders] = _mesa_glsl_get_builtin_function_shader(); - memcpy(linking_shaders, shader_list, - sizeof(linking_shaders[0]) * num_shaders); + ok = link_function_calls(prog, linked, linking_shaders, num_shaders + 1); - unsigned idx = num_shaders; - for (unsigned i = 0; i < num_shaders; i++) { - memcpy(&linking_shaders[idx], shader_list[i]->builtins_to_link, - sizeof(linking_shaders[0]) * shader_list[i]->num_builtins_to_link); - idx += shader_list[i]->num_builtins_to_link; + free(linking_shaders); + } else { + ok = link_function_calls(prog, linked, shader_list, num_shaders); } - assert(idx == num_linking_shaders); - if (!link_function_calls(prog, linked, linking_shaders, - num_linking_shaders)) { + if (!ok) { ctx->Driver.DeleteShader(ctx, linked); - free(linking_shaders); return NULL; } - free(linking_shaders); - /* At this point linked should contain all of the linked IR, so * validate it to make sure nothing went wrong. */ @@ -1486,7 +1494,7 @@ update_array_sizes(struct gl_shader_program *prog) foreach_list(node, prog->_LinkedShaders[i]->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if ((var == NULL) || (var->mode != ir_var_uniform) || + if ((var == NULL) || (var->data.mode != ir_var_uniform) || !var->type->is_array()) continue; @@ -1501,7 +1509,7 @@ update_array_sizes(struct gl_shader_program *prog) if (var->is_in_uniform_block() || var->type->contains_atomic()) continue; - unsigned int size = var->max_array_access; + unsigned int size = var->data.max_array_access; for (unsigned j = 0; j < MESA_SHADER_TYPES; j++) { if (prog->_LinkedShaders[j] == NULL) continue; @@ -1512,8 +1520,8 @@ update_array_sizes(struct gl_shader_program *prog) continue; if (strcmp(var->name, other_var->name) == 0 && - other_var->max_array_access > size) { - size = other_var->max_array_access; + other_var->data.max_array_access > size) { + size = other_var->data.max_array_access; } } } @@ -1652,16 +1660,17 @@ assign_attribute_or_color_locations(gl_shader_program *prog, foreach_list(node, sh->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if ((var == NULL) || (var->mode != (unsigned) direction)) + if ((var == NULL) || (var->data.mode != (unsigned) direction)) continue; - if (var->explicit_location) { - if ((var->location >= (int)(max_index + generic_base)) - || (var->location < 0)) { + if (var->data.explicit_location) { + if ((var->data.location >= (int)(max_index + generic_base)) + || (var->data.location < 0)) { linker_error(prog, "invalid explicit location %d specified for `%s'\n", - (var->location < 0) - ? var->location : var->location - generic_base, + (var->data.location < 0) + ? var->data.location + : var->data.location - generic_base, var->name); return false; } @@ -1670,8 +1679,8 @@ assign_attribute_or_color_locations(gl_shader_program *prog, if (prog->AttributeBindings->get(binding, var->name)) { assert(binding >= VERT_ATTRIB_GENERIC0); - var->location = binding; - var->is_unmatched_generic_inout = 0; + var->data.location = binding; + var->data.is_unmatched_generic_inout = 0; } } else if (target_index == MESA_SHADER_FRAGMENT) { unsigned binding; @@ -1679,11 +1688,11 @@ assign_attribute_or_color_locations(gl_shader_program *prog, if (prog->FragDataBindings->get(binding, var->name)) { assert(binding >= FRAG_RESULT_DATA0); - var->location = binding; - var->is_unmatched_generic_inout = 0; + var->data.location = binding; + var->data.is_unmatched_generic_inout = 0; if (prog->FragDataIndexBindings->get(index, var->name)) { - var->index = index; + var->data.index = index; } } } @@ -1694,8 +1703,8 @@ assign_attribute_or_color_locations(gl_shader_program *prog, * add it to the list of variables that need linker-assigned locations. */ const unsigned slots = var->type->count_attribute_slots(); - if (var->location != -1) { - if (var->location >= generic_base && var->index < 1) { + if (var->data.location != -1) { + if (var->data.location >= generic_base && var->data.index < 1) { /* From page 61 of the OpenGL 4.0 spec: * * "LinkProgram will fail if the attribute bindings assigned @@ -1729,7 +1738,7 @@ assign_attribute_or_color_locations(gl_shader_program *prog, /* Mask representing the contiguous slots that will be used by * this attribute. */ - const unsigned attr = var->location - generic_base; + const unsigned attr = var->data.location - generic_base; const unsigned use_mask = (1 << slots) - 1; /* Generate a link error if the set of bits requested for this @@ -1795,8 +1804,8 @@ assign_attribute_or_color_locations(gl_shader_program *prog, return false; } - to_assign[i].var->location = generic_base + location; - to_assign[i].var->is_unmatched_generic_inout = 0; + to_assign[i].var->data.location = generic_base + location; + to_assign[i].var->data.is_unmatched_generic_inout = 0; used_locations |= (use_mask << location); } @@ -1813,15 +1822,15 @@ demote_shader_inputs_and_outputs(gl_shader *sh, enum ir_variable_mode mode) foreach_list(node, sh->ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if ((var == NULL) || (var->mode != int(mode))) + if ((var == NULL) || (var->data.mode != int(mode))) continue; /* A shader 'in' or 'out' variable is only really an input or output if * its value is used by other shader stages. This will cause the variable * to have a location assigned. */ - if (var->is_unmatched_generic_inout) { - var->mode = ir_var_auto; + if (var->data.is_unmatched_generic_inout) { + var->data.mode = ir_var_auto; } } } @@ -1849,12 +1858,12 @@ store_fragdepth_layout(struct gl_shader_program *prog) foreach_list(node, ir) { ir_variable *const var = ((ir_instruction *) node)->as_variable(); - if (var == NULL || var->mode != ir_var_shader_out) { + if (var == NULL || var->data.mode != ir_var_shader_out) { continue; } if (strcmp(var->name, "gl_FragDepth") == 0) { - switch (var->depth_layout) { + switch (var->data.depth_layout) { case ir_depth_layout_none: prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_NONE; return; diff --git a/mesalib/src/glsl/loop_analysis.cpp b/mesalib/src/glsl/loop_analysis.cpp index b08241af5..fd2b6c923 100644 --- a/mesalib/src/glsl/loop_analysis.cpp +++ b/mesalib/src/glsl/loop_analysis.cpp @@ -33,6 +33,46 @@ static bool all_expression_operands_are_loop_constant(ir_rvalue *, static ir_rvalue *get_basic_induction_increment(ir_assignment *, hash_table *); +/** + * Record the fact that the given loop variable was referenced inside the loop. + * + * \arg in_assignee is true if the reference was on the LHS of an assignment. + * + * \arg in_conditional_code_or_nested_loop is true if the reference occurred + * inside an if statement or a nested loop. + * + * \arg current_assignment is the ir_assignment node that the loop variable is + * on the LHS of, if any (ignored if \c in_assignee is false). + */ +void +loop_variable::record_reference(bool in_assignee, + bool in_conditional_code_or_nested_loop, + ir_assignment *current_assignment) +{ + if (in_assignee) { + assert(current_assignment != NULL); + + if (in_conditional_code_or_nested_loop || + current_assignment->condition != NULL) { + this->conditional_or_nested_assignment = true; + } + + if (this->first_assignment == NULL) { + assert(this->num_assignments == 0); + + this->first_assignment = current_assignment; + } + + this->num_assignments++; + } else if (this->first_assignment == current_assignment) { + /* This catches the case where the variable is used in the RHS of an + * assignment where it is also in the LHS. + */ + this->read_before_write = true; + } +} + + loop_state::loop_state() { this->ht = hash_table_ctor(0, hash_table_pointer_hash, @@ -94,7 +134,7 @@ loop_terminator * loop_variable_state::insert(ir_if *if_stmt) { void *mem_ctx = ralloc_parent(this); - loop_terminator *t = rzalloc(mem_ctx, loop_terminator); + loop_terminator *t = new(mem_ctx) loop_terminator(); t->ir = if_stmt; this->terminators.push_tail(t); @@ -102,6 +142,33 @@ loop_variable_state::insert(ir_if *if_stmt) return t; } + +/** + * If the given variable already is recorded in the state for this loop, + * return the corresponding loop_variable object that records information + * about it. + * + * Otherwise, create a new loop_variable object to record information about + * the variable, and set its \c read_before_write field appropriately based on + * \c in_assignee. + * + * \arg in_assignee is true if this variable was encountered on the LHS of an + * assignment. + */ +loop_variable * +loop_variable_state::get_or_insert(ir_variable *var, bool in_assignee) +{ + loop_variable *lv = this->get(var); + + if (lv == NULL) { + lv = this->insert(var); + lv->read_before_write = !in_assignee; + } + + return lv; +} + + namespace { class loop_analysis : public ir_hierarchical_visitor { @@ -157,14 +224,14 @@ loop_analysis::visit(ir_loop_jump *ir) ir_visitor_status loop_analysis::visit_enter(ir_call *ir) { - /* If we're not somewhere inside a loop, there's nothing to do. */ - if (this->state.is_empty()) - return visit_continue; - - loop_variable_state *const ls = - (loop_variable_state *) this->state.get_head(); + /* Mark every loop that we're currently analyzing as containing an ir_call + * (even those at outer nesting levels). + */ + foreach_list(node, &this->state) { + loop_variable_state *const ls = (loop_variable_state *) node; + ls->contains_calls = true; + } - ls->contains_calls = true; return visit_continue_with_parent; } @@ -177,35 +244,18 @@ loop_analysis::visit(ir_dereference_variable *ir) if (this->state.is_empty()) return visit_continue; - loop_variable_state *const ls = - (loop_variable_state *) this->state.get_head(); - - ir_variable *var = ir->variable_referenced(); - loop_variable *lv = ls->get(var); - - if (lv == NULL) { - lv = ls->insert(var); - lv->read_before_write = !this->in_assignee; - } - - if (this->in_assignee) { - assert(this->current_assignment != NULL); + bool nested = false; - lv->conditional_assignment = (this->if_statement_depth > 0) - || (this->current_assignment->condition != NULL); + foreach_list(node, &this->state) { + loop_variable_state *const ls = (loop_variable_state *) node; - if (lv->first_assignment == NULL) { - assert(lv->num_assignments == 0); - - lv->first_assignment = this->current_assignment; - } + ir_variable *var = ir->variable_referenced(); + loop_variable *lv = ls->get_or_insert(var, this->in_assignee); - lv->num_assignments++; - } else if (lv->first_assignment == this->current_assignment) { - /* This catches the case where the variable is used in the RHS of an - * assignment where it is also in the LHS. - */ - lv->read_before_write = true; + lv->record_reference(this->in_assignee, + nested || this->if_statement_depth > 0, + this->current_assignment); + nested = true; } return visit_continue; @@ -286,7 +336,7 @@ loop_analysis::visit_leave(ir_loop *ir) foreach_list_safe(node, &ls->variables) { loop_variable *lv = (loop_variable *) node; - if (lv->conditional_assignment || (lv->num_assignments > 1)) + if (lv->conditional_or_nested_assignment || (lv->num_assignments > 1)) continue; /* Process the RHS of the assignment. If all of the variables @@ -326,9 +376,10 @@ loop_analysis::visit_leave(ir_loop *ir) assert(lv->num_assignments == 1); assert(lv->first_assignment != NULL); - /* The assignmnet to the variable in the loop must be unconditional. + /* The assignment to the variable in the loop must be unconditional and + * not inside a nested loop. */ - if (lv->conditional_assignment) + if (lv->conditional_or_nested_assignment) continue; /* Basic loop induction variables have a single assignment in the loop @@ -338,8 +389,6 @@ loop_analysis::visit_leave(ir_loop *ir) ir_rvalue *const inc = get_basic_induction_increment(lv->first_assignment, ls->var_hash); if (inc != NULL) { - lv->iv_scale = NULL; - lv->biv = lv->var; lv->increment = inc; lv->remove(); @@ -347,6 +396,75 @@ loop_analysis::visit_leave(ir_loop *ir) } } + /* Search the loop terminating conditions for those of the form 'i < c' + * where i is a loop induction variable, c is a constant, and < is any + * relative operator. From each of these we can infer an iteration count. + * Also figure out which terminator (if any) produces the smallest + * iteration count--this is the limiting terminator. + */ + foreach_list(node, &ls->terminators) { + loop_terminator *t = (loop_terminator *) node; + ir_if *if_stmt = t->ir; + + /* If-statements can be either 'if (expr)' or 'if (deref)'. We only care + * about the former here. + */ + ir_expression *cond = if_stmt->condition->as_expression(); + if (cond == NULL) + continue; + + switch (cond->operation) { + case ir_binop_less: + case ir_binop_greater: + case ir_binop_lequal: + case ir_binop_gequal: { + /* The expressions that we care about will either be of the form + * 'counter < limit' or 'limit < counter'. Figure out which is + * which. + */ + ir_rvalue *counter = cond->operands[0]->as_dereference_variable(); + ir_constant *limit = cond->operands[1]->as_constant(); + enum ir_expression_operation cmp = cond->operation; + + if (limit == NULL) { + counter = cond->operands[1]->as_dereference_variable(); + limit = cond->operands[0]->as_constant(); + + switch (cmp) { + case ir_binop_less: cmp = ir_binop_greater; break; + case ir_binop_greater: cmp = ir_binop_less; break; + case ir_binop_lequal: cmp = ir_binop_gequal; break; + case ir_binop_gequal: cmp = ir_binop_lequal; break; + default: assert(!"Should not get here."); + } + } + + if ((counter == NULL) || (limit == NULL)) + break; + + ir_variable *var = counter->variable_referenced(); + + ir_rvalue *init = find_initial_value(ir, var); + + loop_variable *lv = ls->get(var); + if (lv != NULL && lv->is_induction_var()) { + t->iterations = calculate_iterations(init, limit, lv->increment, + cmp); + + if (t->iterations >= 0 && + (ls->limiting_terminator == NULL || + t->iterations < ls->limiting_terminator->iterations)) { + ls->limiting_terminator = t; + } + } + break; + } + + default: + break; + } + } + return visit_continue; } diff --git a/mesalib/src/glsl/loop_analysis.h b/mesalib/src/glsl/loop_analysis.h index 769d62661..f841042f0 100644 --- a/mesalib/src/glsl/loop_analysis.h +++ b/mesalib/src/glsl/loop_analysis.h @@ -39,16 +39,12 @@ analyze_loop_variables(exec_list *instructions); /** * Fill in loop control fields * - * Based on analysis of loop variables, this function tries to remove sequences - * in the loop of the form + * Based on analysis of loop variables, this function tries to remove + * redundant sequences in the loop of the form * * (if (expression bool ...) (break)) * - * and fill in the \c ir_loop::from, \c ir_loop::to, and \c ir_loop::counter - * fields of the \c ir_loop. - * - * In this process, some conditional break-statements may be eliminated - * altogether. For example, if it is provable that one loop exit condition will + * For example, if it is provable that one loop exit condition will * always be satisfied before another, the unnecessary exit condition will be * removed. */ @@ -59,6 +55,13 @@ set_loop_controls(exec_list *instructions, loop_state *ls); extern bool unroll_loops(exec_list *instructions, loop_state *ls, unsigned max_iterations); +ir_rvalue * +find_initial_value(ir_loop *loop, ir_variable *var); + +int +calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment, + enum ir_expression_operation op); + /** * Tracking for all variables used in a loop @@ -67,15 +70,11 @@ class loop_variable_state : public exec_node { public: class loop_variable *get(const ir_variable *); class loop_variable *insert(ir_variable *); + class loop_variable *get_or_insert(ir_variable *, bool in_assignee); class loop_terminator *insert(ir_if *); /** - * Loop whose variable state is being tracked by this structure - */ - ir_loop *loop; - - /** * Variables that have not yet been classified */ exec_list variables; @@ -104,18 +103,17 @@ public: exec_list terminators; /** - * Hash table containing all variables accessed in this loop + * If any of the terminators in \c terminators leads to termination of the + * loop after a constant number of iterations, this is the terminator that + * leads to termination after the smallest number of iterations. Otherwise + * NULL. */ - hash_table *var_hash; + loop_terminator *limiting_terminator; /** - * Maximum number of loop iterations. - * - * If this value is negative, then the loop may be infinite. This actually - * means that analysis was unable to determine an upper bound on the number - * of loop iterations. + * Hash table containing all variables accessed in this loop */ - int max_iterations; + hash_table *var_hash; /** * Number of ir_loop_jump instructions that operate on this loop @@ -129,11 +127,11 @@ public: loop_variable_state() { - this->max_iterations = -1; this->num_loop_jumps = 0; this->contains_calls = false; this->var_hash = hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare); + this->limiting_terminator = NULL; } ~loop_variable_state() @@ -171,8 +169,11 @@ public: /** Are all variables in the RHS of the assignment loop constants? */ bool rhs_clean; - /** Is there an assignment to the variable that is conditional? */ - bool conditional_assignment; + /** + * Is there an assignment to the variable that is conditional, or inside a + * nested loop? + */ + bool conditional_or_nested_assignment; /** Reference to the first assignment to the variable in the loop body. */ ir_assignment *first_assignment; @@ -181,27 +182,30 @@ public: unsigned num_assignments; /** - * Increment values for loop induction variables + * Increment value for a loop induction variable * - * Loop induction variables have a single increment of the form - * \c b * \c biv + \c c, where \c b and \c c are loop constants and \c i - * is a basic loop induction variable. + * If this is a loop induction variable, the amount by which the variable + * is incremented on each iteration through the loop. * - * If \c iv_scale is \c NULL, 1 is used. If \c biv is the same as \c var, - * then \c var is a basic loop induction variable. + * If this is not a loop induction variable, NULL. */ - /*@{*/ - ir_rvalue *iv_scale; - ir_variable *biv; ir_rvalue *increment; - /*@}*/ + + + inline bool is_induction_var() const + { + /* Induction variables always have a non-null increment, and vice + * versa. + */ + return this->increment != NULL; + } inline bool is_loop_constant() const { const bool is_const = (this->num_assignments == 0) || ((this->num_assignments == 1) - && !this->conditional_assignment + && !this->conditional_or_nested_assignment && !this->read_before_write && this->rhs_clean); @@ -213,16 +217,35 @@ public: /* Variables that are marked read-only *MUST* be loop constant. */ - assert(!this->var->read_only || (this->var->read_only && is_const)); + assert(!this->var->data.read_only + || (this->var->data.read_only && is_const)); return is_const; } + + void record_reference(bool in_assignee, + bool in_conditional_code_or_nested_loop, + ir_assignment *current_assignment); }; class loop_terminator : public exec_node { public: + loop_terminator() + : ir(NULL), iterations(-1) + { + } + + /** + * Statement which terminates the loop. + */ ir_if *ir; + + /** + * The number of iterations after which the terminator is known to + * terminate the loop (if that is a fixed value). Otherwise -1. + */ + int iterations; }; diff --git a/mesalib/src/glsl/loop_controls.cpp b/mesalib/src/glsl/loop_controls.cpp index 26481930d..3db06ad18 100644 --- a/mesalib/src/glsl/loop_controls.cpp +++ b/mesalib/src/glsl/loop_controls.cpp @@ -183,114 +183,41 @@ loop_control_visitor::visit_leave(ir_loop *ir) return visit_continue; } - /* Search the loop terminating conditions for one of the form 'i < c' where - * i is a loop induction variable, c is a constant, and < is any relative - * operator. - */ - int max_iterations = ls->max_iterations; - - if(ir->from && ir->to && ir->increment) - max_iterations = calculate_iterations(ir->from, ir->to, ir->increment, (ir_expression_operation)ir->cmp); - - if(max_iterations < 0) - max_iterations = INT_MAX; + if (ls->limiting_terminator != NULL) { + /* If the limiting terminator has an iteration count of zero, then we've + * proven that the loop cannot run, so delete it. + */ + int iterations = ls->limiting_terminator->iterations; + if (iterations == 0) { + ir->remove(); + this->progress = true; + return visit_continue; + } + } + /* Remove the conditional break statements associated with all terminators + * that are associated with a fixed iteration count, except for the one + * associated with the limiting terminator--that one needs to stay, since + * it terminates the loop. Exception: if the loop still has a normative + * bound, then that terminates the loop, so we don't even need the limiting + * terminator. + */ foreach_list(node, &ls->terminators) { loop_terminator *t = (loop_terminator *) node; - ir_if *if_stmt = t->ir; - /* If-statements can be either 'if (expr)' or 'if (deref)'. We only care - * about the former here. - */ - ir_expression *cond = if_stmt->condition->as_expression(); - if (cond == NULL) - continue; - - switch (cond->operation) { - case ir_binop_less: - case ir_binop_greater: - case ir_binop_lequal: - case ir_binop_gequal: { - /* The expressions that we care about will either be of the form - * 'counter < limit' or 'limit < counter'. Figure out which is - * which. - */ - ir_rvalue *counter = cond->operands[0]->as_dereference_variable(); - ir_constant *limit = cond->operands[1]->as_constant(); - enum ir_expression_operation cmp = cond->operation; - - if (limit == NULL) { - counter = cond->operands[1]->as_dereference_variable(); - limit = cond->operands[0]->as_constant(); - - switch (cmp) { - case ir_binop_less: cmp = ir_binop_greater; break; - case ir_binop_greater: cmp = ir_binop_less; break; - case ir_binop_lequal: cmp = ir_binop_gequal; break; - case ir_binop_gequal: cmp = ir_binop_lequal; break; - default: assert(!"Should not get here."); - } - } - - if ((counter == NULL) || (limit == NULL)) - break; - - ir_variable *var = counter->variable_referenced(); - - ir_rvalue *init = find_initial_value(ir, var); - - foreach_list(iv_node, &ls->induction_variables) { - loop_variable *lv = (loop_variable *) iv_node; - - if (lv->var == var) { - const int iterations = calculate_iterations(init, limit, - lv->increment, - cmp); - if (iterations >= 0) { - /* If the new iteration count is lower than the previously - * believed iteration count, update the loop control values. - */ - if (iterations < max_iterations) { - ir->from = init->clone(ir, NULL); - ir->to = limit->clone(ir, NULL); - ir->increment = lv->increment->clone(ir, NULL); - ir->counter = lv->var; - ir->cmp = cmp; - - max_iterations = iterations; - } - - /* Remove the conditional break statement. The loop - * controls are now set such that the exit condition will be - * satisfied. - */ - if_stmt->remove(); - - assert(ls->num_loop_jumps > 0); - ls->num_loop_jumps--; - - this->progress = true; - } - - break; - } - } - break; - } + if (t->iterations < 0) + continue; - default: - break; + if (t != ls->limiting_terminator) { + t->ir->remove(); + + assert(ls->num_loop_jumps > 0); + ls->num_loop_jumps--; + + this->progress = true; } } - /* If we have proven the one of the loop exit conditions is satisifed before - * running the loop once, remove the loop. - */ - if (max_iterations == 0) - ir->remove(); - else - ls->max_iterations = max_iterations; - return visit_continue; } diff --git a/mesalib/src/glsl/loop_unroll.cpp b/mesalib/src/glsl/loop_unroll.cpp index ff97766f1..6eced1736 100644 --- a/mesalib/src/glsl/loop_unroll.cpp +++ b/mesalib/src/glsl/loop_unroll.cpp @@ -37,6 +37,10 @@ public: } virtual ir_visitor_status visit_leave(ir_loop *ir); + void simple_unroll(ir_loop *ir, int iterations); + void complex_unroll(ir_loop *ir, int iterations, + bool continue_from_then_branch); + void splice_post_if_instructions(ir_if *ir_if, exec_list *splice_dest); loop_state *state; @@ -86,6 +90,138 @@ public: }; +/** + * Unroll a loop which does not contain any jumps. For example, if the input + * is: + * + * (loop (...) ...instrs...) + * + * And the iteration count is 3, the output will be: + * + * ...instrs... ...instrs... ...instrs... + */ +void +loop_unroll_visitor::simple_unroll(ir_loop *ir, int iterations) +{ + void *const mem_ctx = ralloc_parent(ir); + + for (int i = 0; i < iterations; i++) { + exec_list copy_list; + + copy_list.make_empty(); + clone_ir_list(mem_ctx, ©_list, &ir->body_instructions); + + ir->insert_before(©_list); + } + + /* The loop has been replaced by the unrolled copies. Remove the original + * loop from the IR sequence. + */ + ir->remove(); + + this->progress = true; +} + + +/** + * Unroll a loop whose last statement is an ir_if. If \c + * continue_from_then_branch is true, the loop is repeated only when the + * "then" branch of the if is taken; otherwise it is repeated only when the + * "else" branch of the if is taken. + * + * For example, if the input is: + * + * (loop (...) + * ...body... + * (if (cond) + * (...then_instrs...) + * (...else_instrs...))) + * + * And the iteration count is 3, and \c continue_from_then_branch is true, + * then the output will be: + * + * ...body... + * (if (cond) + * (...then_instrs... + * ...body... + * (if (cond) + * (...then_instrs... + * ...body... + * (if (cond) + * (...then_instrs...) + * (...else_instrs...))) + * (...else_instrs...))) + * (...else_instrs)) + */ +void +loop_unroll_visitor::complex_unroll(ir_loop *ir, int iterations, + bool continue_from_then_branch) +{ + void *const mem_ctx = ralloc_parent(ir); + ir_instruction *ir_to_replace = ir; + + for (int i = 0; i < iterations; i++) { + exec_list copy_list; + + copy_list.make_empty(); + clone_ir_list(mem_ctx, ©_list, &ir->body_instructions); + + ir_if *ir_if = ((ir_instruction *) copy_list.get_tail())->as_if(); + assert(ir_if != NULL); + + ir_to_replace->insert_before(©_list); + ir_to_replace->remove(); + + /* placeholder that will be removed in the next iteration */ + ir_to_replace = + new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_continue); + + exec_list *const list = (continue_from_then_branch) + ? &ir_if->then_instructions : &ir_if->else_instructions; + + list->push_tail(ir_to_replace); + } + + ir_to_replace->remove(); + + this->progress = true; +} + + +/** + * Move all of the instructions which follow \c ir_if to the end of + * \c splice_dest. + * + * For example, in the code snippet: + * + * (if (cond) + * (...then_instructions... + * break) + * (...else_instructions...)) + * ...post_if_instructions... + * + * If \c ir_if points to the "if" instruction, and \c splice_dest points to + * (...else_instructions...), the code snippet is transformed into: + * + * (if (cond) + * (...then_instructions... + * break) + * (...else_instructions... + * ...post_if_instructions...)) + */ +void +loop_unroll_visitor::splice_post_if_instructions(ir_if *ir_if, + exec_list *splice_dest) +{ + while (!ir_if->get_next()->is_tail_sentinel()) { + ir_instruction *move_ir = (ir_instruction *) ir_if->get_next(); + + move_ir->remove(); + splice_dest->push_tail(move_ir); + } +} + + ir_visitor_status loop_unroll_visitor::visit_leave(ir_loop *ir) { @@ -100,14 +236,14 @@ loop_unroll_visitor::visit_leave(ir_loop *ir) return visit_continue; } - iterations = ls->max_iterations; - /* Don't try to unroll loops where the number of iterations is not known * at compile-time. */ - if (iterations < 0) + if (ls->limiting_terminator == NULL) return visit_continue; + iterations = ls->limiting_terminator->iterations; + /* Don't try to unroll loops that have zillions of iterations either. */ if (iterations > (int) max_iterations) @@ -120,127 +256,83 @@ loop_unroll_visitor::visit_leave(ir_loop *ir) if (count.fail || count.nodes * iterations > (int)max_iterations * 5) return visit_continue; - if (ls->num_loop_jumps > 1) - return visit_continue; - else if (ls->num_loop_jumps) { - ir_instruction *last_ir = (ir_instruction *) ir->body_instructions.get_tail(); - assert(last_ir != NULL); - - if (is_break(last_ir)) { - /* If the only loop-jump is a break at the end of the loop, the loop - * will execute exactly once. Remove the break, set the iteration - * count, and fall through to the normal unroller. - */ - last_ir->remove(); - iterations = 1; - - this->progress = true; - } else { - ir_if *ir_if = NULL; - ir_instruction *break_ir = NULL; - bool continue_from_then_branch = false; - - foreach_list(node, &ir->body_instructions) { - /* recognize loops in the form produced by ir_lower_jumps */ - ir_instruction *cur_ir = (ir_instruction *) node; - - ir_if = cur_ir->as_if(); - if (ir_if != NULL) { - /* Determine which if-statement branch, if any, ends with a - * break. The branch that did *not* have the break will get a - * temporary continue inserted in each iteration of the loop - * unroll. - * - * Note that since ls->num_loop_jumps is <= 1, it is impossible - * for both branches to end with a break. - */ - ir_instruction *ir_if_last = - (ir_instruction *) ir_if->then_instructions.get_tail(); - - if (is_break(ir_if_last)) { - continue_from_then_branch = false; - break_ir = ir_if_last; - break; - } else { - ir_if_last = - (ir_instruction *) ir_if->else_instructions.get_tail(); - - if (is_break(ir_if_last)) { - break_ir = ir_if_last; - continue_from_then_branch = true; - break; - } - } - } - } - - if (break_ir == NULL) - return visit_continue; - - /* move instructions after then if in the continue branch */ - while (!ir_if->get_next()->is_tail_sentinel()) { - ir_instruction *move_ir = (ir_instruction *) ir_if->get_next(); - - move_ir->remove(); - if (continue_from_then_branch) - ir_if->then_instructions.push_tail(move_ir); - else - ir_if->else_instructions.push_tail(move_ir); - } - - /* Remove the break from the if-statement. - */ - break_ir->remove(); - - void *const mem_ctx = ralloc_parent(ir); - ir_instruction *ir_to_replace = ir; - - for (int i = 0; i < iterations; i++) { - exec_list copy_list; + /* Note: the limiting terminator contributes 1 to ls->num_loop_jumps. + * We'll be removing the limiting terminator before we unroll. + */ + assert(ls->num_loop_jumps > 0); + unsigned predicted_num_loop_jumps = ls->num_loop_jumps - 1; - copy_list.make_empty(); - clone_ir_list(mem_ctx, ©_list, &ir->body_instructions); + if (predicted_num_loop_jumps > 1) + return visit_continue; - ir_if = ((ir_instruction *) copy_list.get_tail())->as_if(); - assert(ir_if != NULL); + if (predicted_num_loop_jumps == 0) { + ls->limiting_terminator->ir->remove(); + simple_unroll(ir, iterations); + return visit_continue; + } - ir_to_replace->insert_before(©_list); - ir_to_replace->remove(); + ir_instruction *last_ir = (ir_instruction *) ir->body_instructions.get_tail(); + assert(last_ir != NULL); - /* placeholder that will be removed in the next iteration */ - ir_to_replace = - new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_continue); + if (is_break(last_ir)) { + /* If the only loop-jump is a break at the end of the loop, the loop + * will execute exactly once. Remove the break and use the simple + * unroller with an iteration count of 1. + */ + last_ir->remove(); - exec_list *const list = (continue_from_then_branch) - ? &ir_if->then_instructions : &ir_if->else_instructions; + ls->limiting_terminator->ir->remove(); + simple_unroll(ir, 1); + return visit_continue; + } - list->push_tail(ir_to_replace); + foreach_list(node, &ir->body_instructions) { + /* recognize loops in the form produced by ir_lower_jumps */ + ir_instruction *cur_ir = (ir_instruction *) node; + + /* Skip the limiting terminator, since it will go away when we + * unroll. + */ + if (cur_ir == ls->limiting_terminator->ir) + continue; + + ir_if *ir_if = cur_ir->as_if(); + if (ir_if != NULL) { + /* Determine which if-statement branch, if any, ends with a + * break. The branch that did *not* have the break will get a + * temporary continue inserted in each iteration of the loop + * unroll. + * + * Note that since ls->num_loop_jumps is <= 1, it is impossible + * for both branches to end with a break. + */ + ir_instruction *ir_if_last = + (ir_instruction *) ir_if->then_instructions.get_tail(); + + if (is_break(ir_if_last)) { + ls->limiting_terminator->ir->remove(); + splice_post_if_instructions(ir_if, &ir_if->else_instructions); + ir_if_last->remove(); + complex_unroll(ir, iterations, false); + return visit_continue; + } else { + ir_if_last = + (ir_instruction *) ir_if->else_instructions.get_tail(); + + if (is_break(ir_if_last)) { + ls->limiting_terminator->ir->remove(); + splice_post_if_instructions(ir_if, &ir_if->then_instructions); + ir_if_last->remove(); + complex_unroll(ir, iterations, true); + return visit_continue; + } } - - ir_to_replace->remove(); - - this->progress = true; - return visit_continue; } } - void *const mem_ctx = ralloc_parent(ir); - - for (int i = 0; i < iterations; i++) { - exec_list copy_list; - - copy_list.make_empty(); - clone_ir_list(mem_ctx, ©_list, &ir->body_instructions); - - ir->insert_before(©_list); - } - - /* The loop has been replaced by the unrolled copies. Remove the original - * loop from the IR sequence. + /* Did not find the break statement. It must be in a complex if-nesting, + * so don't try to unroll. */ - ir->remove(); - - this->progress = true; return visit_continue; } diff --git a/mesalib/src/glsl/lower_clip_distance.cpp b/mesalib/src/glsl/lower_clip_distance.cpp index 04fa6d410..bb4f6ab11 100644 --- a/mesalib/src/glsl/lower_clip_distance.cpp +++ b/mesalib/src/glsl/lower_clip_distance.cpp @@ -135,13 +135,13 @@ lower_clip_distance_visitor::visit(ir_variable *ir) "gl_ClipDistanceMESA"); this->new_clip_distance_1d_var->type = glsl_type::get_array_instance(glsl_type::vec4_type, new_size); - this->new_clip_distance_1d_var->max_array_access - = ir->max_array_access / 4; + this->new_clip_distance_1d_var->data.max_array_access + = ir->data.max_array_access / 4; ir->replace_with(this->new_clip_distance_1d_var); } else { /* 2D gl_ClipDistance (used for geometry input). */ - assert(ir->mode == ir_var_shader_in && + assert(ir->data.mode == ir_var_shader_in && this->shader_type == GL_GEOMETRY_SHADER_ARB); if (this->old_clip_distance_2d_var) return visit_continue; @@ -161,8 +161,8 @@ lower_clip_distance_visitor::visit(ir_variable *ir) glsl_type::get_array_instance(glsl_type::vec4_type, new_size), ir->type->array_size()); - this->new_clip_distance_2d_var->max_array_access - = ir->max_array_access / 4; + this->new_clip_distance_2d_var->data.max_array_access + = ir->data.max_array_access / 4; ir->replace_with(this->new_clip_distance_2d_var); } @@ -500,8 +500,8 @@ lower_clip_distance_visitor::visit_leave(ir_call *ir) this->base_ir->insert_before(temp_clip_distance); actual_param->replace_with( new(ctx) ir_dereference_variable(temp_clip_distance)); - if (formal_param->mode == ir_var_function_in - || formal_param->mode == ir_var_function_inout) { + if (formal_param->data.mode == ir_var_function_in + || formal_param->data.mode == ir_var_function_inout) { /* Copy from gl_ClipDistance to the temporary before the call. * Since we are going to insert this copy before the current * instruction, we need to visit it afterwards to make sure it @@ -513,8 +513,8 @@ lower_clip_distance_visitor::visit_leave(ir_call *ir) this->base_ir->insert_before(new_assignment); this->visit_new_assignment(new_assignment); } - if (formal_param->mode == ir_var_function_out - || formal_param->mode == ir_var_function_inout) { + if (formal_param->data.mode == ir_var_function_out + || formal_param->data.mode == ir_var_function_inout) { /* Copy from the temporary to gl_ClipDistance after the call. * Since visit_list_elements() has already decided which * instruction it's going to visit next, we need to visit diff --git a/mesalib/src/glsl/lower_instructions.cpp b/mesalib/src/glsl/lower_instructions.cpp index d01879cbd..8f8d448ea 100644 --- a/mesalib/src/glsl/lower_instructions.cpp +++ b/mesalib/src/glsl/lower_instructions.cpp @@ -383,7 +383,6 @@ lower_instructions_visitor::ldexp_to_arith(ir_expression *ir) /* Constants */ ir_constant *zeroi = ir_constant::zero(ir, ivec); - ir_constant *zerof = ir_constant::zero(ir, ir->type); ir_constant *sign_mantissa_mask = new(ir) ir_constant(0x807fffffu, vec_elem); ir_constant *sign_mask = new(ir) ir_constant(0x80000000u, vec_elem); @@ -429,8 +428,7 @@ lower_instructions_visitor::ldexp_to_arith(ir_expression *ir) */ i.insert_before(zero_sign_x); i.insert_before(assign(zero_sign_x, - bitcast_u2f(bit_or(bit_and(bitcast_f2u(x), sign_mask), - bitcast_f2u(zerof))))); + bitcast_u2f(bit_and(bitcast_f2u(x), sign_mask)))); i.insert_before(is_not_zero_or_underflow); i.insert_before(assign(is_not_zero_or_underflow, diff --git a/mesalib/src/glsl/lower_named_interface_blocks.cpp b/mesalib/src/glsl/lower_named_interface_blocks.cpp index d59d11150..09d867ea3 100644 --- a/mesalib/src/glsl/lower_named_interface_blocks.cpp +++ b/mesalib/src/glsl/lower_named_interface_blocks.cpp @@ -108,7 +108,7 @@ flatten_named_interface_blocks_declarations::run(exec_list *instructions) * but, this will require changes to the other uniform block * support code. */ - if (var->mode == ir_var_uniform) + if (var->data.mode == ir_var_uniform) continue; const glsl_type * iface_t = var->type; @@ -139,8 +139,8 @@ flatten_named_interface_blocks_declarations::run(exec_list *instructions) new_var = new(mem_ctx) ir_variable(iface_t->fields.structure[i].type, var_name, - (ir_variable_mode) var->mode); - new_var->from_named_ifc_block_nonarray = 1; + (ir_variable_mode) var->data.mode); + new_var->data.from_named_ifc_block_nonarray = 1; } else { const glsl_type *new_array_type = glsl_type::get_array_instance( @@ -149,14 +149,15 @@ flatten_named_interface_blocks_declarations::run(exec_list *instructions) new_var = new(mem_ctx) ir_variable(new_array_type, var_name, - (ir_variable_mode) var->mode); - new_var->from_named_ifc_block_array = 1; + (ir_variable_mode) var->data.mode); + new_var->data.from_named_ifc_block_array = 1; } - new_var->location = iface_t->fields.structure[i].location; - new_var->explicit_location = (new_var->location >= 0); - new_var->interpolation = + new_var->data.location = iface_t->fields.structure[i].location; + new_var->data.explicit_location = (new_var->data.location >= 0); + new_var->data.interpolation = iface_t->fields.structure[i].interpolation; - new_var->centroid = iface_t->fields.structure[i].centroid; + new_var->data.centroid = iface_t->fields.structure[i].centroid; + new_var->data.sample = iface_t->fields.structure[i].sample; new_var->init_interface_type(iface_t); hash_table_insert(interface_namespace, new_var, @@ -211,7 +212,7 @@ flatten_named_interface_blocks_declarations::handle_rvalue(ir_rvalue **rvalue) * but, this will require changes to the other uniform block * support code. */ - if (var->mode == ir_var_uniform) + if (var->data.mode == ir_var_uniform) return; if (var->get_interface_type() != NULL) { diff --git a/mesalib/src/glsl/lower_output_reads.cpp b/mesalib/src/glsl/lower_output_reads.cpp index 128b0b8cd..afe17766b 100644 --- a/mesalib/src/glsl/lower_output_reads.cpp +++ b/mesalib/src/glsl/lower_output_reads.cpp @@ -91,7 +91,7 @@ output_read_remover::~output_read_remover() ir_visitor_status output_read_remover::visit(ir_dereference_variable *ir) { - if (ir->var->mode != ir_var_shader_out) + if (ir->var->data.mode != ir_var_shader_out) return visit_continue; ir_variable *temp = (ir_variable *) hash_table_find(replacements, ir->var); diff --git a/mesalib/src/glsl/lower_packed_varyings.cpp b/mesalib/src/glsl/lower_packed_varyings.cpp index 61ee692f6..9edef5d04 100644 --- a/mesalib/src/glsl/lower_packed_varyings.cpp +++ b/mesalib/src/glsl/lower_packed_varyings.cpp @@ -258,8 +258,8 @@ lower_packed_varyings_visitor::run(exec_list *instructions) if (var == NULL) continue; - if (var->mode != this->mode || - var->location < (int) this->location_base || + if (var->data.mode != this->mode || + var->data.location < (int) this->location_base || !this->needs_lowering(var)) continue; @@ -268,18 +268,18 @@ lower_packed_varyings_visitor::run(exec_list *instructions) * safe, caller should ensure that integral varyings always use flat * interpolation, even when this is not required by GLSL. */ - assert(var->interpolation == INTERP_QUALIFIER_FLAT || + assert(var->data.interpolation == INTERP_QUALIFIER_FLAT || !var->type->contains_integer()); /* Change the old varying into an ordinary global. */ - var->mode = ir_var_auto; + var->data.mode = ir_var_auto; /* Create a reference to the old varying. */ ir_dereference_variable *deref = new(this->mem_ctx) ir_dereference_variable(var); /* Recursively pack or unpack it. */ - this->lower_rvalue(deref, var->location * 4 + var->location_frac, var, + this->lower_rvalue(deref, var->data.location * 4 + var->data.location_frac, var, var->name, this->gs_input_vertices != 0, 0); } } @@ -547,7 +547,7 @@ lower_packed_varyings_visitor::get_packed_varying_deref( if (this->packed_varyings[slot] == NULL) { char *packed_name = ralloc_asprintf(this->mem_ctx, "packed:%s", name); const glsl_type *packed_type; - if (unpacked_var->interpolation == INTERP_QUALIFIER_FLAT) + if (unpacked_var->data.interpolation == INTERP_QUALIFIER_FLAT) packed_type = glsl_type::ivec4_type; else packed_type = glsl_type::vec4_type; @@ -562,11 +562,12 @@ lower_packed_varyings_visitor::get_packed_varying_deref( /* Prevent update_array_sizes() from messing with the size of the * array. */ - packed_var->max_array_access = this->gs_input_vertices - 1; + packed_var->data.max_array_access = this->gs_input_vertices - 1; } - packed_var->centroid = unpacked_var->centroid; - packed_var->interpolation = unpacked_var->interpolation; - packed_var->location = location; + packed_var->data.centroid = unpacked_var->data.centroid; + packed_var->data.sample = unpacked_var->data.sample; + packed_var->data.interpolation = unpacked_var->data.interpolation; + packed_var->data.location = location; unpacked_var->insert_before(packed_var); this->packed_varyings[slot] = packed_var; } else { diff --git a/mesalib/src/glsl/lower_ubo_reference.cpp b/mesalib/src/glsl/lower_ubo_reference.cpp index 16b6801b8..c73b148b0 100644 --- a/mesalib/src/glsl/lower_ubo_reference.cpp +++ b/mesalib/src/glsl/lower_ubo_reference.cpp @@ -143,7 +143,7 @@ lower_ubo_reference_visitor::handle_rvalue(ir_rvalue **rvalue) struct gl_uniform_block *block = &shader->UniformBlocks[i]; this->ubo_var = var->is_interface_instance() - ? &block->Uniforms[0] : &block->Uniforms[var->location]; + ? &block->Uniforms[0] : &block->Uniforms[var->data.location]; break; } diff --git a/mesalib/src/glsl/lower_variable_index_to_cond_assign.cpp b/mesalib/src/glsl/lower_variable_index_to_cond_assign.cpp index 699fb3903..7c5d80f43 100644 --- a/mesalib/src/glsl/lower_variable_index_to_cond_assign.cpp +++ b/mesalib/src/glsl/lower_variable_index_to_cond_assign.cpp @@ -365,7 +365,7 @@ public: if (var == NULL) return this->lower_temps; - switch (var->mode) { + switch (var->data.mode) { case ir_var_auto: case ir_var_temporary: return this->lower_temps; diff --git a/mesalib/src/glsl/opt_array_splitting.cpp b/mesalib/src/glsl/opt_array_splitting.cpp index c7c5f6712..e946e0ae5 100644 --- a/mesalib/src/glsl/opt_array_splitting.cpp +++ b/mesalib/src/glsl/opt_array_splitting.cpp @@ -122,8 +122,8 @@ ir_array_reference_visitor::get_variable_entry(ir_variable *var) { assert(var); - if (var->mode != ir_var_auto && - var->mode != ir_var_temporary) + if (var->data.mode != ir_var_auto && + var->data.mode != ir_var_temporary) return NULL; if (!(var->type->is_array() || var->type->is_matrix())) diff --git a/mesalib/src/glsl/opt_constant_folding.cpp b/mesalib/src/glsl/opt_constant_folding.cpp index 072fefe9a..08a47b96b 100644 --- a/mesalib/src/glsl/opt_constant_folding.cpp +++ b/mesalib/src/glsl/opt_constant_folding.cpp @@ -127,8 +127,8 @@ ir_constant_folding_visitor::visit_enter(ir_call *ir) ir_rvalue *param_rval = (ir_rvalue *)iter.get(); ir_variable *sig_param = (ir_variable *)sig_iter.get(); - if (sig_param->mode == ir_var_function_in - || sig_param->mode == ir_var_const_in) { + if (sig_param->data.mode == ir_var_function_in + || sig_param->data.mode == ir_var_const_in) { ir_rvalue *new_param = param_rval; handle_rvalue(&new_param); diff --git a/mesalib/src/glsl/opt_constant_propagation.cpp b/mesalib/src/glsl/opt_constant_propagation.cpp index 2f65937fe..f1a6fbdaa 100644 --- a/mesalib/src/glsl/opt_constant_propagation.cpp +++ b/mesalib/src/glsl/opt_constant_propagation.cpp @@ -285,8 +285,8 @@ ir_constant_propagation_visitor::visit_enter(ir_call *ir) foreach_iter(exec_list_iterator, iter, ir->actual_parameters) { ir_variable *sig_param = (ir_variable *)sig_param_iter.get(); ir_rvalue *param = (ir_rvalue *)iter.get(); - if (sig_param->mode != ir_var_function_out - && sig_param->mode != ir_var_function_inout) { + if (sig_param->data.mode != ir_var_function_out + && sig_param->data.mode != ir_var_function_inout) { ir_rvalue *new_param = param; handle_rvalue(&new_param); if (new_param != param) diff --git a/mesalib/src/glsl/opt_constant_variable.cpp b/mesalib/src/glsl/opt_constant_variable.cpp index cbe6450c6..a026c51c3 100644 --- a/mesalib/src/glsl/opt_constant_variable.cpp +++ b/mesalib/src/glsl/opt_constant_variable.cpp @@ -137,8 +137,8 @@ ir_constant_variable_visitor::visit_enter(ir_call *ir) ir_rvalue *param_rval = (ir_rvalue *)iter.get(); ir_variable *param = (ir_variable *)sig_iter.get(); - if (param->mode == ir_var_function_out || - param->mode == ir_var_function_inout) { + if (param->data.mode == ir_var_function_out || + param->data.mode == ir_var_function_inout) { ir_variable *var = param_rval->variable_referenced(); struct assignment_entry *entry; diff --git a/mesalib/src/glsl/opt_copy_propagation.cpp b/mesalib/src/glsl/opt_copy_propagation.cpp index 7282b611e..db5dfc153 100644 --- a/mesalib/src/glsl/opt_copy_propagation.cpp +++ b/mesalib/src/glsl/opt_copy_propagation.cpp @@ -189,8 +189,8 @@ ir_copy_propagation_visitor::visit_enter(ir_call *ir) foreach_iter(exec_list_iterator, iter, ir->actual_parameters) { ir_variable *sig_param = (ir_variable *)sig_param_iter.get(); ir_instruction *ir = (ir_instruction *)iter.get(); - if (sig_param->mode != ir_var_function_out - && sig_param->mode != ir_var_function_inout) { + if (sig_param->data.mode != ir_var_function_out + && sig_param->data.mode != ir_var_function_inout) { ir->accept(this); } sig_param_iter.next(); diff --git a/mesalib/src/glsl/opt_copy_propagation_elements.cpp b/mesalib/src/glsl/opt_copy_propagation_elements.cpp index 6a19da40d..ba8a0f532 100644 --- a/mesalib/src/glsl/opt_copy_propagation_elements.cpp +++ b/mesalib/src/glsl/opt_copy_propagation_elements.cpp @@ -297,8 +297,8 @@ ir_copy_propagation_elements_visitor::visit_enter(ir_call *ir) foreach_iter(exec_list_iterator, iter, ir->actual_parameters) { ir_variable *sig_param = (ir_variable *)sig_param_iter.get(); ir_instruction *ir = (ir_instruction *)iter.get(); - if (sig_param->mode != ir_var_function_out - && sig_param->mode != ir_var_function_inout) { + if (sig_param->data.mode != ir_var_function_out + && sig_param->data.mode != ir_var_function_inout) { ir->accept(this); } sig_param_iter.next(); diff --git a/mesalib/src/glsl/opt_cse.cpp b/mesalib/src/glsl/opt_cse.cpp index 8f73940d8..a2b63ee99 100644 --- a/mesalib/src/glsl/opt_cse.cpp +++ b/mesalib/src/glsl/opt_cse.cpp @@ -193,7 +193,7 @@ is_cse_candidate_visitor::visit(ir_dereference_variable *ir) /* Currently, since we don't handle kills of the ae based on variables * getting assigned, we can only handle constant variables. */ - if (ir->var->read_only) { + if (ir->var->data.read_only) { return visit_continue; } else { ok = false; diff --git a/mesalib/src/glsl/opt_dead_builtin_varyings.cpp b/mesalib/src/glsl/opt_dead_builtin_varyings.cpp index b336bc0a8..a939a2b64 100644 --- a/mesalib/src/glsl/opt_dead_builtin_varyings.cpp +++ b/mesalib/src/glsl/opt_dead_builtin_varyings.cpp @@ -85,10 +85,10 @@ public: { ir_variable *var = ir->variable_referenced(); - if (!var || var->mode != this->mode) + if (!var || var->data.mode != this->mode) return visit_continue; - if (this->find_frag_outputs && var->location == FRAG_RESULT_DATA0) { + if (this->find_frag_outputs && var->data.location == FRAG_RESULT_DATA0) { this->fragdata_array = var; ir_constant *index = ir->array_index->as_constant(); @@ -105,7 +105,7 @@ public: return visit_continue_with_parent; } - if (!this->find_frag_outputs && var->location == VARYING_SLOT_TEX0) { + if (!this->find_frag_outputs && var->data.location == VARYING_SLOT_TEX0) { this->texcoord_array = var; ir_constant *index = ir->array_index->as_constant(); @@ -130,17 +130,17 @@ public: { ir_variable *var = ir->variable_referenced(); - if (var->mode != this->mode || !var->type->is_array()) + if (var->data.mode != this->mode || !var->type->is_array()) return visit_continue; - if (this->find_frag_outputs && var->location == FRAG_RESULT_DATA0) { + if (this->find_frag_outputs && var->data.location == FRAG_RESULT_DATA0) { /* This is a whole array dereference. */ this->fragdata_usage |= (1 << var->type->array_size()) - 1; this->lower_fragdata_array = false; return visit_continue; } - if (!this->find_frag_outputs && var->location == VARYING_SLOT_TEX0) { + if (!this->find_frag_outputs && var->data.location == VARYING_SLOT_TEX0) { /* This is a whole array dereference like "gl_TexCoord = x;", * there's probably no point in lowering that. */ @@ -152,7 +152,7 @@ public: virtual ir_visitor_status visit(ir_variable *var) { - if (var->mode != this->mode) + if (var->data.mode != this->mode) return visit_continue; /* Nothing to do here for fragment outputs. */ @@ -160,7 +160,7 @@ public: return visit_continue; /* Handle colors and fog. */ - switch (var->location) { + switch (var->data.location) { case VARYING_SLOT_COL0: this->color[0] = var; this->color_usage |= 1; @@ -358,9 +358,9 @@ public: new_var[i] = new(ctx) ir_variable(glsl_type::vec4_type, name, this->info->mode); - new_var[i]->location = start_location + i; - new_var[i]->explicit_location = true; - new_var[i]->explicit_index = 0; + new_var[i]->data.location = start_location + i; + new_var[i]->data.explicit_location = true; + new_var[i]->data.explicit_index = 0; } ir->head->insert_before(new_var[i]); diff --git a/mesalib/src/glsl/opt_dead_code.cpp b/mesalib/src/glsl/opt_dead_code.cpp index b65e5c2ce..a8d8b4a39 100644 --- a/mesalib/src/glsl/opt_dead_code.cpp +++ b/mesalib/src/glsl/opt_dead_code.cpp @@ -79,9 +79,9 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned) /* Remove a single dead assignment to the variable we found. * Don't do so if it's a shader or function output, though. */ - if (entry->var->mode != ir_var_function_out && - entry->var->mode != ir_var_function_inout && - entry->var->mode != ir_var_shader_out) { + if (entry->var->data.mode != ir_var_function_out && + entry->var->data.mode != ir_var_function_inout && + entry->var->data.mode != ir_var_shader_out) { entry->assign->remove(); progress = true; @@ -99,7 +99,7 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned) * stage. Also, once uniform locations have been assigned, the * declaration cannot be deleted. */ - if (entry->var->mode == ir_var_uniform && + if (entry->var->data.mode == ir_var_uniform && (uniform_locations_assigned || entry->var->constant_value)) continue; diff --git a/mesalib/src/glsl/opt_dead_code_local.cpp b/mesalib/src/glsl/opt_dead_code_local.cpp index 42a30b3d8..43a01662a 100644 --- a/mesalib/src/glsl/opt_dead_code_local.cpp +++ b/mesalib/src/glsl/opt_dead_code_local.cpp @@ -121,7 +121,7 @@ public: */ foreach_iter(exec_list_iterator, iter, *this->assignments) { assignment_entry *entry = (assignment_entry *)iter.get(); - if (entry->lhs->mode == ir_var_shader_out) { + if (entry->lhs->data.mode == ir_var_shader_out) { if (debug) printf("kill %s\n", entry->lhs->name); entry->remove(); diff --git a/mesalib/src/glsl/opt_flip_matrices.cpp b/mesalib/src/glsl/opt_flip_matrices.cpp index 2107b1d47..9044fd680 100644 --- a/mesalib/src/glsl/opt_flip_matrices.cpp +++ b/mesalib/src/glsl/opt_flip_matrices.cpp @@ -104,8 +104,8 @@ matrix_flipper::visit_enter(ir_expression *ir) var_ref->var = texmat_transpose; - texmat_transpose->max_array_access = - MAX2(texmat_transpose->max_array_access, mat_var->max_array_access); + texmat_transpose->data.max_array_access = + MAX2(texmat_transpose->data.max_array_access, mat_var->data.max_array_access); progress = true; } diff --git a/mesalib/src/glsl/opt_function_inlining.cpp b/mesalib/src/glsl/opt_function_inlining.cpp index f8033a095..c8f42a424 100644 --- a/mesalib/src/glsl/opt_function_inlining.cpp +++ b/mesalib/src/glsl/opt_function_inlining.cpp @@ -132,21 +132,21 @@ ir_call::generate_inline(ir_instruction *next_ir) parameters[i] = NULL; } else { parameters[i] = sig_param->clone(ctx, ht); - parameters[i]->mode = ir_var_auto; + parameters[i]->data.mode = ir_var_auto; /* Remove the read-only decoration becuase we're going to write * directly to this variable. If the cloned variable is left * read-only and the inlined function is inside a loop, the loop * analysis code will get confused. */ - parameters[i]->read_only = false; + parameters[i]->data.read_only = false; next_ir->insert_before(parameters[i]); } /* Move the actual param into our param variable if it's an 'in' type. */ - if (parameters[i] && (sig_param->mode == ir_var_function_in || - sig_param->mode == ir_var_const_in || - sig_param->mode == ir_var_function_inout)) { + if (parameters[i] && (sig_param->data.mode == ir_var_function_in || + sig_param->data.mode == ir_var_const_in || + sig_param->data.mode == ir_var_function_inout)) { ir_assignment *assign; assign = new(ctx) ir_assignment(new(ctx) ir_dereference_variable(parameters[i]), @@ -202,8 +202,8 @@ ir_call::generate_inline(ir_instruction *next_ir) const ir_variable *const sig_param = (ir_variable *) sig_param_iter.get(); /* Move our param variable into the actual param if it's an 'out' type. */ - if (parameters[i] && (sig_param->mode == ir_var_function_out || - sig_param->mode == ir_var_function_inout)) { + if (parameters[i] && (sig_param->data.mode == ir_var_function_out || + sig_param->data.mode == ir_var_function_inout)) { ir_assignment *assign; assign = new(ctx) ir_assignment(param->clone(ctx, NULL)->as_rvalue(), diff --git a/mesalib/src/glsl/opt_structure_splitting.cpp b/mesalib/src/glsl/opt_structure_splitting.cpp index 9f4b3dd8f..414f0000d 100644 --- a/mesalib/src/glsl/opt_structure_splitting.cpp +++ b/mesalib/src/glsl/opt_structure_splitting.cpp @@ -103,8 +103,8 @@ ir_structure_reference_visitor::get_variable_entry(ir_variable *var) { assert(var); - if (!var->type->is_record() || var->mode == ir_var_uniform - || var->mode == ir_var_shader_in || var->mode == ir_var_shader_out) + if (!var->type->is_record() || var->data.mode == ir_var_uniform + || var->data.mode == ir_var_shader_in || var->data.mode == ir_var_shader_out) return NULL; foreach_iter(exec_list_iterator, iter, this->variable_list) { diff --git a/mesalib/src/glsl/opt_tree_grafting.cpp b/mesalib/src/glsl/opt_tree_grafting.cpp index 46c06e6c4..6d75a1573 100644 --- a/mesalib/src/glsl/opt_tree_grafting.cpp +++ b/mesalib/src/glsl/opt_tree_grafting.cpp @@ -211,8 +211,8 @@ ir_tree_grafting_visitor::visit_enter(ir_call *ir) ir_rvalue *ir = (ir_rvalue *)iter.get(); ir_rvalue *new_ir = ir; - if (sig_param->mode != ir_var_function_in - && sig_param->mode != ir_var_const_in) { + if (sig_param->data.mode != ir_var_function_in + && sig_param->data.mode != ir_var_const_in) { if (check_graft(ir, sig_param) == visit_stop) return visit_stop; continue; @@ -361,9 +361,9 @@ tree_grafting_basic_block(ir_instruction *bb_first, if (!lhs_var) continue; - if (lhs_var->mode == ir_var_function_out || - lhs_var->mode == ir_var_function_inout || - lhs_var->mode == ir_var_shader_out) + if (lhs_var->data.mode == ir_var_function_out || + lhs_var->data.mode == ir_var_function_inout || + lhs_var->data.mode == ir_var_shader_out) continue; ir_variable_refcount_entry *entry = info->refs->get_variable_entry(lhs_var); diff --git a/mesalib/src/glsl/standalone_scaffolding.h b/mesalib/src/glsl/standalone_scaffolding.h index 7afb1c313..9f4818a8a 100644 --- a/mesalib/src/glsl/standalone_scaffolding.h +++ b/mesalib/src/glsl/standalone_scaffolding.h @@ -60,7 +60,7 @@ _mesa_shader_type_to_index(GLenum v) return MESA_SHADER_GEOMETRY; default: assert(!"bad value in _mesa_shader_type_to_index()"); - return MESA_SHADER_TYPES; + return MESA_SHADER_VERTEX; } } diff --git a/mesalib/src/mapi/glapi/gen/ARB_clear_buffer_object.xml b/mesalib/src/mapi/glapi/gen/ARB_clear_buffer_object.xml new file mode 100644 index 000000000..cb97a0185 --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/ARB_clear_buffer_object.xml @@ -0,0 +1,50 @@ +<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + + +<OpenGLAPI> + +<category name="GL_ARB_clear_buffer_object" number="121"> + + <function name ="ClearBufferData" offset="assign"> + <param name="target" type="GLenum"/> + <param name="internalformat" type="GLenum"/> + <param name="format" type="GLenum"/> + <param name="type" type="GLenum"/> + <param name="data" type="const GLvoid *"/> + </function> + + <function name ="ClearBufferSubData" offset="assign"> + <param name="target" type="GLenum"/> + <param name="internalformat" type="GLenum"/> + <param name="offset" type="GLintptr"/> + <param name="size" type="GLsizeiptr"/> + <param name="format" type="GLenum"/> + <param name="type" type="GLenum"/> + <param name="data" type="const GLvoid *"/> + </function> + +<!-- <function name="ClearNamedBufferDataEXT" offset="assign"> + <param name="buffer" type="GLuint"/> + <param name="internalformat" type="GLenum"/> + <param name="format" type="GLenum"/> + <param name="type" type="GLenum"/> + <param name="data" type="const GLvoid *"/> + </function> + + + <function name="ClearNamedBufferSubDataEXT" offset="assign"> + <param name="buffer" type="GLuint"/> + <param name="internalformat" type="GLenum"/> + <param name="offset" type="GLintptr"/> + <param name="size" type="GLsizeiptr"/> + <param name="format" type="GLenum"/> + <param name="type" type="GLenum"/> + <param name="data" type="const GLvoid *"/> + </function> --> + +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/ARB_texture_view.xml b/mesalib/src/mapi/glapi/gen/ARB_texture_view.xml new file mode 100644 index 000000000..3e6b8c904 --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/ARB_texture_view.xml @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + +<OpenGLAPI> + +<category name="GL_ARB_texture_view" number="124"> + + <function name="TextureView" offset="assign"> + <param name="texture" type="GLuint"/> + <param name="target" type="GLenum"/> + <param name="origtexture" type="GLuint"/> + <param name="internalformat" type="GLenum"/> + <param name="minlevel" type="GLuint"/> + <param name="numlevels" type="GLuint"/> + <param name="minlayer" type="GLuint"/> + <param name="numlayers" type="GLuint"/> + </function> + +</category> + +</OpenGLAPI> diff --git a/mesalib/src/mapi/glapi/gen/Makefile.am b/mesalib/src/mapi/glapi/gen/Makefile.am index 7af769acf..65bd9137c 100644 --- a/mesalib/src/mapi/glapi/gen/Makefile.am +++ b/mesalib/src/mapi/glapi/gen/Makefile.am @@ -125,6 +125,7 @@ API_XML = \ ARB_texture_rg.xml \ ARB_texture_storage_multisample.xml \ ARB_texture_storage.xml \ + ARB_texture_view.xml \ ARB_vertex_array_object.xml \ ARB_vertex_attrib_binding.xml \ AMD_draw_buffers_blend.xml \ diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml index 5c204f9a1..c51eb5f4c 100755 --- a/mesalib/src/mapi/glapi/gen/gl_API.xml +++ b/mesalib/src/mapi/glapi/gen/gl_API.xml @@ -8460,7 +8460,13 @@ </category> -<!-- ARB extensions #120...#124 --> +<!-- ARB extension #120 --> + +<xi:include href="ARB_clear_buffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> + +<!-- ARB extensions #122...#123 --> + +<xi:include href="ARB_texture_view.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> <xi:include href="ARB_vertex_attrib_binding.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> diff --git a/mesalib/src/mapi/glapi/gen/gl_genexec.py b/mesalib/src/mapi/glapi/gen/gl_genexec.py index 3ce190fe3..b557b3b99 100644 --- a/mesalib/src/mapi/glapi/gen/gl_genexec.py +++ b/mesalib/src/mapi/glapi/gen/gl_genexec.py @@ -102,6 +102,7 @@ header = """/** #include "main/texstate.h" #include "main/texstorage.h" #include "main/texturebarrier.h" +#include "main/textureview.h" #include "main/transformfeedback.h" #include "main/mtypes.h" #include "main/varray.h" diff --git a/mesalib/src/mapi/glapi/gen/gl_gentable.py b/mesalib/src/mapi/glapi/gen/gl_gentable.py index fb0228939..1c704452f 100755 --- a/mesalib/src/mapi/glapi/gen/gl_gentable.py +++ b/mesalib/src/mapi/glapi/gen/gl_gentable.py @@ -50,7 +50,9 @@ header = """/* GLXEXT is the define used in the xserver when the GLX extension i #include <execinfo.h> #endif +#ifndef _WIN32 #include <dlfcn.h> +#endif #include <stdlib.h> #include <stdio.h> diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am index a60600e03..884383652 100644 --- a/mesalib/src/mesa/Makefile.am +++ b/mesalib/src/mesa/Makefile.am @@ -103,7 +103,11 @@ noinst_PROGRAMS = gen_matypes gen_matypes_SOURCES = x86/gen_matypes.c BUILT_SOURCES += matypes.h -ARCH_LIBS = libmesa_sse41.la +ARCH_LIBS = + +if SSE41_SUPPORTED +ARCH_LIBS += libmesa_sse41.la +endif if HAVE_X86_64_ASM MESA_ASM_FILES_FOR_ARCH += $(X86_64_FILES) diff --git a/mesalib/src/mesa/Makefile.sources b/mesalib/src/mesa/Makefile.sources index a84f8a788..39525bc5b 100644 --- a/mesalib/src/mesa/Makefile.sources +++ b/mesalib/src/mesa/Makefile.sources @@ -103,6 +103,7 @@ MAIN_FILES = \ $(SRCDIR)main/texstate.c \ $(SRCDIR)main/texstorage.c \ $(SRCDIR)main/texstore.c \ + $(SRCDIR)main/textureview.c \ $(SRCDIR)main/texturebarrier.c \ $(SRCDIR)main/transformfeedback.c \ $(SRCDIR)main/uniforms.c \ diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript index a2bb9f131..bb9b304ef 100644 --- a/mesalib/src/mesa/SConscript +++ b/mesalib/src/mesa/SConscript @@ -133,6 +133,7 @@ main_sources = [ 'main/texstorage.c', 'main/texstore.c', 'main/texturebarrier.c', + 'main/textureview.c', 'main/transformfeedback.c', 'main/uniform_query.cpp', 'main/uniforms.c', diff --git a/mesalib/src/mesa/drivers/common/driverfuncs.c b/mesalib/src/mesa/drivers/common/driverfuncs.c index 5faa98af1..f18568827 100644 --- a/mesalib/src/mesa/drivers/common/driverfuncs.c +++ b/mesalib/src/mesa/drivers/common/driverfuncs.c @@ -211,6 +211,9 @@ _mesa_init_driver_functions(struct dd_function_table *driver) /* GL_ARB_texture_storage */ driver->AllocTextureStorage = _mesa_alloc_texture_storage; + /* GL_ARB_texture_view */ + driver->TextureView = NULL; + /* GL_ARB_texture_multisample */ driver->GetSamplePosition = NULL; } diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c index 379935015..652140f6a 100644 --- a/mesalib/src/mesa/drivers/dri/common/dri_util.c +++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c @@ -442,16 +442,19 @@ driCreateContextAttribs(__DRIscreen *screen, int api, return NULL; } - ctx = context->driverPrivate; + *error = __DRI_CTX_ERROR_SUCCESS; + return context; +} + +void +driContextSetFlags(struct gl_context *ctx, uint32_t flags) +{ if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0) ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT; if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) { ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT; ctx->Debug.DebugOutput = GL_TRUE; } - - *error = __DRI_CTX_ERROR_SUCCESS; - return context; } static __DRIcontext * @@ -877,3 +880,18 @@ const __DRIimageDriverExtension driImageDriverExtension = { /*.createContextAttribs =*/ driCreateContextAttribs, /*.getAPIMask =*/ driGetAPIMask, }; + +/* swrast copy sub buffer entrypoint. */ +static void driCopySubBuffer(__DRIdrawable *pdp, int x, int y, + int w, int h) +{ + assert(pdp->driScreenPriv->swrast_loader); + + pdp->driScreenPriv->driver->CopySubBuffer(pdp, x, y, w, h); +} + +/* for swrast only */ +const __DRIcopySubBufferExtension driCopySubBufferExtension = { + { __DRI_COPY_SUB_BUFFER, 1 }, + /*.copySubBuffer =*/ driCopySubBuffer, +}; diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.h b/mesalib/src/mesa/drivers/dri/common/dri_util.h index 79a8564ad..a79a4ed7a 100644 --- a/mesalib/src/mesa/drivers/dri/common/dri_util.h +++ b/mesalib/src/mesa/drivers/dri/common/dri_util.h @@ -66,7 +66,7 @@ extern const __DRIcoreExtension driCoreExtension; extern const __DRIswrastExtension driSWRastExtension; extern const __DRIdri2Extension driDRI2Extension; extern const __DRI2configQueryExtension dri2ConfigQueryExtension; - +extern const __DRIcopySubBufferExtension driCopySubBufferExtension; /** * Driver callback functions. * @@ -115,6 +115,9 @@ struct __DriverAPIRec { int width, int height); void (*ReleaseBuffer) (__DRIscreen *screenPrivate, __DRIbuffer *buffer); + + void (*CopySubBuffer)(__DRIdrawable *driDrawPriv, int x, int y, + int w, int h); }; extern const struct __DriverAPIRec driDriverAPI; @@ -289,6 +292,9 @@ dri2InvalidateDrawable(__DRIdrawable *drawable); extern void driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv); +extern void +driContextSetFlags(struct gl_context *ctx, uint32_t flags); + extern const __DRIimageDriverExtension driImageDriverExtension; #endif /* _DRI_UTIL_H_ */ diff --git a/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c b/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c index 3a33d74ab..5664af4da 100644 --- a/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c +++ b/mesalib/src/mesa/drivers/dri/common/megadriver_stub.c @@ -23,6 +23,132 @@ #include <stdio.h> #include "dri_util.h" +#include <dlfcn.h> +#include "main/macros.h" + +/* We need GNU extensions to dlfcn.h in order to provide backward + * compatibility for the older DRI driver loader mechanism. (dladdr, + * Dl_info, and RTLD_DEFAULT are only defined when _GNU_SOURCE is + * defined.) + */ +#ifdef _GNU_SOURCE + +#define MEGADRIVER_STUB_MAX_EXTENSIONS 10 +#define LIB_PATH_SUFFIX "_dri.so" +#define LIB_PATH_SUFFIX_LENGTH (sizeof(LIB_PATH_SUFFIX)-1) + +/* This is the table of extensions that the loader will dlsym() for. + * + * Initially it is empty for the megadriver stub, but the library + * constructor may initialize it based on the name of the library that + * is being loaded. + */ +PUBLIC const __DRIextension * +__driDriverExtensions[MEGADRIVER_STUB_MAX_EXTENSIONS] = { + NULL +}; + +/** + * This is a constructor function for the megadriver dynamic library. + * + * When the driver is dlopen'ed, this function will run. It will + * search for the name of the foo_dri.so file that was opened using + * the dladdr function. + * + * After finding foo's name, it will call __driDriverGetExtensions_foo + * and use the return to update __driDriverExtensions to enable + * compatibility with older DRI driver loaders. + */ +__attribute__((constructor)) static void +megadriver_stub_init(void) +{ + Dl_info info; + char *driver_name; + size_t name_len; + char *get_extensions_name; + const __DRIextension **(*get_extensions)(void); + const __DRIextension **extensions; + int i; + + /* Call dladdr on __driDriverExtensions. We are really + * interested in the returned info.dli_fname so we can + * figure out the path name of the library being loaded. + */ + i = dladdr((void*) __driDriverExtensions, &info); + if (i == 0) + return; + + /* Search for the last '/' character in the path. */ + driver_name = strrchr(info.dli_fname, '/'); + if (driver_name != NULL) { + /* Skip '/' character */ + driver_name++; + } else { + /* Try using the start of the path */ + driver_name = (char*) info.dli_fname; + } + + /* Make sure the path ends with _dri.so */ + name_len = strlen(driver_name); + i = name_len - LIB_PATH_SUFFIX_LENGTH; + if (i < 0 || strcmp(driver_name + i, LIB_PATH_SUFFIX) != 0) + return; + + /* Duplicate the string so we can modify it. + * So far we've been using info.dli_fname. + */ + driver_name = strdup(driver_name); + if (!driver_name) + return; + + /* The path ends with _dri.so. Chop this part of the + * string off. Then we'll have the driver's final name. + */ + driver_name[i] = '\0'; + + i = asprintf(&get_extensions_name, "%s_%s", + __DRI_DRIVER_GET_EXTENSIONS, driver_name); + free(driver_name); + if (i == -1) + return; + + /* dlsym to get the driver's get extensions function. We + * don't have the dlopen handle, so we have to use + * RTLD_DEFAULT. It seems unlikely that the symbol will + * be found in another library, but this isn't optimal. + */ + get_extensions = dlsym(RTLD_DEFAULT, get_extensions_name); + free(get_extensions_name); + if (!get_extensions) + return; + + /* Use the newer DRI loader entrypoint to find extensions. + * We will then expose these extensions via the older + * __driDriverExtensions symbol. + */ + extensions = get_extensions(); + + /* Copy the extensions into the __driDriverExtensions array + * we declared. + */ + for (i = 0; i < ARRAY_SIZE(__driDriverExtensions); i++) { + __driDriverExtensions[i] = extensions[i]; + if (extensions[i] == NULL) + break; + } + + /* If the driver had more extensions than we reserved, then + * bail out. + */ + if (i == ARRAY_SIZE(__driDriverExtensions)) { + __driDriverExtensions[0] = NULL; + fprintf(stderr, "Megadriver stub did not reserve enough extension " + "slots.\n"); + return; + } +} + +#endif /* _GNU_SOURCE */ static const __DRIconfig **stub_error_init_screen(__DRIscreen *psp) diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c index d0ca80fa7..1848da5d9 100755..100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c @@ -407,7 +407,7 @@ swrast_map_renderbuffer(struct gl_context *ctx, stride = w * cpp; xrb->Base.Buffer = (GLubyte*)malloc(h * stride); - sPriv->swrast_loader->getImage(dPriv, x, y, w, h, + sPriv->swrast_loader->getImage(dPriv, x, rb->Height - y - h, w, h, (char *) xrb->Base.Buffer, dPriv->loaderPrivate); @@ -710,6 +710,8 @@ dri_create_context(gl_api api, goto context_fail; } + driContextSetFlags(mesaCtx, flags); + /* do bounds checking to prevent segfaults and server crashes! */ mesaCtx->Const.CheckArrayBounds = GL_TRUE; @@ -825,6 +827,39 @@ dri_unbind_context(__DRIcontext * cPriv) return GL_TRUE; } +static void +dri_copy_sub_buffer(__DRIdrawable *dPriv, int x, int y, + int w, int h) +{ + __DRIscreen *sPriv = dPriv->driScreenPriv; + void *data; + int iy; + struct dri_drawable *drawable = dri_drawable(dPriv); + struct gl_framebuffer *fb; + struct dri_swrast_renderbuffer *frontrb, *backrb; + + TRACE; + + fb = &drawable->Base; + + frontrb = + dri_swrast_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer); + backrb = + dri_swrast_renderbuffer(fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer); + + /* check for signle-buffered */ + if (backrb == NULL) + return; + + iy = frontrb->Base.Base.Height - y - h; + data = (char *)backrb->Base.Buffer + (iy * backrb->pitch) + (x * ((backrb->bpp + 7) / 8)); + sPriv->swrast_loader->putImage2(dPriv, __DRI_SWRAST_IMAGE_OP_SWAP, + x, iy, w, h, + frontrb->pitch, + data, + dPriv->loaderPrivate); +} + static const struct __DriverAPIRec swrast_driver_api = { /*.InitScreen = */dri_init_screen, @@ -836,6 +871,7 @@ static const struct __DriverAPIRec swrast_driver_api = { /*.SwapBuffers = */dri_swap_buffers, /*.MakeCurrent = */dri_make_current, /*.UnbindContext = */dri_unbind_context, + /*.CopySubBuffer = */dri_copy_sub_buffer, /*.AllocateBuffer = */NULL, /*.ReleaseBuffer = */NULL }; @@ -848,6 +884,7 @@ static const struct __DRIDriverVtableExtensionRec swrast_vtable = { static const __DRIextension *swrast_driver_extensions[] = { &driCoreExtension.base, &driSWRastExtension.base, + &driCopySubBufferExtension.base, &swrast_vtable.base, NULL }; diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c index c9332bd52..30c815d67 100644 --- a/mesalib/src/mesa/main/attrib.c +++ b/mesalib/src/mesa/main/attrib.c @@ -182,7 +182,7 @@ struct texture_state * Allocate new attribute node of given type/kind. Attach payload data. * Insert it into the linked list named by 'head'. */ -static void +static bool save_attrib_data(struct gl_attrib_node **head, GLbitfield kind, void *payload) { @@ -196,7 +196,42 @@ save_attrib_data(struct gl_attrib_node **head, } else { /* out of memory! */ + return false; + } + return true; +} + + +/** + * Helper function for_mesa_PushAttrib for simple attributes. + * Allocates memory for attribute data and copies the given attribute data. + * \param head head of linked list to insert attribute data into + * \param attr_bit one of the GL_<attrib>_BIT flags + * \param attr_size number of bytes to allocate for attribute data + * \param attr_data the attribute data to copy + * \return true for success, false for out of memory + */ +static bool +push_attrib(struct gl_context *ctx, struct gl_attrib_node **head, + GLbitfield attr_bit, GLuint attr_size, const void *attr_data) +{ + void *attribute; + + attribute = MALLOC(attr_size); + if (attribute == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); + return false; + } + + if (save_attrib_data(head, attr_bit, attribute)) { + memcpy(attribute, attr_data, attr_size); } + else { + FREE(attribute); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); + return false; + } + return true; } @@ -220,42 +255,58 @@ _mesa_PushAttrib(GLbitfield mask) head = NULL; if (mask & GL_ACCUM_BUFFER_BIT) { - struct gl_accum_attrib *attr; - attr = MALLOC_STRUCT( gl_accum_attrib ); - memcpy( attr, &ctx->Accum, sizeof(struct gl_accum_attrib) ); - save_attrib_data(&head, GL_ACCUM_BUFFER_BIT, attr); + if (!push_attrib(ctx, &head, GL_ACCUM_BUFFER_BIT, + sizeof(struct gl_accum_attrib), + (void*)&ctx->Accum)) + goto end; } if (mask & GL_COLOR_BUFFER_BIT) { GLuint i; struct gl_colorbuffer_attrib *attr; attr = MALLOC_STRUCT( gl_colorbuffer_attrib ); - memcpy( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) ); - /* push the Draw FBO's DrawBuffer[] state, not ctx->Color.DrawBuffer[] */ - for (i = 0; i < ctx->Const.MaxDrawBuffers; i ++) - attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i]; - save_attrib_data(&head, GL_COLOR_BUFFER_BIT, attr); + if (attr == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); + goto end; + } + + if (save_attrib_data(&head, GL_COLOR_BUFFER_BIT, attr)) { + memcpy(attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib)); + /* push the Draw FBO's DrawBuffer[] state, not ctx->Color.DrawBuffer[] */ + for (i = 0; i < ctx->Const.MaxDrawBuffers; i ++) + attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i]; + } + else { + FREE(attr); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); + goto end; + } } if (mask & GL_CURRENT_BIT) { - struct gl_current_attrib *attr; - FLUSH_CURRENT( ctx, 0 ); - attr = MALLOC_STRUCT( gl_current_attrib ); - memcpy( attr, &ctx->Current, sizeof(struct gl_current_attrib) ); - save_attrib_data(&head, GL_CURRENT_BIT, attr); + FLUSH_CURRENT(ctx, 0); + if (!push_attrib(ctx, &head, GL_CURRENT_BIT, + sizeof(struct gl_current_attrib), + (void*)&ctx->Current)) + goto end; } if (mask & GL_DEPTH_BUFFER_BIT) { - struct gl_depthbuffer_attrib *attr; - attr = MALLOC_STRUCT( gl_depthbuffer_attrib ); - memcpy( attr, &ctx->Depth, sizeof(struct gl_depthbuffer_attrib) ); - save_attrib_data(&head, GL_DEPTH_BUFFER_BIT, attr); + if (!push_attrib(ctx, &head, GL_DEPTH_BUFFER_BIT, + sizeof(struct gl_depthbuffer_attrib), + (void*)&ctx->Depth)) + goto end; } if (mask & GL_ENABLE_BIT) { struct gl_enable_attrib *attr; GLuint i; attr = MALLOC_STRUCT( gl_enable_attrib ); + if (attr == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); + goto end; + } + /* Copy enable flags from all other attributes into the enable struct. */ attr->AlphaTest = ctx->Color.AlphaEnabled; attr->AutoNormal = ctx->Eval.AutoNormal; @@ -322,97 +373,112 @@ _mesa_PushAttrib(GLbitfield mask) /* GL_ARB_fragment_program */ attr->FragmentProgram = ctx->FragmentProgram.Enabled; - save_attrib_data(&head, GL_ENABLE_BIT, attr); + if (!save_attrib_data(&head, GL_ENABLE_BIT, attr)) { + FREE(attr); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); + goto end; + } /* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */ attr->sRGBEnabled = ctx->Color.sRGBEnabled; } if (mask & GL_EVAL_BIT) { - struct gl_eval_attrib *attr; - attr = MALLOC_STRUCT( gl_eval_attrib ); - memcpy( attr, &ctx->Eval, sizeof(struct gl_eval_attrib) ); - save_attrib_data(&head, GL_EVAL_BIT, attr); + if (!push_attrib(ctx, &head, GL_EVAL_BIT, + sizeof(struct gl_eval_attrib), + (void*)&ctx->Eval)) + goto end; } if (mask & GL_FOG_BIT) { - struct gl_fog_attrib *attr; - attr = MALLOC_STRUCT( gl_fog_attrib ); - memcpy( attr, &ctx->Fog, sizeof(struct gl_fog_attrib) ); - save_attrib_data(&head, GL_FOG_BIT, attr); + if (!push_attrib(ctx, &head, GL_FOG_BIT, + sizeof(struct gl_fog_attrib), + (void*)&ctx->Fog)) + goto end; } if (mask & GL_HINT_BIT) { - struct gl_hint_attrib *attr; - attr = MALLOC_STRUCT( gl_hint_attrib ); - memcpy( attr, &ctx->Hint, sizeof(struct gl_hint_attrib) ); - save_attrib_data(&head, GL_HINT_BIT, attr); + if (!push_attrib(ctx, &head, GL_HINT_BIT, + sizeof(struct gl_hint_attrib), + (void*)&ctx->Hint)) + goto end; } if (mask & GL_LIGHTING_BIT) { - struct gl_light_attrib *attr; - FLUSH_CURRENT(ctx, 0); /* flush material changes */ - attr = MALLOC_STRUCT( gl_light_attrib ); - memcpy( attr, &ctx->Light, sizeof(struct gl_light_attrib) ); - save_attrib_data(&head, GL_LIGHTING_BIT, attr); + FLUSH_CURRENT(ctx, 0); /* flush material changes */ + if (!push_attrib(ctx, &head, GL_LIGHTING_BIT, + sizeof(struct gl_light_attrib), + (void*)&ctx->Light)) + goto end; } if (mask & GL_LINE_BIT) { - struct gl_line_attrib *attr; - attr = MALLOC_STRUCT( gl_line_attrib ); - memcpy( attr, &ctx->Line, sizeof(struct gl_line_attrib) ); - save_attrib_data(&head, GL_LINE_BIT, attr); + if (!push_attrib(ctx, &head, GL_LINE_BIT, + sizeof(struct gl_line_attrib), + (void*)&ctx->Line)) + goto end; } if (mask & GL_LIST_BIT) { - struct gl_list_attrib *attr; - attr = MALLOC_STRUCT( gl_list_attrib ); - memcpy( attr, &ctx->List, sizeof(struct gl_list_attrib) ); - save_attrib_data(&head, GL_LIST_BIT, attr); + if (!push_attrib(ctx, &head, GL_LIST_BIT, + sizeof(struct gl_list_attrib), + (void*)&ctx->List)) + goto end; } if (mask & GL_PIXEL_MODE_BIT) { struct gl_pixel_attrib *attr; attr = MALLOC_STRUCT( gl_pixel_attrib ); - memcpy( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) ); - /* push the Read FBO's ReadBuffer state, not ctx->Pixel.ReadBuffer */ - attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer; - save_attrib_data(&head, GL_PIXEL_MODE_BIT, attr); + if (attr == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); + goto end; + } + + if (save_attrib_data(&head, GL_PIXEL_MODE_BIT, attr)) { + memcpy(attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib)); + /* push the Read FBO's ReadBuffer state, not ctx->Pixel.ReadBuffer */ + attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer; + } + else { + FREE(attr); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib"); + goto end; + } } if (mask & GL_POINT_BIT) { - struct gl_point_attrib *attr; - attr = MALLOC_STRUCT( gl_point_attrib ); - memcpy( attr, &ctx->Point, sizeof(struct gl_point_attrib) ); - save_attrib_data(&head, GL_POINT_BIT, attr); + if (!push_attrib(ctx, &head, GL_POINT_BIT, + sizeof(struct gl_point_attrib), + (void*)&ctx->Point)) + goto end; } if (mask & GL_POLYGON_BIT) { - struct gl_polygon_attrib *attr; - attr = MALLOC_STRUCT( gl_polygon_attrib ); - memcpy( attr, &ctx->Polygon, sizeof(struct gl_polygon_attrib) ); - save_attrib_data(&head, GL_POLYGON_BIT, attr); + if (!push_attrib(ctx, &head, GL_POLYGON_BIT, + sizeof(struct gl_polygon_attrib), + (void*)&ctx->Polygon)) + goto end; } if (mask & GL_POLYGON_STIPPLE_BIT) { - GLuint *stipple; - stipple = malloc( 32*sizeof(GLuint) ); - memcpy( stipple, ctx->PolygonStipple, 32*sizeof(GLuint) ); - save_attrib_data(&head, GL_POLYGON_STIPPLE_BIT, stipple); + if (!push_attrib(ctx, &head, GL_POLYGON_STIPPLE_BIT, + sizeof(ctx->PolygonStipple), + (void*)&ctx->PolygonStipple)) + goto end; } if (mask & GL_SCISSOR_BIT) { - struct gl_scissor_attrib *attr; - attr = MALLOC_STRUCT( gl_scissor_attrib ); - memcpy( attr, &ctx->Scissor, sizeof(struct gl_scissor_attrib) ); - save_attrib_data(&head, GL_SCISSOR_BIT, attr); + if (!push_attrib(ctx, &head, GL_SCISSOR_BIT, + sizeof(struct gl_scissor_attrib), + (void*)&ctx->Scissor)) + goto end; } if (mask & GL_STENCIL_BUFFER_BIT) { - struct gl_stencil_attrib *attr; - attr = MALLOC_STRUCT( gl_stencil_attrib ); - memcpy( attr, &ctx->Stencil, sizeof(struct gl_stencil_attrib) ); - save_attrib_data(&head, GL_STENCIL_BUFFER_BIT, attr); + if (!push_attrib(ctx, &head, GL_STENCIL_BUFFER_BIT, + sizeof(struct gl_stencil_attrib), + (void*)&ctx->Stencil)) + goto end; } if (mask & GL_TEXTURE_BIT) { @@ -424,6 +490,12 @@ _mesa_PushAttrib(GLbitfield mask) goto end; } + if (!save_attrib_data(&head, GL_TEXTURE_BIT, texstate)) { + FREE(texstate); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)"); + goto end; + } + _mesa_lock_context_textures(ctx); /* copy/save the bulk of texture state here */ @@ -450,35 +522,35 @@ _mesa_PushAttrib(GLbitfield mask) _mesa_reference_shared_state(ctx, &texstate->SharedRef, ctx->Shared); _mesa_unlock_context_textures(ctx); - - save_attrib_data(&head, GL_TEXTURE_BIT, texstate); } if (mask & GL_TRANSFORM_BIT) { - struct gl_transform_attrib *attr; - attr = MALLOC_STRUCT( gl_transform_attrib ); - memcpy( attr, &ctx->Transform, sizeof(struct gl_transform_attrib) ); - save_attrib_data(&head, GL_TRANSFORM_BIT, attr); + if (!push_attrib(ctx, &head, GL_TRANSFORM_BIT, + sizeof(struct gl_transform_attrib), + (void*)&ctx->Transform)) + goto end; } if (mask & GL_VIEWPORT_BIT) { - struct gl_viewport_attrib *attr; - attr = MALLOC_STRUCT( gl_viewport_attrib ); - memcpy( attr, &ctx->Viewport, sizeof(struct gl_viewport_attrib) ); - save_attrib_data(&head, GL_VIEWPORT_BIT, attr); + if (!push_attrib(ctx, &head, GL_VIEWPORT_BIT, + sizeof(struct gl_viewport_attrib), + (void*)&ctx->Viewport)) + goto end; } /* GL_ARB_multisample */ if (mask & GL_MULTISAMPLE_BIT_ARB) { - struct gl_multisample_attrib *attr; - attr = MALLOC_STRUCT( gl_multisample_attrib ); - memcpy( attr, &ctx->Multisample, sizeof(struct gl_multisample_attrib) ); - save_attrib_data(&head, GL_MULTISAMPLE_BIT_ARB, attr); + if (!push_attrib(ctx, &head, GL_MULTISAMPLE_BIT_ARB, + sizeof(struct gl_multisample_attrib), + (void*)&ctx->Multisample)) + goto end; } end: - ctx->AttribStack[ctx->AttribStackDepth] = head; - ctx->AttribStackDepth++; + if (head != NULL) { + ctx->AttribStack[ctx->AttribStackDepth] = head; + ctx->AttribStackDepth++; + } } @@ -641,12 +713,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP, !!(enabled & TEXTURE_CUBE_BIT)); } - if (ctx->Extensions.MESA_texture_array) { - _mesa_set_enable(ctx, GL_TEXTURE_1D_ARRAY_EXT, - !!(enabled & TEXTURE_1D_ARRAY_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT, - !!(enabled & TEXTURE_2D_ARRAY_BIT)); - } } if (ctx->Texture.Unit[i].TexGenEnabled != genEnabled) { @@ -688,12 +754,6 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate) _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_NV, !!(unit->Enabled & TEXTURE_RECT_BIT)); } - if (ctx->Extensions.MESA_texture_array) { - _mesa_set_enable(ctx, GL_TEXTURE_1D_ARRAY_EXT, - !!(unit->Enabled & TEXTURE_1D_ARRAY_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT, - !!(unit->Enabled & TEXTURE_2D_ARRAY_BIT)); - } _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode); _mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor); _mesa_TexGeni(GL_S, GL_TEXTURE_GEN_MODE, unit->GenS.Mode); @@ -768,7 +828,7 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate) } else if ((obj->Target == GL_TEXTURE_1D_ARRAY_EXT || obj->Target == GL_TEXTURE_2D_ARRAY_EXT) && - !ctx->Extensions.MESA_texture_array) { + !ctx->Extensions.EXT_texture_array) { continue; } else if (obj->Target == GL_TEXTURE_CUBE_MAP_ARRAY && @@ -1482,13 +1542,20 @@ restore_array_attrib(struct gl_context *ctx, * init/alloc the fields of 'attrib'. * Needs to the init part matching free_array_attrib_data below. */ -static void +static bool init_array_attrib_data(struct gl_context *ctx, struct gl_array_attrib *attrib) { /* Get a non driver gl_array_object. */ attrib->ArrayObj = CALLOC_STRUCT( gl_array_object ); + + if (attrib->ArrayObj == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib"); + return false; + } + _mesa_initialize_array_object(ctx, attrib->ArrayObj, 0); + return true; } /** @@ -1529,24 +1596,65 @@ _mesa_PushClientAttrib(GLbitfield mask) struct gl_pixelstore_attrib *attr; /* packing attribs */ attr = CALLOC_STRUCT( gl_pixelstore_attrib ); - copy_pixelstore(ctx, attr, &ctx->Pack); - save_attrib_data(&head, GL_CLIENT_PACK_BIT, attr); + if (attr == NULL) { + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" ); + goto end; + } + if (save_attrib_data(&head, GL_CLIENT_PACK_BIT, attr)) { + copy_pixelstore(ctx, attr, &ctx->Pack); + } + else { + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" ); + FREE(attr); + goto end; + } + /* unpacking attribs */ attr = CALLOC_STRUCT( gl_pixelstore_attrib ); - copy_pixelstore(ctx, attr, &ctx->Unpack); - save_attrib_data(&head, GL_CLIENT_UNPACK_BIT, attr); + if (attr == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib"); + goto end; + } + + if (save_attrib_data(&head, GL_CLIENT_UNPACK_BIT, attr)) { + copy_pixelstore(ctx, attr, &ctx->Unpack); + } + else { + _mesa_error( ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib" ); + FREE(attr); + goto end; + } } if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) { struct gl_array_attrib *attr; attr = CALLOC_STRUCT( gl_array_attrib ); - init_array_attrib_data(ctx, attr); - save_array_attrib(ctx, attr, &ctx->Array); - save_attrib_data(&head, GL_CLIENT_VERTEX_ARRAY_BIT, attr); - } + if (attr == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib"); + goto end; + } - ctx->ClientAttribStack[ctx->ClientAttribStackDepth] = head; - ctx->ClientAttribStackDepth++; + if (!init_array_attrib_data(ctx, attr)) { + FREE(attr); + goto end; + } + + if (save_attrib_data(&head, GL_CLIENT_VERTEX_ARRAY_BIT, attr)) { + save_array_attrib(ctx, attr, &ctx->Array); + } + else { + free_array_attrib_data(ctx, attr); + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushClientAttrib"); + FREE(attr); + /* goto to keep safe from possible later changes */ + goto end; + } + } +end: + if (head != NULL) { + ctx->ClientAttribStack[ctx->ClientAttribStackDepth] = head; + ctx->ClientAttribStackDepth++; + } } diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index 3127a8247..45ddeaba9 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -41,6 +41,9 @@ #include "fbobject.h" #include "mtypes.h" #include "texobj.h" +#include "teximage.h" +#include "glformats.h" +#include "texstore.h" #include "transformfeedback.h" #include "dispatch.h" @@ -124,11 +127,13 @@ get_buffer_target(struct gl_context *ctx, GLenum target) * Get the buffer object bound to the specified target in a GL context. * \param ctx the GL context * \param target the buffer object target to be retrieved. + * \param error the GL error to record if target is illegal. * \return pointer to the buffer object bound to \c target in the * specified context or \c NULL if \c target is invalid. */ static inline struct gl_buffer_object * -get_buffer(struct gl_context *ctx, const char *func, GLenum target) +get_buffer(struct gl_context *ctx, const char *func, GLenum target, + GLenum error) { struct gl_buffer_object **bufObj = get_buffer_target(ctx, target); @@ -138,7 +143,7 @@ get_buffer(struct gl_context *ctx, const char *func, GLenum target) } if (!_mesa_is_bufferobj(*bufObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(buffer 0)", func); + _mesa_error(ctx, error, "%s(no buffer bound)", func); return NULL; } @@ -186,25 +191,58 @@ simplified_access_mode(struct gl_context *ctx, GLbitfield access) /** + * Test if the buffer is mapped, and if so, if the mapped range overlaps the + * given range. + * The regions do not overlap if and only if the end of the given + * region is before the mapped region or the start of the given region + * is after the mapped region. + * + * \param obj Buffer object target on which to operate. + * \param offset Offset of the first byte of the subdata range. + * \param size Size, in bytes, of the subdata range. + * \return true if ranges overlap, false otherwise + * + */ +static bool +bufferobj_range_mapped(const struct gl_buffer_object *obj, + GLintptr offset, GLsizeiptr size) +{ + if (_mesa_bufferobj_mapped(obj)) { + const GLintptr end = offset + size; + const GLintptr mapEnd = obj->Offset + obj->Length; + + if (!(end <= obj->Offset || offset >= mapEnd)) { + return true; + } + } + return false; +} + + +/** * Tests the subdata range parameters and sets the GL error code for - * \c glBufferSubDataARB and \c glGetBufferSubDataARB. + * \c glBufferSubDataARB, \c glGetBufferSubDataARB and + * \c glClearBufferSubData. * * \param ctx GL context. * \param target Buffer object target on which to operate. * \param offset Offset of the first byte of the subdata range. * \param size Size, in bytes, of the subdata range. + * \param mappedRange If true, checks if an overlapping range is mapped. + * If false, checks if buffer is mapped. + * \param errorNoBuffer Error code if no buffer is bound to target. * \param caller Name of calling function for recording errors. * \return A pointer to the buffer object bound to \c target in the * specified context or \c NULL if any of the parameter or state - * conditions for \c glBufferSubDataARB or \c glGetBufferSubDataARB - * are invalid. + * conditions are invalid. * - * \sa glBufferSubDataARB, glGetBufferSubDataARB + * \sa glBufferSubDataARB, glGetBufferSubDataARB, glClearBufferSubData */ static struct gl_buffer_object * -buffer_object_subdata_range_good( struct gl_context * ctx, GLenum target, - GLintptrARB offset, GLsizeiptrARB size, - const char *caller ) +buffer_object_subdata_range_good(struct gl_context * ctx, GLenum target, + GLintptrARB offset, GLsizeiptrARB size, + bool mappedRange, GLenum errorNoBuffer, + const char *caller) { struct gl_buffer_object *bufObj; @@ -218,22 +256,30 @@ buffer_object_subdata_range_good( struct gl_context * ctx, GLenum target, return NULL; } - bufObj = get_buffer(ctx, caller, target); + bufObj = get_buffer(ctx, caller, target, errorNoBuffer); if (!bufObj) return NULL; if (offset + size > bufObj->Size) { _mesa_error(ctx, GL_INVALID_VALUE, - "%s(offset %lu + size %lu > buffer size %lu)", caller, + "%s(offset %lu + size %lu > buffer size %lu)", caller, (unsigned long) offset, (unsigned long) size, (unsigned long) bufObj->Size); return NULL; } - if (_mesa_bufferobj_mapped(bufObj)) { - /* Buffer is currently mapped */ - _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller); - return NULL; + + if (mappedRange) { + if (bufferobj_range_mapped(bufObj, offset, size)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller); + return NULL; + } + } + else { + if (_mesa_bufferobj_mapped(bufObj)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "%s", caller); + return NULL; + } } return bufObj; @@ -241,6 +287,98 @@ buffer_object_subdata_range_good( struct gl_context * ctx, GLenum target, /** + * Test the format and type parameters and set the GL error code for + * \c glClearBufferData and \c glClearBufferSubData. + * + * \param ctx GL context. + * \param internalformat Format to which the data is to be converted. + * \param format Format of the supplied data. + * \param type Type of the supplied data. + * \param caller Name of calling function for recording errors. + * \return If internalformat, format and type are legal the gl_format + * corresponding to internalformat, otherwise MESA_FORMAT_NONE. + * + * \sa glClearBufferData and glClearBufferSubData + */ +static gl_format +validate_clear_buffer_format(struct gl_context *ctx, + GLenum internalformat, + GLenum format, GLenum type, + const char *caller) +{ + gl_format mesaFormat; + GLenum errorFormatType; + + mesaFormat = _mesa_validate_texbuffer_format(ctx, internalformat); + if (mesaFormat == MESA_FORMAT_NONE) { + _mesa_error(ctx, GL_INVALID_ENUM, + "%s(invalid internalformat)", caller); + return MESA_FORMAT_NONE; + } + + /* NOTE: not mentioned in ARB_clear_buffer_object but according to + * EXT_texture_integer there is no conversion between integer and + * non-integer formats + */ + if (_mesa_is_enum_format_signed_int(format) != + _mesa_is_format_integer_color(mesaFormat)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "%s(integer vs non-integer)", caller); + return MESA_FORMAT_NONE; + } + + if (!_mesa_is_color_format(format)) { + _mesa_error(ctx, GL_INVALID_ENUM, + "%s(format is not a color format)", caller); + return MESA_FORMAT_NONE; + } + + errorFormatType = _mesa_error_check_format_and_type(ctx, format, type); + if (errorFormatType != GL_NO_ERROR) { + _mesa_error(ctx, GL_INVALID_ENUM, + "%s(invalid format or type)", caller); + return MESA_FORMAT_NONE; + } + + return mesaFormat; +} + + +/** + * Convert user-specified clear value to the specified internal format. + * + * \param ctx GL context. + * \param internalformat Format to which the data is converted. + * \param clearValue Points to the converted clear value. + * \param format Format of the supplied data. + * \param type Type of the supplied data. + * \param data Data which is to be converted to internalformat. + * \param caller Name of calling function for recording errors. + * \return true if data could be converted, false otherwise. + * + * \sa glClearBufferData, glClearBufferSubData + */ +static bool +convert_clear_buffer_data(struct gl_context *ctx, + gl_format internalformat, + GLubyte *clearValue, GLenum format, GLenum type, + const GLvoid *data, const char *caller) +{ + GLenum internalformatBase = _mesa_get_format_base_format(internalformat); + + if (_mesa_texstore(ctx, 1, internalformatBase, internalformat, + 0, &clearValue, 1, 1, 1, + format, type, data, &ctx->Unpack)) { + return true; + } + else { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", caller); + return false; + } +} + + +/** * Allocate and initialize a new buffer object. * * Default callback for the \c dd_function_table::NewBufferObject() hook. @@ -505,6 +643,82 @@ _mesa_buffer_get_subdata( struct gl_context *ctx, GLintptrARB offset, /** + * Clear a subrange of the buffer object with copies of the supplied data. + * If data is NULL the buffer is filled with zeros. + * + * This is the default callback for \c dd_function_table::ClearBufferSubData() + * Note that all GL error checking will have been done already. + * + * \param ctx GL context. + * \param offset Offset of the first byte to be cleared. + * \param size Size, in bytes, of the to be cleared range. + * \param clearValue Source of the data. + * \param clearValueSize Size, in bytes, of the supplied data. + * \param bufObj Object to be cleared. + * + * \sa glClearBufferSubData, glClearBufferData and + * dd_function_table::ClearBufferSubData. + */ +static void +_mesa_buffer_clear_subdata(struct gl_context *ctx, + GLintptr offset, GLsizeiptr size, + const GLvoid *clearValue, + GLsizeiptr clearValueSize, + struct gl_buffer_object *bufObj) +{ + GLsizeiptr i; + GLubyte *dest; + + if (_mesa_bufferobj_mapped(bufObj)) { + GLubyte *data = malloc(size); + GLubyte *dataStart = data; + if (data == NULL) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glClearBuffer[Sub]Data"); + return; + } + + if (clearValue == NULL) { + /* Clear with zeros, per the spec */ + memset(data, 0, size); + } + else { + for (i = 0; i < size/clearValueSize; ++i) { + memcpy(data, clearValue, clearValueSize); + data += clearValueSize; + } + } + ctx->Driver.BufferSubData(ctx, offset, size, dataStart, bufObj); + return; + } + + ASSERT(ctx->Driver.MapBufferRange); + dest = ctx->Driver.MapBufferRange(ctx, offset, size, + GL_MAP_WRITE_BIT | + GL_MAP_INVALIDATE_RANGE_BIT, + bufObj); + + if (!dest) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glClearBuffer[Sub]Data"); + return; + } + + if (clearValue == NULL) { + /* Clear with zeros, per the spec */ + memset(dest, 0, size); + ctx->Driver.UnmapBuffer(ctx, bufObj); + return; + } + + for (i = 0; i < size/clearValueSize; ++i) { + memcpy(dest, clearValue, clearValueSize); + dest += clearValueSize; + } + + ctx->Driver.UnmapBuffer(ctx, bufObj); +} + + +/** * Default fallback for \c dd_function_table::MapBufferRange(). * Called via glMapBufferRange(). */ @@ -810,6 +1024,9 @@ _mesa_init_buffer_object_functions(struct dd_function_table *driver) driver->GetBufferSubData = _mesa_buffer_get_subdata; driver->UnmapBuffer = _mesa_buffer_unmap; + /* GL_ARB_clear_buffer_object */ + driver->ClearBufferSubData = _mesa_buffer_clear_subdata; + /* GL_ARB_map_buffer_range */ driver->MapBufferRange = _mesa_buffer_map_range; driver->FlushMappedBufferRange = _mesa_buffer_flush_mapped_range; @@ -1064,7 +1281,7 @@ _mesa_BufferData(GLenum target, GLsizeiptrARB size, return; } - bufObj = get_buffer(ctx, "glBufferDataARB", target); + bufObj = get_buffer(ctx, "glBufferDataARB", target, GL_INVALID_OPERATION); if (!bufObj) return; @@ -1103,6 +1320,7 @@ _mesa_BufferSubData(GLenum target, GLintptrARB offset, struct gl_buffer_object *bufObj; bufObj = buffer_object_subdata_range_good( ctx, target, offset, size, + false, GL_INVALID_OPERATION, "glBufferSubDataARB" ); if (!bufObj) { /* error already recorded */ @@ -1126,8 +1344,9 @@ _mesa_GetBufferSubData(GLenum target, GLintptrARB offset, GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object *bufObj; - bufObj = buffer_object_subdata_range_good( ctx, target, offset, size, - "glGetBufferSubDataARB" ); + bufObj = buffer_object_subdata_range_good(ctx, target, offset, size, + false, GL_INVALID_OPERATION, + "glGetBufferSubDataARB"); if (!bufObj) { /* error already recorded */ return; @@ -1138,6 +1357,111 @@ _mesa_GetBufferSubData(GLenum target, GLintptrARB offset, } +void GLAPIENTRY +_mesa_ClearBufferData(GLenum target, GLenum internalformat, GLenum format, + GLenum type, const GLvoid* data) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object* bufObj; + gl_format mesaFormat; + GLubyte clearValue[MAX_PIXEL_BYTES]; + GLsizeiptr clearValueSize; + + bufObj = get_buffer(ctx, "glClearBufferData", target, GL_INVALID_VALUE); + if (!bufObj) { + return; + } + + if (_mesa_bufferobj_mapped(bufObj)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glClearBufferData(buffer currently mapped)"); + return; + } + + mesaFormat = validate_clear_buffer_format(ctx, internalformat, + format, type, + "glClearBufferData"); + if (mesaFormat == MESA_FORMAT_NONE) { + return; + } + + clearValueSize = _mesa_get_format_bytes(mesaFormat); + if (bufObj->Size % clearValueSize != 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glClearBufferData(size is not a multiple of " + "internalformat size)"); + return; + } + + if (data == NULL) { + /* clear to zeros, per the spec */ + ctx->Driver.ClearBufferSubData(ctx, 0, bufObj->Size, + NULL, 0, bufObj); + return; + } + + if (!convert_clear_buffer_data(ctx, mesaFormat, clearValue, + format, type, data, "glClearBufferData")) { + return; + } + + ctx->Driver.ClearBufferSubData(ctx, 0, bufObj->Size, + clearValue, clearValueSize, bufObj); +} + + +void GLAPIENTRY +_mesa_ClearBufferSubData(GLenum target, GLenum internalformat, + GLintptr offset, GLsizeiptr size, + GLenum format, GLenum type, + const GLvoid* data) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object* bufObj; + gl_format mesaFormat; + GLubyte clearValue[MAX_PIXEL_BYTES]; + GLsizeiptr clearValueSize; + + bufObj = buffer_object_subdata_range_good(ctx, target, offset, size, + true, GL_INVALID_VALUE, + "glClearBufferSubData"); + if (!bufObj) { + return; + } + + mesaFormat = validate_clear_buffer_format(ctx, internalformat, + format, type, + "glClearBufferSubData"); + if (mesaFormat == MESA_FORMAT_NONE) { + return; + } + + clearValueSize = _mesa_get_format_bytes(mesaFormat); + if (offset % clearValueSize != 0 || size % clearValueSize != 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glClearBufferSubData(offset or size is not a multiple of " + "internalformat size)"); + return; + } + + if (data == NULL) { + /* clear to zeros, per the spec */ + ctx->Driver.ClearBufferSubData(ctx, offset, size, + NULL, 0, bufObj); + return; + } + + if (!convert_clear_buffer_data(ctx, mesaFormat, clearValue, + format, type, data, + "glClearBufferSubData")) { + return; + } + + ctx->Driver.ClearBufferSubData(ctx, offset, size, + clearValue, clearValueSize, bufObj); +} + + void * GLAPIENTRY _mesa_MapBuffer(GLenum target, GLenum access) { @@ -1172,7 +1496,7 @@ _mesa_MapBuffer(GLenum target, GLenum access) return NULL; } - bufObj = get_buffer(ctx, "glMapBufferARB", target); + bufObj = get_buffer(ctx, "glMapBufferARB", target, GL_INVALID_OPERATION); if (!bufObj) return NULL; @@ -1241,7 +1565,7 @@ _mesa_UnmapBuffer(GLenum target) GLboolean status = GL_TRUE; ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - bufObj = get_buffer(ctx, "glUnmapBufferARB", target); + bufObj = get_buffer(ctx, "glUnmapBufferARB", target, GL_INVALID_OPERATION); if (!bufObj) return GL_FALSE; @@ -1302,7 +1626,8 @@ _mesa_GetBufferParameteriv(GLenum target, GLenum pname, GLint *params) GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object *bufObj; - bufObj = get_buffer(ctx, "glGetBufferParameterivARB", target); + bufObj = get_buffer(ctx, "glGetBufferParameterivARB", target, + GL_INVALID_OPERATION); if (!bufObj) return; @@ -1355,7 +1680,8 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params) GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object *bufObj; - bufObj = get_buffer(ctx, "glGetBufferParameteri64v", target); + bufObj = get_buffer(ctx, "glGetBufferParameteri64v", target, + GL_INVALID_OPERATION); if (!bufObj) return; @@ -1408,7 +1734,8 @@ _mesa_GetBufferPointerv(GLenum target, GLenum pname, GLvoid **params) return; } - bufObj = get_buffer(ctx, "glGetBufferPointervARB", target); + bufObj = get_buffer(ctx, "glGetBufferPointervARB", target, + GL_INVALID_OPERATION); if (!bufObj) return; @@ -1424,11 +1751,13 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object *src, *dst; - src = get_buffer(ctx, "glCopyBufferSubData", readTarget); + src = get_buffer(ctx, "glCopyBufferSubData", readTarget, + GL_INVALID_OPERATION); if (!src) return; - dst = get_buffer(ctx, "glCopyBufferSubData", writeTarget); + dst = get_buffer(ctx, "glCopyBufferSubData", writeTarget, + GL_INVALID_OPERATION); if (!dst) return; @@ -1572,7 +1901,7 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, return NULL; } - bufObj = get_buffer(ctx, "glMapBufferRange", target); + bufObj = get_buffer(ctx, "glMapBufferRange", target, GL_INVALID_OPERATION); if (!bufObj) return NULL; @@ -1651,7 +1980,8 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) return; } - bufObj = get_buffer(ctx, "glFlushMappedBufferRange", target); + bufObj = get_buffer(ctx, "glFlushMappedBufferRange", target, + GL_INVALID_OPERATION); if (!bufObj) return; @@ -2331,23 +2661,11 @@ _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset, * mapped by MapBuffer, or if the invalidate range intersects the range * currently mapped by MapBufferRange." */ - if (_mesa_bufferobj_mapped(bufObj)) { - const GLintptr mapEnd = bufObj->Offset + bufObj->Length; - - /* The regions do not overlap if and only if the end of the discard - * region is before the mapped region or the start of the discard region - * is after the mapped region. - * - * Note that 'end' and 'mapEnd' are the first byte *after* the discard - * region and the mapped region, repsectively. It is okay for that byte - * to be mapped (for 'end') or discarded (for 'mapEnd'). - */ - if (!(end <= bufObj->Offset || offset >= mapEnd)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glInvalidateBufferSubData(intersection with mapped " - "range)"); - return; - } + if (bufferobj_range_mapped(bufObj, offset, length)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glInvalidateBufferSubData(intersection with mapped " + "range)"); + return; } /* We don't actually do anything for this yet. Just return after diff --git a/mesalib/src/mesa/main/bufferobj.h b/mesalib/src/mesa/main/bufferobj.h index 0b898a21b..71988b0d9 100644 --- a/mesalib/src/mesa/main/bufferobj.h +++ b/mesalib/src/mesa/main/bufferobj.h @@ -57,10 +57,10 @@ _mesa_is_bufferobj(const struct gl_buffer_object *obj) extern void -_mesa_init_buffer_objects( struct gl_context *ctx ); +_mesa_init_buffer_objects(struct gl_context *ctx); extern void -_mesa_free_buffer_objects( struct gl_context *ctx ); +_mesa_free_buffer_objects(struct gl_context *ctx); extern bool _mesa_handle_bind_buffer_gen(struct gl_context *ctx, @@ -77,9 +77,9 @@ extern struct gl_buffer_object * _mesa_lookup_bufferobj(struct gl_context *ctx, GLuint buffer); extern void -_mesa_initialize_buffer_object( struct gl_context *ctx, - struct gl_buffer_object *obj, - GLuint name, GLenum target ); +_mesa_initialize_buffer_object(struct gl_context *ctx, + struct gl_buffer_object *obj, + GLuint name, GLenum target); extern void _mesa_reference_buffer_object_(struct gl_context *ctx, @@ -105,55 +105,90 @@ _mesa_init_buffer_object_functions(struct dd_function_table *driver); /* * API functions */ - void GLAPIENTRY _mesa_BindBuffer(GLenum target, GLuint buffer); + void GLAPIENTRY _mesa_DeleteBuffers(GLsizei n, const GLuint * buffer); + void GLAPIENTRY _mesa_GenBuffers(GLsizei n, GLuint * buffer); + GLboolean GLAPIENTRY _mesa_IsBuffer(GLuint buffer); + void GLAPIENTRY -_mesa_BufferData(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); +_mesa_BufferData(GLenum target, GLsizeiptrARB size, + const GLvoid * data, GLenum usage); + void GLAPIENTRY -_mesa_BufferSubData(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); +_mesa_BufferSubData(GLenum target, GLintptrARB offset, + GLsizeiptrARB size, const GLvoid * data); + void GLAPIENTRY -_mesa_GetBufferSubData(GLenum target, GLintptrARB offset, GLsizeiptrARB size, void * data); +_mesa_GetBufferSubData(GLenum target, GLintptrARB offset, + GLsizeiptrARB size, void * data); + +void GLAPIENTRY +_mesa_ClearBufferData(GLenum target, GLenum internalformat, + GLenum format, GLenum type, + const GLvoid * data); + +void GLAPIENTRY +_mesa_ClearBufferSubData(GLenum target, GLenum internalformat, + GLintptr offset, GLsizeiptr size, + GLenum format, GLenum type, + const GLvoid * data); + void * GLAPIENTRY _mesa_MapBuffer(GLenum target, GLenum access); + GLboolean GLAPIENTRY _mesa_UnmapBuffer(GLenum target); + void GLAPIENTRY _mesa_GetBufferParameteriv(GLenum target, GLenum pname, GLint *params); + void GLAPIENTRY _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params); + void GLAPIENTRY _mesa_GetBufferPointerv(GLenum target, GLenum pname, GLvoid **params); + void GLAPIENTRY _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); + void * GLAPIENTRY _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); + void GLAPIENTRY -_mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length); +_mesa_FlushMappedBufferRange(GLenum target, + GLintptr offset, GLsizeiptr length); + GLenum GLAPIENTRY _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option); + GLenum GLAPIENTRY _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option); + void GLAPIENTRY -_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, - GLint* params); +_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, + GLenum pname, GLint* params); + void GLAPIENTRY _mesa_BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); + void GLAPIENTRY _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer); + void GLAPIENTRY _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length); + void GLAPIENTRY _mesa_InvalidateBufferData(GLuint buffer); diff --git a/mesalib/src/mesa/main/clear.c b/mesalib/src/mesa/main/clear.c index 304d135d1..f0b525fa0 100644 --- a/mesalib/src/mesa/main/clear.c +++ b/mesalib/src/mesa/main/clear.c @@ -219,7 +219,25 @@ make_color_buffer_mask(struct gl_context *ctx, GLint drawbuffer) const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment; GLbitfield mask = 0x0; - switch (drawbuffer) { + /* From the GL 4.0 specification: + * If buffer is COLOR, a particular draw buffer DRAW_BUFFERi is + * specified by passing i as the parameter drawbuffer, and value + * points to a four-element vector specifying the R, G, B, and A + * color to clear that draw buffer to. If the draw buffer is one + * of FRONT, BACK, LEFT, RIGHT, or FRONT_AND_BACK, identifying + * multiple buffers, each selected buffer is cleared to the same + * value. + * + * Note that "drawbuffer" and "draw buffer" have different meaning. + * "drawbuffer" specifies DRAW_BUFFERi, while "draw buffer" is what's + * assigned to DRAW_BUFFERi. It could be COLOR_ATTACHMENT0, FRONT, BACK, + * etc. + */ + if (drawbuffer < 0 || drawbuffer >= (GLint)ctx->Const.MaxDrawBuffers) { + return INVALID_MASK; + } + + switch (ctx->DrawBuffer->ColorDrawBuffer[drawbuffer]) { case GL_FRONT: if (att[BUFFER_FRONT_LEFT].Renderbuffer) mask |= BUFFER_BIT_FRONT_LEFT; @@ -255,11 +273,12 @@ make_color_buffer_mask(struct gl_context *ctx, GLint drawbuffer) mask |= BUFFER_BIT_BACK_RIGHT; break; default: - if (drawbuffer < 0 || drawbuffer >= (GLint)ctx->Const.MaxDrawBuffers) { - mask = INVALID_MASK; - } - else if (att[BUFFER_COLOR0 + drawbuffer].Renderbuffer) { - mask |= (BUFFER_BIT_COLOR0 << drawbuffer); + { + GLuint buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[drawbuffer]; + + if (buf >= 0 && att[buf].Renderbuffer) { + mask |= 1 << buf; + } } } diff --git a/mesalib/src/mesa/main/colortab.c b/mesalib/src/mesa/main/colortab.c index 81e92d71c..a8edb03dd 100644 --- a/mesalib/src/mesa/main/colortab.c +++ b/mesalib/src/mesa/main/colortab.c @@ -44,7 +44,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, const GLvoid *data ) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glColorTable"); } @@ -55,7 +55,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start, const GLvoid *data ) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glColorSubTable"); } @@ -65,7 +65,7 @@ _mesa_CopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyColorTable(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyColorTable"); } @@ -75,7 +75,7 @@ _mesa_CopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyColorSubTable(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyColorSubTable"); } @@ -85,7 +85,7 @@ _mesa_GetnColorTableARB( GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data ) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glGetnColorTableARB(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetnColorTableARB"); } @@ -94,7 +94,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, GLenum type, GLvoid *data ) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetColorTable"); } @@ -103,7 +103,7 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params) { /* no extensions use this function */ GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glColorTableParameterfv"); } @@ -113,7 +113,7 @@ _mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params) { /* no extensions use this function */ GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameteriv(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glColorTableParameteriv"); } @@ -122,7 +122,7 @@ void GLAPIENTRY _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params ) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameterfv(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetColorTableParameterfv"); } @@ -131,5 +131,5 @@ void GLAPIENTRY _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params ) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameteriv(target)"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetColorTableParameteriv"); } diff --git a/mesalib/src/mesa/main/condrender.c b/mesalib/src/mesa/main/condrender.c index 3d9b0eca1..2632f7a1a 100644 --- a/mesalib/src/mesa/main/condrender.c +++ b/mesalib/src/mesa/main/condrender.c @@ -72,7 +72,9 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode) } ASSERT(q->Id == queryId); - if (q->Target != GL_SAMPLES_PASSED || q->Active) { + if ((q->Target != GL_SAMPLES_PASSED && + q->Target != GL_ANY_SAMPLES_PASSED && + q->Target != GL_ANY_SAMPLES_PASSED_CONSERVATIVE) || q->Active) { _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()"); return; } diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index 50c2f385a..4db27da9a 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -1194,6 +1194,7 @@ _mesa_free_context_data( struct gl_context *ctx ) _mesa_free_sync_data(ctx); _mesa_free_varray_data(ctx); _mesa_free_transform_feedback(ctx); + _mesa_free_performance_monitors(ctx); _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL); _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, NULL); diff --git a/mesalib/src/mesa/main/convolve.c b/mesalib/src/mesa/main/convolve.c index f44031a9b..b13b89535 100644 --- a/mesalib/src/mesa/main/convolve.c +++ b/mesalib/src/mesa/main/convolve.c @@ -45,7 +45,7 @@ _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, G { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter1D"); } void GLAPIENTRY @@ -53,7 +53,7 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionFilter2D"); } @@ -62,7 +62,7 @@ _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameterf"); } @@ -71,7 +71,7 @@ _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameterfv"); } @@ -80,7 +80,7 @@ _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameteri"); } @@ -89,7 +89,7 @@ _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glConvolutionParameteriv"); } @@ -98,7 +98,7 @@ _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLi { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyConvolutionFilter1D"); } @@ -107,7 +107,7 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyConvolutionFilter2D"); } @@ -134,7 +134,7 @@ _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionParameterfv"); } @@ -143,7 +143,7 @@ _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetConvolutionParameteriv"); } @@ -155,7 +155,7 @@ _mesa_GetnSeparableFilterARB(GLenum target, GLenum format, GLenum type, { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glGetSeparableFilter"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetSeparableFilter"); } @@ -173,5 +173,5 @@ _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLs { GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glSeparableFilter2D"); } diff --git a/mesalib/src/mesa/main/dd.h b/mesalib/src/mesa/main/dd.h index b5b874f47..6e73691ea 100644 --- a/mesalib/src/mesa/main/dd.h +++ b/mesalib/src/mesa/main/dd.h @@ -375,6 +375,11 @@ struct dd_function_table { GLsizei levels, GLsizei width, GLsizei height, GLsizei depth); + /** Called as part of glTextureView to add views to origTexObj */ + GLboolean (*TextureView)(struct gl_context *ctx, + struct gl_texture_object *texObj, + struct gl_texture_object *origTexObj); + /** * Map a renderbuffer into user space. * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and @@ -569,6 +574,12 @@ struct dd_function_table { GLintptrARB offset, GLsizeiptrARB size, GLvoid *data, struct gl_buffer_object *obj ); + void (*ClearBufferSubData)( struct gl_context *ctx, + GLintptr offset, GLsizeiptr size, + const GLvoid *clearValue, + GLsizeiptr clearValueSize, + struct gl_buffer_object *obj ); + void (*CopyBufferSubData)( struct gl_context *ctx, struct gl_buffer_object *src, struct gl_buffer_object *dst, diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c index 595641915..cb40ff4db 100644 --- a/mesalib/src/mesa/main/dlist.c +++ b/mesalib/src/mesa/main/dlist.c @@ -209,18 +209,6 @@ typedef enum OPCODE_COLOR_MASK, OPCODE_COLOR_MASK_INDEXED, OPCODE_COLOR_MATERIAL, - OPCODE_COLOR_TABLE, - OPCODE_COLOR_TABLE_PARAMETER_FV, - OPCODE_COLOR_TABLE_PARAMETER_IV, - OPCODE_COLOR_SUB_TABLE, - OPCODE_CONVOLUTION_FILTER_1D, - OPCODE_CONVOLUTION_FILTER_2D, - OPCODE_CONVOLUTION_PARAMETER_I, - OPCODE_CONVOLUTION_PARAMETER_IV, - OPCODE_CONVOLUTION_PARAMETER_F, - OPCODE_CONVOLUTION_PARAMETER_FV, - OPCODE_COPY_COLOR_SUB_TABLE, - OPCODE_COPY_COLOR_TABLE, OPCODE_COPY_PIXELS, OPCODE_COPY_TEX_IMAGE1D, OPCODE_COPY_TEX_IMAGE2D, @@ -243,7 +231,6 @@ typedef enum OPCODE_FRONT_FACE, OPCODE_FRUSTUM, OPCODE_HINT, - OPCODE_HISTOGRAM, OPCODE_INDEX_MASK, OPCODE_INIT_NAMES, OPCODE_LIGHT, @@ -260,7 +247,6 @@ typedef enum OPCODE_MAPGRID1, OPCODE_MAPGRID2, OPCODE_MATRIX_MODE, - OPCODE_MIN_MAX, OPCODE_MULT_MATRIX, OPCODE_ORTHO, OPCODE_PASSTHROUGH, @@ -281,8 +267,6 @@ typedef enum OPCODE_PUSH_NAME, OPCODE_RASTER_POS, OPCODE_READ_BUFFER, - OPCODE_RESET_HISTOGRAM, - OPCODE_RESET_MIN_MAX, OPCODE_ROTATE, OPCODE_SCALE, OPCODE_SCISSOR, @@ -486,6 +470,10 @@ typedef enum * Each instruction in the display list is stored as a sequence of * contiguous nodes in memory. * Each node is the union of a variety of data types. + * + * Note, all of these members should be 4 bytes in size or less for the + * sake of compact display lists. We store 8-byte pointers in a pair of + * these nodes using the save/get_pointer() functions below. */ union gl_dlist_node { @@ -500,14 +488,61 @@ union gl_dlist_node GLenum e; GLfloat f; GLsizei si; - GLvoid *data; - void *next; /* If prev node's opcode==OPCODE_CONTINUE */ }; typedef union gl_dlist_node Node; +/** How many 4-byte dwords to store a pointer */ +#define POINTER_DWORDS (sizeof(void *) / 4) + +/* We want to keep sizeof(union gl_dlist_node) == 4 to minimize + * space for display lists. The following types and functions are + * used to help store 4- and 8-byte pointers in 1 or 2 dlist_nodes. + */ +union pointer +{ + void *ptr; + GLuint dwords[POINTER_DWORDS]; +}; + + +/** + * Save a 4 or 8-byte pointer at dest (and dest+1). + */ +static inline void +save_pointer(union gl_dlist_node *dest, void *src) +{ + union pointer p; + unsigned i; + + STATIC_ASSERT(POINTER_DWORDS == 1 || POINTER_DWORDS == 2); + STATIC_ASSERT(sizeof(union gl_dlist_node) == 4); + + p.ptr = src; + + for (i = 0; i < POINTER_DWORDS; i++) + dest[i].ui = p.dwords[i]; +} + + +/** + * Retrieve a 4 or 8-byte pointer from node (node+1). + */ +static inline void * +get_pointer(const union gl_dlist_node *node) +{ + union pointer p; + unsigned i; + + for (i = 0; i < POINTER_DWORDS; i++) + p.dwords[i] = node[i].ui; + + return p.ptr; +} + + /** * Used to store a 64-bit uint in a pair of "Nodes" for the sake of 32-bit * environment. In 64-bit env, sizeof(Node)==8 anyway. @@ -520,9 +555,9 @@ union uint64_pair /** - * How many nodes to allocate at a time. - * - * \note Reduced now that we hold vertices etc. elsewhere. + * How many nodes to allocate at a time. Note that bulk vertex data + * from glBegin/glVertex/glEnd primitives will typically wind up in + * a VBO, and not directly in the display list itself. */ #define BLOCK_SIZE 256 @@ -538,14 +573,9 @@ static GLuint InstSize[OPCODE_END_OF_LIST + 1]; void mesa_print_display_list(GLuint list); -/**********************************************************************/ -/***** Private *****/ -/**********************************************************************/ - - /** - * Make an empty display list. This is used by glGenLists() to - * reserve display list IDs. + * Allocate a gl_display_list object with an initial block of storage. + * \param count how many display list nodes/tokes to allocate */ static struct gl_display_list * make_list(GLuint name, GLuint count) @@ -637,91 +667,75 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) switch (opcode) { /* for some commands, we need to free malloc'd memory */ case OPCODE_MAP1: - free(n[6].data); + free(get_pointer(&n[6])); n += InstSize[n[0].opcode]; break; case OPCODE_MAP2: - free(n[10].data); + free(get_pointer(&n[10])); n += InstSize[n[0].opcode]; break; case OPCODE_DRAW_PIXELS: - free(n[5].data); + free(get_pointer(&n[5])); n += InstSize[n[0].opcode]; break; case OPCODE_BITMAP: - free(n[7].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COLOR_TABLE: - free(n[6].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COLOR_SUB_TABLE: - free(n[6].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_CONVOLUTION_FILTER_1D: - free(n[6].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_CONVOLUTION_FILTER_2D: - free(n[7].data); + free(get_pointer(&n[7])); n += InstSize[n[0].opcode]; break; case OPCODE_POLYGON_STIPPLE: - free(n[1].data); + free(get_pointer(&n[1])); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_IMAGE1D: - free(n[8].data); + free(get_pointer(&n[8])); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_IMAGE2D: - free(n[9].data); + free(get_pointer(&n[9])); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_IMAGE3D: - free(n[10].data); + free(get_pointer(&n[10])); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_SUB_IMAGE1D: - free(n[7].data); + free(get_pointer(&n[7])); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_SUB_IMAGE2D: - free(n[9].data); + free(get_pointer(&n[9])); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_SUB_IMAGE3D: - free(n[11].data); + free(get_pointer(&n[11])); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_IMAGE_1D: - free(n[7].data); + free(get_pointer(&n[7])); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_IMAGE_2D: - free(n[8].data); + free(get_pointer(&n[8])); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_IMAGE_3D: - free(n[9].data); + free(get_pointer(&n[9])); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: - free(n[7].data); + free(get_pointer(&n[7])); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: - free(n[9].data); + free(get_pointer(&n[9])); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: - free(n[11].data); + free(get_pointer(&n[11])); n += InstSize[n[0].opcode]; break; case OPCODE_PROGRAM_STRING_ARB: - free(n[4].data); /* program string */ + free(get_pointer(&n[4])); /* program string */ n += InstSize[n[0].opcode]; break; case OPCODE_UNIFORM_1FV: @@ -736,7 +750,7 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) case OPCODE_UNIFORM_2UIV: case OPCODE_UNIFORM_3UIV: case OPCODE_UNIFORM_4UIV: - free(n[3].data); + free(get_pointer(&n[3])); n += InstSize[n[0].opcode]; break; case OPCODE_UNIFORM_MATRIX22: @@ -748,12 +762,15 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) case OPCODE_UNIFORM_MATRIX32: case OPCODE_UNIFORM_MATRIX34: case OPCODE_UNIFORM_MATRIX43: - free(n[4].data); + free(get_pointer(&n[4])); n += InstSize[n[0].opcode]; break; + case OPCODE_PIXEL_MAP: + free(get_pointer(&n[3])); + break; case OPCODE_CONTINUE: - n = (Node *) n[1].next; + n = (Node *) get_pointer(&n[1]); free(block); block = n; break; @@ -852,12 +869,6 @@ translate_id(GLsizei n, GLenum type, const GLvoid * list) } - - -/**********************************************************************/ -/***** Public *****/ -/**********************************************************************/ - /** * Wrapper for _mesa_unpack_image/bitmap() that handles pixel buffer objects. * If width < 0 or height < 0 or format or type are invalid we'll just @@ -929,6 +940,18 @@ unpack_image(struct gl_context *ctx, GLuint dimensions, return NULL; } + +/** Return copy of memory */ +static void * +memdup(const void *src, GLsizei bytes) +{ + void *b = bytes >= 0 ? malloc(bytes) : NULL; + if (b) + memcpy(b, src, bytes); + return b; +} + + /** * Allocate space for a display list instruction (opcode + payload space). * \param opcode the instruction opcode (OPCODE_* value) @@ -939,6 +962,7 @@ static Node * dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes) { const GLuint numNodes = 1 + (bytes + sizeof(Node) - 1) / sizeof(Node); + const GLuint contNodes = 1 + POINTER_DWORDS; /* size of continue info */ Node *n; if (opcode < (GLuint) OPCODE_EXT_0) { @@ -952,7 +976,7 @@ dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes) } } - if (ctx->ListState.CurrentPos + numNodes + 2 > BLOCK_SIZE) { + if (ctx->ListState.CurrentPos + numNodes + contNodes > BLOCK_SIZE) { /* This block is full. Allocate a new block and chain to it */ Node *newblock; n = ctx->ListState.CurrentBlock + ctx->ListState.CurrentPos; @@ -962,7 +986,7 @@ dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes) _mesa_error(ctx, GL_OUT_OF_MEMORY, "Building display list"); return NULL; } - n[1].next = (Node *) newblock; + save_pointer(&n[1], newblock); ctx->ListState.CurrentBlock = newblock; ctx->ListState.CurrentPos = 0; } @@ -1043,6 +1067,37 @@ alloc_instruction(struct gl_context *ctx, OpCode opcode, GLuint nparams) } +/** + * Called by EndList to try to reduce memory used for the list. + */ +static void +trim_list(struct gl_context *ctx) +{ + /* If the list we're ending only has one allocated block of nodes/tokens + * and its size isn't a full block size, realloc the block to use less + * memory. This is important for apps that create many small display + * lists and apps that use glXUseXFont (many lists each containing one + * glBitmap call). + * Note: we currently only trim display lists that allocated one block + * of tokens. That hits the short list case which is what we're mainly + * concerned with. Trimming longer lists would involve traversing the + * linked list of blocks. + */ + struct gl_dlist_state *list = &ctx->ListState; + + if ((list->CurrentList->Head == list->CurrentBlock) && + (list->CurrentPos < BLOCK_SIZE)) { + /* There's only one block and it's not full, so realloc */ + GLuint newSize = list->CurrentPos * sizeof(Node); + list->CurrentList->Head = + list->CurrentBlock = realloc(list->CurrentBlock, newSize); + if (!list->CurrentBlock) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glEndList"); + } + } +} + + /* * Display List compilation functions @@ -1106,7 +1161,7 @@ save_Bitmap(GLsizei width, GLsizei height, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BITMAP, 7); + n = alloc_instruction(ctx, OPCODE_BITMAP, 6 + POINTER_DWORDS); if (n) { n[1].i = (GLint) width; n[2].i = (GLint) height; @@ -1114,8 +1169,9 @@ save_Bitmap(GLsizei width, GLsizei height, n[4].f = yorig; n[5].f = xmove; n[6].f = ymove; - n[7].data = unpack_image(ctx, 2, width, height, 1, GL_COLOR_INDEX, - GL_BITMAP, pixels, &ctx->Unpack); + save_pointer(&n[7], + unpack_image(ctx, 2, width, height, 1, GL_COLOR_INDEX, + GL_BITMAP, pixels, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_Bitmap(ctx->Exec, (width, height, @@ -1735,313 +1791,6 @@ save_ColorMaterial(GLenum face, GLenum mode) static void GLAPIENTRY -save_ColorTable(GLenum target, GLenum internalFormat, - GLsizei width, GLenum format, GLenum type, - const GLvoid * table) -{ - GET_CURRENT_CONTEXT(ctx); - if (_mesa_is_proxy_texture(target)) { - /* execute immediately */ - CALL_ColorTable(ctx->Exec, (target, internalFormat, width, - format, type, table)); - } - else { - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COLOR_TABLE, 6); - if (n) { - n[1].e = target; - n[2].e = internalFormat; - n[3].i = width; - n[4].e = format; - n[5].e = type; - n[6].data = unpack_image(ctx, 1, width, 1, 1, format, type, table, - &ctx->Unpack); - } - if (ctx->ExecuteFlag) { - CALL_ColorTable(ctx->Exec, (target, internalFormat, width, - format, type, table)); - } - } -} - - - -static void GLAPIENTRY -save_ColorTableParameterfv(GLenum target, GLenum pname, - const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].f = params[0]; - if (pname == GL_COLOR_TABLE_SGI || - pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI || - pname == GL_TEXTURE_COLOR_TABLE_SGI) { - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - } - - if (ctx->ExecuteFlag) { - CALL_ColorTableParameterfv(ctx->Exec, (target, pname, params)); - } -} - - -static void GLAPIENTRY -save_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].i = params[0]; - if (pname == GL_COLOR_TABLE_SGI || - pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI || - pname == GL_TEXTURE_COLOR_TABLE_SGI) { - n[4].i = params[1]; - n[5].i = params[2]; - n[6].i = params[3]; - } - } - - if (ctx->ExecuteFlag) { - CALL_ColorTableParameteriv(ctx->Exec, (target, pname, params)); - } -} - - - -static void GLAPIENTRY -save_ColorSubTable(GLenum target, GLsizei start, GLsizei count, - GLenum format, GLenum type, const GLvoid * table) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COLOR_SUB_TABLE, 6); - if (n) { - n[1].e = target; - n[2].i = start; - n[3].i = count; - n[4].e = format; - n[5].e = type; - n[6].data = unpack_image(ctx, 1, count, 1, 1, format, type, table, - &ctx->Unpack); - } - if (ctx->ExecuteFlag) { - CALL_ColorSubTable(ctx->Exec, - (target, start, count, format, type, table)); - } -} - - -static void GLAPIENTRY -save_CopyColorSubTable(GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5); - if (n) { - n[1].e = target; - n[2].i = start; - n[3].i = x; - n[4].i = y; - n[5].i = width; - } - if (ctx->ExecuteFlag) { - CALL_CopyColorSubTable(ctx->Exec, (target, start, x, y, width)); - } -} - - -static void GLAPIENTRY -save_CopyColorTable(GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COPY_COLOR_TABLE, 5); - if (n) { - n[1].e = target; - n[2].e = internalformat; - n[3].i = x; - n[4].i = y; - n[5].i = width; - } - if (ctx->ExecuteFlag) { - CALL_CopyColorTable(ctx->Exec, (target, internalformat, x, y, width)); - } -} - - -static void GLAPIENTRY -save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, - GLenum format, GLenum type, const GLvoid * filter) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6); - if (n) { - n[1].e = target; - n[2].e = internalFormat; - n[3].i = width; - n[4].e = format; - n[5].e = type; - n[6].data = unpack_image(ctx, 1, width, 1, 1, format, type, filter, - &ctx->Unpack); - } - if (ctx->ExecuteFlag) { - CALL_ConvolutionFilter1D(ctx->Exec, (target, internalFormat, width, - format, type, filter)); - } -} - - -static void GLAPIENTRY -save_ConvolutionFilter2D(GLenum target, GLenum internalFormat, - GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid * filter) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7); - if (n) { - n[1].e = target; - n[2].e = internalFormat; - n[3].i = width; - n[4].i = height; - n[5].e = format; - n[6].e = type; - n[7].data = unpack_image(ctx, 2, width, height, 1, format, type, filter, - &ctx->Unpack); - } - if (ctx->ExecuteFlag) { - CALL_ConvolutionFilter2D(ctx->Exec, - (target, internalFormat, width, height, format, - type, filter)); - } -} - - -static void GLAPIENTRY -save_ConvolutionParameteri(GLenum target, GLenum pname, GLint param) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].i = param; - } - if (ctx->ExecuteFlag) { - CALL_ConvolutionParameteri(ctx->Exec, (target, pname, param)); - } -} - - -static void GLAPIENTRY -save_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].i = params[0]; - if (pname == GL_CONVOLUTION_BORDER_COLOR || - pname == GL_CONVOLUTION_FILTER_SCALE || - pname == GL_CONVOLUTION_FILTER_BIAS) { - n[4].i = params[1]; - n[5].i = params[2]; - n[6].i = params[3]; - } - else { - n[4].i = n[5].i = n[6].i = 0; - } - } - if (ctx->ExecuteFlag) { - CALL_ConvolutionParameteriv(ctx->Exec, (target, pname, params)); - } -} - - -static void GLAPIENTRY -save_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].f = param; - } - if (ctx->ExecuteFlag) { - CALL_ConvolutionParameterf(ctx->Exec, (target, pname, param)); - } -} - - -static void GLAPIENTRY -save_ConvolutionParameterfv(GLenum target, GLenum pname, - const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6); - if (n) { - n[1].e = target; - n[2].e = pname; - n[3].f = params[0]; - if (pname == GL_CONVOLUTION_BORDER_COLOR || - pname == GL_CONVOLUTION_FILTER_SCALE || - pname == GL_CONVOLUTION_FILTER_BIAS) { - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - else { - n[4].f = n[5].f = n[6].f = 0.0F; - } - } - if (ctx->ExecuteFlag) { - CALL_ConvolutionParameterfv(ctx->Exec, (target, pname, params)); - } -} - - -static void GLAPIENTRY save_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) { GET_CURRENT_CONTEXT(ctx); @@ -2314,14 +2063,15 @@ save_DrawPixels(GLsizei width, GLsizei height, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_DRAW_PIXELS, 5); + n = alloc_instruction(ctx, OPCODE_DRAW_PIXELS, 4 + POINTER_DWORDS); if (n) { n[1].i = width; n[2].i = height; n[3].e = format; n[4].e = type; - n[5].data = unpack_image(ctx, 2, width, height, 1, format, type, - pixels, &ctx->Unpack); + save_pointer(&n[5], + unpack_image(ctx, 2, width, height, 1, format, type, + pixels, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_DrawPixels(ctx->Exec, (width, height, format, type, pixels)); @@ -2530,27 +2280,6 @@ save_Hint(GLenum target, GLenum mode) static void GLAPIENTRY -save_Histogram(GLenum target, GLsizei width, GLenum internalFormat, - GLboolean sink) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_HISTOGRAM, 4); - if (n) { - n[1].e = target; - n[2].i = width; - n[3].e = internalFormat; - n[4].b = sink; - } - if (ctx->ExecuteFlag) { - CALL_Histogram(ctx->Exec, (target, width, internalFormat, sink)); - } -} - - -static void GLAPIENTRY save_IndexMask(GLuint mask) { GET_CURRENT_CONTEXT(ctx); @@ -2890,7 +2619,7 @@ save_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_MAP1, 6); + n = alloc_instruction(ctx, OPCODE_MAP1, 5 + POINTER_DWORDS); if (n) { GLfloat *pnts = _mesa_copy_map_points1d(target, stride, order, points); n[1].e = target; @@ -2898,7 +2627,7 @@ save_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, n[3].f = (GLfloat) u2; n[4].i = _mesa_evaluator_components(target); /* stride */ n[5].i = order; - n[6].data = (void *) pnts; + save_pointer(&n[6], pnts); } if (ctx->ExecuteFlag) { CALL_Map1d(ctx->Exec, (target, u1, u2, stride, order, points)); @@ -2912,7 +2641,7 @@ save_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_MAP1, 6); + n = alloc_instruction(ctx, OPCODE_MAP1, 5 + POINTER_DWORDS); if (n) { GLfloat *pnts = _mesa_copy_map_points1f(target, stride, order, points); n[1].e = target; @@ -2920,7 +2649,7 @@ save_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, n[3].f = u2; n[4].i = _mesa_evaluator_components(target); /* stride */ n[5].i = order; - n[6].data = (void *) pnts; + save_pointer(&n[6], pnts); } if (ctx->ExecuteFlag) { CALL_Map1f(ctx->Exec, (target, u1, u2, stride, order, points)); @@ -2937,7 +2666,7 @@ save_Map2d(GLenum target, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_MAP2, 10); + n = alloc_instruction(ctx, OPCODE_MAP2, 9 + POINTER_DWORDS); if (n) { GLfloat *pnts = _mesa_copy_map_points2d(target, ustride, uorder, vstride, vorder, points); @@ -2951,7 +2680,7 @@ save_Map2d(GLenum target, n[7].i = _mesa_evaluator_components(target); /*vstride */ n[8].i = uorder; n[9].i = vorder; - n[10].data = (void *) pnts; + save_pointer(&n[10], pnts); } if (ctx->ExecuteFlag) { CALL_Map2d(ctx->Exec, (target, @@ -2970,7 +2699,7 @@ save_Map2f(GLenum target, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_MAP2, 10); + n = alloc_instruction(ctx, OPCODE_MAP2, 9 + POINTER_DWORDS); if (n) { GLfloat *pnts = _mesa_copy_map_points2f(target, ustride, uorder, vstride, vorder, points); @@ -2984,7 +2713,7 @@ save_Map2f(GLenum target, n[7].i = _mesa_evaluator_components(target); /*vstride */ n[8].i = uorder; n[9].i = vorder; - n[10].data = (void *) pnts; + save_pointer(&n[10], pnts); } if (ctx->ExecuteFlag) { CALL_Map2f(ctx->Exec, (target, u1, u2, ustride, uorder, @@ -3067,25 +2796,6 @@ save_MatrixMode(GLenum mode) static void GLAPIENTRY -save_Minmax(GLenum target, GLenum internalFormat, GLboolean sink) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_MIN_MAX, 3); - if (n) { - n[1].e = target; - n[2].e = internalFormat; - n[3].b = sink; - } - if (ctx->ExecuteFlag) { - CALL_Minmax(ctx->Exec, (target, internalFormat, sink)); - } -} - - -static void GLAPIENTRY save_MultMatrixf(const GLfloat * m) { GET_CURRENT_CONTEXT(ctx); @@ -3156,12 +2866,11 @@ save_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PIXEL_MAP, 3); + n = alloc_instruction(ctx, OPCODE_PIXEL_MAP, 2 + POINTER_DWORDS); if (n) { n[1].e = map; n[2].i = mapsize; - n[3].data = malloc(mapsize * sizeof(GLfloat)); - memcpy(n[3].data, (void *) values, mapsize * sizeof(GLfloat)); + save_pointer(&n[3], memdup(values, mapsize * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_PixelMapfv(ctx->Exec, (map, mapsize, values)); @@ -3336,10 +3045,11 @@ save_PolygonStipple(const GLubyte * pattern) ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_POLYGON_STIPPLE, 1); + n = alloc_instruction(ctx, OPCODE_POLYGON_STIPPLE, POINTER_DWORDS); if (n) { - n[1].data = unpack_image(ctx, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, - pattern, &ctx->Unpack); + save_pointer(&n[1], + unpack_image(ctx, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, + pattern, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_PolygonStipple(ctx->Exec, ((GLubyte *) pattern)); @@ -3667,38 +3377,6 @@ save_ReadBuffer(GLenum mode) static void GLAPIENTRY -save_ResetHistogram(GLenum target) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_RESET_HISTOGRAM, 1); - if (n) { - n[1].e = target; - } - if (ctx->ExecuteFlag) { - CALL_ResetHistogram(ctx->Exec, (target)); - } -} - - -static void GLAPIENTRY -save_ResetMinmax(GLenum target) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_RESET_MIN_MAX, 1); - if (n) { - n[1].e = target; - } - if (ctx->ExecuteFlag) { - CALL_ResetMinmax(ctx->Exec, (target)); - } -} - - -static void GLAPIENTRY save_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { GET_CURRENT_CONTEXT(ctx); @@ -4140,7 +3818,7 @@ save_TexImage1D(GLenum target, else { Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_TEX_IMAGE1D, 8); + n = alloc_instruction(ctx, OPCODE_TEX_IMAGE1D, 7 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4149,8 +3827,9 @@ save_TexImage1D(GLenum target, n[5].i = border; n[6].e = format; n[7].e = type; - n[8].data = unpack_image(ctx, 1, width, 1, 1, format, type, - pixels, &ctx->Unpack); + save_pointer(&n[8], + unpack_image(ctx, 1, width, 1, 1, format, type, + pixels, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_TexImage1D(ctx->Exec, (target, level, components, width, @@ -4175,7 +3854,7 @@ save_TexImage2D(GLenum target, else { Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_TEX_IMAGE2D, 9); + n = alloc_instruction(ctx, OPCODE_TEX_IMAGE2D, 8 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4185,8 +3864,9 @@ save_TexImage2D(GLenum target, n[6].i = border; n[7].e = format; n[8].e = type; - n[9].data = unpack_image(ctx, 2, width, height, 1, format, type, - pixels, &ctx->Unpack); + save_pointer(&n[9], + unpack_image(ctx, 2, width, height, 1, format, type, + pixels, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_TexImage2D(ctx->Exec, (target, level, components, width, @@ -4213,7 +3893,7 @@ save_TexImage3D(GLenum target, else { Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_TEX_IMAGE3D, 10); + n = alloc_instruction(ctx, OPCODE_TEX_IMAGE3D, 9 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4224,8 +3904,9 @@ save_TexImage3D(GLenum target, n[7].i = border; n[8].e = format; n[9].e = type; - n[10].data = unpack_image(ctx, 3, width, height, depth, format, type, - pixels, &ctx->Unpack); + save_pointer(&n[10], + unpack_image(ctx, 3, width, height, depth, format, type, + pixels, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_TexImage3D(ctx->Exec, (target, level, internalFormat, width, @@ -4246,7 +3927,7 @@ save_TexSubImage1D(GLenum target, GLint level, GLint xoffset, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE1D, 7); + n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE1D, 6 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4254,8 +3935,9 @@ save_TexSubImage1D(GLenum target, GLint level, GLint xoffset, n[4].i = (GLint) width; n[5].e = format; n[6].e = type; - n[7].data = unpack_image(ctx, 1, width, 1, 1, format, type, - pixels, &ctx->Unpack); + save_pointer(&n[7], + unpack_image(ctx, 1, width, 1, 1, format, type, + pixels, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_TexSubImage1D(ctx->Exec, (target, level, xoffset, width, @@ -4275,7 +3957,7 @@ save_TexSubImage2D(GLenum target, GLint level, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE2D, 9); + n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE2D, 8 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4285,8 +3967,9 @@ save_TexSubImage2D(GLenum target, GLint level, n[6].i = (GLint) height; n[7].e = format; n[8].e = type; - n[9].data = unpack_image(ctx, 2, width, height, 1, format, type, - pixels, &ctx->Unpack); + save_pointer(&n[9], + unpack_image(ctx, 2, width, height, 1, format, type, + pixels, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_TexSubImage2D(ctx->Exec, (target, level, xoffset, yoffset, @@ -4306,7 +3989,7 @@ save_TexSubImage3D(GLenum target, GLint level, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE3D, 11); + n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE3D, 10 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4318,8 +4001,9 @@ save_TexSubImage3D(GLenum target, GLint level, n[8].i = (GLint) depth; n[9].e = format; n[10].e = type; - n[11].data = unpack_image(ctx, 3, width, height, depth, format, type, - pixels, &ctx->Unpack); + save_pointer(&n[11], + unpack_image(ctx, 3, width, height, depth, format, type, + pixels, &ctx->Unpack)); } if (ctx->ExecuteFlag) { CALL_TexSubImage3D(ctx->Exec, (target, level, @@ -4626,7 +4310,8 @@ save_CompressedTexImage1DARB(GLenum target, GLint level, Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7); + n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, + 6 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4634,7 +4319,8 @@ save_CompressedTexImage1DARB(GLenum target, GLint level, n[4].i = (GLint) width; n[5].i = border; n[6].i = imageSize; - n[7].data = copy_data(data, imageSize, "glCompressedTexImage1DARB"); + save_pointer(&n[7], + copy_data(data, imageSize, "glCompressedTexImage1DARB")); } if (ctx->ExecuteFlag) { CALL_CompressedTexImage1D(ctx->Exec, @@ -4662,7 +4348,8 @@ save_CompressedTexImage2DARB(GLenum target, GLint level, Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8); + n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, + 7 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4671,7 +4358,8 @@ save_CompressedTexImage2DARB(GLenum target, GLint level, n[5].i = (GLint) height; n[6].i = border; n[7].i = imageSize; - n[8].data = copy_data(data, imageSize, "glCompressedTexImage2DARB"); + save_pointer(&n[8], + copy_data(data, imageSize, "glCompressedTexImage2DARB")); } if (ctx->ExecuteFlag) { CALL_CompressedTexImage2D(ctx->Exec, @@ -4699,7 +4387,8 @@ save_CompressedTexImage3DARB(GLenum target, GLint level, Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9); + n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, + 8 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4709,7 +4398,8 @@ save_CompressedTexImage3DARB(GLenum target, GLint level, n[6].i = (GLint) depth; n[7].i = border; n[8].i = imageSize; - n[9].data = copy_data(data, imageSize, "glCompressedTexImage3DARB"); + save_pointer(&n[9], + copy_data(data, imageSize, "glCompressedTexImage3DARB")); } if (ctx->ExecuteFlag) { CALL_CompressedTexImage3D(ctx->Exec, @@ -4730,7 +4420,8 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7); + n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, + 6 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4738,7 +4429,8 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, n[4].i = (GLint) width; n[5].e = format; n[6].i = imageSize; - n[7].data = copy_data(data, imageSize, "glCompressedTexSubImage1DARB"); + save_pointer(&n[7], + copy_data(data, imageSize, "glCompressedTexSubImage1DARB")); } if (ctx->ExecuteFlag) { CALL_CompressedTexSubImage1D(ctx->Exec, (target, level, xoffset, @@ -4758,7 +4450,8 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9); + n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, + 8 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4768,7 +4461,8 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, n[6].i = (GLint) height; n[7].e = format; n[8].i = imageSize; - n[9].data = copy_data(data, imageSize, "glCompressedTexSubImage2DARB"); + save_pointer(&n[9], + copy_data(data, imageSize, "glCompressedTexSubImage2DARB")); } if (ctx->ExecuteFlag) { CALL_CompressedTexSubImage2D(ctx->Exec, @@ -4788,7 +4482,8 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11); + n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, + 10 + POINTER_DWORDS); if (n) { n[1].e = target; n[2].i = level; @@ -4800,7 +4495,8 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, n[8].i = (GLint) depth; n[9].e = format; n[10].i = imageSize; - n[11].data = copy_data(data, imageSize, "glCompressedTexSubImage3DARB"); + save_pointer(&n[11], + copy_data(data, imageSize, "glCompressedTexSubImage3DARB")); } if (ctx->ExecuteFlag) { CALL_CompressedTexSubImage3D(ctx->Exec, @@ -5098,7 +4794,7 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PROGRAM_STRING_ARB, 4); + n = alloc_instruction(ctx, OPCODE_PROGRAM_STRING_ARB, 3 + POINTER_DWORDS); if (n) { GLubyte *programCopy = malloc(len); if (!programCopy) { @@ -5109,7 +4805,7 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len, n[1].e = target; n[2].e = format; n[3].i = len; - n[4].data = programCopy; + save_pointer(&n[4], programCopy); } if (ctx->ExecuteFlag) { CALL_ProgramStringARB(ctx->Exec, (target, format, len, string)); @@ -6284,28 +5980,17 @@ save_Uniform4fARB(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) } -/** Return copy of memory */ -static void * -memdup(const void *src, GLsizei bytes) -{ - void *b = bytes >= 0 ? malloc(bytes) : NULL; - if (b) - memcpy(b, src, bytes); - return b; -} - - static void GLAPIENTRY save_Uniform1fvARB(GLint location, GLsizei count, const GLfloat *v) { GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1FV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_1FV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 1 * sizeof(GLfloat)); + save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_Uniform1fv(ctx->Exec, (location, count, v)); @@ -6318,11 +6003,11 @@ save_Uniform2fvARB(GLint location, GLsizei count, const GLfloat *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2FV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_2FV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 2 * sizeof(GLfloat)); + save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_Uniform2fv(ctx->Exec, (location, count, v)); @@ -6335,11 +6020,11 @@ save_Uniform3fvARB(GLint location, GLsizei count, const GLfloat *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3FV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_3FV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 3 * sizeof(GLfloat)); + save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_Uniform3fv(ctx->Exec, (location, count, v)); @@ -6352,11 +6037,11 @@ save_Uniform4fvARB(GLint location, GLsizei count, const GLfloat *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4FV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_4FV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 4 * sizeof(GLfloat)); + save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_Uniform4fv(ctx->Exec, (location, count, v)); @@ -6442,11 +6127,11 @@ save_Uniform1ivARB(GLint location, GLsizei count, const GLint *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1IV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_1IV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 1 * sizeof(GLint)); + save_pointer(&n[3], memdup(v, count * 1 * sizeof(GLint))); } if (ctx->ExecuteFlag) { CALL_Uniform1iv(ctx->Exec, (location, count, v)); @@ -6459,11 +6144,11 @@ save_Uniform2ivARB(GLint location, GLsizei count, const GLint *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2IV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_2IV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 2 * sizeof(GLint)); + save_pointer(&n[3], memdup(v, count * 2 * sizeof(GLint))); } if (ctx->ExecuteFlag) { CALL_Uniform2iv(ctx->Exec, (location, count, v)); @@ -6476,11 +6161,11 @@ save_Uniform3ivARB(GLint location, GLsizei count, const GLint *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3IV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_3IV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 3 * sizeof(GLint)); + save_pointer(&n[3], memdup(v, count * 3 * sizeof(GLint))); } if (ctx->ExecuteFlag) { CALL_Uniform3iv(ctx->Exec, (location, count, v)); @@ -6493,11 +6178,11 @@ save_Uniform4ivARB(GLint location, GLsizei count, const GLint *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4IV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_4IV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 4 * sizeof(GLfloat)); + save_pointer(&n[3], memdup(v, count * 4 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_Uniform4iv(ctx->Exec, (location, count, v)); @@ -6584,11 +6269,11 @@ save_Uniform1uiv(GLint location, GLsizei count, const GLuint *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1UIV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_1UIV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 1 * sizeof(*v)); + save_pointer(&n[3], memdup(v, count * 1 * sizeof(*v))); } if (ctx->ExecuteFlag) { /*CALL_Uniform1uiv(ctx->Exec, (location, count, v));*/ @@ -6601,11 +6286,11 @@ save_Uniform2uiv(GLint location, GLsizei count, const GLuint *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2UIV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_2UIV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 2 * sizeof(*v)); + save_pointer(&n[3], memdup(v, count * 2 * sizeof(*v))); } if (ctx->ExecuteFlag) { /*CALL_Uniform2uiv(ctx->Exec, (location, count, v));*/ @@ -6618,11 +6303,11 @@ save_Uniform3uiv(GLint location, GLsizei count, const GLuint *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3UIV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_3UIV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 3 * sizeof(*v)); + save_pointer(&n[3], memdup(v, count * 3 * sizeof(*v))); } if (ctx->ExecuteFlag) { /*CALL_Uniform3uiv(ctx->Exec, (location, count, v));*/ @@ -6635,11 +6320,11 @@ save_Uniform4uiv(GLint location, GLsizei count, const GLuint *v) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4UIV, 3); + n = alloc_instruction(ctx, OPCODE_UNIFORM_4UIV, 2 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; - n[3].data = memdup(v, count * 4 * sizeof(*v)); + save_pointer(&n[3], memdup(v, count * 4 * sizeof(*v))); } if (ctx->ExecuteFlag) { /*CALL_Uniform4uiv(ctx->Exec, (location, count, v));*/ @@ -6655,12 +6340,12 @@ save_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX22, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX22, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 2 * 2 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 2 * 2 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix2fv(ctx->Exec, (location, count, transpose, m)); @@ -6674,12 +6359,12 @@ save_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX33, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX33, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 3 * 3 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 3 * 3 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix3fv(ctx->Exec, (location, count, transpose, m)); @@ -6693,12 +6378,12 @@ save_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX44, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX44, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 4 * 4 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 4 * 4 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix4fv(ctx->Exec, (location, count, transpose, m)); @@ -6713,12 +6398,12 @@ save_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX23, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX23, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 2 * 3 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 2 * 3 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix2x3fv(ctx->Exec, (location, count, transpose, m)); @@ -6732,12 +6417,12 @@ save_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX32, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX32, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 3 * 2 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 3 * 2 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix3x2fv(ctx->Exec, (location, count, transpose, m)); @@ -6752,12 +6437,12 @@ save_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX24, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX24, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 2 * 4 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 2 * 4 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix2x4fv(ctx->Exec, (location, count, transpose, m)); @@ -6771,12 +6456,12 @@ save_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX42, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX42, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 4 * 2 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 4 * 2 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix4x2fv(ctx->Exec, (location, count, transpose, m)); @@ -6791,12 +6476,12 @@ save_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX34, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX34, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 3 * 4 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 3 * 4 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix3x4fv(ctx->Exec, (location, count, transpose, m)); @@ -6810,12 +6495,12 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX43, 4); + n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX43, 3 + POINTER_DWORDS); if (n) { n[1].i = location; n[2].i = count; n[3].b = transpose; - n[4].data = memdup(m, count * 4 * 3 * sizeof(GLfloat)); + save_pointer(&n[4], memdup(m, count * 4 * 3 * sizeof(GLfloat))); } if (ctx->ExecuteFlag) { CALL_UniformMatrix4x3fv(ctx->Exec, (location, count, transpose, m)); @@ -7185,10 +6870,10 @@ save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) if (n) { union uint64_pair p; p.uint64 = timeout; - n[1].data = sync; - n[2].e = flags; - n[3].ui = p.uint32[0]; - n[4].ui = p.uint32[1]; + n[1].bf = flags; + n[2].ui = p.uint32[0]; + n[3].ui = p.uint32[1]; + save_pointer(&n[4], sync); } if (ctx->ExecuteFlag) { CALL_WaitSync(ctx->Exec, (sync, flags, timeout)); @@ -7252,10 +6937,14 @@ static void save_error(struct gl_context *ctx, GLenum error, const char *s) { Node *n; - n = alloc_instruction(ctx, OPCODE_ERROR, 2); + n = alloc_instruction(ctx, OPCODE_ERROR, 1 + POINTER_DWORDS); if (n) { n[1].e = error; - n[2].data = (void *) s; + save_pointer(&n[2], (void *) s); + /* note: the data/string here doesn't have to be freed in + * _mesa_delete_list() since the string is never dynamically + * allocated. + */ } } @@ -7336,7 +7025,7 @@ execute_list(struct gl_context *ctx, GLuint list) else { switch (opcode) { case OPCODE_ERROR: - _mesa_error(ctx, n[1].e, "%s", (const char *) n[2].data); + _mesa_error(ctx, n[1].e, "%s", (const char *) get_pointer(&n[2])); break; case OPCODE_ACCUM: CALL_Accum(ctx->Exec, (n[1].e, n[2].f)); @@ -7353,7 +7042,7 @@ execute_list(struct gl_context *ctx, GLuint list) ctx->Unpack = ctx->DefaultPacking; CALL_Bitmap(ctx->Exec, ((GLsizei) n[1].i, (GLsizei) n[2].i, n[3].f, n[4].f, n[5].f, n[6].f, - (const GLubyte *) n[7].data)); + get_pointer(&n[7]))); ctx->Unpack = save; /* restore */ } break; @@ -7478,102 +7167,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_COLOR_MATERIAL: CALL_ColorMaterial(ctx->Exec, (n[1].e, n[2].e)); break; - case OPCODE_COLOR_TABLE: - { - const struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = ctx->DefaultPacking; - CALL_ColorTable(ctx->Exec, (n[1].e, n[2].e, n[3].i, n[4].e, - n[5].e, n[6].data)); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_COLOR_TABLE_PARAMETER_FV: - { - GLfloat params[4]; - params[0] = n[3].f; - params[1] = n[4].f; - params[2] = n[5].f; - params[3] = n[6].f; - CALL_ColorTableParameterfv(ctx->Exec, - (n[1].e, n[2].e, params)); - } - break; - case OPCODE_COLOR_TABLE_PARAMETER_IV: - { - GLint params[4]; - params[0] = n[3].i; - params[1] = n[4].i; - params[2] = n[5].i; - params[3] = n[6].i; - CALL_ColorTableParameteriv(ctx->Exec, - (n[1].e, n[2].e, params)); - } - break; - case OPCODE_COLOR_SUB_TABLE: - { - const struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = ctx->DefaultPacking; - CALL_ColorSubTable(ctx->Exec, (n[1].e, n[2].i, n[3].i, - n[4].e, n[5].e, n[6].data)); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_CONVOLUTION_FILTER_1D: - { - const struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = ctx->DefaultPacking; - CALL_ConvolutionFilter1D(ctx->Exec, (n[1].e, n[2].i, n[3].i, - n[4].e, n[5].e, - n[6].data)); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_CONVOLUTION_FILTER_2D: - { - const struct gl_pixelstore_attrib save = ctx->Unpack; - ctx->Unpack = ctx->DefaultPacking; - CALL_ConvolutionFilter2D(ctx->Exec, (n[1].e, n[2].i, n[3].i, - n[4].i, n[5].e, n[6].e, - n[7].data)); - ctx->Unpack = save; /* restore */ - } - break; - case OPCODE_CONVOLUTION_PARAMETER_I: - CALL_ConvolutionParameteri(ctx->Exec, (n[1].e, n[2].e, n[3].i)); - break; - case OPCODE_CONVOLUTION_PARAMETER_IV: - { - GLint params[4]; - params[0] = n[3].i; - params[1] = n[4].i; - params[2] = n[5].i; - params[3] = n[6].i; - CALL_ConvolutionParameteriv(ctx->Exec, - (n[1].e, n[2].e, params)); - } - break; - case OPCODE_CONVOLUTION_PARAMETER_F: - CALL_ConvolutionParameterf(ctx->Exec, (n[1].e, n[2].e, n[3].f)); - break; - case OPCODE_CONVOLUTION_PARAMETER_FV: - { - GLfloat params[4]; - params[0] = n[3].f; - params[1] = n[4].f; - params[2] = n[5].f; - params[3] = n[6].f; - CALL_ConvolutionParameterfv(ctx->Exec, - (n[1].e, n[2].e, params)); - } - break; - case OPCODE_COPY_COLOR_SUB_TABLE: - CALL_CopyColorSubTable(ctx->Exec, (n[1].e, n[2].i, - n[3].i, n[4].i, n[5].i)); - break; - case OPCODE_COPY_COLOR_TABLE: - CALL_CopyColorSubTable(ctx->Exec, (n[1].e, n[2].i, - n[3].i, n[4].i, n[5].i)); - break; case OPCODE_COPY_PIXELS: CALL_CopyPixels(ctx->Exec, (n[1].i, n[2].i, (GLsizei) n[3].i, (GLsizei) n[4].i, @@ -7628,7 +7221,7 @@ execute_list(struct gl_context *ctx, GLuint list) const struct gl_pixelstore_attrib save = ctx->Unpack; ctx->Unpack = ctx->DefaultPacking; CALL_DrawPixels(ctx->Exec, (n[1].i, n[2].i, n[3].e, n[4].e, - n[5].data)); + get_pointer(&n[5]))); ctx->Unpack = save; /* restore */ } break; @@ -7665,9 +7258,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_HINT: CALL_Hint(ctx->Exec, (n[1].e, n[2].e)); break; - case OPCODE_HISTOGRAM: - CALL_Histogram(ctx->Exec, (n[1].e, n[2].i, n[3].e, n[4].b)); - break; case OPCODE_INDEX_MASK: CALL_IndexMask(ctx->Exec, (n[1].ui)); break; @@ -7733,7 +7323,7 @@ execute_list(struct gl_context *ctx, GLuint list) GLfloat u1 = n[2].f; GLfloat u2 = n[3].f; CALL_Map1f(ctx->Exec, (target, u1, u2, ustride, uorder, - (GLfloat *) n[6].data)); + (GLfloat *) get_pointer(&n[6]))); } break; case OPCODE_MAP2: @@ -7749,7 +7339,7 @@ execute_list(struct gl_context *ctx, GLuint list) GLint vorder = n[9].i; CALL_Map2f(ctx->Exec, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, - (GLfloat *) n[10].data)); + (GLfloat *) get_pointer(&n[10]))); } break; case OPCODE_MAPGRID1: @@ -7762,9 +7352,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_MATRIX_MODE: CALL_MatrixMode(ctx->Exec, (n[1].e)); break; - case OPCODE_MIN_MAX: - CALL_Minmax(ctx->Exec, (n[1].e, n[2].e, n[3].b)); - break; case OPCODE_MULT_MATRIX: if (sizeof(Node) == sizeof(GLfloat)) { CALL_MultMatrixf(ctx->Exec, (&n[1].f)); @@ -7787,7 +7374,7 @@ execute_list(struct gl_context *ctx, GLuint list) break; case OPCODE_PIXEL_MAP: CALL_PixelMapfv(ctx->Exec, - (n[1].e, n[2].i, (GLfloat *) n[3].data)); + (n[1].e, n[2].i, get_pointer(&n[3]))); break; case OPCODE_PIXEL_TRANSFER: CALL_PixelTransferf(ctx->Exec, (n[1].e, n[2].f)); @@ -7814,7 +7401,7 @@ execute_list(struct gl_context *ctx, GLuint list) { const struct gl_pixelstore_attrib save = ctx->Unpack; ctx->Unpack = ctx->DefaultPacking; - CALL_PolygonStipple(ctx->Exec, ((GLubyte *) n[1].data)); + CALL_PolygonStipple(ctx->Exec, (get_pointer(&n[1]))); ctx->Unpack = save; /* restore */ } break; @@ -7848,12 +7435,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_READ_BUFFER: CALL_ReadBuffer(ctx->Exec, (n[1].e)); break; - case OPCODE_RESET_HISTOGRAM: - CALL_ResetHistogram(ctx->Exec, (n[1].e)); - break; - case OPCODE_RESET_MIN_MAX: - CALL_ResetMinmax(ctx->Exec, (n[1].e)); - break; case OPCODE_ROTATE: CALL_Rotatef(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f)); break; @@ -7930,7 +7511,7 @@ execute_list(struct gl_context *ctx, GLuint list) n[5].e, /* border */ n[6].e, /* format */ n[7].e, /* type */ - n[8].data)); + get_pointer(&n[8]))); ctx->Unpack = save; /* restore */ } break; @@ -7946,7 +7527,7 @@ execute_list(struct gl_context *ctx, GLuint list) n[6].e, /* border */ n[7].e, /* format */ n[8].e, /* type */ - n[9].data)); + get_pointer(&n[9]))); ctx->Unpack = save; /* restore */ } break; @@ -7963,7 +7544,7 @@ execute_list(struct gl_context *ctx, GLuint list) n[7].e, /* border */ n[8].e, /* format */ n[9].e, /* type */ - n[10].data)); + get_pointer(&n[10]))); ctx->Unpack = save; /* restore */ } break; @@ -7973,7 +7554,7 @@ execute_list(struct gl_context *ctx, GLuint list) ctx->Unpack = ctx->DefaultPacking; CALL_TexSubImage1D(ctx->Exec, (n[1].e, n[2].i, n[3].i, n[4].i, n[5].e, - n[6].e, n[7].data)); + n[6].e, get_pointer(&n[7]))); ctx->Unpack = save; /* restore */ } break; @@ -7984,7 +7565,7 @@ execute_list(struct gl_context *ctx, GLuint list) CALL_TexSubImage2D(ctx->Exec, (n[1].e, n[2].i, n[3].i, n[4].i, n[5].e, n[6].i, n[7].e, n[8].e, - n[9].data)); + get_pointer(&n[9]))); ctx->Unpack = save; /* restore */ } break; @@ -7995,7 +7576,7 @@ execute_list(struct gl_context *ctx, GLuint list) CALL_TexSubImage3D(ctx->Exec, (n[1].e, n[2].i, n[3].i, n[4].i, n[5].i, n[6].i, n[7].i, n[8].i, n[9].e, n[10].e, - n[11].data)); + get_pointer(&n[11]))); ctx->Unpack = save; /* restore */ } break; @@ -8014,36 +7595,38 @@ execute_list(struct gl_context *ctx, GLuint list) break; case OPCODE_COMPRESSED_TEX_IMAGE_1D: /* GL_ARB_texture_compression */ CALL_CompressedTexImage1D(ctx->Exec, (n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, - n[7].data)); + n[4].i, n[5].i, n[6].i, + get_pointer(&n[7]))); break; case OPCODE_COMPRESSED_TEX_IMAGE_2D: /* GL_ARB_texture_compression */ CALL_CompressedTexImage2D(ctx->Exec, (n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, - n[7].i, n[8].data)); + n[4].i, n[5].i, n[6].i, + n[7].i, get_pointer(&n[8]))); break; case OPCODE_COMPRESSED_TEX_IMAGE_3D: /* GL_ARB_texture_compression */ CALL_CompressedTexImage3D(ctx->Exec, (n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, - n[7].i, n[8].i, - n[9].data)); + n[4].i, n[5].i, n[6].i, + n[7].i, n[8].i, + get_pointer(&n[9]))); break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: /* GL_ARB_texture_compress */ CALL_CompressedTexSubImage1D(ctx->Exec, (n[1].e, n[2].i, n[3].i, n[4].i, - n[5].e, n[6].i, n[7].data)); + n[5].e, n[6].i, + get_pointer(&n[7]))); break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: /* GL_ARB_texture_compress */ CALL_CompressedTexSubImage2D(ctx->Exec, (n[1].e, n[2].i, n[3].i, n[4].i, n[5].i, n[6].i, n[7].e, n[8].i, - n[9].data)); + get_pointer(&n[9]))); break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: /* GL_ARB_texture_compress */ CALL_CompressedTexSubImage3D(ctx->Exec, (n[1].e, n[2].i, n[3].i, n[4].i, n[5].i, n[6].i, n[7].i, n[8].i, - n[9].e, n[10].i, n[11].data)); + n[9].e, n[10].i, + get_pointer(&n[11]))); break; case OPCODE_SAMPLE_COVERAGE: /* GL_ARB_multisample */ CALL_SampleCoverage(ctx->Exec, (n[1].f, n[2].b)); @@ -8067,7 +7650,8 @@ execute_list(struct gl_context *ctx, GLuint list) break; case OPCODE_PROGRAM_STRING_ARB: CALL_ProgramStringARB(ctx->Exec, - (n[1].e, n[2].e, n[3].i, n[4].data)); + (n[1].e, n[2].e, n[3].i, + get_pointer(&n[4]))); break; case OPCODE_PROGRAM_ENV_PARAMETER_ARB: CALL_ProgramEnvParameter4fARB(ctx->Exec, (n[1].e, n[2].ui, n[3].f, @@ -8126,16 +7710,16 @@ execute_list(struct gl_context *ctx, GLuint list) (n[1].i, n[2].f, n[3].f, n[4].f, n[5].f)); break; case OPCODE_UNIFORM_1FV: - CALL_Uniform1fv(ctx->Exec, (n[1].i, n[2].i, n[3].data)); + CALL_Uniform1fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3]))); break; case OPCODE_UNIFORM_2FV: - CALL_Uniform2fv(ctx->Exec, (n[1].i, n[2].i, n[3].data)); + CALL_Uniform2fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3]))); break; case OPCODE_UNIFORM_3FV: - CALL_Uniform3fv(ctx->Exec, (n[1].i, n[2].i, n[3].data)); + CALL_Uniform3fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3]))); break; case OPCODE_UNIFORM_4FV: - CALL_Uniform4fv(ctx->Exec, (n[1].i, n[2].i, n[3].data)); + CALL_Uniform4fv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3]))); break; case OPCODE_UNIFORM_1I: CALL_Uniform1i(ctx->Exec, (n[1].i, n[2].i)); @@ -8151,16 +7735,16 @@ execute_list(struct gl_context *ctx, GLuint list) (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i)); break; case OPCODE_UNIFORM_1IV: - CALL_Uniform1iv(ctx->Exec, (n[1].i, n[2].i, n[3].data)); + CALL_Uniform1iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3]))); break; case OPCODE_UNIFORM_2IV: - CALL_Uniform2iv(ctx->Exec, (n[1].i, n[2].i, n[3].data)); + CALL_Uniform2iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3]))); break; case OPCODE_UNIFORM_3IV: - CALL_Uniform3iv(ctx->Exec, (n[1].i, n[2].i, n[3].data)); + CALL_Uniform3iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3]))); break; case OPCODE_UNIFORM_4IV: - CALL_Uniform4iv(ctx->Exec, (n[1].i, n[2].i, n[3].data)); + CALL_Uniform4iv(ctx->Exec, (n[1].i, n[2].i, get_pointer(&n[3]))); break; case OPCODE_UNIFORM_1UI: /*CALL_Uniform1uiARB(ctx->Exec, (n[1].i, n[2].i));*/ @@ -8177,52 +7761,56 @@ execute_list(struct gl_context *ctx, GLuint list) */ break; case OPCODE_UNIFORM_1UIV: - /*CALL_Uniform1uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/ + /*CALL_Uniform1uivARB(ctx->Exec, (n[1].i, n[2].i, + get_pointer(&n[3])));*/ break; case OPCODE_UNIFORM_2UIV: - /*CALL_Uniform2uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/ + /*CALL_Uniform2uivARB(ctx->Exec, (n[1].i, n[2].i, + get_pointer(&n[3])));*/ break; case OPCODE_UNIFORM_3UIV: - /*CALL_Uniform3uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/ + /*CALL_Uniform3uivARB(ctx->Exec, (n[1].i, n[2].i, + get_pointer(&n[3])));*/ break; case OPCODE_UNIFORM_4UIV: - /*CALL_Uniform4uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/ + /*CALL_Uniform4uivARB(ctx->Exec, (n[1].i, n[2].i, + get_pointer(&n[3])));*/ break; case OPCODE_UNIFORM_MATRIX22: CALL_UniformMatrix2fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_UNIFORM_MATRIX33: CALL_UniformMatrix3fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_UNIFORM_MATRIX44: CALL_UniformMatrix4fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_UNIFORM_MATRIX23: CALL_UniformMatrix2x3fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_UNIFORM_MATRIX32: CALL_UniformMatrix3x2fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_UNIFORM_MATRIX24: CALL_UniformMatrix2x4fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_UNIFORM_MATRIX42: CALL_UniformMatrix4x2fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_UNIFORM_MATRIX34: CALL_UniformMatrix3x4fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_UNIFORM_MATRIX43: CALL_UniformMatrix4x3fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); + (n[1].i, n[2].i, n[3].b, get_pointer(&n[4]))); break; case OPCODE_CLAMP_COLOR: @@ -8476,9 +8064,10 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_WAIT_SYNC: { union uint64_pair p; - p.uint32[0] = n[3].ui; - p.uint32[1] = n[4].ui; - CALL_WaitSync(ctx->Exec, (n[1].data, n[2].bf, p.uint64)); + p.uint32[0] = n[2].ui; + p.uint32[1] = n[3].ui; + CALL_WaitSync(ctx->Exec, + (get_pointer(&n[4]), n[1].bf, p.uint64)); } break; @@ -8495,7 +8084,7 @@ execute_list(struct gl_context *ctx, GLuint list) break; case OPCODE_CONTINUE: - n = (Node *) n[1].next; + n = (Node *) get_pointer(&n[1]); break; case OPCODE_END_OF_LIST: done = GL_TRUE; @@ -8684,6 +8273,8 @@ _mesa_EndList(void) (void) alloc_instruction(ctx, OPCODE_END_OF_LIST, 0); + trim_list(ctx); + /* Destroy old list, if any */ destroy_list(ctx, ctx->ListState.CurrentList->Name); @@ -8697,6 +8288,8 @@ _mesa_EndList(void) mesa_print_display_list(ctx->ListState.CurrentList->Name); ctx->ListState.CurrentList = NULL; + ctx->ListState.CurrentBlock = NULL; + ctx->ListState.CurrentPos = 0; ctx->ExecuteFlag = GL_TRUE; ctx->CompileFlag = GL_FALSE; @@ -8998,22 +8591,6 @@ _mesa_initialize_save_table(const struct gl_context *ctx) /* Not all are supported */ SET_BlendColor(table, save_BlendColor); SET_BlendEquation(table, save_BlendEquation); - SET_ColorSubTable(table, save_ColorSubTable); - SET_ColorTable(table, save_ColorTable); - SET_ColorTableParameterfv(table, save_ColorTableParameterfv); - SET_ColorTableParameteriv(table, save_ColorTableParameteriv); - SET_ConvolutionFilter1D(table, save_ConvolutionFilter1D); - SET_ConvolutionFilter2D(table, save_ConvolutionFilter2D); - SET_ConvolutionParameterf(table, save_ConvolutionParameterf); - SET_ConvolutionParameterfv(table, save_ConvolutionParameterfv); - SET_ConvolutionParameteri(table, save_ConvolutionParameteri); - SET_ConvolutionParameteriv(table, save_ConvolutionParameteriv); - SET_CopyColorSubTable(table, save_CopyColorSubTable); - SET_CopyColorTable(table, save_CopyColorTable); - SET_Histogram(table, save_Histogram); - SET_Minmax(table, save_Minmax); - SET_ResetHistogram(table, save_ResetHistogram); - SET_ResetMinmax(table, save_ResetMinmax); /* 2. GL_EXT_blend_color */ #if 0 @@ -9030,12 +8607,6 @@ _mesa_initialize_save_table(const struct gl_context *ctx) SET_TexSubImage3DEXT(table, save_TexSubImage3D); #endif - /* 14. GL_SGI_color_table */ -#if 0 - SET_ColorTableSGI(table, save_ColorTable); - SET_ColorSubTableSGI(table, save_ColorSubTable); -#endif - /* 37. GL_EXT_blend_minmax */ #if 0 SET_BlendEquationEXT(table, save_BlendEquationEXT); @@ -9332,7 +8903,8 @@ print_list(struct gl_context *ctx, GLuint list) break; case OPCODE_BITMAP: printf("Bitmap %d %d %g %g %g %g %p\n", n[1].i, n[2].i, - n[3].f, n[4].f, n[5].f, n[6].f, (void *) n[7].data); + n[3].f, n[4].f, n[5].f, n[6].f, + get_pointer(&n[7])); break; case OPCODE_CALL_LIST: printf("CallList %d\n", (int) n[1].ui); @@ -9341,16 +8913,6 @@ print_list(struct gl_context *ctx, GLuint list) printf("CallList %d + offset %u = %u\n", (int) n[1].ui, ctx->List.ListBase, ctx->List.ListBase + n[1].ui); break; - case OPCODE_COLOR_TABLE_PARAMETER_FV: - printf("ColorTableParameterfv %s %s %f %f %f %f\n", - enum_string(n[1].e), enum_string(n[2].e), - n[3].f, n[4].f, n[5].f, n[6].f); - break; - case OPCODE_COLOR_TABLE_PARAMETER_IV: - printf("ColorTableParameteriv %s %s %d %d %d %d\n", - enum_string(n[1].e), enum_string(n[2].e), - n[3].i, n[4].i, n[5].i, n[6].i); - break; case OPCODE_DISABLE: printf("Disable %s\n", enum_string(n[1].e)); break; @@ -9525,12 +9087,12 @@ print_list(struct gl_context *ctx, GLuint list) * meta opcodes/commands */ case OPCODE_ERROR: - printf("Error: %s %s\n", - enum_string(n[1].e), (const char *) n[2].data); + printf("Error: %s %s\n", enum_string(n[1].e), + (const char *) get_pointer(&n[2])); break; case OPCODE_CONTINUE: printf("DISPLAY-LIST-CONTINUE\n"); - n = (Node *) n[1].next; + n = (Node *) get_pointer(&n[1]); break; case OPCODE_END_OF_LIST: printf("END-LIST %u\n", list); diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c index c047f5df2..bb4a23c91 100644 --- a/mesalib/src/mesa/main/enable.c +++ b/mesalib/src/mesa/main/enable.c @@ -934,25 +934,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->ATIFragmentShader.Enabled = state; break; - /* GL_MESA_texture_array */ - case GL_TEXTURE_1D_ARRAY_EXT: - if (ctx->API != API_OPENGL_COMPAT) - goto invalid_enum_error; - CHECK_EXTENSION(MESA_texture_array, cap); - if (!enable_texture(ctx, state, TEXTURE_1D_ARRAY_BIT)) { - return; - } - break; - - case GL_TEXTURE_2D_ARRAY_EXT: - if (ctx->API != API_OPENGL_COMPAT) - goto invalid_enum_error; - CHECK_EXTENSION(MESA_texture_array, cap); - if (!enable_texture(ctx, state, TEXTURE_2D_ARRAY_BIT)) { - return; - } - break; - case GL_TEXTURE_CUBE_MAP_SEAMLESS: if (!_mesa_is_desktop_gl(ctx)) goto invalid_enum_error; diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c index 42da9057c..f0e1858e4 100644 --- a/mesalib/src/mesa/main/extensions.c +++ b/mesalib/src/mesa/main/extensions.c @@ -82,6 +82,7 @@ static const struct extension extension_table[] = { { "GL_ARB_ES3_compatibility", o(ARB_ES3_compatibility), GL, 2012 }, { "GL_ARB_base_instance", o(ARB_base_instance), GL, 2011 }, { "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 }, + { "GL_ARB_clear_buffer_object", o(dummy_true), GL, 2012 }, { "GL_ARB_color_buffer_float", o(ARB_color_buffer_float), GL, 2004 }, { "GL_ARB_copy_buffer", o(dummy_true), GL, 2008 }, { "GL_ARB_conservative_depth", o(ARB_conservative_depth), GL, 2011 }, @@ -158,6 +159,7 @@ static const struct extension extension_table[] = { { "GL_ARB_texture_rg", o(ARB_texture_rg), GL, 2008 }, { "GL_ARB_texture_storage", o(dummy_true), GL, 2011 }, { "GL_ARB_texture_storage_multisample", o(ARB_texture_multisample), GL, 2012 }, + { "GL_ARB_texture_view", o(ARB_texture_view), GL, 2012 }, { "GL_ARB_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 }, { "GL_ARB_timer_query", o(ARB_timer_query), GL, 2010 }, { "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL, 2010 }, @@ -199,7 +201,7 @@ static const struct extension extension_table[] = { { "GL_EXT_gpu_shader4", o(EXT_gpu_shader4), GL, 2006 }, { "GL_EXT_map_buffer_range", o(ARB_map_buffer_range), ES1 | ES2, 2012 }, { "GL_EXT_multi_draw_arrays", o(dummy_true), GLL | ES1 | ES2, 1999 }, - { "GL_EXT_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2005 }, + { "GL_EXT_packed_depth_stencil", o(dummy_true), GL, 2005 }, { "GL_EXT_packed_float", o(EXT_packed_float), GL, 2004 }, { "GL_EXT_packed_pixels", o(dummy_true), GLL, 1997 }, { "GL_EXT_pixel_buffer_object", o(EXT_pixel_buffer_object), GL, 2004 }, @@ -272,7 +274,7 @@ static const struct extension extension_table[] = { { "GL_OES_framebuffer_object", o(dummy_true), ES1, 2005 }, { "GL_OES_get_program_binary", o(dummy_true), ES2, 2008 }, { "GL_OES_mapbuffer", o(dummy_true), ES1 | ES2, 2005 }, - { "GL_OES_packed_depth_stencil", o(EXT_packed_depth_stencil), ES1 | ES2, 2007 }, + { "GL_OES_packed_depth_stencil", o(dummy_true), ES1 | ES2, 2007 }, { "GL_OES_point_size_array", o(dummy_true), ES1, 2004 }, { "GL_OES_point_sprite", o(ARB_point_sprite), ES1, 2004 }, { "GL_OES_query_matrix", o(dummy_true), ES1, 2003 }, @@ -302,7 +304,7 @@ static const struct extension extension_table[] = { { "GL_AMD_performance_monitor", o(AMD_performance_monitor), GL, 2007 }, { "GL_AMD_seamless_cubemap_per_texture", o(AMD_seamless_cubemap_per_texture), GL, 2009 }, { "GL_AMD_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 }, - { "GL_AMD_vertex_shader_layer", o(AMD_vertex_shader_layer), GL, 2012 }, + { "GL_AMD_vertex_shader_layer", o(AMD_vertex_shader_layer), GLC, 2012 }, { "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL, 2006 }, { "GL_APPLE_packed_pixels", o(dummy_true), GLL, 2002 }, { "GL_APPLE_texture_max_level", o(dummy_true), ES1 | ES2, 2009 }, @@ -321,7 +323,6 @@ static const struct extension extension_table[] = { { "GL_IBM_texture_mirrored_repeat", o(dummy_true), GLL, 1998 }, { "GL_INGR_blend_func_separate", o(EXT_blend_func_separate), GLL, 1999 }, { "GL_MESA_pack_invert", o(MESA_pack_invert), GL, 2002 }, - { "GL_MESA_texture_array", o(MESA_texture_array), GLL, 2007 }, { "GL_MESA_texture_signed_rgba", o(EXT_texture_snorm), GL, 2009 }, { "GL_MESA_window_pos", o(dummy_true), GLL, 2000 }, { "GL_MESA_ycbcr_texture", o(MESA_ycbcr_texture), GL, 2002 }, @@ -333,7 +334,7 @@ static const struct extension extension_table[] = { { "GL_NV_fog_distance", o(NV_fog_distance), GLL, 2001 }, { "GL_NV_fragment_program_option", o(NV_fragment_program_option), GLL, 2005 }, { "GL_NV_light_max_exponent", o(dummy_true), GLL, 1999 }, - { "GL_NV_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2000 }, + { "GL_NV_packed_depth_stencil", o(dummy_true), GL, 2000 }, { "GL_NV_point_sprite", o(NV_point_sprite), GL, 2001 }, { "GL_NV_primitive_restart", o(NV_primitive_restart), GLL, 2002 }, { "GL_NV_read_buffer", o(dummy_true), ES2, 2011 }, @@ -436,7 +437,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) ctx->Extensions.EXT_depth_bounds_test = GL_TRUE; ctx->Extensions.EXT_draw_buffers2 = GL_TRUE; ctx->Extensions.EXT_framebuffer_blit = GL_TRUE; - ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE; ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; ctx->Extensions.EXT_point_parameters = GL_TRUE; ctx->Extensions.EXT_provoking_vertex = GL_TRUE; @@ -453,7 +453,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx) /*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/ ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE; ctx->Extensions.MESA_pack_invert = GL_TRUE; - ctx->Extensions.MESA_texture_array = GL_TRUE; ctx->Extensions.MESA_ycbcr_texture = GL_TRUE; ctx->Extensions.NV_conditional_render = GL_TRUE; ctx->Extensions.NV_point_sprite = GL_TRUE; @@ -480,7 +479,8 @@ set_extension( struct gl_context *ctx, const char *name, GLboolean state ) if (ctx->Extensions.String) { /* The string was already queried - can't change it now! */ - _mesa_problem(ctx, "Trying to enable/disable extension after glGetString(GL_EXTENSIONS): %s", name); + _mesa_problem(ctx, "Trying to enable/disable extension after " + "glGetString(GL_EXTENSIONS): %s", name); return GL_FALSE; } @@ -679,10 +679,10 @@ _mesa_make_extension_string(struct gl_context *ctx) return NULL; } - /* Sort extensions in chronological order because certain old applications (e.g., - * Quake3 demo) store the extension list in a static size buffer so chronologically - * order ensure that the extensions that such applications expect will fit into - * that buffer. + /* Sort extensions in chronological order because certain old applications + * (e.g., Quake3 demo) store the extension list in a static size buffer so + * chronologically order ensure that the extensions that such applications + * expect will fit into that buffer. */ j = 0; for (i = extension_table; i->name != 0; ++i) { @@ -693,7 +693,8 @@ _mesa_make_extension_string(struct gl_context *ctx) } } assert(j == count); - qsort(extension_indices, count, sizeof *extension_indices, extension_compare); + qsort(extension_indices, count, + sizeof *extension_indices, extension_compare); /* Build the extension string.*/ for (j = 0; j < count; ++j) { diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index 861885dd3..2892784f8 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -781,9 +781,8 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format, if (baseFormat == GL_DEPTH_COMPONENT) { /* OK */ } - else if (ctx->Extensions.EXT_packed_depth_stencil && - ctx->Extensions.ARB_depth_texture && - baseFormat == GL_DEPTH_STENCIL_EXT) { + else if (ctx->Extensions.ARB_depth_texture && + baseFormat == GL_DEPTH_STENCIL) { /* OK */ } else { @@ -794,9 +793,8 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format, } else { ASSERT(format == GL_STENCIL); - if (ctx->Extensions.EXT_packed_depth_stencil && - ctx->Extensions.ARB_depth_texture && - baseFormat == GL_DEPTH_STENCIL_EXT) { + if (ctx->Extensions.ARB_depth_texture && + baseFormat == GL_DEPTH_STENCIL) { /* OK */ } else { @@ -830,8 +828,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format, if (baseFormat == GL_DEPTH_COMPONENT) { /* OK */ } - else if (ctx->Extensions.EXT_packed_depth_stencil && - baseFormat == GL_DEPTH_STENCIL_EXT) { + else if (baseFormat == GL_DEPTH_STENCIL) { /* OK */ } else { @@ -842,11 +839,8 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format, } else { assert(format == GL_STENCIL); - if (baseFormat == GL_STENCIL_INDEX) { - /* OK */ - } - else if (ctx->Extensions.EXT_packed_depth_stencil && - baseFormat == GL_DEPTH_STENCIL_EXT) { + if (baseFormat == GL_STENCIL_INDEX || + baseFormat == GL_DEPTH_STENCIL) { /* OK */ } else { @@ -1457,13 +1451,10 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) case GL_DEPTH_COMPONENT16: case GL_DEPTH_COMPONENT24: return GL_DEPTH_COMPONENT; - case GL_DEPTH_STENCIL_EXT: - return _mesa_is_desktop_gl(ctx) - && ctx->Extensions.EXT_packed_depth_stencil - ? GL_DEPTH_STENCIL_EXT : 0; - case GL_DEPTH24_STENCIL8_EXT: - return ctx->Extensions.EXT_packed_depth_stencil - ? GL_DEPTH_STENCIL_EXT : 0; + case GL_DEPTH_STENCIL: + return _mesa_is_desktop_gl(ctx) ? GL_DEPTH_STENCIL : 0; + case GL_DEPTH24_STENCIL8: + return GL_DEPTH_STENCIL; case GL_DEPTH_COMPONENT32F: return ctx->Version >= 30 || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_depth_buffer_float) diff --git a/mesalib/src/mesa/main/ff_fragment_shader.cpp b/mesalib/src/mesa/main/ff_fragment_shader.cpp index 01edd3ff8..ba6258d89 100644 --- a/mesalib/src/mesa/main/ff_fragment_shader.cpp +++ b/mesalib/src/mesa/main/ff_fragment_shader.cpp @@ -543,7 +543,8 @@ get_current_attrib(texenv_fragment_program *p, GLuint attrib) ir_rvalue *val; current = p->shader->symbols->get_variable("gl_CurrentAttribFragMESA"); - current->max_array_access = MAX2(current->max_array_access, attrib); + assert(current); + current->data.max_array_access = MAX2(current->data.max_array_access, attrib); val = new(p->mem_ctx) ir_dereference_variable(current); ir_rvalue *index = new(p->mem_ctx) ir_constant(attrib); return new(p->mem_ctx) ir_dereference_array(val, index); @@ -587,7 +588,7 @@ get_source(texenv_fragment_program *p, var = p->shader->symbols->get_variable("gl_TextureEnvColor"); assert(var); deref = new(p->mem_ctx) ir_dereference_variable(var); - var->max_array_access = MAX2(var->max_array_access, unit); + var->data.max_array_access = MAX2(var->data.max_array_access, unit); return new(p->mem_ctx) ir_dereference_array(deref, new(p->mem_ctx) ir_constant(unit)); @@ -927,7 +928,7 @@ static void load_texture( texenv_fragment_program *p, GLuint unit ) texcoord = new(p->mem_ctx) ir_dereference_variable(tc_array); ir_rvalue *index = new(p->mem_ctx) ir_constant(unit); texcoord = new(p->mem_ctx) ir_dereference_array(texcoord, index); - tc_array->max_array_access = MAX2(tc_array->max_array_access, unit); + tc_array->data.max_array_access = MAX2(tc_array->data.max_array_access, unit); } if (!p->state->unit[unit].enabled) { @@ -1096,14 +1097,16 @@ load_texunit_bumpmap( texenv_fragment_program *p, GLuint unit ) ir_variable *rot_mat_0, *rot_mat_1; rot_mat_0 = p->shader->symbols->get_variable("gl_BumpRotMatrix0MESA"); + assert(rot_mat_0); rot_mat_1 = p->shader->symbols->get_variable("gl_BumpRotMatrix1MESA"); + assert(rot_mat_1); ir_variable *tc_array = p->shader->symbols->get_variable("gl_TexCoord"); assert(tc_array); texcoord = new(p->mem_ctx) ir_dereference_variable(tc_array); ir_rvalue *index = new(p->mem_ctx) ir_constant(bumpedUnitNr); texcoord = new(p->mem_ctx) ir_dereference_array(texcoord, index); - tc_array->max_array_access = MAX2(tc_array->max_array_access, unit); + tc_array->data.max_array_access = MAX2(tc_array->data.max_array_access, unit); load_texenv_source( p, unit + SRC_TEXTURE0, unit ); @@ -1157,8 +1160,11 @@ emit_fog_instructions(texenv_fragment_program *p, fragcolor = swizzle_xyz(fog_result); oparams = p->shader->symbols->get_variable("gl_FogParamsOptimizedMESA"); + assert(oparams); fogcoord = p->shader->symbols->get_variable("gl_FogFragCoord"); + assert(fogcoord); params = p->shader->symbols->get_variable("gl_Fog"); + assert(params); f = new(p->mem_ctx) ir_dereference_variable(fogcoord); ir_variable *f_var = p->make_temp(glsl_type::float_type, "fog_factor"); @@ -1344,7 +1350,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key) p.shader->CompileStatus = true; p.shader->Version = state->language_version; - p.shader->num_builtins_to_link = state->num_builtins_to_link; + p.shader->uses_builtin_functions = state->uses_builtin_functions; p.shader_program->Shaders = (gl_shader **)malloc(sizeof(*p.shader_program->Shaders)); p.shader_program->Shaders[0] = p.shader; diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 7f233409e..691380898 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -327,8 +327,8 @@ static const int extra_EXT_framebuffer_sRGB_and_new_buffers[] = { EXTRA_END }; -static const int extra_MESA_texture_array_es3[] = { - EXT(MESA_texture_array), +static const int extra_EXT_texture_array_es3[] = { + EXT(EXT_texture_array), EXTRA_API_ES3, EXTRA_END }; @@ -339,7 +339,7 @@ static const int extra_ARB_shader_atomic_counters_and_geometry_shader[] = { }; EXTRA_EXT(ARB_texture_cube_map); -EXTRA_EXT(MESA_texture_array); +EXTRA_EXT(EXT_texture_array); EXTRA_EXT(NV_fog_distance); EXTRA_EXT(EXT_texture_filter_anisotropic); EXTRA_EXT(NV_point_sprite); @@ -565,8 +565,6 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu case GL_TEXTURE_1D: case GL_TEXTURE_2D: case GL_TEXTURE_3D: - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: case GL_TEXTURE_CUBE_MAP_ARB: case GL_TEXTURE_RECTANGLE_NV: case GL_TEXTURE_EXTERNAL_OES: diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py index 781b796ee..653bf6256 100644 --- a/mesalib/src/mesa/main/get_hash_params.py +++ b/mesalib/src/mesa/main/get_hash_params.py @@ -376,8 +376,8 @@ descriptor=[ [ "PIXEL_UNPACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_pixel_buffer_object" ], # GL_EXT_texture_array - [ "TEXTURE_BINDING_2D_ARRAY", "LOC_CUSTOM, TYPE_INT, TEXTURE_2D_ARRAY_INDEX, extra_MESA_texture_array_es3" ], - [ "MAX_ARRAY_TEXTURE_LAYERS_EXT", "CONTEXT_INT(Const.MaxArrayTextureLayers), extra_MESA_texture_array_es3" ], + [ "TEXTURE_BINDING_2D_ARRAY", "LOC_CUSTOM, TYPE_INT, TEXTURE_2D_ARRAY_INDEX, extra_EXT_texture_array_es3" ], + [ "MAX_ARRAY_TEXTURE_LAYERS_EXT", "CONTEXT_INT(Const.MaxArrayTextureLayers), extra_EXT_texture_array_es3" ], # GL_EXT_transform_feedback [ "TRANSFORM_FEEDBACK_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_transform_feedback" ], @@ -504,10 +504,8 @@ descriptor=[ [ "STEREO", "BUFFER_INT(Visual.stereoMode), NO_EXTRA" ], [ "TEXTURE_1D", "LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA" ], [ "TEXTURE_3D", "LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA" ], - [ "TEXTURE_1D_ARRAY_EXT", "LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA" ], - [ "TEXTURE_2D_ARRAY_EXT", "LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA" ], [ "TEXTURE_BINDING_1D", "LOC_CUSTOM, TYPE_INT, TEXTURE_1D_INDEX, NO_EXTRA" ], - [ "TEXTURE_BINDING_1D_ARRAY", "LOC_CUSTOM, TYPE_INT, TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array" ], + [ "TEXTURE_BINDING_1D_ARRAY", "LOC_CUSTOM, TYPE_INT, TEXTURE_1D_ARRAY_INDEX, extra_EXT_texture_array" ], [ "TEXTURE_GEN_S", "LOC_TEXUNIT, TYPE_BIT_0, offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA" ], [ "TEXTURE_GEN_T", "LOC_TEXUNIT, TYPE_BIT_1, offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA" ], [ "TEXTURE_GEN_R", "LOC_TEXUNIT, TYPE_BIT_2, offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA" ], diff --git a/mesalib/src/mesa/main/getstring.c b/mesalib/src/mesa/main/getstring.c index d8189115a..b66e24788 100644 --- a/mesalib/src/mesa/main/getstring.c +++ b/mesalib/src/mesa/main/getstring.c @@ -42,8 +42,6 @@ shading_language_version(struct gl_context *ctx) case API_OPENGL_COMPAT: case API_OPENGL_CORE: switch (ctx->Const.GLSLVersion) { - case 110: - return (const GLubyte *) "1.10"; case 120: return (const GLubyte *) "1.20"; case 130: diff --git a/mesalib/src/mesa/main/glformats.c b/mesalib/src/mesa/main/glformats.c index 740faa890..bec7a9bbb 100644 --- a/mesalib/src/mesa/main/glformats.c +++ b/mesalib/src/mesa/main/glformats.c @@ -1301,9 +1301,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, return GL_INVALID_OPERATION; case GL_UNSIGNED_INT_24_8: - if (!ctx->Extensions.EXT_packed_depth_stencil) { - return GL_INVALID_ENUM; - } if (format != GL_DEPTH_STENCIL) { return GL_INVALID_OPERATION; } @@ -1484,9 +1481,8 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, else return GL_INVALID_OPERATION; - case GL_DEPTH_STENCIL_EXT: - if (ctx->Extensions.EXT_packed_depth_stencil && - type == GL_UNSIGNED_INT_24_8) + case GL_DEPTH_STENCIL: + if (type == GL_UNSIGNED_INT_24_8) return GL_NO_ERROR; else if (ctx->Extensions.ARB_depth_buffer_float && type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV) @@ -1694,8 +1690,6 @@ GLenum _mesa_es3_error_check_format_and_type(GLenum format, GLenum type, GLenum internalFormat) { - GLboolean type_valid = GL_TRUE; - switch (format) { case GL_RGBA: switch (type) { @@ -2116,5 +2110,5 @@ _mesa_es3_error_check_format_and_type(GLenum format, GLenum type, break; } - return type_valid ? GL_NO_ERROR : GL_INVALID_OPERATION; + return GL_NO_ERROR; } diff --git a/mesalib/src/mesa/main/imports.c b/mesalib/src/mesa/main/imports.c index 277e9476a..4afe156b0 100644 --- a/mesalib/src/mesa/main/imports.c +++ b/mesalib/src/mesa/main/imports.c @@ -168,6 +168,8 @@ _mesa_align_calloc(size_t bytes, unsigned long alignment) * \param ptr pointer to the memory to be freed. * The actual address to free is stored in the word immediately before the * address the client sees. + * Note that it is legal to pass NULL pointer to this function and will be + * handled accordingly. */ void _mesa_align_free(void *ptr) @@ -177,9 +179,11 @@ _mesa_align_free(void *ptr) #elif defined(_WIN32) && defined(_MSC_VER) _aligned_free(ptr); #else - void **cubbyHole = (void **) ((char *) ptr - sizeof(void *)); - void *realAddr = *cubbyHole; - free(realAddr); + if (ptr) { + void **cubbyHole = (void **) ((char *) ptr - sizeof(void *)); + void *realAddr = *cubbyHole; + free(realAddr); + } #endif /* defined(HAVE_POSIX_MEMALIGN) */ } @@ -199,8 +203,8 @@ _mesa_align_realloc(void *oldBuffer, size_t oldSize, size_t newSize, if (newBuf && oldBuffer && copySize > 0) { memcpy(newBuf, oldBuffer, copySize); } - if (oldBuffer) - _mesa_align_free(oldBuffer); + + _mesa_align_free(oldBuffer); return newBuf; #endif } diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c index 180f89116..033015780 100644 --- a/mesalib/src/mesa/main/mipmap.c +++ b/mesalib/src/mesa/main/mipmap.c @@ -1767,8 +1767,8 @@ _mesa_generate_mipmap_level(GLenum target, * compute next (level+1) image size * \return GL_FALSE if no smaller size can be generated (eg. src is 1x1x1 size) */ -static GLboolean -next_mipmap_level_size(GLenum target, GLint border, +GLboolean +_mesa_next_mipmap_level_size(GLenum target, GLint border, GLint srcWidth, GLint srcHeight, GLint srcDepth, GLint *dstWidth, GLint *dstHeight, GLint *dstDepth) { @@ -1911,7 +1911,7 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target, srcDepth = srcImage->Depth; border = srcImage->Border; - nextLevel = next_mipmap_level_size(target, border, + nextLevel = _mesa_next_mipmap_level_size(target, border, srcWidth, srcHeight, srcDepth, &dstWidth, &dstHeight, &dstDepth); if (!nextLevel) @@ -2102,7 +2102,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target, srcDepth = srcImage->Depth; border = srcImage->Border; - nextLevel = next_mipmap_level_size(target, border, + nextLevel = _mesa_next_mipmap_level_size(target, border, srcWidth, srcHeight, srcDepth, &dstWidth, &dstHeight, &dstDepth); if (!nextLevel) diff --git a/mesalib/src/mesa/main/mipmap.h b/mesalib/src/mesa/main/mipmap.h index d5bd1d83d..ee91df006 100644 --- a/mesalib/src/mesa/main/mipmap.h +++ b/mesalib/src/mesa/main/mipmap.h @@ -51,5 +51,9 @@ extern void _mesa_generate_mipmap(struct gl_context *ctx, GLenum target, struct gl_texture_object *texObj); +extern GLboolean +_mesa_next_mipmap_level_size(GLenum target, GLint border, + GLint srcWidth, GLint srcHeight, GLint srcDepth, + GLint *dstWidth, GLint *dstHeight, GLint *dstDepth); #endif /* MIPMAP_H */ diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index b4b432f40..f93bb5641 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -280,6 +280,7 @@ typedef enum */ #define SYSTEM_BIT_SAMPLE_ID BITFIELD64_BIT(SYSTEM_VALUE_SAMPLE_ID) #define SYSTEM_BIT_SAMPLE_POS BITFIELD64_BIT(SYSTEM_VALUE_SAMPLE_POS) +#define SYSTEM_BIT_SAMPLE_MASK_IN BITFIELD64_BIT(SYSTEM_VALUE_SAMPLE_MASK_IN) /** * Determine if the given gl_varying_slot appears in the fragment shader. @@ -1193,6 +1194,11 @@ struct gl_texture_object pressure? */ GLboolean Immutable; /**< GL_ARB_texture_storage */ + GLuint MinLevel; /**< GL_ARB_texture_view */ + GLuint MinLayer; /**< GL_ARB_texture_view */ + GLuint NumLevels; /**< GL_ARB_texture_view */ + GLuint NumLayers; /**< GL_ARB_texture_view */ + /** Actual texture images, indexed by [cube face] and [mipmap level] */ struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS]; @@ -1968,12 +1974,13 @@ typedef enum */ typedef enum { - SYSTEM_VALUE_FRONT_FACE, /**< Fragment shader only (not done yet) */ - SYSTEM_VALUE_VERTEX_ID, /**< Vertex shader only */ - SYSTEM_VALUE_INSTANCE_ID, /**< Vertex shader only */ - SYSTEM_VALUE_SAMPLE_ID, /**< Fragment shader only */ - SYSTEM_VALUE_SAMPLE_POS, /**< Fragment shader only */ - SYSTEM_VALUE_MAX /**< Number of values */ + SYSTEM_VALUE_FRONT_FACE, /**< Fragment shader only (not done yet) */ + SYSTEM_VALUE_VERTEX_ID, /**< Vertex shader only */ + SYSTEM_VALUE_INSTANCE_ID, /**< Vertex shader only */ + SYSTEM_VALUE_SAMPLE_ID, /**< Fragment shader only */ + SYSTEM_VALUE_SAMPLE_POS, /**< Fragment shader only */ + SYSTEM_VALUE_SAMPLE_MASK_IN, /**< Fragment shader only */ + SYSTEM_VALUE_MAX /**< Number of values */ } gl_system_value; @@ -2132,6 +2139,12 @@ struct gl_fragment_program * uses centroid interpolation, 0 otherwise. Unused inputs are 0. */ GLbitfield64 IsCentroid; + + /** + * Bitfield indicating, for each fragment shader input, 1 if that input + * uses sample interpolation, 0 otherwise. Unused inputs are 0. + */ + GLbitfield64 IsSample; }; @@ -2352,9 +2365,7 @@ struct gl_shader struct exec_list *ir; struct glsl_symbol_table *symbols; - /** Shaders containing built-in functions that are used for linking. */ - struct gl_shader *builtins_to_link[16]; - unsigned num_builtins_to_link; + bool uses_builtin_functions; /** * Geometry shader state from GLSL 1.50 layout qualifiers. @@ -2388,9 +2399,10 @@ typedef enum MESA_SHADER_VERTEX = 0, MESA_SHADER_GEOMETRY = 1, MESA_SHADER_FRAGMENT = 2, - MESA_SHADER_TYPES = 3 } gl_shader_type; +#define MESA_SHADER_TYPES (MESA_SHADER_FRAGMENT + 1) + struct gl_uniform_buffer_variable { @@ -3374,6 +3386,7 @@ struct gl_extensions GLboolean ARB_texture_query_lod; GLboolean ARB_texture_rg; GLboolean ARB_texture_rgb10_a2ui; + GLboolean ARB_texture_view; GLboolean ARB_timer_query; GLboolean ARB_transform_feedback2; GLboolean ARB_transform_feedback3; @@ -3395,7 +3408,6 @@ struct gl_extensions GLboolean EXT_framebuffer_sRGB; GLboolean EXT_gpu_program_parameters; GLboolean EXT_gpu_shader4; - GLboolean EXT_packed_depth_stencil; GLboolean EXT_packed_float; GLboolean EXT_pixel_buffer_object; GLboolean EXT_point_parameters; @@ -3432,7 +3444,6 @@ struct gl_extensions GLboolean ATI_fragment_shader; GLboolean ATI_separate_stencil; GLboolean MESA_pack_invert; - GLboolean MESA_texture_array; GLboolean MESA_ycbcr_texture; GLboolean NV_conditional_render; GLboolean NV_fog_distance; diff --git a/mesalib/src/mesa/main/performance_monitor.c b/mesalib/src/mesa/main/performance_monitor.c index 4981e6fb2..e62f77012 100644 --- a/mesalib/src/mesa/main/performance_monitor.c +++ b/mesalib/src/mesa/main/performance_monitor.c @@ -93,6 +93,25 @@ fail: return NULL; } +static void +free_performance_monitor(GLuint key, void *data, void *user) +{ + struct gl_perf_monitor_object *m = data; + struct gl_context *ctx = user; + + ralloc_free(m->ActiveGroups); + ralloc_free(m->ActiveCounters); + ctx->Driver.DeletePerfMonitor(ctx, m); +} + +void +_mesa_free_performance_monitors(struct gl_context *ctx) +{ + _mesa_HashDeleteAll(ctx->PerfMonitor.Monitors, + free_performance_monitor, ctx); + _mesa_DeleteHashTable(ctx->PerfMonitor.Monitors); +} + static inline struct gl_perf_monitor_object * lookup_monitor(struct gl_context *ctx, GLuint id) { diff --git a/mesalib/src/mesa/main/performance_monitor.h b/mesalib/src/mesa/main/performance_monitor.h index a852a4184..76234e5c1 100644 --- a/mesalib/src/mesa/main/performance_monitor.h +++ b/mesalib/src/mesa/main/performance_monitor.h @@ -35,6 +35,9 @@ extern void _mesa_init_performance_monitors(struct gl_context *ctx); +extern void +_mesa_free_performance_monitors(struct gl_context *ctx); + extern void GLAPIENTRY _mesa_GetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups); diff --git a/mesalib/src/mesa/main/shader_query.cpp b/mesalib/src/mesa/main/shader_query.cpp index 3014a9778..f14e1a562 100644 --- a/mesalib/src/mesa/main/shader_query.cpp +++ b/mesalib/src/mesa/main/shader_query.cpp @@ -106,8 +106,8 @@ _mesa_GetActiveAttrib(GLhandleARB program, GLuint desired_index, const ir_variable *const var = ((ir_instruction *) node)->as_variable(); if (var == NULL - || var->mode != ir_var_shader_in - || var->location == -1) + || var->data.mode != ir_var_shader_in + || var->data.location == -1) continue; if (current_index == desired_index) { @@ -169,13 +169,13 @@ _mesa_GetAttribLocation(GLhandleARB program, const GLcharARB * name) * attribute, or if an error occurs, -1 will be returned." */ if (var == NULL - || var->mode != ir_var_shader_in - || var->location == -1 - || var->location < VERT_ATTRIB_GENERIC0) + || var->data.mode != ir_var_shader_in + || var->data.location == -1 + || var->data.location < VERT_ATTRIB_GENERIC0) continue; if (strcmp(var->name, name) == 0) - return var->location - VERT_ATTRIB_GENERIC0; + return var->data.location - VERT_ATTRIB_GENERIC0; } return -1; @@ -197,8 +197,8 @@ _mesa_count_active_attribs(struct gl_shader_program *shProg) const ir_variable *const var = ((ir_instruction *) node)->as_variable(); if (var == NULL - || var->mode != ir_var_shader_in - || var->location == -1) + || var->data.mode != ir_var_shader_in + || var->data.location == -1) continue; i++; @@ -223,8 +223,8 @@ _mesa_longest_attribute_name_length(struct gl_shader_program *shProg) const ir_variable *const var = ((ir_instruction *) node)->as_variable(); if (var == NULL - || var->mode != ir_var_shader_in - || var->location == -1) + || var->data.mode != ir_var_shader_in + || var->data.location == -1) continue; const size_t len = strlen(var->name); @@ -333,13 +333,13 @@ _mesa_GetFragDataIndex(GLuint program, const GLchar *name) * attribute, or if an error occurs, -1 will be returned." */ if (var == NULL - || var->mode != ir_var_shader_out - || var->location == -1 - || var->location < FRAG_RESULT_DATA0) + || var->data.mode != ir_var_shader_out + || var->data.location == -1 + || var->data.location < FRAG_RESULT_DATA0) continue; if (strcmp(var->name, name) == 0) - return var->index; + return var->data.index; } return -1; @@ -389,13 +389,13 @@ _mesa_GetFragDataLocation(GLuint program, const GLchar *name) * attribute, or if an error occurs, -1 will be returned." */ if (var == NULL - || var->mode != ir_var_shader_out - || var->location == -1 - || var->location < FRAG_RESULT_DATA0) + || var->data.mode != ir_var_shader_out + || var->data.location == -1 + || var->data.location < FRAG_RESULT_DATA0) continue; if (strcmp(var->name, name) == 0) - return var->location - FRAG_RESULT_DATA0; + return var->data.location - FRAG_RESULT_DATA0; } return -1; diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index 1d9aac39d..4f3be68a4 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -414,7 +414,7 @@ detach_shader(struct gl_context *ctx, GLuint program, GLuint shader) err = GL_INVALID_OPERATION; else err = GL_INVALID_VALUE; - _mesa_error(ctx, err, "glDetachProgram(shader)"); + _mesa_error(ctx, err, "glDetachShader(shader)"); return; } } diff --git a/mesalib/src/mesa/main/shaderobj.h b/mesalib/src/mesa/main/shaderobj.h index de1c9fcaf..aff178f26 100644 --- a/mesalib/src/mesa/main/shaderobj.h +++ b/mesalib/src/mesa/main/shaderobj.h @@ -113,7 +113,7 @@ _mesa_shader_type_to_index(GLenum v) return MESA_SHADER_GEOMETRY; default: ASSERT(0 && "bad value in _mesa_shader_type_to_index()"); - return MESA_SHADER_TYPES; + return MESA_SHADER_VERTEX; } } diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c index d66ca1abc..200d29c2f 100644 --- a/mesalib/src/mesa/main/texgetimage.c +++ b/mesalib/src/mesa/main/texgetimage.c @@ -759,8 +759,7 @@ legal_getteximage_target(struct gl_context *ctx, GLenum target) return ctx->Extensions.NV_texture_rectangle; case GL_TEXTURE_1D_ARRAY_EXT: case GL_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + return ctx->Extensions.EXT_texture_array; case GL_TEXTURE_CUBE_MAP_ARRAY: return ctx->Extensions.ARB_texture_cube_map_array; default: diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 793c5d382..9c3f1e86e 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -48,6 +48,7 @@ #include "texobj.h" #include "texstate.h" #include "texstorage.h" +#include "textureview.h" #include "mtypes.h" #include "glformats.h" @@ -300,14 +301,12 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } } - if (ctx->Extensions.EXT_packed_depth_stencil) { - switch (internalFormat) { - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: - return GL_DEPTH_STENCIL_EXT; - default: - ; /* fallthrough */ - } + switch (internalFormat) { + case GL_DEPTH_STENCIL: + case GL_DEPTH24_STENCIL8: + return GL_DEPTH_STENCIL; + default: + ; /* fallthrough */ } if (ctx->Extensions.EXT_texture_sRGB) { @@ -752,8 +751,7 @@ _mesa_select_tex_object(struct gl_context *ctx, const struct gl_texture_unit *texUnit, GLenum target) { - const GLboolean arrayTex = (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + const GLboolean arrayTex = ctx->Extensions.EXT_texture_array; switch (target) { case GL_TEXTURE_1D: @@ -1018,8 +1016,7 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target) case GL_PROXY_TEXTURE_1D_ARRAY_EXT: case GL_TEXTURE_2D_ARRAY_EXT: case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array) + return ctx->Extensions.EXT_texture_array ? ctx->Const.MaxTextureLevels : 0; case GL_TEXTURE_CUBE_MAP_ARRAY: case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: @@ -1726,8 +1723,7 @@ target_can_be_compressed(const struct gl_context *ctx, GLenum target, return ctx->Extensions.ARB_texture_cube_map; case GL_PROXY_TEXTURE_2D_ARRAY_EXT: case GL_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + return ctx->Extensions.EXT_texture_array; case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: case GL_TEXTURE_CUBE_MAP_ARRAY: return ctx->Extensions.ARB_texture_cube_map_array; @@ -1775,9 +1771,7 @@ legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target) && ctx->Extensions.NV_texture_rectangle; case GL_TEXTURE_1D_ARRAY_EXT: case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - return _mesa_is_desktop_gl(ctx) - && (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array; default: return GL_FALSE; } @@ -1788,14 +1782,10 @@ legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target) case GL_PROXY_TEXTURE_3D: return _mesa_is_desktop_gl(ctx); case GL_TEXTURE_2D_ARRAY_EXT: - return (_mesa_is_desktop_gl(ctx) - && (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array)) + return (_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array) || _mesa_is_gles3(ctx); case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return _mesa_is_desktop_gl(ctx) - && (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array; case GL_TEXTURE_CUBE_MAP_ARRAY: case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: return ctx->Extensions.ARB_texture_cube_map_array; @@ -1836,9 +1826,7 @@ legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target) return _mesa_is_desktop_gl(ctx) && ctx->Extensions.NV_texture_rectangle; case GL_TEXTURE_1D_ARRAY_EXT: - return _mesa_is_desktop_gl(ctx) - && (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array; default: return GL_FALSE; } @@ -1847,9 +1835,7 @@ legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target) case GL_TEXTURE_3D: return GL_TRUE; case GL_TEXTURE_2D_ARRAY_EXT: - return (_mesa_is_desktop_gl(ctx) - && (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array)) + return (_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array) || _mesa_is_gles3(ctx); case GL_TEXTURE_CUBE_MAP_ARRAY: case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: @@ -2870,7 +2856,7 @@ _mesa_choose_texture_format(struct gl_context *ctx, } /* If the application requested compression to an S3TC format but we don't - * have the DTXn library, force a generic compressed format instead. + * have the DXTn library, force a generic compressed format instead. */ if (internalFormat != format && format != GL_NONE) { const GLenum before = internalFormat; @@ -3892,87 +3878,108 @@ _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, static gl_format get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat) { + if (ctx->API != API_OPENGL_CORE) { + switch (internalFormat) { + case GL_ALPHA8: + return MESA_FORMAT_A8; + case GL_ALPHA16: + return MESA_FORMAT_A16; + case GL_ALPHA16F_ARB: + return MESA_FORMAT_ALPHA_FLOAT16; + case GL_ALPHA32F_ARB: + return MESA_FORMAT_ALPHA_FLOAT32; + case GL_ALPHA8I_EXT: + return MESA_FORMAT_ALPHA_INT8; + case GL_ALPHA16I_EXT: + return MESA_FORMAT_ALPHA_INT16; + case GL_ALPHA32I_EXT: + return MESA_FORMAT_ALPHA_INT32; + case GL_ALPHA8UI_EXT: + return MESA_FORMAT_ALPHA_UINT8; + case GL_ALPHA16UI_EXT: + return MESA_FORMAT_ALPHA_UINT16; + case GL_ALPHA32UI_EXT: + return MESA_FORMAT_ALPHA_UINT32; + case GL_LUMINANCE8: + return MESA_FORMAT_L8; + case GL_LUMINANCE16: + return MESA_FORMAT_L16; + case GL_LUMINANCE16F_ARB: + return MESA_FORMAT_LUMINANCE_FLOAT16; + case GL_LUMINANCE32F_ARB: + return MESA_FORMAT_LUMINANCE_FLOAT32; + case GL_LUMINANCE8I_EXT: + return MESA_FORMAT_LUMINANCE_INT8; + case GL_LUMINANCE16I_EXT: + return MESA_FORMAT_LUMINANCE_INT16; + case GL_LUMINANCE32I_EXT: + return MESA_FORMAT_LUMINANCE_INT32; + case GL_LUMINANCE8UI_EXT: + return MESA_FORMAT_LUMINANCE_UINT8; + case GL_LUMINANCE16UI_EXT: + return MESA_FORMAT_LUMINANCE_UINT16; + case GL_LUMINANCE32UI_EXT: + return MESA_FORMAT_LUMINANCE_UINT32; + case GL_LUMINANCE8_ALPHA8: + return MESA_FORMAT_AL88; + case GL_LUMINANCE16_ALPHA16: + return MESA_FORMAT_AL1616; + case GL_LUMINANCE_ALPHA16F_ARB: + return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16; + case GL_LUMINANCE_ALPHA32F_ARB: + return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32; + case GL_LUMINANCE_ALPHA8I_EXT: + return MESA_FORMAT_LUMINANCE_ALPHA_INT8; + case GL_LUMINANCE_ALPHA16I_EXT: + return MESA_FORMAT_LUMINANCE_ALPHA_INT8; + case GL_LUMINANCE_ALPHA32I_EXT: + return MESA_FORMAT_LUMINANCE_ALPHA_INT16; + case GL_LUMINANCE_ALPHA8UI_EXT: + return MESA_FORMAT_LUMINANCE_ALPHA_UINT8; + case GL_LUMINANCE_ALPHA16UI_EXT: + return MESA_FORMAT_LUMINANCE_ALPHA_UINT16; + case GL_LUMINANCE_ALPHA32UI_EXT: + return MESA_FORMAT_LUMINANCE_ALPHA_UINT32; + case GL_INTENSITY8: + return MESA_FORMAT_I8; + case GL_INTENSITY16: + return MESA_FORMAT_I16; + case GL_INTENSITY16F_ARB: + return MESA_FORMAT_INTENSITY_FLOAT16; + case GL_INTENSITY32F_ARB: + return MESA_FORMAT_INTENSITY_FLOAT32; + case GL_INTENSITY8I_EXT: + return MESA_FORMAT_INTENSITY_INT8; + case GL_INTENSITY16I_EXT: + return MESA_FORMAT_INTENSITY_INT16; + case GL_INTENSITY32I_EXT: + return MESA_FORMAT_INTENSITY_INT32; + case GL_INTENSITY8UI_EXT: + return MESA_FORMAT_INTENSITY_UINT8; + case GL_INTENSITY16UI_EXT: + return MESA_FORMAT_INTENSITY_UINT16; + case GL_INTENSITY32UI_EXT: + return MESA_FORMAT_INTENSITY_UINT32; + default: + break; + } + } + + if (ctx->API == API_OPENGL_CORE && + ctx->Extensions.ARB_texture_buffer_object_rgb32) { + switch (internalFormat) { + case GL_RGB32F: + return MESA_FORMAT_RGB_FLOAT32; + case GL_RGB32UI: + return MESA_FORMAT_RGB_UINT32; + case GL_RGB32I: + return MESA_FORMAT_RGB_INT32; + default: + break; + } + } + switch (internalFormat) { - case GL_ALPHA8: - return MESA_FORMAT_A8; - case GL_ALPHA16: - return MESA_FORMAT_A16; - case GL_ALPHA16F_ARB: - return MESA_FORMAT_ALPHA_FLOAT16; - case GL_ALPHA32F_ARB: - return MESA_FORMAT_ALPHA_FLOAT32; - case GL_ALPHA8I_EXT: - return MESA_FORMAT_ALPHA_INT8; - case GL_ALPHA16I_EXT: - return MESA_FORMAT_ALPHA_INT16; - case GL_ALPHA32I_EXT: - return MESA_FORMAT_ALPHA_INT32; - case GL_ALPHA8UI_EXT: - return MESA_FORMAT_ALPHA_UINT8; - case GL_ALPHA16UI_EXT: - return MESA_FORMAT_ALPHA_UINT16; - case GL_ALPHA32UI_EXT: - return MESA_FORMAT_ALPHA_UINT32; - case GL_LUMINANCE8: - return MESA_FORMAT_L8; - case GL_LUMINANCE16: - return MESA_FORMAT_L16; - case GL_LUMINANCE16F_ARB: - return MESA_FORMAT_LUMINANCE_FLOAT16; - case GL_LUMINANCE32F_ARB: - return MESA_FORMAT_LUMINANCE_FLOAT32; - case GL_LUMINANCE8I_EXT: - return MESA_FORMAT_LUMINANCE_INT8; - case GL_LUMINANCE16I_EXT: - return MESA_FORMAT_LUMINANCE_INT16; - case GL_LUMINANCE32I_EXT: - return MESA_FORMAT_LUMINANCE_INT32; - case GL_LUMINANCE8UI_EXT: - return MESA_FORMAT_LUMINANCE_UINT8; - case GL_LUMINANCE16UI_EXT: - return MESA_FORMAT_LUMINANCE_UINT16; - case GL_LUMINANCE32UI_EXT: - return MESA_FORMAT_LUMINANCE_UINT32; - case GL_LUMINANCE8_ALPHA8: - return MESA_FORMAT_AL88; - case GL_LUMINANCE16_ALPHA16: - return MESA_FORMAT_AL1616; - case GL_LUMINANCE_ALPHA16F_ARB: - return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16; - case GL_LUMINANCE_ALPHA32F_ARB: - return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32; - case GL_LUMINANCE_ALPHA8I_EXT: - return MESA_FORMAT_LUMINANCE_ALPHA_INT8; - case GL_LUMINANCE_ALPHA16I_EXT: - return MESA_FORMAT_LUMINANCE_ALPHA_INT8; - case GL_LUMINANCE_ALPHA32I_EXT: - return MESA_FORMAT_LUMINANCE_ALPHA_INT16; - case GL_LUMINANCE_ALPHA8UI_EXT: - return MESA_FORMAT_LUMINANCE_ALPHA_UINT8; - case GL_LUMINANCE_ALPHA16UI_EXT: - return MESA_FORMAT_LUMINANCE_ALPHA_UINT16; - case GL_LUMINANCE_ALPHA32UI_EXT: - return MESA_FORMAT_LUMINANCE_ALPHA_UINT32; - case GL_INTENSITY8: - return MESA_FORMAT_I8; - case GL_INTENSITY16: - return MESA_FORMAT_I16; - case GL_INTENSITY16F_ARB: - return MESA_FORMAT_INTENSITY_FLOAT16; - case GL_INTENSITY32F_ARB: - return MESA_FORMAT_INTENSITY_FLOAT32; - case GL_INTENSITY8I_EXT: - return MESA_FORMAT_INTENSITY_INT8; - case GL_INTENSITY16I_EXT: - return MESA_FORMAT_INTENSITY_INT16; - case GL_INTENSITY32I_EXT: - return MESA_FORMAT_INTENSITY_INT32; - case GL_INTENSITY8UI_EXT: - return MESA_FORMAT_INTENSITY_UINT8; - case GL_INTENSITY16UI_EXT: - return MESA_FORMAT_INTENSITY_UINT16; - case GL_INTENSITY32UI_EXT: - return MESA_FORMAT_INTENSITY_UINT32; case GL_RGBA8: return MESA_FORMAT_RGBA8888_REV; case GL_RGBA16: @@ -4036,21 +4043,15 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat) case GL_R32UI: return MESA_FORMAT_R_UINT32; - case GL_RGB32F: - return MESA_FORMAT_RGB_FLOAT32; - case GL_RGB32UI: - return MESA_FORMAT_RGB_UINT32; - case GL_RGB32I: - return MESA_FORMAT_RGB_INT32; - default: return MESA_FORMAT_NONE; } } -static gl_format -validate_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat) +gl_format +_mesa_validate_texbuffer_format(const struct gl_context *ctx, + GLenum internalFormat) { gl_format format = get_texbuffer_format(ctx, internalFormat); GLenum datatype; @@ -4065,15 +4066,10 @@ validate_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat) if (datatype == GL_HALF_FLOAT && !ctx->Extensions.ARB_half_float_pixel) return MESA_FORMAT_NONE; - /* The GL_ARB_texture_rg and GL_ARB_texture_buffer_object specs don't make - * any mention of R/RG formats, but they appear in the GL 3.1 core - * specification. - */ - if (ctx->Version <= 30) { + if (!ctx->Extensions.ARB_texture_rg) { GLenum base_format = _mesa_get_format_base_format(format); - if (base_format == GL_R || base_format == GL_RG) - return MESA_FORMAT_NONE; + return MESA_FORMAT_NONE; } if (!ctx->Extensions.ARB_texture_buffer_object_rgb32) { @@ -4100,7 +4096,7 @@ texbufferrange(struct gl_context *ctx, GLenum target, GLenum internalFormat, return; } - format = validate_texbuffer_format(ctx, internalFormat); + format = _mesa_validate_texbuffer_format(ctx, internalFormat); if (format == MESA_FORMAT_NONE) { _mesa_error(ctx, GL_INVALID_ENUM, "glTexBuffer(internalFormat 0x%x)", internalFormat); @@ -4348,6 +4344,11 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples, } texObj->Immutable = immutable; + + if (immutable) { + _mesa_set_texture_view_state(ctx, texObj, target, 1); + } + _mesa_update_fbo_texture(ctx, texObj, 0, 0); } } diff --git a/mesalib/src/mesa/main/teximage.h b/mesalib/src/mesa/main/teximage.h index 792383d2f..0b5786340 100644 --- a/mesalib/src/mesa/main/teximage.h +++ b/mesalib/src/mesa/main/teximage.h @@ -147,6 +147,10 @@ _mesa_legal_texture_dimensions(struct gl_context *ctx, GLenum target, GLint level, GLint width, GLint height, GLint depth, GLint border); +extern gl_format +_mesa_validate_texbuffer_format(const struct gl_context *ctx, + GLenum internalFormat); + /** * Lock a texture for updating. See also _mesa_lock_context_textures(). */ diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c index abd30c563..d6510fefd 100644 --- a/mesalib/src/mesa/main/texobj.c +++ b/mesalib/src/mesa/main/texobj.c @@ -552,7 +552,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, t->_MaxLevel = MIN3(t->MaxLevel, /* 'p' in the GL spec */ - baseLevel + baseImage->MaxNumLevels - 1, + (int) (baseLevel + baseImage->MaxNumLevels - 1), /* 'q' in the GL spec */ maxLevels - 1); @@ -889,6 +889,8 @@ count_tex_size(GLuint key, void *data, void *userData) (const struct gl_texture_object *) data; GLuint *total = (GLuint *) userData; + (void) key; + *total = *total + texture_size(texObj); } @@ -1171,7 +1173,7 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures) * \return TEXTURE_x_INDEX or -1 if target is invalid */ static GLint -target_enum_to_index(struct gl_context *ctx, GLenum target) +target_enum_to_index(const struct gl_context *ctx, GLenum target) { switch (target) { case GL_TEXTURE_1D: @@ -1179,25 +1181,21 @@ target_enum_to_index(struct gl_context *ctx, GLenum target) case GL_TEXTURE_2D: return TEXTURE_2D_INDEX; case GL_TEXTURE_3D: - return TEXTURE_3D_INDEX; - case GL_TEXTURE_CUBE_MAP_ARB: + return ctx->API != API_OPENGLES ? TEXTURE_3D_INDEX : -1; + case GL_TEXTURE_CUBE_MAP: return ctx->Extensions.ARB_texture_cube_map ? TEXTURE_CUBE_INDEX : -1; - case GL_TEXTURE_RECTANGLE_NV: + case GL_TEXTURE_RECTANGLE: return _mesa_is_desktop_gl(ctx) && ctx->Extensions.NV_texture_rectangle ? TEXTURE_RECT_INDEX : -1; - case GL_TEXTURE_1D_ARRAY_EXT: - return _mesa_is_desktop_gl(ctx) - && (ctx->Extensions.EXT_texture_array - || ctx->Extensions.MESA_texture_array) + case GL_TEXTURE_1D_ARRAY: + return _mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array ? TEXTURE_1D_ARRAY_INDEX : -1; - case GL_TEXTURE_2D_ARRAY_EXT: - return (_mesa_is_desktop_gl(ctx) - && (ctx->Extensions.EXT_texture_array - || ctx->Extensions.MESA_texture_array)) + case GL_TEXTURE_2D_ARRAY: + return (_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array) || _mesa_is_gles3(ctx) ? TEXTURE_2D_ARRAY_INDEX : -1; - case GL_TEXTURE_BUFFER_ARB: + case GL_TEXTURE_BUFFER: return ctx->API == API_OPENGL_CORE && ctx->Extensions.ARB_texture_buffer_object ? TEXTURE_BUFFER_INDEX : -1; @@ -1205,7 +1203,8 @@ target_enum_to_index(struct gl_context *ctx, GLenum target) return _mesa_is_gles(ctx) && ctx->Extensions.OES_EGL_image_external ? TEXTURE_EXTERNAL_INDEX : -1; case GL_TEXTURE_CUBE_MAP_ARRAY: - return TEXTURE_CUBE_ARRAY_INDEX; + return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_cube_map_array + ? TEXTURE_CUBE_ARRAY_INDEX : -1; case GL_TEXTURE_2D_MULTISAMPLE: return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_multisample ? TEXTURE_2D_MULTISAMPLE_INDEX: -1; diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c index 7092c630b..94e498d20 100644 --- a/mesalib/src/mesa/main/texparam.c +++ b/mesalib/src/mesa/main/texparam.c @@ -158,16 +158,13 @@ get_texobj(struct gl_context *ctx, GLenum target, GLboolean get) } break; case GL_TEXTURE_1D_ARRAY_EXT: - if (_mesa_is_desktop_gl(ctx) - && (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array)) { + if (_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_texture_array) { return texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX]; } break; case GL_TEXTURE_2D_ARRAY_EXT: if ((_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) - && (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array)) { + && ctx->Extensions.EXT_texture_array) { return texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX]; } break; @@ -1046,8 +1043,7 @@ legal_get_tex_level_parameter_target(struct gl_context *ctx, GLenum target) case GL_PROXY_TEXTURE_1D_ARRAY_EXT: case GL_TEXTURE_2D_ARRAY_EXT: case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + return ctx->Extensions.EXT_texture_array; case GL_TEXTURE_BUFFER: /* GetTexLevelParameter accepts GL_TEXTURE_BUFFER in GL 3.1+ contexts, * but not in earlier versions that expose ARB_texture_buffer_object. @@ -1166,10 +1162,7 @@ get_tex_level_parameter_image(struct gl_context *ctx, goto invalid_pname; *params = _mesa_get_format_bits(texFormat, pname); break; - case GL_TEXTURE_STENCIL_SIZE_EXT: - if (!ctx->Extensions.EXT_packed_depth_stencil && - !ctx->Extensions.ARB_framebuffer_object) - goto invalid_pname; + case GL_TEXTURE_STENCIL_SIZE: *params = _mesa_get_format_bits(texFormat, pname); break; case GL_TEXTURE_SHARED_SIZE: @@ -1562,9 +1555,35 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) break; case GL_TEXTURE_IMMUTABLE_LEVELS: - if (!_mesa_is_gles3(ctx)) + if (_mesa_is_gles3(ctx) || + (_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_view)) + *params = (GLfloat) obj->ImmutableLevels; + else goto invalid_pname; - *params = (GLfloat) obj->ImmutableLevels; + break; + + case GL_TEXTURE_VIEW_MIN_LEVEL: + if (!ctx->Extensions.ARB_texture_view) + goto invalid_pname; + *params = (GLfloat) obj->MinLevel; + break; + + case GL_TEXTURE_VIEW_NUM_LEVELS: + if (!ctx->Extensions.ARB_texture_view) + goto invalid_pname; + *params = (GLfloat) obj->NumLevels; + break; + + case GL_TEXTURE_VIEW_MIN_LAYER: + if (!ctx->Extensions.ARB_texture_view) + goto invalid_pname; + *params = (GLfloat) obj->MinLayer; + break; + + case GL_TEXTURE_VIEW_NUM_LAYERS: + if (!ctx->Extensions.ARB_texture_view) + goto invalid_pname; + *params = (GLfloat) obj->NumLayers; break; case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES: @@ -1746,9 +1765,35 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) break; case GL_TEXTURE_IMMUTABLE_LEVELS: - if (!_mesa_is_gles3(ctx)) + if (_mesa_is_gles3(ctx) || + (_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_view)) + *params = obj->ImmutableLevels; + else + goto invalid_pname; + break; + + case GL_TEXTURE_VIEW_MIN_LEVEL: + if (!ctx->Extensions.ARB_texture_view) + goto invalid_pname; + *params = (GLint) obj->MinLevel; + break; + + case GL_TEXTURE_VIEW_NUM_LEVELS: + if (!ctx->Extensions.ARB_texture_view) + goto invalid_pname; + *params = (GLint) obj->NumLevels; + break; + + case GL_TEXTURE_VIEW_MIN_LAYER: + if (!ctx->Extensions.ARB_texture_view) + goto invalid_pname; + *params = (GLint) obj->MinLayer; + break; + + case GL_TEXTURE_VIEW_NUM_LAYERS: + if (!ctx->Extensions.ARB_texture_view) goto invalid_pname; - *params = obj->ImmutableLevels; + *params = (GLint) obj->NumLayers; break; case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES: diff --git a/mesalib/src/mesa/main/texstorage.c b/mesalib/src/mesa/main/texstorage.c index 84b8f8224..5062fdb4f 100644 --- a/mesalib/src/mesa/main/texstorage.c +++ b/mesalib/src/mesa/main/texstorage.c @@ -37,7 +37,9 @@ #include "macros.h" #include "teximage.h" #include "texobj.h" +#include "mipmap.h" #include "texstorage.h" +#include "textureview.h" #include "mtypes.h" @@ -73,8 +75,7 @@ legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) return ctx->Extensions.NV_texture_rectangle; case GL_TEXTURE_1D_ARRAY: case GL_PROXY_TEXTURE_1D_ARRAY: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + return ctx->Extensions.EXT_texture_array; default: return GL_FALSE; } @@ -85,8 +86,7 @@ legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) return GL_TRUE; case GL_TEXTURE_2D_ARRAY: case GL_PROXY_TEXTURE_2D_ARRAY: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); + return ctx->Extensions.EXT_texture_array; case GL_TEXTURE_CUBE_MAP_ARRAY: case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: return ctx->Extensions.ARB_texture_cube_map_array; @@ -100,27 +100,6 @@ legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) } -/** - * Compute the size of the next mipmap level. - */ -static void -next_mipmap_level_size(GLenum target, - GLint *width, GLint *height, GLint *depth) -{ - if (*width > 1) { - *width /= 2; - } - - if ((*height > 1) && (target != GL_TEXTURE_1D_ARRAY)) { - *height /= 2; - } - - if ((*depth > 1) && (target != GL_TEXTURE_2D_ARRAY)) { - *depth /= 2; - } -} - - /** Helper to get a particular texture image in a texture object */ static struct gl_texture_image * get_tex_image(struct gl_context *ctx, @@ -164,7 +143,8 @@ initialize_texture_fields(struct gl_context *ctx, 0, internalFormat, texFormat); } - next_mipmap_level_size(target, &levelWidth, &levelHeight, &levelDepth); + _mesa_next_mipmap_level_size(target, 0, levelWidth, levelHeight, levelDepth, + &levelWidth, &levelHeight, &levelDepth); } return GL_TRUE; } @@ -436,8 +416,8 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat, return; } - texObj->Immutable = GL_TRUE; - texObj->ImmutableLevels = levels; + _mesa_set_texture_view_state(ctx, texObj, target, levels); + } } diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index 76d8d9ba3..5adbd5dc9 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -3864,6 +3864,7 @@ _mesa_texstore_memcpy(TEXSTORE_PARAMS) /** * Store user data into texture memory. * Called via glTex[Sub]Image1/2/3D() + * \return GL_TRUE for success, GL_FALSE for failure (out of memory). */ GLboolean _mesa_texstore(TEXSTORE_PARAMS) diff --git a/mesalib/src/mesa/main/textureview.c b/mesalib/src/mesa/main/textureview.c new file mode 100644 index 000000000..5f88a4171 --- /dev/null +++ b/mesalib/src/mesa/main/textureview.c @@ -0,0 +1,668 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 2013 LunarG, 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: + * Courtney Goeltzenleuchter <courtney@lunarg.com> + */ + + +/** + * \file textureview.c + * GL_ARB_texture_view functions + */ + +#include "glheader.h" +#include "context.h" +#include "enums.h" +#include "imports.h" +#include "macros.h" +#include "teximage.h" +#include "texobj.h" +#include "mipmap.h" +#include "texstorage.h" +#include "textureview.h" +#include "stdbool.h" +#include "mtypes.h" + +/* Table 3.X.2 (Compatible internal formats for TextureView) + --------------------------------------------------------------------------- + | Class | Internal formats | + --------------------------------------------------------------------------- + | VIEW_CLASS_128_BITS | RGBA32F, RGBA32UI, RGBA32I | + --------------------------------------------------------------------------- + | VIEW_CLASS_96_BITS | RGB32F, RGB32UI, RGB32I | + --------------------------------------------------------------------------- + | VIEW_CLASS_64_BITS | RGBA16F, RG32F, RGBA16UI, RG32UI, RGBA16I, | + | | RG32I, RGBA16, RGBA16_SNORM | + --------------------------------------------------------------------------- + | VIEW_CLASS_48_BITS | RGB16, RGB16_SNORM, RGB16F, RGB16UI, RGB16I | + --------------------------------------------------------------------------- + | VIEW_CLASS_32_BITS | RG16F, R11F_G11F_B10F, R32F, | + | | RGB10_A2UI, RGBA8UI, RG16UI, R32UI, | + | | RGBA8I, RG16I, R32I, RGB10_A2, RGBA8, RG16, | + | | RGBA8_SNORM, RG16_SNORM, SRGB8_ALPHA8, RGB9_E5 | + --------------------------------------------------------------------------- + | VIEW_CLASS_24_BITS | RGB8, RGB8_SNORM, SRGB8, RGB8UI, RGB8I | + --------------------------------------------------------------------------- + | VIEW_CLASS_16_BITS | R16F, RG8UI, R16UI, RG8I, R16I, RG8, R16, | + | | RG8_SNORM, R16_SNORM | + --------------------------------------------------------------------------- + | VIEW_CLASS_8_BITS | R8UI, R8I, R8, R8_SNORM | + --------------------------------------------------------------------------- + | VIEW_CLASS_RGTC1_RED | COMPRESSED_RED_RGTC1, | + | | COMPRESSED_SIGNED_RED_RGTC1 | + --------------------------------------------------------------------------- + | VIEW_CLASS_RGTC2_RG | COMPRESSED_RG_RGTC2, | + | | COMPRESSED_SIGNED_RG_RGTC2 | + --------------------------------------------------------------------------- + | VIEW_CLASS_BPTC_UNORM | COMPRESSED_RGBA_BPTC_UNORM, | + | | COMPRESSED_SRGB_ALPHA_BPTC_UNORM | + --------------------------------------------------------------------------- + | VIEW_CLASS_BPTC_FLOAT | COMPRESSED_RGB_BPTC_SIGNED_FLOAT, | + | | COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT | + --------------------------------------------------------------------------- + */ +struct internal_format_class_info { + GLenum view_class; + GLenum internal_format; +}; +static const struct internal_format_class_info compatible_internal_formats[] = { + {GL_VIEW_CLASS_128_BITS, GL_RGBA32F}, + {GL_VIEW_CLASS_128_BITS, GL_RGBA32UI}, + {GL_VIEW_CLASS_128_BITS, GL_RGBA32I}, + {GL_VIEW_CLASS_96_BITS, GL_RGB32F}, + {GL_VIEW_CLASS_96_BITS, GL_RGB32UI}, + {GL_VIEW_CLASS_96_BITS, GL_RGB32I}, + {GL_VIEW_CLASS_64_BITS, GL_RGBA16F}, + {GL_VIEW_CLASS_64_BITS, GL_RG32F}, + {GL_VIEW_CLASS_64_BITS, GL_RGBA16UI}, + {GL_VIEW_CLASS_64_BITS, GL_RG32UI}, + {GL_VIEW_CLASS_64_BITS, GL_RGBA16I}, + {GL_VIEW_CLASS_64_BITS, GL_RG32I}, + {GL_VIEW_CLASS_64_BITS, GL_RGBA16}, + {GL_VIEW_CLASS_64_BITS, GL_RGBA16_SNORM}, + {GL_VIEW_CLASS_48_BITS, GL_RGB16}, + {GL_VIEW_CLASS_48_BITS, GL_RGB16_SNORM}, + {GL_VIEW_CLASS_48_BITS, GL_RGB16F}, + {GL_VIEW_CLASS_48_BITS, GL_RGB16UI}, + {GL_VIEW_CLASS_48_BITS, GL_RGB16I}, + {GL_VIEW_CLASS_32_BITS, GL_RG16F}, + {GL_VIEW_CLASS_32_BITS, GL_R11F_G11F_B10F}, + {GL_VIEW_CLASS_32_BITS, GL_R32F}, + {GL_VIEW_CLASS_32_BITS, GL_RGB10_A2UI}, + {GL_VIEW_CLASS_32_BITS, GL_RGBA8UI}, + {GL_VIEW_CLASS_32_BITS, GL_RG16UI}, + {GL_VIEW_CLASS_32_BITS, GL_R32UI}, + {GL_VIEW_CLASS_32_BITS, GL_RGBA8I}, + {GL_VIEW_CLASS_32_BITS, GL_RG16I}, + {GL_VIEW_CLASS_32_BITS, GL_R32I}, + {GL_VIEW_CLASS_32_BITS, GL_RGB10_A2}, + {GL_VIEW_CLASS_32_BITS, GL_RGBA8}, + {GL_VIEW_CLASS_32_BITS, GL_RG16}, + {GL_VIEW_CLASS_32_BITS, GL_RGBA8_SNORM}, + {GL_VIEW_CLASS_32_BITS, GL_RG16_SNORM}, + {GL_VIEW_CLASS_32_BITS, GL_SRGB8_ALPHA8}, + {GL_VIEW_CLASS_32_BITS, GL_RGB9_E5}, + {GL_VIEW_CLASS_24_BITS, GL_RGB8}, + {GL_VIEW_CLASS_24_BITS, GL_RGB8_SNORM}, + {GL_VIEW_CLASS_24_BITS, GL_SRGB8}, + {GL_VIEW_CLASS_24_BITS, GL_RGB8UI}, + {GL_VIEW_CLASS_24_BITS, GL_RGB8I}, + {GL_VIEW_CLASS_16_BITS, GL_R16F}, + {GL_VIEW_CLASS_16_BITS, GL_RG8UI}, + {GL_VIEW_CLASS_16_BITS, GL_R16UI}, + {GL_VIEW_CLASS_16_BITS, GL_RG8I}, + {GL_VIEW_CLASS_16_BITS, GL_R16I}, + {GL_VIEW_CLASS_16_BITS, GL_RG8}, + {GL_VIEW_CLASS_16_BITS, GL_R16}, + {GL_VIEW_CLASS_16_BITS, GL_RG8_SNORM}, + {GL_VIEW_CLASS_16_BITS, GL_R16_SNORM}, + {GL_VIEW_CLASS_8_BITS, GL_R8UI}, + {GL_VIEW_CLASS_8_BITS, GL_R8I}, + {GL_VIEW_CLASS_8_BITS, GL_R8}, + {GL_VIEW_CLASS_8_BITS, GL_R8_SNORM}, + {GL_VIEW_CLASS_RGTC1_RED, GL_COMPRESSED_RED_RGTC1}, + {GL_VIEW_CLASS_RGTC1_RED, GL_COMPRESSED_SIGNED_RED_RGTC1}, + {GL_VIEW_CLASS_RGTC2_RG, GL_COMPRESSED_RG_RGTC2}, + {GL_VIEW_CLASS_RGTC2_RG, GL_COMPRESSED_SIGNED_RG_RGTC2}, + {GL_VIEW_CLASS_BPTC_UNORM, GL_COMPRESSED_RGBA_BPTC_UNORM_ARB}, + {GL_VIEW_CLASS_BPTC_UNORM, GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB}, + {GL_VIEW_CLASS_BPTC_FLOAT, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB}, + {GL_VIEW_CLASS_BPTC_FLOAT, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB}, +}; + +static const struct internal_format_class_info s3tc_compatible_internal_formats[] = { + {GL_VIEW_CLASS_S3TC_DXT1_RGB, GL_COMPRESSED_RGB_S3TC_DXT1_EXT}, + {GL_VIEW_CLASS_S3TC_DXT1_RGB, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT}, + {GL_VIEW_CLASS_S3TC_DXT1_RGBA, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT}, + {GL_VIEW_CLASS_S3TC_DXT1_RGBA, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT}, + {GL_VIEW_CLASS_S3TC_DXT3_RGBA, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT}, + {GL_VIEW_CLASS_S3TC_DXT3_RGBA, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT}, + {GL_VIEW_CLASS_S3TC_DXT5_RGBA, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT}, + {GL_VIEW_CLASS_S3TC_DXT5_RGBA, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}, +}; + +/** + * Lookup format view class based on internalformat + * \return VIEW_CLASS if internalformat found in table, false otherwise. + */ +static GLenum +lookup_view_class(struct gl_context *ctx, GLenum internalformat) +{ + GLuint i; + + for (i = 0; i < ARRAY_SIZE(compatible_internal_formats); i++) { + if (compatible_internal_formats[i].internal_format == internalformat) + return compatible_internal_formats[i].view_class; + } + + if (ctx->Extensions.EXT_texture_compression_s3tc && ctx->Extensions.EXT_texture_sRGB) { + for (i = 0; i < ARRAY_SIZE(s3tc_compatible_internal_formats); i++) { + if (s3tc_compatible_internal_formats[i].internal_format == internalformat) + return s3tc_compatible_internal_formats[i].view_class; + } + } + return GL_FALSE; +} + +/** + * Initialize new texture's gl_texture_image structures. Will not call driver + * to allocate new space, simply record relevant layer, face, format, etc. + * \return GL_FALSE if any error, GL_TRUE otherwise. + */ +static GLboolean +initialize_texture_fields(struct gl_context *ctx, + GLenum target, + struct gl_texture_object *texObj, + GLint levels, + GLsizei width, GLsizei height, GLsizei depth, + GLenum internalFormat, gl_format texFormat) +{ + const GLuint numFaces = _mesa_num_tex_faces(target); + GLint level, levelWidth = width, levelHeight = height, levelDepth = depth; + GLuint face; + + /* Pretend we are bound to initialize the gl_texture_image structs */ + texObj->Target = target; + + /* Set up all the texture object's gl_texture_images */ + for (level = 0; level < levels; level++) { + for (face = 0; face < numFaces; face++) { + struct gl_texture_image *texImage; + GLenum faceTarget = target; + + if (target == GL_TEXTURE_CUBE_MAP) + faceTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + face; + + texImage = _mesa_get_tex_image(ctx, texObj, faceTarget, level); + + if (!texImage) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexStorage"); + return GL_FALSE; + } + + _mesa_init_teximage_fields(ctx, texImage, + levelWidth, levelHeight, levelDepth, + 0, internalFormat, texFormat); + } + + _mesa_next_mipmap_level_size(target, 0, levelWidth, levelHeight, levelDepth, + &levelWidth, &levelHeight, &levelDepth); + } + + /* "unbind" */ + texObj->Target = 0; + + return GL_TRUE; +} + +#define RETURN_IF_SUPPORTED(t) do { \ + if (newTarget == GL_ ## t) \ + return true; \ +} while (0) + +/** + * Check for compatible target + * If an error is found, record it with _mesa_error() + * \return false if any error, true otherwise. + */ +static bool +target_valid(struct gl_context *ctx, GLenum origTarget, GLenum newTarget) +{ + /* + * From ARB_texture_view spec: + --------------------------------------------------------------------------------------------------------- + | Original target | Valid new targets | + --------------------------------------------------------------------------------------------------------- + | TEXTURE_1D | TEXTURE_1D, TEXTURE_1D_ARRAY | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_2D | TEXTURE_2D, TEXTURE_2D_ARRAY | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_3D | TEXTURE_3D | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_CUBE_MAP | TEXTURE_CUBE_MAP, TEXTURE_2D, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_RECTANGLE | TEXTURE_RECTANGLE | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_BUFFER | <none> | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_1D_ARRAY | TEXTURE_1D_ARRAY, TEXTURE_1D | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_2D_ARRAY | TEXTURE_2D_ARRAY, TEXTURE_2D, TEXTURE_CUBE_MAP, TEXTURE_CUBE_MAP_ARRAY | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_CUBE_MAP_ARRAY | TEXTURE_CUBE_MAP_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_2D, TEXTURE_CUBE_MAP | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_2D_MULTISAMPLE | TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY | + | ------------------------------------------------------------------------------------------------------- | + | TEXTURE_2D_MULTISAMPLE_ARRAY | TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY | + --------------------------------------------------------------------------------------------------------- + */ + + switch (origTarget) { + case GL_TEXTURE_1D: + case GL_TEXTURE_1D_ARRAY: + RETURN_IF_SUPPORTED(TEXTURE_1D); + RETURN_IF_SUPPORTED(TEXTURE_1D_ARRAY); + break; + case GL_TEXTURE_2D: + RETURN_IF_SUPPORTED(TEXTURE_2D); + RETURN_IF_SUPPORTED(TEXTURE_2D_ARRAY); + break; + case GL_TEXTURE_3D: + RETURN_IF_SUPPORTED(TEXTURE_3D); + break; + case GL_TEXTURE_RECTANGLE: + RETURN_IF_SUPPORTED(TEXTURE_RECTANGLE); + break; + case GL_TEXTURE_CUBE_MAP: + case GL_TEXTURE_2D_ARRAY: + case GL_TEXTURE_CUBE_MAP_ARRAY: + RETURN_IF_SUPPORTED(TEXTURE_2D); + RETURN_IF_SUPPORTED(TEXTURE_2D_ARRAY); + RETURN_IF_SUPPORTED(TEXTURE_CUBE_MAP); + RETURN_IF_SUPPORTED(TEXTURE_CUBE_MAP_ARRAY); + break; + case GL_TEXTURE_2D_MULTISAMPLE: + case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: + RETURN_IF_SUPPORTED(TEXTURE_2D_MULTISAMPLE); + RETURN_IF_SUPPORTED(TEXTURE_2D_MULTISAMPLE_ARRAY); + break; + } + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureView(illegal target=%s)", + _mesa_lookup_enum_by_nr(newTarget)); + return false; +} +#undef RETURN_IF_SUPPORTED + +/** + * Check for compatible format + * If an error is found, record it with _mesa_error() + * \return false if any error, true otherwise. + */ +static bool +compatible_format(struct gl_context *ctx, const struct gl_texture_object *origTexObj, + GLenum internalformat) +{ + /* Level 0 of a texture created by glTextureStorage or glTextureView + * is always defined. + */ + struct gl_texture_image *texImage = origTexObj->Image[0][0]; + GLint origInternalFormat = texImage->InternalFormat; + unsigned int origViewClass, newViewClass; + + /* The two textures' internal formats must be compatible according to + * Table 3.X.2 (Compatible internal formats for TextureView) + * if the internal format exists in that table the view class must match. + * The internal formats must be identical if not in that table, + * or an INVALID_OPERATION error is generated. + */ + if (origInternalFormat == internalformat) + return true; + + origViewClass = lookup_view_class(ctx, origInternalFormat); + newViewClass = lookup_view_class(ctx, internalformat); + if ((origViewClass == newViewClass) && origViewClass != false) + return true; + + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureView(internalformat %s not compatible with origtexture %s)", + _mesa_lookup_enum_by_nr(internalformat), + _mesa_lookup_enum_by_nr(origInternalFormat)); + return false; +} +/** + * Helper function for TexStorage and teximagemultisample to set immutable + * texture state needed by ARB_texture_view. + */ +void +_mesa_set_texture_view_state(struct gl_context *ctx, + struct gl_texture_object *texObj, + GLenum target, GLuint levels) +{ + struct gl_texture_image *texImage; + + /* Get a reference to what will become this View's base level */ + texImage = _mesa_select_tex_image(ctx, texObj, target, 0); + + /* When an immutable texture is created via glTexStorage or glTexImageMultisample, + * TEXTURE_IMMUTABLE_FORMAT becomes TRUE. + * TEXTURE_IMMUTABLE_LEVELS and TEXTURE_VIEW_NUM_LEVELS become levels. + * If the texture target is TEXTURE_1D_ARRAY then + * TEXTURE_VIEW_NUM_LAYERS becomes height. + * If the texture target is TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY, + * or TEXTURE_2D_MULTISAMPLE_ARRAY then TEXTURE_VIEW_NUM_LAYERS becomes depth. + * If the texture target is TEXTURE_CUBE_MAP, then + * TEXTURE_VIEW_NUM_LAYERS becomes 6. + * For any other texture target, TEXTURE_VIEW_NUM_LAYERS becomes 1. + * + * ARB_texture_multisample: Multisample textures do + * not have multiple image levels. + */ + + texObj->Immutable = GL_TRUE; + texObj->ImmutableLevels = levels; + texObj->MinLevel = 0; + texObj->NumLevels = levels; + texObj->MinLayer = 0; + texObj->NumLayers = 1; + switch (target) { + case GL_TEXTURE_1D_ARRAY: + texObj->NumLayers = texImage->Height; + break; + + case GL_TEXTURE_2D_MULTISAMPLE: + texObj->NumLevels = 1; + texObj->ImmutableLevels = 1; + break; + + case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: + texObj->NumLevels = 1; + texObj->ImmutableLevels = 1; + /* fall through to set NumLayers */ + + case GL_TEXTURE_2D_ARRAY: + case GL_TEXTURE_CUBE_MAP_ARRAY: + texObj->NumLayers = texImage->Depth; + break; + + case GL_TEXTURE_CUBE_MAP: + texObj->NumLayers = 6; + break; + + } +} + +/** + * glTextureView (ARB_texture_view) + * If an error is found, record it with _mesa_error() + * \return none. + */ +void GLAPIENTRY +_mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture, + GLenum internalformat, + GLuint minlevel, GLuint numlevels, + GLuint minlayer, GLuint numlayers) +{ + struct gl_texture_object *texObj; + struct gl_texture_object *origTexObj; + struct gl_texture_image *origTexImage; + GLuint newViewMinLevel, newViewMinLayer; + GLuint newViewNumLevels, newViewNumLayers; + GLsizei width, height, depth; + gl_format texFormat; + GLboolean sizeOK, dimensionsOK; + GLenum faceTarget; + + GET_CURRENT_CONTEXT(ctx); + + if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTextureView %d %s %d %s %d %d %d %d\n", + texture, _mesa_lookup_enum_by_nr(target), origtexture, + _mesa_lookup_enum_by_nr(internalformat), + minlevel, numlevels, minlayer, numlayers); + + if (origtexture == 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glTextureView(origtexture = %u)", origtexture); + return; + } + + /* Need original texture information to validate arguments */ + origTexObj = _mesa_lookup_texture(ctx, origtexture); + + /* If <origtexture> is not the name of a texture, INVALID_VALUE is generated. */ + if (!origTexObj) { + _mesa_error(ctx, GL_INVALID_VALUE, "glTextureView(origtexture = %u)", origtexture); + return; + } + + /* If <origtexture>'s TEXTURE_IMMUTABLE_FORMAT value is not TRUE, + * INVALID_OPERATION is generated. + */ + if (!origTexObj->Immutable) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureView(origtexture not immutable)"); + return; + } + + /* If <texture> is 0, INVALID_VALUE is generated. */ + if (texture == 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glTextureView(texture = 0)"); + return; + } + + /* If <texture> is not a valid name returned by GenTextures, + * the error INVALID_OPERATION is generated. + */ + texObj = _mesa_lookup_texture(ctx, texture); + if (texObj == NULL) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureView(texture = %u non-gen name)", texture); + return; + } + + /* If <texture> has already been bound and given a target, then + * the error INVALID_OPERATION is generated. + */ + if (texObj->Target) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureView(texture = %u already bound)", texture); + return; + } + + /* Check for compatible target */ + if (!target_valid(ctx, origTexObj->Target, target)) { + return; /* error was recorded */ + } + + /* minlevel and minlayer are relative to the view of origtexture + * If minlevel or minlayer is greater than level or layer, respectively, + * of origtexture return INVALID_VALUE. + */ + newViewMinLevel = origTexObj->MinLevel + minlevel; + newViewMinLayer = origTexObj->MinLayer + minlayer; + if (newViewMinLevel >= (origTexObj->MinLevel + origTexObj->NumLevels)) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glTextureView(new minlevel (%d) > orig minlevel (%d) + orig numlevels (%d))", + newViewMinLevel, origTexObj->MinLevel, origTexObj->NumLevels); + return; + } + + if (newViewMinLayer >= (origTexObj->MinLayer + origTexObj->NumLayers)) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glTextureView(new minlayer (%d) > orig minlayer (%d) + orig numlayers (%d))", + newViewMinLayer, origTexObj->MinLayer, origTexObj->NumLayers); + return; + } + + if (!compatible_format(ctx, origTexObj, internalformat)) { + return; /* Error logged */ + } + + texFormat = _mesa_choose_texture_format(ctx, texObj, target, 0, + internalformat, GL_NONE, GL_NONE); + assert(texFormat != MESA_FORMAT_NONE); + if (texFormat == MESA_FORMAT_NONE) return; + + newViewNumLevels = MIN2(numlevels, origTexObj->NumLevels - minlevel); + newViewNumLayers = MIN2(numlayers, origTexObj->NumLayers - minlayer); + + faceTarget = origTexObj->Target; + if (faceTarget == GL_TEXTURE_CUBE_MAP) + faceTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + minlayer; + + /* Get a reference to what will become this View's base level */ + origTexImage = _mesa_select_tex_image(ctx, origTexObj, + faceTarget, minlevel); + width = origTexImage->Width; + height = origTexImage->Height; + depth = origTexImage->Depth; + + /* Adjust width, height, depth to be appropriate for new target */ + switch (target) { + case GL_TEXTURE_1D: + case GL_TEXTURE_3D: + break; + + case GL_TEXTURE_1D_ARRAY: + height = (GLsizei) newViewNumLayers; + break; + + case GL_TEXTURE_2D: + case GL_TEXTURE_2D_MULTISAMPLE: + case GL_TEXTURE_RECTANGLE: + case GL_TEXTURE_CUBE_MAP: + depth = 1; + break; + + case GL_TEXTURE_2D_ARRAY: + case GL_TEXTURE_CUBE_MAP_ARRAY: + case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: + depth = newViewNumLayers; + break; + } + + /* If the dimensions of the original texture are larger than the maximum + * supported dimensions of the new target, the error INVALID_OPERATION is + * generated. For example, if the original texture has a TEXTURE_2D_ARRAY + * target and its width is greater than MAX_CUBE_MAP_TEXTURE_SIZE, an error + * will be generated if TextureView is called to create a TEXTURE_CUBE_MAP + * view. + */ + dimensionsOK = _mesa_legal_texture_dimensions(ctx, target, 0, + width, height, depth, 0); + if (!dimensionsOK) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureView(invalid width or height or depth)"); + return; + } + + sizeOK = ctx->Driver.TestProxyTexImage(ctx, target, 0, texFormat, + width, height, depth, 0); + if (!sizeOK) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureView(invalid texture size)"); + return; + } + + /* If <target> is TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_RECTANGLE, + * or TEXTURE_2D_MULTISAMPLE and <numlayers> does not equal 1, the error + * INVALID_VALUE is generated. + */ + switch (target) { + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_TEXTURE_3D: + case GL_TEXTURE_RECTANGLE: + case GL_TEXTURE_2D_MULTISAMPLE: + if (numlayers != 1) { + _mesa_error(ctx, GL_INVALID_VALUE, "glTextureView(numlayers %d != 1)", numlayers); + return; + } + break; + + case GL_TEXTURE_CUBE_MAP: + /* If the new texture's target is TEXTURE_CUBE_MAP, the clamped <numlayers> + * must be equal to 6. + */ + if (newViewNumLayers != 6) { + _mesa_error(ctx, GL_INVALID_VALUE, "glTextureView(clamped numlayers %d != 6)", + newViewNumLayers); + return; + } + break; + + case GL_TEXTURE_CUBE_MAP_ARRAY: + /* If the new texture's target is TEXTURE_CUBE_MAP_ARRAY, + * then <numlayers> counts layer-faces rather than layers, + * and the clamped <numlayers> must be a multiple of 6. + * Otherwise, the error INVALID_VALUE is generated. + */ + if ((newViewNumLayers % 6) != 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glTextureView(clamped numlayers %d is not a multiple of 6)", + newViewNumLayers); + return; + } + break; + } + + /* If the new texture's target is TEXTURE_CUBE_MAP or + * TEXTURE_CUBE_MAP_ARRAY, the width and height of the original texture's + * levels must be equal otherwise the error INVALID_OPERATION is generated. + */ + if ((target == GL_TEXTURE_CUBE_MAP || target == GL_TEXTURE_CUBE_MAP_ARRAY) && + (origTexImage->Width != origTexImage->Height)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureView(origtexture width (%d) != height (%d))", + origTexImage->Width, origTexImage->Height); + return; + } + + /* When the original texture's target is TEXTURE_CUBE_MAP, the layer + * parameters are interpreted in the same order as if it were a + * TEXTURE_CUBE_MAP_ARRAY with 6 layer-faces. + */ + + /* If the internal format does not exactly match the internal format of the + * original texture, the contents of the memory are reinterpreted in the + * same manner as for image bindings described in + * section 3.9.20 (Texture Image Loads and Stores). + */ + + /* TEXTURE_BASE_LEVEL and TEXTURE_MAX_LEVEL are interpreted + * relative to the view and not relative to the original data store. + */ + + if (!initialize_texture_fields(ctx, target, texObj, newViewNumLevels, + width, height, depth, + internalformat, texFormat)) { + return; /* Already recorded error */ + } + + texObj->MinLevel = newViewMinLevel; + texObj->MinLayer = newViewMinLayer; + texObj->NumLevels = newViewNumLevels; + texObj->NumLayers = newViewNumLayers; + texObj->Immutable = GL_TRUE; + texObj->ImmutableLevels = origTexObj->ImmutableLevels; + texObj->Target = target; + + if (ctx->Driver.TextureView != NULL && !ctx->Driver.TextureView(ctx, texObj, origTexObj)) { + return; /* driver recorded error */ + } +} diff --git a/xorg-server/glx/glxstubs.c b/mesalib/src/mesa/main/textureview.h index 69bc00480..3088ac193 100644 --- a/xorg-server/glx/glxstubs.c +++ b/mesalib/src/mesa/main/textureview.h @@ -1,5 +1,7 @@ /* - * Copyright © 2013 Red Hat, Inc. + * Mesa 3-D graphics library + * + * Copyright (C) 2012-2013 LunarG, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -8,9 +10,8 @@ * 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 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, @@ -21,30 +22,22 @@ * DEALINGS IN THE SOFTWARE. * * Authors: - * Adam Jackson <ajax@redhat.com> + * Courtney Goeltzenleuchter <courtney@lunarg.com> */ -/* - * Redirection stubs for things that we call by name but that aren't exported - * from libGL by name. Strictly speaking this list should be a lot longer, - * but this is enough to get us linking against contemporary Mesa. - */ -#include <inttypes.h> -#include "glxserver.h" +#ifndef TEXTUREVIEW_H +#define TEXTUREVIEW_H -#define thunk(name, type, call_args, ...) \ - _X_HIDDEN void name(__VA_ARGS__) { \ - static type proc; \ - if (!proc) proc = __glGetProcAddress(#name); \ - proc call_args; \ - } -thunk(glSampleMaskSGIS, PFNGLSAMPLEMASKSGISPROC, - (value, invert), GLclampf value, GLboolean invert) +extern void GLAPIENTRY +_mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture, + GLenum internalformat, + GLuint minlevel, GLuint numlevels, + GLuint minlayer, GLuint numlayers); -thunk(glSamplePatternSGIS, PFNGLSAMPLEPATTERNSGISPROC, - (pattern), GLenum pattern) +extern void +_mesa_set_texture_view_state(struct gl_context *ctx, struct gl_texture_object *texObj, + GLenum target, GLuint levels); -thunk(glActiveStencilFaceEXT, PFNGLACTIVESTENCILFACEEXTPROC, - (face), GLenum face) +#endif /* TEXTUREVIEW_H */ diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c index ee77947b4..119c7dae3 100644 --- a/mesalib/src/mesa/main/version.c +++ b/mesalib/src/mesa/main/version.c @@ -224,7 +224,6 @@ compute_version(struct gl_context *ctx) (ctx->Extensions.EXT_stencil_two_side || ctx->Extensions.ATI_separate_stencil)); const GLboolean ver_2_1 = (ver_2_0 && - ctx->Const.GLSLVersion >= 120 && ctx->Extensions.EXT_pixel_buffer_object && ctx->Extensions.EXT_texture_sRGB); const GLboolean ver_3_0 = (ver_2_1 && diff --git a/mesalib/src/mesa/math/m_matrix.c b/mesalib/src/mesa/math/m_matrix.c index 290231527..274f969d2 100644 --- a/mesalib/src/mesa/math/m_matrix.c +++ b/mesalib/src/mesa/math/m_matrix.c @@ -1488,14 +1488,11 @@ _math_matrix_ctr( GLmatrix *m ) void _math_matrix_dtr( GLmatrix *m ) { - if (m->m) { - _mesa_align_free( m->m ); - m->m = NULL; - } - if (m->inv) { - _mesa_align_free( m->inv ); - m->inv = NULL; - } + _mesa_align_free( m->m ); + m->m = NULL; + + _mesa_align_free( m->inv ); + m->inv = NULL; } /*@}*/ diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index c833a12f2..23d479c32 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -681,11 +681,11 @@ ir_to_mesa_visitor::visit(ir_variable *ir) if (strcmp(ir->name, "gl_FragCoord") == 0) { struct gl_fragment_program *fp = (struct gl_fragment_program *)this->prog; - fp->OriginUpperLeft = ir->origin_upper_left; - fp->PixelCenterInteger = ir->pixel_center_integer; + fp->OriginUpperLeft = ir->data.origin_upper_left; + fp->PixelCenterInteger = ir->data.pixel_center_integer; } - if (ir->mode == ir_var_uniform && strncmp(ir->name, "gl_", 3) == 0) { + if (ir->data.mode == ir_var_uniform && strncmp(ir->name, "gl_", 3) == 0) { unsigned int i; const ir_state_slot *const slots = ir->state_slots; assert(ir->state_slots != NULL); @@ -759,49 +759,10 @@ ir_to_mesa_visitor::visit(ir_variable *ir) void ir_to_mesa_visitor::visit(ir_loop *ir) { - ir_dereference_variable *counter = NULL; - - if (ir->counter != NULL) - counter = new(mem_ctx) ir_dereference_variable(ir->counter); - - if (ir->from != NULL) { - assert(ir->counter != NULL); - - ir_assignment *a = - new(mem_ctx) ir_assignment(counter, ir->from, NULL); - - a->accept(this); - } - emit(NULL, OPCODE_BGNLOOP); - if (ir->to) { - ir_expression *e = - new(mem_ctx) ir_expression(ir->cmp, glsl_type::bool_type, - counter, ir->to); - ir_if *if_stmt = new(mem_ctx) ir_if(e); - - ir_loop_jump *brk = - new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_break); - - if_stmt->then_instructions.push_tail(brk); - - if_stmt->accept(this); - } - visit_exec_list(&ir->body_instructions, this); - if (ir->increment) { - ir_expression *e = - new(mem_ctx) ir_expression(ir_binop_add, counter->type, - counter, ir->increment); - - ir_assignment *a = - new(mem_ctx) ir_assignment(counter, e, NULL); - - a->accept(this); - } - emit(NULL, OPCODE_ENDLOOP); } @@ -1567,10 +1528,10 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir) ir_variable *var = ir->var; if (!entry) { - switch (var->mode) { + switch (var->data.mode) { case ir_var_uniform: entry = new(mem_ctx) variable_storage(var, PROGRAM_UNIFORM, - var->location); + var->data.location); this->variables.push_tail(entry); break; case ir_var_shader_in: @@ -1579,21 +1540,21 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir) * user-assigned generic attributes (glBindVertexLocation), * and user-defined varyings. */ - assert(var->location != -1); + assert(var->data.location != -1); entry = new(mem_ctx) variable_storage(var, PROGRAM_INPUT, - var->location); + var->data.location); break; case ir_var_shader_out: - assert(var->location != -1); + assert(var->data.location != -1); entry = new(mem_ctx) variable_storage(var, PROGRAM_OUTPUT, - var->location); + var->data.location); break; case ir_var_system_value: entry = new(mem_ctx) variable_storage(var, PROGRAM_SYSTEM_VALUE, - var->location); + var->data.location); break; case ir_var_auto: case ir_var_temporary: @@ -2443,7 +2404,7 @@ public: this->idx = -1; this->program_resource_visitor::process(var); - var->location = this->idx; + var->data.location = this->idx; } private: @@ -2538,7 +2499,7 @@ _mesa_generate_parameters_list_for_uniforms(struct gl_shader_program foreach_list(node, sh->ir) { ir_variable *var = ((ir_instruction *) node)->as_variable(); - if ((var == NULL) || (var->mode != ir_var_uniform) + if ((var == NULL) || (var->data.mode != ir_var_uniform) || var->is_in_uniform_block() || (strncmp(var->name, "gl_", 3) == 0)) continue; diff --git a/mesalib/src/mesa/program/prog_parameter.c b/mesalib/src/mesa/program/prog_parameter.c index 4d9cf08d2..54531d255 100644 --- a/mesalib/src/mesa/program/prog_parameter.c +++ b/mesalib/src/mesa/program/prog_parameter.c @@ -83,8 +83,7 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) free((void *)paramList->Parameters[i].Name); } free(paramList->Parameters); - if (paramList->ParameterValues) - _mesa_align_free(paramList->ParameterValues); + _mesa_align_free(paramList->ParameterValues); free(paramList); } diff --git a/mesalib/src/mesa/program/program.c b/mesalib/src/mesa/program/program.c index 01f8c6f11..cdf1c03fa 100644 --- a/mesalib/src/mesa/program/program.c +++ b/mesalib/src/mesa/program/program.c @@ -1049,6 +1049,14 @@ _mesa_get_min_invocations_per_fragment(struct gl_context *ctx, * has no effect." */ if (ctx->Multisample.Enabled) { + /* The ARB_gpu_shader5 specification says: + * + * "Use of the "sample" qualifier on a fragment shader input + * forces per-sample shading" + */ + if (prog->IsSample) + return MAX2(ctx->DrawBuffer->Visual.samples, 1); + if (prog->Base.SystemValuesRead & (SYSTEM_BIT_SAMPLE_ID | SYSTEM_BIT_SAMPLE_POS)) return MAX2(ctx->DrawBuffer->Visual.samples, 1); diff --git a/mesalib/src/mesa/program/program_parse_extra.c b/mesalib/src/mesa/program/program_parse_extra.c index e8e1912eb..a9e364045 100644 --- a/mesalib/src/mesa/program/program_parse_extra.c +++ b/mesalib/src/mesa/program/program_parse_extra.c @@ -256,15 +256,6 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option) return 1; } } - } else if (strncmp(option, "MESA_", 5) == 0) { - option += 5; - - if (strcmp(option, "texture_array") == 0) { - if (state->ctx->Extensions.MESA_texture_array) { - state->option.TexArray = 1; - return 1; - } - } } return 0; diff --git a/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c b/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c index c752640f4..51f079cda 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/mesalib/src/mesa/state_tracker/st_atom_framebuffer.c @@ -44,56 +44,6 @@ /** - * When doing GL render to texture, we have to be sure that finalize_texture() - * didn't yank out the pipe_resource that we earlier created a surface for. - * Check for that here and create a new surface if needed. - */ -static void -update_renderbuffer_surface(struct st_context *st, - struct st_renderbuffer *strb) -{ - struct pipe_context *pipe = st->pipe; - struct pipe_resource *resource = strb->rtt ? strb->rtt->pt : strb->texture; - int rtt_width = strb->Base.Width; - int rtt_height = strb->Base.Height; - enum pipe_format format = st->ctx->Color.sRGBEnabled ? resource->format : util_format_linear(resource->format); - - if (!strb->surface || - strb->surface->texture->nr_samples != strb->Base.NumSamples || - strb->surface->format != format || - strb->surface->texture != resource || - strb->surface->width != rtt_width || - strb->surface->height != rtt_height) { - GLuint level; - /* find matching mipmap level size */ - for (level = 0; level <= resource->last_level; level++) { - if (u_minify(resource->width0, level) == rtt_width && - u_minify(resource->height0, level) == rtt_height) { - struct pipe_surface surf_tmpl; - memset(&surf_tmpl, 0, sizeof(surf_tmpl)); - surf_tmpl.format = format; - surf_tmpl.u.tex.level = level; - surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice; - surf_tmpl.u.tex.last_layer = strb->rtt_face + strb->rtt_slice; - - pipe_surface_reference(&strb->surface, NULL); - - strb->surface = pipe->create_surface(pipe, - resource, - &surf_tmpl); -#if 0 - printf("-- alloc new surface %d x %d into tex %p\n", - strb->surface->width, strb->surface->height, - texture); -#endif - break; - } - } - } -} - - -/** * Update framebuffer state (color, depth, stencil, etc. buffers) */ static void @@ -121,10 +71,10 @@ update_framebuffer_state( struct st_context *st ) if (strb) { /*printf("--------- framebuffer surface rtt %p\n", strb->rtt);*/ - if (strb->rtt || + if (strb->is_rtt || (strb->texture && util_format_is_srgb(strb->texture->format))) { /* rendering to a GL texture, may have to update surface */ - update_renderbuffer_surface(st, strb); + st_update_renderbuffer_surface(st, strb); } if (strb->surface) { @@ -144,9 +94,9 @@ update_framebuffer_state( struct st_context *st ) */ strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer); if (strb) { - if (strb->rtt) { + if (strb->is_rtt) { /* rendering to a GL texture, may have to update surface */ - update_renderbuffer_surface(st, strb); + st_update_renderbuffer_surface(st, strb); } pipe_surface_reference(&framebuffer->zsbuf, strb->surface); } diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c index 302e12981..57670ce25 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c +++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c @@ -130,15 +130,20 @@ convert_sampler(struct st_context *st, struct pipe_sampler_state *sampler, GLuint texUnit) { - struct gl_texture_object *texobj; + const struct gl_texture_object *texobj; struct gl_context *ctx = st->ctx; struct gl_sampler_object *msamp; + const struct gl_texture_image *teximg; + GLenum texBaseFormat; texobj = ctx->Texture.Unit[texUnit]._Current; if (!texobj) { texobj = _mesa_get_fallback_texture(ctx, TEXTURE_2D_INDEX); } + teximg = texobj->Image[0][texobj->BaseLevel]; + texBaseFormat = teximg ? teximg->_BaseFormat : GL_RGBA; + msamp = _mesa_get_samplerobj(ctx, texUnit); memset(sampler, 0, sizeof(*sampler)); @@ -170,21 +175,15 @@ convert_sampler(struct st_context *st, assert(sampler->min_lod <= sampler->max_lod); } + /* For non-black borders... */ if (msamp->BorderColor.ui[0] || msamp->BorderColor.ui[1] || msamp->BorderColor.ui[2] || msamp->BorderColor.ui[3]) { - struct st_texture_object *stobj = st_texture_object(texobj); - struct gl_texture_image *teximg; - GLboolean is_integer = GL_FALSE; + const struct st_texture_object *stobj = st_texture_object_const(texobj); + const GLboolean is_integer = texobj->_IsIntegerFormat; union pipe_color_union border_color; - teximg = texobj->Image[0][texobj->BaseLevel]; - - if (teximg) { - is_integer = _mesa_is_enum_format_integer(teximg->InternalFormat); - } - if (st->apply_texture_swizzle_to_border_color && stobj->sampler_view) { const unsigned char swz[4] = { @@ -196,25 +195,26 @@ convert_sampler(struct st_context *st, st_translate_color(&msamp->BorderColor, &border_color, - teximg ? teximg->_BaseFormat : GL_RGBA, is_integer); + texBaseFormat, is_integer); util_format_apply_color_swizzle(&sampler->border_color, &border_color, swz, is_integer); } else { st_translate_color(&msamp->BorderColor, &sampler->border_color, - teximg ? teximg->_BaseFormat : GL_RGBA, is_integer); + texBaseFormat, is_integer); } } sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ? 0 : (GLuint) msamp->MaxAnisotropy); - /* only care about ARB_shadow, not SGI shadow */ - if (msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) { + /* If sampling a depth texture and using shadow comparison */ + if ((texBaseFormat == GL_DEPTH_COMPONENT || + texBaseFormat == GL_DEPTH_STENCIL) && + msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) { sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE; - sampler->compare_func - = st_compare_func_to_pipe(msamp->CompareFunc); + sampler->compare_func = st_compare_func_to_pipe(msamp->CompareFunc); } sampler->seamless_cube_map = diff --git a/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c b/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c index 7fa4cbdc4..230ab5449 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/mesalib/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -422,6 +422,9 @@ st_bufferobj_validate_usage(struct st_context *st, void st_init_bufferobject_functions(struct dd_function_table *functions) { + /* plug in default driver fallbacks (such as for ClearBufferSubData) */ + _mesa_init_buffer_object_functions(functions); + functions->NewBufferObject = st_bufferobj_alloc; functions->DeleteBuffer = st_bufferobj_free; functions->BufferData = st_bufferobj_data; diff --git a/mesalib/src/mesa/state_tracker/st_cb_clear.c b/mesalib/src/mesa/state_tracker/st_cb_clear.c index 8da664afb..887e58bd9 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_clear.c +++ b/mesalib/src/mesa/state_tracker/st_cb_clear.c @@ -51,6 +51,7 @@ #include "pipe/p_state.h" #include "pipe/p_defines.h" #include "util/u_format.h" +#include "util/u_framebuffer.h" #include "util/u_inlines.h" #include "util/u_simple_shaders.h" #include "util/u_draw_quad.h" @@ -129,6 +130,26 @@ set_vertex_shader(struct st_context *st) } +static void +set_vertex_shader_layered(struct st_context *st) +{ + struct pipe_context *pipe = st->pipe; + + if (!pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_INSTANCEID) || + !pipe->screen->get_param(pipe->screen, PIPE_CAP_TGSI_VS_LAYER)) { + assert(!"Got layered clear, but the VS layer output is unsupported"); + set_vertex_shader(st); + return; + } + + if (!st->clear.vs_layered) { + st->clear.vs_layered = util_make_layered_clear_vertex_shader(pipe); + } + + cso_set_vertex_shader_handle(st->cso_context, st->clear.vs_layered); +} + + /** * Draw a screen-aligned quadrilateral. * Coords are clip coords with y=0=bottom. @@ -136,15 +157,19 @@ set_vertex_shader(struct st_context *st) static void draw_quad(struct st_context *st, float x0, float y0, float x1, float y1, GLfloat z, + unsigned num_instances, const union pipe_color_union *color) { - struct pipe_context *pipe = st->pipe; - struct pipe_resource *vbuf = NULL; - GLuint i, offset; + struct cso_context *cso = st->cso_context; + struct pipe_vertex_buffer vb = {0}; + GLuint i; float (*vertices)[2][4]; /**< vertex pos + color */ + vb.stride = 8 * sizeof(float); + if (u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), - &offset, &vbuf, (void **) &vertices) != PIPE_OK) { + &vb.buffer_offset, &vb.buffer, + (void **) &vertices) != PIPE_OK) { return; } @@ -174,16 +199,10 @@ draw_quad(struct st_context *st, u_upload_unmap(st->uploader); /* draw */ - util_draw_vertex_buffer(pipe, - st->cso_context, - vbuf, - cso_get_aux_vertex_buffer_slot(st->cso_context), - offset, - PIPE_PRIM_TRIANGLE_FAN, - 4, /* verts */ - 2); /* attribs/vert */ - - pipe_resource_reference(&vbuf, NULL); + cso_set_vertex_buffers(cso, cso_get_aux_vertex_buffer_slot(cso), 1, &vb); + cso_draw_arrays_instanced(cso, PIPE_PRIM_TRIANGLE_FAN, 0, 4, + 0, num_instances); + pipe_resource_reference(&vb.buffer, NULL); } @@ -194,8 +213,7 @@ draw_quad(struct st_context *st, * ctx->DrawBuffer->_X/Ymin/max fields. */ static void -clear_with_quad(struct gl_context *ctx, - GLboolean color, GLboolean depth, GLboolean stencil) +clear_with_quad(struct gl_context *ctx, unsigned clear_buffers) { struct st_context *st = st_context(ctx); const struct gl_framebuffer *fb = ctx->DrawBuffer; @@ -205,7 +223,8 @@ clear_with_quad(struct gl_context *ctx, const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax / fb_width * 2.0f - 1.0f; const GLfloat y0 = (GLfloat) ctx->DrawBuffer->_Ymin / fb_height * 2.0f - 1.0f; const GLfloat y1 = (GLfloat) ctx->DrawBuffer->_Ymax / fb_height * 2.0f - 1.0f; - union pipe_color_union clearColor; + unsigned num_layers = + util_framebuffer_get_num_layers(&st->state.framebuffer); /* printf("%s %s%s%s %f,%f %f,%f\n", __FUNCTION__, @@ -233,7 +252,7 @@ clear_with_quad(struct gl_context *ctx, { struct pipe_blend_state blend; memset(&blend, 0, sizeof(blend)); - if (color) { + if (clear_buffers & PIPE_CLEAR_COLOR) { int num_buffers = ctx->Extensions.EXT_draw_buffers2 ? ctx->DrawBuffer->_NumColorDrawBuffers : 1; int i; @@ -241,6 +260,9 @@ clear_with_quad(struct gl_context *ctx, blend.independent_blend_enable = num_buffers > 1; for (i = 0; i < num_buffers; i++) { + if (!(clear_buffers & (PIPE_CLEAR_COLOR0 << i))) + continue; + if (ctx->Color.ColorMask[i][0]) blend.rt[i].colormask |= PIPE_MASK_R; if (ctx->Color.ColorMask[i][1]) @@ -261,13 +283,13 @@ clear_with_quad(struct gl_context *ctx, { struct pipe_depth_stencil_alpha_state depth_stencil; memset(&depth_stencil, 0, sizeof(depth_stencil)); - if (depth) { + if (clear_buffers & PIPE_CLEAR_DEPTH) { depth_stencil.depth.enabled = 1; depth_stencil.depth.writemask = 1; depth_stencil.depth.func = PIPE_FUNC_ALWAYS; } - if (stencil) { + if (clear_buffers & PIPE_CLEAR_STENCIL) { struct pipe_stencil_ref stencil_ref; memset(&stencil_ref, 0, sizeof(stencil_ref)); depth_stencil.stencil[0].enabled = 1; @@ -305,21 +327,20 @@ clear_with_quad(struct gl_context *ctx, } set_fragment_shader(st); - set_vertex_shader(st); cso_set_geometry_shader_handle(st->cso_context, NULL); - if (ctx->DrawBuffer->_ColorDrawBuffers[0]) { - struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; - GLboolean is_integer = _mesa_is_enum_format_integer(rb->InternalFormat); + if (num_layers > 1) + set_vertex_shader_layered(st); + else + set_vertex_shader(st); - st_translate_color(&ctx->Color.ClearColor, - &clearColor, - ctx->DrawBuffer->_ColorDrawBuffers[0]->_BaseFormat, - is_integer); - } + /* We can't translate the clear color to the colorbuffer format, + * because different colorbuffers may have different formats. + */ /* draw quad matching scissor rect */ - draw_quad(st, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, &clearColor); + draw_quad(st, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, num_layers, + (union pipe_color_union*)&ctx->Color.ClearColor); /* Restore pipe state */ cso_restore_blend(st->cso_context); @@ -352,6 +373,19 @@ is_scissor_enabled(struct gl_context *ctx, struct gl_renderbuffer *rb) /** + * Return if all of the color channels are masked. + */ +static INLINE GLboolean +is_color_disabled(struct gl_context *ctx, int i) +{ + return !ctx->Color.ColorMask[i][0] && + !ctx->Color.ColorMask[i][1] && + !ctx->Color.ColorMask[i][2] && + !ctx->Color.ColorMask[i][3]; +} + + +/** * Return if any of the color channels are masked. */ static INLINE GLboolean @@ -408,11 +442,14 @@ st_Clear(struct gl_context *ctx, GLbitfield mask) if (!strb || !strb->surface) continue; + if (is_color_disabled(ctx, colormask_index)) + continue; + if (is_scissor_enabled(ctx, rb) || is_color_masked(ctx, colormask_index)) - quad_buffers |= PIPE_CLEAR_COLOR; + quad_buffers |= PIPE_CLEAR_COLOR0 << i; else - clear_buffers |= PIPE_CLEAR_COLOR; + clear_buffers |= PIPE_CLEAR_COLOR0 << i; } } } @@ -445,24 +482,13 @@ st_Clear(struct gl_context *ctx, GLbitfield mask) */ if (quad_buffers) { quad_buffers |= clear_buffers; - clear_with_quad(ctx, - quad_buffers & PIPE_CLEAR_COLOR, - quad_buffers & PIPE_CLEAR_DEPTH, - quad_buffers & PIPE_CLEAR_STENCIL); + clear_with_quad(ctx, quad_buffers); } else if (clear_buffers) { - union pipe_color_union clearColor; - - if (ctx->DrawBuffer->_ColorDrawBuffers[0]) { - struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; - GLboolean is_integer = _mesa_is_enum_format_integer(rb->InternalFormat); - - st_translate_color(&ctx->Color.ClearColor, - &clearColor, - ctx->DrawBuffer->_ColorDrawBuffers[0]->_BaseFormat, - is_integer); - } - - st->pipe->clear(st->pipe, clear_buffers, &clearColor, + /* We can't translate the clear color to the colorbuffer format, + * because different colorbuffers may have different formats. + */ + st->pipe->clear(st->pipe, clear_buffers, + (union pipe_color_union*)&ctx->Color.ClearColor, ctx->Depth.Clear, ctx->Stencil.Clear); } if (mask & BUFFER_BIT_ACCUM) diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c index 2ce4728ad..3058dfb5b 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c @@ -878,7 +878,8 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, } stmap = pipe_transfer_map(pipe, strb->texture, - strb->rtt_level, strb->rtt_face + strb->rtt_slice, + strb->surface->u.tex.level, + strb->surface->u.tex.first_layer, usage, x, y, width, height, &pt); @@ -1263,8 +1264,8 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, /* map the stencil buffer */ drawMap = pipe_transfer_map(pipe, rbDraw->texture, - rbDraw->rtt_level, - rbDraw->rtt_face + rbDraw->rtt_slice, + rbDraw->surface->u.tex.level, + rbDraw->surface->u.tex.first_layer, usage, dstx, dsty, width, height, &ptDraw); @@ -1422,20 +1423,20 @@ blit_copy_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, memset(&blit, 0, sizeof(blit)); blit.src.resource = rbRead->texture; - blit.src.level = rbRead->rtt_level; + blit.src.level = rbRead->surface->u.tex.level; blit.src.format = rbRead->texture->format; blit.src.box.x = readX; blit.src.box.y = readY; - blit.src.box.z = rbRead->rtt_face + rbRead->rtt_slice; + blit.src.box.z = rbRead->surface->u.tex.first_layer; blit.src.box.width = readW; blit.src.box.height = readH; blit.src.box.depth = 1; blit.dst.resource = rbDraw->texture; - blit.dst.level = rbDraw->rtt_level; + blit.dst.level = rbDraw->surface->u.tex.level; blit.dst.format = rbDraw->texture->format; blit.dst.box.x = drawX; blit.dst.box.y = drawY; - blit.dst.box.z = rbDraw->rtt_face + rbDraw->rtt_slice; + blit.dst.box.z = rbDraw->surface->u.tex.first_layer; blit.dst.box.width = drawW; blit.dst.box.height = drawH; blit.dst.box.depth = 1; @@ -1633,11 +1634,11 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, memset(&blit, 0, sizeof(blit)); blit.src.resource = rbRead->texture; - blit.src.level = rbRead->rtt_level; + blit.src.level = rbRead->surface->u.tex.level; blit.src.format = rbRead->texture->format; blit.src.box.x = readX; blit.src.box.y = readY; - blit.src.box.z = rbRead->rtt_face + rbRead->rtt_slice; + blit.src.box.z = rbRead->surface->u.tex.first_layer; blit.src.box.width = readW; blit.src.box.height = readH; blit.src.box.depth = 1; diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c index 20894825f..70baa9965 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c +++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c @@ -389,6 +389,72 @@ st_bind_framebuffer(struct gl_context *ctx, GLenum target, /** + * Create or update the pipe_surface of a FBO renderbuffer. + * This is usually called after st_finalize_texture. + */ +void +st_update_renderbuffer_surface(struct st_context *st, + struct st_renderbuffer *strb) +{ + struct pipe_context *pipe = st->pipe; + struct pipe_resource *resource = strb->texture; + int rtt_width = strb->Base.Width; + int rtt_height = strb->Base.Height; + int rtt_depth = strb->Base.Depth; + enum pipe_format format = st->ctx->Color.sRGBEnabled ? resource->format : + util_format_linear(resource->format); + unsigned first_layer, last_layer, level; + + if (resource->target == PIPE_TEXTURE_1D_ARRAY) { + rtt_depth = rtt_height; + rtt_height = 1; + } + + /* find matching mipmap level size */ + for (level = 0; level <= resource->last_level; level++) { + if (u_minify(resource->width0, level) == rtt_width && + u_minify(resource->height0, level) == rtt_height && + (resource->target != PIPE_TEXTURE_3D || + u_minify(resource->depth0, level) == rtt_depth)) { + break; + } + } + assert(level <= resource->last_level); + + /* determine the layer bounds */ + if (strb->rtt_layered) { + first_layer = 0; + last_layer = util_max_layer(strb->texture, level); + } + else { + first_layer = + last_layer = strb->rtt_face + strb->rtt_slice; + } + + if (!strb->surface || + strb->surface->texture->nr_samples != strb->Base.NumSamples || + strb->surface->format != format || + strb->surface->texture != resource || + strb->surface->width != rtt_width || + strb->surface->height != rtt_height || + strb->surface->u.tex.level != level || + strb->surface->u.tex.first_layer != first_layer || + strb->surface->u.tex.last_layer != last_layer) { + /* create a new pipe_surface */ + struct pipe_surface surf_tmpl; + memset(&surf_tmpl, 0, sizeof(surf_tmpl)); + surf_tmpl.format = format; + surf_tmpl.u.tex.level = level; + surf_tmpl.u.tex.first_layer = first_layer; + surf_tmpl.u.tex.last_layer = last_layer; + + pipe_surface_reference(&strb->surface, NULL); + + strb->surface = pipe->create_surface(pipe, resource, &surf_tmpl); + } +} + +/** * Called by ctx->Driver.RenderTexture */ static void @@ -401,8 +467,6 @@ st_render_texture(struct gl_context *ctx, struct gl_renderbuffer *rb = att->Renderbuffer; struct st_renderbuffer *strb = st_renderbuffer(rb); struct pipe_resource *pt; - struct st_texture_object *stObj; - struct pipe_surface surf_tmpl; if (!st_finalize_texture(ctx, pipe, att->Texture)) return; @@ -410,31 +474,16 @@ st_render_texture(struct gl_context *ctx, pt = st_get_texobj_resource(att->Texture); assert(pt); - /* get the texture for the texture object */ - stObj = st_texture_object(att->Texture); - /* point renderbuffer at texobject */ - strb->rtt = stObj; - strb->rtt_level = att->TextureLevel; + strb->is_rtt = TRUE; strb->rtt_face = att->CubeMapFace; strb->rtt_slice = att->Zoffset; - - pipe_resource_reference( &strb->texture, pt ); + strb->rtt_layered = att->Layered; + pipe_resource_reference(&strb->texture, pt); pipe_surface_release(pipe, &strb->surface); - assert(strb->rtt_level <= strb->texture->last_level); - - /* new surface for rendering into the texture */ - memset(&surf_tmpl, 0, sizeof(surf_tmpl)); - surf_tmpl.format = ctx->Color.sRGBEnabled - ? strb->texture->format : util_format_linear(strb->texture->format); - surf_tmpl.u.tex.level = strb->rtt_level; - surf_tmpl.u.tex.first_layer = strb->rtt_face + strb->rtt_slice; - surf_tmpl.u.tex.last_layer = strb->rtt_face + strb->rtt_slice; - strb->surface = pipe->create_surface(pipe, - strb->texture, - &surf_tmpl); + st_update_renderbuffer_surface(st, strb); strb->Base.Format = st_pipe_format_to_mesa_format(pt->format); @@ -464,7 +513,7 @@ st_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer *rb) if (!strb) return; - strb->rtt = NULL; + strb->is_rtt = FALSE; /* restore previous framebuffer state */ st_invalidate_state(ctx, _NEW_BUFFERS); @@ -706,8 +755,8 @@ st_MapRenderbuffer(struct gl_context *ctx, map = pipe_transfer_map(pipe, strb->texture, - strb->rtt_level, - strb->rtt_face + strb->rtt_slice, + strb->surface->u.tex.level, + strb->surface->u.tex.first_layer, usage, x, y2, w, h, &strb->transfer); if (map) { if (invert) { diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.h b/mesalib/src/mesa/state_tracker/st_cb_fbo.h index f335c371b..88fccc298 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_fbo.h +++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.h @@ -58,8 +58,10 @@ struct st_renderbuffer boolean software; void *data; - struct st_texture_object *rtt; /**< GL render to texture's texture */ - unsigned rtt_level, rtt_face, rtt_slice; + /* Inputs from Driver.RenderTexture, don't use directly. */ + boolean is_rtt; /**< whether Driver.RenderTexture was called */ + unsigned rtt_face, rtt_slice; + boolean rtt_layered; /**< whether glFramebufferTexture was called */ }; @@ -74,6 +76,10 @@ extern struct gl_renderbuffer * st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw); extern void +st_update_renderbuffer_surface(struct st_context *st, + struct st_renderbuffer *strb); + +extern void st_init_fbo_functions(struct dd_function_table *functions); #endif /* ST_CB_FBO_H */ diff --git a/mesalib/src/mesa/state_tracker/st_cb_readpixels.c b/mesalib/src/mesa/state_tracker/st_cb_readpixels.c index b5df58c03..7547dfd8b 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_readpixels.c +++ b/mesalib/src/mesa/state_tracker/st_cb_readpixels.c @@ -166,7 +166,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, } blit.src.resource = src; - blit.src.level = strb->rtt_level; + blit.src.level = strb->surface->u.tex.level; blit.src.format = src_format; blit.dst.resource = dst; blit.dst.level = 0; @@ -175,7 +175,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, blit.dst.box.x = 0; blit.src.box.y = y; blit.dst.box.y = 0; - blit.src.box.z = strb->rtt_face + strb->rtt_slice; + blit.src.box.z = strb->surface->u.tex.first_layer; blit.dst.box.z = 0; blit.src.box.width = blit.dst.box.width = width; blit.src.box.height = blit.dst.box.height = height; diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index faa9ee3f6..c09f34e37 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -175,10 +175,8 @@ st_FreeTextureImageBuffer(struct gl_context *ctx, pipe_resource_reference(&stImage->pt, NULL); } - if (stImage->TexData) { - _mesa_align_free(stImage->TexData); - stImage->TexData = NULL; - } + _mesa_align_free(stImage->TexData); + stImage->TexData = NULL; } @@ -1156,8 +1154,8 @@ fallback_copy_texsubimage(struct gl_context *ctx, map = pipe_transfer_map(pipe, strb->texture, - strb->rtt_level, - strb->rtt_face + strb->rtt_slice, + strb->surface->u.tex.level, + strb->surface->u.tex.first_layer, PIPE_TRANSFER_READ, srcX, srcY, width, height, &src_trans); diff --git a/mesalib/src/mesa/state_tracker/st_context.h b/mesalib/src/mesa/state_tracker/st_context.h index ab89b4947..cd0a5ae98 100644 --- a/mesalib/src/mesa/state_tracker/st_context.h +++ b/mesalib/src/mesa/state_tracker/st_context.h @@ -178,6 +178,7 @@ struct st_context struct pipe_viewport_state viewport; void *vs; void *fs; + void *vs_layered; } clear; /** used for anything using util_draw_vertex_buffer */ diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index cd10a0c9d..5e4a3b398 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -406,7 +406,6 @@ void st_init_extensions(struct st_context *st) { o(NV_texture_barrier), PIPE_CAP_TEXTURE_BARRIER }, /* GL_NV_point_sprite is not supported by gallium because we don't * support the GL_POINT_SPRITE_R_MODE_NV option. */ - { o(MESA_texture_array), PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS }, { o(OES_standard_derivatives), PIPE_CAP_SM3 }, { o(ARB_texture_cube_map_array), PIPE_CAP_CUBE_MAP_ARRAY }, @@ -444,11 +443,6 @@ void st_init_extensions(struct st_context *st) { { o(ARB_depth_buffer_float) }, { PIPE_FORMAT_Z32_FLOAT, PIPE_FORMAT_Z32_FLOAT_S8X24_UINT } }, - - { { o(EXT_packed_depth_stencil) }, - { PIPE_FORMAT_S8_UINT_Z24_UNORM, - PIPE_FORMAT_Z24_UNORM_S8_UINT }, - GL_TRUE }, /* at least one format must be supported */ }; /* Required: sampler support */ @@ -605,6 +599,13 @@ void st_init_extensions(struct st_context *st) ctx->Const.ForceGLSLVersion = st->options.force_glsl_version; } + /* This extension needs full OpenGL 3.2, but we don't know if that's + * supported at this point. Only check the GLSL version. */ + if (ctx->Const.GLSLVersion >= 150 && + screen->get_param(screen, PIPE_CAP_TGSI_VS_LAYER)) { + ctx->Extensions.AMD_vertex_shader_layer = GL_TRUE; + } + if (ctx->Const.GLSLVersion >= 130) { ctx->Const.NativeIntegers = GL_TRUE; ctx->Const.MaxClipPlanes = 8; @@ -758,8 +759,7 @@ void st_init_extensions(struct st_context *st) PIPE_BUFFER, PIPE_BIND_SAMPLER_VIEW); } - if (screen->get_param(screen, PIPE_CAP_MIXED_FRAMEBUFFER_SIZES) && - ctx->Extensions.EXT_packed_depth_stencil) { + if (screen->get_param(screen, PIPE_CAP_MIXED_FRAMEBUFFER_SIZES)) { ctx->Extensions.ARB_framebuffer_object = GL_TRUE; } diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c index ec2552384..6acf98390 100644 --- a/mesalib/src/mesa/state_tracker/st_format.c +++ b/mesalib/src/mesa/state_tracker/st_format.c @@ -1854,12 +1854,12 @@ st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target, * Similarly for texture border colors. */ void -st_translate_color(union gl_color_union *colorIn, +st_translate_color(const union gl_color_union *colorIn, union pipe_color_union *colorOut, GLenum baseFormat, GLboolean is_integer) { if (is_integer) { - int *in = colorIn->i; + const int *in = colorIn->i; int *out = colorOut->i; switch (baseFormat) { @@ -1901,7 +1901,7 @@ st_translate_color(union gl_color_union *colorIn, } } else { - float *in = colorIn->f; + const float *in = colorIn->f; float *out = colorOut->f; switch (baseFormat) { diff --git a/mesalib/src/mesa/state_tracker/st_format.h b/mesalib/src/mesa/state_tracker/st_format.h index 6e97dcb96..3278748d0 100644 --- a/mesalib/src/mesa/state_tracker/st_format.h +++ b/mesalib/src/mesa/state_tracker/st_format.h @@ -73,7 +73,7 @@ st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target, extern void -st_translate_color(union gl_color_union *colorIn, +st_translate_color(const union gl_color_union *colorIn, union pipe_color_union *colorOut, GLenum baseFormat, GLboolean is_integer); diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index ac95968d6..1331c73dc 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1056,11 +1056,11 @@ glsl_to_tgsi_visitor::visit(ir_variable *ir) if (strcmp(ir->name, "gl_FragCoord") == 0) { struct gl_fragment_program *fp = (struct gl_fragment_program *)this->prog; - fp->OriginUpperLeft = ir->origin_upper_left; - fp->PixelCenterInteger = ir->pixel_center_integer; + fp->OriginUpperLeft = ir->data.origin_upper_left; + fp->PixelCenterInteger = ir->data.pixel_center_integer; } - if (ir->mode == ir_var_uniform && strncmp(ir->name, "gl_", 3) == 0) { + if (ir->data.mode == ir_var_uniform && strncmp(ir->name, "gl_", 3) == 0) { unsigned int i; const ir_state_slot *const slots = ir->state_slots; assert(ir->state_slots != NULL); @@ -1137,53 +1137,10 @@ glsl_to_tgsi_visitor::visit(ir_variable *ir) void glsl_to_tgsi_visitor::visit(ir_loop *ir) { - ir_dereference_variable *counter = NULL; - - if (ir->counter != NULL) - counter = new(ir) ir_dereference_variable(ir->counter); - - if (ir->from != NULL) { - assert(ir->counter != NULL); - - ir_assignment *a = new(ir) ir_assignment(counter, ir->from, NULL); - - a->accept(this); - delete a; - } - emit(NULL, TGSI_OPCODE_BGNLOOP); - if (ir->to) { - ir_expression *e = - new(ir) ir_expression(ir->cmp, glsl_type::bool_type, - counter, ir->to); - ir_if *if_stmt = new(ir) ir_if(e); - - ir_loop_jump *brk = new(ir) ir_loop_jump(ir_loop_jump::jump_break); - - if_stmt->then_instructions.push_tail(brk); - - if_stmt->accept(this); - - delete if_stmt; - delete e; - delete brk; - } - visit_exec_list(&ir->body_instructions, this); - if (ir->increment) { - ir_expression *e = - new(ir) ir_expression(ir_binop_add, counter->type, - counter, ir->increment); - - ir_assignment *a = new(ir) ir_assignment(counter, e, NULL); - - a->accept(this); - delete a; - delete e; - } - emit(NULL, TGSI_OPCODE_ENDLOOP); } @@ -2063,10 +2020,10 @@ glsl_to_tgsi_visitor::visit(ir_dereference_variable *ir) ir_variable *var = ir->var; if (!entry) { - switch (var->mode) { + switch (var->data.mode) { case ir_var_uniform: entry = new(mem_ctx) variable_storage(var, PROGRAM_UNIFORM, - var->location); + var->data.location); this->variables.push_tail(entry); break; case ir_var_shader_in: @@ -2075,21 +2032,22 @@ glsl_to_tgsi_visitor::visit(ir_dereference_variable *ir) * generic attributes (glBindVertexLocation), and * user-defined varyings. */ - assert(var->location != -1); + assert(var->data.location != -1); entry = new(mem_ctx) variable_storage(var, PROGRAM_INPUT, - var->location); + var->data.location); break; case ir_var_shader_out: - assert(var->location != -1); + assert(var->data.location != -1); entry = new(mem_ctx) variable_storage(var, PROGRAM_OUTPUT, - var->location + var->index); + var->data.location + + var->data.index); break; case ir_var_system_value: entry = new(mem_ctx) variable_storage(var, PROGRAM_SYSTEM_VALUE, - var->location); + var->data.location); break; case ir_var_auto: case ir_var_temporary: @@ -2388,7 +2346,7 @@ glsl_to_tgsi_visitor::visit(ir_assignment *ir) assert(!ir->lhs->type->is_scalar() && !ir->lhs->type->is_vector()); l.writemask = WRITEMASK_XYZW; } else if (ir->lhs->type->is_scalar() && - ir->lhs->variable_referenced()->mode == ir_var_shader_out) { + ir->lhs->variable_referenced()->data.mode == ir_var_shader_out) { /* FINISHME: This hack makes writing to gl_FragDepth, which lives in the * FINISHME: W component of fragment shader output zero, work correctly. */ @@ -2664,8 +2622,8 @@ glsl_to_tgsi_visitor::visit(ir_call *ir) ir_rvalue *param_rval = (ir_rvalue *)iter.get(); ir_variable *param = (ir_variable *)sig_iter.get(); - if (param->mode == ir_var_function_in || - param->mode == ir_var_function_inout) { + if (param->data.mode == ir_var_function_in || + param->data.mode == ir_var_function_inout) { variable_storage *storage = find_variable_storage(param); assert(storage); @@ -2700,8 +2658,8 @@ glsl_to_tgsi_visitor::visit(ir_call *ir) ir_rvalue *param_rval = (ir_rvalue *)iter.get(); ir_variable *param = (ir_variable *)sig_iter.get(); - if (param->mode == ir_var_function_out || - param->mode == ir_var_function_inout) { + if (param->data.mode == ir_var_function_out || + param->data.mode == ir_var_function_inout) { variable_storage *storage = find_variable_storage(param); assert(storage); diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c index f010e1889..f72122b4f 100644 --- a/mesalib/src/mesa/state_tracker/st_program.c +++ b/mesalib/src/mesa/state_tracker/st_program.c @@ -258,6 +258,10 @@ st_prepare_vertex_program(struct gl_context *ctx, stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPVERTEX; stvp->output_semantic_index[slot] = 0; break; + case VARYING_SLOT_LAYER: + stvp->output_semantic_name[slot] = TGSI_SEMANTIC_LAYER; + stvp->output_semantic_index[slot] = 0; + break; case VARYING_SLOT_TEX0: case VARYING_SLOT_TEX1: @@ -563,6 +567,11 @@ st_translate_fragment_program(struct st_context *st, input_semantic_index[slot] = 0; interpMode[slot] = TGSI_INTERPOLATE_CONSTANT; break; + case VARYING_SLOT_PRIMITIVE_ID: + input_semantic_name[slot] = TGSI_SEMANTIC_PRIMID; + input_semantic_index[slot] = 0; + interpMode[slot] = TGSI_INTERPOLATE_CONSTANT; + break; case VARYING_SLOT_CLIP_DIST0: input_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST; input_semantic_index[slot] = 0; diff --git a/mesalib/src/mesa/state_tracker/st_texture.h b/mesalib/src/mesa/state_tracker/st_texture.h index c15aeaea6..ac93d9655 100644 --- a/mesalib/src/mesa/state_tracker/st_texture.h +++ b/mesalib/src/mesa/state_tracker/st_texture.h @@ -112,6 +112,12 @@ st_texture_object(struct gl_texture_object *obj) return (struct st_texture_object *) obj; } +static INLINE const struct st_texture_object * +st_texture_object_const(const struct gl_texture_object *obj) +{ + return (const struct st_texture_object *) obj; +} + static INLINE struct pipe_resource * st_get_texobj_resource(struct gl_texture_object *texObj) diff --git a/mesalib/src/mesa/swrast/s_texture.c b/mesalib/src/mesa/swrast/s_texture.c index 27803c553..c08a4e9d1 100644 --- a/mesalib/src/mesa/swrast/s_texture.c +++ b/mesalib/src/mesa/swrast/s_texture.c @@ -164,10 +164,9 @@ _swrast_free_texture_image_buffer(struct gl_context *ctx, struct gl_texture_image *texImage) { struct swrast_texture_image *swImage = swrast_texture_image(texImage); - if (swImage->Buffer) { - _mesa_align_free(swImage->Buffer); - swImage->Buffer = NULL; - } + + _mesa_align_free(swImage->Buffer); + swImage->Buffer = NULL; free(swImage->ImageSlices); swImage->ImageSlices = NULL; diff --git a/mesalib/src/mesa/tnl/t_vertex.c b/mesalib/src/mesa/tnl/t_vertex.c index c7a745ed7..8c4195eed 100644 --- a/mesalib/src/mesa/tnl/t_vertex.c +++ b/mesalib/src/mesa/tnl/t_vertex.c @@ -546,10 +546,8 @@ void _tnl_free_vertices( struct gl_context *ctx ) struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); struct tnl_clipspace_fastpath *fp, *tmp; - if (vtx->vertex_buf) { - _mesa_align_free(vtx->vertex_buf); - vtx->vertex_buf = NULL; - } + _mesa_align_free(vtx->vertex_buf); + vtx->vertex_buf = NULL; for (fp = vtx->fastpath ; fp ; fp = tmp) { tmp = fp->next; diff --git a/mesalib/src/mesa/vbo/vbo_exec_api.c b/mesalib/src/mesa/vbo/vbo_exec_api.c index c84d97f56..6feda1657 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_api.c +++ b/mesalib/src/mesa/vbo/vbo_exec_api.c @@ -990,11 +990,10 @@ void vbo_use_buffer_objects(struct gl_context *ctx) /* Make sure this func is only used once */ assert(exec->vtx.bufferobj == ctx->Shared->NullBufferObj); - if (exec->vtx.buffer_map) { - _mesa_align_free(exec->vtx.buffer_map); - exec->vtx.buffer_map = NULL; - exec->vtx.buffer_ptr = NULL; - } + + _mesa_align_free(exec->vtx.buffer_map); + exec->vtx.buffer_map = NULL; + exec->vtx.buffer_ptr = NULL; /* Allocate a real buffer object now */ _mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL); diff --git a/mesalib/src/mesa/x86/rtasm/x86sse.c b/mesalib/src/mesa/x86/rtasm/x86sse.c deleted file mode 100644 index c93faba79..000000000 --- a/mesalib/src/mesa/x86/rtasm/x86sse.c +++ /dev/null @@ -1,1203 +0,0 @@ -#ifdef USE_X86_ASM -#if defined(__i386__) || defined(__386__) - -#include "main/imports.h" -#include "x86sse.h" - -#define DISASSEM 0 -#define X86_TWOB 0x0f - -#if 0 -static unsigned char *cptr( void (*label)() ) -{ - return (unsigned char *)(unsigned long)label; -} -#endif - - -static void do_realloc( struct x86_function *p ) -{ - if (p->size == 0) { - p->size = 1024; - p->store = _mesa_exec_malloc(p->size); - p->csr = p->store; - } - else { - unsigned used = p->csr - p->store; - unsigned char *tmp = p->store; - p->size *= 2; - p->store = _mesa_exec_malloc(p->size); - memcpy(p->store, tmp, used); - p->csr = p->store + used; - _mesa_exec_free(tmp); - } -} - -/* Emit bytes to the instruction stream: - */ -static unsigned char *reserve( struct x86_function *p, int bytes ) -{ - if (p->csr + bytes - p->store > p->size) - do_realloc(p); - - { - unsigned char *csr = p->csr; - p->csr += bytes; - return csr; - } -} - - - -static void emit_1b( struct x86_function *p, char b0 ) -{ - char *csr = (char *)reserve(p, 1); - *csr = b0; -} - -static void emit_1i( struct x86_function *p, int i0 ) -{ - int *icsr = (int *)reserve(p, sizeof(i0)); - *icsr = i0; -} - -static void emit_1ub( struct x86_function *p, unsigned char b0 ) -{ - unsigned char *csr = reserve(p, 1); - *csr++ = b0; -} - -static void emit_2ub( struct x86_function *p, unsigned char b0, unsigned char b1 ) -{ - unsigned char *csr = reserve(p, 2); - *csr++ = b0; - *csr++ = b1; -} - -static void emit_3ub( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2 ) -{ - unsigned char *csr = reserve(p, 3); - *csr++ = b0; - *csr++ = b1; - *csr++ = b2; -} - - -/* Build a modRM byte + possible displacement. No treatment of SIB - * indexing. BZZT - no way to encode an absolute address. - */ -static void emit_modrm( struct x86_function *p, - struct x86_reg reg, - struct x86_reg regmem ) -{ - unsigned char val = 0; - - assert(reg.mod == mod_REG); - - val |= regmem.mod << 6; /* mod field */ - val |= reg.idx << 3; /* reg field */ - val |= regmem.idx; /* r/m field */ - - emit_1ub(p, val); - - /* Oh-oh we've stumbled into the SIB thing. - */ - if (regmem.file == file_REG32 && - regmem.idx == reg_SP) { - emit_1ub(p, 0x24); /* simplistic! */ - } - - switch (regmem.mod) { - case mod_REG: - case mod_INDIRECT: - break; - case mod_DISP8: - emit_1b(p, regmem.disp); - break; - case mod_DISP32: - emit_1i(p, regmem.disp); - break; - default: - assert(0); - break; - } -} - - -static void emit_modrm_noreg( struct x86_function *p, - unsigned op, - struct x86_reg regmem ) -{ - struct x86_reg dummy = x86_make_reg(file_REG32, op); - emit_modrm(p, dummy, regmem); -} - -/* Many x86 instructions have two opcodes to cope with the situations - * where the destination is a register or memory reference - * respectively. This function selects the correct opcode based on - * the arguments presented. - */ -static void emit_op_modrm( struct x86_function *p, - unsigned char op_dst_is_reg, - unsigned char op_dst_is_mem, - struct x86_reg dst, - struct x86_reg src ) -{ - switch (dst.mod) { - case mod_REG: - emit_1ub(p, op_dst_is_reg); - emit_modrm(p, dst, src); - break; - case mod_INDIRECT: - case mod_DISP32: - case mod_DISP8: - assert(src.mod == mod_REG); - emit_1ub(p, op_dst_is_mem); - emit_modrm(p, src, dst); - break; - default: - assert(0); - break; - } -} - - - - - - - -/* Create and manipulate registers and regmem values: - */ -struct x86_reg x86_make_reg( enum x86_reg_file file, - enum x86_reg_name idx ) -{ - struct x86_reg reg; - - reg.file = file; - reg.idx = idx; - reg.mod = mod_REG; - reg.disp = 0; - - return reg; -} - -struct x86_reg x86_make_disp( struct x86_reg reg, - int disp ) -{ - assert(reg.file == file_REG32); - - if (reg.mod == mod_REG) - reg.disp = disp; - else - reg.disp += disp; - - if (reg.disp == 0) - reg.mod = mod_INDIRECT; - else if (reg.disp <= 127 && reg.disp >= -128) - reg.mod = mod_DISP8; - else - reg.mod = mod_DISP32; - - return reg; -} - -struct x86_reg x86_deref( struct x86_reg reg ) -{ - return x86_make_disp(reg, 0); -} - -struct x86_reg x86_get_base_reg( struct x86_reg reg ) -{ - return x86_make_reg( reg.file, reg.idx ); -} - -unsigned char *x86_get_label( struct x86_function *p ) -{ - return p->csr; -} - - - -/*********************************************************************** - * x86 instructions - */ - - -void x86_jcc( struct x86_function *p, - enum x86_cc cc, - unsigned char *label ) -{ - int offset = label - (x86_get_label(p) + 2); - - if (offset <= 127 && offset >= -128) { - emit_1ub(p, 0x70 + cc); - emit_1b(p, (char) offset); - } - else { - offset = label - (x86_get_label(p) + 6); - emit_2ub(p, 0x0f, 0x80 + cc); - emit_1i(p, offset); - } -} - -/* Always use a 32bit offset for forward jumps: - */ -unsigned char *x86_jcc_forward( struct x86_function *p, - enum x86_cc cc ) -{ - emit_2ub(p, 0x0f, 0x80 + cc); - emit_1i(p, 0); - return x86_get_label(p); -} - -unsigned char *x86_jmp_forward( struct x86_function *p) -{ - emit_1ub(p, 0xe9); - emit_1i(p, 0); - return x86_get_label(p); -} - -unsigned char *x86_call_forward( struct x86_function *p) -{ - emit_1ub(p, 0xe8); - emit_1i(p, 0); - return x86_get_label(p); -} - -/* Fixup offset from forward jump: - */ -void x86_fixup_fwd_jump( struct x86_function *p, - unsigned char *fixup ) -{ - *(int *)(fixup - 4) = x86_get_label(p) - fixup; -} - -void x86_jmp( struct x86_function *p, unsigned char *label) -{ - emit_1ub(p, 0xe9); - emit_1i(p, label - x86_get_label(p) - 4); -} - -#if 0 -/* This doesn't work once we start reallocating & copying the - * generated code on buffer fills, because the call is relative to the - * current pc. - */ -void x86_call( struct x86_function *p, void (*label)()) -{ - emit_1ub(p, 0xe8); - emit_1i(p, cptr(label) - x86_get_label(p) - 4); -} -#else -void x86_call( struct x86_function *p, struct x86_reg reg) -{ - emit_1ub(p, 0xff); - emit_modrm_noreg(p, 2, reg); -} -#endif - - -/* michal: - * Temporary. As I need immediate operands, and dont want to mess with the codegen, - * I load the immediate into general purpose register and use it. - */ -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - assert(dst.mod == mod_REG); - emit_1ub(p, 0xb8 + dst.idx); - emit_1i(p, imm); -} - -void x86_push( struct x86_function *p, - struct x86_reg reg ) -{ - assert(reg.mod == mod_REG); - emit_1ub(p, 0x50 + reg.idx); - p->stack_offset += 4; -} - -void x86_pop( struct x86_function *p, - struct x86_reg reg ) -{ - assert(reg.mod == mod_REG); - emit_1ub(p, 0x58 + reg.idx); - p->stack_offset -= 4; -} - -void x86_inc( struct x86_function *p, - struct x86_reg reg ) -{ - assert(reg.mod == mod_REG); - emit_1ub(p, 0x40 + reg.idx); -} - -void x86_dec( struct x86_function *p, - struct x86_reg reg ) -{ - assert(reg.mod == mod_REG); - emit_1ub(p, 0x48 + reg.idx); -} - -void x86_ret( struct x86_function *p ) -{ - emit_1ub(p, 0xc3); -} - -void x86_sahf( struct x86_function *p ) -{ - emit_1ub(p, 0x9e); -} - -void x86_mov( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_op_modrm( p, 0x8b, 0x89, dst, src ); -} - -void x86_xor( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_op_modrm( p, 0x33, 0x31, dst, src ); -} - -void x86_cmp( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_op_modrm( p, 0x3b, 0x39, dst, src ); -} - -void x86_lea( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_1ub(p, 0x8d); - emit_modrm( p, dst, src ); -} - -void x86_test( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_1ub(p, 0x85); - emit_modrm( p, dst, src ); -} - -void x86_add( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_op_modrm(p, 0x03, 0x01, dst, src ); -} - -void x86_mul( struct x86_function *p, - struct x86_reg src ) -{ - assert (src.file == file_REG32 && src.mod == mod_REG); - emit_op_modrm(p, 0xf7, 0, x86_make_reg (file_REG32, reg_SP), src ); -} - -void x86_sub( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_op_modrm(p, 0x2b, 0x29, dst, src ); -} - -void x86_or( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_op_modrm( p, 0x0b, 0x09, dst, src ); -} - -void x86_and( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_op_modrm( p, 0x23, 0x21, dst, src ); -} - - - -/*********************************************************************** - * SSE instructions - */ - - -void sse_movss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, 0xF3, X86_TWOB); - emit_op_modrm( p, 0x10, 0x11, dst, src ); -} - -void sse_movaps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x28, 0x29, dst, src ); -} - -void sse_movups( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x10, 0x11, dst, src ); -} - -void sse_movhps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - assert(dst.mod != mod_REG || src.mod != mod_REG); - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x16, 0x17, dst, src ); /* cf movlhps */ -} - -void sse_movlps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - assert(dst.mod != mod_REG || src.mod != mod_REG); - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x12, 0x13, dst, src ); /* cf movhlps */ -} - -void sse_maxps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x5F); - emit_modrm( p, dst, src ); -} - -void sse_maxss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0xF3, X86_TWOB, 0x5F); - emit_modrm( p, dst, src ); -} - -void sse_divss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0xF3, X86_TWOB, 0x5E); - emit_modrm( p, dst, src ); -} - -void sse_minps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x5D); - emit_modrm( p, dst, src ); -} - -void sse_subps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x5C); - emit_modrm( p, dst, src ); -} - -void sse_mulps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x59); - emit_modrm( p, dst, src ); -} - -void sse_mulss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0xF3, X86_TWOB, 0x59); - emit_modrm( p, dst, src ); -} - -void sse_addps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x58); - emit_modrm( p, dst, src ); -} - -void sse_addss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0xF3, X86_TWOB, 0x58); - emit_modrm( p, dst, src ); -} - -void sse_andnps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x55); - emit_modrm( p, dst, src ); -} - -void sse_andps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x54); - emit_modrm( p, dst, src ); -} - -void sse_rsqrtps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x52); - emit_modrm( p, dst, src ); -} - -void sse_rsqrtss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0xF3, X86_TWOB, 0x52); - emit_modrm( p, dst, src ); - -} - -void sse_movhlps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - assert(dst.mod == mod_REG && src.mod == mod_REG); - emit_2ub(p, X86_TWOB, 0x12); - emit_modrm( p, dst, src ); -} - -void sse_movlhps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - assert(dst.mod == mod_REG && src.mod == mod_REG); - emit_2ub(p, X86_TWOB, 0x16); - emit_modrm( p, dst, src ); -} - -void sse_orps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x56); - emit_modrm( p, dst, src ); -} - -void sse_xorps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x57); - emit_modrm( p, dst, src ); -} - -void sse_cvtps2pi( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - assert(dst.file == file_MMX && - (src.file == file_XMM || src.mod != mod_REG)); - - p->need_emms = 1; - - emit_2ub(p, X86_TWOB, 0x2d); - emit_modrm( p, dst, src ); -} - - -/* Shufps can also be used to implement a reduced swizzle when dest == - * arg0. - */ -void sse_shufps( struct x86_function *p, - struct x86_reg dest, - struct x86_reg arg0, - unsigned char shuf) -{ - emit_2ub(p, X86_TWOB, 0xC6); - emit_modrm(p, dest, arg0); - emit_1ub(p, shuf); -} - -void sse_cmpps( struct x86_function *p, - struct x86_reg dest, - struct x86_reg arg0, - unsigned char cc) -{ - emit_2ub(p, X86_TWOB, 0xC2); - emit_modrm(p, dest, arg0); - emit_1ub(p, cc); -} - -void sse_pmovmskb( struct x86_function *p, - struct x86_reg dest, - struct x86_reg src) -{ - emit_3ub(p, 0x66, X86_TWOB, 0xD7); - emit_modrm(p, dest, src); -} - -/*********************************************************************** - * SSE2 instructions - */ - -/** - * Perform a reduced swizzle: - */ -void sse2_pshufd( struct x86_function *p, - struct x86_reg dest, - struct x86_reg arg0, - unsigned char shuf) -{ - emit_3ub(p, 0x66, X86_TWOB, 0x70); - emit_modrm(p, dest, arg0); - emit_1ub(p, shuf); -} - -void sse2_cvttps2dq( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub( p, 0xF3, X86_TWOB, 0x5B ); - emit_modrm( p, dst, src ); -} - -void sse2_cvtps2dq( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0x66, X86_TWOB, 0x5B); - emit_modrm( p, dst, src ); -} - -void sse2_packssdw( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0x66, X86_TWOB, 0x6B); - emit_modrm( p, dst, src ); -} - -void sse2_packsswb( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0x66, X86_TWOB, 0x63); - emit_modrm( p, dst, src ); -} - -void sse2_packuswb( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0x66, X86_TWOB, 0x67); - emit_modrm( p, dst, src ); -} - -void sse2_rcpps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, X86_TWOB, 0x53); - emit_modrm( p, dst, src ); -} - -void sse2_rcpss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_3ub(p, 0xF3, X86_TWOB, 0x53); - emit_modrm( p, dst, src ); -} - -void sse2_movd( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - emit_2ub(p, 0x66, X86_TWOB); - emit_op_modrm( p, 0x6e, 0x7e, dst, src ); -} - - - - -/*********************************************************************** - * x87 instructions - */ -void x87_fist( struct x86_function *p, struct x86_reg dst ) -{ - emit_1ub(p, 0xdb); - emit_modrm_noreg(p, 2, dst); -} - -void x87_fistp( struct x86_function *p, struct x86_reg dst ) -{ - emit_1ub(p, 0xdb); - emit_modrm_noreg(p, 3, dst); -} - -void x87_fild( struct x86_function *p, struct x86_reg arg ) -{ - emit_1ub(p, 0xdf); - emit_modrm_noreg(p, 0, arg); -} - -void x87_fldz( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xee); -} - - -void x87_fldcw( struct x86_function *p, struct x86_reg arg ) -{ - assert(arg.file == file_REG32); - assert(arg.mod != mod_REG); - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 5, arg); -} - -void x87_fld1( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xe8); -} - -void x87_fldl2e( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xea); -} - -void x87_fldln2( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xed); -} - -void x87_fwait( struct x86_function *p ) -{ - emit_1ub(p, 0x9b); -} - -void x87_fnclex( struct x86_function *p ) -{ - emit_2ub(p, 0xdb, 0xe2); -} - -void x87_fclex( struct x86_function *p ) -{ - x87_fwait(p); - x87_fnclex(p); -} - - -static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86_reg arg, - unsigned char dst0ub0, - unsigned char dst0ub1, - unsigned char arg0ub0, - unsigned char arg0ub1, - unsigned char argmem_noreg) -{ - assert(dst.file == file_x87); - - if (arg.file == file_x87) { - if (dst.idx == 0) - emit_2ub(p, dst0ub0, dst0ub1+arg.idx); - else if (arg.idx == 0) - emit_2ub(p, arg0ub0, arg0ub1+arg.idx); - else - assert(0); - } - else if (dst.idx == 0) { - assert(arg.file == file_REG32); - emit_1ub(p, 0xd8); - emit_modrm_noreg(p, argmem_noreg, arg); - } - else - assert(0); -} - -void x87_fmul( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ) -{ - x87_arith_op(p, dst, arg, - 0xd8, 0xc8, - 0xdc, 0xc8, - 4); -} - -void x87_fsub( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ) -{ - x87_arith_op(p, dst, arg, - 0xd8, 0xe0, - 0xdc, 0xe8, - 4); -} - -void x87_fsubr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ) -{ - x87_arith_op(p, dst, arg, - 0xd8, 0xe8, - 0xdc, 0xe0, - 5); -} - -void x87_fadd( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ) -{ - x87_arith_op(p, dst, arg, - 0xd8, 0xc0, - 0xdc, 0xc0, - 0); -} - -void x87_fdiv( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ) -{ - x87_arith_op(p, dst, arg, - 0xd8, 0xf0, - 0xdc, 0xf8, - 6); -} - -void x87_fdivr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ) -{ - x87_arith_op(p, dst, arg, - 0xd8, 0xf8, - 0xdc, 0xf0, - 7); -} - -void x87_fmulp( struct x86_function *p, struct x86_reg dst ) -{ - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xc8+dst.idx); -} - -void x87_fsubp( struct x86_function *p, struct x86_reg dst ) -{ - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xe8+dst.idx); -} - -void x87_fsubrp( struct x86_function *p, struct x86_reg dst ) -{ - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xe0+dst.idx); -} - -void x87_faddp( struct x86_function *p, struct x86_reg dst ) -{ - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xc0+dst.idx); -} - -void x87_fdivp( struct x86_function *p, struct x86_reg dst ) -{ - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xf8+dst.idx); -} - -void x87_fdivrp( struct x86_function *p, struct x86_reg dst ) -{ - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xf0+dst.idx); -} - -void x87_fucom( struct x86_function *p, struct x86_reg arg ) -{ - assert(arg.file == file_x87); - emit_2ub(p, 0xdd, 0xe0+arg.idx); -} - -void x87_fucomp( struct x86_function *p, struct x86_reg arg ) -{ - assert(arg.file == file_x87); - emit_2ub(p, 0xdd, 0xe8+arg.idx); -} - -void x87_fucompp( struct x86_function *p ) -{ - emit_2ub(p, 0xda, 0xe9); -} - -void x87_fxch( struct x86_function *p, struct x86_reg arg ) -{ - assert(arg.file == file_x87); - emit_2ub(p, 0xd9, 0xc8+arg.idx); -} - -void x87_fabs( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xe1); -} - -void x87_fchs( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xe0); -} - -void x87_fcos( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xff); -} - - -void x87_fprndint( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xfc); -} - -void x87_fscale( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xfd); -} - -void x87_fsin( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xfe); -} - -void x87_fsincos( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xfb); -} - -void x87_fsqrt( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xfa); -} - -void x87_fxtract( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xf4); -} - -/* st0 = (2^st0)-1 - * - * Restrictions: -1.0 <= st0 <= 1.0 - */ -void x87_f2xm1( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xf0); -} - -/* st1 = st1 * log2(st0); - * pop_stack; - */ -void x87_fyl2x( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xf1); -} - -/* st1 = st1 * log2(st0 + 1.0); - * pop_stack; - * - * A fast operation, with restrictions: -.29 < st0 < .29 - */ -void x87_fyl2xp1( struct x86_function *p ) -{ - emit_2ub(p, 0xd9, 0xf9); -} - - -void x87_fld( struct x86_function *p, struct x86_reg arg ) -{ - if (arg.file == file_x87) - emit_2ub(p, 0xd9, 0xc0 + arg.idx); - else { - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 0, arg); - } -} - -void x87_fst( struct x86_function *p, struct x86_reg dst ) -{ - if (dst.file == file_x87) - emit_2ub(p, 0xdd, 0xd0 + dst.idx); - else { - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 2, dst); - } -} - -void x87_fstp( struct x86_function *p, struct x86_reg dst ) -{ - if (dst.file == file_x87) - emit_2ub(p, 0xdd, 0xd8 + dst.idx); - else { - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 3, dst); - } -} - -void x87_fcom( struct x86_function *p, struct x86_reg dst ) -{ - if (dst.file == file_x87) - emit_2ub(p, 0xd8, 0xd0 + dst.idx); - else { - emit_1ub(p, 0xd8); - emit_modrm_noreg(p, 2, dst); - } -} - -void x87_fcomp( struct x86_function *p, struct x86_reg dst ) -{ - if (dst.file == file_x87) - emit_2ub(p, 0xd8, 0xd8 + dst.idx); - else { - emit_1ub(p, 0xd8); - emit_modrm_noreg(p, 3, dst); - } -} - - -void x87_fnstsw( struct x86_function *p, struct x86_reg dst ) -{ - assert(dst.file == file_REG32); - - if (dst.idx == reg_AX && - dst.mod == mod_REG) - emit_2ub(p, 0xdf, 0xe0); - else { - emit_1ub(p, 0xdd); - emit_modrm_noreg(p, 7, dst); - } -} - - - - -/*********************************************************************** - * MMX instructions - */ - -void mmx_emms( struct x86_function *p ) -{ - assert(p->need_emms); - emit_2ub(p, 0x0f, 0x77); - p->need_emms = 0; -} - -void mmx_packssdw( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - assert(dst.file == file_MMX && - (src.file == file_MMX || src.mod != mod_REG)); - - p->need_emms = 1; - - emit_2ub(p, X86_TWOB, 0x6b); - emit_modrm( p, dst, src ); -} - -void mmx_packuswb( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - assert(dst.file == file_MMX && - (src.file == file_MMX || src.mod != mod_REG)); - - p->need_emms = 1; - - emit_2ub(p, X86_TWOB, 0x67); - emit_modrm( p, dst, src ); -} - -void mmx_movd( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - p->need_emms = 1; - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x6e, 0x7e, dst, src ); -} - -void mmx_movq( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - p->need_emms = 1; - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x6f, 0x7f, dst, src ); -} - - -/*********************************************************************** - * Helper functions - */ - - -/* Retreive a reference to one of the function arguments, taking into - * account any push/pop activity: - */ -struct x86_reg x86_fn_arg( struct x86_function *p, - unsigned arg ) -{ - return x86_make_disp(x86_make_reg(file_REG32, reg_SP), - p->stack_offset + arg * 4); /* ??? */ -} - - -void x86_init_func( struct x86_function *p ) -{ - p->size = 0; - p->store = NULL; - p->csr = p->store; -} - -int x86_init_func_size( struct x86_function *p, unsigned code_size ) -{ - p->size = code_size; - p->store = _mesa_exec_malloc(code_size); - p->csr = p->store; - return p->store != NULL; -} - -void x86_release_func( struct x86_function *p ) -{ - _mesa_exec_free(p->store); - p->store = NULL; - p->csr = NULL; - p->size = 0; -} - - -void (*x86_get_func( struct x86_function *p ))(void) -{ - if (DISASSEM && p->store) - printf("disassemble %p %p\n", p->store, p->csr); - return (void (*)(void)) (unsigned long) p->store; -} - -#else - -void x86sse_dummy( void ) -{ -} - -#endif - -#else /* USE_X86_ASM */ - -int x86sse_c_dummy_var; /* silence warning */ - -#endif /* USE_X86_ASM */ diff --git a/mesalib/src/mesa/x86/rtasm/x86sse.h b/mesalib/src/mesa/x86/rtasm/x86sse.h deleted file mode 100644 index f6282f5bd..000000000 --- a/mesalib/src/mesa/x86/rtasm/x86sse.h +++ /dev/null @@ -1,256 +0,0 @@ - -#ifndef _X86SSE_H_ -#define _X86SSE_H_ - -#if defined(__i386__) || defined(__386__) - -/* It is up to the caller to ensure that instructions issued are - * suitable for the host cpu. There are no checks made in this module - * for mmx/sse/sse2 support on the cpu. - */ -struct x86_reg { - unsigned file:3; - unsigned idx:3; - unsigned mod:2; /* mod_REG if this is just a register */ - int disp:24; /* only +/- 23bits of offset - should be enough... */ -}; - -struct x86_function { - unsigned size; - unsigned char *store; - unsigned char *csr; - unsigned stack_offset; - int need_emms; - const char *fn; -}; - -enum x86_reg_file { - file_REG32, - file_MMX, - file_XMM, - file_x87 -}; - -/* Values for mod field of modr/m byte - */ -enum x86_reg_mod { - mod_INDIRECT, - mod_DISP8, - mod_DISP32, - mod_REG -}; - -enum x86_reg_name { - reg_AX, - reg_CX, - reg_DX, - reg_BX, - reg_SP, - reg_BP, - reg_SI, - reg_DI -}; - - -enum x86_cc { - cc_O, /* overflow */ - cc_NO, /* not overflow */ - cc_NAE, /* not above or equal / carry */ - cc_AE, /* above or equal / not carry */ - cc_E, /* equal / zero */ - cc_NE /* not equal / not zero */ -}; - -enum sse_cc { - cc_Equal, - cc_LessThan, - cc_LessThanEqual, - cc_Unordered, - cc_NotEqual, - cc_NotLessThan, - cc_NotLessThanEqual, - cc_Ordered -}; - -#define cc_Z cc_E -#define cc_NZ cc_NE - -/* Begin/end/retreive function creation: - */ - - -void x86_init_func( struct x86_function *p ); -int x86_init_func_size( struct x86_function *p, unsigned code_size ); -void x86_release_func( struct x86_function *p ); -void (*x86_get_func( struct x86_function *p ))( void ); - - - -/* Create and manipulate registers and regmem values: - */ -struct x86_reg x86_make_reg( enum x86_reg_file file, - enum x86_reg_name idx ); - -struct x86_reg x86_make_disp( struct x86_reg reg, - int disp ); - -struct x86_reg x86_deref( struct x86_reg reg ); - -struct x86_reg x86_get_base_reg( struct x86_reg reg ); - - -/* Labels, jumps and fixup: - */ -unsigned char *x86_get_label( struct x86_function *p ); - -void x86_jcc( struct x86_function *p, - enum x86_cc cc, - unsigned char *label ); - -unsigned char *x86_jcc_forward( struct x86_function *p, - enum x86_cc cc ); - -unsigned char *x86_jmp_forward( struct x86_function *p); - -unsigned char *x86_call_forward( struct x86_function *p); - -void x86_fixup_fwd_jump( struct x86_function *p, - unsigned char *fixup ); - -void x86_jmp( struct x86_function *p, unsigned char *label ); - -/* void x86_call( struct x86_function *p, void (*label)() ); */ -void x86_call( struct x86_function *p, struct x86_reg reg); - -/* michal: - * Temporary. As I need immediate operands, and dont want to mess with the codegen, - * I load the immediate into general purpose register and use it. - */ -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ); - - -/* Macro for sse_shufps() and sse2_pshufd(): - */ -#define SHUF(_x,_y,_z,_w) (((_x)<<0) | ((_y)<<2) | ((_z)<<4) | ((_w)<<6)) -#define SHUF_NOOP RSW(0,1,2,3) -#define GET_SHUF(swz, idx) (((swz) >> ((idx)*2)) & 0x3) - -void mmx_emms( struct x86_function *p ); -void mmx_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void mmx_movq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void mmx_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void mmx_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); - -void sse2_cvtps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_cvttps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_packsswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf ); -void sse2_rcpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); - -void sse_addps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_addss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_andnps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, - unsigned char cc ); -void sse_maxps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_maxss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_minps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movaps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movhlps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movlhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movlps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movups( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_mulps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_mulss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_orps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_xorps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_subps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_rsqrtps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf ); -void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src ); - -void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_and( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_cmp( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_dec( struct x86_function *p, struct x86_reg reg ); -void x86_inc( struct x86_function *p, struct x86_reg reg ); -void x86_lea( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_mov( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_mul( struct x86_function *p, struct x86_reg src ); -void x86_or( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_pop( struct x86_function *p, struct x86_reg reg ); -void x86_push( struct x86_function *p, struct x86_reg reg ); -void x86_ret( struct x86_function *p ); -void x86_sub( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_test( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_xor( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_sahf( struct x86_function *p ); - -void x87_f2xm1( struct x86_function *p ); -void x87_fabs( struct x86_function *p ); -void x87_fadd( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_faddp( struct x86_function *p, struct x86_reg dst ); -void x87_fchs( struct x86_function *p ); -void x87_fclex( struct x86_function *p ); -void x87_fcom( struct x86_function *p, struct x86_reg dst ); -void x87_fcomp( struct x86_function *p, struct x86_reg dst ); -void x87_fcos( struct x86_function *p ); -void x87_fdiv( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fdivp( struct x86_function *p, struct x86_reg dst ); -void x87_fdivr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fdivrp( struct x86_function *p, struct x86_reg dst ); -void x87_fild( struct x86_function *p, struct x86_reg arg ); -void x87_fist( struct x86_function *p, struct x86_reg dst ); -void x87_fistp( struct x86_function *p, struct x86_reg dst ); -void x87_fld( struct x86_function *p, struct x86_reg arg ); -void x87_fld1( struct x86_function *p ); -void x87_fldcw( struct x86_function *p, struct x86_reg arg ); -void x87_fldl2e( struct x86_function *p ); -void x87_fldln2( struct x86_function *p ); -void x87_fldz( struct x86_function *p ); -void x87_fmul( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fmulp( struct x86_function *p, struct x86_reg dst ); -void x87_fnclex( struct x86_function *p ); -void x87_fprndint( struct x86_function *p ); -void x87_fscale( struct x86_function *p ); -void x87_fsin( struct x86_function *p ); -void x87_fsincos( struct x86_function *p ); -void x87_fsqrt( struct x86_function *p ); -void x87_fst( struct x86_function *p, struct x86_reg dst ); -void x87_fstp( struct x86_function *p, struct x86_reg dst ); -void x87_fsub( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fsubp( struct x86_function *p, struct x86_reg dst ); -void x87_fsubr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fsubrp( struct x86_function *p, struct x86_reg dst ); -void x87_fxch( struct x86_function *p, struct x86_reg dst ); -void x87_fxtract( struct x86_function *p ); -void x87_fyl2x( struct x86_function *p ); -void x87_fyl2xp1( struct x86_function *p ); -void x87_fwait( struct x86_function *p ); -void x87_fnstsw( struct x86_function *p, struct x86_reg dst ); -void x87_fucompp( struct x86_function *p ); -void x87_fucomp( struct x86_function *p, struct x86_reg arg ); -void x87_fucom( struct x86_function *p, struct x86_reg arg ); - - - -/* Retreive a reference to one of the function arguments, taking into - * account any push/pop activity. Note - doesn't track explict - * manipulation of ESP by other instructions. - */ -struct x86_reg x86_fn_arg( struct x86_function *p, unsigned arg ); - -#endif -#endif diff --git a/pixman/pixman/pixman-combine-float.c b/pixman/pixman/pixman-combine-float.c index 5ea739f76..e9aab4833 100644 --- a/pixman/pixman/pixman-combine-float.c +++ b/pixman/pixman/pixman-combine-float.c @@ -438,7 +438,7 @@ blend_hard_light (float sa, float s, float da, float d) static force_inline float blend_soft_light (float sa, float s, float da, float d) { - if (2 * s < sa) + if (2 * s <= sa) { if (FLOAT_IS_ZERO (da)) return d * sa; diff --git a/pixman/pixman/pixman-combine32.c b/pixman/pixman/pixman-combine32.c index 450114a52..44ca7e857 100644 --- a/pixman/pixman/pixman-combine32.c +++ b/pixman/pixman/pixman-combine32.c @@ -848,7 +848,7 @@ blend_soft_light (uint32_t d_org, double as = as_org * (1.0 / MASK); double r; - if (2 * s < as) + if (2 * s <= as) { if (ad == 0) r = d * as; diff --git a/pixman/pixman/pixman-general.c b/pixman/pixman/pixman-general.c index a653fa71a..8bce7c006 100644 --- a/pixman/pixman/pixman-general.c +++ b/pixman/pixman/pixman-general.c @@ -183,11 +183,7 @@ general_composite_rect (pixman_implementation_t *imp, mask_image = NULL; } - component_alpha = - mask_image && - mask_image->common.type == BITS && - mask_image->common.component_alpha && - PIXMAN_FORMAT_RGB (mask_image->bits.format); + component_alpha = mask_image && mask_image->common.component_alpha; _pixman_implementation_iter_init ( imp->toplevel, &mask_iter, diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c index ea03f475d..df8235841 100644 --- a/pixman/test/blitters-test.c +++ b/pixman/test/blitters-test.c @@ -394,6 +394,6 @@ main (int argc, const char *argv[]) } return fuzzer_test_main("blitters", 2000000, - 0xE0A07495, + 0x63B4E3F3, test_composite, argc, argv); } diff --git a/pixman/test/composite.c b/pixman/test/composite.c index 9e51a8f65..594c69772 100644 --- a/pixman/test/composite.c +++ b/pixman/test/composite.c @@ -299,17 +299,6 @@ composite_test (image_t *dst, } } - if (mask) - { - if (component_alpha && PIXMAN_FORMAT_R (mask->format) == 0) - { - /* Ax component-alpha masks expand alpha into - * all color channels. - */ - tmsk.r = tmsk.g = tmsk.b = tmsk.a; - } - } - if (PIXMAN_FORMAT_TYPE (dst->format) == PIXMAN_TYPE_ARGB_SRGB) { tdst.r = convert_linear_to_srgb (tdst.r); diff --git a/xorg-server/Xext/panoramiX.c b/xorg-server/Xext/panoramiX.c index be7e03100..4b82200ec 100644 --- a/xorg-server/Xext/panoramiX.c +++ b/xorg-server/Xext/panoramiX.c @@ -54,6 +54,7 @@ Equipment Corporation. #include "resource.h" #include "picturestr.h" #include "xfixesint.h" +#include "damageextint.h" #ifdef COMPOSITE #include "compint.h" #endif @@ -73,7 +74,7 @@ int PanoramiXPixWidth = 0; int PanoramiXPixHeight = 0; int PanoramiXNumScreens = 0; -static RegionRec PanoramiXScreenRegion = { {0, 0, 0, 0}, NULL }; +_X_EXPORT RegionRec PanoramiXScreenRegion = { {0, 0, 0, 0}, NULL }; static int PanoramiXNumDepths; static DepthPtr PanoramiXDepths; @@ -582,6 +583,7 @@ PanoramiXExtensionInit(void) PanoramiXRenderInit(); PanoramiXFixesInit(); + PanoramiXDamageInit(); #ifdef COMPOSITE PanoramiXCompositeInit(); #endif @@ -887,6 +889,7 @@ PanoramiXResetProc(ExtensionEntry * extEntry) PanoramiXRenderReset(); PanoramiXFixesReset(); + PanoramiXDamageReset(); #ifdef COMPOSITE PanoramiXCompositeReset (); #endif diff --git a/xorg-server/Xext/panoramiXsrv.h b/xorg-server/Xext/panoramiXsrv.h index 7c605fe66..0fcde4fd5 100644 --- a/xorg-server/Xext/panoramiXsrv.h +++ b/xorg-server/Xext/panoramiXsrv.h @@ -11,6 +11,7 @@ extern _X_EXPORT int PanoramiXNumScreens; extern _X_EXPORT int PanoramiXPixWidth; extern _X_EXPORT int PanoramiXPixHeight; +extern _X_EXPORT RegionRec PanoramiXScreenRegion; extern _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig); extern _X_EXPORT void PanoramiXConsolidate(void); diff --git a/xorg-server/Xext/shm.c b/xorg-server/Xext/shm.c index 227fe8c4f..2cf720ed7 100644 --- a/xorg-server/Xext/shm.c +++ b/xorg-server/Xext/shm.c @@ -39,6 +39,7 @@ in this Software without prior written authorization from The Open Group. #endif #include <unistd.h> #include <sys/stat.h> +#include <fcntl.h> #include <X11/X.h> #include <X11/Xproto.h> #include "misc.h" @@ -1196,6 +1197,35 @@ ProcShmAttachFd(ClientPtr client) } static int +shm_tmpfile(void) +{ +#ifdef SHMDIR + int fd; + int flags; + char template[] = SHMDIR "/shmfd-XXXXXX"; +#ifdef O_TMPFILE + fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); + if (fd >= 0) { + ErrorF ("Using O_TMPFILE\n"); + return fd; + } + ErrorF ("Not using O_TMPFILE\n"); +#endif + fd = mkstemp(template); + if (fd < 0) + return -1; + unlink(template); + if (fcntl(fd, F_GETFD, &flags) >= 0) { + flags |= FD_CLOEXEC; + (void) fcntl(fd, F_SETFD, &flags); + } + return fd; +#else + return -1; +#endif +} + +static int ProcShmCreateSegment(ClientPtr client) { int fd; @@ -1207,17 +1237,15 @@ ProcShmCreateSegment(ClientPtr client) .sequenceNumber = client->sequence, .length = 0, }; - char template[] = "/tmp/shm-XXXXXX"; REQUEST_SIZE_MATCH(xShmCreateSegmentReq); if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { client->errorValue = stuff->readOnly; return BadValue; } - fd = mkstemp(template); + fd = shm_tmpfile(); if (fd < 0) return BadAlloc; - unlink(template); if (ftruncate(fd, stuff->size) < 0) { close(fd); return BadAlloc; diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index d3c7fc54d..4e180d755 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1415,7 +1415,8 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, !(ev->device_event.flags & TOUCH_CLIENT_ID)) TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch); - if (deliveries && ev->any.type == ET_TouchEnd && + if (ev->any.type == ET_TouchEnd && + ti->num_listeners == 1 && !dev->button->buttonsDown && dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) { (*dev->deviceGrab.DeactivateGrab) (dev); @@ -1849,7 +1850,8 @@ DeliverTouchBeginEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, if (rc == Success) { listener->state = LISTENER_IS_OWNER; /* async grabs cannot replay, so automatically accept this touch */ - if (dev->deviceGrab.grab && + if (listener->type == LISTENER_POINTER_GRAB && + dev->deviceGrab.grab && dev->deviceGrab.fromPassiveGrab && dev->deviceGrab.grab->pointerMode == GrabModeAsync) ActivateEarlyAccept(dev, ti); diff --git a/xorg-server/composite/compinit.c b/xorg-server/composite/compinit.c index bc1130e78..3c910914e 100644 --- a/xorg-server/composite/compinit.c +++ b/xorg-server/composite/compinit.c @@ -117,11 +117,11 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask) if (ret && (mask & CWBackingStore) && pScreen->backingStoreSupport != NotUseful) { - if (pWin->backingStore != NotUseful) { + if (pWin->backingStore != NotUseful && !pWin->backStorage) { compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); pWin->backStorage = (pointer) (intptr_t) 1; } - else { + else if (pWin->backingStore == NotUseful && pWin->backStorage) { compUnredirectWindow(serverClient, pWin, CompositeRedirectAutomatic); pWin->backStorage = NULL; @@ -355,6 +355,9 @@ compScreenInit(ScreenPtr pScreen) return FALSE; } + if (!disableBackingStore) + pScreen->backingStoreSupport = WhenMapped; + cs->PositionWindow = pScreen->PositionWindow; pScreen->PositionWindow = compPositionWindow; diff --git a/xorg-server/composite/compoverlay.c b/xorg-server/composite/compoverlay.c index 3eafc2031..ae3dcb61d 100644 --- a/xorg-server/composite/compoverlay.c +++ b/xorg-server/composite/compoverlay.c @@ -137,16 +137,19 @@ compCreateOverlayWindow(ScreenPtr pScreen) int result; int w = pScreen->width; int h = pScreen->height; + int x = 0, y = 0; #ifdef PANORAMIX if (!noPanoramiXExtension) { + x = -pScreen->x; + y = -pScreen->y; w = PanoramiXPixWidth; h = PanoramiXPixHeight; } #endif pWin = cs->pOverlayWin = - CreateWindow(cs->overlayWid, pRoot, 0, 0, w, h, 0, + CreateWindow(cs->overlayWid, pRoot, x, y, w, h, 0, InputOutput, CWBackPixmap | CWOverrideRedirect, &attrs[0], pRoot->drawable.depth, serverClient, pScreen->rootVisual, &result); diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac index 6197e9bed..7ec19976b 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -26,9 +26,9 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.60) -AC_INIT([xorg-server], 1.14.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2013-11-23" -RELEASE_NAME="Apple Pie" +AC_INIT([xorg-server], 1.14.99.905, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2013-12-19" +RELEASE_NAME="Kraken" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AC_USE_SYSTEM_EXTENSIONS @@ -782,12 +782,12 @@ DRI3PROTO="dri3proto >= 1.0" XINERAMAPROTO="xineramaproto" BIGFONTPROTO="xf86bigfontproto >= 1.2.0" DGAPROTO="xf86dgaproto >= 2.0.99.1" -GLPROTO="glproto >= 1.4.16" +GLPROTO="glproto >= 1.4.17" DMXPROTO="dmxproto >= 2.2.99.1" VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" WINDOWSWMPROTO="windowswmproto" APPLEWMPROTO="applewmproto >= 1.4" -XSHMFENCE="xshmfence" +XSHMFENCE="xshmfence >= 1.1" dnl Required modules XPROTO="xproto >= 7.0.22" @@ -1086,6 +1086,49 @@ case "$DRI2,$HAVE_DRI2PROTO" in esac AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) +dnl +dnl Locate a suitable tmp file system for creating shared memeory files +dnl + +AC_ARG_WITH(shared-memory-dir, AS_HELP_STRING([--with-shared-memory-dir=PATH], [Path to directory in a world-writable temporary directory for anonymous shared memory (default: auto)]), +[], +[with_shared_memory_dir=yes]) + +shmdirs="/run/shm /var/tmp /tmp" + +case x"$with_shared_memory_dir" in +xyes) + for dir in $shmdirs; do + case x"$with_shared_memory_dir" in + xyes) + echo Checking temp dir "$dir" + if test -d "$dir"; then + with_shared_memory_dir="$dir" + fi + ;; + esac + done + ;; +x/*) + ;; +xno) + ;; +*) + AC_MSG_ERROR([Invalid directory specified for --with-shared-memory-dir: $with_shared_memory_dir]) + ;; +esac + +case x"$with_shared_memory_dir" in +xyes) + AC_MSG_ERROR([No directory found for shared memory temp files.]) + ;; +xno) + ;; +*) + AC_DEFINE_UNQUOTED(SHMDIR, ["$with_shared_memory_dir"], [Directory for shared memory temp files]) + ;; +esac + AC_ARG_ENABLE(xtrans-send-fds, AS_HELP_STRING([--disable-xtrans-send-fds], [Use Xtrans support for fd passing (default: auto)]), [XTRANS_SEND_FDS=$enableval], [XTRANS_SEND_FDS=auto]) case "x$XTRANS_SEND_FDS" in @@ -1175,7 +1218,7 @@ case "$DRI3,$HAVE_XSHMFENCE" in yes,yes | auto,yes) ;; yes,no) - AC_MSG_ERROR("DRI3 requested, but xshmfence not found.]) + AC_MSG_ERROR([DRI3 requested, but xshmfence not found.]) DRI3=no ;; no,*) @@ -1830,7 +1873,7 @@ if test "x$XORG" = xyes; then if test "x$CONFIG_UDEV_KMS" = xyes; then AC_MSG_ERROR([Platform device enumeration requires libpciaccess]) fi - if test "x$INT10" != xstub; then + if test "x$INT10MODULE" = xyes && test "x$INT10" != xstub; then AC_MSG_ERROR([Cannot build int10 without libpciaccess]) fi fi @@ -2065,8 +2108,8 @@ if test "x$XWIN" = xyes; then ;; esac - XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" - XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS $GLX_SYS_LIBS" + XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" + XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" AC_SUBST(XWIN_LIBS) AC_SUBST(XWIN_SERVER_NAME) AC_SUBST(XWIN_SYS_LIBS) @@ -2082,10 +2125,16 @@ if test "x$XWIN" = xyes; then dnl XWin with AIGLX requires OpenGL spec files in order to generate wrapper code for native GL functions if [test "x$XWIN" = xyes && test "x$AIGLX" = xyes] ; then - AC_CHECK_PROG(PYTHON, python, python) - if test -z "$PYTHON"; then - AC_MSG_ERROR([python not found]) + AC_CHECK_PROG(PYTHON3, python3, python3) + if test -z "$PYTHON3"; then + AC_MSG_ERROR([python3 not found]) + fi + AC_MSG_CHECKING(for python module lxml) + $PYTHON3 -c "import lxml;" + if test $? -ne 0 ; then + AC_MSG_ERROR([not found]) fi + AC_MSG_RESULT(yes) if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then PKG_CHECK_MODULES([KHRONOS_OPENGL_REGISTRY], [khronos-opengl-registry]) KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir` @@ -2109,7 +2158,7 @@ if test "x$XQUARTZ" = xyes; then AC_DEFINE(XQUARTZ,1,[Have Quartz]) AC_DEFINE(ROOTLESS,1,[Build Rootless code]) - XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" + XQUARTZ_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB" AC_SUBST([XQUARTZ_LIBS]) AC_CHECK_LIB([Xplugin],[xp_init],[:]) diff --git a/xorg-server/damageext/damageext.c b/xorg-server/damageext/damageext.c index 481f778bb..8e6d97b9e 100644 --- a/xorg-server/damageext/damageext.c +++ b/xorg-server/damageext/damageext.c @@ -1,5 +1,6 @@ /* * Copyright © 2002 Keith Packard + * Copyright 2013 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -25,9 +26,24 @@ #endif #include "damageextint.h" +#include "damagestr.h" #include "protocol-versions.h" #include "extinit.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" + +typedef struct { + DamageExtPtr ext; + DamagePtr damage[MAXSCREENS]; +} PanoramiXDamageRes; + +static RESTYPE XRT_DAMAGE; +static int (*PanoramiXSaveDamageCreate) (ClientPtr); + +#endif + static unsigned char DamageReqCode; static int DamageEventBase; static RESTYPE DamageExtType; @@ -37,24 +53,62 @@ static DevPrivateKeyRec DamageClientPrivateKeyRec; #define DamageClientPrivateKey (&DamageClientPrivateKeyRec) static void +DamageNoteCritical(ClientPtr pClient) +{ + DamageClientPtr pDamageClient = GetDamageClient(pClient); + + /* Composite extension marks clients with manual Subwindows as critical */ + if (pDamageClient->critical > 0) { + SetCriticalOutputPending(); + pClient->smart_priority = SMART_MAX_PRIORITY; + } +} + +static void +damageGetGeometry(DrawablePtr draw, int *x, int *y, int *w, int *h) +{ +#ifdef PANORAMIX + if (!noPanoramiXExtension && draw->type == DRAWABLE_WINDOW) { + WindowPtr win = (WindowPtr)draw; + + if (!win->parent) { + *x = screenInfo.x; + *y = screenInfo.y; + *w = screenInfo.width; + *h = screenInfo.height; + return; + } + } +#endif + + *x = draw->x; + *y = draw->y; + *w = draw->width; + *h = draw->height; +} + +static void DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) { ClientPtr pClient = pDamageExt->pClient; - DamageClientPtr pDamageClient = GetDamageClient(pClient); DrawablePtr pDrawable = pDamageExt->pDrawable; xDamageNotifyEvent ev; - int i; + int i, x, y, w, h; + + damageGetGeometry(pDrawable, &x, &y, &w, &h); UpdateCurrentTimeIf(); + ev.type = DamageEventBase + XDamageNotify; ev.level = pDamageExt->level; ev.drawable = pDamageExt->drawable; ev.damage = pDamageExt->id; ev.timestamp = currentTime.milliseconds; - ev.geometry.x = pDrawable->x; - ev.geometry.y = pDrawable->y; - ev.geometry.width = pDrawable->width; - ev.geometry.height = pDrawable->height; + ev.geometry.x = x; + ev.geometry.y = y; + ev.geometry.width = w; + ev.geometry.height = h; + if (pBoxes) { for (i = 0; i < nBoxes; i++) { ev.level = pDamageExt->level; @@ -70,15 +124,12 @@ DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) else { ev.area.x = 0; ev.area.y = 0; - ev.area.width = pDrawable->width; - ev.area.height = pDrawable->height; + ev.area.width = w; + ev.area.height = h; WriteEventsToClient(pClient, 1, (xEvent *) &ev); } - /* Composite extension marks clients with manual Subwindows as critical */ - if (pDamageClient->critical > 0) { - SetCriticalOutputPending(); - pClient->smart_priority = SMART_MAX_PRIORITY; - } + + DamageNoteCritical(pClient); } static void @@ -158,23 +209,62 @@ ProcDamageQueryVersion(ClientPtr client) return Success; } -static int -ProcDamageCreate(ClientPtr client) +static void +DamageExtRegister(DrawablePtr pDrawable, DamagePtr pDamage, Bool report) +{ + DamageSetReportAfterOp(pDamage, TRUE); + DamageRegister(pDrawable, pDamage); + + if (report) { + RegionPtr pRegion = &((WindowPtr) pDrawable)->borderClip; + RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y); + DamageReportDamage(pDamage, pRegion); + RegionTranslate(pRegion, pDrawable->x, pDrawable->y); + } +} + +static DamageExtPtr +DamageExtCreate(DrawablePtr pDrawable, DamageReportLevel level, + ClientPtr client, XID id, XID drawable) +{ + DamageExtPtr pDamageExt = malloc(sizeof(DamageExtRec)); + if (!pDamageExt) + return NULL; + + pDamageExt->id = id; + pDamageExt->drawable = drawable; + pDamageExt->pDrawable = pDrawable; + pDamageExt->level = level; + pDamageExt->pClient = client; + pDamageExt->pDamage = DamageCreate(DamageExtReport, DamageExtDestroy, level, + FALSE, pDrawable->pScreen, pDamageExt); + if (!pDamageExt->pDamage) { + free(pDamageExt); + return NULL; + } + + if (!AddResource(id, DamageExtType, (pointer) pDamageExt)) + return NULL; + + DamageExtRegister(pDrawable, pDamageExt->pDamage, + pDrawable->type == DRAWABLE_WINDOW); + + return pDamageExt; +} + +static DamageExtPtr +doDamageCreate(ClientPtr client, int *rc) { DrawablePtr pDrawable; DamageExtPtr pDamageExt; DamageReportLevel level; - RegionPtr pRegion; - int rc; REQUEST(xDamageCreateReq); - REQUEST_SIZE_MATCH(xDamageCreateReq); - LEGAL_NEW_RESOURCE(stuff->damage, client); - rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, - DixGetAttrAccess | DixReadAccess); - if (rc != Success) - return rc; + *rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixGetAttrAccess | DixReadAccess); + if (*rc != Success) + return NULL; switch (stuff->level) { case XDamageReportRawRectangles: @@ -191,39 +281,27 @@ ProcDamageCreate(ClientPtr client) break; default: client->errorValue = stuff->level; - return BadValue; + *rc = BadValue; + return NULL; } - pDamageExt = malloc(sizeof(DamageExtRec)); + pDamageExt = DamageExtCreate(pDrawable, level, client, stuff->damage, + stuff->drawable); if (!pDamageExt) - return BadAlloc; - pDamageExt->id = stuff->damage; - pDamageExt->drawable = stuff->drawable; - pDamageExt->pDrawable = pDrawable; - pDamageExt->level = level; - pDamageExt->pClient = client; - pDamageExt->pDamage = DamageCreate(DamageExtReport, - DamageExtDestroy, - level, - FALSE, pDrawable->pScreen, pDamageExt); - if (!pDamageExt->pDamage) { - free(pDamageExt); - return BadAlloc; - } - if (!AddResource(stuff->damage, DamageExtType, (pointer) pDamageExt)) - return BadAlloc; + *rc = BadAlloc; - DamageSetReportAfterOp(pDamageExt->pDamage, TRUE); - DamageRegister(pDamageExt->pDrawable, pDamageExt->pDamage); - - if (pDrawable->type == DRAWABLE_WINDOW) { - pRegion = &((WindowPtr) pDrawable)->borderClip; - RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y); - DamageReportDamage(pDamageExt->pDamage, pRegion); - RegionTranslate(pRegion, pDrawable->x, pDrawable->y); - } + return pDamageExt; +} - return Success; +static int +ProcDamageCreate(ClientPtr client) +{ + int rc; + REQUEST(xDamageCreateReq); + REQUEST_SIZE_MATCH(xDamageCreateReq); + LEGAL_NEW_RESOURCE(stuff->damage, client); + doDamageCreate(client, &rc); + return rc; } static int @@ -238,6 +316,88 @@ ProcDamageDestroy(ClientPtr client) return Success; } +#ifdef PANORAMIX +static RegionPtr +DamageExtSubtractWindowClip(DamageExtPtr pDamageExt) +{ + WindowPtr win = (WindowPtr)pDamageExt->pDrawable; + PanoramiXRes *res = NULL; + RegionPtr ret; + int i; + + if (!win->parent) + return &PanoramiXScreenRegion; + + dixLookupResourceByType((void **)&res, win->drawable.id, XRT_WINDOW, + serverClient, DixReadAccess); + if (!res) + return NULL; + + ret = RegionCreate(NULL, 0); + if (!ret) + return NULL; + + FOR_NSCREENS_FORWARD(i) { + ScreenPtr screen; + if (Success != dixLookupWindow(&win, res->info[i].id, serverClient, + DixReadAccess)) + goto out; + + screen = win->drawable.pScreen; + + RegionTranslate(ret, -screen->x, -screen->y); + if (!RegionUnion(ret, ret, &win->borderClip)) + goto out; + RegionTranslate(ret, screen->x, screen->y); + } + + return ret; + +out: + RegionDestroy(ret); + return NULL; +} + +static void +DamageExtFreeWindowClip(RegionPtr reg) +{ + if (reg != &PanoramiXScreenRegion) + RegionDestroy(reg); +} +#endif + +/* + * DamageSubtract intersects with borderClip, so we must reconstruct the + * protocol's perspective of same... + */ +static Bool +DamageExtSubtract(DamageExtPtr pDamageExt, const RegionPtr pRegion) +{ + DamagePtr pDamage = pDamageExt->pDamage; + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + RegionPtr damage = DamageRegion(pDamage); + RegionSubtract(damage, damage, pRegion); + + if (pDamageExt->pDrawable->type == DRAWABLE_WINDOW) { + DrawablePtr pDraw = pDamageExt->pDrawable; + RegionPtr clip = DamageExtSubtractWindowClip(pDamageExt); + if (clip) { + RegionTranslate(clip, -pDraw->x, -pDraw->y); + RegionIntersect(damage, damage, clip); + RegionTranslate(clip, pDraw->x, pDraw->y); + DamageExtFreeWindowClip(clip); + } + } + + return RegionNotEmpty(damage); + } +#endif + + return DamageSubtract(pDamage, pRegion); +} + static int ProcDamageSubtract(ClientPtr client) { @@ -257,7 +417,7 @@ ProcDamageSubtract(ClientPtr client) if (pRepair) { if (pParts) RegionIntersect(pParts, DamageRegion(pDamage), pRepair); - if (DamageSubtract(pDamage, pRepair)) + if (DamageExtSubtract(pDamageExt, pRepair)) DamageExtReport(pDamage, DamageRegion(pDamage), (void *) pDamageExt); } @@ -267,6 +427,7 @@ ProcDamageSubtract(ClientPtr client) DamageEmpty(pDamage); } } + return Success; } @@ -456,6 +617,127 @@ SDamageNotifyEvent(xDamageNotifyEvent * from, xDamageNotifyEvent * to) cpswaps(from->geometry.height, to->geometry.height); } +#ifdef PANORAMIX + +static void +PanoramiXDamageReport(DamagePtr pDamage, RegionPtr pRegion, void *closure) +{ + PanoramiXDamageRes *res = closure; + DamageExtPtr pDamageExt = res->ext; + WindowPtr pWin = (WindowPtr)pDamage->pDrawable; + ScreenPtr pScreen = pDamage->pScreen; + + /* happens on unmap? sigh xinerama */ + if (RegionNil(pRegion)) + return; + + /* translate root windows if necessary */ + if (!pWin->parent) + RegionTranslate(pRegion, pScreen->x, pScreen->y); + + /* add our damage to the protocol view */ + DamageReportDamage(pDamageExt->pDamage, pRegion); + + /* empty our view */ + DamageEmpty(pDamage); +} + +static void +PanoramiXDamageExtDestroy(DamagePtr pDamage, void *closure) +{ + PanoramiXDamageRes *damage = closure; + damage->damage[pDamage->pScreen->myNum] = NULL; +} + +static int +PanoramiXDamageCreate(ClientPtr client) +{ + PanoramiXDamageRes *damage; + PanoramiXRes *draw; + int i, rc; + + REQUEST(xDamageCreateReq); + + REQUEST_SIZE_MATCH(xDamageCreateReq); + LEGAL_NEW_RESOURCE(stuff->damage, client); + rc = dixLookupResourceByClass((void **)&draw, stuff->drawable, XRC_DRAWABLE, + client, DixGetAttrAccess | DixReadAccess); + if (rc != Success) + return rc; + + if (!(damage = calloc(1, sizeof(PanoramiXDamageRes)))) + return BadAlloc; + + if (!AddResource(stuff->damage, XRT_DAMAGE, damage)) + return BadAlloc; + + damage->ext = doDamageCreate(client, &rc); + if (rc == Success && draw->type == XRT_WINDOW) { + FOR_NSCREENS_FORWARD(i) { + DrawablePtr pDrawable; + DamagePtr pDamage = DamageCreate(PanoramiXDamageReport, + PanoramiXDamageExtDestroy, + DamageReportRawRegion, + FALSE, + screenInfo.screens[i], + damage); + if (!pDamage) { + rc = BadAlloc; + } else { + damage->damage[i] = pDamage; + rc = dixLookupDrawable(&pDrawable, draw->info[i].id, client, + M_WINDOW, + DixGetAttrAccess | DixReadAccess); + } + if (rc != Success) + break; + + DamageExtRegister(pDrawable, pDamage, i != 0); + } + } + + if (rc != Success) + FreeResource(stuff->damage, RT_NONE); + + return rc; +} + +static int +PanoramiXDamageDelete(void *res, XID id) +{ + int i; + PanoramiXDamageRes *damage = res; + + FOR_NSCREENS_BACKWARD(i) { + if (damage->damage[i]) { + DamageDestroy(damage->damage[i]); + damage->damage[i] = NULL; + } + } + + free(damage); + return 1; +} + +void +PanoramiXDamageInit(void) +{ + XRT_DAMAGE = CreateNewResourceType(PanoramiXDamageDelete, "XineramaDamage"); + if (!XRT_DAMAGE) + FatalError("Couldn't Xineramify Damage extension\n"); + + PanoramiXSaveDamageCreate = ProcDamageVector[X_DamageCreate]; + ProcDamageVector[X_DamageCreate] = PanoramiXDamageCreate; +} + +void +PanoramiXDamageReset(void) +{ + ProcDamageVector[X_DamageCreate] = PanoramiXSaveDamageCreate; +} + +#endif /* PANORAMIX */ + void DamageExtensionInit(void) { @@ -486,5 +768,10 @@ DamageExtensionInit(void) (EventSwapPtr) SDamageNotifyEvent; SetResourceTypeErrorValue(DamageExtType, extEntry->errorBase + BadDamage); +#ifdef PANORAMIX + if (XRT_DAMAGE) + SetResourceTypeErrorValue(XRT_DAMAGE, + extEntry->errorBase + BadDamage); +#endif } } diff --git a/xorg-server/damageext/damageextint.h b/xorg-server/damageext/damageextint.h index 272337922..e50149501 100644 --- a/xorg-server/damageext/damageextint.h +++ b/xorg-server/damageext/damageextint.h @@ -67,4 +67,7 @@ typedef struct _DamageExt { void DamageExtSetCritical(ClientPtr pClient, Bool critical); +void PanoramiXDamageInit(void); +void PanoramiXDamageReset(void); + #endif /* _DAMAGEEXTINT_H_ */ diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c index b2ca29f10..a034a7bc5 100644 --- a/xorg-server/dix/dispatch.c +++ b/xorg-server/dix/dispatch.c @@ -224,8 +224,9 @@ UpdateCurrentTimeIf(void) #undef SMART_DEBUG
-#define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */
-#define SMART_SCHEDULE_MAX_SLICE 200 /* ms */
+/* in milliseconds */
+#define SMART_SCHEDULE_DEFAULT_INTERVAL 5
+#define SMART_SCHEDULE_MAX_SLICE 15
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(_MSC_VER)
Bool SmartScheduleDisable = TRUE;
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index f61c7c7eb..291eec5ed 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -4702,7 +4702,7 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse, filter = GetEventFilter(mouse, (xEvent *) event); - if (grab && grab->type == XI2) { + if (grab && grab->grabtype == XI2) { Mask mask; mask = xi2mask_isset(grab->xi2mask, mouse, type); diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c index 112417ebf..4a455c9c7 100644 --- a/xorg-server/dix/window.c +++ b/xorg-server/dix/window.c @@ -530,7 +530,11 @@ CreateRootWindow(ScreenPtr pScreen) if (disableBackingStore) pScreen->backingStoreSupport = NotUseful; if (enableBackingStore) - pScreen->backingStoreSupport = Always; + pScreen->backingStoreSupport = WhenMapped; +#ifdef COMPOSITE + if (noCompositeExtension) + pScreen->backingStoreSupport = NotUseful; +#endif pScreen->saveUnderSupport = NotUseful; diff --git a/xorg-server/dri3/dri3.c b/xorg-server/dri3/dri3.c index 2bca7ae9b..76e07b40e 100644 --- a/xorg-server/dri3/dri3.c +++ b/xorg-server/dri3/dri3.c @@ -68,6 +68,11 @@ dri3_extension_init(void) ExtensionEntry *extension; int i; +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return; +#endif + extension = AddExtension(DRI3_NAME, DRI3NumberEvents, DRI3NumberErrors, proc_dri3_dispatch, sproc_dri3_dispatch, NULL, StandardMinorOpcode); diff --git a/xorg-server/dri3/dri3_request.c b/xorg-server/dri3/dri3_request.c index 3ebb9d509..4e1408fb5 100644 --- a/xorg-server/dri3/dri3_request.c +++ b/xorg-server/dri3/dri3_request.c @@ -29,6 +29,7 @@ #include <unistd.h> #include <xace.h> #include "../Xext/syncsdk.h" +#include <protocol-versions.h> static int proc_dri3_query_version(ClientPtr client) @@ -38,8 +39,8 @@ proc_dri3_query_version(ClientPtr client) .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, - .majorVersion = DRI3_MAJOR, - .minorVersion = DRI3_MINOR + .majorVersion = SERVER_DRI3_MAJOR_VERSION, + .minorVersion = SERVER_DRI3_MINOR_VERSION }; REQUEST_SIZE_MATCH(xDRI3QueryVersionReq); diff --git a/xorg-server/dri3/dri3_screen.c b/xorg-server/dri3/dri3_screen.c index cf2735b8d..c88029612 100644 --- a/xorg-server/dri3/dri3_screen.c +++ b/xorg-server/dri3/dri3_screen.c @@ -55,6 +55,9 @@ dri3_pixmap_from_fd(PixmapPtr *ppixmap, ScreenPtr screen, int fd, dri3_screen_info_ptr info = ds->info; PixmapPtr pixmap; + if (!info || !info->pixmap_from_fd) + return BadImplementation; + pixmap = (*info->pixmap_from_fd) (screen, fd, width, height, stride, depth, bpp); if (!pixmap) return BadAlloc; @@ -71,6 +74,9 @@ dri3_fd_from_pixmap(int *pfd, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) dri3_screen_info_ptr info = ds->info; int fd; + if (!info || !info->fd_from_pixmap) + return BadImplementation; + fd = (*info->fd_from_pixmap)(screen, pixmap, stride, size); if (fd < 0) return BadAlloc; diff --git a/xorg-server/glx/Makefile.am b/xorg-server/glx/Makefile.am index 5f28e87da..54e81406d 100644 --- a/xorg-server/glx/Makefile.am +++ b/xorg-server/glx/Makefile.am @@ -20,7 +20,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ - -I$(top_srcdir)/mi + -I$(top_srcdir)/mi \ + -I$(top_srcdir)/present if DRI2_AIGLX AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/dri2 @@ -69,7 +70,6 @@ libglx_la_SOURCES = \ glxscreens.c \ glxscreens.h \ glxserver.h \ - glxstubs.c \ glxutil.h \ render2.c \ render2swap.c \ diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c index fc2bb35bd..34343bde6 100644 --- a/xorg-server/glx/glxcmds.c +++ b/xorg-server/glx/glxcmds.c @@ -2471,3 +2471,64 @@ __glXDisp_ClientInfo(__GLXclientState * cl, GLbyte * pc) return Success; } + +#include <GL/glxtokens.h> + +void +__glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust, + CARD64 msc, CARD32 sbc) +{ + ClientPtr client = clients[CLIENT_ID(drawable->drawId)]; + + xGLXBufferSwapComplete2 wire = { + .type = __glXEventBase + GLX_BufferSwapComplete + }; + + if (!client) + return; + + if (!(drawable->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK)) + return; + + wire.event_type = type; + wire.drawable = drawable->drawId; + wire.ust_hi = ust >> 32; + wire.ust_lo = ust & 0xffffffff; + wire.msc_hi = msc >> 32; + wire.msc_lo = msc & 0xffffffff; + wire.sbc = sbc; + + WriteEventsToClient(client, 1, (xEvent *) &wire); +} + +#if PRESENT +static void +__glXpresentCompleteNotify(WindowPtr window, CARD8 present_mode, CARD32 serial, + uint64_t ust, uint64_t msc) +{ + __GLXdrawable *drawable; + int glx_type; + int rc; + + rc = dixLookupResourceByType((pointer *) &drawable, window->drawable.id, + __glXDrawableRes, serverClient, DixGetAttrAccess); + + if (rc != Success) + return; + + if (present_mode == PresentCompleteModeFlip) + glx_type = GLX_FLIP_COMPLETE_INTEL; + else + glx_type = GLX_BLIT_COMPLETE_INTEL; + + __glXsendSwapEvent(drawable, glx_type, ust, msc, serial); +} + +#include <present.h> + +void +__glXregisterPresentCompleteNotify(void) +{ + present_register_complete_notify(__glXpresentCompleteNotify); +} +#endif diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c index fbbd1fd95..b2f3d6ee8 100644 --- a/xorg-server/glx/glxdri2.c +++ b/xorg-server/glx/glxdri2.c @@ -55,7 +55,6 @@ typedef struct __GLXDRIscreen __GLXDRIscreen; typedef struct __GLXDRIcontext __GLXDRIcontext; typedef struct __GLXDRIdrawable __GLXDRIdrawable; - #ifdef __DRI2_ROBUSTNESS #define ALL_DRI_CTX_FLAGS (__DRI_CTX_FLAG_DEBUG \ | __DRI_CTX_FLAG_FORWARD_COMPATIBLE \ @@ -177,36 +176,25 @@ __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc, CARD32 sbc) { __GLXdrawable *drawable = data; - xGLXBufferSwapComplete2 wire = { - .type = __glXEventBase + GLX_BufferSwapComplete - }; - - if (!(drawable->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK)) - return; - + int glx_type; switch (type) { case DRI2_EXCHANGE_COMPLETE: - wire.event_type = GLX_EXCHANGE_COMPLETE_INTEL; + glx_type = GLX_EXCHANGE_COMPLETE_INTEL; break; + default: + /* unknown swap completion type, + * BLIT is a reasonable default, so + * fall through ... + */ case DRI2_BLIT_COMPLETE: - wire.event_type = GLX_BLIT_COMPLETE_INTEL; + glx_type = GLX_BLIT_COMPLETE_INTEL; break; case DRI2_FLIP_COMPLETE: - wire.event_type = GLX_FLIP_COMPLETE_INTEL; - break; - default: - /* unknown swap completion type */ - wire.event_type = 0; + glx_type = GLX_FLIP_COMPLETE_INTEL; break; } - wire.drawable = drawable->drawId; - wire.ust_hi = ust >> 32; - wire.ust_lo = ust & 0xffffffff; - wire.msc_hi = msc >> 32; - wire.msc_lo = msc & 0xffffffff; - wire.sbc = sbc; - - WriteEventsToClient(client, 1, (xEvent *) &wire); + + __glXsendSwapEvent(drawable, glx_type, ust, msc, sbc); } /* @@ -784,7 +772,7 @@ dri2FlushFrontBuffer(__DRIdrawable * driDrawable, void *loaderPrivate) } static const __DRIdri2LoaderExtension loaderExtension = { - {__DRI_DRI2_LOADER, __DRI_DRI2_LOADER_VERSION}, + {__DRI_DRI2_LOADER, 3}, dri2GetBuffers, dri2FlushFrontBuffer, dri2GetBuffersWithFormat, @@ -792,7 +780,7 @@ static const __DRIdri2LoaderExtension loaderExtension = { #ifdef __DRI_USE_INVALIDATE static const __DRIuseInvalidateExtension dri2UseInvalidate = { - {__DRI_USE_INVALIDATE, __DRI_USE_INVALIDATE_VERSION} + {__DRI_USE_INVALIDATE, 1} }; #endif @@ -940,6 +928,9 @@ initializeExtensions(__GLXDRIscreen * screen) } } +/* white lie */ +extern glx_func_ptr glXGetProcAddressARB(const char *); + static __GLXscreen * __glXDRIscreenProbe(ScreenPtr pScreen) { @@ -1024,6 +1015,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen->leaveVT = pScrn->LeaveVT; pScrn->LeaveVT = glxDRILeaveVT; + __glXsetGetProcAddress(glXGetProcAddressARB); + LogMessage(X_INFO, "AIGLX: Loaded and initialized %s\n", driverName); return &screen->base; diff --git a/xorg-server/glx/glxdricommon.c b/xorg-server/glx/glxdricommon.c index 426ea6acc..d83ebb445 100644 --- a/xorg-server/glx/glxdricommon.c +++ b/xorg-server/glx/glxdricommon.c @@ -72,7 +72,7 @@ getUST(int64_t * ust) } const __DRIsystemTimeExtension systemTimeExtension = { - {__DRI_SYSTEM_TIME, __DRI_SYSTEM_TIME_VERSION}, + {__DRI_SYSTEM_TIME, 1}, getUST, NULL, }; diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c index 0523710fb..23989be89 100644 --- a/xorg-server/glx/glxdriswrast.c +++ b/xorg-server/glx/glxdriswrast.c @@ -391,7 +391,7 @@ swrastGetImage(__DRIdrawable * draw, } static const __DRIswrastLoaderExtension swrastLoaderExtension = { - {__DRI_SWRAST_LOADER, __DRI_SWRAST_LOADER_VERSION}, + {__DRI_SWRAST_LOADER, 1}, swrastGetDrawableInfo, swrastPutImage, swrastGetImage @@ -432,6 +432,9 @@ initializeExtensions(__GLXDRIscreen * screen) extern Bool g_fswrastwgl; +/* white lie */ +extern glx_func_ptr glXGetProcAddressARB(const char *); + static __GLXscreen * __glXDRIscreenProbe(ScreenPtr pScreen) { @@ -455,9 +458,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen->driver = glxProbeDriver(driverName, (void **) &screen->core, - __DRI_CORE, __DRI_CORE_VERSION, + __DRI_CORE, 1, (void **) &screen->swrast, - __DRI_SWRAST, __DRI_SWRAST_VERSION); + __DRI_SWRAST, 1); if (screen->driver == NULL) { goto handle_error; } @@ -484,6 +487,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen->base.GLXmajor = 1; screen->base.GLXminor = 4; + __glXsetGetProcAddress(glXGetProcAddressARB); + LogMessage(X_INFO, "AIGLX: Loaded and initialized %s\n", driverName); return &screen->base; diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c index ee0487e92..d6ca8f886 100644 --- a/xorg-server/glx/glxext.c +++ b/xorg-server/glx/glxext.c @@ -404,6 +404,9 @@ GlxExtensionInit(void) __glXErrorBase = extEntry->errorBase; __glXEventBase = extEntry->eventBase; +#if PRESENT + __glXregisterPresentCompleteNotify(); +#endif } /************************************************************************/ @@ -546,17 +549,19 @@ __glXleaveServer(GLboolean rendering) glxServerLeaveCount++; } -static void (*(*_get_proc_address)(const char *))(void); +static glx_gpa_proc _get_proc_address; void -__glXsetGetProcAddress(void (*(*get_proc_address) (const char *))(void)) +__glXsetGetProcAddress(glx_gpa_proc get_proc_address) { _get_proc_address = get_proc_address; } void *__glGetProcAddress(const char *proc) { - return _get_proc_address(proc); + void *ret = _get_proc_address(proc); + + return ret ? ret : NoopDDA; } /* diff --git a/xorg-server/glx/glxserver.h b/xorg-server/glx/glxserver.h index 5e29abb28..7f36e5f5e 100644 --- a/xorg-server/glx/glxserver.h +++ b/xorg-server/glx/glxserver.h @@ -117,9 +117,20 @@ void __glXleaveServer(GLboolean rendering); void glxSuspendClients(void); void glxResumeClients(void); -void __glXsetGetProcAddress(void (*(*get_proc_address) (const char *)) (void)); +typedef void (*glx_func_ptr)(void); +typedef glx_func_ptr (*glx_gpa_proc)(const char *); +void __glXsetGetProcAddress(glx_gpa_proc get_proc_address); void *__glGetProcAddress(const char *); +void +__glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust, + CARD64 msc, CARD32 sbc); + +#if PRESENT +void +__glXregisterPresentCompleteNotify(void); +#endif + /* ** State kept per client. */ diff --git a/xorg-server/glx/indirect_dispatch.c b/xorg-server/glx/indirect_dispatch.c index 921c68c9c..f81477458 100644 --- a/xorg-server/glx/indirect_dispatch.c +++ b/xorg-server/glx/indirect_dispatch.c @@ -52,94 +52,89 @@ typedef struct { __GLX_PIXEL_3D_HDR;
} __GLXpixel3DHeader;
-extern GLboolean __glXErrorOccured( void );
-extern void __glXClearErrorOccured( void );
+extern GLboolean __glXErrorOccured(void);
+extern void __glXClearErrorOccured(void);
-static const unsigned dummy_answer[2] = {0, 0};
+static const unsigned dummy_answer[2] = { 0, 0 };
-int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_NewList(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_NewList( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
+ if (cx != NULL) {
+ glNewList(*(GLuint *) (pc + 0), *(GLenum *) (pc + 4));
error = Success;
}
return error;
}
-int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_EndList(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_EndList( GET_DISPATCH(), () );
+ if (cx != NULL) {
+ glEndList();
error = Success;
}
return error;
}
-void __glXDisp_CallList(GLbyte * pc)
+void
+__glXDisp_CallList(GLbyte * pc)
{
- CALL_CallList( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+ glCallList(*(GLuint *) (pc + 0));
}
-void __glXDisp_CallLists(GLbyte * pc)
+void
+__glXDisp_CallLists(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 0);
- const GLenum type = *(GLenum *)(pc + 4);
- const GLvoid * lists = (const GLvoid *)(pc + 8);
+ const GLsizei n = *(GLsizei *) (pc + 0);
+ const GLenum type = *(GLenum *) (pc + 4);
+ const GLvoid *lists = (const GLvoid *) (pc + 8);
- CALL_CallLists( GET_DISPATCH(), (
- n,
- type,
- lists
- ) );
+ lists = (const GLvoid *) (pc + 8);
+
+ glCallLists(n, type, lists);
}
-int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_DeleteLists(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_DeleteLists( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- *(GLsizei *)(pc + 4)
- ) );
+ if (cx != NULL) {
+ glDeleteLists(*(GLuint *) (pc + 0), *(GLsizei *) (pc + 4));
error = Success;
}
return error;
}
-int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GenLists(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLuint retval;
- retval = CALL_GenLists( GET_DISPATCH(), (
- *(GLsizei *)(pc + 0)
- ) );
+
+ retval = glGenLists(*(GLsizei *) (pc + 0));
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -147,1648 +142,1399 @@ int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_ListBase(GLbyte * pc)
+void
+__glXDisp_ListBase(GLbyte * pc)
{
- CALL_ListBase( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+ glListBase(*(GLuint *) (pc + 0));
}
-void __glXDisp_Begin(GLbyte * pc)
+void
+__glXDisp_Begin(GLbyte * pc)
{
- CALL_Begin( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glBegin(*(GLenum *) (pc + 0));
}
-void __glXDisp_Bitmap(GLbyte * pc)
+void
+__glXDisp_Bitmap(GLbyte * pc)
{
- const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLubyte *const bitmap = (const GLubyte *) ((pc + 44));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_Bitmap( GET_DISPATCH(), (
- *(GLsizei *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLfloat *)(pc + 28),
- *(GLfloat *)(pc + 32),
- *(GLfloat *)(pc + 36),
- *(GLfloat *)(pc + 40),
- bitmap
- ) );
+ glBitmap(*(GLsizei *) (pc + 20),
+ *(GLsizei *) (pc + 24),
+ *(GLfloat *) (pc + 28),
+ *(GLfloat *) (pc + 32),
+ *(GLfloat *) (pc + 36), *(GLfloat *) (pc + 40), bitmap);
}
-void __glXDisp_Color3bv(GLbyte * pc)
+void
+__glXDisp_Color3bv(GLbyte * pc)
{
- CALL_Color3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
+ glColor3bv((const GLbyte *) (pc + 0));
}
-void __glXDisp_Color3dv(GLbyte * pc)
+void
+__glXDisp_Color3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Color3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glColor3dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_Color3fv(GLbyte * pc)
+void
+__glXDisp_Color3fv(GLbyte * pc)
{
- CALL_Color3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glColor3fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_Color3iv(GLbyte * pc)
+void
+__glXDisp_Color3iv(GLbyte * pc)
{
- CALL_Color3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glColor3iv((const GLint *) (pc + 0));
}
-void __glXDisp_Color3sv(GLbyte * pc)
+void
+__glXDisp_Color3sv(GLbyte * pc)
{
- CALL_Color3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glColor3sv((const GLshort *) (pc + 0));
}
-void __glXDisp_Color3ubv(GLbyte * pc)
+void
+__glXDisp_Color3ubv(GLbyte * pc)
{
- CALL_Color3ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
+ glColor3ubv((const GLubyte *) (pc + 0));
}
-void __glXDisp_Color3uiv(GLbyte * pc)
+void
+__glXDisp_Color3uiv(GLbyte * pc)
{
- CALL_Color3uiv( GET_DISPATCH(), (
- (const GLuint *)(pc + 0)
- ) );
+ glColor3uiv((const GLuint *) (pc + 0));
}
-void __glXDisp_Color3usv(GLbyte * pc)
+void
+__glXDisp_Color3usv(GLbyte * pc)
{
- CALL_Color3usv( GET_DISPATCH(), (
- (const GLushort *)(pc + 0)
- ) );
+ glColor3usv((const GLushort *) (pc + 0));
}
-void __glXDisp_Color4bv(GLbyte * pc)
+void
+__glXDisp_Color4bv(GLbyte * pc)
{
- CALL_Color4bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
+ glColor4bv((const GLbyte *) (pc + 0));
}
-void __glXDisp_Color4dv(GLbyte * pc)
+void
+__glXDisp_Color4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_Color4dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glColor4dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_Color4fv(GLbyte * pc)
+void
+__glXDisp_Color4fv(GLbyte * pc)
{
- CALL_Color4fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glColor4fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_Color4iv(GLbyte * pc)
+void
+__glXDisp_Color4iv(GLbyte * pc)
{
- CALL_Color4iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glColor4iv((const GLint *) (pc + 0));
}
-void __glXDisp_Color4sv(GLbyte * pc)
+void
+__glXDisp_Color4sv(GLbyte * pc)
{
- CALL_Color4sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glColor4sv((const GLshort *) (pc + 0));
}
-void __glXDisp_Color4ubv(GLbyte * pc)
+void
+__glXDisp_Color4ubv(GLbyte * pc)
{
- CALL_Color4ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
+ glColor4ubv((const GLubyte *) (pc + 0));
}
-void __glXDisp_Color4uiv(GLbyte * pc)
+void
+__glXDisp_Color4uiv(GLbyte * pc)
{
- CALL_Color4uiv( GET_DISPATCH(), (
- (const GLuint *)(pc + 0)
- ) );
+ glColor4uiv((const GLuint *) (pc + 0));
}
-void __glXDisp_Color4usv(GLbyte * pc)
+void
+__glXDisp_Color4usv(GLbyte * pc)
{
- CALL_Color4usv( GET_DISPATCH(), (
- (const GLushort *)(pc + 0)
- ) );
+ glColor4usv((const GLushort *) (pc + 0));
}
-void __glXDisp_EdgeFlagv(GLbyte * pc)
+void
+__glXDisp_EdgeFlagv(GLbyte * pc)
{
- CALL_EdgeFlagv( GET_DISPATCH(), (
- (const GLboolean *)(pc + 0)
- ) );
+ glEdgeFlagv((const GLboolean *) (pc + 0));
}
-void __glXDisp_End(GLbyte * pc)
+void
+__glXDisp_End(GLbyte * pc)
{
- CALL_End( GET_DISPATCH(), () );
+ glEnd();
}
-void __glXDisp_Indexdv(GLbyte * pc)
+void
+__glXDisp_Indexdv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_Indexdv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glIndexdv((const GLdouble *) (pc + 0));
}
-void __glXDisp_Indexfv(GLbyte * pc)
+void
+__glXDisp_Indexfv(GLbyte * pc)
{
- CALL_Indexfv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glIndexfv((const GLfloat *) (pc + 0));
}
-void __glXDisp_Indexiv(GLbyte * pc)
+void
+__glXDisp_Indexiv(GLbyte * pc)
{
- CALL_Indexiv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glIndexiv((const GLint *) (pc + 0));
}
-void __glXDisp_Indexsv(GLbyte * pc)
+void
+__glXDisp_Indexsv(GLbyte * pc)
{
- CALL_Indexsv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glIndexsv((const GLshort *) (pc + 0));
}
-void __glXDisp_Normal3bv(GLbyte * pc)
+void
+__glXDisp_Normal3bv(GLbyte * pc)
{
- CALL_Normal3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
+ glNormal3bv((const GLbyte *) (pc + 0));
}
-void __glXDisp_Normal3dv(GLbyte * pc)
+void
+__glXDisp_Normal3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Normal3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glNormal3dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_Normal3fv(GLbyte * pc)
+void
+__glXDisp_Normal3fv(GLbyte * pc)
{
- CALL_Normal3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glNormal3fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_Normal3iv(GLbyte * pc)
+void
+__glXDisp_Normal3iv(GLbyte * pc)
{
- CALL_Normal3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glNormal3iv((const GLint *) (pc + 0));
}
-void __glXDisp_Normal3sv(GLbyte * pc)
+void
+__glXDisp_Normal3sv(GLbyte * pc)
{
- CALL_Normal3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glNormal3sv((const GLshort *) (pc + 0));
}
-void __glXDisp_RasterPos2dv(GLbyte * pc)
+void
+__glXDisp_RasterPos2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_RasterPos2dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glRasterPos2dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_RasterPos2fv(GLbyte * pc)
+void
+__glXDisp_RasterPos2fv(GLbyte * pc)
{
- CALL_RasterPos2fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glRasterPos2fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_RasterPos2iv(GLbyte * pc)
+void
+__glXDisp_RasterPos2iv(GLbyte * pc)
{
- CALL_RasterPos2iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glRasterPos2iv((const GLint *) (pc + 0));
}
-void __glXDisp_RasterPos2sv(GLbyte * pc)
+void
+__glXDisp_RasterPos2sv(GLbyte * pc)
{
- CALL_RasterPos2sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glRasterPos2sv((const GLshort *) (pc + 0));
}
-void __glXDisp_RasterPos3dv(GLbyte * pc)
+void
+__glXDisp_RasterPos3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_RasterPos3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glRasterPos3dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_RasterPos3fv(GLbyte * pc)
+void
+__glXDisp_RasterPos3fv(GLbyte * pc)
{
- CALL_RasterPos3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glRasterPos3fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_RasterPos3iv(GLbyte * pc)
+void
+__glXDisp_RasterPos3iv(GLbyte * pc)
{
- CALL_RasterPos3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glRasterPos3iv((const GLint *) (pc + 0));
}
-void __glXDisp_RasterPos3sv(GLbyte * pc)
+void
+__glXDisp_RasterPos3sv(GLbyte * pc)
{
- CALL_RasterPos3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glRasterPos3sv((const GLshort *) (pc + 0));
}
-void __glXDisp_RasterPos4dv(GLbyte * pc)
+void
+__glXDisp_RasterPos4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_RasterPos4dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glRasterPos4dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_RasterPos4fv(GLbyte * pc)
+void
+__glXDisp_RasterPos4fv(GLbyte * pc)
{
- CALL_RasterPos4fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glRasterPos4fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_RasterPos4iv(GLbyte * pc)
+void
+__glXDisp_RasterPos4iv(GLbyte * pc)
{
- CALL_RasterPos4iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glRasterPos4iv((const GLint *) (pc + 0));
}
-void __glXDisp_RasterPos4sv(GLbyte * pc)
+void
+__glXDisp_RasterPos4sv(GLbyte * pc)
{
- CALL_RasterPos4sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glRasterPos4sv((const GLshort *) (pc + 0));
}
-void __glXDisp_Rectdv(GLbyte * pc)
+void
+__glXDisp_Rectdv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_Rectdv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0),
- (const GLdouble *)(pc + 16)
- ) );
+ glRectdv((const GLdouble *) (pc + 0), (const GLdouble *) (pc + 16));
}
-void __glXDisp_Rectfv(GLbyte * pc)
+void
+__glXDisp_Rectfv(GLbyte * pc)
{
- CALL_Rectfv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0),
- (const GLfloat *)(pc + 8)
- ) );
+ glRectfv((const GLfloat *) (pc + 0), (const GLfloat *) (pc + 8));
}
-void __glXDisp_Rectiv(GLbyte * pc)
+void
+__glXDisp_Rectiv(GLbyte * pc)
{
- CALL_Rectiv( GET_DISPATCH(), (
- (const GLint *)(pc + 0),
- (const GLint *)(pc + 8)
- ) );
+ glRectiv((const GLint *) (pc + 0), (const GLint *) (pc + 8));
}
-void __glXDisp_Rectsv(GLbyte * pc)
+void
+__glXDisp_Rectsv(GLbyte * pc)
{
- CALL_Rectsv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ glRectsv((const GLshort *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_TexCoord1dv(GLbyte * pc)
+void
+__glXDisp_TexCoord1dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_TexCoord1dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glTexCoord1dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_TexCoord1fv(GLbyte * pc)
+void
+__glXDisp_TexCoord1fv(GLbyte * pc)
{
- CALL_TexCoord1fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glTexCoord1fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_TexCoord1iv(GLbyte * pc)
+void
+__glXDisp_TexCoord1iv(GLbyte * pc)
{
- CALL_TexCoord1iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glTexCoord1iv((const GLint *) (pc + 0));
}
-void __glXDisp_TexCoord1sv(GLbyte * pc)
+void
+__glXDisp_TexCoord1sv(GLbyte * pc)
{
- CALL_TexCoord1sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glTexCoord1sv((const GLshort *) (pc + 0));
}
-void __glXDisp_TexCoord2dv(GLbyte * pc)
+void
+__glXDisp_TexCoord2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_TexCoord2dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glTexCoord2dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_TexCoord2fv(GLbyte * pc)
+void
+__glXDisp_TexCoord2fv(GLbyte * pc)
{
- CALL_TexCoord2fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glTexCoord2fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_TexCoord2iv(GLbyte * pc)
+void
+__glXDisp_TexCoord2iv(GLbyte * pc)
{
- CALL_TexCoord2iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glTexCoord2iv((const GLint *) (pc + 0));
}
-void __glXDisp_TexCoord2sv(GLbyte * pc)
+void
+__glXDisp_TexCoord2sv(GLbyte * pc)
{
- CALL_TexCoord2sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glTexCoord2sv((const GLshort *) (pc + 0));
}
-void __glXDisp_TexCoord3dv(GLbyte * pc)
+void
+__glXDisp_TexCoord3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_TexCoord3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glTexCoord3dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_TexCoord3fv(GLbyte * pc)
+void
+__glXDisp_TexCoord3fv(GLbyte * pc)
{
- CALL_TexCoord3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glTexCoord3fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_TexCoord3iv(GLbyte * pc)
+void
+__glXDisp_TexCoord3iv(GLbyte * pc)
{
- CALL_TexCoord3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glTexCoord3iv((const GLint *) (pc + 0));
}
-void __glXDisp_TexCoord3sv(GLbyte * pc)
+void
+__glXDisp_TexCoord3sv(GLbyte * pc)
{
- CALL_TexCoord3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glTexCoord3sv((const GLshort *) (pc + 0));
}
-void __glXDisp_TexCoord4dv(GLbyte * pc)
+void
+__glXDisp_TexCoord4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_TexCoord4dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glTexCoord4dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_TexCoord4fv(GLbyte * pc)
+void
+__glXDisp_TexCoord4fv(GLbyte * pc)
{
- CALL_TexCoord4fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glTexCoord4fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_TexCoord4iv(GLbyte * pc)
+void
+__glXDisp_TexCoord4iv(GLbyte * pc)
{
- CALL_TexCoord4iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glTexCoord4iv((const GLint *) (pc + 0));
}
-void __glXDisp_TexCoord4sv(GLbyte * pc)
+void
+__glXDisp_TexCoord4sv(GLbyte * pc)
{
- CALL_TexCoord4sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glTexCoord4sv((const GLshort *) (pc + 0));
}
-void __glXDisp_Vertex2dv(GLbyte * pc)
+void
+__glXDisp_Vertex2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_Vertex2dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glVertex2dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_Vertex2fv(GLbyte * pc)
+void
+__glXDisp_Vertex2fv(GLbyte * pc)
{
- CALL_Vertex2fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glVertex2fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_Vertex2iv(GLbyte * pc)
+void
+__glXDisp_Vertex2iv(GLbyte * pc)
{
- CALL_Vertex2iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glVertex2iv((const GLint *) (pc + 0));
}
-void __glXDisp_Vertex2sv(GLbyte * pc)
+void
+__glXDisp_Vertex2sv(GLbyte * pc)
{
- CALL_Vertex2sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glVertex2sv((const GLshort *) (pc + 0));
}
-void __glXDisp_Vertex3dv(GLbyte * pc)
+void
+__glXDisp_Vertex3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Vertex3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glVertex3dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_Vertex3fv(GLbyte * pc)
+void
+__glXDisp_Vertex3fv(GLbyte * pc)
{
- CALL_Vertex3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glVertex3fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_Vertex3iv(GLbyte * pc)
+void
+__glXDisp_Vertex3iv(GLbyte * pc)
{
- CALL_Vertex3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glVertex3iv((const GLint *) (pc + 0));
}
-void __glXDisp_Vertex3sv(GLbyte * pc)
+void
+__glXDisp_Vertex3sv(GLbyte * pc)
{
- CALL_Vertex3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glVertex3sv((const GLshort *) (pc + 0));
}
-void __glXDisp_Vertex4dv(GLbyte * pc)
+void
+__glXDisp_Vertex4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_Vertex4dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glVertex4dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_Vertex4fv(GLbyte * pc)
+void
+__glXDisp_Vertex4fv(GLbyte * pc)
{
- CALL_Vertex4fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glVertex4fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_Vertex4iv(GLbyte * pc)
+void
+__glXDisp_Vertex4iv(GLbyte * pc)
{
- CALL_Vertex4iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ glVertex4iv((const GLint *) (pc + 0));
}
-void __glXDisp_Vertex4sv(GLbyte * pc)
+void
+__glXDisp_Vertex4sv(GLbyte * pc)
{
- CALL_Vertex4sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ glVertex4sv((const GLshort *) (pc + 0));
}
-void __glXDisp_ClipPlane(GLbyte * pc)
+void
+__glXDisp_ClipPlane(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 36);
pc -= 4;
}
#endif
- CALL_ClipPlane( GET_DISPATCH(), (
- *(GLenum *)(pc + 32),
- (const GLdouble *)(pc + 0)
- ) );
+ glClipPlane(*(GLenum *) (pc + 32), (const GLdouble *) (pc + 0));
}
-void __glXDisp_ColorMaterial(GLbyte * pc)
+void
+__glXDisp_ColorMaterial(GLbyte * pc)
{
- CALL_ColorMaterial( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
+ glColorMaterial(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
}
-void __glXDisp_CullFace(GLbyte * pc)
+void
+__glXDisp_CullFace(GLbyte * pc)
{
- CALL_CullFace( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glCullFace(*(GLenum *) (pc + 0));
}
-void __glXDisp_Fogf(GLbyte * pc)
+void
+__glXDisp_Fogf(GLbyte * pc)
{
- CALL_Fogf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
+ glFogf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
}
-void __glXDisp_Fogfv(GLbyte * pc)
+void
+__glXDisp_Fogfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 0);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 4);
- CALL_Fogfv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glFogfv(pname, params);
}
-void __glXDisp_Fogi(GLbyte * pc)
+void
+__glXDisp_Fogi(GLbyte * pc)
{
- CALL_Fogi( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
+ glFogi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
}
-void __glXDisp_Fogiv(GLbyte * pc)
+void
+__glXDisp_Fogiv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 0);
+ const GLint *params;
params = (const GLint *) (pc + 4);
- CALL_Fogiv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glFogiv(pname, params);
}
-void __glXDisp_FrontFace(GLbyte * pc)
+void
+__glXDisp_FrontFace(GLbyte * pc)
{
- CALL_FrontFace( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glFrontFace(*(GLenum *) (pc + 0));
}
-void __glXDisp_Hint(GLbyte * pc)
+void
+__glXDisp_Hint(GLbyte * pc)
{
- CALL_Hint( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
+ glHint(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
}
-void __glXDisp_Lightf(GLbyte * pc)
+void
+__glXDisp_Lightf(GLbyte * pc)
{
- CALL_Lightf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glLightf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_Lightfv(GLbyte * pc)
+void
+__glXDisp_Lightfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 8);
- CALL_Lightfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glLightfv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_Lighti(GLbyte * pc)
+void
+__glXDisp_Lighti(GLbyte * pc)
{
- CALL_Lighti( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
+ glLighti(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
}
-void __glXDisp_Lightiv(GLbyte * pc)
+void
+__glXDisp_Lightiv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLint *params;
params = (const GLint *) (pc + 8);
- CALL_Lightiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glLightiv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_LightModelf(GLbyte * pc)
+void
+__glXDisp_LightModelf(GLbyte * pc)
{
- CALL_LightModelf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
+ glLightModelf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
}
-void __glXDisp_LightModelfv(GLbyte * pc)
+void
+__glXDisp_LightModelfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 0);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 4);
- CALL_LightModelfv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glLightModelfv(pname, params);
}
-void __glXDisp_LightModeli(GLbyte * pc)
+void
+__glXDisp_LightModeli(GLbyte * pc)
{
- CALL_LightModeli( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
+ glLightModeli(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
}
-void __glXDisp_LightModeliv(GLbyte * pc)
+void
+__glXDisp_LightModeliv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 0);
+ const GLint *params;
params = (const GLint *) (pc + 4);
- CALL_LightModeliv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glLightModeliv(pname, params);
}
-void __glXDisp_LineStipple(GLbyte * pc)
+void
+__glXDisp_LineStipple(GLbyte * pc)
{
- CALL_LineStipple( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLushort *)(pc + 4)
- ) );
+ glLineStipple(*(GLint *) (pc + 0), *(GLushort *) (pc + 4));
}
-void __glXDisp_LineWidth(GLbyte * pc)
+void
+__glXDisp_LineWidth(GLbyte * pc)
{
- CALL_LineWidth( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0)
- ) );
+ glLineWidth(*(GLfloat *) (pc + 0));
}
-void __glXDisp_Materialf(GLbyte * pc)
+void
+__glXDisp_Materialf(GLbyte * pc)
{
- CALL_Materialf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glMaterialf(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_Materialfv(GLbyte * pc)
+void
+__glXDisp_Materialfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 8);
- CALL_Materialfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glMaterialfv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_Materiali(GLbyte * pc)
+void
+__glXDisp_Materiali(GLbyte * pc)
{
- CALL_Materiali( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
+ glMateriali(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
}
-void __glXDisp_Materialiv(GLbyte * pc)
+void
+__glXDisp_Materialiv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLint *params;
params = (const GLint *) (pc + 8);
- CALL_Materialiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glMaterialiv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_PointSize(GLbyte * pc)
+void
+__glXDisp_PointSize(GLbyte * pc)
{
- CALL_PointSize( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0)
- ) );
+ glPointSize(*(GLfloat *) (pc + 0));
}
-void __glXDisp_PolygonMode(GLbyte * pc)
+void
+__glXDisp_PolygonMode(GLbyte * pc)
{
- CALL_PolygonMode( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
+ glPolygonMode(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
}
-void __glXDisp_PolygonStipple(GLbyte * pc)
+void
+__glXDisp_PolygonStipple(GLbyte * pc)
{
- const GLubyte * const mask = (const GLubyte *) (pc + 20);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLubyte *const mask = (const GLubyte *) ((pc + 20));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_PolygonStipple( GET_DISPATCH(), (
- mask
- ) );
+ glPolygonStipple(mask);
}
-void __glXDisp_Scissor(GLbyte * pc)
+void
+__glXDisp_Scissor(GLbyte * pc)
{
- CALL_Scissor( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLsizei *)(pc + 8),
- *(GLsizei *)(pc + 12)
- ) );
+ glScissor(*(GLint *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12));
}
-void __glXDisp_ShadeModel(GLbyte * pc)
+void
+__glXDisp_ShadeModel(GLbyte * pc)
{
- CALL_ShadeModel( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glShadeModel(*(GLenum *) (pc + 0));
}
-void __glXDisp_TexParameterf(GLbyte * pc)
+void
+__glXDisp_TexParameterf(GLbyte * pc)
{
- CALL_TexParameterf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glTexParameterf(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_TexParameterfv(GLbyte * pc)
+void
+__glXDisp_TexParameterfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 8);
- CALL_TexParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glTexParameterfv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_TexParameteri(GLbyte * pc)
+void
+__glXDisp_TexParameteri(GLbyte * pc)
{
- CALL_TexParameteri( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
+ glTexParameteri(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
}
-void __glXDisp_TexParameteriv(GLbyte * pc)
+void
+__glXDisp_TexParameteriv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLint *params;
params = (const GLint *) (pc + 8);
- CALL_TexParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glTexParameteriv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_TexImage1D(GLbyte * pc)
+void
+__glXDisp_TexImage1D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 52));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_TexImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLsizei *)(pc + 32),
- *(GLint *)(pc + 40),
- *(GLenum *)(pc + 44),
- *(GLenum *)(pc + 48),
- pixels
- ) );
+ glTexImage1D(*(GLenum *) (pc + 20),
+ *(GLint *) (pc + 24),
+ *(GLint *) (pc + 28),
+ *(GLsizei *) (pc + 32),
+ *(GLint *) (pc + 40),
+ *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels);
}
-void __glXDisp_TexImage2D(GLbyte * pc)
+void
+__glXDisp_TexImage2D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 52));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_TexImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLsizei *)(pc + 32),
- *(GLsizei *)(pc + 36),
- *(GLint *)(pc + 40),
- *(GLenum *)(pc + 44),
- *(GLenum *)(pc + 48),
- pixels
- ) );
+ glTexImage2D(*(GLenum *) (pc + 20),
+ *(GLint *) (pc + 24),
+ *(GLint *) (pc + 28),
+ *(GLsizei *) (pc + 32),
+ *(GLsizei *) (pc + 36),
+ *(GLint *) (pc + 40),
+ *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels);
}
-void __glXDisp_TexEnvf(GLbyte * pc)
+void
+__glXDisp_TexEnvf(GLbyte * pc)
{
- CALL_TexEnvf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glTexEnvf(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_TexEnvfv(GLbyte * pc)
+void
+__glXDisp_TexEnvfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 8);
- CALL_TexEnvfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glTexEnvfv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_TexEnvi(GLbyte * pc)
+void
+__glXDisp_TexEnvi(GLbyte * pc)
{
- CALL_TexEnvi( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
+ glTexEnvi(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
}
-void __glXDisp_TexEnviv(GLbyte * pc)
+void
+__glXDisp_TexEnviv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLint *params;
params = (const GLint *) (pc + 8);
- CALL_TexEnviv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glTexEnviv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_TexGend(GLbyte * pc)
+void
+__glXDisp_TexGend(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_TexGend( GET_DISPATCH(), (
- *(GLenum *)(pc + 8),
- *(GLenum *)(pc + 12),
- *(GLdouble *)(pc + 0)
- ) );
+ glTexGend(*(GLenum *) (pc + 8),
+ *(GLenum *) (pc + 12), *(GLdouble *) (pc + 0));
}
-void __glXDisp_TexGendv(GLbyte * pc)
+void
+__glXDisp_TexGendv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLdouble * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLdouble *params;
#ifdef __GLX_ALIGN64
const GLuint compsize = __glTexGendv_size(pname);
const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
params = (const GLdouble *) (pc + 8);
- CALL_TexGendv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glTexGendv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_TexGenf(GLbyte * pc)
+void
+__glXDisp_TexGenf(GLbyte * pc)
{
- CALL_TexGenf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glTexGenf(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_TexGenfv(GLbyte * pc)
+void
+__glXDisp_TexGenfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 8);
- CALL_TexGenfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glTexGenfv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_TexGeni(GLbyte * pc)
+void
+__glXDisp_TexGeni(GLbyte * pc)
{
- CALL_TexGeni( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
+ glTexGeni(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
}
-void __glXDisp_TexGeniv(GLbyte * pc)
+void
+__glXDisp_TexGeniv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLint *params;
params = (const GLint *) (pc + 8);
- CALL_TexGeniv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glTexGeniv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_InitNames(GLbyte * pc)
+void
+__glXDisp_InitNames(GLbyte * pc)
{
- CALL_InitNames( GET_DISPATCH(), () );
+ glInitNames();
}
-void __glXDisp_LoadName(GLbyte * pc)
+void
+__glXDisp_LoadName(GLbyte * pc)
{
- CALL_LoadName( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+ glLoadName(*(GLuint *) (pc + 0));
}
-void __glXDisp_PassThrough(GLbyte * pc)
+void
+__glXDisp_PassThrough(GLbyte * pc)
{
- CALL_PassThrough( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0)
- ) );
+ glPassThrough(*(GLfloat *) (pc + 0));
}
-void __glXDisp_PopName(GLbyte * pc)
+void
+__glXDisp_PopName(GLbyte * pc)
{
- CALL_PopName( GET_DISPATCH(), () );
+ glPopName();
}
-void __glXDisp_PushName(GLbyte * pc)
+void
+__glXDisp_PushName(GLbyte * pc)
{
- CALL_PushName( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+ glPushName(*(GLuint *) (pc + 0));
}
-void __glXDisp_DrawBuffer(GLbyte * pc)
+void
+__glXDisp_DrawBuffer(GLbyte * pc)
{
- CALL_DrawBuffer( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glDrawBuffer(*(GLenum *) (pc + 0));
}
-void __glXDisp_Clear(GLbyte * pc)
+void
+__glXDisp_Clear(GLbyte * pc)
{
- CALL_Clear( GET_DISPATCH(), (
- *(GLbitfield *)(pc + 0)
- ) );
+ glClear(*(GLbitfield *) (pc + 0));
}
-void __glXDisp_ClearAccum(GLbyte * pc)
+void
+__glXDisp_ClearAccum(GLbyte * pc)
{
- CALL_ClearAccum( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8),
- *(GLfloat *)(pc + 12)
- ) );
+ glClearAccum(*(GLfloat *) (pc + 0),
+ *(GLfloat *) (pc + 4),
+ *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12));
}
-void __glXDisp_ClearIndex(GLbyte * pc)
+void
+__glXDisp_ClearIndex(GLbyte * pc)
{
- CALL_ClearIndex( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0)
- ) );
+ glClearIndex(*(GLfloat *) (pc + 0));
}
-void __glXDisp_ClearColor(GLbyte * pc)
+void
+__glXDisp_ClearColor(GLbyte * pc)
{
- CALL_ClearColor( GET_DISPATCH(), (
- *(GLclampf *)(pc + 0),
- *(GLclampf *)(pc + 4),
- *(GLclampf *)(pc + 8),
- *(GLclampf *)(pc + 12)
- ) );
+ glClearColor(*(GLclampf *) (pc + 0),
+ *(GLclampf *) (pc + 4),
+ *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12));
}
-void __glXDisp_ClearStencil(GLbyte * pc)
+void
+__glXDisp_ClearStencil(GLbyte * pc)
{
- CALL_ClearStencil( GET_DISPATCH(), (
- *(GLint *)(pc + 0)
- ) );
+ glClearStencil(*(GLint *) (pc + 0));
}
-void __glXDisp_ClearDepth(GLbyte * pc)
+void
+__glXDisp_ClearDepth(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_ClearDepth( GET_DISPATCH(), (
- *(GLclampd *)(pc + 0)
- ) );
+ glClearDepth(*(GLclampd *) (pc + 0));
}
-void __glXDisp_StencilMask(GLbyte * pc)
+void
+__glXDisp_StencilMask(GLbyte * pc)
{
- CALL_StencilMask( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+ glStencilMask(*(GLuint *) (pc + 0));
}
-void __glXDisp_ColorMask(GLbyte * pc)
+void
+__glXDisp_ColorMask(GLbyte * pc)
{
- CALL_ColorMask( GET_DISPATCH(), (
- *(GLboolean *)(pc + 0),
- *(GLboolean *)(pc + 1),
- *(GLboolean *)(pc + 2),
- *(GLboolean *)(pc + 3)
- ) );
+ glColorMask(*(GLboolean *) (pc + 0),
+ *(GLboolean *) (pc + 1),
+ *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3));
}
-void __glXDisp_DepthMask(GLbyte * pc)
+void
+__glXDisp_DepthMask(GLbyte * pc)
{
- CALL_DepthMask( GET_DISPATCH(), (
- *(GLboolean *)(pc + 0)
- ) );
+ glDepthMask(*(GLboolean *) (pc + 0));
}
-void __glXDisp_IndexMask(GLbyte * pc)
+void
+__glXDisp_IndexMask(GLbyte * pc)
{
- CALL_IndexMask( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+ glIndexMask(*(GLuint *) (pc + 0));
}
-void __glXDisp_Accum(GLbyte * pc)
+void
+__glXDisp_Accum(GLbyte * pc)
{
- CALL_Accum( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
+ glAccum(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
}
-void __glXDisp_Disable(GLbyte * pc)
+void
+__glXDisp_Disable(GLbyte * pc)
{
- CALL_Disable( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glDisable(*(GLenum *) (pc + 0));
}
-void __glXDisp_Enable(GLbyte * pc)
+void
+__glXDisp_Enable(GLbyte * pc)
{
- CALL_Enable( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glEnable(*(GLenum *) (pc + 0));
}
-void __glXDisp_PopAttrib(GLbyte * pc)
+void
+__glXDisp_PopAttrib(GLbyte * pc)
{
- CALL_PopAttrib( GET_DISPATCH(), () );
+ glPopAttrib();
}
-void __glXDisp_PushAttrib(GLbyte * pc)
+void
+__glXDisp_PushAttrib(GLbyte * pc)
{
- CALL_PushAttrib( GET_DISPATCH(), (
- *(GLbitfield *)(pc + 0)
- ) );
+ glPushAttrib(*(GLbitfield *) (pc + 0));
}
-void __glXDisp_MapGrid1d(GLbyte * pc)
+void
+__glXDisp_MapGrid1d(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 20);
pc -= 4;
}
#endif
- CALL_MapGrid1d( GET_DISPATCH(), (
- *(GLint *)(pc + 16),
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8)
- ) );
+ glMapGrid1d(*(GLint *) (pc + 16),
+ *(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8));
}
-void __glXDisp_MapGrid1f(GLbyte * pc)
+void
+__glXDisp_MapGrid1f(GLbyte * pc)
{
- CALL_MapGrid1f( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glMapGrid1f(*(GLint *) (pc + 0),
+ *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_MapGrid2d(GLbyte * pc)
+void
+__glXDisp_MapGrid2d(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 40);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 40);
pc -= 4;
}
#endif
- CALL_MapGrid2d( GET_DISPATCH(), (
- *(GLint *)(pc + 32),
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLint *)(pc + 36),
- *(GLdouble *)(pc + 16),
- *(GLdouble *)(pc + 24)
- ) );
+ glMapGrid2d(*(GLint *) (pc + 32),
+ *(GLdouble *) (pc + 0),
+ *(GLdouble *) (pc + 8),
+ *(GLint *) (pc + 36),
+ *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24));
}
-void __glXDisp_MapGrid2f(GLbyte * pc)
+void
+__glXDisp_MapGrid2f(GLbyte * pc)
{
- CALL_MapGrid2f( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLfloat *)(pc + 16),
- *(GLfloat *)(pc + 20)
- ) );
+ glMapGrid2f(*(GLint *) (pc + 0),
+ *(GLfloat *) (pc + 4),
+ *(GLfloat *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLfloat *) (pc + 16), *(GLfloat *) (pc + 20));
}
-void __glXDisp_EvalCoord1dv(GLbyte * pc)
+void
+__glXDisp_EvalCoord1dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_EvalCoord1dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glEvalCoord1dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_EvalCoord1fv(GLbyte * pc)
+void
+__glXDisp_EvalCoord1fv(GLbyte * pc)
{
- CALL_EvalCoord1fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glEvalCoord1fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_EvalCoord2dv(GLbyte * pc)
+void
+__glXDisp_EvalCoord2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_EvalCoord2dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glEvalCoord2dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_EvalCoord2fv(GLbyte * pc)
+void
+__glXDisp_EvalCoord2fv(GLbyte * pc)
{
- CALL_EvalCoord2fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glEvalCoord2fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_EvalMesh1(GLbyte * pc)
+void
+__glXDisp_EvalMesh1(GLbyte * pc)
{
- CALL_EvalMesh1( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
+ glEvalMesh1(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8));
}
-void __glXDisp_EvalPoint1(GLbyte * pc)
+void
+__glXDisp_EvalPoint1(GLbyte * pc)
{
- CALL_EvalPoint1( GET_DISPATCH(), (
- *(GLint *)(pc + 0)
- ) );
+ glEvalPoint1(*(GLint *) (pc + 0));
}
-void __glXDisp_EvalMesh2(GLbyte * pc)
+void
+__glXDisp_EvalMesh2(GLbyte * pc)
{
- CALL_EvalMesh2( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16)
- ) );
+ glEvalMesh2(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12), *(GLint *) (pc + 16));
}
-void __glXDisp_EvalPoint2(GLbyte * pc)
+void
+__glXDisp_EvalPoint2(GLbyte * pc)
{
- CALL_EvalPoint2( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
+ glEvalPoint2(*(GLint *) (pc + 0), *(GLint *) (pc + 4));
}
-void __glXDisp_AlphaFunc(GLbyte * pc)
+void
+__glXDisp_AlphaFunc(GLbyte * pc)
{
- CALL_AlphaFunc( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLclampf *)(pc + 4)
- ) );
+ glAlphaFunc(*(GLenum *) (pc + 0), *(GLclampf *) (pc + 4));
}
-void __glXDisp_BlendFunc(GLbyte * pc)
+void
+__glXDisp_BlendFunc(GLbyte * pc)
{
- CALL_BlendFunc( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
+ glBlendFunc(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
}
-void __glXDisp_LogicOp(GLbyte * pc)
+void
+__glXDisp_LogicOp(GLbyte * pc)
{
- CALL_LogicOp( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glLogicOp(*(GLenum *) (pc + 0));
}
-void __glXDisp_StencilFunc(GLbyte * pc)
+void
+__glXDisp_StencilFunc(GLbyte * pc)
{
- CALL_StencilFunc( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLuint *)(pc + 8)
- ) );
+ glStencilFunc(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4), *(GLuint *) (pc + 8));
}
-void __glXDisp_StencilOp(GLbyte * pc)
+void
+__glXDisp_StencilOp(GLbyte * pc)
{
- CALL_StencilOp( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLenum *)(pc + 8)
- ) );
+ glStencilOp(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLenum *) (pc + 8));
}
-void __glXDisp_DepthFunc(GLbyte * pc)
+void
+__glXDisp_DepthFunc(GLbyte * pc)
{
- CALL_DepthFunc( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glDepthFunc(*(GLenum *) (pc + 0));
}
-void __glXDisp_PixelZoom(GLbyte * pc)
+void
+__glXDisp_PixelZoom(GLbyte * pc)
{
- CALL_PixelZoom( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
+ glPixelZoom(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4));
}
-void __glXDisp_PixelTransferf(GLbyte * pc)
+void
+__glXDisp_PixelTransferf(GLbyte * pc)
{
- CALL_PixelTransferf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
+ glPixelTransferf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
}
-void __glXDisp_PixelTransferi(GLbyte * pc)
+void
+__glXDisp_PixelTransferi(GLbyte * pc)
{
- CALL_PixelTransferi( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
+ glPixelTransferi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
}
-int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_PixelStoref(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_PixelStoref( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
+ if (cx != NULL) {
+ glPixelStoref(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
error = Success;
}
return error;
}
-int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_PixelStorei(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_PixelStorei( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
+ if (cx != NULL) {
+ glPixelStorei(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
error = Success;
}
return error;
}
-void __glXDisp_PixelMapfv(GLbyte * pc)
+void
+__glXDisp_PixelMapfv(GLbyte * pc)
{
- const GLsizei mapsize = *(GLsizei *)(pc + 4);
+ const GLsizei mapsize = *(GLsizei *) (pc + 4);
- CALL_PixelMapfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- mapsize,
- (const GLfloat *)(pc + 8)
- ) );
+ glPixelMapfv(*(GLenum *) (pc + 0), mapsize, (const GLfloat *) (pc + 8));
}
-void __glXDisp_PixelMapuiv(GLbyte * pc)
+void
+__glXDisp_PixelMapuiv(GLbyte * pc)
{
- const GLsizei mapsize = *(GLsizei *)(pc + 4);
+ const GLsizei mapsize = *(GLsizei *) (pc + 4);
- CALL_PixelMapuiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- mapsize,
- (const GLuint *)(pc + 8)
- ) );
+ glPixelMapuiv(*(GLenum *) (pc + 0), mapsize, (const GLuint *) (pc + 8));
}
-void __glXDisp_PixelMapusv(GLbyte * pc)
+void
+__glXDisp_PixelMapusv(GLbyte * pc)
{
- const GLsizei mapsize = *(GLsizei *)(pc + 4);
+ const GLsizei mapsize = *(GLsizei *) (pc + 4);
- CALL_PixelMapusv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- mapsize,
- (const GLushort *)(pc + 8)
- ) );
+ glPixelMapusv(*(GLenum *) (pc + 0), mapsize, (const GLushort *) (pc + 8));
}
-void __glXDisp_ReadBuffer(GLbyte * pc)
+void
+__glXDisp_ReadBuffer(GLbyte * pc)
{
- CALL_ReadBuffer( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glReadBuffer(*(GLenum *) (pc + 0));
}
-void __glXDisp_CopyPixels(GLbyte * pc)
+void
+__glXDisp_CopyPixels(GLbyte * pc)
{
- CALL_CopyPixels( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLsizei *)(pc + 8),
- *(GLsizei *)(pc + 12),
- *(GLenum *)(pc + 16)
- ) );
+ glCopyPixels(*(GLint *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLsizei *) (pc + 8),
+ *(GLsizei *) (pc + 12), *(GLenum *) (pc + 16));
}
-void __glXDisp_DrawPixels(GLbyte * pc)
+void
+__glXDisp_DrawPixels(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 36);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 36));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_DrawPixels( GET_DISPATCH(), (
- *(GLsizei *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLenum *)(pc + 28),
- *(GLenum *)(pc + 32),
- pixels
- ) );
+ glDrawPixels(*(GLsizei *) (pc + 20),
+ *(GLsizei *) (pc + 24),
+ *(GLenum *) (pc + 28), *(GLenum *) (pc + 32), pixels);
}
-int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetBooleanv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 0);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 0);
const GLuint compsize = __glGetBooleanv_size(pname);
GLboolean answerBuffer[200];
- GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1);
+ GLboolean *params =
+ __glXGetAnswerBuffer(cl, compsize, answerBuffer,
+ sizeof(answerBuffer), 1);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetBooleanv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glGetBooleanv(pname, params);
__glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0);
error = Success;
}
@@ -1796,19 +1542,18 @@ int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetClipPlane(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLdouble equation[4];
- CALL_GetClipPlane( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- equation
- ) );
+
+ glGetClipPlane(*(GLenum *) (pc + 0), equation);
__glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0);
error = Success;
}
@@ -1816,27 +1561,28 @@ int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetDoublev(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 0);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 0);
const GLuint compsize = __glGetDoublev_size(pname);
GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
+ GLdouble *params =
+ __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
+ sizeof(answerBuffer), 8);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetDoublev( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glGetDoublev(pname, params);
__glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
error = Success;
}
@@ -1844,16 +1590,18 @@ int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetError(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLenum retval;
- retval = CALL_GetError( GET_DISPATCH(), () );
+
+ retval = glGetError();
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -1861,27 +1609,28 @@ int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetFloatv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 0);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 0);
const GLuint compsize = __glGetFloatv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetFloatv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glGetFloatv(pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -1889,27 +1638,28 @@ int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetIntegerv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 0);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 0);
const GLuint compsize = __glGetIntegerv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetIntegerv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glGetIntegerv(pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -1917,28 +1667,28 @@ int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetLightfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetLightfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetLightfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetLightfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -1946,28 +1696,28 @@ int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetLightiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetLightiv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetLightiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetLightiv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -1975,29 +1725,29 @@ int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMapdv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum target = *(GLenum *)(pc + 0);
- const GLenum query = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum target = *(GLenum *) (pc + 0);
+ const GLenum query = *(GLenum *) (pc + 4);
- const GLuint compsize = __glGetMapdv_size(target,query);
+ const GLuint compsize = __glGetMapdv_size(target, query);
GLdouble answerBuffer[200];
- GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
+ GLdouble *v =
+ __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
+ sizeof(answerBuffer), 8);
- if (v == NULL) return BadAlloc;
+ if (v == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMapdv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
+ glGetMapdv(target, query, v);
__glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0);
error = Success;
}
@@ -2005,29 +1755,29 @@ int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMapfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum target = *(GLenum *)(pc + 0);
- const GLenum query = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum target = *(GLenum *) (pc + 0);
+ const GLenum query = *(GLenum *) (pc + 4);
- const GLuint compsize = __glGetMapfv_size(target,query);
+ const GLuint compsize = __glGetMapfv_size(target, query);
GLfloat answerBuffer[200];
- GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *v =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (v == NULL) return BadAlloc;
+ if (v == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMapfv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
+ glGetMapfv(target, query, v);
__glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2035,29 +1785,29 @@ int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMapiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum target = *(GLenum *)(pc + 0);
- const GLenum query = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum target = *(GLenum *) (pc + 0);
+ const GLenum query = *(GLenum *) (pc + 4);
- const GLuint compsize = __glGetMapiv_size(target,query);
+ const GLuint compsize = __glGetMapiv_size(target, query);
GLint answerBuffer[200];
- GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *v =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (v == NULL) return BadAlloc;
+ if (v == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMapiv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
+ glGetMapiv(target, query, v);
__glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2065,28 +1815,28 @@ int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMaterialfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetMaterialfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMaterialfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetMaterialfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2094,28 +1844,28 @@ int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMaterialiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetMaterialiv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMaterialiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetMaterialiv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2123,27 +1873,28 @@ int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetPixelMapfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum map = *(GLenum *)(pc + 0);
+ if (cx != NULL) {
+ const GLenum map = *(GLenum *) (pc + 0);
const GLuint compsize = __glGetPixelMapfv_size(map);
GLfloat answerBuffer[200];
- GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *values =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (values == NULL) return BadAlloc;
+ if (values == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetPixelMapfv( GET_DISPATCH(), (
- map,
- values
- ) );
+ glGetPixelMapfv(map, values);
__glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2151,27 +1902,28 @@ int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetPixelMapuiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum map = *(GLenum *)(pc + 0);
+ if (cx != NULL) {
+ const GLenum map = *(GLenum *) (pc + 0);
const GLuint compsize = __glGetPixelMapuiv_size(map);
GLuint answerBuffer[200];
- GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLuint *values =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (values == NULL) return BadAlloc;
+ if (values == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetPixelMapuiv( GET_DISPATCH(), (
- map,
- values
- ) );
+ glGetPixelMapuiv(map, values);
__glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2179,27 +1931,28 @@ int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetPixelMapusv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum map = *(GLenum *)(pc + 0);
+ if (cx != NULL) {
+ const GLenum map = *(GLenum *) (pc + 0);
const GLuint compsize = __glGetPixelMapusv_size(map);
GLushort answerBuffer[200];
- GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2);
+ GLushort *values =
+ __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer,
+ sizeof(answerBuffer), 2);
- if (values == NULL) return BadAlloc;
+ if (values == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetPixelMapusv( GET_DISPATCH(), (
- map,
- values
- ) );
+ glGetPixelMapusv(map, values);
__glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0);
error = Success;
}
@@ -2207,28 +1960,28 @@ int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexEnvfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetTexEnvfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexEnvfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetTexEnvfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2236,28 +1989,28 @@ int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexEnviv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetTexEnviv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexEnviv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetTexEnviv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2265,28 +2018,28 @@ int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexGendv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetTexGendv_size(pname);
GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
+ GLdouble *params =
+ __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
+ sizeof(answerBuffer), 8);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexGendv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetTexGendv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
error = Success;
}
@@ -2294,28 +2047,28 @@ int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexGenfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetTexGenfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexGenfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetTexGenfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2323,28 +2076,28 @@ int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexGeniv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetTexGeniv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexGeniv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetTexGeniv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2352,28 +2105,28 @@ int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetTexParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetTexParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2381,28 +2134,28 @@ int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetTexParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetTexParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2410,29 +2163,29 @@ int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexLevelParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 8);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 8);
const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexLevelParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- pname,
- params
- ) );
+ glGetTexLevelParameterfv(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2440,29 +2193,29 @@ int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetTexLevelParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 8);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 8);
const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexLevelParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- pname,
- params
- ) );
+ glGetTexLevelParameteriv(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2470,18 +2223,18 @@ int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_IsEnabled(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsEnabled( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+
+ retval = glIsEnabled(*(GLenum *) (pc + 0));
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -2489,18 +2242,18 @@ int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_IsList(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsList( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+
+ retval = glIsList(*(GLuint *) (pc + 0));
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -2508,251 +2261,223 @@ int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_DepthRange(GLbyte * pc)
+void
+__glXDisp_DepthRange(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_DepthRange( GET_DISPATCH(), (
- *(GLclampd *)(pc + 0),
- *(GLclampd *)(pc + 8)
- ) );
+ glDepthRange(*(GLclampd *) (pc + 0), *(GLclampd *) (pc + 8));
}
-void __glXDisp_Frustum(GLbyte * pc)
+void
+__glXDisp_Frustum(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 48);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 48);
pc -= 4;
}
#endif
- CALL_Frustum( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16),
- *(GLdouble *)(pc + 24),
- *(GLdouble *)(pc + 32),
- *(GLdouble *)(pc + 40)
- ) );
+ glFrustum(*(GLdouble *) (pc + 0),
+ *(GLdouble *) (pc + 8),
+ *(GLdouble *) (pc + 16),
+ *(GLdouble *) (pc + 24),
+ *(GLdouble *) (pc + 32), *(GLdouble *) (pc + 40));
}
-void __glXDisp_LoadIdentity(GLbyte * pc)
+void
+__glXDisp_LoadIdentity(GLbyte * pc)
{
- CALL_LoadIdentity( GET_DISPATCH(), () );
+ glLoadIdentity();
}
-void __glXDisp_LoadMatrixf(GLbyte * pc)
+void
+__glXDisp_LoadMatrixf(GLbyte * pc)
{
- CALL_LoadMatrixf( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glLoadMatrixf((const GLfloat *) (pc + 0));
}
-void __glXDisp_LoadMatrixd(GLbyte * pc)
+void
+__glXDisp_LoadMatrixd(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 128);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 128);
pc -= 4;
}
#endif
- CALL_LoadMatrixd( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glLoadMatrixd((const GLdouble *) (pc + 0));
}
-void __glXDisp_MatrixMode(GLbyte * pc)
+void
+__glXDisp_MatrixMode(GLbyte * pc)
{
- CALL_MatrixMode( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glMatrixMode(*(GLenum *) (pc + 0));
}
-void __glXDisp_MultMatrixf(GLbyte * pc)
+void
+__glXDisp_MultMatrixf(GLbyte * pc)
{
- CALL_MultMatrixf( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ glMultMatrixf((const GLfloat *) (pc + 0));
}
-void __glXDisp_MultMatrixd(GLbyte * pc)
+void
+__glXDisp_MultMatrixd(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 128);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 128);
pc -= 4;
}
#endif
- CALL_MultMatrixd( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ glMultMatrixd((const GLdouble *) (pc + 0));
}
-void __glXDisp_Ortho(GLbyte * pc)
+void
+__glXDisp_Ortho(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 48);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 48);
pc -= 4;
}
#endif
- CALL_Ortho( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16),
- *(GLdouble *)(pc + 24),
- *(GLdouble *)(pc + 32),
- *(GLdouble *)(pc + 40)
- ) );
+ glOrtho(*(GLdouble *) (pc + 0),
+ *(GLdouble *) (pc + 8),
+ *(GLdouble *) (pc + 16),
+ *(GLdouble *) (pc + 24),
+ *(GLdouble *) (pc + 32), *(GLdouble *) (pc + 40));
}
-void __glXDisp_PopMatrix(GLbyte * pc)
+void
+__glXDisp_PopMatrix(GLbyte * pc)
{
- CALL_PopMatrix( GET_DISPATCH(), () );
+ glPopMatrix();
}
-void __glXDisp_PushMatrix(GLbyte * pc)
+void
+__glXDisp_PushMatrix(GLbyte * pc)
{
- CALL_PushMatrix( GET_DISPATCH(), () );
+ glPushMatrix();
}
-void __glXDisp_Rotated(GLbyte * pc)
+void
+__glXDisp_Rotated(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_Rotated( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16),
- *(GLdouble *)(pc + 24)
- ) );
+ glRotated(*(GLdouble *) (pc + 0),
+ *(GLdouble *) (pc + 8),
+ *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24));
}
-void __glXDisp_Rotatef(GLbyte * pc)
+void
+__glXDisp_Rotatef(GLbyte * pc)
{
- CALL_Rotatef( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8),
- *(GLfloat *)(pc + 12)
- ) );
+ glRotatef(*(GLfloat *) (pc + 0),
+ *(GLfloat *) (pc + 4),
+ *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12));
}
-void __glXDisp_Scaled(GLbyte * pc)
+void
+__glXDisp_Scaled(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Scaled( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16)
- ) );
+ glScaled(*(GLdouble *) (pc + 0),
+ *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16));
}
-void __glXDisp_Scalef(GLbyte * pc)
+void
+__glXDisp_Scalef(GLbyte * pc)
{
- CALL_Scalef( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glScalef(*(GLfloat *) (pc + 0),
+ *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_Translated(GLbyte * pc)
+void
+__glXDisp_Translated(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Translated( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16)
- ) );
+ glTranslated(*(GLdouble *) (pc + 0),
+ *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16));
}
-void __glXDisp_Translatef(GLbyte * pc)
+void
+__glXDisp_Translatef(GLbyte * pc)
{
- CALL_Translatef( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glTranslatef(*(GLfloat *) (pc + 0),
+ *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_Viewport(GLbyte * pc)
+void
+__glXDisp_Viewport(GLbyte * pc)
{
- CALL_Viewport( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLsizei *)(pc + 8),
- *(GLsizei *)(pc + 12)
- ) );
+ glViewport(*(GLint *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12));
}
-void __glXDisp_BindTexture(GLbyte * pc)
+void
+__glXDisp_BindTexture(GLbyte * pc)
{
- CALL_BindTexture( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
+ glBindTexture(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
}
-void __glXDisp_Indexubv(GLbyte * pc)
+void
+__glXDisp_Indexubv(GLbyte * pc)
{
- CALL_Indexubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
+ glIndexubv((const GLubyte *) (pc + 0));
}
-void __glXDisp_PolygonOffset(GLbyte * pc)
+void
+__glXDisp_PolygonOffset(GLbyte * pc)
{
- CALL_PolygonOffset( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
+ glPolygonOffset(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4));
}
-int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_AreTexturesResident(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
GLboolean retval;
GLboolean answerBuffer[200];
- GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
- retval = CALL_AreTexturesResident( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4),
- residences
- ) );
+ GLboolean *residences =
+ __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
+ retval =
+ glAreTexturesResident(n, (const GLuint *) (pc + 4), residences);
__glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
error = Success;
}
@@ -2760,24 +2485,23 @@ int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
GLboolean retval;
GLboolean answerBuffer[200];
- GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
- retval = CALL_AreTexturesResident( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4),
- residences
- ) );
+ GLboolean *residences =
+ __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
+ retval =
+ glAreTexturesResident(n, (const GLuint *) (pc + 4), residences);
__glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval);
error = Success;
}
@@ -2785,115 +2509,103 @@ int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_CopyTexImage1D(GLbyte * pc)
+void
+__glXDisp_CopyTexImage1D(GLbyte * pc)
{
- CALL_CopyTexImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLsizei *)(pc + 20),
- *(GLint *)(pc + 24)
- ) );
+ glCopyTexImage1D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLenum *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLint *) (pc + 16),
+ *(GLsizei *) (pc + 20), *(GLint *) (pc + 24));
}
-void __glXDisp_CopyTexImage2D(GLbyte * pc)
+void
+__glXDisp_CopyTexImage2D(GLbyte * pc)
{
- CALL_CopyTexImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLsizei *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLint *)(pc + 28)
- ) );
+ glCopyTexImage2D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLenum *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLint *) (pc + 16),
+ *(GLsizei *) (pc + 20),
+ *(GLsizei *) (pc + 24), *(GLint *) (pc + 28));
}
-void __glXDisp_CopyTexSubImage1D(GLbyte * pc)
+void
+__glXDisp_CopyTexSubImage1D(GLbyte * pc)
{
- CALL_CopyTexSubImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLsizei *)(pc + 20)
- ) );
+ glCopyTexSubImage1D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLint *) (pc + 16), *(GLsizei *) (pc + 20));
}
-void __glXDisp_CopyTexSubImage2D(GLbyte * pc)
+void
+__glXDisp_CopyTexSubImage2D(GLbyte * pc)
{
- CALL_CopyTexSubImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLint *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLsizei *)(pc + 28)
- ) );
+ glCopyTexSubImage2D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLint *) (pc + 16),
+ *(GLint *) (pc + 20),
+ *(GLsizei *) (pc + 24), *(GLsizei *) (pc + 28));
}
-int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_DeleteTextures(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
- CALL_DeleteTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
+ glDeleteTextures(n, (const GLuint *) (pc + 4));
error = Success;
}
return error;
}
-int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_DeleteTexturesEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
- CALL_DeleteTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
+ glDeleteTextures(n, (const GLuint *) (pc + 4));
error = Success;
}
return error;
}
-int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GenTextures(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
GLuint answerBuffer[200];
- GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenTextures( GET_DISPATCH(), (
- n,
- textures
- ) );
+ GLuint *textures =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ glGenTextures(n, textures);
__glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -2901,22 +2613,22 @@ int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
GLuint answerBuffer[200];
- GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenTextures( GET_DISPATCH(), (
- n,
- textures
- ) );
+ GLuint *textures =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ glGenTextures(n, textures);
__glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -2924,18 +2636,18 @@ int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_IsTexture(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsTexture( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+
+ retval = glIsTexture(*(GLuint *) (pc + 0));
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -2943,18 +2655,18 @@ int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_IsTextureEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsTexture( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+
+ retval = glIsTexture(*(GLuint *) (pc + 0));
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -2962,165 +2674,144 @@ int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_PrioritizeTextures(GLbyte * pc)
+void
+__glXDisp_PrioritizeTextures(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 0);
+ const GLsizei n = *(GLsizei *) (pc + 0);
- CALL_PrioritizeTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4),
- (const GLclampf *)(pc + 4)
- ) );
+ glPrioritizeTextures(n,
+ (const GLuint *) (pc + 4),
+ (const GLclampf *) (pc + 4));
}
-void __glXDisp_TexSubImage1D(GLbyte * pc)
+void
+__glXDisp_TexSubImage1D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 56);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 56));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_TexSubImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLsizei *)(pc + 36),
- *(GLenum *)(pc + 44),
- *(GLenum *)(pc + 48),
- pixels
- ) );
+ glTexSubImage1D(*(GLenum *) (pc + 20),
+ *(GLint *) (pc + 24),
+ *(GLint *) (pc + 28),
+ *(GLsizei *) (pc + 36),
+ *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels);
}
-void __glXDisp_TexSubImage2D(GLbyte * pc)
+void
+__glXDisp_TexSubImage2D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 56);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 56));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_TexSubImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLint *)(pc + 32),
- *(GLsizei *)(pc + 36),
- *(GLsizei *)(pc + 40),
- *(GLenum *)(pc + 44),
- *(GLenum *)(pc + 48),
- pixels
- ) );
+ glTexSubImage2D(*(GLenum *) (pc + 20),
+ *(GLint *) (pc + 24),
+ *(GLint *) (pc + 28),
+ *(GLint *) (pc + 32),
+ *(GLsizei *) (pc + 36),
+ *(GLsizei *) (pc + 40),
+ *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels);
}
-void __glXDisp_BlendColor(GLbyte * pc)
+void
+__glXDisp_BlendColor(GLbyte * pc)
{
- CALL_BlendColor( GET_DISPATCH(), (
- *(GLclampf *)(pc + 0),
- *(GLclampf *)(pc + 4),
- *(GLclampf *)(pc + 8),
- *(GLclampf *)(pc + 12)
- ) );
+ glBlendColor(*(GLclampf *) (pc + 0),
+ *(GLclampf *) (pc + 4),
+ *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12));
}
-void __glXDisp_BlendEquation(GLbyte * pc)
+void
+__glXDisp_BlendEquation(GLbyte * pc)
{
- CALL_BlendEquation( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glBlendEquation(*(GLenum *) (pc + 0));
}
-void __glXDisp_ColorTable(GLbyte * pc)
+void
+__glXDisp_ColorTable(GLbyte * pc)
{
- const GLvoid * const table = (const GLvoid *) (pc + 40);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const table = (const GLvoid *) ((pc + 40));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_ColorTable( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLenum *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLenum *)(pc + 32),
- *(GLenum *)(pc + 36),
- table
- ) );
+ glColorTable(*(GLenum *) (pc + 20),
+ *(GLenum *) (pc + 24),
+ *(GLsizei *) (pc + 28),
+ *(GLenum *) (pc + 32), *(GLenum *) (pc + 36), table);
}
-void __glXDisp_ColorTableParameterfv(GLbyte * pc)
+void
+__glXDisp_ColorTableParameterfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 8);
- CALL_ColorTableParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glColorTableParameterfv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_ColorTableParameteriv(GLbyte * pc)
+void
+__glXDisp_ColorTableParameteriv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLint *params;
params = (const GLint *) (pc + 8);
- CALL_ColorTableParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glColorTableParameteriv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_CopyColorTable(GLbyte * pc)
+void
+__glXDisp_CopyColorTable(GLbyte * pc)
{
- CALL_CopyColorTable( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16)
- ) );
+ glCopyColorTable(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12), *(GLsizei *) (pc + 16));
}
-int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetColorTableParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetColorTableParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetColorTableParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetColorTableParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3128,28 +2819,28 @@ int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetColorTableParameterfvSGI(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetColorTableParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetColorTableParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetColorTableParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3157,28 +2848,28 @@ int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetColorTableParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetColorTableParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetColorTableParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetColorTableParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3186,28 +2877,28 @@ int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetColorTableParameterivSGI(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetColorTableParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetColorTableParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetColorTableParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3215,175 +2906,150 @@ int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_ColorSubTable(GLbyte * pc)
+void
+__glXDisp_ColorSubTable(GLbyte * pc)
{
- const GLvoid * const data = (const GLvoid *) (pc + 40);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const data = (const GLvoid *) ((pc + 40));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_ColorSubTable( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLenum *)(pc + 32),
- *(GLenum *)(pc + 36),
- data
- ) );
+ glColorSubTable(*(GLenum *) (pc + 20),
+ *(GLsizei *) (pc + 24),
+ *(GLsizei *) (pc + 28),
+ *(GLenum *) (pc + 32), *(GLenum *) (pc + 36), data);
}
-void __glXDisp_CopyColorSubTable(GLbyte * pc)
+void
+__glXDisp_CopyColorSubTable(GLbyte * pc)
{
- CALL_CopyColorSubTable( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLsizei *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16)
- ) );
+ glCopyColorSubTable(*(GLenum *) (pc + 0),
+ *(GLsizei *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12), *(GLsizei *) (pc + 16));
}
-void __glXDisp_ConvolutionFilter1D(GLbyte * pc)
+void
+__glXDisp_ConvolutionFilter1D(GLbyte * pc)
{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const image = (const GLvoid *) ((pc + 44));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_ConvolutionFilter1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLenum *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLenum *)(pc + 36),
- *(GLenum *)(pc + 40),
- image
- ) );
+ glConvolutionFilter1D(*(GLenum *) (pc + 20),
+ *(GLenum *) (pc + 24),
+ *(GLsizei *) (pc + 28),
+ *(GLenum *) (pc + 36), *(GLenum *) (pc + 40), image);
}
-void __glXDisp_ConvolutionFilter2D(GLbyte * pc)
+void
+__glXDisp_ConvolutionFilter2D(GLbyte * pc)
{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const image = (const GLvoid *) ((pc + 44));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_ConvolutionFilter2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLenum *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLsizei *)(pc + 32),
- *(GLenum *)(pc + 36),
- *(GLenum *)(pc + 40),
- image
- ) );
+ glConvolutionFilter2D(*(GLenum *) (pc + 20),
+ *(GLenum *) (pc + 24),
+ *(GLsizei *) (pc + 28),
+ *(GLsizei *) (pc + 32),
+ *(GLenum *) (pc + 36), *(GLenum *) (pc + 40), image);
}
-void __glXDisp_ConvolutionParameterf(GLbyte * pc)
+void
+__glXDisp_ConvolutionParameterf(GLbyte * pc)
{
- CALL_ConvolutionParameterf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
+ glConvolutionParameterf(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8));
}
-void __glXDisp_ConvolutionParameterfv(GLbyte * pc)
+void
+__glXDisp_ConvolutionParameterfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 8);
- CALL_ConvolutionParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_ConvolutionParameteri(GLbyte * pc)
+void
+__glXDisp_ConvolutionParameteri(GLbyte * pc)
{
- CALL_ConvolutionParameteri( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
+ glConvolutionParameteri(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLint *) (pc + 8));
}
-void __glXDisp_ConvolutionParameteriv(GLbyte * pc)
+void
+__glXDisp_ConvolutionParameteriv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
+ const GLenum pname = *(GLenum *) (pc + 4);
+ const GLint *params;
params = (const GLint *) (pc + 8);
- CALL_ConvolutionParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params);
}
-void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc)
+void
+__glXDisp_CopyConvolutionFilter1D(GLbyte * pc)
{
- CALL_CopyConvolutionFilter1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16)
- ) );
+ glCopyConvolutionFilter1D(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12), *(GLsizei *) (pc + 16));
}
-void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc)
+void
+__glXDisp_CopyConvolutionFilter2D(GLbyte * pc)
{
- CALL_CopyConvolutionFilter2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16),
- *(GLsizei *)(pc + 20)
- ) );
+ glCopyConvolutionFilter2D(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLsizei *) (pc + 16), *(GLsizei *) (pc + 20));
}
-int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetConvolutionParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3391,28 +3057,28 @@ int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetConvolutionParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3420,28 +3086,28 @@ int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetConvolutionParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3449,28 +3115,28 @@ int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetConvolutionParameterivEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3478,28 +3144,28 @@ int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetHistogramParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetHistogramParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetHistogramParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetHistogramParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3507,28 +3173,28 @@ int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetHistogramParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetHistogramParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetHistogramParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetHistogramParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3536,28 +3202,28 @@ int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetHistogramParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetHistogramParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetHistogramParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetHistogramParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3565,28 +3231,28 @@ int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetHistogramParameterivEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetHistogramParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetHistogramParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetHistogramParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3594,28 +3260,28 @@ int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMinmaxParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetMinmaxParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3623,28 +3289,28 @@ int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMinmaxParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetMinmaxParameterfv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3652,28 +3318,28 @@ int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMinmaxParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetMinmaxParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3681,28 +3347,28 @@ int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetMinmaxParameterivEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ glGetMinmaxParameteriv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3710,562 +3376,526 @@ int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_Histogram(GLbyte * pc)
-{
- CALL_Histogram( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLsizei *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLboolean *)(pc + 12)
- ) );
+void
+__glXDisp_Histogram(GLbyte * pc)
+{
+ glHistogram(*(GLenum *) (pc + 0),
+ *(GLsizei *) (pc + 4),
+ *(GLenum *) (pc + 8), *(GLboolean *) (pc + 12));
}
-void __glXDisp_Minmax(GLbyte * pc)
+void
+__glXDisp_Minmax(GLbyte * pc)
{
- CALL_Minmax( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLboolean *)(pc + 8)
- ) );
+ glMinmax(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), *(GLboolean *) (pc + 8));
}
-void __glXDisp_ResetHistogram(GLbyte * pc)
+void
+__glXDisp_ResetHistogram(GLbyte * pc)
{
- CALL_ResetHistogram( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glResetHistogram(*(GLenum *) (pc + 0));
}
-void __glXDisp_ResetMinmax(GLbyte * pc)
+void
+__glXDisp_ResetMinmax(GLbyte * pc)
{
- CALL_ResetMinmax( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glResetMinmax(*(GLenum *) (pc + 0));
}
-void __glXDisp_TexImage3D(GLbyte * pc)
+void
+__glXDisp_TexImage3D(GLbyte * pc)
{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 76);
- const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80));
- __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
+ const CARD32 ptr_is_null = *(CARD32 *) (pc + 76);
+ const GLvoid *const pixels =
+ (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80));
+ __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_TexImage3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 36),
- *(GLint *)(pc + 40),
- *(GLint *)(pc + 44),
- *(GLsizei *)(pc + 48),
- *(GLsizei *)(pc + 52),
- *(GLsizei *)(pc + 56),
- *(GLint *)(pc + 64),
- *(GLenum *)(pc + 68),
- *(GLenum *)(pc + 72),
- pixels
- ) );
+ glTexImage3D(*(GLenum *) (pc + 36),
+ *(GLint *) (pc + 40),
+ *(GLint *) (pc + 44),
+ *(GLsizei *) (pc + 48),
+ *(GLsizei *) (pc + 52),
+ *(GLsizei *) (pc + 56),
+ *(GLint *) (pc + 64),
+ *(GLenum *) (pc + 68), *(GLenum *) (pc + 72), pixels);
}
-void __glXDisp_TexSubImage3D(GLbyte * pc)
+void
+__glXDisp_TexSubImage3D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 88);
- __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 88));
+ __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength);
+ glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight);
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows);
+ glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages);
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment);
- CALL_TexSubImage3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 36),
- *(GLint *)(pc + 40),
- *(GLint *)(pc + 44),
- *(GLint *)(pc + 48),
- *(GLint *)(pc + 52),
- *(GLsizei *)(pc + 60),
- *(GLsizei *)(pc + 64),
- *(GLsizei *)(pc + 68),
- *(GLenum *)(pc + 76),
- *(GLenum *)(pc + 80),
- pixels
- ) );
+ glTexSubImage3D(*(GLenum *) (pc + 36),
+ *(GLint *) (pc + 40),
+ *(GLint *) (pc + 44),
+ *(GLint *) (pc + 48),
+ *(GLint *) (pc + 52),
+ *(GLsizei *) (pc + 60),
+ *(GLsizei *) (pc + 64),
+ *(GLsizei *) (pc + 68),
+ *(GLenum *) (pc + 76), *(GLenum *) (pc + 80), pixels);
}
-void __glXDisp_CopyTexSubImage3D(GLbyte * pc)
+void
+__glXDisp_CopyTexSubImage3D(GLbyte * pc)
{
- CALL_CopyTexSubImage3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLint *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLsizei *)(pc + 32)
- ) );
+ glCopyTexSubImage3D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLint *) (pc + 16),
+ *(GLint *) (pc + 20),
+ *(GLint *) (pc + 24),
+ *(GLsizei *) (pc + 28), *(GLsizei *) (pc + 32));
}
-void __glXDisp_ActiveTexture(GLbyte * pc)
+void
+__glXDisp_ActiveTexture(GLbyte * pc)
{
- CALL_ActiveTexture( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ glActiveTextureARB(*(GLenum *) (pc + 0));
}
-void __glXDisp_MultiTexCoord1dv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord1dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 12);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 12);
pc -= 4;
}
#endif
- CALL_MultiTexCoord1dv( GET_DISPATCH(), (
- *(GLenum *)(pc + 8),
- (const GLdouble *)(pc + 0)
- ) );
+ glMultiTexCoord1dvARB(*(GLenum *) (pc + 8), (const GLdouble *) (pc + 0));
}
-void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord1fvARB(GLbyte * pc)
{
- CALL_MultiTexCoord1fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ glMultiTexCoord1fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_MultiTexCoord1iv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord1iv(GLbyte * pc)
{
- CALL_MultiTexCoord1iv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
+ glMultiTexCoord1ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
}
-void __glXDisp_MultiTexCoord1sv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord1sv(GLbyte * pc)
{
- CALL_MultiTexCoord1sv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ glMultiTexCoord1svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_MultiTexCoord2dv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 20);
pc -= 4;
}
#endif
- CALL_MultiTexCoord2dv( GET_DISPATCH(), (
- *(GLenum *)(pc + 16),
- (const GLdouble *)(pc + 0)
- ) );
+ glMultiTexCoord2dvARB(*(GLenum *) (pc + 16), (const GLdouble *) (pc + 0));
}
-void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord2fvARB(GLbyte * pc)
{
- CALL_MultiTexCoord2fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ glMultiTexCoord2fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_MultiTexCoord2iv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord2iv(GLbyte * pc)
{
- CALL_MultiTexCoord2iv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
+ glMultiTexCoord2ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
}
-void __glXDisp_MultiTexCoord2sv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord2sv(GLbyte * pc)
{
- CALL_MultiTexCoord2sv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ glMultiTexCoord2svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_MultiTexCoord3dv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 28);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 28);
pc -= 4;
}
#endif
- CALL_MultiTexCoord3dv( GET_DISPATCH(), (
- *(GLenum *)(pc + 24),
- (const GLdouble *)(pc + 0)
- ) );
+ glMultiTexCoord3dvARB(*(GLenum *) (pc + 24), (const GLdouble *) (pc + 0));
}
-void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord3fvARB(GLbyte * pc)
{
- CALL_MultiTexCoord3fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ glMultiTexCoord3fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_MultiTexCoord3iv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord3iv(GLbyte * pc)
{
- CALL_MultiTexCoord3iv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
+ glMultiTexCoord3ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
}
-void __glXDisp_MultiTexCoord3sv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord3sv(GLbyte * pc)
{
- CALL_MultiTexCoord3sv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ glMultiTexCoord3svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_MultiTexCoord4dv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 36);
pc -= 4;
}
#endif
- CALL_MultiTexCoord4dv( GET_DISPATCH(), (
- *(GLenum *)(pc + 32),
- (const GLdouble *)(pc + 0)
- ) );
+ glMultiTexCoord4dvARB(*(GLenum *) (pc + 32), (const GLdouble *) (pc + 0));
}
-void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord4fvARB(GLbyte * pc)
{
- CALL_MultiTexCoord4fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ glMultiTexCoord4fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_MultiTexCoord4iv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord4iv(GLbyte * pc)
{
- CALL_MultiTexCoord4iv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
+ glMultiTexCoord4ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4));
}
-void __glXDisp_MultiTexCoord4sv(GLbyte * pc)
+void
+__glXDisp_MultiTexCoord4sv(GLbyte * pc)
{
- CALL_MultiTexCoord4sv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ glMultiTexCoord4svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_CompressedTexImage1D(GLbyte * pc)
+void
+__glXDisp_CompressedTexImage1D(GLbyte * pc)
{
- const GLsizei imageSize = *(GLsizei *)(pc + 20);
+ PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D =
+ __glGetProcAddress("glCompressedTexImage1D");
+ const GLsizei imageSize = *(GLsizei *) (pc + 20);
- CALL_CompressedTexImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLsizei *)(pc + 12),
- *(GLint *)(pc + 16),
- imageSize,
- (const GLvoid *)(pc + 24)
- ) );
+ CompressedTexImage1D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLenum *) (pc + 8),
+ *(GLsizei *) (pc + 12),
+ *(GLint *) (pc + 16),
+ imageSize, (const GLvoid *) (pc + 24));
}
-void __glXDisp_CompressedTexImage2D(GLbyte * pc)
+void
+__glXDisp_CompressedTexImage2D(GLbyte * pc)
{
- const GLsizei imageSize = *(GLsizei *)(pc + 24);
+ PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D =
+ __glGetProcAddress("glCompressedTexImage2D");
+ const GLsizei imageSize = *(GLsizei *) (pc + 24);
- CALL_CompressedTexImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLsizei *)(pc + 12),
- *(GLsizei *)(pc + 16),
- *(GLint *)(pc + 20),
- imageSize,
- (const GLvoid *)(pc + 28)
- ) );
+ CompressedTexImage2D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLenum *) (pc + 8),
+ *(GLsizei *) (pc + 12),
+ *(GLsizei *) (pc + 16),
+ *(GLint *) (pc + 20),
+ imageSize, (const GLvoid *) (pc + 28));
}
-void __glXDisp_CompressedTexImage3D(GLbyte * pc)
+void
+__glXDisp_CompressedTexImage3D(GLbyte * pc)
{
- const GLsizei imageSize = *(GLsizei *)(pc + 28);
+ PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D =
+ __glGetProcAddress("glCompressedTexImage3D");
+ const GLsizei imageSize = *(GLsizei *) (pc + 28);
- CALL_CompressedTexImage3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLsizei *)(pc + 12),
- *(GLsizei *)(pc + 16),
- *(GLsizei *)(pc + 20),
- *(GLint *)(pc + 24),
- imageSize,
- (const GLvoid *)(pc + 32)
- ) );
+ CompressedTexImage3D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLenum *) (pc + 8),
+ *(GLsizei *) (pc + 12),
+ *(GLsizei *) (pc + 16),
+ *(GLsizei *) (pc + 20),
+ *(GLint *) (pc + 24),
+ imageSize, (const GLvoid *) (pc + 32));
}
-void __glXDisp_CompressedTexSubImage1D(GLbyte * pc)
+void
+__glXDisp_CompressedTexSubImage1D(GLbyte * pc)
{
- const GLsizei imageSize = *(GLsizei *)(pc + 20);
+ PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D =
+ __glGetProcAddress("glCompressedTexSubImage1D");
+ const GLsizei imageSize = *(GLsizei *) (pc + 20);
- CALL_CompressedTexSubImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLsizei *)(pc + 12),
- *(GLenum *)(pc + 16),
- imageSize,
- (const GLvoid *)(pc + 24)
- ) );
+ CompressedTexSubImage1D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLsizei *) (pc + 12),
+ *(GLenum *) (pc + 16),
+ imageSize, (const GLvoid *) (pc + 24));
}
-void __glXDisp_CompressedTexSubImage2D(GLbyte * pc)
+void
+__glXDisp_CompressedTexSubImage2D(GLbyte * pc)
{
- const GLsizei imageSize = *(GLsizei *)(pc + 28);
+ PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D =
+ __glGetProcAddress("glCompressedTexSubImage2D");
+ const GLsizei imageSize = *(GLsizei *) (pc + 28);
- CALL_CompressedTexSubImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16),
- *(GLsizei *)(pc + 20),
- *(GLenum *)(pc + 24),
- imageSize,
- (const GLvoid *)(pc + 32)
- ) );
+ CompressedTexSubImage2D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLsizei *) (pc + 16),
+ *(GLsizei *) (pc + 20),
+ *(GLenum *) (pc + 24),
+ imageSize, (const GLvoid *) (pc + 32));
}
-void __glXDisp_CompressedTexSubImage3D(GLbyte * pc)
+void
+__glXDisp_CompressedTexSubImage3D(GLbyte * pc)
{
- const GLsizei imageSize = *(GLsizei *)(pc + 36);
+ PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D =
+ __glGetProcAddress("glCompressedTexSubImage3D");
+ const GLsizei imageSize = *(GLsizei *) (pc + 36);
- CALL_CompressedTexSubImage3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLsizei *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLenum *)(pc + 32),
- imageSize,
- (const GLvoid *)(pc + 40)
- ) );
+ CompressedTexSubImage3D(*(GLenum *) (pc + 0),
+ *(GLint *) (pc + 4),
+ *(GLint *) (pc + 8),
+ *(GLint *) (pc + 12),
+ *(GLint *) (pc + 16),
+ *(GLsizei *) (pc + 20),
+ *(GLsizei *) (pc + 24),
+ *(GLsizei *) (pc + 28),
+ *(GLenum *) (pc + 32),
+ imageSize, (const GLvoid *) (pc + 40));
}
-void __glXDisp_SampleCoverage(GLbyte * pc)
+void
+__glXDisp_SampleCoverage(GLbyte * pc)
{
- CALL_SampleCoverage( GET_DISPATCH(), (
- *(GLclampf *)(pc + 0),
- *(GLboolean *)(pc + 4)
- ) );
+ PFNGLSAMPLECOVERAGEPROC SampleCoverage =
+ __glGetProcAddress("glSampleCoverage");
+ SampleCoverage(*(GLclampf *) (pc + 0), *(GLboolean *) (pc + 4));
}
-void __glXDisp_BlendFuncSeparate(GLbyte * pc)
+void
+__glXDisp_BlendFuncSeparate(GLbyte * pc)
{
- CALL_BlendFuncSeparate( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLenum *)(pc + 12)
- ) );
+ PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate =
+ __glGetProcAddress("glBlendFuncSeparate");
+ BlendFuncSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8), *(GLenum *) (pc + 12));
}
-void __glXDisp_FogCoorddv(GLbyte * pc)
+void
+__glXDisp_FogCoorddv(GLbyte * pc)
{
+ PFNGLFOGCOORDDVPROC FogCoorddv = __glGetProcAddress("glFogCoorddv");
+
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_FogCoorddv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ FogCoorddv((const GLdouble *) (pc + 0));
}
-void __glXDisp_PointParameterf(GLbyte * pc)
+void
+__glXDisp_PointParameterf(GLbyte * pc)
{
- CALL_PointParameterf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
+ PFNGLPOINTPARAMETERFPROC PointParameterf =
+ __glGetProcAddress("glPointParameterf");
+ PointParameterf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4));
}
-void __glXDisp_PointParameterfv(GLbyte * pc)
+void
+__glXDisp_PointParameterfv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLfloat * params;
+ PFNGLPOINTPARAMETERFVPROC PointParameterfv =
+ __glGetProcAddress("glPointParameterfv");
+ const GLenum pname = *(GLenum *) (pc + 0);
+ const GLfloat *params;
params = (const GLfloat *) (pc + 4);
- CALL_PointParameterfv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ PointParameterfv(pname, params);
}
-void __glXDisp_PointParameteri(GLbyte * pc)
+void
+__glXDisp_PointParameteri(GLbyte * pc)
{
- CALL_PointParameteri( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
+ PFNGLPOINTPARAMETERIPROC PointParameteri =
+ __glGetProcAddress("glPointParameteri");
+ PointParameteri(*(GLenum *) (pc + 0), *(GLint *) (pc + 4));
}
-void __glXDisp_PointParameteriv(GLbyte * pc)
+void
+__glXDisp_PointParameteriv(GLbyte * pc)
{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLint * params;
+ PFNGLPOINTPARAMETERIVPROC PointParameteriv =
+ __glGetProcAddress("glPointParameteriv");
+ const GLenum pname = *(GLenum *) (pc + 0);
+ const GLint *params;
params = (const GLint *) (pc + 4);
- CALL_PointParameteriv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ PointParameteriv(pname, params);
}
-void __glXDisp_SecondaryColor3bv(GLbyte * pc)
+void
+__glXDisp_SecondaryColor3bv(GLbyte * pc)
{
- CALL_SecondaryColor3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
+ PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv =
+ __glGetProcAddress("glSecondaryColor3bv");
+ SecondaryColor3bv((const GLbyte *) (pc + 0));
}
-void __glXDisp_SecondaryColor3dv(GLbyte * pc)
+void
+__glXDisp_SecondaryColor3dv(GLbyte * pc)
{
+ PFNGLSECONDARYCOLOR3DVPROC SecondaryColor3dv =
+ __glGetProcAddress("glSecondaryColor3dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_SecondaryColor3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
+ SecondaryColor3dv((const GLdouble *) (pc + 0));
}
-void __glXDisp_SecondaryColor3iv(GLbyte * pc)
+void
+__glXDisp_SecondaryColor3iv(GLbyte * pc)
{
- CALL_SecondaryColor3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
+ PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv =
+ __glGetProcAddress("glSecondaryColor3iv");
+ SecondaryColor3iv((const GLint *) (pc + 0));
}
-void __glXDisp_SecondaryColor3sv(GLbyte * pc)
+void
+__glXDisp_SecondaryColor3sv(GLbyte * pc)
{
- CALL_SecondaryColor3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
+ PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv =
+ __glGetProcAddress("glSecondaryColor3sv");
+ SecondaryColor3sv((const GLshort *) (pc + 0));
}
-void __glXDisp_SecondaryColor3ubv(GLbyte * pc)
+void
+__glXDisp_SecondaryColor3ubv(GLbyte * pc)
{
- CALL_SecondaryColor3ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
+ PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv =
+ __glGetProcAddress("glSecondaryColor3ubv");
+ SecondaryColor3ubv((const GLubyte *) (pc + 0));
}
-void __glXDisp_SecondaryColor3uiv(GLbyte * pc)
+void
+__glXDisp_SecondaryColor3uiv(GLbyte * pc)
{
- CALL_SecondaryColor3uiv( GET_DISPATCH(), (
- (const GLuint *)(pc + 0)
- ) );
+ PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv =
+ __glGetProcAddress("glSecondaryColor3uiv");
+ SecondaryColor3uiv((const GLuint *) (pc + 0));
}
-void __glXDisp_SecondaryColor3usv(GLbyte * pc)
+void
+__glXDisp_SecondaryColor3usv(GLbyte * pc)
{
- CALL_SecondaryColor3usv( GET_DISPATCH(), (
- (const GLushort *)(pc + 0)
- ) );
+ PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv =
+ __glGetProcAddress("glSecondaryColor3usv");
+ SecondaryColor3usv((const GLushort *) (pc + 0));
}
-void __glXDisp_WindowPos3fv(GLbyte * pc)
+void
+__glXDisp_WindowPos3fv(GLbyte * pc)
{
- CALL_WindowPos3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
+ PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv");
+
+ WindowPos3fv((const GLfloat *) (pc + 0));
}
-void __glXDisp_BeginQuery(GLbyte * pc)
+void
+__glXDisp_BeginQuery(GLbyte * pc)
{
- CALL_BeginQuery( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
+ PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery");
+
+ BeginQuery(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
}
-int __glXDisp_DeleteQueries(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_DeleteQueries(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLDELETEQUERIESPROC DeleteQueries =
+ __glGetProcAddress("glDeleteQueries");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
- CALL_DeleteQueries( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
+ DeleteQueries(n, (const GLuint *) (pc + 4));
error = Success;
}
return error;
}
-void __glXDisp_EndQuery(GLbyte * pc)
+void
+__glXDisp_EndQuery(GLbyte * pc)
{
- CALL_EndQuery( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery");
+
+ EndQuery(*(GLenum *) (pc + 0));
}
-int __glXDisp_GenQueries(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GenQueries(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLGENQUERIESPROC GenQueries = __glGetProcAddress("glGenQueries");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
GLuint answerBuffer[200];
- GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenQueries( GET_DISPATCH(), (
- n,
- ids
- ) );
+ GLuint *ids =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ GenQueries(n, ids);
__glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -4273,28 +3903,30 @@ int __glXDisp_GenQueries(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetQueryObjectiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetQueryObjectiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv =
+ __glGetProcAddress("glGetQueryObjectiv");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetQueryObjectiv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetQueryObjectiv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
+ GetQueryObjectiv(*(GLuint *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -4302,28 +3934,30 @@ int __glXDisp_GetQueryObjectiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetQueryObjectuiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetQueryObjectuiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv =
+ __glGetProcAddress("glGetQueryObjectuiv");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetQueryObjectuiv_size(pname);
GLuint answerBuffer[200];
- GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLuint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetQueryObjectuiv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
+ GetQueryObjectuiv(*(GLuint *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -4331,28 +3965,29 @@ int __glXDisp_GetQueryObjectuiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetQueryiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetQueryiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLGETQUERYIVPROC GetQueryiv = __glGetProcAddress("glGetQueryiv");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetQueryiv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetQueryiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ GetQueryiv(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -4360,362 +3995,277 @@ int __glXDisp_GetQueryiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_IsQuery(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_IsQuery(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLISQUERYPROC IsQuery = __glGetProcAddress("glIsQuery");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsQuery( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
- __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_BlendEquationSeparate(GLbyte * pc)
-{
- CALL_BlendEquationSeparate( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
-}
-
-void __glXDisp_DrawBuffers(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 0);
-
- CALL_DrawBuffers( GET_DISPATCH(), (
- n,
- (const GLenum *)(pc + 4)
- ) );
-}
-
-int __glXDisp_GetVertexAttribdv(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetVertexAttribdv_size(pname);
- GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribdv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
+ retval = IsQuery(*(GLuint *) (pc + 0));
+ __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
return error;
}
-int __glXDisp_GetVertexAttribfv(__GLXclientState *cl, GLbyte *pc)
+void
+__glXDisp_BlendEquationSeparate(GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetVertexAttribfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribfv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
+ PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate =
+ __glGetProcAddress("glBlendEquationSeparate");
+ BlendEquationSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
}
-int __glXDisp_GetVertexAttribiv(__GLXclientState *cl, GLbyte *pc)
+void
+__glXDisp_DrawBuffers(GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetVertexAttribiv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribiv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
+ PFNGLDRAWBUFFERSPROC DrawBuffers = __glGetProcAddress("glDrawBuffers");
+ const GLsizei n = *(GLsizei *) (pc + 0);
- return error;
+ DrawBuffers(n, (const GLenum *) (pc + 4));
}
-void __glXDisp_VertexAttrib1dv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib1dv(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv =
+ __glGetProcAddress("glVertexAttrib1dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 12);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 12);
pc -= 4;
}
#endif
- CALL_VertexAttrib1dv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLdouble *)(pc + 4)
- ) );
+ VertexAttrib1dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
}
-void __glXDisp_VertexAttrib1sv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib1sv(GLbyte * pc)
{
- CALL_VertexAttrib1sv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv =
+ __glGetProcAddress("glVertexAttrib1sv");
+ VertexAttrib1sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib2dv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib2dv(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv =
+ __glGetProcAddress("glVertexAttrib2dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 20);
pc -= 4;
}
#endif
- CALL_VertexAttrib2dv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLdouble *)(pc + 4)
- ) );
+ VertexAttrib2dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
}
-void __glXDisp_VertexAttrib2sv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib2sv(GLbyte * pc)
{
- CALL_VertexAttrib2sv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv =
+ __glGetProcAddress("glVertexAttrib2sv");
+ VertexAttrib2sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib3dv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib3dv(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv =
+ __glGetProcAddress("glVertexAttrib3dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 28);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 28);
pc -= 4;
}
#endif
- CALL_VertexAttrib3dv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLdouble *)(pc + 4)
- ) );
+ VertexAttrib3dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
}
-void __glXDisp_VertexAttrib3sv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib3sv(GLbyte * pc)
{
- CALL_VertexAttrib3sv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv =
+ __glGetProcAddress("glVertexAttrib3sv");
+ VertexAttrib3sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib4Nbv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4Nbv(GLbyte * pc)
{
- CALL_VertexAttrib4Nbv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLbyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv =
+ __glGetProcAddress("glVertexAttrib4Nbv");
+ VertexAttrib4Nbv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4));
}
-void __glXDisp_VertexAttrib4Niv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4Niv(GLbyte * pc)
{
- CALL_VertexAttrib4Niv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv =
+ __glGetProcAddress("glVertexAttrib4Niv");
+ VertexAttrib4Niv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4));
}
-void __glXDisp_VertexAttrib4Nsv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4Nsv(GLbyte * pc)
{
- CALL_VertexAttrib4Nsv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv =
+ __glGetProcAddress("glVertexAttrib4Nsv");
+ VertexAttrib4Nsv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib4Nubv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4Nubv(GLbyte * pc)
{
- CALL_VertexAttrib4Nubv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLubyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv =
+ __glGetProcAddress("glVertexAttrib4Nubv");
+ VertexAttrib4Nubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
}
-void __glXDisp_VertexAttrib4Nuiv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4Nuiv(GLbyte * pc)
{
- CALL_VertexAttrib4Nuiv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLuint *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv =
+ __glGetProcAddress("glVertexAttrib4Nuiv");
+ VertexAttrib4Nuiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4));
}
-void __glXDisp_VertexAttrib4Nusv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4Nusv(GLbyte * pc)
{
- CALL_VertexAttrib4Nusv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLushort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv =
+ __glGetProcAddress("glVertexAttrib4Nusv");
+ VertexAttrib4Nusv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4));
}
-void __glXDisp_VertexAttrib4bv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4bv(GLbyte * pc)
{
- CALL_VertexAttrib4bv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLbyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv =
+ __glGetProcAddress("glVertexAttrib4bv");
+ VertexAttrib4bv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4));
}
-void __glXDisp_VertexAttrib4dv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4dv(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv =
+ __glGetProcAddress("glVertexAttrib4dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 36);
pc -= 4;
}
#endif
- CALL_VertexAttrib4dv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLdouble *)(pc + 4)
- ) );
+ VertexAttrib4dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
}
-void __glXDisp_VertexAttrib4iv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4iv(GLbyte * pc)
{
- CALL_VertexAttrib4iv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv =
+ __glGetProcAddress("glVertexAttrib4iv");
+ VertexAttrib4iv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4));
}
-void __glXDisp_VertexAttrib4sv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4sv(GLbyte * pc)
{
- CALL_VertexAttrib4sv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv =
+ __glGetProcAddress("glVertexAttrib4sv");
+ VertexAttrib4sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib4ubv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4ubv(GLbyte * pc)
{
- CALL_VertexAttrib4ubv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLubyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv =
+ __glGetProcAddress("glVertexAttrib4ubv");
+ VertexAttrib4ubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
}
-void __glXDisp_VertexAttrib4uiv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4uiv(GLbyte * pc)
{
- CALL_VertexAttrib4uiv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLuint *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv =
+ __glGetProcAddress("glVertexAttrib4uiv");
+ VertexAttrib4uiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4));
}
-void __glXDisp_VertexAttrib4usv(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4usv(GLbyte * pc)
{
- CALL_VertexAttrib4usv( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLushort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv =
+ __glGetProcAddress("glVertexAttrib4usv");
+ VertexAttrib4usv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4));
}
-void __glXDisp_ClampColor(GLbyte * pc)
+void
+__glXDisp_ClampColor(GLbyte * pc)
{
- CALL_ClampColor( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
+ PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor");
+
+ ClampColor(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4));
}
-void __glXDisp_BindProgramARB(GLbyte * pc)
+void
+__glXDisp_BindProgramARB(GLbyte * pc)
{
- CALL_BindProgramARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
+ PFNGLBINDPROGRAMARBPROC BindProgramARB =
+ __glGetProcAddress("glBindProgramARB");
+ BindProgramARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
}
-int __glXDisp_DeleteProgramsARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_DeleteProgramsARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLDELETEPROGRAMSARBPROC DeleteProgramsARB =
+ __glGetProcAddress("glDeleteProgramsARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
- CALL_DeleteProgramsARB( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
+ DeleteProgramsARB(n, (const GLuint *) (pc + 4));
error = Success;
}
return error;
}
-int __glXDisp_GenProgramsARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GenProgramsARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGENPROGRAMSARBPROC GenProgramsARB =
+ __glGetProcAddress("glGenProgramsARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
GLuint answerBuffer[200];
- GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenProgramsARB( GET_DISPATCH(), (
- n,
- programs
- ) );
+ GLuint *programs =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ GenProgramsARB(n, programs);
__glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -4723,20 +4273,21 @@ int __glXDisp_GenProgramsARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetProgramEnvParameterdvARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMENVPARAMETERDVARBPROC GetProgramEnvParameterdvARB =
+ __glGetProcAddress("glGetProgramEnvParameterdvARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLdouble params[4];
- CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- params
- ) );
+
+ GetProgramEnvParameterdvARB(*(GLenum *) (pc + 0),
+ *(GLuint *) (pc + 4), params);
__glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
error = Success;
}
@@ -4744,20 +4295,21 @@ int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetProgramEnvParameterfvARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMENVPARAMETERFVARBPROC GetProgramEnvParameterfvARB =
+ __glGetProcAddress("glGetProgramEnvParameterfvARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLfloat params[4];
- CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- params
- ) );
+
+ GetProgramEnvParameterfvARB(*(GLenum *) (pc + 0),
+ *(GLuint *) (pc + 4), params);
__glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
error = Success;
}
@@ -4765,20 +4317,21 @@ int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetProgramLocalParameterdvARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC GetProgramLocalParameterdvARB =
+ __glGetProcAddress("glGetProgramLocalParameterdvARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLdouble params[4];
- CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- params
- ) );
+
+ GetProgramLocalParameterdvARB(*(GLenum *) (pc + 0),
+ *(GLuint *) (pc + 4), params);
__glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
error = Success;
}
@@ -4786,20 +4339,21 @@ int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetProgramLocalParameterfvARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC GetProgramLocalParameterfvARB =
+ __glGetProcAddress("glGetProgramLocalParameterfvARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLfloat params[4];
- CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- params
- ) );
+
+ GetProgramLocalParameterfvARB(*(GLenum *) (pc + 0),
+ *(GLuint *) (pc + 4), params);
__glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
error = Success;
}
@@ -4807,28 +4361,30 @@ int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetProgramivARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMIVARBPROC GetProgramivARB =
+ __glGetProcAddress("glGetProgramivARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
+ if (cx != NULL) {
+ const GLenum pname = *(GLenum *) (pc + 4);
const GLuint compsize = __glGetProgramivARB_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetProgramivARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
+ GetProgramivARB(*(GLenum *) (pc + 0), pname, params);
__glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -4836,18 +4392,19 @@ int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_IsProgramARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_IsProgramARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLISPROGRAMARBPROC IsProgramARB = __glGetProcAddress("glIsProgramARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsProgramARB( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+
+ retval = IsProgramARB(*(GLuint *) (pc + 0));
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -4855,144 +4412,143 @@ int __glXDisp_IsProgramARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc)
+void
+__glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc)
{
+ PFNGLPROGRAMENVPARAMETER4DVARBPROC ProgramEnvParameter4dvARB =
+ __glGetProcAddress("glProgramEnvParameter4dvARB");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 40);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 40);
pc -= 4;
}
#endif
- CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- (const GLdouble *)(pc + 8)
- ) );
+ ProgramEnvParameter4dvARB(*(GLenum *) (pc + 0),
+ *(GLuint *) (pc + 4),
+ (const GLdouble *) (pc + 8));
}
-void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc)
+void
+__glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc)
{
- CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- (const GLfloat *)(pc + 8)
- ) );
+ PFNGLPROGRAMENVPARAMETER4FVARBPROC ProgramEnvParameter4fvARB =
+ __glGetProcAddress("glProgramEnvParameter4fvARB");
+ ProgramEnvParameter4fvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4),
+ (const GLfloat *) (pc + 8));
}
-void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc)
+void
+__glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc)
{
+ PFNGLPROGRAMLOCALPARAMETER4DVARBPROC ProgramLocalParameter4dvARB =
+ __glGetProcAddress("glProgramLocalParameter4dvARB");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 40);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 40);
pc -= 4;
}
#endif
- CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- (const GLdouble *)(pc + 8)
- ) );
+ ProgramLocalParameter4dvARB(*(GLenum *) (pc + 0),
+ *(GLuint *) (pc + 4),
+ (const GLdouble *) (pc + 8));
}
-void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc)
+void
+__glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc)
{
- CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- (const GLfloat *)(pc + 8)
- ) );
+ PFNGLPROGRAMLOCALPARAMETER4FVARBPROC ProgramLocalParameter4fvARB =
+ __glGetProcAddress("glProgramLocalParameter4fvARB");
+ ProgramLocalParameter4fvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4),
+ (const GLfloat *) (pc + 8));
}
-void __glXDisp_ProgramStringARB(GLbyte * pc)
+void
+__glXDisp_ProgramStringARB(GLbyte * pc)
{
- const GLsizei len = *(GLsizei *)(pc + 8);
+ PFNGLPROGRAMSTRINGARBPROC ProgramStringARB =
+ __glGetProcAddress("glProgramStringARB");
+ const GLsizei len = *(GLsizei *) (pc + 8);
- CALL_ProgramStringARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- len,
- (const GLvoid *)(pc + 12)
- ) );
+ ProgramStringARB(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), len, (const GLvoid *) (pc + 12));
}
-void __glXDisp_VertexAttrib1fvARB(GLbyte * pc)
+void
+__glXDisp_VertexAttrib1fvARB(GLbyte * pc)
{
- CALL_VertexAttrib1fvARB( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB =
+ __glGetProcAddress("glVertexAttrib1fvARB");
+ VertexAttrib1fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_VertexAttrib2fvARB(GLbyte * pc)
+void
+__glXDisp_VertexAttrib2fvARB(GLbyte * pc)
{
- CALL_VertexAttrib2fvARB( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB =
+ __glGetProcAddress("glVertexAttrib2fvARB");
+ VertexAttrib2fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_VertexAttrib3fvARB(GLbyte * pc)
+void
+__glXDisp_VertexAttrib3fvARB(GLbyte * pc)
{
- CALL_VertexAttrib3fvARB( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB =
+ __glGetProcAddress("glVertexAttrib3fvARB");
+ VertexAttrib3fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_VertexAttrib4fvARB(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4fvARB(GLbyte * pc)
{
- CALL_VertexAttrib4fvARB( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB =
+ __glGetProcAddress("glVertexAttrib4fvARB");
+ VertexAttrib4fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_BindFramebuffer(GLbyte * pc)
+void
+__glXDisp_BindFramebuffer(GLbyte * pc)
{
- CALL_BindFramebuffer( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
+ PFNGLBINDFRAMEBUFFERPROC BindFramebuffer =
+ __glGetProcAddress("glBindFramebuffer");
+ BindFramebuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
}
-void __glXDisp_BindRenderbuffer(GLbyte * pc)
+void
+__glXDisp_BindRenderbuffer(GLbyte * pc)
{
- CALL_BindRenderbuffer( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
+ PFNGLBINDRENDERBUFFERPROC BindRenderbuffer =
+ __glGetProcAddress("glBindRenderbuffer");
+ BindRenderbuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4));
}
-void __glXDisp_BlitFramebuffer(GLbyte * pc)
+void
+__glXDisp_BlitFramebuffer(GLbyte * pc)
{
- CALL_BlitFramebuffer( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLint *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLbitfield *)(pc + 32),
- *(GLenum *)(pc + 36)
- ) );
+ PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer =
+ __glGetProcAddress("glBlitFramebuffer");
+ BlitFramebuffer(*(GLint *) (pc + 0), *(GLint *) (pc + 4),
+ *(GLint *) (pc + 8), *(GLint *) (pc + 12),
+ *(GLint *) (pc + 16), *(GLint *) (pc + 20),
+ *(GLint *) (pc + 24), *(GLint *) (pc + 28),
+ *(GLbitfield *) (pc + 32), *(GLenum *) (pc + 36));
}
-int __glXDisp_CheckFramebufferStatus(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_CheckFramebufferStatus(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus =
+ __glGetProcAddress("glCheckFramebufferStatus");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLenum retval;
- retval = CALL_CheckFramebufferStatus( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+
+ retval = CheckFramebufferStatus(*(GLenum *) (pc + 0));
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -5000,97 +4556,93 @@ int __glXDisp_CheckFramebufferStatus(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_DeleteFramebuffers(GLbyte * pc)
+void
+__glXDisp_DeleteFramebuffers(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 0);
+ PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers =
+ __glGetProcAddress("glDeleteFramebuffers");
+ const GLsizei n = *(GLsizei *) (pc + 0);
- CALL_DeleteFramebuffers( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
+ DeleteFramebuffers(n, (const GLuint *) (pc + 4));
}
-void __glXDisp_DeleteRenderbuffers(GLbyte * pc)
+void
+__glXDisp_DeleteRenderbuffers(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 0);
+ PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers =
+ __glGetProcAddress("glDeleteRenderbuffers");
+ const GLsizei n = *(GLsizei *) (pc + 0);
- CALL_DeleteRenderbuffers( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
+ DeleteRenderbuffers(n, (const GLuint *) (pc + 4));
}
-void __glXDisp_FramebufferRenderbuffer(GLbyte * pc)
+void
+__glXDisp_FramebufferRenderbuffer(GLbyte * pc)
{
- CALL_FramebufferRenderbuffer( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLuint *)(pc + 12)
- ) );
+ PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer =
+ __glGetProcAddress("glFramebufferRenderbuffer");
+ FramebufferRenderbuffer(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8), *(GLuint *) (pc + 12));
}
-void __glXDisp_FramebufferTexture1D(GLbyte * pc)
+void
+__glXDisp_FramebufferTexture1D(GLbyte * pc)
{
- CALL_FramebufferTexture1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLuint *)(pc + 12),
- *(GLint *)(pc + 16)
- ) );
+ PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D =
+ __glGetProcAddress("glFramebufferTexture1D");
+ FramebufferTexture1D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8), *(GLuint *) (pc + 12),
+ *(GLint *) (pc + 16));
}
-void __glXDisp_FramebufferTexture2D(GLbyte * pc)
+void
+__glXDisp_FramebufferTexture2D(GLbyte * pc)
{
- CALL_FramebufferTexture2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLuint *)(pc + 12),
- *(GLint *)(pc + 16)
- ) );
+ PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D =
+ __glGetProcAddress("glFramebufferTexture2D");
+ FramebufferTexture2D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8), *(GLuint *) (pc + 12),
+ *(GLint *) (pc + 16));
}
-void __glXDisp_FramebufferTexture3D(GLbyte * pc)
+void
+__glXDisp_FramebufferTexture3D(GLbyte * pc)
{
- CALL_FramebufferTexture3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLuint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLint *)(pc + 20)
- ) );
+ PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D =
+ __glGetProcAddress("glFramebufferTexture3D");
+ FramebufferTexture3D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8), *(GLuint *) (pc + 12),
+ *(GLint *) (pc + 16), *(GLint *) (pc + 20));
}
-void __glXDisp_FramebufferTextureLayer(GLbyte * pc)
+void
+__glXDisp_FramebufferTextureLayer(GLbyte * pc)
{
- CALL_FramebufferTextureLayer( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLuint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16)
- ) );
+ PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer =
+ __glGetProcAddress("glFramebufferTextureLayer");
+ FramebufferTextureLayer(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
+ *(GLuint *) (pc + 8), *(GLint *) (pc + 12),
+ *(GLint *) (pc + 16));
}
-int __glXDisp_GenFramebuffers(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GenFramebuffers(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGENFRAMEBUFFERSPROC GenFramebuffers =
+ __glGetProcAddress("glGenFramebuffers");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
GLuint answerBuffer[200];
- GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenFramebuffers( GET_DISPATCH(), (
- n,
- framebuffers
- ) );
+ GLuint *framebuffers =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ GenFramebuffers(n, framebuffers);
__glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -5098,22 +4650,24 @@ int __glXDisp_GenFramebuffers(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_GenRenderbuffers(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GenRenderbuffers(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGENRENDERBUFFERSPROC GenRenderbuffers =
+ __glGetProcAddress("glGenRenderbuffers");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
+ if (cx != NULL) {
+ const GLsizei n = *(GLsizei *) (pc + 0);
GLuint answerBuffer[200];
- GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenRenderbuffers( GET_DISPATCH(), (
- n,
- renderbuffers
- ) );
+ GLuint *renderbuffers =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ GenRenderbuffers(n, renderbuffers);
__glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -5121,28 +4675,32 @@ int __glXDisp_GenRenderbuffers(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_GenerateMipmap(GLbyte * pc)
+void
+__glXDisp_GenerateMipmap(GLbyte * pc)
{
- CALL_GenerateMipmap( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
+ PFNGLGENERATEMIPMAPPROC GenerateMipmap =
+ __glGetProcAddress("glGenerateMipmap");
+ GenerateMipmap(*(GLenum *) (pc + 0));
}
-int __glXDisp_GetFramebufferAttachmentParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetFramebufferAttachmentParameteriv(__GLXclientState * cl,
+ GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC
+ GetFramebufferAttachmentParameteriv =
+ __glGetProcAddress("glGetFramebufferAttachmentParameteriv");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLint params[1];
- CALL_GetFramebufferAttachmentParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLenum *)(pc + 8),
- params
- ) );
+
+ GetFramebufferAttachmentParameteriv(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4),
+ *(GLenum *) (pc + 8), params);
__glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
error = Success;
}
@@ -5150,20 +4708,21 @@ int __glXDisp_GetFramebufferAttachmentParameteriv(__GLXclientState *cl, GLbyte * return error;
}
-int __glXDisp_GetRenderbufferParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_GetRenderbufferParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv =
+ __glGetProcAddress("glGetRenderbufferParameteriv");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLint params[1];
- CALL_GetRenderbufferParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- params
- ) );
+
+ GetRenderbufferParameteriv(*(GLenum *) (pc + 0),
+ *(GLenum *) (pc + 4), params);
__glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
error = Success;
}
@@ -5171,37 +4730,20 @@ int __glXDisp_GetRenderbufferParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDisp_IsFramebuffer(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_IsFramebuffer(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLISFRAMEBUFFERPROC IsFramebuffer =
+ __glGetProcAddress("glIsFramebuffer");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsFramebuffer( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
- __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
- return error;
-}
-
-int __glXDisp_IsRenderbuffer(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLboolean retval;
- retval = CALL_IsRenderbuffer( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
+ retval = IsFramebuffer(*(GLuint *) (pc + 0));
__glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -5209,743 +4751,364 @@ int __glXDisp_IsRenderbuffer(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDisp_RenderbufferStorage(GLbyte * pc)
-{
- CALL_RenderbufferStorage( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLsizei *)(pc + 8),
- *(GLsizei *)(pc + 12)
- ) );
-}
-
-void __glXDisp_RenderbufferStorageMultisample(GLbyte * pc)
-{
- CALL_RenderbufferStorageMultisample( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLsizei *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLsizei *)(pc + 12),
- *(GLsizei *)(pc + 16)
- ) );
-}
-
-void __glXDisp_SampleMaskSGIS(GLbyte * pc)
-{
- CALL_SampleMaskSGIS( GET_DISPATCH(), (
- *(GLclampf *)(pc + 0),
- *(GLboolean *)(pc + 4)
- ) );
-}
-
-void __glXDisp_SamplePatternSGIS(GLbyte * pc)
-{
- CALL_SamplePatternSGIS( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3fvEXT( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_FogCoordfvEXT(GLbyte * pc)
-{
- CALL_FogCoordfvEXT( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_IsRenderbuffer(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLISRENDERBUFFERPROC IsRenderbuffer =
+ __glGetProcAddress("glIsRenderbuffer");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = *(GLsizei *)(pc + 0);
-
+ if (cx != NULL) {
GLboolean retval;
- GLboolean answerBuffer[200];
- GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
- retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4),
- residences
- ) );
- __glXSendReply(cl->client, residences, n, 1, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_ExecuteProgramNV(GLbyte * pc)
-{
- CALL_ExecuteProgramNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-int __glXDisp_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLdouble params[4];
- CALL_GetProgramParameterdvNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- *(GLenum *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLfloat params[4];
- CALL_GetProgramParameterfvNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- *(GLenum *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetProgramivNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetProgramivNV_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetProgramivNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLint params[1];
- CALL_GetTrackMatrixivNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- *(GLenum *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetVertexAttribdvNV_size(pname);
- GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribdvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetVertexAttribfvNV_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribfvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLuint compsize = __glGetVertexAttribivNV_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribivNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
+ retval = IsRenderbuffer(*(GLuint *) (pc + 0));
+ __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
return error;
}
-void __glXDisp_LoadProgramNV(GLbyte * pc)
+void
+__glXDisp_RenderbufferStorage(GLbyte * pc)
{
- const GLsizei len = *(GLsizei *)(pc + 8);
-
- CALL_LoadProgramNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- len,
- (const GLubyte *)(pc + 12)
- ) );
+ PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage =
+ __glGetProcAddress("glRenderbufferStorage");
+ RenderbufferStorage(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
+ *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12));
}
-void __glXDisp_ProgramParameters4dvNV(GLbyte * pc)
+void
+__glXDisp_RenderbufferStorageMultisample(GLbyte * pc)
{
- const GLsizei num = *(GLsizei *)(pc + 8);
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_ProgramParameters4dvNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- num,
- (const GLdouble *)(pc + 12)
- ) );
+ PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample =
+ __glGetProcAddress("glRenderbufferStorageMultisample");
+ RenderbufferStorageMultisample(*(GLenum *) (pc + 0), *(GLsizei *) (pc + 4),
+ *(GLenum *) (pc + 8), *(GLsizei *) (pc + 12),
+ *(GLsizei *) (pc + 16));
}
-void __glXDisp_ProgramParameters4fvNV(GLbyte * pc)
+void
+__glXDisp_SecondaryColor3fvEXT(GLbyte * pc)
{
- const GLsizei num = *(GLsizei *)(pc + 8);
-
- CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- num,
- (const GLfloat *)(pc + 12)
- ) );
+ PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT =
+ __glGetProcAddress("glSecondaryColor3fvEXT");
+ SecondaryColor3fvEXT((const GLfloat *) (pc + 0));
}
-void __glXDisp_RequestResidentProgramsNV(GLbyte * pc)
+void
+__glXDisp_FogCoordfvEXT(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 0);
-
- CALL_RequestResidentProgramsNV( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
+ PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT =
+ __glGetProcAddress("glFogCoordfvEXT");
+ FogCoordfvEXT((const GLfloat *) (pc + 0));
}
-void __glXDisp_TrackMatrixNV(GLbyte * pc)
-{
- CALL_TrackMatrixNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLenum *)(pc + 12)
- ) );
-}
-
-void __glXDisp_VertexAttrib1dvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib1dvNV(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB1DVNVPROC VertexAttrib1dvNV =
+ __glGetProcAddress("glVertexAttrib1dvNV");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 12);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 12);
pc -= 4;
}
#endif
- CALL_VertexAttrib1dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLdouble *)(pc + 4)
- ) );
+ VertexAttrib1dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
}
-void __glXDisp_VertexAttrib1fvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib1fvNV(GLbyte * pc)
{
- CALL_VertexAttrib1fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV =
+ __glGetProcAddress("glVertexAttrib1fvNV");
+ VertexAttrib1fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_VertexAttrib1svNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib1svNV(GLbyte * pc)
{
- CALL_VertexAttrib1svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV =
+ __glGetProcAddress("glVertexAttrib1svNV");
+ VertexAttrib1svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib2dvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib2dvNV(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB2DVNVPROC VertexAttrib2dvNV =
+ __glGetProcAddress("glVertexAttrib2dvNV");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 20);
pc -= 4;
}
#endif
- CALL_VertexAttrib2dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLdouble *)(pc + 4)
- ) );
+ VertexAttrib2dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
}
-void __glXDisp_VertexAttrib2fvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib2fvNV(GLbyte * pc)
{
- CALL_VertexAttrib2fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV =
+ __glGetProcAddress("glVertexAttrib2fvNV");
+ VertexAttrib2fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_VertexAttrib2svNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib2svNV(GLbyte * pc)
{
- CALL_VertexAttrib2svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV =
+ __glGetProcAddress("glVertexAttrib2svNV");
+ VertexAttrib2svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib3dvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib3dvNV(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB3DVNVPROC VertexAttrib3dvNV =
+ __glGetProcAddress("glVertexAttrib3dvNV");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 28);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 28);
pc -= 4;
}
#endif
- CALL_VertexAttrib3dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLdouble *)(pc + 4)
- ) );
+ VertexAttrib3dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
}
-void __glXDisp_VertexAttrib3fvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib3fvNV(GLbyte * pc)
{
- CALL_VertexAttrib3fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV =
+ __glGetProcAddress("glVertexAttrib3fvNV");
+ VertexAttrib3fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_VertexAttrib3svNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib3svNV(GLbyte * pc)
{
- CALL_VertexAttrib3svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV =
+ __glGetProcAddress("glVertexAttrib3svNV");
+ VertexAttrib3svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib4dvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4dvNV(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB4DVNVPROC VertexAttrib4dvNV =
+ __glGetProcAddress("glVertexAttrib4dvNV");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 36);
pc -= 4;
}
#endif
- CALL_VertexAttrib4dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLdouble *)(pc + 4)
- ) );
+ VertexAttrib4dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4));
}
-void __glXDisp_VertexAttrib4fvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4fvNV(GLbyte * pc)
{
- CALL_VertexAttrib4fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV =
+ __glGetProcAddress("glVertexAttrib4fvNV");
+ VertexAttrib4fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4));
}
-void __glXDisp_VertexAttrib4svNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4svNV(GLbyte * pc)
{
- CALL_VertexAttrib4svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV =
+ __glGetProcAddress("glVertexAttrib4svNV");
+ VertexAttrib4svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4));
}
-void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttrib4ubvNV(GLbyte * pc)
{
- CALL_VertexAttrib4ubvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- (const GLubyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV =
+ __glGetProcAddress("glVertexAttrib4ubvNV");
+ VertexAttrib4ubvNV(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4));
}
-void __glXDisp_VertexAttribs1dvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs1dvNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS1DVNVPROC VertexAttribs1dvNV =
+ __glGetProcAddress("glVertexAttribs1dvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- CALL_VertexAttribs1dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLdouble *)(pc + 8)
- ) );
+ VertexAttribs1dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8));
}
-void __glXDisp_VertexAttribs1fvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs1fvNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS1FVNVPROC VertexAttribs1fvNV =
+ __glGetProcAddress("glVertexAttribs1fvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- CALL_VertexAttribs1fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLfloat *)(pc + 8)
- ) );
+ VertexAttribs1fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8));
}
-void __glXDisp_VertexAttribs1svNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs1svNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS1SVNVPROC VertexAttribs1svNV =
+ __glGetProcAddress("glVertexAttribs1svNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- CALL_VertexAttribs1svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLshort *)(pc + 8)
- ) );
+ VertexAttribs1svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8));
}
-void __glXDisp_VertexAttribs2dvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs2dvNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS2DVNVPROC VertexAttribs2dvNV =
+ __glGetProcAddress("glVertexAttribs2dvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- CALL_VertexAttribs2dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLdouble *)(pc + 8)
- ) );
+ VertexAttribs2dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8));
}
-void __glXDisp_VertexAttribs2fvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs2fvNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS2FVNVPROC VertexAttribs2fvNV =
+ __glGetProcAddress("glVertexAttribs2fvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- CALL_VertexAttribs2fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLfloat *)(pc + 8)
- ) );
+ VertexAttribs2fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8));
}
-void __glXDisp_VertexAttribs2svNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs2svNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS2SVNVPROC VertexAttribs2svNV =
+ __glGetProcAddress("glVertexAttribs2svNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- CALL_VertexAttribs2svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLshort *)(pc + 8)
- ) );
+ VertexAttribs2svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8));
}
-void __glXDisp_VertexAttribs3dvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs3dvNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS3DVNVPROC VertexAttribs3dvNV =
+ __glGetProcAddress("glVertexAttribs3dvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- CALL_VertexAttribs3dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLdouble *)(pc + 8)
- ) );
+ VertexAttribs3dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8));
}
-void __glXDisp_VertexAttribs3fvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs3fvNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS3FVNVPROC VertexAttribs3fvNV =
+ __glGetProcAddress("glVertexAttribs3fvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- CALL_VertexAttribs3fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLfloat *)(pc + 8)
- ) );
+ VertexAttribs3fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8));
}
-void __glXDisp_VertexAttribs3svNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs3svNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS3SVNVPROC VertexAttribs3svNV =
+ __glGetProcAddress("glVertexAttribs3svNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- CALL_VertexAttribs3svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLshort *)(pc + 8)
- ) );
+ VertexAttribs3svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8));
}
-void __glXDisp_VertexAttribs4dvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs4dvNV(GLbyte * pc)
{
- const GLsizei n = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS4DVNVPROC VertexAttribs4dvNV =
+ __glGetProcAddress("glVertexAttribs4dvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- CALL_VertexAttribs4dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLdouble *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs4fvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs4fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs4svNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs4svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLshort *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs4ubvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLubyte *)(pc + 8)
- ) );
+ VertexAttribs4dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8));
}
-void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc)
+void
+__glXDisp_VertexAttribs4fvNV(GLbyte * pc)
{
- CALL_ActiveStencilFaceEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ PFNGLVERTEXATTRIBS4FVNVPROC VertexAttribs4fvNV =
+ __glGetProcAddress("glVertexAttribs4fvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei len = *(GLsizei *)(pc + 4);
-
- GLdouble params[4];
- CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- len,
- (const GLubyte *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
+ VertexAttribs4fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8));
}
-int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc)
+void
+__glXDisp_VertexAttribs4svNV(GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
+ PFNGLVERTEXATTRIBS4SVNVPROC VertexAttribs4svNV =
+ __glGetProcAddress("glVertexAttribs4svNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei len = *(GLsizei *)(pc + 4);
-
- GLfloat params[4];
- CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- len,
- (const GLubyte *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 4, 4, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc)
-{
- const GLsizei len = *(GLsizei *)(pc + 36);
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 44 + __GLX_PAD(len) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 32),
- len,
- (const GLubyte *)(pc + 40),
- (const GLdouble *)(pc + 0)
- ) );
+ VertexAttribs4svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8));
}
-void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc)
+void
+__glXDisp_VertexAttribs4ubvNV(GLbyte * pc)
{
- const GLsizei len = *(GLsizei *)(pc + 4);
+ PFNGLVERTEXATTRIBS4UBVNVPROC VertexAttribs4ubvNV =
+ __glGetProcAddress("glVertexAttribs4ubvNV");
+ const GLsizei n = *(GLsizei *) (pc + 4);
- CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- len,
- (const GLubyte *)(pc + 24),
- (const GLfloat *)(pc + 8)
- ) );
+ VertexAttribs4ubvNV(*(GLuint *) (pc + 0), n, (const GLubyte *) (pc + 8));
}
-void __glXDisp_BindFramebufferEXT(GLbyte * pc)
+void
+__glXDisp_ActiveStencilFaceEXT(GLbyte * pc)
{
- CALL_BindFramebufferEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
+ PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT =
+ __glGetProcAddress("glActiveStencilFaceEXT");
+ ActiveStencilFaceEXT(*(GLenum *) (pc + 0));
}
-
-void __glXDisp_BindRenderbufferEXT(GLbyte * pc)
-{
- CALL_BindRenderbufferEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
-}
-
diff --git a/xorg-server/glx/indirect_dispatch_swap.c b/xorg-server/glx/indirect_dispatch_swap.c index ee53910bf..d48fb131a 100644 --- a/xorg-server/glx/indirect_dispatch_swap.c +++ b/xorg-server/glx/indirect_dispatch_swap.c @@ -52,66 +52,91 @@ typedef struct { __GLX_PIXEL_3D_HDR;
} __GLXpixel3DHeader;
-extern GLboolean __glXErrorOccured( void );
-extern void __glXClearErrorOccured( void );
+extern GLboolean __glXErrorOccured(void);
+extern void __glXClearErrorOccured(void);
-static const unsigned dummy_answer[2] = {0, 0};
+static const unsigned dummy_answer[2] = { 0, 0 };
static GLsizei
-bswap_CARD32( const void * src )
+bswap_CARD32(const void *src)
{
- union { uint32_t dst; GLsizei ret; } x;
- x.dst = bswap_32( *(uint32_t *) src );
+ union {
+ uint32_t dst;
+ GLsizei ret;
+ } x;
+
+ x.dst = bswap_32(*(uint32_t *) src);
return x.ret;
}
static GLshort
-bswap_CARD16( const void * src )
+bswap_CARD16(const void *src)
{
- union { uint16_t dst; GLshort ret; } x;
- x.dst = bswap_16( *(uint16_t *) src );
+ union {
+ uint16_t dst;
+ GLshort ret;
+ } x;
+
+ x.dst = bswap_16(*(uint16_t *) src);
return x.ret;
}
static GLenum
-bswap_ENUM( const void * src )
+bswap_ENUM(const void *src)
{
- union { uint32_t dst; GLenum ret; } x;
- x.dst = bswap_32( *(uint32_t *) src );
+ union {
+ uint32_t dst;
+ GLenum ret;
+ } x;
+
+ x.dst = bswap_32(*(uint32_t *) src);
return x.ret;
}
static GLsync
-bswap_CARD64( const void * src )
+bswap_CARD64(const void *src)
{
- union { uint64_t dst; GLsync ret; } x;
- x.dst = bswap_64( *(uint64_t *) src );
+ union {
+ uint64_t dst;
+ GLsync ret;
+ } x;
+
+ x.dst = bswap_64(*(uint64_t *) src);
return x.ret;
}
static GLdouble
-bswap_FLOAT64( const void * src )
+bswap_FLOAT64(const void *src)
{
- union { uint64_t dst; GLdouble ret; } x;
- x.dst = bswap_64( *(uint64_t *) src );
+ union {
+ uint64_t dst;
+ GLdouble ret;
+ } x;
+
+ x.dst = bswap_64(*(uint64_t *) src);
return x.ret;
}
static GLfloat
-bswap_FLOAT32( const void * src )
+bswap_FLOAT32(const void *src)
{
- union { uint32_t dst; GLfloat ret; } x;
- x.dst = bswap_32( *(uint32_t *) src );
+ union {
+ uint32_t dst;
+ GLfloat ret;
+ } x;
+
+ x.dst = bswap_32(*(uint32_t *) src);
return x.ret;
}
static void *
-bswap_16_array( uint16_t * src, unsigned count )
+bswap_16_array(uint16_t * src, unsigned count)
{
- unsigned i;
+ unsigned i;
+
+ for (i = 0; i < count; i++) {
+ uint16_t temp = bswap_16(src[i]);
- for ( i = 0 ; i < count ; i++ ) {
- uint16_t temp = bswap_16( src[i] );
src[i] = temp;
}
@@ -119,12 +144,13 @@ bswap_16_array( uint16_t * src, unsigned count ) }
static void *
-bswap_32_array( uint32_t * src, unsigned count )
+bswap_32_array(uint32_t * src, unsigned count)
{
- unsigned i;
+ unsigned i;
+
+ for (i = 0; i < count; i++) {
+ uint32_t temp = bswap_32(src[i]);
- for ( i = 0 ; i < count ; i++ ) {
- uint32_t temp = bswap_32( src[i] );
src[i] = temp;
}
@@ -132,119 +158,121 @@ bswap_32_array( uint32_t * src, unsigned count ) }
static void *
-bswap_64_array( uint64_t * src, unsigned count )
+bswap_64_array(uint64_t * src, unsigned count)
{
- unsigned i;
+ unsigned i;
+
+ for (i = 0; i < count; i++) {
+ uint64_t temp = bswap_64(src[i]);
- for ( i = 0 ; i < count ; i++ ) {
- uint64_t temp = bswap_64( src[i] );
src[i] = temp;
}
return src;
}
-int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_NewList(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_NewList( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
+ if (cx != NULL) {
+ glNewList((GLuint) bswap_CARD32(pc + 0), (GLenum) bswap_ENUM(pc + 4));
error = Success;
}
return error;
}
-int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_EndList(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_EndList( GET_DISPATCH(), () );
+ if (cx != NULL) {
+ glEndList();
error = Success;
}
return error;
}
-void __glXDispSwap_CallList(GLbyte * pc)
+void
+__glXDispSwap_CallList(GLbyte * pc)
{
- CALL_CallList( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+ glCallList((GLuint) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_CallLists(GLbyte * pc)
+void
+__glXDispSwap_CallLists(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
- const GLenum type = (GLenum )bswap_ENUM ( pc + 4 );
- const GLvoid * lists;
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
+ const GLenum type = (GLenum) bswap_ENUM(pc + 4);
+ const GLvoid *lists;
- switch(type) {
+ switch (type) {
case GL_BYTE:
case GL_UNSIGNED_BYTE:
case GL_2_BYTES:
case GL_3_BYTES:
case GL_4_BYTES:
- lists = (const GLvoid *) (pc + 8); break;
+ lists = (const GLvoid *) (pc + 8);
+ break;
case GL_SHORT:
case GL_UNSIGNED_SHORT:
- lists = (const GLvoid *) bswap_16_array( (uint16_t *) (pc + 8), n ); break;
+ lists = (const GLvoid *) bswap_16_array((uint16_t *) (pc + 8), n);
+ break;
case GL_INT:
case GL_UNSIGNED_INT:
case GL_FLOAT:
- lists = (const GLvoid *) bswap_32_array( (uint32_t *) (pc + 8), n ); break;
+ lists = (const GLvoid *) bswap_32_array((uint32_t *) (pc + 8), n);
+ break;
default:
return;
}
- CALL_CallLists( GET_DISPATCH(), (
- n,
- type,
- lists
- ) );
+ glCallLists(n, type, lists);
}
-int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_DeleteLists(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_DeleteLists( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (GLsizei )bswap_CARD32 ( pc + 4 )
- ) );
+ if (cx != NULL) {
+ glDeleteLists((GLuint) bswap_CARD32(pc + 0),
+ (GLsizei) bswap_CARD32(pc + 4));
error = Success;
}
return error;
}
-int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GenLists(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLuint retval;
- retval = CALL_GenLists( GET_DISPATCH(), (
- (GLsizei )bswap_CARD32 ( pc + 0 )
- ) );
+
+ retval = glGenLists((GLsizei) bswap_CARD32(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -252,1648 +280,1469 @@ int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_ListBase(GLbyte * pc)
+void
+__glXDispSwap_ListBase(GLbyte * pc)
{
- CALL_ListBase( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+ glListBase((GLuint) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_Begin(GLbyte * pc)
+void
+__glXDispSwap_Begin(GLbyte * pc)
{
- CALL_Begin( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glBegin((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_Bitmap(GLbyte * pc)
+void
+__glXDispSwap_Bitmap(GLbyte * pc)
{
- const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLubyte *const bitmap = (const GLubyte *) ((pc + 44));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_Bitmap( GET_DISPATCH(), (
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLfloat )bswap_FLOAT32( pc + 28 ),
- (GLfloat )bswap_FLOAT32( pc + 32 ),
- (GLfloat )bswap_FLOAT32( pc + 36 ),
- (GLfloat )bswap_FLOAT32( pc + 40 ),
- bitmap
- ) );
+ glBitmap((GLsizei) bswap_CARD32(pc + 20),
+ (GLsizei) bswap_CARD32(pc + 24),
+ (GLfloat) bswap_FLOAT32(pc + 28),
+ (GLfloat) bswap_FLOAT32(pc + 32),
+ (GLfloat) bswap_FLOAT32(pc + 36),
+ (GLfloat) bswap_FLOAT32(pc + 40), bitmap);
}
-void __glXDispSwap_Color3bv(GLbyte * pc)
+void
+__glXDispSwap_Color3bv(GLbyte * pc)
{
- CALL_Color3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
+ glColor3bv((const GLbyte *) (pc + 0));
}
-void __glXDispSwap_Color3dv(GLbyte * pc)
+void
+__glXDispSwap_Color3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Color3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
+ glColor3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
}
-void __glXDispSwap_Color3fv(GLbyte * pc)
+void
+__glXDispSwap_Color3fv(GLbyte * pc)
{
- CALL_Color3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glColor3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_Color3iv(GLbyte * pc)
+void
+__glXDispSwap_Color3iv(GLbyte * pc)
{
- CALL_Color3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glColor3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_Color3sv(GLbyte * pc)
+void
+__glXDispSwap_Color3sv(GLbyte * pc)
{
- CALL_Color3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
+ glColor3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
}
-void __glXDispSwap_Color3ubv(GLbyte * pc)
+void
+__glXDispSwap_Color3ubv(GLbyte * pc)
{
- CALL_Color3ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
+ glColor3ubv((const GLubyte *) (pc + 0));
}
-void __glXDispSwap_Color3uiv(GLbyte * pc)
+void
+__glXDispSwap_Color3uiv(GLbyte * pc)
{
- CALL_Color3uiv( GET_DISPATCH(), (
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glColor3uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_Color3usv(GLbyte * pc)
+void
+__glXDispSwap_Color3usv(GLbyte * pc)
{
- CALL_Color3usv( GET_DISPATCH(), (
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
+ glColor3usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 3));
}
-void __glXDispSwap_Color4bv(GLbyte * pc)
+void
+__glXDispSwap_Color4bv(GLbyte * pc)
{
- CALL_Color4bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
+ glColor4bv((const GLbyte *) (pc + 0));
}
-void __glXDispSwap_Color4dv(GLbyte * pc)
+void
+__glXDispSwap_Color4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_Color4dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
+ glColor4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
}
-void __glXDispSwap_Color4fv(GLbyte * pc)
+void
+__glXDispSwap_Color4fv(GLbyte * pc)
{
- CALL_Color4fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glColor4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_Color4iv(GLbyte * pc)
+void
+__glXDispSwap_Color4iv(GLbyte * pc)
{
- CALL_Color4iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glColor4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_Color4sv(GLbyte * pc)
+void
+__glXDispSwap_Color4sv(GLbyte * pc)
{
- CALL_Color4sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
+ glColor4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4));
}
-void __glXDispSwap_Color4ubv(GLbyte * pc)
+void
+__glXDispSwap_Color4ubv(GLbyte * pc)
{
- CALL_Color4ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
+ glColor4ubv((const GLubyte *) (pc + 0));
}
-void __glXDispSwap_Color4uiv(GLbyte * pc)
+void
+__glXDispSwap_Color4uiv(GLbyte * pc)
{
- CALL_Color4uiv( GET_DISPATCH(), (
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glColor4uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_Color4usv(GLbyte * pc)
+void
+__glXDispSwap_Color4usv(GLbyte * pc)
{
- CALL_Color4usv( GET_DISPATCH(), (
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
+ glColor4usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 4));
}
-void __glXDispSwap_EdgeFlagv(GLbyte * pc)
+void
+__glXDispSwap_EdgeFlagv(GLbyte * pc)
{
- CALL_EdgeFlagv( GET_DISPATCH(), (
- (const GLboolean *)(pc + 0)
- ) );
+ glEdgeFlagv((const GLboolean *) (pc + 0));
}
-void __glXDispSwap_End(GLbyte * pc)
+void
+__glXDispSwap_End(GLbyte * pc)
{
- CALL_End( GET_DISPATCH(), () );
+ glEnd();
}
-void __glXDispSwap_Indexdv(GLbyte * pc)
+void
+__glXDispSwap_Indexdv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_Indexdv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
+ glIndexdv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1));
}
-void __glXDispSwap_Indexfv(GLbyte * pc)
+void
+__glXDispSwap_Indexfv(GLbyte * pc)
{
- CALL_Indexfv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
+ glIndexfv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1));
}
-void __glXDispSwap_Indexiv(GLbyte * pc)
+void
+__glXDispSwap_Indexiv(GLbyte * pc)
{
- CALL_Indexiv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
+ glIndexiv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 1));
}
-void __glXDispSwap_Indexsv(GLbyte * pc)
+void
+__glXDispSwap_Indexsv(GLbyte * pc)
{
- CALL_Indexsv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 )
- ) );
+ glIndexsv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 1));
}
-void __glXDispSwap_Normal3bv(GLbyte * pc)
+void
+__glXDispSwap_Normal3bv(GLbyte * pc)
{
- CALL_Normal3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
+ glNormal3bv((const GLbyte *) (pc + 0));
}
-void __glXDispSwap_Normal3dv(GLbyte * pc)
+void
+__glXDispSwap_Normal3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Normal3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
+ glNormal3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
}
-void __glXDispSwap_Normal3fv(GLbyte * pc)
+void
+__glXDispSwap_Normal3fv(GLbyte * pc)
{
- CALL_Normal3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glNormal3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_Normal3iv(GLbyte * pc)
+void
+__glXDispSwap_Normal3iv(GLbyte * pc)
{
- CALL_Normal3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glNormal3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_Normal3sv(GLbyte * pc)
+void
+__glXDispSwap_Normal3sv(GLbyte * pc)
{
- CALL_Normal3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
+ glNormal3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
}
-void __glXDispSwap_RasterPos2dv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_RasterPos2dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
+ glRasterPos2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2));
}
-void __glXDispSwap_RasterPos2fv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos2fv(GLbyte * pc)
{
- CALL_RasterPos2fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
+ glRasterPos2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2));
}
-void __glXDispSwap_RasterPos2iv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos2iv(GLbyte * pc)
{
- CALL_RasterPos2iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
+ glRasterPos2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2));
}
-void __glXDispSwap_RasterPos2sv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos2sv(GLbyte * pc)
{
- CALL_RasterPos2sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 )
- ) );
+ glRasterPos2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2));
}
-void __glXDispSwap_RasterPos3dv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_RasterPos3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
+ glRasterPos3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
}
-void __glXDispSwap_RasterPos3fv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos3fv(GLbyte * pc)
{
- CALL_RasterPos3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glRasterPos3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_RasterPos3iv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos3iv(GLbyte * pc)
{
- CALL_RasterPos3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glRasterPos3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_RasterPos3sv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos3sv(GLbyte * pc)
{
- CALL_RasterPos3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
+ glRasterPos3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
}
-void __glXDispSwap_RasterPos4dv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_RasterPos4dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
+ glRasterPos4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
}
-void __glXDispSwap_RasterPos4fv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos4fv(GLbyte * pc)
{
- CALL_RasterPos4fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glRasterPos4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_RasterPos4iv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos4iv(GLbyte * pc)
{
- CALL_RasterPos4iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glRasterPos4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_RasterPos4sv(GLbyte * pc)
+void
+__glXDispSwap_RasterPos4sv(GLbyte * pc)
{
- CALL_RasterPos4sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
+ glRasterPos4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4));
}
-void __glXDispSwap_Rectdv(GLbyte * pc)
+void
+__glXDispSwap_Rectdv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_Rectdv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 16), 2 )
- ) );
+ glRectdv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 16), 2));
}
-void __glXDispSwap_Rectfv(GLbyte * pc)
+void
+__glXDispSwap_Rectfv(GLbyte * pc)
{
- CALL_Rectfv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 2 )
- ) );
+ glRectfv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 2));
}
-void __glXDispSwap_Rectiv(GLbyte * pc)
+void
+__glXDispSwap_Rectiv(GLbyte * pc)
{
- CALL_Rectiv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 8), 2 )
- ) );
+ glRectiv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2),
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 8), 2));
}
-void __glXDispSwap_Rectsv(GLbyte * pc)
+void
+__glXDispSwap_Rectsv(GLbyte * pc)
{
- CALL_Rectsv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 )
- ) );
+ glRectsv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2));
}
-void __glXDispSwap_TexCoord1dv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord1dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_TexCoord1dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
+ glTexCoord1dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1));
}
-void __glXDispSwap_TexCoord1fv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord1fv(GLbyte * pc)
{
- CALL_TexCoord1fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
+ glTexCoord1fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1));
}
-void __glXDispSwap_TexCoord1iv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord1iv(GLbyte * pc)
{
- CALL_TexCoord1iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
+ glTexCoord1iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 1));
}
-void __glXDispSwap_TexCoord1sv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord1sv(GLbyte * pc)
{
- CALL_TexCoord1sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 )
- ) );
+ glTexCoord1sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 1));
}
-void __glXDispSwap_TexCoord2dv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_TexCoord2dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
+ glTexCoord2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2));
}
-void __glXDispSwap_TexCoord2fv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord2fv(GLbyte * pc)
{
- CALL_TexCoord2fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
+ glTexCoord2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2));
}
-void __glXDispSwap_TexCoord2iv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord2iv(GLbyte * pc)
{
- CALL_TexCoord2iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
+ glTexCoord2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2));
}
-void __glXDispSwap_TexCoord2sv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord2sv(GLbyte * pc)
{
- CALL_TexCoord2sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 )
- ) );
+ glTexCoord2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2));
}
-void __glXDispSwap_TexCoord3dv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_TexCoord3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
+ glTexCoord3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
}
-void __glXDispSwap_TexCoord3fv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord3fv(GLbyte * pc)
{
- CALL_TexCoord3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glTexCoord3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_TexCoord3iv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord3iv(GLbyte * pc)
{
- CALL_TexCoord3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glTexCoord3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_TexCoord3sv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord3sv(GLbyte * pc)
{
- CALL_TexCoord3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
+ glTexCoord3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
}
-void __glXDispSwap_TexCoord4dv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_TexCoord4dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
+ glTexCoord4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
}
-void __glXDispSwap_TexCoord4fv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord4fv(GLbyte * pc)
{
- CALL_TexCoord4fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glTexCoord4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_TexCoord4iv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord4iv(GLbyte * pc)
{
- CALL_TexCoord4iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glTexCoord4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_TexCoord4sv(GLbyte * pc)
+void
+__glXDispSwap_TexCoord4sv(GLbyte * pc)
{
- CALL_TexCoord4sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
+ glTexCoord4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4));
}
-void __glXDispSwap_Vertex2dv(GLbyte * pc)
+void
+__glXDispSwap_Vertex2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_Vertex2dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
+ glVertex2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2));
}
-void __glXDispSwap_Vertex2fv(GLbyte * pc)
+void
+__glXDispSwap_Vertex2fv(GLbyte * pc)
{
- CALL_Vertex2fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
+ glVertex2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2));
}
-void __glXDispSwap_Vertex2iv(GLbyte * pc)
+void
+__glXDispSwap_Vertex2iv(GLbyte * pc)
{
- CALL_Vertex2iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
+ glVertex2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2));
}
-void __glXDispSwap_Vertex2sv(GLbyte * pc)
+void
+__glXDispSwap_Vertex2sv(GLbyte * pc)
{
- CALL_Vertex2sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 )
- ) );
+ glVertex2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2));
}
-void __glXDispSwap_Vertex3dv(GLbyte * pc)
+void
+__glXDispSwap_Vertex3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Vertex3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
+ glVertex3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3));
}
-void __glXDispSwap_Vertex3fv(GLbyte * pc)
+void
+__glXDispSwap_Vertex3fv(GLbyte * pc)
{
- CALL_Vertex3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glVertex3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_Vertex3iv(GLbyte * pc)
+void
+__glXDispSwap_Vertex3iv(GLbyte * pc)
{
- CALL_Vertex3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ glVertex3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_Vertex3sv(GLbyte * pc)
+void
+__glXDispSwap_Vertex3sv(GLbyte * pc)
{
- CALL_Vertex3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
+ glVertex3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3));
}
-void __glXDispSwap_Vertex4dv(GLbyte * pc)
+void
+__glXDispSwap_Vertex4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_Vertex4dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
+ glVertex4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
}
-void __glXDispSwap_Vertex4fv(GLbyte * pc)
+void
+__glXDispSwap_Vertex4fv(GLbyte * pc)
{
- CALL_Vertex4fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glVertex4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_Vertex4iv(GLbyte * pc)
+void
+__glXDispSwap_Vertex4iv(GLbyte * pc)
{
- CALL_Vertex4iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
+ glVertex4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4));
}
-void __glXDispSwap_Vertex4sv(GLbyte * pc)
+void
+__glXDispSwap_Vertex4sv(GLbyte * pc)
{
- CALL_Vertex4sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
+ glVertex4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4));
}
-void __glXDispSwap_ClipPlane(GLbyte * pc)
+void
+__glXDispSwap_ClipPlane(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 36);
pc -= 4;
}
#endif
- CALL_ClipPlane( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 32 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
+ glClipPlane((GLenum) bswap_ENUM(pc + 32),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4));
}
-void __glXDispSwap_ColorMaterial(GLbyte * pc)
+void
+__glXDispSwap_ColorMaterial(GLbyte * pc)
{
- CALL_ColorMaterial( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
+ glColorMaterial((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
}
-void __glXDispSwap_CullFace(GLbyte * pc)
+void
+__glXDispSwap_CullFace(GLbyte * pc)
{
- CALL_CullFace( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glCullFace((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_Fogf(GLbyte * pc)
+void
+__glXDispSwap_Fogf(GLbyte * pc)
{
- CALL_Fogf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
+ glFogf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4));
}
-void __glXDispSwap_Fogfv(GLbyte * pc)
+void
+__glXDispSwap_Fogfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ __glFogfv_size(pname));
- CALL_Fogfv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glFogfv(pname, params);
}
-void __glXDispSwap_Fogi(GLbyte * pc)
+void
+__glXDispSwap_Fogi(GLbyte * pc)
{
- CALL_Fogi( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
+ glFogi((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4));
}
-void __glXDispSwap_Fogiv(GLbyte * pc)
+void
+__glXDispSwap_Fogiv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
+ __glFogiv_size(pname));
- CALL_Fogiv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glFogiv(pname, params);
}
-void __glXDispSwap_FrontFace(GLbyte * pc)
+void
+__glXDispSwap_FrontFace(GLbyte * pc)
{
- CALL_FrontFace( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glFrontFace((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_Hint(GLbyte * pc)
+void
+__glXDispSwap_Hint(GLbyte * pc)
{
- CALL_Hint( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
+ glHint((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
}
-void __glXDispSwap_Lightf(GLbyte * pc)
+void
+__glXDispSwap_Lightf(GLbyte * pc)
{
- CALL_Lightf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glLightf((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_Lightfv(GLbyte * pc)
+void
+__glXDispSwap_Lightfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ __glLightfv_size(pname));
- CALL_Lightfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glLightfv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_Lighti(GLbyte * pc)
+void
+__glXDispSwap_Lighti(GLbyte * pc)
{
- CALL_Lighti( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
+ glLighti((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
}
-void __glXDispSwap_Lightiv(GLbyte * pc)
+void
+__glXDispSwap_Lightiv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
+ __glLightiv_size(pname));
- CALL_Lightiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glLightiv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_LightModelf(GLbyte * pc)
+void
+__glXDispSwap_LightModelf(GLbyte * pc)
{
- CALL_LightModelf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
+ glLightModelf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4));
}
-void __glXDispSwap_LightModelfv(GLbyte * pc)
+void
+__glXDispSwap_LightModelfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ __glLightModelfv_size(pname));
- CALL_LightModelfv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glLightModelfv(pname, params);
}
-void __glXDispSwap_LightModeli(GLbyte * pc)
+void
+__glXDispSwap_LightModeli(GLbyte * pc)
{
- CALL_LightModeli( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
+ glLightModeli((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4));
}
-void __glXDispSwap_LightModeliv(GLbyte * pc)
+void
+__glXDispSwap_LightModeliv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
+ __glLightModeliv_size(pname));
- CALL_LightModeliv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glLightModeliv(pname, params);
}
-void __glXDispSwap_LineStipple(GLbyte * pc)
+void
+__glXDispSwap_LineStipple(GLbyte * pc)
{
- CALL_LineStipple( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLushort)bswap_CARD16 ( pc + 4 )
- ) );
+ glLineStipple((GLint) bswap_CARD32(pc + 0),
+ (GLushort) bswap_CARD16(pc + 4));
}
-void __glXDispSwap_LineWidth(GLbyte * pc)
+void
+__glXDispSwap_LineWidth(GLbyte * pc)
{
- CALL_LineWidth( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 )
- ) );
+ glLineWidth((GLfloat) bswap_FLOAT32(pc + 0));
}
-void __glXDispSwap_Materialf(GLbyte * pc)
+void
+__glXDispSwap_Materialf(GLbyte * pc)
{
- CALL_Materialf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glMaterialf((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_Materialfv(GLbyte * pc)
+void
+__glXDispSwap_Materialfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ __glMaterialfv_size(pname));
- CALL_Materialfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glMaterialfv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_Materiali(GLbyte * pc)
+void
+__glXDispSwap_Materiali(GLbyte * pc)
{
- CALL_Materiali( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
+ glMateriali((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
}
-void __glXDispSwap_Materialiv(GLbyte * pc)
+void
+__glXDispSwap_Materialiv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
+ __glMaterialiv_size(pname));
- CALL_Materialiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glMaterialiv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_PointSize(GLbyte * pc)
+void
+__glXDispSwap_PointSize(GLbyte * pc)
{
- CALL_PointSize( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 )
- ) );
+ glPointSize((GLfloat) bswap_FLOAT32(pc + 0));
}
-void __glXDispSwap_PolygonMode(GLbyte * pc)
+void
+__glXDispSwap_PolygonMode(GLbyte * pc)
{
- CALL_PolygonMode( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
+ glPolygonMode((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
}
-void __glXDispSwap_PolygonStipple(GLbyte * pc)
+void
+__glXDispSwap_PolygonStipple(GLbyte * pc)
{
- const GLubyte * const mask = (const GLubyte *) (pc + 20);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLubyte *const mask = (const GLubyte *) ((pc + 20));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_PolygonStipple( GET_DISPATCH(), (
- mask
- ) );
+ glPolygonStipple(mask);
}
-void __glXDispSwap_Scissor(GLbyte * pc)
+void
+__glXDispSwap_Scissor(GLbyte * pc)
{
- CALL_Scissor( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLsizei )bswap_CARD32 ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 )
- ) );
+ glScissor((GLint) bswap_CARD32(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12));
}
-void __glXDispSwap_ShadeModel(GLbyte * pc)
+void
+__glXDispSwap_ShadeModel(GLbyte * pc)
{
- CALL_ShadeModel( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glShadeModel((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_TexParameterf(GLbyte * pc)
+void
+__glXDispSwap_TexParameterf(GLbyte * pc)
{
- CALL_TexParameterf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glTexParameterf((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_TexParameterfv(GLbyte * pc)
+void
+__glXDispSwap_TexParameterfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ __glTexParameterfv_size(pname));
- CALL_TexParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glTexParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_TexParameteri(GLbyte * pc)
+void
+__glXDispSwap_TexParameteri(GLbyte * pc)
{
- CALL_TexParameteri( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
+ glTexParameteri((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
}
-void __glXDispSwap_TexParameteriv(GLbyte * pc)
+void
+__glXDispSwap_TexParameteriv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
+ __glTexParameteriv_size(pname));
- CALL_TexParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glTexParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_TexImage1D(GLbyte * pc)
+void
+__glXDispSwap_TexImage1D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 52));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_TexImage1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 32 ),
- (GLint )bswap_CARD32 ( pc + 40 ),
- (GLenum )bswap_ENUM ( pc + 44 ),
- (GLenum )bswap_ENUM ( pc + 48 ),
- pixels
- ) );
+ glTexImage1D((GLenum) bswap_ENUM(pc + 20),
+ (GLint) bswap_CARD32(pc + 24),
+ (GLint) bswap_CARD32(pc + 28),
+ (GLsizei) bswap_CARD32(pc + 32),
+ (GLint) bswap_CARD32(pc + 40),
+ (GLenum) bswap_ENUM(pc + 44),
+ (GLenum) bswap_ENUM(pc + 48), pixels);
}
-void __glXDispSwap_TexImage2D(GLbyte * pc)
+void
+__glXDispSwap_TexImage2D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 52));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_TexImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 32 ),
- (GLsizei )bswap_CARD32 ( pc + 36 ),
- (GLint )bswap_CARD32 ( pc + 40 ),
- (GLenum )bswap_ENUM ( pc + 44 ),
- (GLenum )bswap_ENUM ( pc + 48 ),
- pixels
- ) );
+ glTexImage2D((GLenum) bswap_ENUM(pc + 20),
+ (GLint) bswap_CARD32(pc + 24),
+ (GLint) bswap_CARD32(pc + 28),
+ (GLsizei) bswap_CARD32(pc + 32),
+ (GLsizei) bswap_CARD32(pc + 36),
+ (GLint) bswap_CARD32(pc + 40),
+ (GLenum) bswap_ENUM(pc + 44),
+ (GLenum) bswap_ENUM(pc + 48), pixels);
}
-void __glXDispSwap_TexEnvf(GLbyte * pc)
+void
+__glXDispSwap_TexEnvf(GLbyte * pc)
{
- CALL_TexEnvf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glTexEnvf((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_TexEnvfv(GLbyte * pc)
+void
+__glXDispSwap_TexEnvfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ __glTexEnvfv_size(pname));
- CALL_TexEnvfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glTexEnvfv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_TexEnvi(GLbyte * pc)
+void
+__glXDispSwap_TexEnvi(GLbyte * pc)
{
- CALL_TexEnvi( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
+ glTexEnvi((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
}
-void __glXDispSwap_TexEnviv(GLbyte * pc)
+void
+__glXDispSwap_TexEnviv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
+ __glTexEnviv_size(pname));
- CALL_TexEnviv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glTexEnviv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_TexGend(GLbyte * pc)
+void
+__glXDispSwap_TexGend(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_TexGend( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLenum )bswap_ENUM ( pc + 12 ),
- (GLdouble)bswap_FLOAT64( pc + 0 )
- ) );
+ glTexGend((GLenum) bswap_ENUM(pc + 8),
+ (GLenum) bswap_ENUM(pc + 12), (GLdouble) bswap_FLOAT64(pc + 0));
}
-void __glXDispSwap_TexGendv(GLbyte * pc)
+void
+__glXDispSwap_TexGendv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLdouble * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLdouble *params;
#ifdef __GLX_ALIGN64
const GLuint compsize = __glTexGendv_size(pname);
const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) );
+ params =
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
+ __glTexGendv_size(pname));
- CALL_TexGendv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glTexGendv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_TexGenf(GLbyte * pc)
+void
+__glXDispSwap_TexGenf(GLbyte * pc)
{
- CALL_TexGenf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glTexGenf((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_TexGenfv(GLbyte * pc)
+void
+__glXDispSwap_TexGenfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ __glTexGenfv_size(pname));
- CALL_TexGenfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glTexGenfv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_TexGeni(GLbyte * pc)
+void
+__glXDispSwap_TexGeni(GLbyte * pc)
{
- CALL_TexGeni( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
+ glTexGeni((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8));
}
-void __glXDispSwap_TexGeniv(GLbyte * pc)
+void
+__glXDispSwap_TexGeniv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
+ __glTexGeniv_size(pname));
- CALL_TexGeniv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glTexGeniv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_InitNames(GLbyte * pc)
+void
+__glXDispSwap_InitNames(GLbyte * pc)
{
- CALL_InitNames( GET_DISPATCH(), () );
+ glInitNames();
}
-void __glXDispSwap_LoadName(GLbyte * pc)
+void
+__glXDispSwap_LoadName(GLbyte * pc)
{
- CALL_LoadName( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+ glLoadName((GLuint) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_PassThrough(GLbyte * pc)
+void
+__glXDispSwap_PassThrough(GLbyte * pc)
{
- CALL_PassThrough( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 )
- ) );
+ glPassThrough((GLfloat) bswap_FLOAT32(pc + 0));
}
-void __glXDispSwap_PopName(GLbyte * pc)
+void
+__glXDispSwap_PopName(GLbyte * pc)
{
- CALL_PopName( GET_DISPATCH(), () );
+ glPopName();
}
-void __glXDispSwap_PushName(GLbyte * pc)
+void
+__glXDispSwap_PushName(GLbyte * pc)
{
- CALL_PushName( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+ glPushName((GLuint) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_DrawBuffer(GLbyte * pc)
+void
+__glXDispSwap_DrawBuffer(GLbyte * pc)
{
- CALL_DrawBuffer( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glDrawBuffer((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_Clear(GLbyte * pc)
+void
+__glXDispSwap_Clear(GLbyte * pc)
{
- CALL_Clear( GET_DISPATCH(), (
- (GLbitfield)bswap_CARD32 ( pc + 0 )
- ) );
+ glClear((GLbitfield) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_ClearAccum(GLbyte * pc)
+void
+__glXDispSwap_ClearAccum(GLbyte * pc)
{
- CALL_ClearAccum( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 ),
- (GLfloat )bswap_FLOAT32( pc + 12 )
- ) );
+ glClearAccum((GLfloat) bswap_FLOAT32(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4),
+ (GLfloat) bswap_FLOAT32(pc + 8),
+ (GLfloat) bswap_FLOAT32(pc + 12));
}
-void __glXDispSwap_ClearIndex(GLbyte * pc)
+void
+__glXDispSwap_ClearIndex(GLbyte * pc)
{
- CALL_ClearIndex( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 )
- ) );
+ glClearIndex((GLfloat) bswap_FLOAT32(pc + 0));
}
-void __glXDispSwap_ClearColor(GLbyte * pc)
+void
+__glXDispSwap_ClearColor(GLbyte * pc)
{
- CALL_ClearColor( GET_DISPATCH(), (
- (GLclampf)bswap_FLOAT32( pc + 0 ),
- (GLclampf)bswap_FLOAT32( pc + 4 ),
- (GLclampf)bswap_FLOAT32( pc + 8 ),
- (GLclampf)bswap_FLOAT32( pc + 12 )
- ) );
+ glClearColor((GLclampf) bswap_FLOAT32(pc + 0),
+ (GLclampf) bswap_FLOAT32(pc + 4),
+ (GLclampf) bswap_FLOAT32(pc + 8),
+ (GLclampf) bswap_FLOAT32(pc + 12));
}
-void __glXDispSwap_ClearStencil(GLbyte * pc)
+void
+__glXDispSwap_ClearStencil(GLbyte * pc)
{
- CALL_ClearStencil( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 )
- ) );
+ glClearStencil((GLint) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_ClearDepth(GLbyte * pc)
+void
+__glXDispSwap_ClearDepth(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_ClearDepth( GET_DISPATCH(), (
- (GLclampd)bswap_FLOAT64( pc + 0 )
- ) );
+ glClearDepth((GLclampd) bswap_FLOAT64(pc + 0));
}
-void __glXDispSwap_StencilMask(GLbyte * pc)
+void
+__glXDispSwap_StencilMask(GLbyte * pc)
{
- CALL_StencilMask( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+ glStencilMask((GLuint) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_ColorMask(GLbyte * pc)
+void
+__glXDispSwap_ColorMask(GLbyte * pc)
{
- CALL_ColorMask( GET_DISPATCH(), (
- *(GLboolean *)(pc + 0),
- *(GLboolean *)(pc + 1),
- *(GLboolean *)(pc + 2),
- *(GLboolean *)(pc + 3)
- ) );
+ glColorMask(*(GLboolean *) (pc + 0),
+ *(GLboolean *) (pc + 1),
+ *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3));
}
-void __glXDispSwap_DepthMask(GLbyte * pc)
+void
+__glXDispSwap_DepthMask(GLbyte * pc)
{
- CALL_DepthMask( GET_DISPATCH(), (
- *(GLboolean *)(pc + 0)
- ) );
+ glDepthMask(*(GLboolean *) (pc + 0));
}
-void __glXDispSwap_IndexMask(GLbyte * pc)
+void
+__glXDispSwap_IndexMask(GLbyte * pc)
{
- CALL_IndexMask( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+ glIndexMask((GLuint) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_Accum(GLbyte * pc)
+void
+__glXDispSwap_Accum(GLbyte * pc)
{
- CALL_Accum( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
+ glAccum((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4));
}
-void __glXDispSwap_Disable(GLbyte * pc)
+void
+__glXDispSwap_Disable(GLbyte * pc)
{
- CALL_Disable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glDisable((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_Enable(GLbyte * pc)
+void
+__glXDispSwap_Enable(GLbyte * pc)
{
- CALL_Enable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glEnable((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_PopAttrib(GLbyte * pc)
+void
+__glXDispSwap_PopAttrib(GLbyte * pc)
{
- CALL_PopAttrib( GET_DISPATCH(), () );
+ glPopAttrib();
}
-void __glXDispSwap_PushAttrib(GLbyte * pc)
+void
+__glXDispSwap_PushAttrib(GLbyte * pc)
{
- CALL_PushAttrib( GET_DISPATCH(), (
- (GLbitfield)bswap_CARD32 ( pc + 0 )
- ) );
+ glPushAttrib((GLbitfield) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_MapGrid1d(GLbyte * pc)
+void
+__glXDispSwap_MapGrid1d(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 20);
pc -= 4;
}
#endif
- CALL_MapGrid1d( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 )
- ) );
+ glMapGrid1d((GLint) bswap_CARD32(pc + 16),
+ (GLdouble) bswap_FLOAT64(pc + 0),
+ (GLdouble) bswap_FLOAT64(pc + 8));
}
-void __glXDispSwap_MapGrid1f(GLbyte * pc)
+void
+__glXDispSwap_MapGrid1f(GLbyte * pc)
{
- CALL_MapGrid1f( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glMapGrid1f((GLint) bswap_CARD32(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4),
+ (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_MapGrid2d(GLbyte * pc)
+void
+__glXDispSwap_MapGrid2d(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 40);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 40);
pc -= 4;
}
#endif
- CALL_MapGrid2d( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 32 ),
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 36 ),
- (GLdouble)bswap_FLOAT64( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 24 )
- ) );
+ glMapGrid2d((GLint) bswap_CARD32(pc + 32),
+ (GLdouble) bswap_FLOAT64(pc + 0),
+ (GLdouble) bswap_FLOAT64(pc + 8),
+ (GLint) bswap_CARD32(pc + 36),
+ (GLdouble) bswap_FLOAT64(pc + 16),
+ (GLdouble) bswap_FLOAT64(pc + 24));
}
-void __glXDispSwap_MapGrid2f(GLbyte * pc)
+void
+__glXDispSwap_MapGrid2f(GLbyte * pc)
{
- CALL_MapGrid2f( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLfloat )bswap_FLOAT32( pc + 16 ),
- (GLfloat )bswap_FLOAT32( pc + 20 )
- ) );
+ glMapGrid2f((GLint) bswap_CARD32(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4),
+ (GLfloat) bswap_FLOAT32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLfloat) bswap_FLOAT32(pc + 16),
+ (GLfloat) bswap_FLOAT32(pc + 20));
}
-void __glXDispSwap_EvalCoord1dv(GLbyte * pc)
+void
+__glXDispSwap_EvalCoord1dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_EvalCoord1dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
+ glEvalCoord1dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1));
}
-void __glXDispSwap_EvalCoord1fv(GLbyte * pc)
+void
+__glXDispSwap_EvalCoord1fv(GLbyte * pc)
{
- CALL_EvalCoord1fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
+ glEvalCoord1fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1));
}
-void __glXDispSwap_EvalCoord2dv(GLbyte * pc)
+void
+__glXDispSwap_EvalCoord2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_EvalCoord2dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
+ glEvalCoord2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2));
}
-void __glXDispSwap_EvalCoord2fv(GLbyte * pc)
+void
+__glXDispSwap_EvalCoord2fv(GLbyte * pc)
{
- CALL_EvalCoord2fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
+ glEvalCoord2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2));
}
-void __glXDispSwap_EvalMesh1(GLbyte * pc)
+void
+__glXDispSwap_EvalMesh1(GLbyte * pc)
{
- CALL_EvalMesh1( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
+ glEvalMesh1((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8));
}
-void __glXDispSwap_EvalPoint1(GLbyte * pc)
+void
+__glXDispSwap_EvalPoint1(GLbyte * pc)
{
- CALL_EvalPoint1( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 )
- ) );
+ glEvalPoint1((GLint) bswap_CARD32(pc + 0));
}
-void __glXDispSwap_EvalMesh2(GLbyte * pc)
+void
+__glXDispSwap_EvalMesh2(GLbyte * pc)
{
- CALL_EvalMesh2( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 )
- ) );
+ glEvalMesh2((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16));
}
-void __glXDispSwap_EvalPoint2(GLbyte * pc)
+void
+__glXDispSwap_EvalPoint2(GLbyte * pc)
{
- CALL_EvalPoint2( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
+ glEvalPoint2((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4));
}
-void __glXDispSwap_AlphaFunc(GLbyte * pc)
+void
+__glXDispSwap_AlphaFunc(GLbyte * pc)
{
- CALL_AlphaFunc( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLclampf)bswap_FLOAT32( pc + 4 )
- ) );
+ glAlphaFunc((GLenum) bswap_ENUM(pc + 0), (GLclampf) bswap_FLOAT32(pc + 4));
}
-void __glXDispSwap_BlendFunc(GLbyte * pc)
+void
+__glXDispSwap_BlendFunc(GLbyte * pc)
{
- CALL_BlendFunc( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
+ glBlendFunc((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
}
-void __glXDispSwap_LogicOp(GLbyte * pc)
+void
+__glXDispSwap_LogicOp(GLbyte * pc)
{
- CALL_LogicOp( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glLogicOp((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_StencilFunc(GLbyte * pc)
+void
+__glXDispSwap_StencilFunc(GLbyte * pc)
{
- CALL_StencilFunc( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLuint )bswap_CARD32 ( pc + 8 )
- ) );
+ glStencilFunc((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4), (GLuint) bswap_CARD32(pc + 8));
}
-void __glXDispSwap_StencilOp(GLbyte * pc)
+void
+__glXDispSwap_StencilOp(GLbyte * pc)
{
- CALL_StencilOp( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 )
- ) );
+ glStencilOp((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8));
}
-void __glXDispSwap_DepthFunc(GLbyte * pc)
+void
+__glXDispSwap_DepthFunc(GLbyte * pc)
{
- CALL_DepthFunc( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glDepthFunc((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_PixelZoom(GLbyte * pc)
+void
+__glXDispSwap_PixelZoom(GLbyte * pc)
{
- CALL_PixelZoom( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
+ glPixelZoom((GLfloat) bswap_FLOAT32(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4));
}
-void __glXDispSwap_PixelTransferf(GLbyte * pc)
+void
+__glXDispSwap_PixelTransferf(GLbyte * pc)
{
- CALL_PixelTransferf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
+ glPixelTransferf((GLenum) bswap_ENUM(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4));
}
-void __glXDispSwap_PixelTransferi(GLbyte * pc)
+void
+__glXDispSwap_PixelTransferi(GLbyte * pc)
{
- CALL_PixelTransferi( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
+ glPixelTransferi((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4));
}
-int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_PixelStoref(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_PixelStoref( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
+ if (cx != NULL) {
+ glPixelStoref((GLenum) bswap_ENUM(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4));
error = Success;
}
return error;
}
-int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_PixelStorei(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- CALL_PixelStorei( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
+ if (cx != NULL) {
+ glPixelStorei((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4));
error = Success;
}
return error;
}
-void __glXDispSwap_PixelMapfv(GLbyte * pc)
+void
+__glXDispSwap_PixelMapfv(GLbyte * pc)
{
- const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 );
+ const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4);
- CALL_PixelMapfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- mapsize,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
+ glPixelMapfv((GLenum) bswap_ENUM(pc + 0),
+ mapsize,
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 0));
}
-void __glXDispSwap_PixelMapuiv(GLbyte * pc)
+void
+__glXDispSwap_PixelMapuiv(GLbyte * pc)
{
- const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 );
+ const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4);
- CALL_PixelMapuiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- mapsize,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
+ glPixelMapuiv((GLenum) bswap_ENUM(pc + 0),
+ mapsize,
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 8), 0));
}
-void __glXDispSwap_PixelMapusv(GLbyte * pc)
+void
+__glXDispSwap_PixelMapusv(GLbyte * pc)
{
- const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 );
+ const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4);
- CALL_PixelMapusv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- mapsize,
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
+ glPixelMapusv((GLenum) bswap_ENUM(pc + 0),
+ mapsize,
+ (const GLushort *) bswap_16_array((uint16_t *) (pc + 8), 0));
}
-void __glXDispSwap_ReadBuffer(GLbyte * pc)
+void
+__glXDispSwap_ReadBuffer(GLbyte * pc)
{
- CALL_ReadBuffer( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glReadBuffer((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_CopyPixels(GLbyte * pc)
+void
+__glXDispSwap_CopyPixels(GLbyte * pc)
{
- CALL_CopyPixels( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLsizei )bswap_CARD32 ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 ),
- (GLenum )bswap_ENUM ( pc + 16 )
- ) );
+ glCopyPixels((GLint) bswap_CARD32(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLsizei) bswap_CARD32(pc + 8),
+ (GLsizei) bswap_CARD32(pc + 12), (GLenum) bswap_ENUM(pc + 16));
}
-void __glXDispSwap_DrawPixels(GLbyte * pc)
+void
+__glXDispSwap_DrawPixels(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 36);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 36));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_DrawPixels( GET_DISPATCH(), (
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLenum )bswap_ENUM ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 32 ),
- pixels
- ) );
+ glDrawPixels((GLsizei) bswap_CARD32(pc + 20),
+ (GLsizei) bswap_CARD32(pc + 24),
+ (GLenum) bswap_ENUM(pc + 28),
+ (GLenum) bswap_ENUM(pc + 32), pixels);
}
-int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetBooleanv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
const GLuint compsize = __glGetBooleanv_size(pname);
GLboolean answerBuffer[200];
- GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1);
+ GLboolean *params =
+ __glXGetAnswerBuffer(cl, compsize, answerBuffer,
+ sizeof(answerBuffer), 1);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetBooleanv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ glGetBooleanv(pname, params);
__glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0);
error = Success;
}
@@ -1901,20 +1750,20 @@ int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetClipPlane(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLdouble equation[4];
- CALL_GetClipPlane( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- equation
- ) );
- (void) bswap_64_array( (uint64_t *) equation, 4 );
+
+ glGetClipPlane((GLenum) bswap_ENUM(pc + 0), equation);
+ (void) bswap_64_array((uint64_t *) equation, 4);
__glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0);
error = Success;
}
@@ -1922,28 +1771,30 @@ int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetDoublev(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
const GLuint compsize = __glGetDoublev_size(pname);
GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
+ GLdouble *params =
+ __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
+ sizeof(answerBuffer), 8);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetDoublev( GET_DISPATCH(), (
- pname,
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, compsize );
+ glGetDoublev(pname, params);
+ (void) bswap_64_array((uint64_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
error = Success;
}
@@ -1951,16 +1802,19 @@ int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetError(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLenum retval;
- retval = CALL_GetError( GET_DISPATCH(), () );
+
+ retval = glGetError();
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -1968,28 +1822,30 @@ int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetFloatv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
const GLuint compsize = __glGetFloatv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetFloatv( GET_DISPATCH(), (
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetFloatv(pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -1997,28 +1853,30 @@ int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetIntegerv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
const GLuint compsize = __glGetIntegerv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetIntegerv( GET_DISPATCH(), (
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetIntegerv(pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2026,29 +1884,30 @@ int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetLightfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetLightfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetLightfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetLightfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2056,29 +1915,30 @@ int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetLightiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetLightiv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetLightiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetLightiv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2086,30 +1946,31 @@ int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMapdv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum target = (GLenum )bswap_ENUM ( pc + 0 );
- const GLenum query = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum target = (GLenum) bswap_ENUM(pc + 0);
+ const GLenum query = (GLenum) bswap_ENUM(pc + 4);
- const GLuint compsize = __glGetMapdv_size(target,query);
+ const GLuint compsize = __glGetMapdv_size(target, query);
GLdouble answerBuffer[200];
- GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
+ GLdouble *v =
+ __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
+ sizeof(answerBuffer), 8);
- if (v == NULL) return BadAlloc;
+ if (v == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMapdv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- (void) bswap_64_array( (uint64_t *) v, compsize );
+ glGetMapdv(target, query, v);
+ (void) bswap_64_array((uint64_t *) v, compsize);
__glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0);
error = Success;
}
@@ -2117,30 +1978,31 @@ int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMapfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum target = (GLenum )bswap_ENUM ( pc + 0 );
- const GLenum query = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum target = (GLenum) bswap_ENUM(pc + 0);
+ const GLenum query = (GLenum) bswap_ENUM(pc + 4);
- const GLuint compsize = __glGetMapfv_size(target,query);
+ const GLuint compsize = __glGetMapfv_size(target, query);
GLfloat answerBuffer[200];
- GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *v =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (v == NULL) return BadAlloc;
+ if (v == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMapfv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- (void) bswap_32_array( (uint32_t *) v, compsize );
+ glGetMapfv(target, query, v);
+ (void) bswap_32_array((uint32_t *) v, compsize);
__glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2148,30 +2010,31 @@ int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMapiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum target = (GLenum )bswap_ENUM ( pc + 0 );
- const GLenum query = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum target = (GLenum) bswap_ENUM(pc + 0);
+ const GLenum query = (GLenum) bswap_ENUM(pc + 4);
- const GLuint compsize = __glGetMapiv_size(target,query);
+ const GLuint compsize = __glGetMapiv_size(target, query);
GLint answerBuffer[200];
- GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *v =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (v == NULL) return BadAlloc;
+ if (v == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMapiv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- (void) bswap_32_array( (uint32_t *) v, compsize );
+ glGetMapiv(target, query, v);
+ (void) bswap_32_array((uint32_t *) v, compsize);
__glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2179,29 +2042,30 @@ int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMaterialfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetMaterialfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMaterialfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetMaterialfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2209,29 +2073,30 @@ int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMaterialiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetMaterialiv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMaterialiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetMaterialiv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2239,28 +2104,30 @@ int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetPixelMapfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum map = (GLenum )bswap_ENUM ( pc + 0 );
+ if (cx != NULL) {
+ const GLenum map = (GLenum) bswap_ENUM(pc + 0);
const GLuint compsize = __glGetPixelMapfv_size(map);
GLfloat answerBuffer[200];
- GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *values =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (values == NULL) return BadAlloc;
+ if (values == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetPixelMapfv( GET_DISPATCH(), (
- map,
- values
- ) );
- (void) bswap_32_array( (uint32_t *) values, compsize );
+ glGetPixelMapfv(map, values);
+ (void) bswap_32_array((uint32_t *) values, compsize);
__glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2268,28 +2135,30 @@ int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetPixelMapuiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum map = (GLenum )bswap_ENUM ( pc + 0 );
+ if (cx != NULL) {
+ const GLenum map = (GLenum) bswap_ENUM(pc + 0);
const GLuint compsize = __glGetPixelMapuiv_size(map);
GLuint answerBuffer[200];
- GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLuint *values =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (values == NULL) return BadAlloc;
+ if (values == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetPixelMapuiv( GET_DISPATCH(), (
- map,
- values
- ) );
- (void) bswap_32_array( (uint32_t *) values, compsize );
+ glGetPixelMapuiv(map, values);
+ (void) bswap_32_array((uint32_t *) values, compsize);
__glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2297,28 +2166,30 @@ int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetPixelMapusv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum map = (GLenum )bswap_ENUM ( pc + 0 );
+ if (cx != NULL) {
+ const GLenum map = (GLenum) bswap_ENUM(pc + 0);
const GLuint compsize = __glGetPixelMapusv_size(map);
GLushort answerBuffer[200];
- GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2);
+ GLushort *values =
+ __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer,
+ sizeof(answerBuffer), 2);
- if (values == NULL) return BadAlloc;
+ if (values == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetPixelMapusv( GET_DISPATCH(), (
- map,
- values
- ) );
- (void) bswap_16_array( (uint16_t *) values, compsize );
+ glGetPixelMapusv(map, values);
+ (void) bswap_16_array((uint16_t *) values, compsize);
__glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0);
error = Success;
}
@@ -2326,29 +2197,30 @@ int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexEnvfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetTexEnvfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexEnvfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetTexEnvfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2356,29 +2228,30 @@ int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexEnviv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetTexEnviv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexEnviv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetTexEnviv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2386,29 +2259,30 @@ int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexGendv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetTexGendv_size(pname);
GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
+ GLdouble *params =
+ __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer,
+ sizeof(answerBuffer), 8);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexGendv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, compsize );
+ glGetTexGendv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_64_array((uint64_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
error = Success;
}
@@ -2416,29 +2290,30 @@ int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexGenfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetTexGenfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexGenfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetTexGenfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2446,29 +2321,30 @@ int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexGeniv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetTexGeniv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexGeniv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetTexGeniv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2476,29 +2352,30 @@ int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetTexParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetTexParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2506,29 +2383,30 @@ int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetTexParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetTexParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2536,30 +2414,31 @@ int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexLevelParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 8);
const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexLevelParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetTexLevelParameterfv((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2567,30 +2446,31 @@ int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexLevelParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 8);
const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetTexLevelParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetTexLevelParameteriv((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -2598,18 +2478,19 @@ int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_IsEnabled(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsEnabled( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+
+ retval = glIsEnabled((GLenum) bswap_ENUM(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -2617,18 +2498,19 @@ int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_IsList(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsList( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+
+ retval = glIsList((GLuint) bswap_CARD32(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -2636,251 +2518,236 @@ int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_DepthRange(GLbyte * pc)
+void
+__glXDispSwap_DepthRange(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 16);
pc -= 4;
}
#endif
- CALL_DepthRange( GET_DISPATCH(), (
- (GLclampd)bswap_FLOAT64( pc + 0 ),
- (GLclampd)bswap_FLOAT64( pc + 8 )
- ) );
+ glDepthRange((GLclampd) bswap_FLOAT64(pc + 0),
+ (GLclampd) bswap_FLOAT64(pc + 8));
}
-void __glXDispSwap_Frustum(GLbyte * pc)
+void
+__glXDispSwap_Frustum(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 48);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 48);
pc -= 4;
}
#endif
- CALL_Frustum( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 24 ),
- (GLdouble)bswap_FLOAT64( pc + 32 ),
- (GLdouble)bswap_FLOAT64( pc + 40 )
- ) );
+ glFrustum((GLdouble) bswap_FLOAT64(pc + 0),
+ (GLdouble) bswap_FLOAT64(pc + 8),
+ (GLdouble) bswap_FLOAT64(pc + 16),
+ (GLdouble) bswap_FLOAT64(pc + 24),
+ (GLdouble) bswap_FLOAT64(pc + 32),
+ (GLdouble) bswap_FLOAT64(pc + 40));
}
-void __glXDispSwap_LoadIdentity(GLbyte * pc)
+void
+__glXDispSwap_LoadIdentity(GLbyte * pc)
{
- CALL_LoadIdentity( GET_DISPATCH(), () );
+ glLoadIdentity();
}
-void __glXDispSwap_LoadMatrixf(GLbyte * pc)
+void
+__glXDispSwap_LoadMatrixf(GLbyte * pc)
{
- CALL_LoadMatrixf( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 )
- ) );
+ glLoadMatrixf((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 16));
}
-void __glXDispSwap_LoadMatrixd(GLbyte * pc)
+void
+__glXDispSwap_LoadMatrixd(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 128);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 128);
pc -= 4;
}
#endif
- CALL_LoadMatrixd( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 )
- ) );
+ glLoadMatrixd((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 16));
}
-void __glXDispSwap_MatrixMode(GLbyte * pc)
+void
+__glXDispSwap_MatrixMode(GLbyte * pc)
{
- CALL_MatrixMode( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glMatrixMode((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_MultMatrixf(GLbyte * pc)
+void
+__glXDispSwap_MultMatrixf(GLbyte * pc)
{
- CALL_MultMatrixf( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 )
- ) );
+ glMultMatrixf((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 16));
}
-void __glXDispSwap_MultMatrixd(GLbyte * pc)
+void
+__glXDispSwap_MultMatrixd(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 128);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 128);
pc -= 4;
}
#endif
- CALL_MultMatrixd( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 )
- ) );
+ glMultMatrixd((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 16));
}
-void __glXDispSwap_Ortho(GLbyte * pc)
+void
+__glXDispSwap_Ortho(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 48);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 48);
pc -= 4;
}
#endif
- CALL_Ortho( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 24 ),
- (GLdouble)bswap_FLOAT64( pc + 32 ),
- (GLdouble)bswap_FLOAT64( pc + 40 )
- ) );
+ glOrtho((GLdouble) bswap_FLOAT64(pc + 0),
+ (GLdouble) bswap_FLOAT64(pc + 8),
+ (GLdouble) bswap_FLOAT64(pc + 16),
+ (GLdouble) bswap_FLOAT64(pc + 24),
+ (GLdouble) bswap_FLOAT64(pc + 32),
+ (GLdouble) bswap_FLOAT64(pc + 40));
}
-void __glXDispSwap_PopMatrix(GLbyte * pc)
+void
+__glXDispSwap_PopMatrix(GLbyte * pc)
{
- CALL_PopMatrix( GET_DISPATCH(), () );
+ glPopMatrix();
}
-void __glXDispSwap_PushMatrix(GLbyte * pc)
+void
+__glXDispSwap_PushMatrix(GLbyte * pc)
{
- CALL_PushMatrix( GET_DISPATCH(), () );
+ glPushMatrix();
}
-void __glXDispSwap_Rotated(GLbyte * pc)
+void
+__glXDispSwap_Rotated(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 32);
pc -= 4;
}
#endif
- CALL_Rotated( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 24 )
- ) );
+ glRotated((GLdouble) bswap_FLOAT64(pc + 0),
+ (GLdouble) bswap_FLOAT64(pc + 8),
+ (GLdouble) bswap_FLOAT64(pc + 16),
+ (GLdouble) bswap_FLOAT64(pc + 24));
}
-void __glXDispSwap_Rotatef(GLbyte * pc)
+void
+__glXDispSwap_Rotatef(GLbyte * pc)
{
- CALL_Rotatef( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 ),
- (GLfloat )bswap_FLOAT32( pc + 12 )
- ) );
+ glRotatef((GLfloat) bswap_FLOAT32(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4),
+ (GLfloat) bswap_FLOAT32(pc + 8),
+ (GLfloat) bswap_FLOAT32(pc + 12));
}
-void __glXDispSwap_Scaled(GLbyte * pc)
+void
+__glXDispSwap_Scaled(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Scaled( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 )
- ) );
+ glScaled((GLdouble) bswap_FLOAT64(pc + 0),
+ (GLdouble) bswap_FLOAT64(pc + 8),
+ (GLdouble) bswap_FLOAT64(pc + 16));
}
-void __glXDispSwap_Scalef(GLbyte * pc)
+void
+__glXDispSwap_Scalef(GLbyte * pc)
{
- CALL_Scalef( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glScalef((GLfloat) bswap_FLOAT32(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_Translated(GLbyte * pc)
+void
+__glXDispSwap_Translated(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_Translated( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 )
- ) );
+ glTranslated((GLdouble) bswap_FLOAT64(pc + 0),
+ (GLdouble) bswap_FLOAT64(pc + 8),
+ (GLdouble) bswap_FLOAT64(pc + 16));
}
-void __glXDispSwap_Translatef(GLbyte * pc)
+void
+__glXDispSwap_Translatef(GLbyte * pc)
{
- CALL_Translatef( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glTranslatef((GLfloat) bswap_FLOAT32(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4),
+ (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_Viewport(GLbyte * pc)
+void
+__glXDispSwap_Viewport(GLbyte * pc)
{
- CALL_Viewport( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLsizei )bswap_CARD32 ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 )
- ) );
+ glViewport((GLint) bswap_CARD32(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12));
}
-void __glXDispSwap_BindTexture(GLbyte * pc)
+void
+__glXDispSwap_BindTexture(GLbyte * pc)
{
- CALL_BindTexture( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
+ glBindTexture((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4));
}
-void __glXDispSwap_Indexubv(GLbyte * pc)
+void
+__glXDispSwap_Indexubv(GLbyte * pc)
{
- CALL_Indexubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
+ glIndexubv((const GLubyte *) (pc + 0));
}
-void __glXDispSwap_PolygonOffset(GLbyte * pc)
+void
+__glXDispSwap_PolygonOffset(GLbyte * pc)
{
- CALL_PolygonOffset( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
+ glPolygonOffset((GLfloat) bswap_FLOAT32(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4));
}
-int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_AreTexturesResident(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
GLboolean retval;
GLboolean answerBuffer[200];
- GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
- retval = CALL_AreTexturesResident( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
- residences
- ) );
+ GLboolean *residences =
+ __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
+ retval =
+ glAreTexturesResident(n,
+ (const GLuint *)
+ bswap_32_array((uint32_t *) (pc + 4), 0),
+ residences);
__glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
error = Success;
}
@@ -2888,24 +2755,27 @@ int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
GLboolean retval;
GLboolean answerBuffer[200];
- GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
- retval = CALL_AreTexturesResident( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
- residences
- ) );
+ GLboolean *residences =
+ __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
+ retval =
+ glAreTexturesResident(n,
+ (const GLuint *)
+ bswap_32_array((uint32_t *) (pc + 4), 0),
+ residences);
__glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval);
error = Success;
}
@@ -2913,116 +2783,115 @@ int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_CopyTexImage1D(GLbyte * pc)
+void
+__glXDispSwap_CopyTexImage1D(GLbyte * pc)
{
- CALL_CopyTexImage1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 )
- ) );
+ glCopyTexImage1D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ (GLsizei) bswap_CARD32(pc + 20),
+ (GLint) bswap_CARD32(pc + 24));
}
-void __glXDispSwap_CopyTexImage2D(GLbyte * pc)
+void
+__glXDispSwap_CopyTexImage2D(GLbyte * pc)
{
- CALL_CopyTexImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 )
- ) );
+ glCopyTexImage2D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ (GLsizei) bswap_CARD32(pc + 20),
+ (GLsizei) bswap_CARD32(pc + 24),
+ (GLint) bswap_CARD32(pc + 28));
}
-void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc)
+void
+__glXDispSwap_CopyTexSubImage1D(GLbyte * pc)
{
- CALL_CopyTexSubImage1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 )
- ) );
+ glCopyTexSubImage1D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ (GLsizei) bswap_CARD32(pc + 20));
}
-void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
+void
+__glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
{
- CALL_CopyTexSubImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLint )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 )
- ) );
+ glCopyTexSubImage2D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ (GLint) bswap_CARD32(pc + 20),
+ (GLsizei) bswap_CARD32(pc + 24),
+ (GLsizei) bswap_CARD32(pc + 28));
}
-int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_DeleteTextures(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
- CALL_DeleteTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ glDeleteTextures(n,
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
+ 0));
error = Success;
}
return error;
}
-int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_DeleteTexturesEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
- CALL_DeleteTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ glDeleteTextures(n,
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
+ 0));
error = Success;
}
return error;
}
-int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GenTextures(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
GLuint answerBuffer[200];
- GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenTextures( GET_DISPATCH(), (
- n,
- textures
- ) );
- (void) bswap_32_array( (uint32_t *) textures, n );
+ GLuint *textures =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ glGenTextures(n, textures);
+ (void) bswap_32_array((uint32_t *) textures, n);
__glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -3030,23 +2899,24 @@ int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
GLuint answerBuffer[200];
- GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenTextures( GET_DISPATCH(), (
- n,
- textures
- ) );
- (void) bswap_32_array( (uint32_t *) textures, n );
+ GLuint *textures =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ glGenTextures(n, textures);
+ (void) bswap_32_array((uint32_t *) textures, n);
__glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -3054,18 +2924,19 @@ int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_IsTexture(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsTexture( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+
+ retval = glIsTexture((GLuint) bswap_CARD32(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -3073,18 +2944,19 @@ int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_IsTextureEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsTexture( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+
+ retval = glIsTexture((GLuint) bswap_CARD32(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -3092,166 +2964,160 @@ int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_PrioritizeTextures(GLbyte * pc)
+void
+__glXDispSwap_PrioritizeTextures(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
- CALL_PrioritizeTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
- (const GLclampf *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ glPrioritizeTextures(n,
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
+ 0),
+ (const GLclampf *)
+ bswap_32_array((uint32_t *) (pc + 4), 0));
}
-void __glXDispSwap_TexSubImage1D(GLbyte * pc)
+void
+__glXDispSwap_TexSubImage1D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 56);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 56));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_TexSubImage1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 36 ),
- (GLenum )bswap_ENUM ( pc + 44 ),
- (GLenum )bswap_ENUM ( pc + 48 ),
- pixels
- ) );
+ glTexSubImage1D((GLenum) bswap_ENUM(pc + 20),
+ (GLint) bswap_CARD32(pc + 24),
+ (GLint) bswap_CARD32(pc + 28),
+ (GLsizei) bswap_CARD32(pc + 36),
+ (GLenum) bswap_ENUM(pc + 44),
+ (GLenum) bswap_ENUM(pc + 48), pixels);
}
-void __glXDispSwap_TexSubImage2D(GLbyte * pc)
+void
+__glXDispSwap_TexSubImage2D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 56);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 56));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_TexSubImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLint )bswap_CARD32 ( pc + 32 ),
- (GLsizei )bswap_CARD32 ( pc + 36 ),
- (GLsizei )bswap_CARD32 ( pc + 40 ),
- (GLenum )bswap_ENUM ( pc + 44 ),
- (GLenum )bswap_ENUM ( pc + 48 ),
- pixels
- ) );
+ glTexSubImage2D((GLenum) bswap_ENUM(pc + 20),
+ (GLint) bswap_CARD32(pc + 24),
+ (GLint) bswap_CARD32(pc + 28),
+ (GLint) bswap_CARD32(pc + 32),
+ (GLsizei) bswap_CARD32(pc + 36),
+ (GLsizei) bswap_CARD32(pc + 40),
+ (GLenum) bswap_ENUM(pc + 44),
+ (GLenum) bswap_ENUM(pc + 48), pixels);
}
-void __glXDispSwap_BlendColor(GLbyte * pc)
+void
+__glXDispSwap_BlendColor(GLbyte * pc)
{
- CALL_BlendColor( GET_DISPATCH(), (
- (GLclampf)bswap_FLOAT32( pc + 0 ),
- (GLclampf)bswap_FLOAT32( pc + 4 ),
- (GLclampf)bswap_FLOAT32( pc + 8 ),
- (GLclampf)bswap_FLOAT32( pc + 12 )
- ) );
+ glBlendColor((GLclampf) bswap_FLOAT32(pc + 0),
+ (GLclampf) bswap_FLOAT32(pc + 4),
+ (GLclampf) bswap_FLOAT32(pc + 8),
+ (GLclampf) bswap_FLOAT32(pc + 12));
}
-void __glXDispSwap_BlendEquation(GLbyte * pc)
+void
+__glXDispSwap_BlendEquation(GLbyte * pc)
{
- CALL_BlendEquation( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glBlendEquation((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_ColorTable(GLbyte * pc)
+void
+__glXDispSwap_ColorTable(GLbyte * pc)
{
- const GLvoid * const table = (const GLvoid *) (pc + 40);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const table = (const GLvoid *) ((pc + 40));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_ColorTable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLenum )bswap_ENUM ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 32 ),
- (GLenum )bswap_ENUM ( pc + 36 ),
- table
- ) );
+ glColorTable((GLenum) bswap_ENUM(pc + 20),
+ (GLenum) bswap_ENUM(pc + 24),
+ (GLsizei) bswap_CARD32(pc + 28),
+ (GLenum) bswap_ENUM(pc + 32),
+ (GLenum) bswap_ENUM(pc + 36), table);
}
-void __glXDispSwap_ColorTableParameterfv(GLbyte * pc)
+void
+__glXDispSwap_ColorTableParameterfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ __glColorTableParameterfv_size(pname));
- CALL_ColorTableParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_ColorTableParameteriv(GLbyte * pc)
+void
+__glXDispSwap_ColorTableParameteriv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
+ __glColorTableParameteriv_size(pname));
- CALL_ColorTableParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_CopyColorTable(GLbyte * pc)
+void
+__glXDispSwap_CopyColorTable(GLbyte * pc)
{
- CALL_CopyColorTable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 )
- ) );
+ glCopyColorTable((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLsizei) bswap_CARD32(pc + 16));
}
-int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetColorTableParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetColorTableParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetColorTableParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3259,29 +3125,30 @@ int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetColorTableParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetColorTableParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3289,29 +3156,30 @@ int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetColorTableParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetColorTableParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetColorTableParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3319,29 +3187,30 @@ int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetColorTableParameterivSGI(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetColorTableParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetColorTableParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3349,176 +3218,168 @@ int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_ColorSubTable(GLbyte * pc)
+void
+__glXDispSwap_ColorSubTable(GLbyte * pc)
{
- const GLvoid * const data = (const GLvoid *) (pc + 40);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const data = (const GLvoid *) ((pc + 40));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_ColorSubTable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 32 ),
- (GLenum )bswap_ENUM ( pc + 36 ),
- data
- ) );
+ glColorSubTable((GLenum) bswap_ENUM(pc + 20),
+ (GLsizei) bswap_CARD32(pc + 24),
+ (GLsizei) bswap_CARD32(pc + 28),
+ (GLenum) bswap_ENUM(pc + 32),
+ (GLenum) bswap_ENUM(pc + 36), data);
}
-void __glXDispSwap_CopyColorSubTable(GLbyte * pc)
+void
+__glXDispSwap_CopyColorSubTable(GLbyte * pc)
{
- CALL_CopyColorSubTable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLsizei )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 )
- ) );
+ glCopyColorSubTable((GLenum) bswap_ENUM(pc + 0),
+ (GLsizei) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLsizei) bswap_CARD32(pc + 16));
}
-void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
+void
+__glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const image = (const GLvoid *) ((pc + 44));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_ConvolutionFilter1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLenum )bswap_ENUM ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 36 ),
- (GLenum )bswap_ENUM ( pc + 40 ),
- image
- ) );
+ glConvolutionFilter1D((GLenum) bswap_ENUM(pc + 20),
+ (GLenum) bswap_ENUM(pc + 24),
+ (GLsizei) bswap_CARD32(pc + 28),
+ (GLenum) bswap_ENUM(pc + 36),
+ (GLenum) bswap_ENUM(pc + 40), image);
}
-void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
+void
+__glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
+ const GLvoid *const image = (const GLvoid *) ((pc + 44));
+ __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_ConvolutionFilter2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLenum )bswap_ENUM ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 32 ),
- (GLenum )bswap_ENUM ( pc + 36 ),
- (GLenum )bswap_ENUM ( pc + 40 ),
- image
- ) );
+ glConvolutionFilter2D((GLenum) bswap_ENUM(pc + 20),
+ (GLenum) bswap_ENUM(pc + 24),
+ (GLsizei) bswap_CARD32(pc + 28),
+ (GLsizei) bswap_CARD32(pc + 32),
+ (GLenum) bswap_ENUM(pc + 36),
+ (GLenum) bswap_ENUM(pc + 40), image);
}
-void __glXDispSwap_ConvolutionParameterf(GLbyte * pc)
+void
+__glXDispSwap_ConvolutionParameterf(GLbyte * pc)
{
- CALL_ConvolutionParameterf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
+ glConvolutionParameterf((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLfloat) bswap_FLOAT32(pc + 8));
}
-void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc)
+void
+__glXDispSwap_ConvolutionParameterfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ __glConvolutionParameterfv_size
+ (pname));
- CALL_ConvolutionParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_ConvolutionParameteri(GLbyte * pc)
+void
+__glXDispSwap_ConvolutionParameteri(GLbyte * pc)
{
- CALL_ConvolutionParameteri( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
+ glConvolutionParameteri((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLint) bswap_CARD32(pc + 8));
}
-void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc)
+void
+__glXDispSwap_ConvolutionParameteriv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 8),
+ __glConvolutionParameteriv_size(pname));
- CALL_ConvolutionParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
+ glConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
}
-void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc)
+void
+__glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc)
{
- CALL_CopyConvolutionFilter1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 )
- ) );
+ glCopyConvolutionFilter1D((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLsizei) bswap_CARD32(pc + 16));
}
-void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc)
+void
+__glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc)
{
- CALL_CopyConvolutionFilter2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 )
- ) );
+ glCopyConvolutionFilter2D((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLsizei) bswap_CARD32(pc + 16),
+ (GLsizei) bswap_CARD32(pc + 20));
}
-int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetConvolutionParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3526,29 +3387,30 @@ int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetConvolutionParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetConvolutionParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3556,29 +3418,30 @@ int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetConvolutionParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3586,29 +3449,30 @@ int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetConvolutionParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetConvolutionParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3616,29 +3480,30 @@ int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetHistogramParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetHistogramParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetHistogramParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetHistogramParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3646,29 +3511,30 @@ int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetHistogramParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetHistogramParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetHistogramParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3676,29 +3542,30 @@ int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetHistogramParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetHistogramParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetHistogramParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetHistogramParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3706,29 +3573,30 @@ int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetHistogramParameterivEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetHistogramParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetHistogramParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetHistogramParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3736,29 +3604,30 @@ int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMinmaxParameterfv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetMinmaxParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3766,29 +3635,30 @@ int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetMinmaxParameterfv_size(pname);
GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLfloat *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMinmaxParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetMinmaxParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3796,29 +3666,30 @@ int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMinmaxParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetMinmaxParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3826,29 +3697,30 @@ int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetMinmaxParameteriv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetMinmaxParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ glGetMinmaxParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -3856,563 +3728,582 @@ int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_Histogram(GLbyte * pc)
-{
- CALL_Histogram( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLsizei )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- *(GLboolean *)(pc + 12)
- ) );
+void
+__glXDispSwap_Histogram(GLbyte * pc)
+{
+ glHistogram((GLenum) bswap_ENUM(pc + 0),
+ (GLsizei) bswap_CARD32(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8), *(GLboolean *) (pc + 12));
}
-void __glXDispSwap_Minmax(GLbyte * pc)
+void
+__glXDispSwap_Minmax(GLbyte * pc)
{
- CALL_Minmax( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- *(GLboolean *)(pc + 8)
- ) );
+ glMinmax((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), *(GLboolean *) (pc + 8));
}
-void __glXDispSwap_ResetHistogram(GLbyte * pc)
+void
+__glXDispSwap_ResetHistogram(GLbyte * pc)
{
- CALL_ResetHistogram( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glResetHistogram((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_ResetMinmax(GLbyte * pc)
+void
+__glXDispSwap_ResetMinmax(GLbyte * pc)
{
- CALL_ResetMinmax( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glResetMinmax((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_TexImage3D(GLbyte * pc)
+void
+__glXDispSwap_TexImage3D(GLbyte * pc)
{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 76);
- const GLvoid * const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80));
- __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
+ const CARD32 ptr_is_null = *(CARD32 *) (pc + 76);
+ const GLvoid *const pixels =
+ (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80));
+ __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_IMAGE_HEIGHT,
+ (GLint) bswap_CARD32(&hdr->imageHeight));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_IMAGES,
+ (GLint) bswap_CARD32(&hdr->skipImages));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_TexImage3D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 36 ),
- (GLint )bswap_CARD32 ( pc + 40 ),
- (GLint )bswap_CARD32 ( pc + 44 ),
- (GLsizei )bswap_CARD32 ( pc + 48 ),
- (GLsizei )bswap_CARD32 ( pc + 52 ),
- (GLsizei )bswap_CARD32 ( pc + 56 ),
- (GLint )bswap_CARD32 ( pc + 64 ),
- (GLenum )bswap_ENUM ( pc + 68 ),
- (GLenum )bswap_ENUM ( pc + 72 ),
- pixels
- ) );
+ glTexImage3D((GLenum) bswap_ENUM(pc + 36),
+ (GLint) bswap_CARD32(pc + 40),
+ (GLint) bswap_CARD32(pc + 44),
+ (GLsizei) bswap_CARD32(pc + 48),
+ (GLsizei) bswap_CARD32(pc + 52),
+ (GLsizei) bswap_CARD32(pc + 56),
+ (GLint) bswap_CARD32(pc + 64),
+ (GLenum) bswap_ENUM(pc + 68),
+ (GLenum) bswap_ENUM(pc + 72), pixels);
}
-void __glXDispSwap_TexSubImage3D(GLbyte * pc)
+void
+__glXDispSwap_TexSubImage3D(GLbyte * pc)
{
- const GLvoid * const pixels = (const GLvoid *) (pc + 88);
- __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
+ const GLvoid *const pixels = (const GLvoid *) ((pc + 88));
+ __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc);
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
+ glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes);
+ glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength));
+ glPixelStorei(GL_UNPACK_IMAGE_HEIGHT,
+ (GLint) bswap_CARD32(&hdr->imageHeight));
+ glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows));
+ glPixelStorei(GL_UNPACK_SKIP_IMAGES,
+ (GLint) bswap_CARD32(&hdr->skipImages));
+ glPixelStorei(GL_UNPACK_SKIP_PIXELS,
+ (GLint) bswap_CARD32(&hdr->skipPixels));
+ glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment));
- CALL_TexSubImage3D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 36 ),
- (GLint )bswap_CARD32 ( pc + 40 ),
- (GLint )bswap_CARD32 ( pc + 44 ),
- (GLint )bswap_CARD32 ( pc + 48 ),
- (GLint )bswap_CARD32 ( pc + 52 ),
- (GLsizei )bswap_CARD32 ( pc + 60 ),
- (GLsizei )bswap_CARD32 ( pc + 64 ),
- (GLsizei )bswap_CARD32 ( pc + 68 ),
- (GLenum )bswap_ENUM ( pc + 76 ),
- (GLenum )bswap_ENUM ( pc + 80 ),
- pixels
- ) );
+ glTexSubImage3D((GLenum) bswap_ENUM(pc + 36),
+ (GLint) bswap_CARD32(pc + 40),
+ (GLint) bswap_CARD32(pc + 44),
+ (GLint) bswap_CARD32(pc + 48),
+ (GLint) bswap_CARD32(pc + 52),
+ (GLsizei) bswap_CARD32(pc + 60),
+ (GLsizei) bswap_CARD32(pc + 64),
+ (GLsizei) bswap_CARD32(pc + 68),
+ (GLenum) bswap_ENUM(pc + 76),
+ (GLenum) bswap_ENUM(pc + 80), pixels);
}
-void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc)
+void
+__glXDispSwap_CopyTexSubImage3D(GLbyte * pc)
{
- CALL_CopyTexSubImage3D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLint )bswap_CARD32 ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 32 )
- ) );
+ glCopyTexSubImage3D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ (GLint) bswap_CARD32(pc + 20),
+ (GLint) bswap_CARD32(pc + 24),
+ (GLsizei) bswap_CARD32(pc + 28),
+ (GLsizei) bswap_CARD32(pc + 32));
}
-void __glXDispSwap_ActiveTexture(GLbyte * pc)
+void
+__glXDispSwap_ActiveTexture(GLbyte * pc)
{
- CALL_ActiveTexture( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ glActiveTextureARB((GLenum) bswap_ENUM(pc + 0));
}
-void __glXDispSwap_MultiTexCoord1dv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord1dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 12);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 12);
pc -= 4;
}
#endif
- CALL_MultiTexCoord1dv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 8 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
+ glMultiTexCoord1dvARB((GLenum) bswap_ENUM(pc + 8),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0),
+ 1));
}
-void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc)
{
- CALL_MultiTexCoord1fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 )
- ) );
+ glMultiTexCoord1fvARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLfloat *)
+ bswap_32_array((uint32_t *) (pc + 4), 1));
}
-void __glXDispSwap_MultiTexCoord1iv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord1iv(GLbyte * pc)
{
- CALL_MultiTexCoord1iv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 1 )
- ) );
+ glMultiTexCoord1ivARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
+ 1));
}
-void __glXDispSwap_MultiTexCoord1sv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord1sv(GLbyte * pc)
{
- CALL_MultiTexCoord1sv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 )
- ) );
+ glMultiTexCoord1svARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 1));
}
-void __glXDispSwap_MultiTexCoord2dv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord2dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 20);
pc -= 4;
}
#endif
- CALL_MultiTexCoord2dv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 16 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
+ glMultiTexCoord2dvARB((GLenum) bswap_ENUM(pc + 16),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0),
+ 2));
}
-void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc)
{
- CALL_MultiTexCoord2fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 )
- ) );
+ glMultiTexCoord2fvARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLfloat *)
+ bswap_32_array((uint32_t *) (pc + 4), 2));
}
-void __glXDispSwap_MultiTexCoord2iv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord2iv(GLbyte * pc)
{
- CALL_MultiTexCoord2iv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 2 )
- ) );
+ glMultiTexCoord2ivARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
+ 2));
}
-void __glXDispSwap_MultiTexCoord2sv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord2sv(GLbyte * pc)
{
- CALL_MultiTexCoord2sv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 )
- ) );
+ glMultiTexCoord2svARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 2));
}
-void __glXDispSwap_MultiTexCoord3dv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord3dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 28);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 28);
pc -= 4;
}
#endif
- CALL_MultiTexCoord3dv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 24 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
+ glMultiTexCoord3dvARB((GLenum) bswap_ENUM(pc + 24),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0),
+ 3));
}
-void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc)
{
- CALL_MultiTexCoord3fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 )
- ) );
+ glMultiTexCoord3fvARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLfloat *)
+ bswap_32_array((uint32_t *) (pc + 4), 3));
}
-void __glXDispSwap_MultiTexCoord3iv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord3iv(GLbyte * pc)
{
- CALL_MultiTexCoord3iv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 3 )
- ) );
+ glMultiTexCoord3ivARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
+ 3));
}
-void __glXDispSwap_MultiTexCoord3sv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord3sv(GLbyte * pc)
{
- CALL_MultiTexCoord3sv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 )
- ) );
+ glMultiTexCoord3svARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 3));
}
-void __glXDispSwap_MultiTexCoord4dv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord4dv(GLbyte * pc)
{
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 36);
pc -= 4;
}
#endif
- CALL_MultiTexCoord4dv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 32 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
+ glMultiTexCoord4dvARB((GLenum) bswap_ENUM(pc + 32),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0),
+ 4));
}
-void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc)
{
- CALL_MultiTexCoord4fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
+ glMultiTexCoord4fvARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLfloat *)
+ bswap_32_array((uint32_t *) (pc + 4), 4));
}
-void __glXDispSwap_MultiTexCoord4iv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord4iv(GLbyte * pc)
{
- CALL_MultiTexCoord4iv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
+ glMultiTexCoord4ivARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_MultiTexCoord4sv(GLbyte * pc)
+void
+__glXDispSwap_MultiTexCoord4sv(GLbyte * pc)
{
- CALL_MultiTexCoord4sv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 )
- ) );
+ glMultiTexCoord4svARB((GLenum) bswap_ENUM(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_CompressedTexImage1D(GLbyte * pc)
+void
+__glXDispSwap_CompressedTexImage1D(GLbyte * pc)
{
- const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 );
+ PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D =
+ __glGetProcAddress("glCompressedTexImage1D");
+ const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 20);
- CALL_CompressedTexImage1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- imageSize,
- (const GLvoid *)(pc + 24)
- ) );
+ CompressedTexImage1D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLsizei) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ imageSize, (const GLvoid *) (pc + 24));
}
-void __glXDispSwap_CompressedTexImage2D(GLbyte * pc)
+void
+__glXDispSwap_CompressedTexImage2D(GLbyte * pc)
{
- const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 24 );
+ PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D =
+ __glGetProcAddress("glCompressedTexImage2D");
+ const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 24);
- CALL_CompressedTexImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 ),
- (GLint )bswap_CARD32 ( pc + 20 ),
- imageSize,
- (const GLvoid *)(pc + 28)
- ) );
+ CompressedTexImage2D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLsizei) bswap_CARD32(pc + 12),
+ (GLsizei) bswap_CARD32(pc + 16),
+ (GLint) bswap_CARD32(pc + 20),
+ imageSize, (const GLvoid *) (pc + 28));
}
-void __glXDispSwap_CompressedTexImage3D(GLbyte * pc)
+void
+__glXDispSwap_CompressedTexImage3D(GLbyte * pc)
{
- const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 );
+ PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D =
+ __glGetProcAddress("glCompressedTexImage3D");
+ const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 28);
- CALL_CompressedTexImage3D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- imageSize,
- (const GLvoid *)(pc + 32)
- ) );
+ CompressedTexImage3D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLsizei) bswap_CARD32(pc + 12),
+ (GLsizei) bswap_CARD32(pc + 16),
+ (GLsizei) bswap_CARD32(pc + 20),
+ (GLint) bswap_CARD32(pc + 24),
+ imageSize, (const GLvoid *) (pc + 32));
}
-void __glXDispSwap_CompressedTexSubImage1D(GLbyte * pc)
+void
+__glXDispSwap_CompressedTexSubImage1D(GLbyte * pc)
{
- const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 );
+ PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D =
+ __glGetProcAddress("glCompressedTexSubImage1D");
+ const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 20);
- CALL_CompressedTexSubImage1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 ),
- (GLenum )bswap_ENUM ( pc + 16 ),
- imageSize,
- (const GLvoid *)(pc + 24)
- ) );
+ CompressedTexSubImage1D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLsizei) bswap_CARD32(pc + 12),
+ (GLenum) bswap_ENUM(pc + 16),
+ imageSize, (const GLvoid *) (pc + 24));
}
-void __glXDispSwap_CompressedTexSubImage2D(GLbyte * pc)
+void
+__glXDispSwap_CompressedTexSubImage2D(GLbyte * pc)
{
- const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 );
+ PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D =
+ __glGetProcAddress("glCompressedTexSubImage2D");
+ const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 28);
- CALL_CompressedTexSubImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLenum )bswap_ENUM ( pc + 24 ),
- imageSize,
- (const GLvoid *)(pc + 32)
- ) );
+ CompressedTexSubImage2D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLsizei) bswap_CARD32(pc + 16),
+ (GLsizei) bswap_CARD32(pc + 20),
+ (GLenum) bswap_ENUM(pc + 24),
+ imageSize, (const GLvoid *) (pc + 32));
}
-void __glXDispSwap_CompressedTexSubImage3D(GLbyte * pc)
+void
+__glXDispSwap_CompressedTexSubImage3D(GLbyte * pc)
{
- const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 36 );
+ PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D =
+ __glGetProcAddress("glCompressedTexSubImage3D");
+ const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 36);
- CALL_CompressedTexSubImage3D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 32 ),
- imageSize,
- (const GLvoid *)(pc + 40)
- ) );
+ CompressedTexSubImage3D((GLenum) bswap_ENUM(pc + 0),
+ (GLint) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ (GLsizei) bswap_CARD32(pc + 20),
+ (GLsizei) bswap_CARD32(pc + 24),
+ (GLsizei) bswap_CARD32(pc + 28),
+ (GLenum) bswap_ENUM(pc + 32),
+ imageSize, (const GLvoid *) (pc + 40));
}
-void __glXDispSwap_SampleCoverage(GLbyte * pc)
+void
+__glXDispSwap_SampleCoverage(GLbyte * pc)
{
- CALL_SampleCoverage( GET_DISPATCH(), (
- (GLclampf)bswap_FLOAT32( pc + 0 ),
- *(GLboolean *)(pc + 4)
- ) );
+ PFNGLSAMPLECOVERAGEPROC SampleCoverage =
+ __glGetProcAddress("glSampleCoverage");
+ SampleCoverage((GLclampf) bswap_FLOAT32(pc + 0), *(GLboolean *) (pc + 4));
}
-void __glXDispSwap_BlendFuncSeparate(GLbyte * pc)
+void
+__glXDispSwap_BlendFuncSeparate(GLbyte * pc)
{
- CALL_BlendFuncSeparate( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLenum )bswap_ENUM ( pc + 12 )
- ) );
+ PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate =
+ __glGetProcAddress("glBlendFuncSeparate");
+ BlendFuncSeparate((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLenum) bswap_ENUM(pc + 12));
}
-void __glXDispSwap_FogCoorddv(GLbyte * pc)
+void
+__glXDispSwap_FogCoorddv(GLbyte * pc)
{
+ PFNGLFOGCOORDDVPROC FogCoorddv = __glGetProcAddress("glFogCoorddv");
+
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 8);
pc -= 4;
}
#endif
- CALL_FogCoorddv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
+ FogCoorddv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1));
}
-void __glXDispSwap_PointParameterf(GLbyte * pc)
+void
+__glXDispSwap_PointParameterf(GLbyte * pc)
{
- CALL_PointParameterf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
+ PFNGLPOINTPARAMETERFPROC PointParameterf =
+ __glGetProcAddress("glPointParameterf");
+ PointParameterf((GLenum) bswap_ENUM(pc + 0),
+ (GLfloat) bswap_FLOAT32(pc + 4));
}
-void __glXDispSwap_PointParameterfv(GLbyte * pc)
+void
+__glXDispSwap_PointParameterfv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLfloat * params;
+ PFNGLPOINTPARAMETERFVPROC PointParameterfv =
+ __glGetProcAddress("glPointParameterfv");
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
+ const GLfloat *params;
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfv_size(pname) );
+ params =
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ __glPointParameterfv_size(pname));
- CALL_PointParameterfv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ PointParameterfv(pname, params);
}
-void __glXDispSwap_PointParameteri(GLbyte * pc)
+void
+__glXDispSwap_PointParameteri(GLbyte * pc)
{
- CALL_PointParameteri( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
+ PFNGLPOINTPARAMETERIPROC PointParameteri =
+ __glGetProcAddress("glPointParameteri");
+ PointParameteri((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4));
}
-void __glXDispSwap_PointParameteriv(GLbyte * pc)
+void
+__glXDispSwap_PointParameteriv(GLbyte * pc)
{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLint * params;
+ PFNGLPOINTPARAMETERIVPROC PointParameteriv =
+ __glGetProcAddress("glPointParameteriv");
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 0);
+ const GLint *params;
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameteriv_size(pname) );
+ params =
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4),
+ __glPointParameteriv_size(pname));
- CALL_PointParameteriv( GET_DISPATCH(), (
- pname,
- params
- ) );
+ PointParameteriv(pname, params);
}
-void __glXDispSwap_SecondaryColor3bv(GLbyte * pc)
+void
+__glXDispSwap_SecondaryColor3bv(GLbyte * pc)
{
- CALL_SecondaryColor3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
+ PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv =
+ __glGetProcAddress("glSecondaryColor3bv");
+ SecondaryColor3bv((const GLbyte *) (pc + 0));
}
-void __glXDispSwap_SecondaryColor3dv(GLbyte * pc)
+void
+__glXDispSwap_SecondaryColor3dv(GLbyte * pc)
{
+ PFNGLSECONDARYCOLOR3DVPROC SecondaryColor3dv =
+ __glGetProcAddress("glSecondaryColor3dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 24);
pc -= 4;
}
#endif
- CALL_SecondaryColor3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
+ SecondaryColor3dv((const GLdouble *)
+ bswap_64_array((uint64_t *) (pc + 0), 3));
}
-void __glXDispSwap_SecondaryColor3iv(GLbyte * pc)
+void
+__glXDispSwap_SecondaryColor3iv(GLbyte * pc)
{
- CALL_SecondaryColor3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv =
+ __glGetProcAddress("glSecondaryColor3iv");
+ SecondaryColor3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_SecondaryColor3sv(GLbyte * pc)
+void
+__glXDispSwap_SecondaryColor3sv(GLbyte * pc)
{
- CALL_SecondaryColor3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
+ PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv =
+ __glGetProcAddress("glSecondaryColor3sv");
+ SecondaryColor3sv((const GLshort *)
+ bswap_16_array((uint16_t *) (pc + 0), 3));
}
-void __glXDispSwap_SecondaryColor3ubv(GLbyte * pc)
+void
+__glXDispSwap_SecondaryColor3ubv(GLbyte * pc)
{
- CALL_SecondaryColor3ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
+ PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv =
+ __glGetProcAddress("glSecondaryColor3ubv");
+ SecondaryColor3ubv((const GLubyte *) (pc + 0));
}
-void __glXDispSwap_SecondaryColor3uiv(GLbyte * pc)
+void
+__glXDispSwap_SecondaryColor3uiv(GLbyte * pc)
{
- CALL_SecondaryColor3uiv( GET_DISPATCH(), (
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv =
+ __glGetProcAddress("glSecondaryColor3uiv");
+ SecondaryColor3uiv((const GLuint *)
+ bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_SecondaryColor3usv(GLbyte * pc)
+void
+__glXDispSwap_SecondaryColor3usv(GLbyte * pc)
{
- CALL_SecondaryColor3usv( GET_DISPATCH(), (
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
+ PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv =
+ __glGetProcAddress("glSecondaryColor3usv");
+ SecondaryColor3usv((const GLushort *)
+ bswap_16_array((uint16_t *) (pc + 0), 3));
}
-void __glXDispSwap_WindowPos3fv(GLbyte * pc)
+void
+__glXDispSwap_WindowPos3fv(GLbyte * pc)
{
- CALL_WindowPos3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
+ PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv");
+
+ WindowPos3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_BeginQuery(GLbyte * pc)
+void
+__glXDispSwap_BeginQuery(GLbyte * pc)
{
- CALL_BeginQuery( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
+ PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery");
+
+ BeginQuery((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4));
}
-int __glXDispSwap_DeleteQueries(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_DeleteQueries(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLDELETEQUERIESPROC DeleteQueries =
+ __glGetProcAddress("glDeleteQueries");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
- CALL_DeleteQueries( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ DeleteQueries(n,
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
+ 0));
error = Success;
}
return error;
}
-void __glXDispSwap_EndQuery(GLbyte * pc)
+void
+__glXDispSwap_EndQuery(GLbyte * pc)
{
- CALL_EndQuery( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery");
+
+ EndQuery((GLenum) bswap_ENUM(pc + 0));
}
-int __glXDispSwap_GenQueries(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GenQueries(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLGENQUERIESPROC GenQueries = __glGetProcAddress("glGenQueries");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
GLuint answerBuffer[200];
- GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenQueries( GET_DISPATCH(), (
- n,
- ids
- ) );
- (void) bswap_32_array( (uint32_t *) ids, n );
+ GLuint *ids =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ GenQueries(n, ids);
+ (void) bswap_32_array((uint32_t *) ids, n);
__glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -4420,29 +4311,32 @@ int __glXDispSwap_GenQueries(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetQueryObjectiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetQueryObjectiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv =
+ __glGetProcAddress("glGetQueryObjectiv");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetQueryObjectiv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetQueryObjectiv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ GetQueryObjectiv((GLuint) bswap_CARD32(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -4450,29 +4344,32 @@ int __glXDispSwap_GetQueryObjectiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetQueryObjectuiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetQueryObjectuiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv =
+ __glGetProcAddress("glGetQueryObjectuiv");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetQueryObjectuiv_size(pname);
GLuint answerBuffer[200];
- GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLuint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetQueryObjectuiv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ GetQueryObjectuiv((GLuint) bswap_CARD32(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -4480,29 +4377,31 @@ int __glXDispSwap_GetQueryObjectuiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetQueryiv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetQueryiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLGETQUERYIVPROC GetQueryiv = __glGetProcAddress("glGetQueryiv");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetQueryiv_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetQueryiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ GetQueryiv((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -4510,18 +4409,20 @@ int __glXDispSwap_GetQueryiv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_IsQuery(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_IsQuery(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq * const req = (xGLXSingleReq *) pc;
+ PFNGLISQUERYPROC IsQuery = __glGetProcAddress("glIsQuery");
+ xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_SINGLE_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsQuery( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+
+ retval = IsQuery((GLuint) bswap_CARD32(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -4529,347 +4430,287 @@ int __glXDispSwap_IsQuery(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_BlendEquationSeparate(GLbyte * pc)
+void
+__glXDispSwap_BlendEquationSeparate(GLbyte * pc)
{
- CALL_BlendEquationSeparate( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
+ PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate =
+ __glGetProcAddress("glBlendEquationSeparate");
+ BlendEquationSeparate((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4));
}
-void __glXDispSwap_DrawBuffers(GLbyte * pc)
+void
+__glXDispSwap_DrawBuffers(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ PFNGLDRAWBUFFERSPROC DrawBuffers = __glGetProcAddress("glDrawBuffers");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
- CALL_DrawBuffers( GET_DISPATCH(), (
- n,
- (const GLenum *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ DrawBuffers(n, (const GLenum *) bswap_32_array((uint32_t *) (pc + 4), 0));
}
-int __glXDispSwap_GetVertexAttribdv(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetVertexAttribdv_size(pname);
- GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribdv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, compsize );
- __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetVertexAttribfv(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetVertexAttribfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribfv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
- __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetVertexAttribiv(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetVertexAttribiv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribiv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
- __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_VertexAttrib1dv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib1dv(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv =
+ __glGetProcAddress("glVertexAttrib1dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 12);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 12);
pc -= 4;
}
#endif
- CALL_VertexAttrib1dv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 )
- ) );
+ VertexAttrib1dv((GLuint) bswap_CARD32(pc + 0),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
+ 1));
}
-void __glXDispSwap_VertexAttrib1sv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib1sv(GLbyte * pc)
{
- CALL_VertexAttrib1sv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 )
- ) );
+ PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv =
+ __glGetProcAddress("glVertexAttrib1sv");
+ VertexAttrib1sv((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 1));
}
-void __glXDispSwap_VertexAttrib2dv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib2dv(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv =
+ __glGetProcAddress("glVertexAttrib2dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 20);
pc -= 4;
}
#endif
- CALL_VertexAttrib2dv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 )
- ) );
+ VertexAttrib2dv((GLuint) bswap_CARD32(pc + 0),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
+ 2));
}
-void __glXDispSwap_VertexAttrib2sv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib2sv(GLbyte * pc)
{
- CALL_VertexAttrib2sv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 )
- ) );
+ PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv =
+ __glGetProcAddress("glVertexAttrib2sv");
+ VertexAttrib2sv((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2));
}
-void __glXDispSwap_VertexAttrib3dv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib3dv(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv =
+ __glGetProcAddress("glVertexAttrib3dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 28);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 28);
pc -= 4;
}
#endif
- CALL_VertexAttrib3dv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 )
- ) );
+ VertexAttrib3dv((GLuint) bswap_CARD32(pc + 0),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
+ 3));
}
-void __glXDispSwap_VertexAttrib3sv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib3sv(GLbyte * pc)
{
- CALL_VertexAttrib3sv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 )
- ) );
+ PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv =
+ __glGetProcAddress("glVertexAttrib3sv");
+ VertexAttrib3sv((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 3));
}
-void __glXDispSwap_VertexAttrib4Nbv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4Nbv(GLbyte * pc)
{
- CALL_VertexAttrib4Nbv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLbyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv =
+ __glGetProcAddress("glVertexAttrib4Nbv");
+ VertexAttrib4Nbv((GLuint) bswap_CARD32(pc + 0), (const GLbyte *) (pc + 4));
}
-void __glXDispSwap_VertexAttrib4Niv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4Niv(GLbyte * pc)
{
- CALL_VertexAttrib4Niv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv =
+ __glGetProcAddress("glVertexAttrib4Niv");
+ VertexAttrib4Niv((GLuint) bswap_CARD32(pc + 0),
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4));
}
-void __glXDispSwap_VertexAttrib4Nsv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4Nsv(GLbyte * pc)
{
- CALL_VertexAttrib4Nsv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv =
+ __glGetProcAddress("glVertexAttrib4Nsv");
+ VertexAttrib4Nsv((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_VertexAttrib4Nubv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4Nubv(GLbyte * pc)
{
- CALL_VertexAttrib4Nubv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLubyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv =
+ __glGetProcAddress("glVertexAttrib4Nubv");
+ VertexAttrib4Nubv((GLuint) bswap_CARD32(pc + 0),
+ (const GLubyte *) (pc + 4));
}
-void __glXDispSwap_VertexAttrib4Nuiv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4Nuiv(GLbyte * pc)
{
- CALL_VertexAttrib4Nuiv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv =
+ __glGetProcAddress("glVertexAttrib4Nuiv");
+ VertexAttrib4Nuiv((GLuint) bswap_CARD32(pc + 0),
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_VertexAttrib4Nusv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4Nusv(GLbyte * pc)
{
- CALL_VertexAttrib4Nusv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv =
+ __glGetProcAddress("glVertexAttrib4Nusv");
+ VertexAttrib4Nusv((GLuint) bswap_CARD32(pc + 0),
+ (const GLushort *) bswap_16_array((uint16_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_VertexAttrib4bv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4bv(GLbyte * pc)
{
- CALL_VertexAttrib4bv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLbyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv =
+ __glGetProcAddress("glVertexAttrib4bv");
+ VertexAttrib4bv((GLuint) bswap_CARD32(pc + 0), (const GLbyte *) (pc + 4));
}
-void __glXDispSwap_VertexAttrib4dv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4dv(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv =
+ __glGetProcAddress("glVertexAttrib4dv");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 36);
pc -= 4;
}
#endif
- CALL_VertexAttrib4dv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 )
- ) );
+ VertexAttrib4dv((GLuint) bswap_CARD32(pc + 0),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_VertexAttrib4iv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4iv(GLbyte * pc)
{
- CALL_VertexAttrib4iv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv =
+ __glGetProcAddress("glVertexAttrib4iv");
+ VertexAttrib4iv((GLuint) bswap_CARD32(pc + 0),
+ (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4));
}
-void __glXDispSwap_VertexAttrib4sv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4sv(GLbyte * pc)
{
- CALL_VertexAttrib4sv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv =
+ __glGetProcAddress("glVertexAttrib4sv");
+ VertexAttrib4sv((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 4));
}
-void __glXDispSwap_VertexAttrib4ubv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4ubv(GLbyte * pc)
{
- CALL_VertexAttrib4ubv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLubyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv =
+ __glGetProcAddress("glVertexAttrib4ubv");
+ VertexAttrib4ubv((GLuint) bswap_CARD32(pc + 0), (const GLubyte *) (pc + 4));
}
-void __glXDispSwap_VertexAttrib4uiv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4uiv(GLbyte * pc)
{
- CALL_VertexAttrib4uiv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv =
+ __glGetProcAddress("glVertexAttrib4uiv");
+ VertexAttrib4uiv((GLuint) bswap_CARD32(pc + 0),
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 4));
}
-void __glXDispSwap_VertexAttrib4usv(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4usv(GLbyte * pc)
{
- CALL_VertexAttrib4usv( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv =
+ __glGetProcAddress("glVertexAttrib4usv");
+ VertexAttrib4usv((GLuint) bswap_CARD32(pc + 0),
+ (const GLushort *) bswap_16_array((uint16_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_ClampColor(GLbyte * pc)
+void
+__glXDispSwap_ClampColor(GLbyte * pc)
{
- CALL_ClampColor( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
+ PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor");
+
+ ClampColor((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4));
}
-void __glXDispSwap_BindProgramARB(GLbyte * pc)
+void
+__glXDispSwap_BindProgramARB(GLbyte * pc)
{
- CALL_BindProgramARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
+ PFNGLBINDPROGRAMARBPROC BindProgramARB =
+ __glGetProcAddress("glBindProgramARB");
+ BindProgramARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4));
}
-int __glXDispSwap_DeleteProgramsARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_DeleteProgramsARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLDELETEPROGRAMSARBPROC DeleteProgramsARB =
+ __glGetProcAddress("glDeleteProgramsARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
- CALL_DeleteProgramsARB( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ DeleteProgramsARB(n,
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
+ 0));
error = Success;
}
return error;
}
-int __glXDispSwap_GenProgramsARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GenProgramsARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGENPROGRAMSARBPROC GenProgramsARB =
+ __glGetProcAddress("glGenProgramsARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
GLuint answerBuffer[200];
- GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenProgramsARB( GET_DISPATCH(), (
- n,
- programs
- ) );
- (void) bswap_32_array( (uint32_t *) programs, n );
+ GLuint *programs =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ GenProgramsARB(n, programs);
+ (void) bswap_32_array((uint32_t *) programs, n);
__glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -4877,21 +4718,23 @@ int __glXDispSwap_GenProgramsARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMENVPARAMETERDVARBPROC GetProgramEnvParameterdvARB =
+ __glGetProcAddress("glGetProgramEnvParameterdvARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLdouble params[4];
- CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, 4 );
+
+ GetProgramEnvParameterdvARB((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4), params);
+ (void) bswap_64_array((uint64_t *) params, 4);
__glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
error = Success;
}
@@ -4899,21 +4742,23 @@ int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMENVPARAMETERFVARBPROC GetProgramEnvParameterfvARB =
+ __glGetProcAddress("glGetProgramEnvParameterfvARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLfloat params[4];
- CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 4 );
+
+ GetProgramEnvParameterfvARB((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4), params);
+ (void) bswap_32_array((uint32_t *) params, 4);
__glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
error = Success;
}
@@ -4921,21 +4766,23 @@ int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC GetProgramLocalParameterdvARB =
+ __glGetProcAddress("glGetProgramLocalParameterdvARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLdouble params[4];
- CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, 4 );
+
+ GetProgramLocalParameterdvARB((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4), params);
+ (void) bswap_64_array((uint64_t *) params, 4);
__glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
error = Success;
}
@@ -4943,21 +4790,23 @@ int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc return error;
}
-int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC GetProgramLocalParameterfvARB =
+ __glGetProcAddress("glGetProgramLocalParameterfvARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLfloat params[4];
- CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 4 );
+
+ GetProgramLocalParameterfvARB((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4), params);
+ (void) bswap_32_array((uint32_t *) params, 4);
__glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
error = Success;
}
@@ -4965,29 +4814,32 @@ int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc return error;
}
-int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetProgramivARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETPROGRAMIVARBPROC GetProgramivARB =
+ __glGetProcAddress("glGetProgramivARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
+ if (cx != NULL) {
+ const GLenum pname = (GLenum) bswap_ENUM(pc + 4);
const GLuint compsize = __glGetProgramivARB_size(pname);
GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
+ GLint *params =
+ __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
+ sizeof(answerBuffer), 4);
- if (params == NULL) return BadAlloc;
+ if (params == NULL)
+ return BadAlloc;
__glXClearErrorOccured();
- CALL_GetProgramivARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
+ GetProgramivARB((GLenum) bswap_ENUM(pc + 0), pname, params);
+ (void) bswap_32_array((uint32_t *) params, compsize);
__glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
error = Success;
}
@@ -4995,18 +4847,20 @@ int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_IsProgramARB(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_IsProgramARB(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLISPROGRAMARBPROC IsProgramARB = __glGetProcAddress("glIsProgramARB");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsProgramARB( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+
+ retval = IsProgramARB((GLuint) bswap_CARD32(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -5014,144 +4868,163 @@ int __glXDispSwap_IsProgramARB(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc)
+void
+__glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc)
{
+ PFNGLPROGRAMENVPARAMETER4DVARBPROC ProgramEnvParameter4dvARB =
+ __glGetProcAddress("glProgramEnvParameter4dvARB");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 40);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 40);
pc -= 4;
}
#endif
- CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 )
- ) );
+ ProgramEnvParameter4dvARB((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4),
+ (const GLdouble *)
+ bswap_64_array((uint64_t *) (pc + 8), 4));
}
-void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc)
+void
+__glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc)
{
- CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 )
- ) );
+ PFNGLPROGRAMENVPARAMETER4FVARBPROC ProgramEnvParameter4fvARB =
+ __glGetProcAddress("glProgramEnvParameter4fvARB");
+ ProgramEnvParameter4fvARB((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4),
+ (const GLfloat *)
+ bswap_32_array((uint32_t *) (pc + 8), 4));
}
-void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc)
+void
+__glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc)
{
+ PFNGLPROGRAMLOCALPARAMETER4DVARBPROC ProgramLocalParameter4dvARB =
+ __glGetProcAddress("glProgramLocalParameter4dvARB");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 40);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 40);
pc -= 4;
}
#endif
- CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 )
- ) );
+ ProgramLocalParameter4dvARB((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4),
+ (const GLdouble *)
+ bswap_64_array((uint64_t *) (pc + 8), 4));
}
-void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc)
+void
+__glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc)
{
- CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 )
- ) );
+ PFNGLPROGRAMLOCALPARAMETER4FVARBPROC ProgramLocalParameter4fvARB =
+ __glGetProcAddress("glProgramLocalParameter4fvARB");
+ ProgramLocalParameter4fvARB((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4),
+ (const GLfloat *)
+ bswap_32_array((uint32_t *) (pc + 8), 4));
}
-void __glXDispSwap_ProgramStringARB(GLbyte * pc)
+void
+__glXDispSwap_ProgramStringARB(GLbyte * pc)
{
- const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 );
+ PFNGLPROGRAMSTRINGARBPROC ProgramStringARB =
+ __glGetProcAddress("glProgramStringARB");
+ const GLsizei len = (GLsizei) bswap_CARD32(pc + 8);
- CALL_ProgramStringARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- len,
- (const GLvoid *)(pc + 12)
- ) );
+ ProgramStringARB((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ len, (const GLvoid *) (pc + 12));
}
-void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib1fvARB(GLbyte * pc)
{
- CALL_VertexAttrib1fvARB( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 )
- ) );
+ PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB =
+ __glGetProcAddress("glVertexAttrib1fvARB");
+ VertexAttrib1fvARB((GLuint) bswap_CARD32(pc + 0),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ 1));
}
-void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib2fvARB(GLbyte * pc)
{
- CALL_VertexAttrib2fvARB( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 )
- ) );
+ PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB =
+ __glGetProcAddress("glVertexAttrib2fvARB");
+ VertexAttrib2fvARB((GLuint) bswap_CARD32(pc + 0),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ 2));
}
-void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib3fvARB(GLbyte * pc)
{
- CALL_VertexAttrib3fvARB( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 )
- ) );
+ PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB =
+ __glGetProcAddress("glVertexAttrib3fvARB");
+ VertexAttrib3fvARB((GLuint) bswap_CARD32(pc + 0),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ 3));
}
-void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4fvARB(GLbyte * pc)
{
- CALL_VertexAttrib4fvARB( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB =
+ __glGetProcAddress("glVertexAttrib4fvARB");
+ VertexAttrib4fvARB((GLuint) bswap_CARD32(pc + 0),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_BindFramebuffer(GLbyte * pc)
+void
+__glXDispSwap_BindFramebuffer(GLbyte * pc)
{
- CALL_BindFramebuffer( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
+ PFNGLBINDFRAMEBUFFERPROC BindFramebuffer =
+ __glGetProcAddress("glBindFramebuffer");
+ BindFramebuffer((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4));
}
-void __glXDispSwap_BindRenderbuffer(GLbyte * pc)
+void
+__glXDispSwap_BindRenderbuffer(GLbyte * pc)
{
- CALL_BindRenderbuffer( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
+ PFNGLBINDRENDERBUFFERPROC BindRenderbuffer =
+ __glGetProcAddress("glBindRenderbuffer");
+ BindRenderbuffer((GLenum) bswap_ENUM(pc + 0),
+ (GLuint) bswap_CARD32(pc + 4));
}
-void __glXDispSwap_BlitFramebuffer(GLbyte * pc)
+void
+__glXDispSwap_BlitFramebuffer(GLbyte * pc)
{
- CALL_BlitFramebuffer( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLint )bswap_CARD32 ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLbitfield)bswap_CARD32 ( pc + 32 ),
- (GLenum )bswap_ENUM ( pc + 36 )
- ) );
+ PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer =
+ __glGetProcAddress("glBlitFramebuffer");
+ BlitFramebuffer((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4),
+ (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ (GLint) bswap_CARD32(pc + 20),
+ (GLint) bswap_CARD32(pc + 24),
+ (GLint) bswap_CARD32(pc + 28),
+ (GLbitfield) bswap_CARD32(pc + 32),
+ (GLenum) bswap_ENUM(pc + 36));
}
-int __glXDispSwap_CheckFramebufferStatus(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_CheckFramebufferStatus(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus =
+ __glGetProcAddress("glCheckFramebufferStatus");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLenum retval;
- retval = CALL_CheckFramebufferStatus( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+
+ retval = CheckFramebufferStatus((GLenum) bswap_ENUM(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -5159,98 +5032,110 @@ int __glXDispSwap_CheckFramebufferStatus(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_DeleteFramebuffers(GLbyte * pc)
+void
+__glXDispSwap_DeleteFramebuffers(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers =
+ __glGetProcAddress("glDeleteFramebuffers");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
- CALL_DeleteFramebuffers( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ DeleteFramebuffers(n,
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
+ 0));
}
-void __glXDispSwap_DeleteRenderbuffers(GLbyte * pc)
+void
+__glXDispSwap_DeleteRenderbuffers(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers =
+ __glGetProcAddress("glDeleteRenderbuffers");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
- CALL_DeleteRenderbuffers( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ DeleteRenderbuffers(n,
+ (const GLuint *) bswap_32_array((uint32_t *) (pc + 4),
+ 0));
}
-void __glXDispSwap_FramebufferRenderbuffer(GLbyte * pc)
+void
+__glXDispSwap_FramebufferRenderbuffer(GLbyte * pc)
{
- CALL_FramebufferRenderbuffer( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLuint )bswap_CARD32 ( pc + 12 )
- ) );
+ PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer =
+ __glGetProcAddress("glFramebufferRenderbuffer");
+ FramebufferRenderbuffer((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLuint) bswap_CARD32(pc + 12));
}
-void __glXDispSwap_FramebufferTexture1D(GLbyte * pc)
+void
+__glXDispSwap_FramebufferTexture1D(GLbyte * pc)
{
- CALL_FramebufferTexture1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLuint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 )
- ) );
+ PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D =
+ __glGetProcAddress("glFramebufferTexture1D");
+ FramebufferTexture1D((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLuint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16));
}
-void __glXDispSwap_FramebufferTexture2D(GLbyte * pc)
+void
+__glXDispSwap_FramebufferTexture2D(GLbyte * pc)
{
- CALL_FramebufferTexture2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLuint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 )
- ) );
+ PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D =
+ __glGetProcAddress("glFramebufferTexture2D");
+ FramebufferTexture2D((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLuint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16));
}
-void __glXDispSwap_FramebufferTexture3D(GLbyte * pc)
+void
+__glXDispSwap_FramebufferTexture3D(GLbyte * pc)
{
- CALL_FramebufferTexture3D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLuint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLint )bswap_CARD32 ( pc + 20 )
- ) );
+ PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D =
+ __glGetProcAddress("glFramebufferTexture3D");
+ FramebufferTexture3D((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLuint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16),
+ (GLint) bswap_CARD32(pc + 20));
}
-void __glXDispSwap_FramebufferTextureLayer(GLbyte * pc)
+void
+__glXDispSwap_FramebufferTextureLayer(GLbyte * pc)
{
- CALL_FramebufferTextureLayer( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLuint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 )
- ) );
+ PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer =
+ __glGetProcAddress("glFramebufferTextureLayer");
+ FramebufferTextureLayer((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLuint) bswap_CARD32(pc + 8),
+ (GLint) bswap_CARD32(pc + 12),
+ (GLint) bswap_CARD32(pc + 16));
}
-int __glXDispSwap_GenFramebuffers(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GenFramebuffers(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGENFRAMEBUFFERSPROC GenFramebuffers =
+ __glGetProcAddress("glGenFramebuffers");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
GLuint answerBuffer[200];
- GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenFramebuffers( GET_DISPATCH(), (
- n,
- framebuffers
- ) );
- (void) bswap_32_array( (uint32_t *) framebuffers, n );
+ GLuint *framebuffers =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ GenFramebuffers(n, framebuffers);
+ (void) bswap_32_array((uint32_t *) framebuffers, n);
__glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -5258,23 +5143,26 @@ int __glXDispSwap_GenFramebuffers(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_GenRenderbuffers(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GenRenderbuffers(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGENRENDERBUFFERSPROC GenRenderbuffers =
+ __glGetProcAddress("glGenRenderbuffers");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
+ if (cx != NULL) {
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 0);
GLuint answerBuffer[200];
- GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenRenderbuffers( GET_DISPATCH(), (
- n,
- renderbuffers
- ) );
- (void) bswap_32_array( (uint32_t *) renderbuffers, n );
+ GLuint *renderbuffers =
+ __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer),
+ 4);
+ GenRenderbuffers(n, renderbuffers);
+ (void) bswap_32_array((uint32_t *) renderbuffers, n);
__glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
error = Success;
}
@@ -5282,29 +5170,35 @@ int __glXDispSwap_GenRenderbuffers(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_GenerateMipmap(GLbyte * pc)
+void
+__glXDispSwap_GenerateMipmap(GLbyte * pc)
{
- CALL_GenerateMipmap( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
+ PFNGLGENERATEMIPMAPPROC GenerateMipmap =
+ __glGetProcAddress("glGenerateMipmap");
+ GenerateMipmap((GLenum) bswap_ENUM(pc + 0));
}
-int __glXDispSwap_GetFramebufferAttachmentParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetFramebufferAttachmentParameteriv(__GLXclientState * cl,
+ GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC
+ GetFramebufferAttachmentParameteriv =
+ __glGetProcAddress("glGetFramebufferAttachmentParameteriv");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLint params[1];
- CALL_GetFramebufferAttachmentParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 1 );
+
+ GetFramebufferAttachmentParameteriv((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ params);
+ (void) bswap_32_array((uint32_t *) params, 1);
__glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
error = Success;
}
@@ -5312,21 +5206,23 @@ int __glXDispSwap_GetFramebufferAttachmentParameteriv(__GLXclientState *cl, GLby return error;
}
-int __glXDispSwap_GetRenderbufferParameteriv(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetRenderbufferParameteriv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv =
+ __glGetProcAddress("glGetRenderbufferParameteriv");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLint params[1];
- CALL_GetRenderbufferParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 1 );
+
+ GetRenderbufferParameteriv((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4), params);
+ (void) bswap_32_array((uint32_t *) params, 1);
__glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
error = Success;
}
@@ -5334,37 +5230,21 @@ int __glXDispSwap_GetRenderbufferParameteriv(__GLXclientState *cl, GLbyte *pc) return error;
}
-int __glXDispSwap_IsFramebuffer(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_IsFramebuffer(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLISFRAMEBUFFERPROC IsFramebuffer =
+ __glGetProcAddress("glIsFramebuffer");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
+ if (cx != NULL) {
GLboolean retval;
- retval = CALL_IsFramebuffer( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
- __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-int __glXDispSwap_IsRenderbuffer(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLboolean retval;
- retval = CALL_IsRenderbuffer( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
+ retval = IsFramebuffer((GLuint) bswap_CARD32(pc + 0));
__glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
@@ -5372,752 +5252,432 @@ int __glXDispSwap_IsRenderbuffer(__GLXclientState *cl, GLbyte *pc) return error;
}
-void __glXDispSwap_RenderbufferStorage(GLbyte * pc)
-{
- CALL_RenderbufferStorage( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLsizei )bswap_CARD32 ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 )
- ) );
-}
-
-void __glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc)
-{
- CALL_RenderbufferStorageMultisample( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLsizei )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 )
- ) );
-}
-
-void __glXDispSwap_SampleMaskSGIS(GLbyte * pc)
-{
- CALL_SampleMaskSGIS( GET_DISPATCH(), (
- (GLclampf)bswap_FLOAT32( pc + 0 ),
- *(GLboolean *)(pc + 4)
- ) );
-}
-
-void __glXDispSwap_SamplePatternSGIS(GLbyte * pc)
-{
- CALL_SamplePatternSGIS( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc)
+int
+__glXDispSwap_IsRenderbuffer(__GLXclientState * cl, GLbyte * pc)
{
- CALL_SecondaryColor3fvEXT( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_FogCoordfvEXT(GLbyte * pc)
-{
- CALL_FogCoordfvEXT( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
-}
-
-int __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ PFNGLISRENDERBUFFERPROC IsRenderbuffer =
+ __glGetProcAddress("glIsRenderbuffer");
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
+ __GLXcontext *const cx =
+ __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error);
pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
-
+ if (cx != NULL) {
GLboolean retval;
- GLboolean answerBuffer[200];
- GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1);
- retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
- residences
- ) );
- __glXSendReplySwap(cl->client, residences, n, 1, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_ExecuteProgramNV(GLbyte * pc)
-{
- CALL_ExecuteProgramNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 )
- ) );
-}
-
-int __glXDispSwap_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLdouble params[4];
- CALL_GetProgramParameterdvNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, 4 );
- __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLfloat params[4];
- CALL_GetProgramParameterfvNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 4 );
- __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetProgramivNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetProgramivNV_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetProgramivNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
- __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLint params[1];
- CALL_GetTrackMatrixivNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 1 );
- __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetVertexAttribdvNV_size(pname);
- GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribdvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, compsize );
- __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetVertexAttribfvNV_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribfvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
- __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetVertexAttribivNV_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetVertexAttribivNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- pname,
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, compsize );
- __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0);
+ retval = IsRenderbuffer((GLuint) bswap_CARD32(pc + 0));
+ __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
error = Success;
}
return error;
}
-void __glXDispSwap_LoadProgramNV(GLbyte * pc)
+void
+__glXDispSwap_RenderbufferStorage(GLbyte * pc)
{
- const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 );
-
- CALL_LoadProgramNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- len,
- (const GLubyte *)(pc + 12)
- ) );
-}
-
-void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc)
-{
- const GLsizei num = (GLsizei )bswap_CARD32 ( pc + 8 );
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_ProgramParameters4dvNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- num,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 12), 0 )
- ) );
+ PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage =
+ __glGetProcAddress("glRenderbufferStorage");
+ RenderbufferStorage((GLenum) bswap_ENUM(pc + 0),
+ (GLenum) bswap_ENUM(pc + 4),
+ (GLsizei) bswap_CARD32(pc + 8),
+ (GLsizei) bswap_CARD32(pc + 12));
}
-void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc)
+void
+__glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc)
{
- const GLsizei num = (GLsizei )bswap_CARD32 ( pc + 8 );
-
- CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- num,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 12), 0 )
- ) );
+ PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample =
+ __glGetProcAddress("glRenderbufferStorageMultisample");
+ RenderbufferStorageMultisample((GLenum) bswap_ENUM(pc + 0),
+ (GLsizei) bswap_CARD32(pc + 4),
+ (GLenum) bswap_ENUM(pc + 8),
+ (GLsizei) bswap_CARD32(pc + 12),
+ (GLsizei) bswap_CARD32(pc + 16));
}
-void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc)
+void
+__glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
-
- CALL_RequestResidentProgramsNV( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
+ PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT =
+ __glGetProcAddress("glSecondaryColor3fvEXT");
+ SecondaryColor3fvEXT((const GLfloat *)
+ bswap_32_array((uint32_t *) (pc + 0), 3));
}
-void __glXDispSwap_TrackMatrixNV(GLbyte * pc)
+void
+__glXDispSwap_FogCoordfvEXT(GLbyte * pc)
{
- CALL_TrackMatrixNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLenum )bswap_ENUM ( pc + 12 )
- ) );
+ PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT =
+ __glGetProcAddress("glFogCoordfvEXT");
+ FogCoordfvEXT((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1));
}
-void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib1dvNV(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB1DVNVPROC VertexAttrib1dvNV =
+ __glGetProcAddress("glVertexAttrib1dvNV");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 12);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 12);
pc -= 4;
}
#endif
- CALL_VertexAttrib1dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 )
- ) );
+ VertexAttrib1dvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
+ 1));
}
-void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib1fvNV(GLbyte * pc)
{
- CALL_VertexAttrib1fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 )
- ) );
+ PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV =
+ __glGetProcAddress("glVertexAttrib1fvNV");
+ VertexAttrib1fvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ 1));
}
-void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib1svNV(GLbyte * pc)
{
- CALL_VertexAttrib1svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 )
- ) );
+ PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV =
+ __glGetProcAddress("glVertexAttrib1svNV");
+ VertexAttrib1svNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 1));
}
-void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib2dvNV(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB2DVNVPROC VertexAttrib2dvNV =
+ __glGetProcAddress("glVertexAttrib2dvNV");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 20);
pc -= 4;
}
#endif
- CALL_VertexAttrib2dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 )
- ) );
+ VertexAttrib2dvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
+ 2));
}
-void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib2fvNV(GLbyte * pc)
{
- CALL_VertexAttrib2fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 )
- ) );
+ PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV =
+ __glGetProcAddress("glVertexAttrib2fvNV");
+ VertexAttrib2fvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ 2));
}
-void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib2svNV(GLbyte * pc)
{
- CALL_VertexAttrib2svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 )
- ) );
+ PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV =
+ __glGetProcAddress("glVertexAttrib2svNV");
+ VertexAttrib2svNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 2));
}
-void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib3dvNV(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB3DVNVPROC VertexAttrib3dvNV =
+ __glGetProcAddress("glVertexAttrib3dvNV");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 28);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 28);
pc -= 4;
}
#endif
- CALL_VertexAttrib3dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 )
- ) );
+ VertexAttrib3dvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
+ 3));
}
-void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib3fvNV(GLbyte * pc)
{
- CALL_VertexAttrib3fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 )
- ) );
+ PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV =
+ __glGetProcAddress("glVertexAttrib3fvNV");
+ VertexAttrib3fvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ 3));
}
-void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib3svNV(GLbyte * pc)
{
- CALL_VertexAttrib3svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 )
- ) );
+ PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV =
+ __glGetProcAddress("glVertexAttrib3svNV");
+ VertexAttrib3svNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 3));
}
-void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4dvNV(GLbyte * pc)
{
+ PFNGLVERTEXATTRIB4DVNVPROC VertexAttrib4dvNV =
+ __glGetProcAddress("glVertexAttrib4dvNV");
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, 36);
pc -= 4;
}
#endif
- CALL_VertexAttrib4dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 )
- ) );
+ VertexAttrib4dvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4fvNV(GLbyte * pc)
{
- CALL_VertexAttrib4fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV =
+ __glGetProcAddress("glVertexAttrib4fvNV");
+ VertexAttrib4fvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4svNV(GLbyte * pc)
{
- CALL_VertexAttrib4svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 )
- ) );
+ PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV =
+ __glGetProcAddress("glVertexAttrib4svNV");
+ VertexAttrib4svNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 4),
+ 4));
}
-void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc)
{
- CALL_VertexAttrib4ubvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (const GLubyte *)(pc + 4)
- ) );
+ PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV =
+ __glGetProcAddress("glVertexAttrib4ubvNV");
+ VertexAttrib4ubvNV((GLuint) bswap_CARD32(pc + 0),
+ (const GLubyte *) (pc + 4));
}
-void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs1dvNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS1DVNVPROC VertexAttribs1dvNV =
+ __glGetProcAddress("glVertexAttribs1dvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- CALL_VertexAttribs1dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs1dvNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs1fvNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS1FVNVPROC VertexAttribs1fvNV =
+ __glGetProcAddress("glVertexAttribs1fvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
- CALL_VertexAttribs1fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs1fvNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs1svNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS1SVNVPROC VertexAttribs1svNV =
+ __glGetProcAddress("glVertexAttribs1svNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
- CALL_VertexAttribs1svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs1svNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs2dvNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS2DVNVPROC VertexAttribs2dvNV =
+ __glGetProcAddress("glVertexAttribs2dvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- CALL_VertexAttribs2dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs2dvNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs2fvNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS2FVNVPROC VertexAttribs2fvNV =
+ __glGetProcAddress("glVertexAttribs2fvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
- CALL_VertexAttribs2fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs2fvNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs2svNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS2SVNVPROC VertexAttribs2svNV =
+ __glGetProcAddress("glVertexAttribs2svNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
- CALL_VertexAttribs2svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs2svNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs3dvNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS3DVNVPROC VertexAttribs3dvNV =
+ __glGetProcAddress("glVertexAttribs3dvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- CALL_VertexAttribs3dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs3dvNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs3fvNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS3FVNVPROC VertexAttribs3fvNV =
+ __glGetProcAddress("glVertexAttribs3fvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
- CALL_VertexAttribs3fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs3fvNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs3svNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS3SVNVPROC VertexAttribs3svNV =
+ __glGetProcAddress("glVertexAttribs3svNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
- CALL_VertexAttribs3svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
+ VertexAttribs3svNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs4dvNV(GLbyte * pc)
{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS4DVNVPROC VertexAttribs4dvNV =
+ __glGetProcAddress("glVertexAttribs4dvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
#ifdef __GLX_ALIGN64
const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
+
+ if ((unsigned long) (pc) & 7) {
+ (void) memmove(pc - 4, pc, cmdlen);
pc -= 4;
}
#endif
- CALL_VertexAttribs4dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs4fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs4svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs4ubvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLubyte *)(pc + 8)
- ) );
-}
-
-void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc)
-{
- CALL_ActiveStencilFaceEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc)
-{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- GLdouble params[4];
- CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- len,
- (const GLubyte *)(pc + 8),
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, 4 );
- __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
+ VertexAttribs4dvNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8),
+ 0));
}
-int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc)
+void
+__glXDispSwap_VertexAttribs4fvNV(GLbyte * pc)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS4FVNVPROC VertexAttribs4fvNV =
+ __glGetProcAddress("glVertexAttribs4fvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
- GLfloat params[4];
- CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- len,
- (const GLubyte *)(pc + 8),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 4 );
- __glXSendReplySwap(cl->client, params, 4, 4, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
+ VertexAttribs4fvNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs4svNV(GLbyte * pc)
{
- const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 36 );
+ PFNGLVERTEXATTRIBS4SVNVPROC VertexAttribs4svNV =
+ __glGetProcAddress("glVertexAttribs4svNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 44 + __GLX_PAD(len) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 32 ),
- len,
- (const GLubyte *)(pc + 40),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
+ VertexAttribs4svNV((GLuint) bswap_CARD32(pc + 0),
+ n,
+ (const GLshort *) bswap_16_array((uint16_t *) (pc + 8),
+ 0));
}
-void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc)
+void
+__glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc)
{
- const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 );
+ PFNGLVERTEXATTRIBS4UBVNVPROC VertexAttribs4ubvNV =
+ __glGetProcAddress("glVertexAttribs4ubvNV");
+ const GLsizei n = (GLsizei) bswap_CARD32(pc + 4);
- CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- len,
- (const GLubyte *)(pc + 24),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 )
- ) );
+ VertexAttribs4ubvNV((GLuint) bswap_CARD32(pc + 0),
+ n, (const GLubyte *) (pc + 8));
}
-void __glXDispSwap_BindFramebufferEXT(GLbyte * pc)
+void
+__glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc)
{
- CALL_BindFramebufferEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
+ PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT =
+ __glGetProcAddress("glActiveStencilFaceEXT");
+ ActiveStencilFaceEXT((GLenum) bswap_ENUM(pc + 0));
}
-
-void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc)
-{
- CALL_BindRenderbufferEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
diff --git a/xorg-server/glx/indirect_program.c b/xorg-server/glx/indirect_program.c index 17204c17d..9a648b745 100644 --- a/xorg-server/glx/indirect_program.c +++ b/xorg-server/glx/indirect_program.c @@ -46,23 +46,14 @@ #include "glthread.h" #include "dispatch.h" -static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc, - unsigned get_programiv_offset, - unsigned get_program_string_offset, Bool do_swap); - /** * Handle both types of glGetProgramString calls. - * - * This single function handles both \c glGetProgramStringARB and - * \c glGetProgramStringNV. The dispatch offsets for the functions to use - * for \c glGetProgramivARB and \c glGetProgramStringARB are passed in by the - * caller. These can be the offsets of either the ARB versions or the NV - * versions. */ -int +static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc, - unsigned get_programiv_offset, - unsigned get_program_string_offset, Bool do_swap) + PFNGLGETPROGRAMIVARBPROC get_programiv, + PFNGLGETPROGRAMSTRINGARBPROC get_program_string, + Bool do_swap) { xGLXVendorPrivateWithReplyReq *const req = (xGLXVendorPrivateWithReplyReq *) pc; @@ -89,19 +80,13 @@ DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc, /* The value of the GL_PROGRAM_LENGTH_ARB and GL_PROGRAM_LENGTH_NV * enumerants is the same. */ - CALL_by_offset(GET_DISPATCH(), - (void (GLAPIENTRYP) (GLuint, GLenum, GLint *)), - get_programiv_offset, - (target, GL_PROGRAM_LENGTH_ARB, &compsize)); + get_programiv(target, GL_PROGRAM_LENGTH_ARB, &compsize); if (compsize != 0) { __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); - CALL_by_offset(GET_DISPATCH(), - (void (GLAPIENTRYP) (GLuint, GLenum, GLubyte *)), - get_program_string_offset, - (target, pname, (GLubyte *) answer)); + get_program_string(target, pname, (GLubyte *) answer); } if (__glXErrorOccured()) { @@ -124,27 +109,43 @@ DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc, int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc) { - return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB, - _gloffset_GetProgramStringARB, False); + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, False); } int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc) { - return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB, - _gloffset_GetProgramStringARB, True); + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, True); } int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte * pc) { - return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV, - _gloffset_GetProgramStringNV, False); + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, False); } int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte * pc) { - return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV, - _gloffset_GetProgramStringNV, True); + PFNGLGETPROGRAMIVARBPROC get_program = + __glGetProcAddress("glGetProgramivARB"); + PFNGLGETPROGRAMSTRINGARBPROC get_program_string = + __glGetProcAddress("glGetProgramStringARB"); + + return DoGetProgramString(cl, pc, get_program, get_program_string, True); } diff --git a/xorg-server/glx/makefile b/xorg-server/glx/makefile index 345734ecf..345734ecf 100755..100644 --- a/xorg-server/glx/makefile +++ b/xorg-server/glx/makefile diff --git a/xorg-server/glx/render2.c b/xorg-server/glx/render2.c index 01e33d5c9..946ec2d3d 100644 --- a/xorg-server/glx/render2.c +++ b/xorg-server/glx/render2.c @@ -56,7 +56,7 @@ __glXDisp_Map1f(GLbyte * pc) points = (GLfloat *) (pc + 16); k = __glMap1f_size(target); - CALL_Map1f(GET_DISPATCH(), (target, u1, u2, k, order, points)); + glMap1f(target, u1, u2, k, order, points); } void @@ -79,9 +79,7 @@ __glXDisp_Map2f(GLbyte * pc) ustride = vorder * k; vstride = k; - CALL_Map2f(GET_DISPATCH(), - (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, - points)); + glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } void @@ -127,7 +125,7 @@ __glXDisp_Map1d(GLbyte * pc) #else points = (GLdouble *) pc; #endif - CALL_Map1d(GET_DISPATCH(), (target, u1, u2, k, order, points)); + glMap1d(target, u1, u2, k, order, points); } void @@ -179,9 +177,7 @@ __glXDisp_Map2d(GLbyte * pc) #else points = (GLdouble *) pc; #endif - CALL_Map2d(GET_DISPATCH(), - (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, - points)); + glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } void @@ -216,40 +212,45 @@ __glXDisp_DrawArrays(GLbyte * pc) switch (component) { case GL_VERTEX_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_VERTEX_ARRAY)); - CALL_VertexPointer(GET_DISPATCH(), (numVals, datatype, stride, pc)); + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(numVals, datatype, stride, pc); break; case GL_NORMAL_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_NORMAL_ARRAY)); - CALL_NormalPointer(GET_DISPATCH(), (datatype, stride, pc)); + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(datatype, stride, pc); break; case GL_COLOR_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_COLOR_ARRAY)); - CALL_ColorPointer(GET_DISPATCH(), (numVals, datatype, stride, pc)); + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(numVals, datatype, stride, pc); break; case GL_INDEX_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_INDEX_ARRAY)); - CALL_IndexPointer(GET_DISPATCH(), (datatype, stride, pc)); + glEnableClientState(GL_INDEX_ARRAY); + glIndexPointer(datatype, stride, pc); break; case GL_TEXTURE_COORD_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY)); - CALL_TexCoordPointer(GET_DISPATCH(), - (numVals, datatype, stride, pc)); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(numVals, datatype, stride, pc); break; case GL_EDGE_FLAG_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY)); - CALL_EdgeFlagPointer(GET_DISPATCH(), - (stride, (const GLboolean *) pc)); + glEnableClientState(GL_EDGE_FLAG_ARRAY); + glEdgeFlagPointer(stride, (const GLboolean *) pc); break; case GL_SECONDARY_COLOR_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY)); - CALL_SecondaryColorPointer(GET_DISPATCH(), - (numVals, datatype, stride, pc)); + { + PFNGLSECONDARYCOLORPOINTERPROC SecondaryColorPointerEXT = + __glGetProcAddress("glSecondaryColorPointerEXT"); + glEnableClientState(GL_SECONDARY_COLOR_ARRAY); + SecondaryColorPointerEXT(numVals, datatype, stride, pc); break; + } case GL_FOG_COORD_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_FOG_COORD_ARRAY)); - CALL_FogCoordPointer(GET_DISPATCH(), (datatype, stride, pc)); + { + PFNGLFOGCOORDPOINTERPROC FogCoordPointerEXT = + __glGetProcAddress("glFogCoordPointerEXT"); + glEnableClientState(GL_FOG_COORD_ARRAY); + FogCoordPointerEXT(datatype, stride, pc); break; + } default: break; } @@ -257,15 +258,15 @@ __glXDisp_DrawArrays(GLbyte * pc) pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); } - CALL_DrawArrays(GET_DISPATCH(), (primType, 0, numVertexes)); + glDrawArrays(primType, 0, numVertexes); /* turn off anything we might have turned on */ - CALL_DisableClientState(GET_DISPATCH(), (GL_VERTEX_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_NORMAL_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_COLOR_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_INDEX_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_FOG_COORD_ARRAY)); + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); + glDisableClientState(GL_INDEX_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glDisableClientState(GL_EDGE_FLAG_ARRAY); + glDisableClientState(GL_SECONDARY_COLOR_ARRAY); + glDisableClientState(GL_FOG_COORD_ARRAY); } diff --git a/xorg-server/glx/render2swap.c b/xorg-server/glx/render2swap.c index 435fa26ad..cb567952f 100644 --- a/xorg-server/glx/render2swap.c +++ b/xorg-server/glx/render2swap.c @@ -74,7 +74,7 @@ __glXDispSwap_Map1f(GLbyte * pc) } __GLX_SWAP_FLOAT_ARRAY(points, compsize); - CALL_Map1f(GET_DISPATCH(), (target, u1, u2, k, order, points)); + glMap1f(target, u1, u2, k, order, points); } void @@ -118,9 +118,7 @@ __glXDispSwap_Map2f(GLbyte * pc) } __GLX_SWAP_FLOAT_ARRAY(points, compsize); - CALL_Map2f(GET_DISPATCH(), - (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, - points)); + glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } void @@ -168,7 +166,7 @@ __glXDispSwap_Map1d(GLbyte * pc) #else points = (GLdouble *) pc; #endif - CALL_Map1d(GET_DISPATCH(), (target, u1, u2, k, order, points)); + glMap1d(target, u1, u2, k, order, points); } void @@ -224,9 +222,7 @@ __glXDispSwap_Map2d(GLbyte * pc) #else points = (GLdouble *) pc; #endif - CALL_Map2d(GET_DISPATCH(), - (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, - points)); + glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } static void @@ -338,40 +334,45 @@ __glXDispSwap_DrawArrays(GLbyte * pc) switch (component) { case GL_VERTEX_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_VERTEX_ARRAY)); - CALL_VertexPointer(GET_DISPATCH(), (numVals, datatype, stride, pc)); + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(numVals, datatype, stride, pc); break; case GL_NORMAL_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_NORMAL_ARRAY)); - CALL_NormalPointer(GET_DISPATCH(), (datatype, stride, pc)); + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(datatype, stride, pc); break; case GL_COLOR_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_COLOR_ARRAY)); - CALL_ColorPointer(GET_DISPATCH(), (numVals, datatype, stride, pc)); + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(numVals, datatype, stride, pc); break; case GL_INDEX_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_INDEX_ARRAY)); - CALL_IndexPointer(GET_DISPATCH(), (datatype, stride, pc)); + glEnableClientState(GL_INDEX_ARRAY); + glIndexPointer(datatype, stride, pc); break; case GL_TEXTURE_COORD_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY)); - CALL_TexCoordPointer(GET_DISPATCH(), - (numVals, datatype, stride, pc)); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(numVals, datatype, stride, pc); break; case GL_EDGE_FLAG_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY)); - CALL_EdgeFlagPointer(GET_DISPATCH(), - (stride, (const GLboolean *) pc)); + glEnableClientState(GL_EDGE_FLAG_ARRAY); + glEdgeFlagPointer(stride, (const GLboolean *) pc); break; case GL_SECONDARY_COLOR_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY)); - CALL_SecondaryColorPointer(GET_DISPATCH(), - (numVals, datatype, stride, pc)); + { + PFNGLSECONDARYCOLORPOINTERPROC SecondaryColorPointerEXT = + __glGetProcAddress("glSecondaryColorPointerEXT"); + glEnableClientState(GL_SECONDARY_COLOR_ARRAY); + SecondaryColorPointerEXT(numVals, datatype, stride, pc); break; + } case GL_FOG_COORD_ARRAY: - CALL_EnableClientState(GET_DISPATCH(), (GL_FOG_COORD_ARRAY)); - CALL_FogCoordPointer(GET_DISPATCH(), (datatype, stride, pc)); + { + PFNGLFOGCOORDPOINTERPROC FogCoordPointerEXT = + __glGetProcAddress("glFogCoordPointerEXT"); + glEnableClientState(GL_FOG_COORD_ARRAY); + FogCoordPointerEXT(datatype, stride, pc); break; + } default: break; } @@ -379,15 +380,15 @@ __glXDispSwap_DrawArrays(GLbyte * pc) pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); } - CALL_DrawArrays(GET_DISPATCH(), (primType, 0, numVertexes)); + glDrawArrays(primType, 0, numVertexes); /* turn off anything we might have turned on */ - CALL_DisableClientState(GET_DISPATCH(), (GL_VERTEX_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_NORMAL_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_COLOR_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_INDEX_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY)); - CALL_DisableClientState(GET_DISPATCH(), (GL_FOG_COORD_ARRAY)); + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); + glDisableClientState(GL_INDEX_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glDisableClientState(GL_EDGE_FLAG_ARRAY); + glDisableClientState(GL_SECONDARY_COLOR_ARRAY); + glDisableClientState(GL_FOG_COORD_ARRAY); } diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c index a10f47286..ac988b2bc 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.c +++ b/xorg-server/hw/kdrive/ephyr/ephyr.c @@ -954,7 +954,7 @@ ephyrProcessMouseMotion(xcb_generic_event_t *xev) #ifdef XF86DRI EphyrWindowPair *pair = NULL; #endif - EPHYR_LOG("enqueuing mouse motion:%d\n", ephyrCurScreen); + EPHYR_LOG("enqueuing mouse motion:%d\n", screen->pScreen->myNum); x = motion->event_x; y = motion->event_y; EPHYR_LOG("initial (x,y):(%d,%d)\n", x, y); @@ -988,7 +988,7 @@ ephyrProcessButtonPress(xcb_generic_event_t *xev) if (!ephyrMouse || !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) { - EPHYR_LOG("skipping mouse press:%d\n", ephyrCurScreen); + EPHYR_LOG("skipping mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum); return; } @@ -998,7 +998,7 @@ ephyrProcessButtonPress(xcb_generic_event_t *xev) */ mouseState |= 1 << (button->detail - 1); - EPHYR_LOG("enqueuing mouse press:%d\n", ephyrCurScreen); + EPHYR_LOG("enqueuing mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum); KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0); } @@ -1015,7 +1015,7 @@ ephyrProcessButtonRelease(xcb_generic_event_t *xev) ephyrUpdateModifierState(button->state); mouseState &= ~(1 << (button->detail - 1)); - EPHYR_LOG("enqueuing mouse release:%d\n", ephyrCurScreen); + EPHYR_LOG("enqueuing mouse release:%d\n", screen_from_window(button->event)->pScreen->myNum); KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0); } diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c index 95d58fe43..af2b7f8f2 100644 --- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c +++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c @@ -267,14 +267,6 @@ listPossibleVideoDrivers(char *matches[], int nmatches) if (i < (nmatches - 1)) i = xf86PciMatchDriver(matches, nmatches); #endif - /* Fallback to platform default hardware */ - if (i < (nmatches - 1)) { -#if defined(__i386__) || defined(__amd64__) || defined(__hurd__) - matches[i++] = xnfstrdup("vesa"); -#elif defined(__sparc__) && !defined(sun) - matches[i++] = xnfstrdup("sunffb"); -#endif - } #if defined(__linux__) matches[i++] = xnfstrdup("modesetting"); @@ -290,6 +282,15 @@ listPossibleVideoDrivers(char *matches[], int nmatches) #endif } #endif /* !sun */ + + /* Fallback to platform default hardware */ + if (i < (nmatches - 1)) { +#if defined(__i386__) || defined(__amd64__) || defined(__hurd__) + matches[i++] = xnfstrdup("vesa"); +#elif defined(__sparc__) && !defined(sun) + matches[i++] = xnfstrdup("sunffb"); +#endif + } } /* copy a screen section and enter the desired driver diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index 74d5ed3b7..b5efc02af 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -507,7 +507,7 @@ xf86InputDriverlistFromConfig(void) static void fixup_video_driver_list(char **drivers) { - static const char *fallback[4] = { "vesa", "fbdev", "wsfb", NULL }; + static const char *fallback[4] = { "fbdev", "vesa", "wsfb", NULL }; char **end, **drv; char *x; int i; diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c index 721159d0b..f1e6783a7 100644 --- a/xorg-server/hw/xfree86/common/xf86Helper.c +++ b/xorg-server/hw/xfree86/common/xf86Helper.c @@ -1638,9 +1638,14 @@ xf86SetBackingStore(ScreenPtr pScreen) else { if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS)) from = X_CONFIG; +#ifdef COMPOSITE + if (from != X_CONFIG) + useBS = xf86ReturnOptValBool(options, OPTION_BACKING_STORE, + !noCompositeExtension); +#endif } free(options); - pScreen->backingStoreSupport = useBS ? Always : NotUseful; + pScreen->backingStoreSupport = useBS ? WhenMapped : NotUseful; if (serverGeneration == 1) xf86DrvMsg(pScreen->myNum, from, "Backing store %s\n", useBS ? "enabled" : "disabled"); diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c index e1decec9e..ffd66fad6 100644 --- a/xorg-server/hw/xfree86/dri2/dri2ext.c +++ b/xorg-server/hw/xfree86/dri2/dri2ext.c @@ -672,6 +672,11 @@ DRI2ExtensionInit(void) { ExtensionEntry *dri2Extension; +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return; +#endif + dri2Extension = AddExtension(DRI2_NAME, DRI2NumberEvents, DRI2NumberErrors, diff --git a/xorg-server/hw/xquartz/GL/indirect.c b/xorg-server/hw/xquartz/GL/indirect.c index c4999b5ff..8dabda14d 100644 --- a/xorg-server/hw/xquartz/GL/indirect.c +++ b/xorg-server/hw/xquartz/GL/indirect.c @@ -48,8 +48,6 @@ #include <glxserver.h> #include <glxutil.h> -#include <glapi.h> - #include "x-hash.h" #include "visualConfigs.h" @@ -643,15 +641,20 @@ __glFloorLog2(GLuint val) "/System/Library/Frameworks/OpenGL.framework/OpenGL" #endif +static void *opengl_framework_handle; + +static glx_gpa_proc +get_proc_address(const char *sym) +{ + return (glx_gpa_proc) dlsym(opengl_framework_handle, sym); +} + static void setup_dispatch_table(void) { - static struct _glapi_table *disp = NULL; - static void *handle; const char *opengl_framework_path; - if (disp) { - _glapi_set_dispatch(disp); + if (opengl_framework_handle) { return; } @@ -661,16 +664,13 @@ setup_dispatch_table(void) } (void)dlerror(); /*drain dlerror */ - handle = dlopen(opengl_framework_path, RTLD_LOCAL); + opengl_framework_handle = dlopen(opengl_framework_path, RTLD_LOCAL); - if (!handle) { + if (!opengl_framework_handle) { ErrorF("unable to dlopen %s : %s, using RTLD_DEFAULT\n", opengl_framework_path, dlerror()); - handle = RTLD_DEFAULT; + opengl_framework_handle = RTLD_DEFAULT; } - disp = _glapi_create_table_from_handle(handle, "gl"); - assert(disp); - - _glapi_set_dispatch(disp); + __glXsetGetProcAddress(get_proc_address); } diff --git a/xorg-server/hw/xquartz/X11Controller.m b/xorg-server/hw/xquartz/X11Controller.m index 3d094bfc7..752bda35c 100644 --- a/xorg-server/hw/xquartz/X11Controller.m +++ b/xorg-server/hw/xquartz/X11Controller.m @@ -347,7 +347,7 @@ extern char *bundle_id_prefix; const char *newargv[4]; char buf[128]; char *s; -#if 0 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 int stdout_pipe[2]; int stderr_pipe[2]; #endif @@ -363,7 +363,7 @@ extern char *bundle_id_prefix; setenv("DISPLAY", buf, TRUE); } -#if 0 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 if (asl_log_descriptor) { char *asl_sender; aslmsg amsg = asl_new(ASL_TYPE_MSG); @@ -413,7 +413,7 @@ extern char *bundle_id_prefix; _exit(1); case 0: /* child2 */ -#if 0 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 if (asl_log_descriptor) { /* Replace our stdout/stderr */ dup2(stdout_pipe[1], STDOUT_FILENO); @@ -442,7 +442,7 @@ extern char *bundle_id_prefix; waitpid(child1, &status, 0); } -#if 0 && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 if (asl_log_descriptor) { /* Close the write ends of the pipe */ close(stdout_pipe[1]); diff --git a/xorg-server/hw/xwin/Makefile.am b/xorg-server/hw/xwin/Makefile.am index aa73e618d..532120a57 100644 --- a/xorg-server/hw/xwin/Makefile.am +++ b/xorg-server/hw/xwin/Makefile.am @@ -158,7 +158,7 @@ XWIN_LIBS += $(top_builddir)/pseudoramiX/libPseudoramiX.la XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS) XWin_LDADD = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) -XWin_LDFLAGS = -mwindows -static +XWin_LDFLAGS = -mwindows -static -Wl,--disable-stdcall-fixup .rc.o: $(AM_V_GEN)$(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include diff --git a/xorg-server/hw/xwin/glx/Makefile.am b/xorg-server/hw/xwin/glx/Makefile.am index 067ee5b3c..f2dffbffb 100644 --- a/xorg-server/hw/xwin/glx/Makefile.am +++ b/xorg-server/hw/xwin/glx/Makefile.am @@ -1,14 +1,18 @@ noinst_LTLIBRARIES = libXwinGLX.la +lib_LTLIBRARIES = libnativeGLthunk.la libXwinGLX_la_SOURCES = \ winpriv.c \ winpriv.h \ glwindows.h \ - glwrap.c \ + glshim.c \ indirect.c \ wgl_ext_api.c \ wgl_ext_api.h +libnativeGLthunk_la_SOURCES = \ + glthunk.c + if XWIN_MULTIWINDOW DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW endif @@ -30,16 +34,32 @@ AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ -I$(top_srcdir) \ -I$(top_srcdir)/hw/xwin/ +libnativeGLthunk_la_CFLAGS = $(AM_CFLAGS) -Wno-unused-function -Wno-missing-prototypes -Wno-missing-declarations +libnativeGLthunk_la_LDFLAGS = -shared -no-undefined -avoid-version -lopengl32 -export-symbols generated_gl_thunks.def +EXTRA_libnativeGLthunk_la_DEPENDENCIES = generated_gl_thunks.def + if XWIN_GLX_WINDOWS -generated_gl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.spec $(KHRONOS_SPEC_DIR)/gl.tm - $(AM_V_GEN)$(PYTHON) $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/gl.spec --typemap=$(KHRONOS_SPEC_DIR)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c +if DEBUG +GENGLWRAPPERSOPTS="" +else +GENGLWRAPPERSOPTS="-nodebug" +endif + +generated_wgl_wrappers.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wgl.xml $(KHRONOS_SPEC_DIR)/reg.py + $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/wgl.xml -prefix wgl -wrapper -preresolve $(GENGLWRAPPERSOPTS) -outfile $@ + +generated_gl_shim.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py + $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -shim $(GENGLWRAPPERSOPTS) -outfile $@ + +generated_gl_thunks.c: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py + $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunk $(GENGLWRAPPERSOPTS) -outfile $@ -generated_wgl_wrappers.c: gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wglext.spec $(KHRONOS_SPEC_DIR)/wgl.tm - $(AM_V_GEN)$(PYTHON) $(srcdir)/gen_gl_wrappers.py --spec=$(KHRONOS_SPEC_DIR)/wglext.spec --typemap=$(KHRONOS_SPEC_DIR)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c +generated_gl_thunks.def: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py + $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunkdefs $(GENGLWRAPPERSOPTS) -outfile $@ endif -BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c +BUILT_SOURCES = generated_gl_shim.c generated_gl_thunks.c generated_gl_thunks.def generated_wgl_wrappers.c CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = gen_gl_wrappers.py diff --git a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py index e5fa57142..683b9d903 100755 --- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py +++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py @@ -1,5 +1,8 @@ #!/usr/bin/python3 # +# python script to generate cdecl to stdcall wrappers for GL functions +# adapted from genheaders.py +# # Copyright (c) 2013 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a @@ -24,30 +27,23 @@ import sys, time, pdb, string, cProfile from reg import * -# debug - start header generation in debugger -# dump - dump registry after loading -# profile - enable Python profiling -# protect - whether to use #ifndef protections -# registry <filename> - use specified XML registry instead of gl.xml -# timeit - time length of registry loading & header generation -# validate - validate return & parameter group tags against <group> -debug = False -dump = False -profile = False -protect = True -timeit = False -validate= False # Default input / log files errFilename = None diagFilename = 'diag.txt' regFilename = 'gl.xml' outFilename = 'gen_gl_wrappers.c' -dispatchheader=None + +protect=True prefix="gl" preresolve=False +wrapper=False +shim=False +thunk=False +thunkdefs=False staticwrappers=False -nodebugcallcounting=False +nodebug=False +#exclude base WGL API WinGDI={key: 1 for key in [ "wglCopyContext" ,"wglCreateContext" @@ -83,110 +79,45 @@ if __name__ == '__main__': while (i < len(sys.argv)): arg = sys.argv[i] i = i + 1 - if (arg == '-debug'): - print('Enabling debug (-debug)', file=sys.stderr) - debug = True - elif (arg == '-dump'): - print('Enabling dump (-dump)', file=sys.stderr) - dump = True - elif (arg == '-noprotect'): + if (arg == '-noprotect'): print('Disabling inclusion protection in output headers', file=sys.stderr) protect = False - elif (arg == '-profile'): - print('Enabling profiling (-profile)', file=sys.stderr) - profile = True elif (arg == '-registry'): regFilename = sys.argv[i] i = i+1 - print('Using registry ', regFilename, file=sys.stderr) - elif (arg == '-time'): - print('Enabling timing (-time)', file=sys.stderr) - timeit = True - elif (arg == '-validate'): - print('Enabling group validation (-validate)', file=sys.stderr) - validate = True + print('Using registry', regFilename, file=sys.stderr) elif (arg == '-outfile'): outFilename = sys.argv[i] i = i+1 elif (arg == '-preresolve'): preresolve=True + elif (arg == '-wrapper'): + wrapper=True + elif (arg == '-shim'): + shim=True + elif (arg == '-thunk'): + thunk=True + elif (arg == '-thunkdefs'): + thunkdefs=True elif (arg == '-staticwrappers'): staticwrappers=True - elif (arg == '-dispatchheader'): - dispatchheader = sys.argv[i] - i = i+1 elif (arg == '-prefix'): prefix = sys.argv[i] i = i+1 - elif (arg == '-nodbgcount'): - nodebugcallcounting = True + elif (arg == '-nodebug'): + nodebug = True elif (arg[0:1] == '-'): print('Unrecognized argument:', arg, file=sys.stderr) exit(1) -print('Generating ', outFilename, file=sys.stderr) - -# Simple timer functions -startTime = None -def startTimer(): - global startTime - startTime = time.clock() -def endTimer(msg): - global startTime - endTime = time.clock() - if (timeit): - print(msg, endTime - startTime) - startTime = None + +print('Generating', outFilename, file=sys.stderr) # Load & parse registry reg = Registry() - -startTimer() tree = etree.parse(regFilename) -endTimer('Time to make ElementTree =') - -startTimer() reg.loadElementTree(tree) -endTimer('Time to parse ElementTree =') - -if (validate): - reg.validateGroups() - -if (dump): - print('***************************************') - print('Performing Registry dump to regdump.txt') - print('***************************************') - reg.dumpReg(filehandle = open('regdump.txt','w')) - -# Turn a list of strings into a regexp string matching exactly those strings -def makeREstring(list): - return '^(' + '|'.join(list) + ')$' - -# These are "mandatory" OpenGL ES 1 extensions, to -# be included in the core GLES/gl.h header. -es1CoreList = [ - 'GL_OES_read_format', - 'GL_OES_compressed_paletted_texture', - 'GL_OES_point_size_array', - 'GL_OES_point_sprite' -] - -# Descriptive names for various regexp patterns used to select -# versions and extensions - -allVersions = allExtensions = '.*' -noVersions = noExtensions = None -gl12andLaterPat = '1\.[2-9]|[234]\.[0-9]' -gles2onlyPat = '2\.[0-9]' -gles2and3Pat = '[23]\.[0-9]' -es1CorePat = makeREstring(es1CoreList) -# Extensions in old glcorearb.h but not yet tagged accordingly in gl.xml -glCoreARBPat = None -glx13andLaterPat = '1\.[3-9]' - -# Defaults for generating re-inclusion protection wrappers (or not) -protectFile = protect -protectFeature = protect -protectProto = protect + +allVersions = '.*' genOpts = CGeneratorOptions( apiname = prefix, @@ -194,16 +125,9 @@ genOpts = CGeneratorOptions( versions = allVersions, emitversions = allVersions, defaultExtensions = prefix, # Default extensions for GL -# addExtensions = None, -# removeExtensions = None, -# prefixText = prefixStrings + glExtPlatformStrings + glextVersionStrings, -# genFuncPointers = True, -# protectFile = protectFile, -# protectFeature = protectFeature, -# protectProto = protectProto, -# apicall = 'GLAPI ', -# apientry = 'APIENTRY ', -# apientryp = 'APIENTRYP '), + protectFile = protect, + protectFeature = protect, + protectProto = protect, ) # create error/warning & diagnostic files @@ -213,28 +137,6 @@ else: errWarn = sys.stderr diag = open(diagFilename, 'w') -# -# look for all the SET_ macros in dispatch.h, this is the set of functions -# we need to generate -# - -dispatch = {} - -if dispatchheader : - fh = open(dispatchheader) - dispatchh = fh.readlines() - - dispatch_regex = re.compile(r'(?:#define|static\s+INLINE\s+void)\s+SET_([^\()]+)\(') - - for line in dispatchh : - line = line.strip() - m1 = dispatch_regex.search(line) - - if m1 : - dispatch[prefix+m1.group(1)] = 1 - - del dispatch['glby_offset'] - class PreResolveOutputGenerator(OutputGenerator): def __init__(self, errFile = sys.stderr, @@ -243,7 +145,7 @@ class PreResolveOutputGenerator(OutputGenerator): OutputGenerator.__init__(self, errFile, warnFile, diagFile) self.wrappers={} def beginFile(self, genOpts): - pass + self.outFile.write('/* Automatically generated from %s - DO NOT EDIT */\n\n'%regFilename) def endFile(self): self.outFile.write('\nvoid ' + prefix + 'ResolveExtensionProcs(void)\n{\n') for funcname in self.wrappers.keys(): @@ -251,7 +153,6 @@ class PreResolveOutputGenerator(OutputGenerator): self.outFile.write('}\n\n') def beginFeature(self, interface, emit): OutputGenerator.beginFeature(self, interface, emit) - self.OldVersion = self.featureName.startswith('GL_VERSION_1_0') or self.featureName.startswith('GL_VERSION_1_1') def endFeature(self): OutputGenerator.endFeature(self) def genType(self, typeinfo, name): @@ -260,21 +161,21 @@ class PreResolveOutputGenerator(OutputGenerator): OutputGenerator.genEnum(self, enuminfo, name) def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) + if name in WinGDI: return self.outFile.write('RESOLVE_DECL(PFN' + name.upper() + 'PROC);\n') self.wrappers[name]=1 -class MyOutputGenerator(OutputGenerator): +class WrapperOutputGenerator(OutputGenerator): def __init__(self, errFile = sys.stderr, warnFile = sys.stderr, diagFile = sys.stdout): OutputGenerator.__init__(self, errFile, warnFile, diagFile) - self.wrappers={} def beginFile(self, genOpts): - pass + self.outFile.write('/* Automatically generated from %s - DO NOT EDIT */\n\n'%regFilename) def endFile(self): pass def beginFeature(self, interface, emit): @@ -288,26 +189,18 @@ class MyOutputGenerator(OutputGenerator): OutputGenerator.genEnum(self, enuminfo, name) def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) - # Avoid generating wrappers which aren't referenced by the dispatch table - if dispatchheader and not name in dispatch : - self.outFile.write('/* No wrapper for ' + name + ', not in dispatch table */\n') - return if name in WinGDI: return - self.wrappers[name]=1 - proto=noneStr(cmd.elem.find('proto')) rettype=noneStr(proto.text) if rettype.lower()!="void ": plist = ([t for t in proto.itertext()]) rettype = ''.join(plist[:-1]) - #ptype=proto.find("ptype") - #if ptype!=None: - # rettype = (noneStr(ptype.text))+" " + rettype=rettype.strip() if staticwrappers: self.outFile.write("static ") - self.outFile.write("%s__stdcall %sWrapper("%(rettype, name)) + self.outFile.write("%s %sWrapper("%(rettype, name)) params = cmd.elem.findall('param') plist=[] for param in params: @@ -322,55 +215,230 @@ class MyOutputGenerator(OutputGenerator): Comma=", " else: self.outFile.write("void") + + self.outFile.write(")\n{\n") + + # for GL 1.0 and 1.1 functions, generate stdcall wrappers which call the function directly if self.OldVersion: - if nodebugcallcounting: - self.outFile.write(")\n{\n") + if not nodebug: + self.outFile.write(' if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n");\n'%(prefix.upper(), name)) + self.outFile.write(" glWinDirectProcCalls++;\n") + self.outFile.write("\n") + + if rettype.lower()=="void": + self.outFile.write(" %s( "%(name)) else: - self.outFile.write( """) -{ -#ifdef _DEBUG - if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n"); - glWinDirectProcCalls++; -#endif -"""%(prefix.upper(), name)) - if rettype.lower()=="void ": + self.outFile.write(" return %s( "%(name)) + + Comma="" + for ptype, pname in plist: + self.outFile.write("%s%s_"%(Comma, pname)) + Comma=", " + + # for GL 1.2+ functions, generate stdcall wrappers which use wglGetProcAddress() + else: + if rettype.lower()=="void": + self.outFile.write(' RESOLVE(PFN%sPROC, "%s");\n'%(name.upper(), name)) + + if not nodebug: + self.outFile.write("\n") + self.outFile.write(' if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n");\n'%(prefix.upper(), name)) + self.outFile.write("\n") + + self.outFile.write(" RESOLVED_PROC(PFN%sPROC)( """%(name.upper())) + else: + self.outFile.write(' RESOLVE_RET(PFN%sPROC, "%s", FALSE);\n'%(name.upper(), name)) + + if not nodebug: + self.outFile.write("\n") + self.outFile.write(' if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n");\n'%(prefix.upper(), name)) + self.outFile.write("\n") + + self.outFile.write(" return RESOLVED_PROC(PFN%sPROC)("%(name.upper())) + + Comma="" + for ptype, pname in plist: + self.outFile.write("%s%s_"%(Comma, pname)) + Comma=", " + self.outFile.write(" );\n}\n\n") + +class ThunkOutputGenerator(OutputGenerator): + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + def beginFile(self, genOpts): + self.outFile.write('/* Automatically generated from %s - DO NOT EDIT */\n\n'%regFilename) + def endFile(self): + pass + def beginFeature(self, interface, emit): + OutputGenerator.beginFeature(self, interface, emit) + self.OldVersion = self.featureName.startswith('GL_VERSION_1_0') or self.featureName.startswith('GL_VERSION_1_1') + def endFeature(self): + OutputGenerator.endFeature(self) + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + def genCmd(self, cmd, name): + OutputGenerator.genCmd(self, cmd, name) + + proto=noneStr(cmd.elem.find('proto')) + rettype=noneStr(proto.text) + if rettype.lower()!="void ": + plist = ([t for t in proto.itertext()]) + rettype = ''.join(plist[:-1]) + rettype=rettype.strip() + self.outFile.write("%s %sWrapper("%(rettype, name)) + params = cmd.elem.findall('param') + plist=[] + for param in params: + paramlist = ([t for t in param.itertext()]) + paramtype = ''.join(paramlist[:-1]) + paramname = paramlist[-1] + plist.append((paramtype, paramname)) + Comma="" + if len(plist): + for ptype, pname in plist: + self.outFile.write("%s%s%s_"%(Comma, ptype, pname)) + Comma=", " + else: + self.outFile.write("void") + + self.outFile.write(")\n{\n") + + # for GL 1.0 and 1.1 functions, generate stdcall thunk wrappers which call the function directly + if self.OldVersion: + if rettype.lower()=="void": self.outFile.write(" %s( "%(name)) else: self.outFile.write(" return %s( "%(name)) + Comma="" for ptype, pname in plist: self.outFile.write("%s%s_"%(Comma, pname)) Comma=", " + + # for GL 1.2+ functions, generate wrappers which use wglGetProcAddress() else: - if rettype.lower()=="void ": - self.outFile.write(""") -{ - RESOLVE(PFN%sPROC, "%s");"""%(name.upper(), name)) - if not nodebugcallcounting: self.outFile.write(""" -#ifdef _DEBUG - if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n"); -#endif"""%(prefix.upper(), name)) - self.outFile.write(""" - RESOLVED_PROC(PFN%sPROC)( """%(name.upper())) + if rettype.lower()=="void": + self.outFile.write(' RESOLVE(PFN%sPROC, "%s");\n'%(name.upper(), name)) + self.outFile.write(" RESOLVED_PROC(PFN%sPROC)( """%(name.upper())) else: - self.outFile.write(""") -{ - RESOLVE_RET(PFN%sPROC, "%s", FALSE);"""%(name.upper(), name)) - if not nodebugcallcounting: self.outFile.write(""" -#ifdef _DEBUG - if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n"); -#endif"""%(prefix.upper(), name)) - self.outFile.write(""" - return RESOLVED_PROC(PFN%sPROC)( """%(name.upper())) + self.outFile.write(' RESOLVE_RET(PFN%sPROC, "%s", FALSE);\n'%(name.upper(), name)) + self.outFile.write(" return RESOLVED_PROC(PFN%sPROC)("%(name.upper())) + Comma="" for ptype, pname in plist: self.outFile.write("%s%s_"%(Comma, pname)) Comma=", " self.outFile.write(" );\n}\n\n") +class ThunkDefsOutputGenerator(OutputGenerator): + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + def beginFile(self, genOpts): + self.outFile.write("EXPORTS\n"); # this must be the first line for libtool to realize this is a .def file + self.outFile.write('; Automatically generated from %s - DO NOT EDIT\n\n'%regFilename) + def endFile(self): + pass + def beginFeature(self, interface, emit): + OutputGenerator.beginFeature(self, interface, emit) + def endFeature(self): + OutputGenerator.endFeature(self) + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + def genCmd(self, cmd, name): + OutputGenerator.genCmd(self, cmd, name) + + # export the wrapper function with the name of the function it wraps + self.outFile.write("%s = %sWrapper\n"%(name, name)) + +class ShimOutputGenerator(OutputGenerator): + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + def beginFile(self, genOpts): + self.outFile.write('/* Automatically generated from %s - DO NOT EDIT */\n\n'%regFilename) + def endFile(self): + pass + def beginFeature(self, interface, emit): + OutputGenerator.beginFeature(self, interface, emit) + self.OldVersion = self.featureName.startswith('GL_VERSION_1_0') or self.featureName.startswith('GL_VERSION_1_1') or self.featureName.startswith('GL_VERSION_1_2') or self.featureName.startswith('GL_ARB_imaging') or self.featureName.startswith('GL_ARB_multitexture') or self.featureName.startswith('GL_ARB_texture_compression') + def endFeature(self): + OutputGenerator.endFeature(self) + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + def genCmd(self, cmd, name): + OutputGenerator.genCmd(self, cmd, name) + + if not self.OldVersion: + return + + # for GL functions which are in the ABI, generate a shim which calls the function via GetProcAddress + proto=noneStr(cmd.elem.find('proto')) + rettype=noneStr(proto.text) + if rettype.lower()!="void ": + plist = ([t for t in proto.itertext()]) + rettype = ''.join(plist[:-1]) + rettype=rettype.strip() + self.outFile.write("%s %s("%(rettype, name)) + params = cmd.elem.findall('param') + plist=[] + for param in params: + paramlist = ([t for t in param.itertext()]) + paramtype = ''.join(paramlist[:-1]) + paramname = paramlist[-1] + plist.append((paramtype, paramname)) + Comma="" + if len(plist): + for ptype, pname in plist: + self.outFile.write("%s%s%s_"%(Comma, ptype, pname)) + Comma=", " + else: + self.outFile.write("void") + + self.outFile.write(")\n{\n") + + self.outFile.write(' typedef %s (* PFN%sPROC)(' % (rettype, name.upper())) + + if len(plist): + Comma="" + for ptype, pname in plist: + self.outFile.write("%s %s %s_"%(Comma, ptype, pname)) + Comma=", " + else: + self.outFile.write("void") + + self.outFile.write(');\n') + + if rettype.lower()=="void": + self.outFile.write(' RESOLVE(PFN%sPROC, "%s");\n'%(name.upper(), name)) + self.outFile.write(' RESOLVED_PROC(') + else: + self.outFile.write(' RESOLVE_RET(PFN%sPROC, "%s", 0);\n'%(name.upper(), name)) + self.outFile.write(' return RESOLVED_PROC(') + + Comma="" + for ptype, pname in plist: + self.outFile.write("%s%s_"%(Comma, pname)) + Comma=", " + + self.outFile.write(" );\n}\n\n") + def genHeaders(): - startTimer() outFile = open(outFilename,"w") + if preresolve: gen = PreResolveOutputGenerator(errFile=errWarn, warnFile=errWarn, @@ -378,40 +446,40 @@ def genHeaders(): gen.outFile=outFile reg.setGenerator(gen) reg.apiGen(genOpts) - gen = MyOutputGenerator(errFile=errWarn, - warnFile=errWarn, - diagFile=diag) - gen.outFile=outFile - reg.setGenerator(gen) - reg.apiGen(genOpts) - # generate function to setup the dispatch table, which sets each - # dispatch table entry to point to it's wrapper function - # (assuming we were able to make one) - - if dispatchheader : - outFile.write( 'void glWinSetupDispatchTable(void)\n') - outFile.write( '{\n') - outFile.write( ' struct _glapi_table *disp = _glapi_get_dispatch();\n') + if wrapper: + gen = WrapperOutputGenerator(errFile=errWarn, + warnFile=errWarn, + diagFile=diag) + gen.outFile=outFile + reg.setGenerator(gen) + reg.apiGen(genOpts) - for d in sorted(dispatch.keys()) : - if d in gen.wrappers : - outFile.write(' SET_'+ d[len(prefix):] + '(disp, (void *)' + d + 'Wrapper);\n') - else : - outFile.write('#pragma message("No wrapper for ' + d + ' !")\n') + if shim: + gen = ShimOutputGenerator(errFile=errWarn, + warnFile=errWarn, + diagFile=diag) + gen.outFile=outFile + reg.setGenerator(gen) + reg.apiGen(genOpts) - outFile.write('}\n') + if thunk: + gen = ThunkOutputGenerator(errFile=errWarn, + warnFile=errWarn, + diagFile=diag) + gen.outFile=outFile + reg.setGenerator(gen) + reg.apiGen(genOpts) + if thunkdefs: + gen = ThunkDefsOutputGenerator(errFile=errWarn, + warnFile=errWarn, + diagFile=diag) + gen.outFile=outFile + reg.setGenerator(gen) + reg.apiGen(genOpts) outFile.close() -if (debug): - pdb.run('genHeaders()') -elif (profile): - import cProfile, pstats - cProfile.run('genHeaders()', 'profile.txt') - p = pstats.Stats('profile.txt') - p.strip_dirs().sort_stats('time').print_stats(50) -else: - genHeaders() +genHeaders() diff --git a/xorg-server/hw/xwin/glx/glshim.c b/xorg-server/hw/xwin/glx/glshim.c new file mode 100644 index 000000000..7109196c0 --- /dev/null +++ b/xorg-server/hw/xwin/glx/glshim.c @@ -0,0 +1,124 @@ +/* + * File: glshim.c + * Purpose: GL shim which redirects to a specified DLL + * + * Copyright (c) Jon TURNEY 2013 + * + * 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. + */ + +/* + A GL shim which redirects to a specified DLL + + XWin is statically linked with this, rather than the system libGL, so that + GL calls can be directed to mesa cygGL-1.dll, or cygnativeGLthunk.dll + (which contains cdecl-to-stdcall thunks to the native openGL32.dll) +*/ + +#ifdef HAVE_XWIN_CONFIG_H +#include <xwin-config.h> +#endif + +#define GL_GLEXT_LEGACY +#include <GL/gl.h> +#undef GL_ARB_imaging +#undef GL_VERSION_1_3 +#include <GL/glext.h> + +#include <X11/Xwindows.h> +#include <os.h> +#include "glwindows.h" +#include <glx/glxserver.h> + +static HMODULE hMod = NULL; + +/* + Implement the __glGetProcAddress function by just using GetProcAddress() on the selected DLL +*/ +void *glXGetProcAddressARB(const char *symbol) +{ + void *proc; + + /* Default to the mesa GL implementation if one hasn't been selected yet */ + if (!hMod) + glWinSelectImplementation(0); + + proc = GetProcAddress(hMod, symbol); + + if (glxWinDebugSettings.enableGLcallTrace) + ErrorF("glXGetProcAddressARB: Resolved '%s' in %p to %p\n", symbol, hMod, proc); + + return proc; +} + +/* + Select a GL implementation DLL +*/ +int glWinSelectImplementation(int native) +{ + const char *dllname; + + if (native) { + dllname = "cygnativeGLthunk.dll"; + } + else { + dllname = "cygGL-1.dll"; + } + + hMod = LoadLibraryEx(dllname, NULL, 0); + if (hMod == NULL) { + ErrorF("glWinSelectGLimplementation: Could not load '%s'\n", dllname); + return -1; + } + + ErrorF("glWinSelectGLimplementation: Loaded '%s'\n", dllname); + + /* Connect __glGetProcAddress() to our implementation of glXGetProcAddressARB() above */ + __glXsetGetProcAddress((glx_gpa_proc)glXGetProcAddressARB); + + return 0; +} + +#define RESOLVE_RET(proctype, symbol, retval) \ + proctype proc = (proctype)glXGetProcAddressARB(symbol); \ + if (proc == NULL) return retval; + +#define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,) +#define RESOLVED_PROC proc + +/* Include generated shims for direct linkage to GL functions which are in the ABI */ +#include "generated_gl_shim.c" + +/* + Special wrapper for glAddSwapHintRectWIN for copySubBuffers + + Only used with native GL if the GL_WIN_swap_hint extension is present, so we enable + GLX_MESA_copy_sub_buffer +*/ +typedef void (__stdcall * PFNGLADDSWAPHINTRECTWIN) (GLint x, GLint y, + GLsizei width, + GLsizei height); + +void +glAddSwapHintRectWINWrapper(GLint x, GLint y, GLsizei width, + GLsizei height) +{ + RESOLVE(PFNGLADDSWAPHINTRECTWIN, "glAddSwapHintRectWIN"); + RESOLVED_PROC(x, y, width, height); +} diff --git a/xorg-server/hw/xwin/glx/glwrap.c b/xorg-server/hw/xwin/glx/glthunk.c index 9733e7526..565b63465 100644 --- a/xorg-server/hw/xwin/glx/glwrap.c +++ b/xorg-server/hw/xwin/glx/glthunk.c @@ -1,13 +1,8 @@ /* - * File: glwrap.c - * Purpose: Wrapper functions for Win32 OpenGL functions - * - * Authors: Alexander Gottwald - * Jon TURNEY - * - * Copyright (c) Jon TURNEY 2009 - * Copyright (c) Alexander Gottwald 2004 + * File: glthunk.c + * Purpose: cdecl thunk wrapper library for Win32 stdcall OpenGL library * + * Copyright (c) Jon TURNEY 2009,2013 * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -37,37 +32,15 @@ #endif #include <X11/Xwindows.h> + +#define GL_GLEXT_LEGACY #include <GL/gl.h> +#undef GL_ARB_imaging +#undef GL_VERSION_1_3 #include <GL/glext.h> #include <glx/glheader.h> -#include <glx/glxserver.h> -#include <glx/glxext.h> -#include <glx/glapi.h> -#include <glx/dispatch.h> -#include <glwindows.h> #include <winmsg.h> - #ifdef _DEBUG -static unsigned int glWinIndirectProcCalls = 0; -static unsigned int glWinDirectProcCalls = 0; - -void -glWinCallDelta(void) -{ - static unsigned int glWinIndirectProcCallsLast = 0; - static unsigned int glWinDirectProcCallsLast = 0; - - if ((glWinIndirectProcCalls != glWinIndirectProcCallsLast) || - (glWinDirectProcCalls != glWinDirectProcCallsLast)) { - if (glxWinDebugSettings.enableTrace) { - ErrorF("after %d direct and %d indirect GL calls\n", - glWinDirectProcCalls - glWinDirectProcCallsLast, - glWinIndirectProcCalls - glWinIndirectProcCallsLast); - } - glWinDirectProcCallsLast = glWinDirectProcCalls; - glWinIndirectProcCallsLast = glWinIndirectProcCalls; - } -} #endif static PROC @@ -79,11 +52,9 @@ glWinResolveHelper(PROC * cache, const char *symbol) if ((*cache) == NULL) { proc = wglGetProcAddress(symbol); if (proc == NULL) { - winDebug("glwrap: Can't resolve \"%s\"\n", symbol); (*cache) = (PROC) - 1; } else { - winDebug("glwrap: Resolved \"%s\"\n", symbol); (*cache) = proc; } } @@ -109,10 +80,8 @@ glWinResolveHelper(PROC * cache, const char *symbol) static PROC cache = NULL; \ proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \ if (proc == NULL) { \ - __glXErrorCallBack(0); \ return retval; \ - } \ - INCPROCCALLS + } #define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,) @@ -123,34 +92,6 @@ glWinResolveHelper(PROC * cache, const char *symbol) OpenGL 1.2 and upward is treated as extensions, function address must found using wglGetProcAddress(), but also stdcall so still need wrappers... - - Include generated dispatch table setup function */ -#include "generated_gl_wrappers.c" - -/* - Special non-static wrapper for glGetString for debug output -*/ - -const GLubyte * -glGetStringWrapperNonstatic(GLenum name) -{ - return glGetString(name); -} - -/* - Special non-static wrapper for glAddSwapHintRectWIN for copySubBuffers -*/ - -typedef void (__stdcall * PFNGLADDSWAPHINTRECTWIN) (GLint x, GLint y, - GLsizei width, - GLsizei height); - -void -glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width, - GLsizei height) -{ - RESOLVE(PFNGLADDSWAPHINTRECTWIN, "glAddSwapHintRectWIN"); - proc(x, y, width, height); -} +#include "generated_gl_thunks.c" diff --git a/xorg-server/hw/xwin/glx/glwindows.h b/xorg-server/hw/xwin/glx/glwindows.h index 42adc5b60..177dcf1bb 100644 --- a/xorg-server/hw/xwin/glx/glwindows.h +++ b/xorg-server/hw/xwin/glx/glwindows.h @@ -42,12 +42,9 @@ typedef struct { extern glxWinDebugSettingsRec glxWinDebugSettings; -void glWinCallDelta(void); void glxWinPushNativeProvider(void); -const GLubyte *glGetStringWrapperNonstatic(GLenum name); -void glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width, - GLsizei height); -void glWinSetupDispatchTable(void); +void glAddSwapHintRectWINWrapper(GLint x, GLint y, GLsizei width, GLsizei height); +int glWinSelectImplementation(int native); #ifdef _DEBUG #ifdef _MSC_VER diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index 495e366ca..605f975c0 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -601,7 +601,9 @@ glxWinScreenProbe(ScreenPtr pScreen) if (NULL == screen) return NULL; - /* Dump out some useful information about the native renderer */ + // Select the native GL implementation (WGL) + if (glWinSelectImplementation(1)) + return NULL; // create window class { @@ -650,11 +652,12 @@ glxWinScreenProbe(ScreenPtr pScreen) // (but we need to have a current context for them to be resolvable) wglResolveExtensionProcs(); - winDebug("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION)); - winDebug("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR)); - gl_renderer = (const char *) glGetStringWrapperNonstatic(GL_RENDERER); + /* Dump out some useful information about the native renderer */ + winDebug("GL_VERSION: %s\n", glGetString(GL_VERSION)); + winDebug("GL_VENDOR: %s\n", glGetString(GL_VENDOR)); + gl_renderer = (const char *) glGetString(GL_RENDERER); winDebug("GL_RENDERER: %s\n", gl_renderer); - gl_extensions = (const char *) glGetStringWrapperNonstatic(GL_EXTENSIONS); + gl_extensions = (const char *) glGetString(GL_EXTENSIONS); wgl_extensions = wglGetExtensionsStringARBWrapper(hdc); if (!wgl_extensions) wgl_extensions = ""; @@ -668,7 +671,7 @@ glxWinScreenProbe(ScreenPtr pScreen) free(screen); LogMessage(X_ERROR, "AIGLX: Won't use generic native renderer as it is not accelerated\n"); - return NULL; + goto error; } // Can you see the problem here? The extensions string is DC specific @@ -779,7 +782,7 @@ glxWinScreenProbe(ScreenPtr pScreen) free(screen); LogMessage(X_ERROR, "AIGLX: No fbConfigs could be made from native OpenGL pixel formats\n"); - return NULL; + goto error; } /* These will be set by __glXScreenInit */ @@ -848,6 +851,13 @@ glxWinScreenProbe(ScreenPtr pScreen) pScreen->DestroyWindow = glxWinDestroyWindow; return &screen->base; + + error: + // Something went wrong and we can't use the native GL implementation + // so make sure the mesa GL implementation is selected instead + glWinSelectImplementation(0); + + return NULL; } /* ---------------------------------------------------------------------- */ @@ -1037,7 +1047,7 @@ static void glxWinDrawableCopySubBuffer(__GLXdrawable * drawable, int x, int y, int w, int h) { - glAddSwapHintRectWINWrapperNonstatic(x, y, w, h); + glAddSwapHintRectWINWrapper(x, y, w, h); glxWinDrawableSwapBuffers(NULL, drawable); } @@ -1619,7 +1629,6 @@ glxWinContextMakeCurrent(__GLXcontext * base) #ifdef _DEBUG GLWIN_TRACE_MSG("glxWinContextMakeCurrent context %p (native ctx %p)", gc, gc->ctx); - glWinCallDelta(); #endif /* Keep a note of the last active context in the drawable */ @@ -1691,7 +1700,6 @@ glxWinContextLoseCurrent(__GLXcontext * base) #ifdef _DEBUG GLWIN_TRACE_MSG("glxWinContextLoseCurrent context %p (native ctx %p)", gc, gc->ctx); - glWinCallDelta(); #endif /* Clear the last active context in the drawable */ @@ -1805,8 +1813,6 @@ glxWinCreateContext(__GLXscreen * screen, context->Dispatch=calloc(sizeof(void*), (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS)); _glapi_set_dispatch(context->Dispatch); - glWinSetupDispatchTable(); - GLWIN_DEBUG_MSG("GLXcontext %p created", context); return &(context->base); diff --git a/xorg-server/hw/xwin/glx/makefile b/xorg-server/hw/xwin/glx/makefile index 3b0413312..3b0413312 100755..100644 --- a/xorg-server/hw/xwin/glx/makefile +++ b/xorg-server/hw/xwin/glx/makefile diff --git a/xorg-server/hw/xwin/swrastwgl_dri/makefile b/xorg-server/hw/xwin/swrastwgl_dri/makefile index 201f2aeb9..201f2aeb9 100755..100644 --- a/xorg-server/hw/xwin/swrastwgl_dri/makefile +++ b/xorg-server/hw/xwin/swrastwgl_dri/makefile diff --git a/xorg-server/include/dix-config.h.in b/xorg-server/include/dix-config.h.in index d4fbe99fa..306610000 100644 --- a/xorg-server/include/dix-config.h.in +++ b/xorg-server/include/dix-config.h.in @@ -466,4 +466,7 @@ /* Wrap SIGBUS to catch MIT-SHM faults */ #undef BUSFAULT +/* Directory for shared memory temp files */ +#undef SHMDIR + #endif /* _DIX_CONFIG_H_ */ diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h index 4689e573d..218b7f639 100644 --- a/xorg-server/include/os.h +++ b/xorg-server/include/os.h @@ -702,4 +702,7 @@ xorg_backtrace(void); #define snprintf _snprintf #endif +extern _X_EXPORT int +os_move_fd(int fd); + #endif /* OS_H */ diff --git a/xorg-server/include/protocol-versions.h b/xorg-server/include/protocol-versions.h index 95df8ce1a..fc428c8cf 100644 --- a/xorg-server/include/protocol-versions.h +++ b/xorg-server/include/protocol-versions.h @@ -46,6 +46,10 @@ #define SERVER_DAMAGE_MAJOR_VERSION 1 #define SERVER_DAMAGE_MINOR_VERSION 1 +/* DRI3 */ +#define SERVER_DRI3_MAJOR_VERSION 1 +#define SERVER_DRI3_MINOR_VERSION 0 + /* DMX */ #define SERVER_DMX_MAJOR_VERSION 2 #define SERVER_DMX_MINOR_VERSION 2 @@ -63,6 +67,10 @@ #define SERVER_PANORAMIX_MAJOR_VERSION 1 #define SERVER_PANORAMIX_MINOR_VERSION 1 +/* Present */ +#define SERVER_PRESENT_MAJOR_VERSION 1 +#define SERVER_PRESENT_MINOR_VERSION 0 + /* RandR */ #define SERVER_RANDR_MAJOR_VERSION 1 #define SERVER_RANDR_MINOR_VERSION 4 diff --git a/xorg-server/miext/sync/makefile b/xorg-server/miext/sync/makefile index 295fdb250..295fdb250 100755..100644 --- a/xorg-server/miext/sync/makefile +++ b/xorg-server/miext/sync/makefile diff --git a/xorg-server/miext/sync/misyncshm.c b/xorg-server/miext/sync/misyncshm.c index 3f9350af5..01f82fc00 100644 --- a/xorg-server/miext/sync/misyncshm.c +++ b/xorg-server/miext/sync/misyncshm.c @@ -32,12 +32,13 @@ #include "pixmapstr.h" #include <sys/mman.h> #include <unistd.h> +#include <fcntl.h> #include <X11/xshmfence.h> static DevPrivateKeyRec syncShmFencePrivateKey; typedef struct _SyncShmFencePrivate { - int32_t *fence; + struct xshmfence *fence; int fd; } SyncShmFencePrivateRec, *SyncShmFencePrivatePtr; @@ -126,6 +127,7 @@ miSyncShmCreateFenceFromFd(ScreenPtr pScreen, SyncFence *pFence, int fd, Bool in miSyncInitFence(pScreen, pFence, initially_triggered); + fd = os_move_fd(fd); pPriv->fence = xshmfence_map_shm(fd); if (pPriv->fence) { pPriv->fd = fd; @@ -145,6 +147,7 @@ miSyncShmGetFenceFd(ScreenPtr pScreen, SyncFence *pFence) pPriv->fd = xshmfence_alloc_shm(); if (pPriv->fd < 0) return -1; + pPriv->fd = os_move_fd(pPriv->fd); pPriv->fence = xshmfence_map_shm(pPriv->fd); if (!pPriv->fence) { close (pPriv->fd); diff --git a/xorg-server/os/osinit.c b/xorg-server/os/osinit.c index 60d10694b..4d48ea94e 100644 --- a/xorg-server/os/osinit.c +++ b/xorg-server/os/osinit.c @@ -213,10 +213,18 @@ OsInit(void) dlinfo(RTLD_SELF, RTLD_DI_SETSIGNAL, &failure_signal); #endif -#if !defined(__CYGWIN__) +#if !defined(XQUARTZ) /* STDIN is already /dev/null and STDOUT/STDERR is managed by console_redirect.c */ +# if defined(__APPLE__) + int devnullfd = open(devnull, O_RDWR, 0); + assert(devnullfd > 2); + + dup2(devnullfd, STDIN_FILENO); + dup2(devnullfd, STDOUT_FILENO); + close(devnullfd); +# elif !defined(__CYGWIN__) fclose(stdin); fclose(stdout); -#endif +# endif /* * If a write of zero bytes to stderr returns non-zero, i.e. -1, * then writing to stderr failed, and we'll write somewhere else @@ -250,6 +258,7 @@ OsInit(void) setlinebuf(stderr); #endif } +#endif /* !XQUARTZ */ #if !defined(WIN32) || defined(__CYGWIN__) if (getpgrp() == 0) diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c index c40a938f7..ff3b7e40a 100644 --- a/xorg-server/os/utils.c +++ b/xorg-server/os/utils.c @@ -2129,3 +2129,27 @@ FormatUInt64Hex(uint64_t num, char *string) string[len] = '\0'; } + +/* Move a file descriptor out of the way of our select mask; this + * is useful for file descriptors which will never appear in the + * select mask to avoid reducing the number of clients that can + * connect to the server + */ +int +os_move_fd(int fd) +{ + int newfd; + +#ifdef F_DUPFD_CLOEXEC + newfd = fcntl(fd, F_DUPFD_CLOEXEC, MAXCLIENTS); +#else + newfd = fcntl(fd, F_DUPFD, MAXCLIENTS); +#endif + if (newfd < 0) + return fd; +#ifndef F_DUPFD_CLOEXEC + fcntl(newfd, F_SETFD, FD_CLOEXEC); +#endif + close(fd); + return newfd; +} diff --git a/xorg-server/present/present.c b/xorg-server/present/present.c index 1bd528b23..96ca99241 100644 --- a/xorg-server/present/present.c +++ b/xorg-server/present/present.c @@ -115,7 +115,8 @@ present_check_flip(RRCrtcPtr crtc, } /* Make sure the window hasn't been redirected with Composite */ - if (screen->GetWindowPixmap(window) != screen->GetScreenPixmap(screen)) + if (screen->GetWindowPixmap(window) != screen->GetScreenPixmap(screen) && + screen->GetWindowPixmap(window) != screen_priv->flip_pixmap) return FALSE; /* Check for full-screen window */ @@ -311,6 +312,36 @@ present_flip_idle(ScreenPtr screen) } } +struct pixmap_visit { + PixmapPtr old; + PixmapPtr new; +}; + +static int +present_set_tree_pixmap_visit(WindowPtr window, pointer data) +{ + struct pixmap_visit *visit = data; + ScreenPtr screen = window->drawable.pScreen; + + if ((*screen->GetWindowPixmap)(window) != visit->old) + return WT_DONTWALKCHILDREN; + (*screen->SetWindowPixmap)(window, visit->new); + return WT_WALKCHILDREN; +} + +static void +present_set_tree_pixmap(WindowPtr window, PixmapPtr pixmap) +{ + struct pixmap_visit visit; + ScreenPtr screen = window->drawable.pScreen; + + visit.old = (*screen->GetWindowPixmap)(window); + visit.new = pixmap; + if (visit.old == visit.new) + return; + TraverseTree(window, present_set_tree_pixmap_visit, &visit); +} + static void present_unflip(ScreenPtr screen) { @@ -319,6 +350,12 @@ present_unflip(ScreenPtr screen) assert (!screen_priv->unflip_event_id); assert (!screen_priv->flip_pending); + if (screen_priv->flip_window) + present_set_tree_pixmap(screen_priv->flip_window, + (*screen->GetScreenPixmap)(screen)); + + present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen)); + /* Update the screen pixmap with the current flip pixmap contents */ if (screen_priv->flip_pixmap && screen_priv->flip_window) { @@ -348,6 +385,8 @@ present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) present_flip_idle(screen); + xorg_list_del(&vblank->event_queue); + /* Transfer reference for pixmap and fence from vblank to screen_priv */ screen_priv->flip_crtc = vblank->crtc; screen_priv->flip_window = vblank->window; @@ -378,14 +417,12 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc) DebugPresent(("\te %lld ust %lld msc %lld\n", event_id, ust, msc)); xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) { if (vblank->event_id == event_id) { - xorg_list_del(&vblank->event_queue); present_execute(vblank, ust, msc); return; } } xorg_list_for_each_entry_safe(vblank, tmp, &present_flip_queue, event_queue) { if (vblank->event_id == event_id) { - xorg_list_del(&vblank->event_queue); present_flip_notify(vblank, ust, msc); return; } @@ -447,7 +484,7 @@ present_check_flip_window (WindowPtr window) /* Now check any queued vblanks */ xorg_list_for_each_entry(vblank, &window_priv->vblank, window_list) { - if (vblank->flip && !present_check_flip(vblank->crtc, window, vblank->pixmap, FALSE, NULL, 0, 0)) + if (vblank->queued && vblank->flip && !present_check_flip(vblank->crtc, window, vblank->pixmap, FALSE, NULL, 0, 0)) vblank->flip = FALSE; } } @@ -486,7 +523,8 @@ static void present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) { WindowPtr window = vblank->window; - present_screen_priv_ptr screen_priv = present_screen_priv(window->drawable.pScreen); + ScreenPtr screen = window->drawable.pScreen; + present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (vblank->wait_fence) { if (!present_fence_check_triggered(vblank->wait_fence)) { @@ -496,22 +534,45 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) } xorg_list_del(&vblank->event_queue); + vblank->queued = FALSE; + if (vblank->pixmap && vblank->window) { if (vblank->flip && screen_priv->flip_pending == NULL && !screen_priv->unflip_event_id) { DebugPresent(("\tf %p %8lld: %08lx -> %08lx\n", vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id)); - /* Prepare to flip by removing from the window/screen lists + /* Prepare to flip by placing it in the flip queue and * and sticking it into the flip_pending field */ screen_priv->flip_pending = vblank; - xorg_list_del(&vblank->window_list); xorg_list_add(&vblank->event_queue, &present_flip_queue); /* Try to flip */ - if (present_flip(vblank->crtc, vblank->event_id, vblank->target_msc, vblank->pixmap, vblank->sync_flip)) + if (present_flip(vblank->crtc, vblank->event_id, vblank->target_msc, vblank->pixmap, vblank->sync_flip)) { + RegionPtr damage; + + /* Fix window pixmaps: + * 1) Restore previous flip window pixmap + * 2) Set current flip window pixmap to the new pixmap + */ + if (screen_priv->flip_window && screen_priv->flip_window != window) + present_set_tree_pixmap(screen_priv->flip_window, + (*screen->GetScreenPixmap)(screen)); + present_set_tree_pixmap(vblank->window, vblank->pixmap); + present_set_tree_pixmap(screen->root, vblank->pixmap); + + /* Report update region as damaged + */ + if (vblank->update) { + damage = vblank->update; + RegionIntersect(damage, damage, &window->clipList); + } else + damage = &window->clipList; + + DamageDamageRegion(&vblank->window->drawable, damage); return; + } xorg_list_del(&vblank->event_queue); /* Oops, flip failed. Clear the flip_pending field @@ -531,7 +592,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) /* Check current flip */ if (window == screen_priv->flip_window) - present_unflip(window->drawable.pScreen); + present_unflip(screen); } present_copy_region(&window->drawable, vblank->pixmap, vblank->update, vblank->x_off, vblank->y_off); @@ -577,7 +638,9 @@ present_pixmap(WindowPtr window, if (!window_priv) return BadAlloc; - if (!target_crtc) { + if (!screen_priv || !screen_priv->info) + target_crtc = NULL; + else if (!target_crtc) { /* Update the CRTC if we have a pixmap or we don't have a CRTC */ if (!pixmap) @@ -621,6 +684,11 @@ present_pixmap(WindowPtr window, if (vblank->crtc != target_crtc || vblank->target_msc != target_msc) continue; + DebugPresent(("\tx %lld %p %8lld: %08lx -> %08lx (crtc %p)\n", + vblank->event_id, vblank, target_msc, + vblank->pixmap->drawable.id, vblank->window->drawable.id, + vblank->crtc)); + present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence); present_fence_destroy(vblank->idle_fence); dixDestroyPixmap(vblank->pixmap, vblank->pixmap->drawable.id); @@ -696,10 +764,12 @@ present_pixmap(WindowPtr window, target_crtc)); xorg_list_add(&vblank->event_queue, &present_exec_queue); + vblank->queued = TRUE; if (target_msc >= crtc_msc) { ret = present_queue_vblank(screen, target_crtc, vblank->event_id, target_msc); if (ret != Success) { xorg_list_del(&vblank->event_queue); + vblank->queued = FALSE; goto failure; } } else @@ -732,6 +802,7 @@ present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64 xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) { if (vblank->event_id == event_id) { xorg_list_del(&vblank->event_queue); + vblank->queued = FALSE; return; } } diff --git a/xorg-server/present/present.h b/xorg-server/present/present.h index 6a451fb23..0e3bdc08e 100644 --- a/xorg-server/present/present.h +++ b/xorg-server/present/present.h @@ -115,4 +115,13 @@ present_event_abandon(RRCrtcPtr crtc); extern _X_EXPORT Bool present_screen_init(ScreenPtr screen, present_screen_info_ptr info); +typedef void (*present_complete_notify_proc)(WindowPtr window, + CARD8 mode, + CARD32 serial, + uint64_t ust, + uint64_t msc); + +extern _X_EXPORT void +present_register_complete_notify(present_complete_notify_proc proc); + #endif /* _PRESENT_H_ */ diff --git a/xorg-server/present/present_event.c b/xorg-server/present/present_event.c index 9015c9371..3d0aaa799 100644 --- a/xorg-server/present/present_event.c +++ b/xorg-server/present/present_event.c @@ -136,6 +136,14 @@ present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, } } +static present_complete_notify_proc complete_notify; + +void +present_register_complete_notify(present_complete_notify_proc proc) +{ + complete_notify = proc; +} + void present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc) { @@ -163,6 +171,8 @@ present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 se } } } + if (complete_notify) + (*complete_notify)(window, mode, serial, ust, msc); } void diff --git a/xorg-server/present/present_priv.h b/xorg-server/present/present_priv.h index 500c7c265..8d3e0079c 100644 --- a/xorg-server/present/present_priv.h +++ b/xorg-server/present/present_priv.h @@ -69,9 +69,10 @@ struct present_vblank { present_fence_ptr wait_fence; present_notify_ptr notifies; int num_notifies; - Bool flip; - Bool sync_flip; - Bool abort_flip; + Bool queued; /* on present_exec_queue */ + Bool flip; /* planning on using flip */ + Bool sync_flip; /* do flip synchronous to vblank */ + Bool abort_flip; /* aborting this flip */ }; typedef struct present_screen_priv { diff --git a/xorg-server/present/present_request.c b/xorg-server/present/present_request.c index cd2d334ff..275a29cdc 100644 --- a/xorg-server/present/present_request.c +++ b/xorg-server/present/present_request.c @@ -26,17 +26,19 @@ #include "present_priv.h" #include "randrstr.h" +#include <protocol-versions.h> static int proc_present_query_version(ClientPtr client) { xPresentQueryVersionReply rep; REQUEST(xPresentQueryVersionReq); + rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.majorVersion = PRESENT_MAJOR; - rep.minorVersion = PRESENT_MINOR; + rep.majorVersion = SERVER_PRESENT_MAJOR_VERSION; + rep.minorVersion = SERVER_PRESENT_MINOR_VERSION; REQUEST_SIZE_MATCH(xPresentQueryVersionReq); diff --git a/xorg-server/present/present_screen.c b/xorg-server/present/present_screen.c index 6df0c1d99..1e4f55d37 100644 --- a/xorg-server/present/present_screen.c +++ b/xorg-server/present/present_screen.c @@ -206,6 +206,11 @@ present_extension_init(void) ExtensionEntry *extension; int i; +#ifdef PANORAMIX + if (!noPanoramiXExtension) + return; +#endif + extension = AddExtension(PRESENT_NAME, PresentNumberEvents, PresentNumberErrors, proc_present_dispatch, sproc_present_dispatch, NULL, StandardMinorOpcode); diff --git a/xorg-server/xfixes/region.c b/xorg-server/xfixes/region.c index 0e9ca443f..14a02ba1d 100644 --- a/xorg-server/xfixes/region.c +++ b/xorg-server/xfixes/region.c @@ -857,6 +857,7 @@ PanoramiXFixesSetWindowShapeRegion(ClientPtr client) { int result = Success, j; PanoramiXRes *win; + RegionPtr reg = NULL; REQUEST(xXFixesSetWindowShapeRegionReq); @@ -869,10 +870,22 @@ PanoramiXFixesSetWindowShapeRegion(ClientPtr client) return result; } + if (win->u.win.root) + VERIFY_REGION_OR_NONE(reg, stuff->region, client, DixReadAccess); + FOR_NSCREENS_FORWARD(j) { + ScreenPtr screen = screenInfo.screens[j]; stuff->dest = win->info[j].id; + + if (reg) + RegionTranslate(reg, -screen->x, -screen->y); + result = (*PanoramiXSaveXFixesVector[X_XFixesSetWindowShapeRegion]) (client); + + if (reg) + RegionTranslate(reg, screen->x, screen->y); + if (result != Success) break; } @@ -886,6 +899,7 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client) REQUEST(xXFixesSetPictureClipRegionReq); int result = Success, j; PanoramiXRes *pict; + RegionPtr reg = NULL; REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq); @@ -896,10 +910,22 @@ PanoramiXFixesSetPictureClipRegion(ClientPtr client) return result; } + if (pict->u.pict.root) + VERIFY_REGION_OR_NONE(reg, stuff->region, client, DixReadAccess); + FOR_NSCREENS_BACKWARD(j) { + ScreenPtr screen = screenInfo.screens[j]; stuff->picture = pict->info[j].id; + + if (reg) + RegionTranslate(reg, -screen->x, -screen->y); + result = (*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client); + + if (reg) + RegionTranslate(reg, screen->x, screen->y); + if (result != Success) break; } diff --git a/xorg-server/xkb/makefile b/xorg-server/xkb/makefile index 71a327c8e..71a327c8e 100755..100644 --- a/xorg-server/xkb/makefile +++ b/xorg-server/xkb/makefile diff --git a/xorg-server/xkeyboard-config/rules/HDR b/xorg-server/xkeyboard-config/rules/HDR index 769b8fc7f..9ee3e39d8 100644 --- a/xorg-server/xkeyboard-config/rules/HDR +++ b/xorg-server/xkeyboard-config/rules/HDR @@ -15,6 +15,7 @@ ! model layout[3] variant[3] = symbols ! model layout[4] variant[4] = symbols ! model = symbols +! model layout = symbols ! layout variant = compat ! layout[1] variant[1] = compat ! layout[2] variant[2] = compat diff --git a/xorg-server/xkeyboard-config/rules/Makefile.am b/xorg-server/xkeyboard-config/rules/Makefile.am index f2d73ce80..9ab91dcf3 100644 --- a/xorg-server/xkeyboard-config/rules/Makefile.am +++ b/xorg-server/xkeyboard-config/rules/Makefile.am @@ -23,6 +23,7 @@ endif if USE_COMPAT_RULES base_parts = base.hdr.part base.lists.part \ +base.lists.base.part \ compat/base.lists.part \ HDR base.m_k.part \ HDR base.l1_k.part \ @@ -41,6 +42,7 @@ HDR compat/base.ml2v2_s.part \ HDR compat/base.ml3v3_s.part \ HDR compat/base.ml4v4_s.part \ HDR base.m_s.part \ +HDR base.ml_s1.part \ HDR compat/base.lv_c.part \ HDR compat/base.l1v1_c.part \ HDR compat/base.l2v2_c.part \ @@ -59,6 +61,7 @@ HDR base.o_c.part \ HDR base.o_t.part evdev_parts = base.hdr.part base.lists.part \ +evdev.lists.part \ compat/base.lists.part \ HDR evdev.m_k.part \ HDR base.l1_k.part \ @@ -77,6 +80,7 @@ HDR compat/base.ml2v2_s.part \ HDR compat/base.ml3v3_s.part \ HDR compat/base.ml4v4_s.part \ HDR evdev.m_s.part \ +HDR \ HDR compat/base.lv_c.part \ HDR compat/base.l1v1_c.part \ HDR compat/base.l2v2_c.part \ @@ -97,6 +101,7 @@ HDR base.o_t.part else base_parts = base.hdr.part base.lists.part \ +base.lists.base.part \ HDR base.m_k.part \ HDR base.l1_k.part \ HDR base.l_k.part \ @@ -114,6 +119,7 @@ HDR \ HDR \ HDR \ HDR base.m_s.part \ +HDR base.ml_s1.part \ HDR \ HDR \ HDR \ @@ -132,6 +138,7 @@ HDR base.o_c.part \ HDR base.o_t.part evdev_parts = base.hdr.part base.lists.part \ +evdev.lists.part \ HDR evdev.m_k.part \ HDR base.l1_k.part \ HDR base.l_k.part \ @@ -154,6 +161,7 @@ HDR \ HDR \ HDR \ HDR \ +HDR \ HDR base.ml_c.part \ HDR base.ml1_c.part \ HDR base.m_t.part \ @@ -170,6 +178,8 @@ endif all_parts_dist = HDR base.hdr.part \ base.lists.part \ +base.lists.base.part \ +evdev.lists.part \ base.m_k.part \ base.l1_k.part \ base.l_k.part \ @@ -183,6 +193,7 @@ base.ml2_s.part \ base.ml3_s.part \ base.ml4_s.part \ base.m_s.part \ +base.ml_s1.part \ base.ml_c.part \ base.ml1_c.part \ base.m_t.part \ diff --git a/xorg-server/xkeyboard-config/rules/base.extras.xml.in b/xorg-server/xkeyboard-config/rules/base.extras.xml.in index c05fe0a08..aa47e3da0 100644 --- a/xorg-server/xkeyboard-config/rules/base.extras.xml.in +++ b/xorg-server/xkeyboard-config/rules/base.extras.xml.in @@ -685,8 +685,16 @@ <name>se</name> <_shortDescription>sv</_shortDescription> <_description>Swedish</_description> - </configItem> - <variantList> + </configItem> + <variantList> + <variant> + <configItem> + <name>dvorak_a5</name> + <_description>Swedish (Dvorak A5)</_description> + </configItem> + </variant> + </variantList> + <variantList> <variant> <configItem> <name>sun_type6</name> diff --git a/xorg-server/xkeyboard-config/rules/base.lists.base.part b/xorg-server/xkeyboard-config/rules/base.lists.base.part new file mode 100644 index 000000000..1b2094894 --- /dev/null +++ b/xorg-server/xkeyboard-config/rules/base.lists.base.part @@ -0,0 +1,54 @@ +! $inetkbds = acer_c300 acer_ferrari4k acer_laptop \ + airkey \ + apple armada azonaRF2300 \ + benqx brother \ + btc5113rf btc9000 btc9000a btc9001ah btc5090 btc9019u \ + cherryblue cherrybluea cherryblueb \ + cherrycyboard cherrycmexpert \ + chicony chicony0108 chicony0420 chicony9885 \ + compalfl90 \ + compaqeak8 compaqik7 compaqik13 compaqik18 \ + creativedw7000 \ + cymotionlinux \ + dell dellm65 inspiron dellusbmm \ + emachines ennyah_dkb1008 evdev \ + genius geniuscomfy2 \ + gyration honeywell_euroboard \ + hp250x hp5xx hp500fa hpdv5 \ + hpi6 hpxe3gc hpxe3gf hpxe4xxx hpxt1000 hpzt11xx htcdream \ + ibm_spacesaver ipaq inspiron intel \ + logiaccess logicda logicink \ + logiex110 logiclx300 \ + logiinkse logiinkseusb logiitc logiik \ + logitech_base itouch logiultrax \ + logitech_g15 \ + logidinovo logidinovoedge \ + microsoft4000 microsoft7000 microsoftinet microsoftprousb microsoftprooem microsoftprose \ + microsoftoffice microsoftmult \ + mx1998 mx2500 mx2750 \ + oretec \ + pc105 \ + presario propeller \ + qtronix \ + rapidaccess rapidaccess2 thinkpad60 \ + samsung4500 samsung4510 \ + silvercrest \ + sk1300 sk2500 sk6200 sk7100 \ + sven sven303 symplon \ + toshiba_s3000 trust trustda \ + unitekkb1925 yahoo + +! $inetmediakbds = acer_ferrari4k acer_laptop btc5090 btc9019u cherryblueb \ + cherrybluea herrycyboard chicony042 compaqik13 compaqik18 \ + armada presario dellm65 inspiron dellusbmm diamond \ + ennyah_dkb1008 genius geniuscomfy2 hpi6 hpxe3gc hpxe3gf \ + hpxt1000 hpzt11xx hpdv5 hpxe4xxx hp5xx thinkpad60 ogitech_base \ + logidinovo logidinovoedge logitech_g15 mx1998 mx2500 mx2750 \ + microsoft4000 microsoft7000 microsoftprooem microsoftmult \ + propeller samsung4500 samsung4510 sk1300 sk2500 sk7100 \ + toshiba_s3000 trust trustda cymotionlinux silvercrest \ + emachines benqx unitekkb1925 creativedw7000 compalfl90 \ + pc105 a4techKB21 a4techKBS8 a4_rfkb23 asus_laptop btc6301urf \ + dexxa dtk2000 fscaa1667g geniuskb19e geniuscomfy latitude \ + microsoftpro precision_m scorpius sp_inet targa_v811 thinkpad \ + tm2030USB-102 tm2030USB-106 trust_slimline diff --git a/xorg-server/xkeyboard-config/rules/base.lists.part b/xorg-server/xkeyboard-config/rules/base.lists.part index 97b3b907f..08c081821 100644 --- a/xorg-server/xkeyboard-config/rules/base.lists.part +++ b/xorg-server/xkeyboard-config/rules/base.lists.part @@ -33,45 +33,6 @@ ! $azerty = be fr ! $qwertz = al cz de hr hu ro si sk -! $inetkbds = acer_c300 acer_ferrari4k acer_laptop \ - airkey \ - apple armada azonaRF2300 \ - benqx brother \ - btc5113rf btc9000 btc9000a btc9001ah btc5090 btc9019u \ - cherryblue cherrybluea cherryblueb \ - cherrycyboard cherrycmexpert \ - chicony chicony0108 chicony0420 chicony9885 \ - compalfl90 \ - compaqeak8 compaqik7 compaqik13 compaqik18 \ - creativedw7000 \ - cymotionlinux \ - dell dellm65 inspiron dellusbmm \ - emachines ennyah_dkb1008 evdev \ - genius geniuscomfy2 \ - gyration honeywell_euroboard \ - hp250x hp5xx hp500fa hpdv5 \ - hpi6 hpxe3gc hpxe3gf hpxe4xxx hpxt1000 hpzt11xx htcdream \ - ibm_spacesaver ipaq inspiron intel \ - logiaccess logicda logicink \ - logiex110 logiclx300 \ - logiinkse logiinkseusb logiitc logiik \ - logitech_base itouch logiultrax \ - logitech_g15 \ - logidinovo logidinovoedge \ - microsoft4000 microsoft7000 microsoftinet microsoftprousb microsoftprooem microsoftprose \ - microsoftoffice microsoftmult \ - mx1998 mx2500 mx2750 \ - oretec \ - pc105 \ - presario propeller \ - qtronix \ - rapidaccess rapidaccess2 thinkpad60 \ - samsung4500 samsung4510 \ - silvercrest \ - sk1300 sk2500 sk6200 sk7100 \ - sven sven303 symplon \ - toshiba_s3000 trust trustda \ - unitekkb1925 yahoo // all layouts with 3rd and 4th groups ! $threelevellayouts = al az \ @@ -95,8 +56,6 @@ vn \ za -! $evdevkbds = ibm_spacesaver - ! $thinkpads = thinkpad thinkpad60 thinkpadz60 ! $sun = sun_type6_jp sun_type6_usb sun_type6_euro_usb \ @@ -117,3 +76,4 @@ ! $sun_compat = sun_type6 sun_type6_suncompat sun_type7_suncompat suncompat ! $htcdreamlayouts = us it de + diff --git a/xorg-server/xkeyboard-config/rules/base.ml_s1.part b/xorg-server/xkeyboard-config/rules/base.ml_s1.part new file mode 100644 index 000000000..1a35202da --- /dev/null +++ b/xorg-server/xkeyboard-config/rules/base.ml_s1.part @@ -0,0 +1 @@ + $inetmediakbds jp = +jp(henkan) diff --git a/xorg-server/xkeyboard-config/rules/base.o_s.part b/xorg-server/xkeyboard-config/rules/base.o_s.part index 35b6ef3b6..a31556b55 100644 --- a/xorg-server/xkeyboard-config/rules/base.o_s.part +++ b/xorg-server/xkeyboard-config/rules/base.o_s.part @@ -8,6 +8,7 @@ altwin:hyper_win = +altwin(hyper_win) altwin:alt_super_win = +altwin(alt_super_win) altwin:swap_alt_win = +altwin(swap_alt_win) + grab:debug = +srvr_ctrl(grab_debug) grp:switch = +group(switch) grp:lswitch = +group(lswitch) grp:win_switch = +group(win_switch) diff --git a/xorg-server/xkeyboard-config/rules/base.xml.in b/xorg-server/xkeyboard-config/rules/base.xml.in index 1c75531d8..42fda3fb2 100644 --- a/xorg-server/xkeyboard-config/rules/base.xml.in +++ b/xorg-server/xkeyboard-config/rules/base.xml.in @@ -1762,9 +1762,9 @@ <layout> <configItem> <name>bd</name> - <!-- Keyboard indicator for Bengali layouts --> + <!-- Keyboard indicator for Bangla layouts --> <_shortDescription>bn</_shortDescription> - <_description>Bengali</_description> + <_description>Bangla</_description> <languageList> <iso639Id>ben</iso639Id> </languageList> @@ -1773,7 +1773,7 @@ <variant> <configItem> <name>probhat</name> - <_description>Bengali (Probhat)</_description> + <_description>Bangla (Probhat)</_description> </configItem> </variant> </variantList> @@ -1789,9 +1789,9 @@ <variant> <configItem> <name>ben</name> - <!-- Keyboard indicator for Bengali layouts --> + <!-- Keyboard indicator for Bangla layouts --> <_shortDescription>bn</_shortDescription> - <_description>Bengali (India)</_description> + <_description>Bangla (India)</_description> <languageList> <iso639Id>ben</iso639Id> </languageList> @@ -1800,9 +1800,9 @@ <variant> <configItem> <name>ben_probhat</name> - <!-- Keyboard indicator for Bengali layouts --> + <!-- Keyboard indicator for Bangla layouts --> <_shortDescription>bn</_shortDescription> - <_description>Bengali (India, Probhat)</_description> + <_description>Bangla (India, Probhat)</_description> <languageList> <iso639Id>ben</iso639Id> </languageList> @@ -1811,28 +1811,28 @@ <variant> <configItem> <name>ben_baishakhi</name> - <_description>Bengali (India, Baishakhi)</_description> + <_description>Bangla (India, Baishakhi)</_description> <languageList><iso639Id>ben</iso639Id></languageList> </configItem> </variant> <variant> <configItem> <name>ben_bornona</name> - <_description>Bengali (India, Bornona)</_description> + <_description>Bangla (India, Bornona)</_description> <languageList><iso639Id>ben</iso639Id></languageList> </configItem> </variant> <variant> <configItem> <name>ben_gitanjali</name> - <_description>Bengali (India, Uni Gitanjali)</_description> + <_description>Bangla (India, Uni Gitanjali)</_description> <languageList><iso639Id>ben</iso639Id></languageList> </configItem> </variant> <variant> <configItem> <name>ben_inscript</name> - <_description>Bengali (India, Baishakhi Inscript)</_description> + <_description>Bangla (India, Baishakhi Inscript)</_description> <languageList><iso639Id>ben</iso639Id></languageList> </configItem> </variant> @@ -6033,6 +6033,24 @@ <_description>Right Alt as Right Ctrl</_description> </configItem> </option> + <option> + <configItem> + <name>ctrl:swap_lalt_lctl</name> + <_description>Swap Left Alt key with Left Ctrl key</_description> + </configItem> + </option> + <option> + <configItem> + <name>ctrl:swap_lwin_lctl</name> + <_description>Swap Left Win key with Left Ctrl key</_description> + </configItem> + </option> + <option> + <configItem> + <name>ctrl:swap_lalt_lctl_lwin</name> + <_description>Left Alt as Ctrl, Left Ctrl as Win, Left Win as Alt</_description> + </configItem> + </option> </group> <group allowMultipleSelection="true"> <!-- Using startard LEDs to indicate the alternative (not first) group(s) --> @@ -6532,6 +6550,12 @@ <_description>Allow breaking grabs with keyboard actions (warning: security risk)</_description> </configItem> </option> + <option> + <configItem> + <name>grab:debug_actions</name> + <_description>Allow grab and window tree logging</_description> + </configItem> + </option> </group> <group allowMultipleSelection="true"> <!-- Special shortcuts for the Euro character --> diff --git a/xorg-server/xkeyboard-config/rules/evdev.lists.part b/xorg-server/xkeyboard-config/rules/evdev.lists.part new file mode 100644 index 000000000..7b5d0d46d --- /dev/null +++ b/xorg-server/xkeyboard-config/rules/evdev.lists.part @@ -0,0 +1 @@ +! $evdevkbds = ibm_spacesaver diff --git a/xorg-server/xkeyboard-config/symbols/af b/xorg-server/xkeyboard-config/symbols/af index 972769b36..b93019a95 100644 --- a/xorg-server/xkeyboard-config/symbols/af +++ b/xorg-server/xkeyboard-config/symbols/af @@ -81,7 +81,7 @@ xkb_symbols "basic" { // // 2006-02-15 file created by M. Emal Alekozai <memala@gmx.net> -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "ps" { name[Group1]= "Pashto"; @@ -152,7 +152,7 @@ xkb_symbols "ps" { // // 2006-02-15 file created by M. Emal Alekozai <memala@gmx.net> -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "uz" { name[Group1]= "Uzbek (Afghanistan)"; @@ -212,7 +212,7 @@ xkb_symbols "uz" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "olpc-ps" { name[Group1]= "Pashto (Afghanistan, OLPC)"; @@ -273,7 +273,7 @@ xkb_symbols "olpc-ps" { include "group(olpc)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "fa-olpc" { name[Group1]= "Persian (Afghanistan, Dari OLPC)"; @@ -334,7 +334,7 @@ xkb_symbols "fa-olpc" { include "group(olpc)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "uz-olpc" { name[Group1]= "Uzbek (Afghanistan, OLPC)"; diff --git a/xorg-server/xkeyboard-config/symbols/altwin b/xorg-server/xkeyboard-config/symbols/altwin index 333b7dacd..239d4878c 100644 --- a/xorg-server/xkeyboard-config/symbols/altwin +++ b/xorg-server/xkeyboard-config/symbols/altwin @@ -1,5 +1,5 @@ // Meta is mapped to second level of Alt keys. -partial modifier_keys +partial modifier_keys xkb_symbols "meta_alt" { key <LALT> { [ Alt_L, Meta_L ] }; key <RALT> { type[Group1] = "TWO_LEVEL", @@ -9,7 +9,7 @@ xkb_symbols "meta_alt" { }; // Alt is mapped to the Win keys (and the usual Alt keys). -partial modifier_keys +partial modifier_keys xkb_symbols "alt_win" { key <LWIN> { [ Alt_L ] }; key <RWIN> { [ Alt_R ] }; @@ -17,7 +17,7 @@ xkb_symbols "alt_win" { }; // Ctrl is mapped to the Win keys (and the usual Ctrl keys). -partial modifier_keys +partial modifier_keys xkb_symbols "ctrl_win" { key <LWIN> { [ Control_L ] }; key <RWIN> { [ Control_R ] }; @@ -25,19 +25,22 @@ xkb_symbols "ctrl_win" { }; // Ctrl is mapped to the Alt keys, Alt to the Win keys, and Win to the Ctrl keys. -partial modifier_keys +partial modifier_keys xkb_symbols "ctrl_alt_win" { key <LALT> { [ Control_L, Control_L ] }; key <RALT> { type[Group1] = "TWO_LEVEL", symbols[Group1] = [ Control_R, Control_R ] }; key <LWIN> { [ Alt_L, Meta_L ] }; key <RWIN> { [ Alt_R, Meta_R ] }; + key <LCTL> { [ Super_L ] }; + key <RCTL> { [ Super_R ] }; modifier_map Control { <RALT>, <LALT> }; modifier_map Mod1 { <LWIN>, <RWIN> }; + modifier_map Mod4 { <LCTL>, <RCTL> }; }; // Meta is mapped to the Win keys. -partial modifier_keys +partial modifier_keys xkb_symbols "meta_win" { key <LALT> { [ Alt_L, Alt_L ] }; key <RALT> { type[Group1] = "TWO_LEVEL", @@ -49,7 +52,7 @@ xkb_symbols "meta_win" { }; // Meta is mapped to the left Win key. -partial modifier_keys +partial modifier_keys xkb_symbols "left_meta_win" { key <LALT> { [ Alt_L, Alt_L ] }; key <LWIN> { [ Meta_L ] }; @@ -58,7 +61,7 @@ xkb_symbols "left_meta_win" { }; // Hyper is mapped to the Win keys. -partial modifier_keys +partial modifier_keys xkb_symbols "hyper_win" { key <LWIN> { [ Hyper_L ] }; key <RWIN> { [ Hyper_R ] }; @@ -66,13 +69,13 @@ xkb_symbols "hyper_win" { }; // Menu is mapped to the Menu key. -partial modifier_keys +partial modifier_keys xkb_symbols "menu" { key <MENU> { [ Menu ] }; }; // Layout for Tux key caps with additional right Alt key -partial modifier_keys +partial modifier_keys xkb_symbols "alt_super_win" { key <LALT> { [ Alt_L, Meta_L ] }; key <RWIN> { [ Alt_R, Meta_R ] }; @@ -83,14 +86,14 @@ xkb_symbols "alt_super_win" { }; // Swap the Alt and Win keys. -partial modifier_keys +partial modifier_keys xkb_symbols "swap_alt_win" { include "altwin(swap_lalt_lwin)" include "altwin(swap_ralt_rwin)" }; // Swap the left Alt and Win keys. -partial hidden modifier_keys +partial hidden modifier_keys xkb_symbols "swap_lalt_lwin" { key <LALT> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Super_L ] }; @@ -98,7 +101,7 @@ xkb_symbols "swap_lalt_lwin" { }; // Swap the right Alt and Win keys. -partial hidden modifier_keys +partial hidden modifier_keys xkb_symbols "swap_ralt_rwin" { key <RALT> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Super_R ] }; diff --git a/xorg-server/xkeyboard-config/symbols/am b/xorg-server/xkeyboard-config/symbols/am index b7cc6f69e..dbe6e96d8 100644 --- a/xorg-server/xkeyboard-config/symbols/am +++ b/xorg-server/xkeyboard-config/symbols/am @@ -71,9 +71,9 @@ xkb_symbols "olpc" { xkb_symbols "phonetic" { include "am(basic)" name[Group1]= "Armenian (phonetic)"; - + key <BKSL> { [ 0x1000577, 0x1000547 ] }; - + key <AE01> { [ 0x1000567, 0x1000537 ] }; key <AE02> { [ 0x1000569, 0x1000539 ] }; key <AE03> { [ 0x1000583, 0x1000553 ] }; diff --git a/xorg-server/xkeyboard-config/symbols/apl b/xorg-server/xkeyboard-config/symbols/apl index 4262d2480..0800b5bbd 100644 --- a/xorg-server/xkeyboard-config/symbols/apl +++ b/xorg-server/xkeyboard-config/symbols/apl @@ -5,7 +5,7 @@ // This file supports: // - The Sharp APL for Unix (SAX) layout // - The IBM APL2 layout -// - The Manugistics APL*PLUS II (Version 5.1, 1993) keyboard layout +// - The Manugistics APL*PLUS II layout (version 5.1, 1993) // - The Dyalog APL layout - with additions for box drawing and commands // Unicode APL table: http://aplwiki.com/UnicodeAplTable @@ -16,27 +16,27 @@ // This file doesn't deal with all the combining stuff -- I'm not an APL programmer, // and am not quite sure what's needed here. However, it may be possible to get this -// working with dead keys and the like. Patches gratefully accepted. +// working with dead keys and the like. Patches gratefully accepted. // Some of the shift-key assignments may differ from the APL tradition. If -// that's not considered acceptable, it should be possible to remap the +// that's not considered acceptable, it should be possible to remap the // shift keys. I have striven, however, to ensure that the use of shift keys -// in these maps is at least self-consistent. +// in these maps is at least self-consistent. -// I'm assuming that this will be used with another keyboard layout (ie. for -// your language), with a special shift key to use these maps. +// I'm assuming that this will be used with another keyboard layout (i.e. for +// your language), with a special shift key to use these maps. -// 2011-12-22 Geoff Streeter: geoff@dyalog.com -// Added the Dyalog support. -// Corrected (what he thinks) are some errors. -// Resolving the confusion between APL's and Unicode's concept of Left and Right tacks. -// Unsure about some of the inheritance from APL2 into APLPLUS. Patches welcome. -// Complied with freedesktop.org requirement that the keycodes be in sorted order. Which -// leads to the bottom to top (roughly) definitions. +// 2011-12-22 Geoff Streeter <geoff@dyalog.com>, +// added the Dyalog support; +// corrected (what he thinks) are some errors: +// resolving the confusion between APL's and Unicode's concept of Left and Right tacks; +// unsure about some of the inheritance from APL2 into APLPLUS -- patches welcome; +// complied with freedesktop.org requirement that the keycodes be in sorted order, +// which leads to the bottom to top (roughly) definitions. -// default layout seems to have to be the first one. Choosing the basic Dyalog layout is definitely -// better than using the "common" one. Choosing the complete Dyalog layout is not useful to non-Dyalog -// users. +// The default layout still has to be the first one. Choosing the basic Dyalog layout is +// definitely better than using the "common" one. Choosing the complete Dyalog layout is +// not useful to non-Dyalog users. default partial alphanumeric_keys xkb_symbols "basic" { @@ -235,7 +235,7 @@ xkb_symbols "apl2" { key <AB10> { [ slash, backslash, U233F ] }; // /: ⌿ -- AFS Slash Bar key <AC10> { [ bracketleft, parenleft, U234E ] }; // ;: ⍎ -- [See B key in SAX layout] - key <AC11> { [ bracketright, parenright, U2355 ] }; // ': ⍕ -- [See N key in SAX layout] + key <AC11> { [ bracketright, parenright, U2355 ] }; // ': ⍕ -- [See N key in SAX layout] key <AD11> { [ NoSymbol, U2192, U235E ] }; // [: (←) → ⍞ -- Rightwards Arrow / AFS Quote Quad key <AD12> { [ U2337, U2378, U2359 ] }; // ]: ⌷ ⍸ ⍙ -- AFS Squish Quad / AFS Iota Underbar / AFS Delta Underbar @@ -255,7 +255,7 @@ xkb_symbols "apl2" { key <BKSL> { [ U2261, U2377, U2364 ] }; // \: ≡ ⍷ ⍤ -- Identical To / AFS Epsilon Underbar / AFS Jot Diaeresis - key <TLDE> { [ NoSymbol, U233B, U2342 ] }; // `: ⌻ ⍂ -- + key <TLDE> { [ NoSymbol, U233B, U2342 ] }; // `: ⌻ ⍂ -- include "level3(ralt_switch)" }; @@ -289,7 +289,7 @@ xkb_symbols "aplplusII" { name[Group1]= "APL keyboard symbols (Manugistics APL*PLUS II)"; key <AC10> { [ bracketleft, parenleft, U234E ] }; // ;: ⍎ -- [See B key in SAX layout] - key <AC11> { [ bracketright, parenright, U2355 ] }; // ': ⍕ -- [See N key in SAX layout] + key <AC11> { [ bracketright, parenright, U2355 ] }; // ': ⍕ -- [See N key in SAX layout] key <AD11> { [ U2190, NoSymbol, U235E ] }; // [: ← ⍞ -- Leftwards Arrow / AFS Quote Quad key <AD12> { [ U2192, NoSymbol, U236C ] }; // ]: → ⍬ -- Rightwards Arrow / AFS Zilde key <AE01> { [ NoSymbol, NoSymbol, U2261 ] }; // 1: ≡ -- Identical To @@ -350,22 +350,20 @@ xkb_symbols "aplx" { }; // APL language support for the Dyalog keyboard. -// Dyalog Ltd sell this keyboard with APL engravings. The current model is -// engraved on a Cherry G80. Base languages for US, UK and DK are availible. +// Dyalog Ltd sells this keyboard with APL engravings. The current model is +// engraved on a Cherry G80. Base languages for US, UK and DK are available. -// Geoff Streeter, Dyalog Ltd. 2007-09-03 -// geoff@dyalog.com +// Geoff Streeter, Dyalog Ltd. 2007-09-03 <geoff@dyalog.com> // extended for APL special actions 2008-09-09 -// add variant 2010-11-26 +// added a variant 2010-11-26 -// The intention is that this keyboard layout overlays a base keyboard that provides +// The intention is that this keyboard layout overlays a base keyboard that provides // the alphabet and similar. If this keyboard is placed as the 2nd layout then it can // be reached with a latching shift to increase group by one. partial hidden alphanumeric_keys xkb_symbols "dyalog_base" { - // ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓ // │ │ ⌶ │ ⍫ │ ⍒ │ ⍋ │ ⌽ │ ⍉ │ ⊖ │ ⍟ │ ⍱ │ ⍲ │ ! │ ⌹ ┃ ┃ // │ ⋄ │ ¨ │ ¯ │ < │ ≤ │ = │ ≥ │ > │ ≠ │ ∨ │ ∧ │ × │ ÷ ┃ ┃ @@ -383,7 +381,6 @@ xkb_symbols "dyalog_base" { // ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ // ┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┛ - key <AB01> { [ U2282 ] }; // subset of key <AB02> { [ U2283 ] }; // superset of key <AB03> { [ U2229 ] }; // intersection @@ -460,14 +457,14 @@ xkb_symbols "dyalog_box" { key <KP9> { [ U2510 ] }; // box drawing light down and left key <KPDL> { [ U2502 ] }; // box drawing light vertical -}; +}; partial hidden xkb_symbols "dyalog_codes" { // Layout of private use area for this. In the style of the Unicode book // -// APL special actions F800-F88F +// APL special actions F800-F88F // // │F800 F810 F820 F830 F840 F850 F860 F870 F880 // ├────┬────┬────┬────┬────┬────┬────┬────┬────┐ @@ -504,7 +501,7 @@ xkb_symbols "dyalog_codes" { // F│RL │FD │HK │Lc │BH │PU │ │ │OS │ // └────┴────┴────┴────┴────┴────┴────┴────┴────┘ // -// APL Function Keys F700-F7FF +// APL Function Keys F700-F7FF // // │F700 ... ... F7F0 // ├────┬────┬────┬────┬....┬────┬────┬────┬────┐ @@ -514,9 +511,9 @@ xkb_symbols "dyalog_codes" { // . // F│F15 │F31 │F47 │F63 │ │F207│F223│F239│F255│ // └────┴────┴────┴────┴....┴────┴────┴────┴────┘ -// +// // whilst these locations are defined. Dyalog's "aplkeys/xterm" file copes with -// normal function keys from the base keyboard rather than this overlay +// normal function keys from the base keyboard rather than this overlay. // ┌─────┐ ┌───┐ // │ │ │ZM │ @@ -540,7 +537,6 @@ xkb_symbols "dyalog_codes" { // ┃ ┃ ┃ ┃ TO ┃ ┃ ┃ ┃ // ┗━━━━━━━┻━━━━━━━┻━━━━━━━┹───────────────────────────────────┺━━━━━━━┻━━━━━━━┻━━━━━━━┛ - key <BKSP> { [ Uf850, Uf855 ] }; // BP CB key <ESC> { [ Uf800 ] }; // QT key <FK11> { [ Uf821, Uf821 ] }; // ZM, ZM put this on both, the unshifted one sometimes gets lost @@ -561,7 +557,6 @@ xkb_symbols "dyalog_codes" { key <RGHT> { [ Uf824, Uf854 ] }; // NX, RM key <UP> { [ Uf820 ] }; // BK - // ┌───┬───┬───┐ // │PT │LL │UL │ // │CP │LS │US │ @@ -589,7 +584,6 @@ xkb_symbols "dyalog_codes" { // │ │ │ │ // └───────┴───┴───┘ - key <KPAD> { [ Uf859 ] }; // TL key <KPDV> { [ Uf819 ] }; // RD key <KPMU> { [ Uf81a ] }; // TG @@ -602,4 +596,3 @@ xkb_symbols "dyalog" { include "apl(dyalog_codes)" name[Group1] = "APL keyboard symbols (Dyalog)"; }; - diff --git a/xorg-server/xkeyboard-config/symbols/ara b/xorg-server/xkeyboard-config/symbols/ara index 71b50daa5..e677aaab1 100644 --- a/xorg-server/xkeyboard-config/symbols/ara +++ b/xorg-server/xkeyboard-config/symbols/ara @@ -1,17 +1,14 @@ -// based on a keyboard map from an 'xkb/symbols/ar' file - default partial alphanumeric_keys xkb_symbols "basic" { name[Group1]= "Arabic"; // NOTES: // -// there is also combined shadda diacritis in AltGr position of simple -// diacritics fatha, fathatan, damma, dammatan, kasra and kasratan -// should a third state be added to Group2 ? -// +// There is also a combined shadda diacritic in the AltGr position of the +// simple diacritics fatha, fathatan, damma, dammatan, kasra and kasratan. (??) +// Should a third state be added to Group2? - key <TLDE> { [ Arabic_thal, Arabic_shadda ] }; + key <TLDE> { [ Arabic_thal, Arabic_shadda ] }; key <AE01> { [ 1, exclam ] }; key <AE02> { [ 2, at ] }; key <AE03> { [ 3, numbersign ] }; @@ -24,42 +21,42 @@ xkb_symbols "basic" { key <AE10> { [ 0, parenleft ] }; key <AE11> { [ minus, underscore ] }; key <AE12> { [ equal, plus ] }; - + key <AD01> { [ Arabic_dad, Arabic_fatha ] }; - key <AD02> { [ Arabic_sad, Arabic_fathatan ] }; + key <AD02> { [ Arabic_sad, Arabic_fathatan ] }; key <AD03> { [ Arabic_theh, Arabic_damma ] }; - key <AD04> { [ Arabic_qaf, Arabic_dammatan ] }; - key <AD05> { [ Arabic_feh, 0x100fef9, 0x10006a4 ] }; - key <AD06> { [ Arabic_ghain, Arabic_hamzaunderalef ] }; - key <AD07> { [ Arabic_ain, grave ] }; - key <AD08> { [ Arabic_ha, division ] }; - key <AD09> { [ Arabic_khah, multiply ] }; - key <AD10> { [ Arabic_hah, Arabic_semicolon ] }; - key <AD11> { [ Arabic_jeem, less, 0x1000686 ] }; - key <AD12> { [ Arabic_dal, greater ] }; - - key <AC01> { [ Arabic_sheen, Arabic_kasra ] }; - key <AC02> { [ Arabic_seen, Arabic_kasratan ] }; - key <AC03> { [ Arabic_yeh, bracketright ] }; - key <AC04> { [ Arabic_beh, bracketleft, 0x100067e ] }; - key <AC05> { [ Arabic_lam, 0x100fef7 ] }; - key <AC06> { [ Arabic_alef, Arabic_hamzaonalef ] }; - key <AC07> { [ Arabic_teh, Arabic_tatweel ] }; - key <AC08> { [ Arabic_noon, Arabic_comma ] }; - key <AC09> { [ Arabic_meem, slash ] }; - key <AC10> { [ Arabic_kaf, colon, 0x10006af ] }; - key <AC11> { [ Arabic_tah, quotedbl ] }; - - key <LSGT> { [ bar, brokenbar ] }; - key <AB01> { [Arabic_hamzaonyeh, asciitilde, guillemotright ] }; - key <AB02> { [ Arabic_hamza, Arabic_sukun, guillemotleft ] }; + key <AD04> { [ Arabic_qaf, Arabic_dammatan ] }; + key <AD05> { [ Arabic_feh, 0x100fef9, 0x10006a4 ] }; + key <AD06> { [ Arabic_ghain, Arabic_hamzaunderalef] }; + key <AD07> { [ Arabic_ain, grave ] }; + key <AD08> { [ Arabic_ha, division ] }; + key <AD09> { [ Arabic_khah, multiply ] }; + key <AD10> { [ Arabic_hah, Arabic_semicolon ] }; + key <AD11> { [ Arabic_jeem, less, 0x1000686 ] }; + key <AD12> { [ Arabic_dal, greater ] }; + + key <AC01> { [ Arabic_sheen, Arabic_kasra ] }; + key <AC02> { [ Arabic_seen, Arabic_kasratan ] }; + key <AC03> { [ Arabic_yeh, bracketright ] }; + key <AC04> { [ Arabic_beh, bracketleft, 0x100067e ] }; + key <AC05> { [ Arabic_lam, 0x100fef7 ] }; + key <AC06> { [ Arabic_alef, Arabic_hamzaonalef ] }; + key <AC07> { [ Arabic_teh, Arabic_tatweel ] }; + key <AC08> { [ Arabic_noon, Arabic_comma ] }; + key <AC09> { [ Arabic_meem, slash ] }; + key <AC10> { [ Arabic_kaf, colon, 0x10006af ] }; + key <AC11> { [ Arabic_tah, quotedbl ] }; + + key <LSGT> { [ bar, brokenbar ] }; + key <AB01> { [Arabic_hamzaonyeh, asciitilde, guillemotright ]}; + key <AB02> { [ Arabic_hamza, Arabic_sukun, guillemotleft ]}; key <AB03> { [Arabic_hamzaonwaw, braceright ] }; - key <AB04> { [ Arabic_ra, braceleft ] }; - key <AB05> { [ 0x100fefb, 0x100fef5 ] }; + key <AB04> { [ Arabic_ra, braceleft ] }; + key <AB05> { [ 0x100fefb, 0x100fef5 ] }; key <AB06> { [Arabic_alefmaksura, Arabic_maddaonalef ] }; - key <AB07> { [Arabic_tehmarbuta, apostrophe ] }; - key <AB08> { [ Arabic_waw, comma ] }; - key <AB09> { [ Arabic_zain, period ] }; + key <AB07> { [Arabic_tehmarbuta, apostrophe ] }; + key <AB08> { [ Arabic_waw, comma ] }; + key <AB09> { [ Arabic_zain, period ] }; key <AB10> { [ Arabic_zah, Arabic_question_mark ] }; }; @@ -74,15 +71,15 @@ xkb_symbols "azerty" { include "ara(basic)" name[Group1]= "Arabic (azerty)"; - // the north african arabic keyboard differs from the middle east one - // by the numeric row; it follows French keyboard style + // The North African Arabic keyboard differs from the Middle East one + // by the numeric row; it follows French keyboard style. // - // PROBLEM: some chars are inaccessible: ! @ # $ % ^ * - // should they go elsewhere? replace " ' that are now in double ? - // also, dead_circumflex and dead_diaeresis from French keyboard + // PROBLEM: some characters are inaccessible: ! @ # $ % ^ * + // Should they go elsewhere? Replacing " ' that are now doubled? + // Also, dead_circumflex and dead_diaeresis from French keyboard // as well as ugrave are missing, which questions the utility of the - // other accentuated latin letters. Maybe this is useful only with - // a French keyboard in Group1 ? Then, shouldn't Group1 be filled ? + // other accentuated Latin letters. Maybe this is useful only with + // a French keyboard in Group1? Then, shouldn't Group1 be filled? key <AE01> { [ ampersand, 1 ] }; key <AE02> { [ eacute, 2 ] }; @@ -101,21 +98,21 @@ partial alphanumeric_keys xkb_symbols "digits_KP" { name[Group1]= "Arabic (digits_KP)"; - // use arabic script digits on KP + // Use Arabic-script digits on the keypad. - key <KP7> { [ KP_Home, 0x1000667 ] }; // - key <KP8> { [ KP_Up, 0x1000668 ] }; // - key <KP9> { [ KP_Prior, 0x1000669 ] }; // + key <KP7> { [ KP_Home, 0x1000667 ] }; + key <KP8> { [ KP_Up, 0x1000668 ] }; + key <KP9> { [ KP_Prior, 0x1000669 ] }; - key <KP4> { [ KP_Left, 0x1000664 ] }; // - key <KP5> { [ KP_Begin, 0x1000665 ] }; // - key <KP6> { [ KP_Right, 0x1000666 ] }; // + key <KP4> { [ KP_Left, 0x1000664 ] }; + key <KP5> { [ KP_Begin, 0x1000665 ] }; + key <KP6> { [ KP_Right, 0x1000666 ] }; - key <KP1> { [ KP_End, 0x1000661 ] }; // - key <KP2> { [ KP_Down, 0x1000662 ] }; // - key <KP3> { [ KP_Next, 0x1000663 ] }; // + key <KP1> { [ KP_End, 0x1000661 ] }; + key <KP2> { [ KP_Down, 0x1000662 ] }; + key <KP3> { [ KP_Next, 0x1000663 ] }; - key <KP0> { [ KP_Insert, 0x1000660 ] }; // + key <KP0> { [ KP_Insert, 0x1000660 ] }; }; partial alphanumeric_keys @@ -123,7 +120,7 @@ xkb_symbols "digits" { include "ara(basic)" name[Group1]= "Arabic (digits)"; - // use arabic script digits + // Use Arabic-script digits on the numberic row. key <AE01> { [ 0x1000661, exclam ] }; key <AE02> { [ 0x1000662, at ] }; @@ -149,7 +146,7 @@ partial alphanumeric_keys xkb_symbols "azerty_digits" { include "ara(azerty)" name[Group1]= "Arabic (azerty/digits)"; - + key <AE01> { [ ampersand, 0x1000661 ] }; key <AE02> { [ eacute, 0x1000662 ] }; key <AE03> { [ quotedbl, 0x1000663 ] }; @@ -166,9 +163,7 @@ xkb_symbols "azerty_digits" { // http://www.qamus.org/transliteration.htm // Martin Vidner -// symbol names: see /usr/X11R6/include/X11/keysymdef.h (XFree86-devel.rpm) - -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "buckwalter" { name[Group1]= "Arabic (Buckwalter)"; @@ -191,7 +186,7 @@ xkb_symbols "buckwalter" { key <AE10> { [ 0x1000660, 0x100fd3f ] }; key <AE11> { [ minus, Arabic_tatweel ] }; key <AE12> { [ equal, plus ] }; - + key <AD01> { [ Arabic_qaf, VoidSymbol ] }; key <AD02> { [ Arabic_waw, Arabic_hamzaonwaw ] }; key <AD03> { [ VoidSymbol, Arabic_ain ] }; @@ -218,9 +213,7 @@ xkb_symbols "buckwalter" { key <AC10> { [ Arabic_semicolon, VoidSymbol ] }; key <AC11> { [ Arabic_hamza, VoidSymbol ] }; - key <BKSL> { [ VoidSymbol, Arabic_maddaonalef ] }; - -// key <LSGT> { [ bar, brokenbar ] }; + key <BKSL> { [ VoidSymbol, Arabic_maddaonalef ] }; key <AB01> { [ Arabic_zain, Arabic_zah ] }; key <AB02> { [ Arabic_khah, VoidSymbol ] }; @@ -285,7 +278,7 @@ xkb_symbols "olpc" { // REH isolated form? key <AB03> { [ Arabic_hamzaonwaw, Arabic_kasra ] }; - key <AB04> { [ Arabic_ra, Arabic_kasratan ] }; + key <AB04> { [ Arabic_ra, Arabic_kasratan ] }; key <AB05> { [ Arabic_thal, asciicircum ] }; include "group(olpc)" diff --git a/xorg-server/xkeyboard-config/symbols/at b/xorg-server/xkeyboard-config/symbols/at index bd4ba988d..c78140f05 100644 --- a/xorg-server/xkeyboard-config/symbols/at +++ b/xorg-server/xkeyboard-config/symbols/at @@ -16,7 +16,7 @@ xkb_symbols "nodeadkeys" { name[Group1]="German (Austria, eliminate dead keys)"; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac" { include "de(mac)" diff --git a/xorg-server/xkeyboard-config/symbols/ba b/xorg-server/xkeyboard-config/symbols/ba index 9a27cbd96..0cc4988d4 100644 --- a/xorg-server/xkeyboard-config/symbols/ba +++ b/xorg-server/xkeyboard-config/symbols/ba @@ -6,7 +6,7 @@ xkb_symbols "basic" { include "rs(latin)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "us" { name[Group1]= "Bosnian (US keyboard with Bosnian letters)"; @@ -15,7 +15,7 @@ xkb_symbols "us" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "alternatequotes" { name[Group1]= "Bosnian (use guillemets for quotes)"; @@ -23,7 +23,7 @@ xkb_symbols "alternatequotes" { include "rs(latinalternatequotes)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "unicode" { name[Group1]= "Bosnian (use Bosnian digraphs)"; @@ -31,7 +31,7 @@ xkb_symbols "unicode" { include "rs(latinunicode)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "unicodeus" { name[Group1]= "Bosnian (US keyboard with Bosnian digraphs)"; diff --git a/xorg-server/xkeyboard-config/symbols/bd b/xorg-server/xkeyboard-config/symbols/bd index 6a70d51a7..0fe144e8b 100644 --- a/xorg-server/xkeyboard-config/symbols/bd +++ b/xorg-server/xkeyboard-config/symbols/bd @@ -16,7 +16,7 @@ default partial alphanumeric_keys xkb_symbols "basic" { - name[Group1]= "Bengali"; + name[Group1]= "Bangla"; key <ESC> { [ Escape ] }; // numbers @@ -92,5 +92,5 @@ xkb_symbols "basic" { xkb_symbols "probhat" { include "in(ben_probhat)" - name[Group1]= "Bengali (Probhat)"; + name[Group1]= "Bangla (Probhat)"; }; diff --git a/xorg-server/xkeyboard-config/symbols/bg b/xorg-server/xkeyboard-config/symbols/bg index 994380c80..f44b5c60d 100644 --- a/xorg-server/xkeyboard-config/symbols/bg +++ b/xorg-server/xkeyboard-config/symbols/bg @@ -5,12 +5,12 @@ // both in source and binary form provided that the above copyright // notice and these terms are retained. The name of the author may not // be used to endorse or promote products derived from this software -// without prior permission. THIS SOFTWARE IS PROVIDES "AS IS" AND +// without prior permission. THIS SOFTWARE IS PROVIDED "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED. IN NO EVENT // SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES ARISING IN ANY WAY OUT // OF THE USE OF THIS SOFTWARE. // -////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// // Version 2.0 // The following variants are defined in this file: @@ -18,14 +18,14 @@ // "bds" - the BDS keyboard layout compliant with the proposed // Bulgarian state standard BDS 5237:2006 -// "phonetic" - Bulgarian phonetic layout with traditional position of -// the letters. +// "phonetic" - the phonetic Bulgarian layout with the traditional position +// of the letters // "bas_phonetic" - the phonetic keyboard layout compliant with the // proposed Bulgarian state standard BDS 5237:2006 -// "latin" - an extended variant of the QWERTY layout with symbols -// Bulgarian users will type while the keyboard is in Latin mode. +// "latin" - an extended variant of the QWERTY layout with symbols that +// Bulgarian users will type while the keyboard is in Latin mode // The reasons behind the layout of the symbols in levels 3 and 4 are // explained in http://arxiv.org/abs/0905.0484 (in Bulgarian). @@ -39,7 +39,7 @@ // 2. The layouts should not include level3(ralt_switch). -////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// // Describes Bulgarian keyboard "BDS" modified according to the // the new state standard BDS 5237:2006 and extended with symbols in @@ -48,314 +48,204 @@ default partial alphanumeric_keys xkb_symbols "bds" { name[Group1]= "Bulgarian"; - - key <TLDE> { [ parenleft, parenright, - bracketleft, bracketright ] }; - key <AE01> { [ 1, exclam ] }; - key <AE02> { [ 2, question ] }; - key <AE03> { [ 3, plus, - dagger, dagger ] }; - key <AE04> { [ 4, quotedbl ] }; - key <AE05> { [ 5, percent, - U2329, U232A ] }; - key <AE06> { [ 6, equal, - emdash, emdash ] }; - key <AE07> { [ 7, colon, - ellipsis, ellipsis ] }; - key <AE08> { [ 8, slash, - U0300, U0301 ] }; - key <AE09> { [ 9, endash ] }; - key <AE10> { [ 0, numerosign ] }; - key <AE11> { [ minus, dollar, - U2011, EuroSign ] }; - key <AE12> { [ period, EuroSign ] }; - - - key <AD01> { [ comma, Cyrillic_yeru, - rightsinglequotemark, leftsinglequotemark ] }; - key <AD02> { [ Cyrillic_u, Cyrillic_U ] }; - key <AD03> { [ Cyrillic_ie, Cyrillic_IE, - Cyrillic_e, Cyrillic_E ] }; - key <AD04> { [ Cyrillic_i, Cyrillic_I, - U045D, U040D ] }; - key <AD05> { [ Cyrillic_sha, Cyrillic_SHA ] }; - key <AD06> { [ Cyrillic_shcha, Cyrillic_SHCHA ] }; - key <AD07> { [ Cyrillic_ka, Cyrillic_KA, - copyright, copyright ] }; - key <AD08> { [ Cyrillic_es, Cyrillic_ES, - copyright, copyright ] }; - key <AD09> { [ Cyrillic_de, Cyrillic_DE ] }; - key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] }; - key <AD11> { [ Cyrillic_tse, Cyrillic_TSE ] }; - key <AD12> { [ semicolon, section ] }; - - - key <AC01> { [ Cyrillic_softsign, U045D, - Cyrillic_yeru, Cyrillic_YERU ] }; - key <AC02> { [ Cyrillic_ya, Cyrillic_YA, - U0463, U0462 ] }; - key <AC03> { [ Cyrillic_a, Cyrillic_A ] }; - key <AC04> { [ Cyrillic_o, Cyrillic_O ] }; - key <AC05> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; - key <AC06> { [ Cyrillic_ghe, Cyrillic_GHE ] }; - key <AC07> { [ Cyrillic_te, Cyrillic_TE, - trademark, trademark ] }; - key <AC08> { [ Cyrillic_en, Cyrillic_EN ] }; - key <AC09> { [ Cyrillic_ve, Cyrillic_VE ] }; - key <AC10> { [ Cyrillic_em, Cyrillic_EM ] }; - key <AC11> { [ Cyrillic_che, Cyrillic_CHE ] }; - key <BKSL> { [ doublelowquotemark, leftdoublequotemark, - guillemotleft, guillemotright ] }; - - - key <LSGT> { [ U045D, U040D ] }; - key <AB01> { [ Cyrillic_yu, Cyrillic_YU ] }; - key <AB02> { [ Cyrillic_shorti, Cyrillic_SHORTI, - U046D, U046C ] }; - key <AB03> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, - U046B, U046A ] }; - key <AB04> { [ Cyrillic_e, Cyrillic_E ] }; - key <AB05> { [ Cyrillic_ef, Cyrillic_EF ] }; - key <AB06> { [ Cyrillic_ha, Cyrillic_HA ] }; - key <AB07> { [ Cyrillic_pe, Cyrillic_PE ] }; - key <AB08> { [ Cyrillic_er, Cyrillic_ER, - registered, registered ] }; - key <AB09> { [ Cyrillic_el, Cyrillic_EL ] }; - key <AB10> { [ Cyrillic_be, Cyrillic_BE ] }; - - - key <SPCE> { [ space, space, - nobreakspace, nobreakspace ] }; - - - key <KPDL> { type[Group1] = "KEYPAD", - [ KP_Delete, KP_Separator ] }; + + key <TLDE> {[ parenleft, parenright, bracketleft, bracketright ]}; + key <AE01> {[ 1, exclam ]}; + key <AE02> {[ 2, question ]}; + key <AE03> {[ 3, plus, dagger, dagger ]}; + key <AE04> {[ 4, quotedbl ]}; + key <AE05> {[ 5, percent, U2329, U232A ]}; + key <AE06> {[ 6, equal, emdash, emdash ]}; + key <AE07> {[ 7, colon, ellipsis, ellipsis ]}; + key <AE08> {[ 8, slash, U0300, U0301 ]}; + key <AE09> {[ 9, endash ]}; + key <AE10> {[ 0, numerosign ]}; + key <AE11> {[ minus, dollar, U2011, EuroSign ]}; + key <AE12> {[ period, EuroSign ]}; + + key <AD01> {[ comma, Cyrillic_yeru, rightsinglequotemark, leftsinglequotemark ]}; + key <AD02> {[ Cyrillic_u, Cyrillic_U ]}; + key <AD03> {[ Cyrillic_ie, Cyrillic_IE, Cyrillic_e, Cyrillic_E ]}; + key <AD04> {[ Cyrillic_i, Cyrillic_I, U045D, U040D ]}; + key <AD05> {[ Cyrillic_sha, Cyrillic_SHA ]}; + key <AD06> {[ Cyrillic_shcha, Cyrillic_SHCHA ]}; + key <AD07> {[ Cyrillic_ka, Cyrillic_KA, copyright, copyright ]}; + key <AD08> {[ Cyrillic_es, Cyrillic_ES, copyright, copyright ]}; + key <AD09> {[ Cyrillic_de, Cyrillic_DE ]}; + key <AD10> {[ Cyrillic_ze, Cyrillic_ZE ]}; + key <AD11> {[ Cyrillic_tse, Cyrillic_TSE ]}; + key <AD12> {[ semicolon, section ]}; + + key <AC01> {[ Cyrillic_softsign, U045D, Cyrillic_yeru, Cyrillic_YERU ]}; + key <AC02> {[ Cyrillic_ya, Cyrillic_YA, U0463, U0462 ]}; + key <AC03> {[ Cyrillic_a, Cyrillic_A ]}; + key <AC04> {[ Cyrillic_o, Cyrillic_O ]}; + key <AC05> {[ Cyrillic_zhe, Cyrillic_ZHE ]}; + key <AC06> {[ Cyrillic_ghe, Cyrillic_GHE ]}; + key <AC07> {[ Cyrillic_te, Cyrillic_TE, trademark, trademark ]}; + key <AC08> {[ Cyrillic_en, Cyrillic_EN ]}; + key <AC09> {[ Cyrillic_ve, Cyrillic_VE ]}; + key <AC10> {[ Cyrillic_em, Cyrillic_EM ]}; + key <AC11> {[ Cyrillic_che, Cyrillic_CHE ]}; + key <BKSL> {[ doublelowquotemark, leftdoublequotemark, guillemotleft, guillemotright ]}; + + key <LSGT> {[ U045D, U040D ]}; + key <AB01> {[ Cyrillic_yu, Cyrillic_YU ]}; + key <AB02> {[ Cyrillic_shorti, Cyrillic_SHORTI, U046D, U046C ]}; + key <AB03> {[ Cyrillic_hardsign, Cyrillic_HARDSIGN, U046B, U046A ]}; + key <AB04> {[ Cyrillic_e, Cyrillic_E ]}; + key <AB05> {[ Cyrillic_ef, Cyrillic_EF ]}; + key <AB06> {[ Cyrillic_ha, Cyrillic_HA ]}; + key <AB07> {[ Cyrillic_pe, Cyrillic_PE ]}; + key <AB08> {[ Cyrillic_er, Cyrillic_ER, registered, registered ]}; + key <AB09> {[ Cyrillic_el, Cyrillic_EL ]}; + key <AB10> {[ Cyrillic_be, Cyrillic_BE ]}; + + key <SPCE> {[ space, space, nobreakspace, nobreakspace ]}; + + key <KPDL> { type[Group1] = "KEYPAD", [ KP_Delete, KP_Separator ]}; }; -// This is improved variant of the traditional Bulgarian phonetic +// This is an improved variant of the traditional Bulgarian phonetic // keyboard. Some unnecessary symbols in levels 1 and 2 are replaced -// by more useful (the same way as in "bas_phonetic") and additional -// symbols in levels 3 and 4 are added. -partial alphanumeric_keys +// by more useful ones (similar as in "bas_phonetic") and additional +// symbols are added in levels 3 and 4. +partial alphanumeric_keys xkb_symbols "phonetic" { name[Group1]= "Bulgarian (traditional phonetic)"; - - key <TLDE> { [ Cyrillic_che, Cyrillic_CHE ] }; - key <AE01> { [ 1, exclam ] }; - key <AE02> { [ 2, at ] }; - key <AE03> { [ 3, numerosign ] }; - key <AE04> { [ 4, dollar, - EuroSign, EuroSign ] }; - key <AE05> { [ 5, percent ] }; - key <AE06> { [ 6, EuroSign ] }; - key <AE07> { [ 7, section ] }; - key <AE08> { [ 8, asterisk ] }; - key <AE09> { [ 9, parenleft, - bracketleft, U2329 ] }; - key <AE10> { [ 0, parenright, - bracketright, U232A ] }; - key <AE11> { [ minus, endash, - U2011, U2011 ] }; - key <AE12> { [ equal, plus, - emdash, dagger ] }; - - key <AD01> { [ Cyrillic_ya, Cyrillic_YA, - U0463, U0462 ] }; - key <AD02> { [ Cyrillic_ve, Cyrillic_VE ] }; - key <AD03> { [ Cyrillic_ie, Cyrillic_IE, - Cyrillic_e, Cyrillic_E ] }; - key <AD04> { [ Cyrillic_er, Cyrillic_ER, - registered, registered ] }; - key <AD05> { [ Cyrillic_te, Cyrillic_TE, - trademark, trademark ] }; - key <AD06> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, - U046B, U046A ] }; - key <AD07> { [ Cyrillic_u, Cyrillic_U ] }; - key <AD08> { [ Cyrillic_i, Cyrillic_I, - U045D, U040D ] }; - key <AD09> { [ Cyrillic_o, Cyrillic_O ] }; - key <AD10> { [ Cyrillic_pe, Cyrillic_PE ] }; - key <AD11> { [ Cyrillic_sha, Cyrillic_SHA ] }; - key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA ] }; - - - key <AC01> { [ Cyrillic_a, Cyrillic_A ] }; - key <AC02> { [ Cyrillic_es, Cyrillic_ES, - copyright, copyright ] }; - key <AC03> { [ Cyrillic_de, Cyrillic_DE ] }; - key <AC04> { [ Cyrillic_ef, Cyrillic_EF ] }; - key <AC05> { [ Cyrillic_ghe, Cyrillic_GHE ] }; - key <AC06> { [ Cyrillic_ha, Cyrillic_HA ] }; - key <AC07> { [ Cyrillic_shorti, Cyrillic_SHORTI, - U046D, U046C ] }; - key <AC08> { [ Cyrillic_ka, Cyrillic_KA ] }; - key <AC09> { [ Cyrillic_el, Cyrillic_EL ] }; - key <AC10> { [ semicolon, colon, - ellipsis, ellipsis ] }; - key <AC11> { [ apostrophe, quotedbl, - rightsinglequotemark, leftsinglequotemark ] }; - key <BKSL> { [ Cyrillic_yu, Cyrillic_YU ] }; - - - key <LSGT> { [ U045D, U040D ] }; - key <AB01> { [ Cyrillic_ze, Cyrillic_ZE ] }; - key <AB02> { [ Cyrillic_softsign, U045D, - Cyrillic_yeru, Cyrillic_YERU ] }; - key <AB03> { [ Cyrillic_tse, Cyrillic_TSE, - copyright, copyright ] }; - key <AB04> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; - key <AB05> { [ Cyrillic_be, Cyrillic_BE ] }; - key <AB06> { [ Cyrillic_en, Cyrillic_EN ] }; - key <AB07> { [ Cyrillic_em, Cyrillic_EM ] }; - key <AB08> { [ comma, doublelowquotemark, - guillemotleft, guillemotleft ] }; - key <AB09> { [ period, leftdoublequotemark, - guillemotright, guillemotright ] }; - key <AB10> { [ slash, question, - U0300, U0301 ] }; - - - key <SPCE> { [ space, space, - nobreakspace, nobreakspace ] }; - - - key <KPDL> { type[Group1] = "KEYPAD", - [ KP_Delete, KP_Separator ] }; + key <TLDE> {[ Cyrillic_che, Cyrillic_CHE ]}; + key <AE01> {[ 1, exclam ]}; + key <AE02> {[ 2, at ]}; + key <AE03> {[ 3, numerosign ]}; + key <AE04> {[ 4, dollar, EuroSign, EuroSign ]}; + key <AE05> {[ 5, percent ]}; + key <AE06> {[ 6, EuroSign ]}; + key <AE07> {[ 7, section ]}; + key <AE08> {[ 8, asterisk ]}; + key <AE09> {[ 9, parenleft, bracketleft, U2329 ]}; + key <AE10> {[ 0, parenright, bracketright, U232A ]}; + key <AE11> {[ minus, endash, U2011, U2011 ]}; + key <AE12> {[ equal, plus, emdash, dagger ]}; + + key <AD01> {[ Cyrillic_ya, Cyrillic_YA, U0463, U0462 ]}; + key <AD02> {[ Cyrillic_ve, Cyrillic_VE ]}; + key <AD03> {[ Cyrillic_ie, Cyrillic_IE, Cyrillic_e, Cyrillic_E ]}; + key <AD04> {[ Cyrillic_er, Cyrillic_ER, registered, registered ]}; + key <AD05> {[ Cyrillic_te, Cyrillic_TE, trademark, trademark ]}; + key <AD06> {[ Cyrillic_hardsign, Cyrillic_HARDSIGN, U046B, U046A ]}; + key <AD07> {[ Cyrillic_u, Cyrillic_U ]}; + key <AD08> {[ Cyrillic_i, Cyrillic_I, U045D, U040D ]}; + key <AD09> {[ Cyrillic_o, Cyrillic_O ]}; + key <AD10> {[ Cyrillic_pe, Cyrillic_PE ]}; + key <AD11> {[ Cyrillic_sha, Cyrillic_SHA ]}; + key <AD12> {[ Cyrillic_shcha, Cyrillic_SHCHA ]}; + + key <AC01> {[ Cyrillic_a, Cyrillic_A ]}; + key <AC02> {[ Cyrillic_es, Cyrillic_ES, copyright, copyright ]}; + key <AC03> {[ Cyrillic_de, Cyrillic_DE ]}; + key <AC04> {[ Cyrillic_ef, Cyrillic_EF ]}; + key <AC05> {[ Cyrillic_ghe, Cyrillic_GHE ]}; + key <AC06> {[ Cyrillic_ha, Cyrillic_HA ]}; + key <AC07> {[ Cyrillic_shorti, Cyrillic_SHORTI, U046D, U046C ]}; + key <AC08> {[ Cyrillic_ka, Cyrillic_KA ]}; + key <AC09> {[ Cyrillic_el, Cyrillic_EL ]}; + key <AC10> {[ semicolon, colon, ellipsis, ellipsis ]}; + key <AC11> {[ apostrophe, quotedbl, rightsinglequotemark, leftsinglequotemark ]}; + key <BKSL> {[ Cyrillic_yu, Cyrillic_YU ]}; + + key <LSGT> {[ U045D, U040D ]}; + key <AB01> {[ Cyrillic_ze, Cyrillic_ZE ]}; + key <AB02> {[ Cyrillic_softsign, U045D, Cyrillic_yeru, Cyrillic_YERU ]}; + key <AB03> {[ Cyrillic_tse, Cyrillic_TSE, copyright, copyright ]}; + key <AB04> {[ Cyrillic_zhe, Cyrillic_ZHE ]}; + key <AB05> {[ Cyrillic_be, Cyrillic_BE ]}; + key <AB06> {[ Cyrillic_en, Cyrillic_EN ]}; + key <AB07> {[ Cyrillic_em, Cyrillic_EM ]}; + key <AB08> {[ comma, doublelowquotemark, guillemotleft, guillemotleft ]}; + key <AB09> {[ period, leftdoublequotemark, guillemotright, guillemotright ]}; + key <AB10> {[ slash, question, U0300, U0301 ]}; + + key <SPCE> {[ space, space, nobreakspace, nobreakspace ]}; + + key <KPDL> { type[Group1] = "KEYPAD", [ KP_Delete, KP_Separator ]}; }; -// This is the Bulgarian phonetic keyboard acording to the proposed -// state standard BDS 5237:2006 with additional symbols in -// levels 3 and 4. -partial alphanumeric_keys +// This is the Bulgarian phonetic keyboard according to the proposed +// state standard BDS 5237:2006 with additional symbols in levels 3 and 4. +partial alphanumeric_keys xkb_symbols "bas_phonetic" { include "bg(phonetic)" name[Group1]= "Bulgarian (new phonetic)"; - - key <TLDE> { [ Cyrillic_yu, Cyrillic_YU ] }; - key <AD01> { [ Cyrillic_che, Cyrillic_CHE ] }; - key <AD02> { [ Cyrillic_sha, Cyrillic_SHA ] }; - key <AD11> { [ Cyrillic_ya, Cyrillic_YA, - U0463, U0462 ] }; - key <BKSL> { [ Cyrillic_softsign, U045D, - Cyrillic_yeru, Cyrillic_YERU ] }; - key <AB02> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; - key <AB04> { [ Cyrillic_ve, Cyrillic_VE ] }; + + key <TLDE> {[ Cyrillic_yu, Cyrillic_YU ]}; + key <AD01> {[ Cyrillic_che, Cyrillic_CHE ]}; + key <AD02> {[ Cyrillic_sha, Cyrillic_SHA ]}; + key <AD11> {[ Cyrillic_ya, Cyrillic_YA, U0463, U0462 ]}; + key <BKSL> {[ Cyrillic_softsign, U045D, Cyrillic_yeru, Cyrillic_YERU ]}; + key <AB02> {[ Cyrillic_zhe, Cyrillic_ZHE ]}; + key <AB04> {[ Cyrillic_ve, Cyrillic_VE ]}; }; -// This is extended variant of the standard Latin QWERTY layout with +// This is an extended variant of the standard Latin QWERTY layout with // additional symbols in levels 3 and 4. -partial hidden alphanumeric_keys +partial hidden alphanumeric_keys xkb_symbols "latin" { - - key <TLDE> { [ grave, asciitilde, - U2248, U2245 ] }; - key <AE01> { [ 1, exclam, - notsign, notsign ] }; - key <AE02> { [ 2, at, - twosuperior, enfilledcircbullet ] }; - key <AE03> { [ 3, numbersign, - threesuperior, notequal ] }; - key <AE04> { [ 4, dollar, - EuroSign, sterling ] }; - key <AE05> { [ 5, percent, - U2030, U2030 ] }; - key <AE06> { [ 6, asciicircum, - logicaland, logicalor ] }; - key <AE07> { [ 7, ampersand, - section, section ] }; - key <AE08> { [ 8, asterisk, - infinity, multiply ] }; - key <AE09> { [ 9, parenleft, - U2202, nabla ] }; - key <AE10> { [ 0, parenright, - U2300, U2300 ] }; - key <AE11> { [ minus, underscore, - U2011, endash ] }; - key <AE12> { [ equal, plus, - emdash, plusminus ] }; - - - key <AD01> { [ q, Q, - Greek_THETA, Greek_theta ] }; - key <AD02> { [ w, W, - Greek_OMEGA, Greek_omega ] }; - key <AD03> { [ e, E, - U2203, Greek_epsilon ] }; - key <AD04> { [ r, R, - registered, Greek_rho ] }; - key <AD05> { [ t, T, - trademark, Greek_tau ] }; - key <AD06> { [ y, Y, - yen, Greek_upsilon ] }; - key <AD07> { [ u, U, - intersection, union ] }; - key <AD08> { [ i, I, - integral, Greek_iota ] }; - key <AD09> { [ o, O, - degree, U222E ] }; - key <AD10> { [ p, P, - Greek_PI, Greek_pi ] }; - key <AD11> { [ bracketleft, braceleft, - U2286, includedin ] }; - key <AD12> { [ bracketright, braceright, - U2208, U2209 ] }; - - - key <AC01> { [ a, A, - U2200, Greek_alpha ] }; - key <AC02> { [ s, S, - Greek_SIGMA, Greek_sigma ] }; - key <AC03> { [ d, D, - Greek_DELTA, Greek_delta ] }; - key <AC04> { [ f, F, - Greek_PHI, Greek_phi ] }; - key <AC05> { [ g, G, - Greek_GAMMA, Greek_gamma ] }; - key <AC06> { [ h, H, - U2225, Greek_eta ] }; - key <AC07> { [ j, J ] }; - key <AC08> { [ k, K, - U03F0, Greek_kappa ] }; - key <AC09> { [ l, L, - Greek_LAMBDA, Greek_lambda ] }; - key <AC10> { [ semicolon, colon, - division, division ] }; - key <AC11> { [ apostrophe, quotedbl, - leftdoublequotemark, rightdoublequotemark ] }; - key <BKSL> { [ backslash, bar, - identical, downtack ] }; - - - key <LSGT> { [ less, greater, - U2266, U2267 ] }; - key <AB01> { [ z, Z, - U2220, Greek_zeta ] }; - key <AB02> { [ x, X, - Greek_XI, Greek_xi ] }; - key <AB03> { [ c, C, - copyright, Greek_chi ] }; - key <AB04> { [ v, V, - Greek_PSI, Greek_psi ] }; - key <AB05> { [ b, B, - U03D1, Greek_beta ] }; - key <AB06> { [ n, N, - U207F, Greek_nu ] }; - key <AB07> { [ m, M, - Greek_mu, Greek_mu ] }; - key <AB08> { [ comma, less, - U2266, U21D4 ] }; - key <AB09> { [ period, greater, - U2267, U21D2 ] }; - key <AB10> { [ slash, question, - leftsinglequotemark, rightsinglequotemark ] }; - - - key <SPCE> { [ space, space, - nobreakspace, nobreakspace ] }; - - - key <KPDL> { type[Group1] = "KEYPAD", - [ KP_Delete, KP_Decimal ] }; + + key <TLDE> {[ grave, asciitilde, U2248, U2245 ]}; + key <AE01> {[ 1, exclam, notsign, notsign ]}; + key <AE02> {[ 2, at, twosuperior, enfilledcircbullet ]}; + key <AE03> {[ 3, numbersign, threesuperior, notequal ]}; + key <AE04> {[ 4, dollar, EuroSign, sterling ]}; + key <AE05> {[ 5, percent, U2030, U2030 ]}; + key <AE06> {[ 6, asciicircum, logicaland, logicalor ]}; + key <AE07> {[ 7, ampersand, section, section ]}; + key <AE08> {[ 8, asterisk, infinity, multiply ]}; + key <AE09> {[ 9, parenleft, U2202, nabla ]}; + key <AE10> {[ 0, parenright, U2300, U2300 ]}; + key <AE11> {[ minus, underscore, U2011, endash ]}; + key <AE12> {[ equal, plus, emdash, plusminus ]}; + + key <AD01> {[ q, Q, Greek_THETA, Greek_theta ]}; + key <AD02> {[ w, W, Greek_OMEGA, Greek_omega ]}; + key <AD03> {[ e, E, U2203, Greek_epsilon ]}; + key <AD04> {[ r, R, registered, Greek_rho ]}; + key <AD05> {[ t, T, trademark, Greek_tau ]}; + key <AD06> {[ y, Y, yen, Greek_upsilon ]}; + key <AD07> {[ u, U, intersection, union ]}; + key <AD08> {[ i, I, integral, Greek_iota ]}; + key <AD09> {[ o, O, degree, U222E ]}; + key <AD10> {[ p, P, Greek_PI, Greek_pi ]}; + key <AD11> {[ bracketleft, braceleft, U2286, includedin ]}; + key <AD12> {[ bracketright, braceright, U2208, U2209 ]}; + + key <AC01> {[ a, A, U2200, Greek_alpha ]}; + key <AC02> {[ s, S, Greek_SIGMA, Greek_sigma ]}; + key <AC03> {[ d, D, Greek_DELTA, Greek_delta ]}; + key <AC04> {[ f, F, Greek_PHI, Greek_phi ]}; + key <AC05> {[ g, G, Greek_GAMMA, Greek_gamma ]}; + key <AC06> {[ h, H, U2225, Greek_eta ]}; + key <AC07> {[ j, J ]}; + key <AC08> {[ k, K, U03F0, Greek_kappa ]}; + key <AC09> {[ l, L, Greek_LAMBDA, Greek_lambda ]}; + key <AC10> {[ semicolon, colon, division, division ]}; + key <AC11> {[ apostrophe, quotedbl, leftdoublequotemark, rightdoublequotemark]}; + key <BKSL> {[ backslash, bar, identical, downtack ]}; + + key <LSGT> {[ less, greater, U2266, U2267 ]}; + key <AB01> {[ z, Z, U2220, Greek_zeta ]}; + key <AB02> {[ x, X, Greek_XI, Greek_xi ]}; + key <AB03> {[ c, C, copyright, Greek_chi ]}; + key <AB04> {[ v, V, Greek_PSI, Greek_psi ]}; + key <AB05> {[ b, B, U03D1, Greek_beta ]}; + key <AB06> {[ n, N, U207F, Greek_nu ]}; + key <AB07> {[ m, M, Greek_mu, Greek_mu ]}; + key <AB08> {[ comma, less, U2266, U21D4 ]}; + key <AB09> {[ period, greater, U2267, U21D2 ]}; + key <AB10> {[ slash, question, leftsinglequotemark, rightsinglequotemark]}; + + key <SPCE> {[ space, space, nobreakspace, nobreakspace ]}; + + key <KPDL> { type[Group1] = "KEYPAD", [ KP_Delete, KP_Decimal ]}; }; diff --git a/xorg-server/xkeyboard-config/symbols/bt b/xorg-server/xkeyboard-config/symbols/bt index c02505e98..e53942107 100644 --- a/xorg-server/xkeyboard-config/symbols/bt +++ b/xorg-server/xkeyboard-config/symbols/bt @@ -18,7 +18,7 @@ xkb_symbols "basic" { name[Group1]= "Dzongkha"; key <TLDE> { [ 0x1000F09, 0x1000F0A, 0x1000F6C, 0x1000F6D ] }; - + // numbers e.a. key <AE01> { [ 0x1000F21, 0x1000F04, 1, exclam ] }; key <AE02> { [ 0x1000F22, 0x1000F05, 2, at ] }; @@ -63,7 +63,7 @@ xkb_symbols "basic" { key <AC09> { [ 0x1000F59, 0x1000FA9, 0x1000F39, VoidSymbol ] }; key <AC10> { [ 0x1000F5A, 0x1000FAA, colon, semicolon ] }; key <AC11> { [ 0x1000F5B, 0x1000FAB, apostrophe, quotedbl ] }; - + // TODO: BKSL and LSGT are from gb layout, are there any variants? key <BKSL> { [ 0x1000F5D, 0x1000FAD, backslash, 0x1000FBA ] }; key <LSGT> { [ 0x1000F0D, 0x1000F11, 0x1000F10, 0x1000F0F ] }; diff --git a/xorg-server/xkeyboard-config/symbols/bw b/xorg-server/xkeyboard-config/symbols/bw index 48de2e2df..ab14cc7d8 100644 --- a/xorg-server/xkeyboard-config/symbols/bw +++ b/xorg-server/xkeyboard-config/symbols/bw @@ -4,7 +4,7 @@ xkb_symbols "tswana" { include "us" name[Group1]= "Tswana"; - + key <AC10> { [ semicolon, colon, 0x01000324, 0x01000324 ] }; //COMBINING DIAERESIS BELOW key <AC11> { [apostrophe, quotedbl, 0x01000301, 0x01000308 ] }; //COMBINING ACUTE ACCENT, COMBINING DIAERESIS key <TLDE> { [ grave, asciitilde, 0x01000300, 0x01000303 ] }; //COMBINING GRAVE ACCENT, COMBINING TILDE diff --git a/xorg-server/xkeyboard-config/symbols/by b/xorg-server/xkeyboard-config/symbols/by index 00ecd6a8d..d82bcf57e 100644 --- a/xorg-server/xkeyboard-config/symbols/by +++ b/xorg-server/xkeyboard-config/symbols/by @@ -19,7 +19,7 @@ partial alphanumeric_keys xkb_symbols "legacy" { include "by(basic)" name[Group1]= "Belarusian (legacy)"; - + key <AE03> { [ 3, numbersign ] }; key <AE04> { [ 4, asterisk ] }; key <AE05> { [ 5, colon ] }; @@ -36,7 +36,7 @@ partial alphanumeric_keys xkb_symbols "latin" { include "latin" name[Group1]= "Belarusian (Latin)"; - + key <AD02> { [ w, W, scaron, Scaron ] }; key <AD07> { [ u, U, ubreve, Ubreve ] }; key <AC02> { [ s, S, sacute, Sacute ] }; @@ -46,6 +46,6 @@ xkb_symbols "latin" { key <AB03> { [ c, C, cacute, Cacute ] }; key <AB04> { [ v, V, ccaron, Ccaron ] }; key <AB06> { [ n, N, nacute, Nacute ] }; - + include "level3(ralt_switch)" }; diff --git a/xorg-server/xkeyboard-config/symbols/ca b/xorg-server/xkeyboard-config/symbols/ca index c4d37ad5c..abfbbd9f7 100644 --- a/xorg-server/xkeyboard-config/symbols/ca +++ b/xorg-server/xkeyboard-config/symbols/ca @@ -266,7 +266,7 @@ xkb_symbols "multi-2gr" { // Inuktitut keyboard for X11 // written by Pablo Saratxaga <pablo@mandrakesoft.com> -alphanumeric_keys +alphanumeric_keys xkb_symbols "ike" { name[Group1]= "Inuktitut"; @@ -453,18 +453,18 @@ xkb_symbols "multix" { xkb_symbols "olpc" { include "ca(fr)" - + key <AE02> { [ 2, quotedbl, ograve, Ograve ] }; key <AE03> { [ 3, slash, at, VoidSymbol ] }; - + key <AD03> { [ e, E, EuroSign, VoidSymbol] }; - + key <AB09> { [ period, period, 0x1002010 ] }; - + key <I219> { [ guillemotleft, guillemotright, degree, VoidSymbol ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "eng" { name[Group1] = "English (Canada)"; include "us(basic)" @@ -472,7 +472,7 @@ xkb_symbols "eng" { // EXTRAS: -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "kut" { // Ejective U0313 and acute accents are taken from shs layout. @@ -501,7 +501,7 @@ xkb_symbols "kut" { // Secwepemctsin keyboard for X11 // written by Neskie Manuel <neskiem@gmail.com> -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "shs" { include "us" diff --git a/xorg-server/xkeyboard-config/symbols/capslock b/xorg-server/xkeyboard-config/symbols/capslock index 337c5efd2..928d79a3e 100644 --- a/xorg-server/xkeyboard-config/symbols/capslock +++ b/xorg-server/xkeyboard-config/symbols/capslock @@ -68,7 +68,7 @@ xkb_symbols "ctrl_modifier" { replace key <CAPS> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Caps_Lock ], - actions[Group1] = [ SetMods(modifiers=Control) ] + actions[Group1] = [ SetMods(modifiers=Control) ] }; modifier_map Control { <CAPS> }; }; diff --git a/xorg-server/xkeyboard-config/symbols/ch b/xorg-server/xkeyboard-config/symbols/ch index 54663f1fa..62c69f958 100644 --- a/xorg-server/xkeyboard-config/symbols/ch +++ b/xorg-server/xkeyboard-config/symbols/ch @@ -36,7 +36,7 @@ xkb_symbols "basic" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "legacy" { include "ch(basic)" @@ -44,12 +44,12 @@ xkb_symbols "legacy" { key <AE07> { [ 7, slash, brokenbar ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "de" { include "ch(basic)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "de_Sundeadkeys" { // modify the basic Swiss German layout to use Sun dead keys include "ch(basic)" @@ -58,13 +58,13 @@ xkb_symbols "de_Sundeadkeys" { key <AD12> { [ dead_diaeresis, exclam, bracketright ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "de_sundeadkeys" { include "ch(de_Sundeadkeys)" name[Group1]= "German (Switzerland, Sun dead keys)"; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "de_nodeadkeys" { // modify the basic Swiss German layout not to have any dead keys include "ch(basic)" @@ -74,7 +74,7 @@ xkb_symbols "de_nodeadkeys" { key <AD12> { [ diaeresis, exclam, bracketright ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "fr" { include "ch(basic)" @@ -123,7 +123,7 @@ xkb_symbols "fr_nodeadkeys" { partial alphanumeric_keys xkb_symbols "de_mac" { - + name[Group1]= "German (Switzerland, Macintosh)"; key <AE01> { [ 1, plus, plusminus, infinity ] }; @@ -143,7 +143,7 @@ xkb_symbols "de_mac" { key <AD02> { [ w, W, Greek_SIGMA, Aacute ] }; key <AD03> { [ e, E, EuroSign, Ediaeresis ] }; key <AD04> { [ r, R, registered, Egrave ] }; - key <AD05> { [ t, T, dagger, Icircumflex ] }; + key <AD05> { [ t, T, dagger, Icircumflex ] }; key <AD06> { [ z, Z, Greek_OMEGA, Iacute ] }; key <AD07> { [ u, U, degree, Ugrave ] }; key <AD08> { [ i, I, exclamdown, idotless ] }; @@ -152,7 +152,7 @@ xkb_symbols "de_mac" { key <AD11> { [ udiaeresis, egrave, section, ydiaeresis ] }; key <AD12> { [ dead_diaeresis, exclam, grave, apostrophe ] }; key <AC01> { [ a, A, aring, Aring ] }; - key <AC02> { [ s, S, ssharp, NoSymbol ] }; + key <AC02> { [ s, S, ssharp, NoSymbol ] }; // ligature fl key <AC03> { [ d, D, Greek_sigma, NoSymbol ] }; // partialderivative is not available here att @@ -168,7 +168,7 @@ xkb_symbols "de_mac" { key <AB02> { [ x, X, similarequal, trademark ] }; key <AB03> { [ c, C, copyright, NoSymbol ] }; key <AB04> { [ v, V, radical, diamond ] }; - key <AB05> { [ b, B, integral, NoSymbol ] }; + key <AB05> { [ b, B, integral, NoSymbol ] }; key <AB06> { [ n, N, dead_tilde, enopencircbullet ] }; // to be fixed att key <AB07> { [ m, M, mu, dead_abovering ] }; @@ -186,7 +186,7 @@ xkb_symbols "de_mac" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "fr_mac" { include "ch(de_mac)" diff --git a/xorg-server/xkeyboard-config/symbols/cn b/xorg-server/xkeyboard-config/symbols/cn index 8c2ffe422..6b6562dbc 100644 --- a/xorg-server/xkeyboard-config/symbols/cn +++ b/xorg-server/xkeyboard-config/symbols/cn @@ -58,7 +58,7 @@ xkb_symbols "basic" { // you and maybe they'll find a fix. You won't notice it unless you're // fast at typing Tibetan anyway. -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "tib" { name[Group1]= "Tibetan"; @@ -113,7 +113,7 @@ xkb_symbols "tib" { key <AB08> { [ 0x1000f50, 0x1000f4b, 0x1000fa0, 0x1000f9b ] }; # ཐ ཋ ྠ ྛ key <AB09> { [ 0x1000f47, 0x1000f3a, 0x1000f97, 0x1000f8b ] }; # ཇ ༺ ྗ ྋ key <AB10> { [ 0x1000f49, 0x1000f3b, 0x1000f99, 0x1000f8a ] }; # ཉ ༻ ྙ ྊ - + }; // Tibetan Standard Keyboard with ASCII numerals @@ -131,7 +131,7 @@ xkb_symbols "tib" { // email addresses are not possible.) This mapping may change in the future // if a clearly better use for the shifted numerals is pointed out by users. -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "tib_asciinum" { include "cn(tib)" diff --git a/xorg-server/xkeyboard-config/symbols/ctrl b/xorg-server/xkeyboard-config/symbols/ctrl index ca019ec7d..785777cfe 100644 --- a/xorg-server/xkeyboard-config/symbols/ctrl +++ b/xorg-server/xkeyboard-config/symbols/ctrl @@ -1,57 +1,80 @@ // Eliminate CapsLock, making it another Ctrl. -partial modifier_keys +partial modifier_keys xkb_symbols "nocaps" { - replace key <CAPS> { [ Control_L, Control_L ] }; + replace key <CAPS> { [ Control_L, Control_L ] }; modifier_map Control { <CAPS>, <LCTL> }; }; // Make the left Ctrl key a left Meta. xkb_symbols "lctrl_meta" { - replace key <LCTL> { [ Meta_L ] }; + replace key <LCTL> { [ Meta_L ] }; }; // Swap the functions of the CapsLock key and the left Ctrl key. -partial modifier_keys +partial modifier_keys xkb_symbols "swapcaps" { - replace key <CAPS> { [ Control_L ] }; - replace key <LCTL> { [ Caps_Lock ] }; + replace key <CAPS> { [ Control_L ] }; + replace key <LCTL> { [ Caps_Lock ] }; }; // Move Ctrl to the leftmost key on the middle row and CapsLock to the // leftmost key on the bottom row. Only works if the geometry or keycodes // file has defined appropriate aliases for the keys in question. -partial modifier_keys +partial modifier_keys xkb_symbols "ac_ctrl" { - replace key <AC00> { [ Control_L ] }; - replace key <AA00> { [ Caps_Lock ] }; + replace key <AC00> { [ Control_L ] }; + replace key <AA00> { [ Caps_Lock ] }; }; // Move Ctrl to the leftmost key on the bottom row and CapsLock to the // leftmost key on the middle row. Only works if the geometry or keycodes // file has defined appropriate aliases for the keys in question. -partial modifier_keys +partial modifier_keys xkb_symbols "aa_ctrl" { - replace key <AA00> { [ Control_L ] }; - replace key <AC00> { [ Caps_Lock ] }; + replace key <AA00> { [ Control_L ] }; + replace key <AC00> { [ Caps_Lock ] }; }; // Right Ctrl key functions as another right Alt. -partial modifier_keys +partial modifier_keys xkb_symbols "rctrl_ralt" { - key <RCTL> { symbols[Group1]= [ Alt_R ] }; + key <RCTL> { symbols[Group1]= [ Alt_R ] }; }; // Menu key functions as another right Ctrl. partial modifier_keys xkb_symbols "menu_rctrl" { - replace key <MENU> { [ Control_R, Control_R ] }; + replace key <MENU> { [ Control_R, Control_R ] }; modifier_map Control { Control_L, <MENU> }; }; // Right Alt key functions as another right Ctrl. -partial modifier_keys +partial modifier_keys xkb_symbols "ralt_rctrl" { replace key <RALT> { type[Group1] = "TWO_LEVEL", symbols[Group1] = [ Control_R, Control_R ] }; - modifier_map Control { <RALT> }; + modifier_map Control { <RALT> }; +}; + +// Swap the functions of the left Alt key and the left Ctrl key. +partial modifier_keys +xkb_symbols "swap_lalt_lctl" { + replace key <LALT> { [ Control_L, Control_L ] }; + replace key <LCTL> { [ Alt_L, Meta_L ] }; +}; + +// Swap the functions of the left Win key and the left Ctrl key. +partial modifier_keys +xkb_symbols "swap_lwin_lctl" { + replace key <LWIN> { [ Control_L ] }; + replace key <LCTL> { [ Super_L ] }; +}; + +// Map Ctrl to the left Alt key, Alt to the left Win key, +// and Super to the left Ctrl key. +partial modifier_keys +xkb_symbols "swap_lalt_lctl_lwin" { + replace key <LALT> { [ Control_L, Control_L ] }; + replace key <LWIN> { [ Alt_L, Meta_L ] }; + replace key <LCTL> { [ Super_L ] }; }; diff --git a/xorg-server/xkeyboard-config/symbols/cz b/xorg-server/xkeyboard-config/symbols/cz index 20af4b281..083cc7674 100644 --- a/xorg-server/xkeyboard-config/symbols/cz +++ b/xorg-server/xkeyboard-config/symbols/cz @@ -1,6 +1,6 @@ default partial alphanumeric_keys xkb_symbols "basic" { - + // This layout conforms to a new cz compromise standard designed // to satisfy most unix, windows and mac users. // 2001 by Kamil Toman <ktoman@email.cz> @@ -46,7 +46,7 @@ xkb_symbols "basic" { key <AC07> { [ j, J, apostrophe, NoSymbol ] }; key <AC08> { [ k, K, lstroke, NoSymbol ] }; key <AC09> { [ l, L, Lstroke, NoSymbol ] }; - + key <AC10> { [ uring, quotedbl, dollar, NoSymbol ] }; key <AC11> { [ section, exclam, apostrophe, ssharp ] }; key <AC12> { [ EuroSign, dead_diaeresis, NoSymbol, NoSymbol ] }; @@ -77,14 +77,14 @@ xkb_symbols "bksl" { key <BKSL> { [ backslash, bar, slash, NoSymbol ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "qwerty" { - + // This layout represent actual keyboard layout. It complies with symbols // printed on keys. // ----------------------------------------------------------------------- // This layout was created in 2011 by Lukáš Mojžíš <lmojzis@grenames.cz> - + include "cz(basic)" name[Group1]= "Czech (qwerty)"; diff --git a/xorg-server/xkeyboard-config/symbols/de b/xorg-server/xkeyboard-config/symbols/de index 01bde5d20..a497d7f48 100644 --- a/xorg-server/xkeyboard-config/symbols/de +++ b/xorg-server/xkeyboard-config/symbols/de @@ -39,7 +39,7 @@ xkb_symbols "basic" { key <AB02> { [ x, X, guillemotleft, U2039 ] }; key <AB04> { [ v, V, doublelowquotemark, singlelowquotemark ] }; key <AB05> { [ b, B, leftdoublequotemark, leftsinglequotemark ] }; - key <AB06> { [ n, N, rightdoublequotemark, rightsinglequotemark ] }; + key <AB06> { [ n, N, rightdoublequotemark, rightsinglequotemark ] }; key <AB08> { [ comma, semicolon, periodcentered, multiply ] }; key <AB09> { [ period, colon, U2026, division ] }; key <AB10> { [ minus, underscore, endash, emdash ] }; @@ -221,7 +221,7 @@ xkb_symbols "ro_nodeadkeys" { // in many programming languages. // to use this keymap, use a 105-key-keyboard and the command setxkbmap -model pc105 -layout dvorak -variant de // source: http://www-lehre.informatik.uni-osnabrueck.de/~rfreund/dvorak.php -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "dvorak" { include "us(dvorak)" @@ -479,7 +479,7 @@ xkb_symbols "neo" { // Copied from macintosh_vndr/de // olh@suse.de very close to MacOS map -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac" { include "de" @@ -496,7 +496,7 @@ xkb_symbols "mac" { key <AD07> { [ u, U, diaeresis, Aacute ] }; key <AD08> { [ i, I, slash, Ucircumflex ] }; key <AD11> { [ udiaeresis, Udiaeresis, periodcentered, degree ] }; - key <AD12> { [ plus, asterisk, asciitilde ] }; + key <AD12> { [ plus, asterisk, asciitilde ] }; key <AC01> { [ a, A, aring, Aring ] }; key <AC05> { [ g, G, copyright ] }; key <AC06> { [ h, H, ordfeminine ] }; @@ -506,7 +506,7 @@ xkb_symbols "mac" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac_nodeadkeys" { // modify the standard German mac layout to not have any dead keys include "de(mac)" @@ -571,13 +571,13 @@ xkb_symbols "dsb_qwertz" key <AD09> { [ o, O, oacute, Oacute ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "qwerty" { - + // This layout should work exactly as a de with the exception // of 'Z' and 'Y' keys, which are in the qwerty style (ie. swapped). // 2008 by Matej Košík <kosik@fiit.stuba.sk> - + include "de(basic)" name[Group1] = "German (qwerty)"; @@ -594,7 +594,7 @@ partial alphanumeric_keys xkb_symbols "ru" { include "de(basic)" - + name[Group1]= "Russian (Germany, phonetic)"; key.type[group1]="FOUR_LEVEL_ALPHABETIC"; diff --git a/xorg-server/xkeyboard-config/symbols/dk b/xorg-server/xkeyboard-config/symbols/dk index 34667fc48..838478bf8 100644 --- a/xorg-server/xkeyboard-config/symbols/dk +++ b/xorg-server/xkeyboard-config/symbols/dk @@ -43,7 +43,7 @@ xkb_symbols "nodeadkeys" { }; // Copied from macintosh_vndr/dk -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac" { include "dk" @@ -55,7 +55,7 @@ xkb_symbols "mac" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac_nodeadkeys" { include "dk(mac)" name[Group1]= "Danish (Macintosh, eliminate dead keys)"; @@ -64,7 +64,7 @@ xkb_symbols "mac_nodeadkeys" { key <AD12> { [diaeresis, asciicircum, asciitilde, dead_macron ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "dvorak" { include "no(dvorak)" diff --git a/xorg-server/xkeyboard-config/symbols/ee b/xorg-server/xkeyboard-config/symbols/ee index 9384bee83..9e6865e55 100644 --- a/xorg-server/xkeyboard-config/symbols/ee +++ b/xorg-server/xkeyboard-config/symbols/ee @@ -59,7 +59,7 @@ partial alphanumeric_keys xkb_symbols "dvorak" { include "us(dvorak)" name[Group1]= "Estonian (Dvorak)"; - + key <AE03> { [ 3, numbersign, sterling ] }; key <AE04> { [ 4, dollar, section, currency ] }; key <AE08> { [ 8, asterisk, onehalf ] }; @@ -68,7 +68,7 @@ xkb_symbols "dvorak" { key <AC02> { [ o, O, otilde, Otilde ] }; key <AC03> { [ e, E, odiaeresis, Odiaeresis ] }; key <AC04> { [ u, U, udiaeresis, Udiaeresis ] }; - key <AC10> { [ s, S, scaron, Scaron ] }; + key <AC10> { [ s, S, scaron, Scaron ] }; key <AB10> { [ z, Z, zcaron, Zcaron ] }; include "level3(ralt_switch)" diff --git a/xorg-server/xkeyboard-config/symbols/es b/xorg-server/xkeyboard-config/symbols/es index 62e2b2c6a..9e963a23f 100644 --- a/xorg-server/xkeyboard-config/symbols/es +++ b/xorg-server/xkeyboard-config/symbols/es @@ -141,7 +141,7 @@ xkb_symbols "ast" { }; // Copied from macintosh_vndr/es -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac" { include "es" name[Group1]= "Spanish (Macintosh)"; @@ -179,7 +179,7 @@ xkb_symbols "olpc" { key <AB08> { [ comma, semicolon ] }; key <AB09> { [ period, colon ] }; key <AB10> { [ minus, underscore ] }; - + key <I219> { [ less, greater, ISO_Next_Group ] }; include "level3(ralt_switch)" diff --git a/xorg-server/xkeyboard-config/symbols/fo b/xorg-server/xkeyboard-config/symbols/fo index dc9fa6b45..1000c9cf0 100644 --- a/xorg-server/xkeyboard-config/symbols/fo +++ b/xorg-server/xkeyboard-config/symbols/fo @@ -30,7 +30,7 @@ xkb_symbols "basic" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "nodeadkeys" { include "fo(basic)" diff --git a/xorg-server/xkeyboard-config/symbols/fr b/xorg-server/xkeyboard-config/symbols/fr index 3898b1c57..9c89db825 100644 --- a/xorg-server/xkeyboard-config/symbols/fr +++ b/xorg-server/xkeyboard-config/symbols/fr @@ -36,6 +36,8 @@ xkb_symbols "basic" { key <AB09> { [ colon, slash, periodcentered, division ] }; key <AB10> { [ exclam, section, dead_belowdot, dead_abovedot ] }; + include "kpdl(comma)" + include "level3(ralt_switch)" }; diff --git a/xorg-server/xkeyboard-config/symbols/gb b/xorg-server/xkeyboard-config/symbols/gb index 7bf071cca..ead9e7b1c 100644 --- a/xorg-server/xkeyboard-config/symbols/gb +++ b/xorg-server/xkeyboard-config/symbols/gb @@ -25,7 +25,7 @@ xkb_symbols "basic" { include "level3(ralt_switch_multikey)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "intl" { // Describes the differences between a very simple en_US @@ -41,7 +41,7 @@ xkb_symbols "intl" { include "latin" - name[Group1]="English (UK, international with dead keys)"; + name[Group1]="English (UK, international with dead keys)"; key <AE02> { [ 2, dead_diaeresis, twosuperior, onehalf ] }; key <AE03> { [ 3, sterling, threesuperior, onethird ] }; @@ -57,7 +57,7 @@ xkb_symbols "intl" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "extd" { // Clone of the Microsoft "English (UK, Extended" layout, which // includes dead keys for: grave; diaeresis; circumflex; tilde; and @@ -73,9 +73,9 @@ xkb_symbols "extd" { include "latin" name[Group1]="English (UK, extended WinKeys)"; - + key <TLDE> { [ dead_grave, notsign, brokenbar, NoSymbol ] }; - + key <AE02> { [ 2, quotedbl, dead_diaeresis, onehalf ] }; key <AE03> { [ 3, sterling, threesuperior, onethird ] }; key <AE04> { [ 4, dollar, EuroSign, onequarter ] }; @@ -155,7 +155,7 @@ xkb_symbols "dvorakukp" { }; // Copied from macintosh_vndr/gb -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac" { // Describes the differences between a very simple en_US @@ -175,12 +175,12 @@ xkb_symbols "mac" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac_intl" { include "latin" - name[Group1]="English (UK, Macintosh international)"; + name[Group1]="English (UK, Macintosh international)"; key <AE02> { [ 2, at, EuroSign, onehalf ] }; key <AE03> { [ 3, sterling, twosuperior, onethird ] }; diff --git a/xorg-server/xkeyboard-config/symbols/ge b/xorg-server/xkeyboard-config/symbols/ge index 8c2e2e9a0..4f590a440 100644 --- a/xorg-server/xkeyboard-config/symbols/ge +++ b/xorg-server/xkeyboard-config/symbols/ge @@ -123,7 +123,7 @@ xkb_symbols "ergonomic" { key <AC07> { [ 0x010010db, noSymbol ] }; key <AC08> { [ 0x010010e1, noSymbol ] }; key <AC09> { [ 0x010010e0, noSymbol, L ] }; - key <AC10> { [ 0x010010d1, noSymbol, colon ] }; + key <AC10> { [ 0x010010d1, noSymbol, colon ] }; key <AC11> { [ 0x010010d2, noSymbol, 0x010010f9, quotedbl ] }; key <BKSL> { [ slash, section, backslash, bar ] }; diff --git a/xorg-server/xkeyboard-config/symbols/gh b/xorg-server/xkeyboard-config/symbols/gh index bd31a0b39..f29c25d5c 100644 --- a/xorg-server/xkeyboard-config/symbols/gh +++ b/xorg-server/xkeyboard-config/symbols/gh @@ -16,7 +16,7 @@ xkb_symbols "akan" { name[Group1]= "Akan"; key <AD01> { [ 0x0100025B, 0x01000190, q, Q ] }; - key <AB02> { [ 0x01000254, 0x01000186, x, X ] }; + key <AB02> { [ 0x01000254, 0x01000186, x, X ] }; }; partial alphanumeric_keys @@ -26,8 +26,8 @@ xkb_symbols "ga" { name[Group1]= "Ga"; key <AD01> { [ 0x0100025B, 0x01000190, q, Q ] }; - key <AB02> { [ 0x01000254, 0x01000186, x, X ] }; - key <AB03> { [ 0x0100014B, 0x0100014A, c, C ] }; + key <AB02> { [ 0x01000254, 0x01000186, x, X ] }; + key <AB03> { [ 0x0100014B, 0x0100014A, c, C ] }; }; partial alphanumeric_keys @@ -37,13 +37,13 @@ xkb_symbols "ewe" { name[Group1]= "Ewe"; key <AD01> { [ 0x0100025B, 0x01000190, q, Q ] }; - key <AB03> { [ 0x0100014B, 0x0100014A, c, C ] }; - key <AD11> { [ 0x01000254, 0x01000186, braceleft, braceleft ] }; - key <AD12> { [ 0x0100028B, 0x010001B2, braceright, braceright ] }; + key <AB03> { [ 0x0100014B, 0x0100014A, c, C ] }; + key <AD11> { [ 0x01000254, 0x01000186, braceleft, braceleft ] }; + key <AD12> { [ 0x0100028B, 0x010001B2, braceright, braceright ] }; key <BKSL> { [ 0x01000256, 0x01000189, backslash, backslash ] }; key <AC07> { [ 0x01000192, 0x01000191, j, J ] }; key <AC05> { [ g, G, 0x01000263, 0x01000194 ] }; - + }; partial alphanumeric_keys @@ -113,7 +113,7 @@ xkb_symbols "avn" { key <AB03> { [ 0x01000254, 0x01000186 ] }; // ɔ, Ɔ include "level3(ralt_switch)" - + }; // This keyboard layout fully imitates the 'Ghana Unicode' layout which is used in GILLBT on Windows with Keyman. @@ -146,6 +146,6 @@ xkb_symbols "gillbt" { key <AB01> { [ z, Z, 0x01000292, 0x010001B7 ] }; // ʒ, Ʒ key <AB02> { [ 0x01000269, 0x01000196, x, X ] }; // ɩ, Ɩ key <AB03> { [ c, C, 0x010000E7, 0x010000C7 ] }; // ç, Ç - + include "level3(ralt_switch)" }; diff --git a/xorg-server/xkeyboard-config/symbols/group b/xorg-server/xkeyboard-config/symbols/group index fb2f879d0..8592f4344 100644 --- a/xorg-server/xkeyboard-config/symbols/group +++ b/xorg-server/xkeyboard-config/symbols/group @@ -1,108 +1,92 @@ -// using the group(switch) map, the right alt key temporarily chooses -// the second keyboard group (until it is released). -// -partial modifier_keys +// The right Alt key (while pressed) chooses the second keyboard group. +partial modifier_keys xkb_symbols "switch" { - key <RALT> { - symbols[Group1]= [ Mode_switch, Multi_key ], - virtualMods= AltGr + key <RALT> { + symbols[Group1] = [ Mode_switch, Multi_key ], + virtualMods= AltGr }; }; -// using the group(lswitch) map, the left alt key temporarily chooses -// the second keyboard group (until it is released). -// -partial modifier_keys +// The left Alt key (while pressed) chooses the second keyboard group. +partial modifier_keys xkb_symbols "lswitch" { - key <LALT> { - symbols[Group1]= [ Mode_switch, Multi_key ], - virtualMods= AltGr + key <LALT> { + symbols[Group1] = [ Mode_switch, Multi_key ], + virtualMods= AltGr }; }; - -// using the group(win_switch) map, both Windows'logo keys temporarily -// choose the second keyboard group (until release). If you use this -// map, you would declare you keyboard as pc101 or pc102 instead of -// pc104 or pc105. +// Either Win key (while pressed) chooses the second keyboard group. partial modifier_keys xkb_symbols "win_switch" { include "group(lwin_switch)" include "group(rwin_switch)" }; -// using the group(lwin_switch) map, the left Windows' logo key -// temporarily chooses the second keyboard group (until it is -// released). If you use this map, you would declare you keyboard as -// pc101 or pc102 instead of pc104 or pc105. +// The left Win key (while pressed) chooses the second keyboard group. +// (Using this map, you should declare your keyboard as pc101 or pc102 +// instead of pc104 or pc105.) partial modifier_keys xkb_symbols "lwin_switch" { - key <LWIN> { - symbols[Group1] = [ Mode_switch, Multi_key ], - virtualMods= AltGr + key <LWIN> { + symbols[Group1] = [ Mode_switch, Multi_key ], + virtualMods= AltGr }; }; -// using the group(rwin_switch) map, the right Windows' logo key -// temporarily chooses the second keyboard group (until it is -// released). If you use this map, you would declare you keyboard as -// pc101 or pc102 instead of pc104 or pc105. +// The right Win key (while pressed) chooses the second keyboard group. +// (Using this map, you should declare your keyboard as pc101 or pc102 +// instead of pc104 or pc105.) partial modifier_keys xkb_symbols "rwin_switch" { - key <RWIN> { - symbols[Group1] = [ Mode_switch, Multi_key ], - virtualMods= AltGr + key <RWIN> { + symbols[Group1] = [ Mode_switch, Multi_key ], + virtualMods= AltGr }; }; -// Right Ctrl key temporary chooses the second keyboard group. -// Needed mainly for Canadian keyboard +// The right Ctrl key (while pressed) chooses the second keyboard group. +// (Needed mainly for the Canadian keyboard.) partial modifier_keys xkb_symbols "rctrl_switch" { - key <RCTL> { - symbols[Group1]= [ Mode_switch ] + key <RCTL> { + symbols[Group1] = [ Mode_switch ] }; }; -// using the group(toggle) map, pressing the right alt key switches to -// the next sequential group (until the next explicit group change). -partial modifier_keys +// Pressing the right Alt key switches to the next group. +partial modifier_keys xkb_symbols "toggle" { virtual_modifiers AltGr; - key <RALT> { - symbols[Group1]= [ ISO_Next_Group ], - virtualMods= AltGr + key <RALT> { + symbols[Group1] = [ ISO_Next_Group ], + virtualMods= AltGr }; }; -// using the group(shifts_toggle) map, pressing both shift keys together -// locks the next or previous sequential keyboard group -// (depending on which shift is pressed first - right or left, -// correspongingly) -partial modifier_keys +// Pressing both Shift keys switches to the next or previous group +// (depending on which Shift is pressed first). +partial modifier_keys xkb_symbols "shifts_toggle" { - key <LFSH> { [ Shift_L, ISO_Prev_Group ] }; - key <RTSH> { [ Shift_R, ISO_Next_Group ] }; + key <LFSH> { [ Shift_L, ISO_Prev_Group ] }; + key <RTSH> { [ Shift_R, ISO_Next_Group ] }; }; -// using the group(shift_caps_toggle) map, pressing: -// Shift+Caps Lock toggles group +// Pressing Shift+Caps_Lock switches to the next group. partial modifier_keys xkb_symbols "shift_caps_toggle" { - key <CAPS> { [ Caps_Lock, ISO_Next_Group ] }; + key <CAPS> { [ Caps_Lock, ISO_Next_Group ] }; }; -// using the group(shift_caps_switch) map, pressing: -// Caps Lock selects the first group -// Shift+Caps Lock selects the last group +// Pressing Caps_Lock selects the first group, +// pressing Shift+Caps_Lock selects the last group. partial modifier_keys xkb_symbols "shift_caps_switch" { key <CAPS> { [ ISO_First_Group, ISO_Last_Group ] }; }; -// using the group(win_menu_switch) map, pressing: -// LWIN selects the first group -// RWIN or MENU selects the last group +// Pressing the left Win key selects the first group, +// pressing the right Win or the Menu key selects the last group. partial modifier_keys xkb_symbols "win_menu_switch" { virtual_modifiers AltGr; @@ -120,9 +104,8 @@ xkb_symbols "win_menu_switch" { }; }; -// using the group(lctrl_rctrl_switch) map, pressing: -// Left Control selects the first group -// Right Control selects the last group +// Pressing the left Ctrl key selects the first group, +// pressing the right Ctrl key selects the last group. partial modifier_keys xkb_symbols "lctrl_rctrl_switch" { virtual_modifiers AltGr; @@ -140,20 +123,20 @@ xkb_symbols "lctrl_rctrl_switch" { // // CTRL-SHIFT toggle section // -partial modifier_keys +partial modifier_keys xkb_symbols "lctrl_lshift_toggle" { key <LFSH> { type[Group1]="PC_CONTROL_LEVEL2", - symbols[Group1]= [ Shift_L, ISO_Next_Group ] + symbols[Group1] = [ Shift_L, ISO_Next_Group ] }; key <LCTL> { [ Control_L, ISO_Next_Group ] }; }; -partial modifier_keys +partial modifier_keys xkb_symbols "lctrl_lshift_toggle_rev" { key <LFSH> { type[Group1]="PC_CONTROL_LEVEL2", - symbols[Group1]= [ Shift_L, ISO_Prev_Group ] + symbols[Group1] = [ Shift_L, ISO_Prev_Group ] }; key <LCTL> { [ Control_L, ISO_Prev_Group ] }; }; @@ -162,18 +145,18 @@ partial modifier_keys xkb_symbols "rctrl_rshift_toggle" { key <RTSH> { type[Group1]="PC_CONTROL_LEVEL2", - symbols[Group1]= [ Shift_R, ISO_Next_Group ] + symbols[Group1] = [ Shift_R, ISO_Next_Group ] }; key <RCTL> { [ Control_R, ISO_Next_Group ] }; }; -partial modifier_keys +partial modifier_keys xkb_symbols "ctrl_shift_toggle" { include "group(lctrl_lshift_toggle)" include "group(rctrl_rshift_toggle)" }; -partial modifier_keys +partial modifier_keys xkb_symbols "ctrl_shift_toggle_bidir" { include "group(lctrl_lshift_toggle_rev)" include "group(rctrl_rshift_toggle)" @@ -188,12 +171,12 @@ xkb_symbols "lctrl_lalt_toggle" { virtual_modifiers Alt; key <LALT> { type[Group1]="PC_CONTROL_LEVEL2", - symbols[Group1]= [ NoSymbol, ISO_Next_Group ], + symbols[Group1] = [ NoSymbol, ISO_Next_Group ], virtualMods= Alt }; key <LCTL> { type[Group1]="PC_ALT_LEVEL2", - symbols[Group1]= [ Control_L, ISO_Next_Group ] + symbols[Group1] = [ Control_L, ISO_Next_Group ] }; }; @@ -202,12 +185,12 @@ xkb_symbols "lctrl_lalt_toggle_rev" { virtual_modifiers Alt; key <LALT> { type[Group1]="PC_CONTROL_LEVEL2", - symbols[Group1]= [ NoSymbol, ISO_Prev_Group ], + symbols[Group1] = [ NoSymbol, ISO_Prev_Group ], virtualMods= Alt }; key <LCTL> { type[Group1]="PC_ALT_LEVEL2", - symbols[Group1]= [ Control_L, ISO_Prev_Group ] + symbols[Group1] = [ Control_L, ISO_Prev_Group ] }; }; @@ -216,22 +199,22 @@ xkb_symbols "rctrl_ralt_toggle" { virtual_modifiers Alt; key <RALT> { type[Group1]="PC_CONTROL_LEVEL2", - symbols[Group1]= [ NoSymbol, ISO_Next_Group ], + symbols[Group1] = [ NoSymbol, ISO_Next_Group ], virtualMods= Alt }; key <RCTL> { type[Group1]="PC_ALT_LEVEL2", - symbols[Group1]= [ Control_R, ISO_Next_Group ] + symbols[Group1] = [ Control_R, ISO_Next_Group ] }; }; -partial modifier_keys +partial modifier_keys xkb_symbols "ctrl_alt_toggle" { include "group(lctrl_lalt_toggle)" include "group(rctrl_ralt_toggle)" }; -partial modifier_keys +partial modifier_keys xkb_symbols "ctrl_alt_toggle_bidir" { include "group(lctrl_lalt_toggle_rev)" include "group(rctrl_ralt_toggle)" @@ -245,12 +228,12 @@ partial modifier_keys xkb_symbols "lalt_lshift_toggle" { virtual_modifiers Alt; key <LALT> { - symbols[Group1]= [ NoSymbol, ISO_Next_Group ], + symbols[Group1] = [ NoSymbol, ISO_Next_Group ], virtualMods= Alt }; key <LFSH> { type[Group1]="PC_ALT_LEVEL2", - symbols[Group1]= [ Shift_L, ISO_Next_Group ] + symbols[Group1] = [ Shift_L, ISO_Next_Group ] }; }; @@ -258,12 +241,12 @@ partial modifier_keys xkb_symbols "lalt_lshift_toggle_rev" { virtual_modifiers Alt; key <LALT> { - symbols[Group1]= [ NoSymbol, ISO_Prev_Group ], + symbols[Group1] = [ NoSymbol, ISO_Prev_Group ], virtualMods= Alt }; key <LFSH> { type[Group1]="PC_ALT_LEVEL2", - symbols[Group1]= [ Shift_L, ISO_Prev_Group ] + symbols[Group1] = [ Shift_L, ISO_Prev_Group ] }; }; @@ -271,187 +254,186 @@ partial modifier_keys xkb_symbols "ralt_rshift_toggle" { virtual_modifiers Alt; key <RALT> { - symbols[Group1]= [ NoSymbol, ISO_Next_Group ], + symbols[Group1] = [ NoSymbol, ISO_Next_Group ], virtualMods= Alt }; key <RTSH> { type[Group1]="PC_ALT_LEVEL2", - symbols[Group1]= [ Shift_R, ISO_Next_Group ] + symbols[Group1] = [ Shift_R, ISO_Next_Group ] }; }; -partial modifier_keys +partial modifier_keys xkb_symbols "alt_shift_toggle" { include "group(lalt_lshift_toggle)" include "group(ralt_rshift_toggle)" }; -partial modifier_keys +partial modifier_keys xkb_symbols "alt_shift_toggle_bidir" { include "group(lalt_lshift_toggle_rev)" include "group(ralt_rshift_toggle)" }; -// using the group(menu_toggle) map, pressing: -// Menu key toggles groups -// Shift+Menu acts as Menu +// Pressing the Menu key switches to the next group, +// while Shift+Menu acts as Menu. partial modifier_keys xkb_symbols "menu_toggle" { - key <MENU> { [ ISO_Next_Group, Menu ] }; + key <MENU> { [ ISO_Next_Group, Menu ] }; }; -// using the group(lwin_toggle) map, pressing the left Windows' logo key -// toggles groups. If you use this map, you would declare you keyboard -// as pc101 or pc102 instead of pc104 or pc105. +// Pressing the left Win key switches to the next group. +// (Using this map, you should declare your keyboard as +// pc101 or pc102 instead of pc104 or pc105.) partial modifier_keys xkb_symbols "lwin_toggle" { - virtual_modifiers AltGr; - key <LWIN> { - virtualMods= AltGr, - symbols[Group1] = [ ISO_Next_Group ] + virtual_modifiers AltGr; + key <LWIN> { + virtualMods= AltGr, + symbols[Group1] = [ ISO_Next_Group ] }; }; -// using the group(rwin_toggle) map, pressing the right Windows' logo key -// toggles groups. If you use this map, you would declare you keyboard -// as pc101 or pc102 instead of pc104 or pc105. +// Pressing the right Win key switches to the next group. +// (Using this map, you should declare your keyboard as +// pc101 or pc102 instead of pc104 or pc105.) partial modifier_keys xkb_symbols "rwin_toggle" { - virtual_modifiers AltGr; - key <RWIN> { - virtualMods= AltGr, - symbols[Group1] = [ ISO_Next_Group ] + virtual_modifiers AltGr; + key <RWIN> { + virtualMods= AltGr, + symbols[Group1] = [ ISO_Next_Group ] }; }; -// Both Ctrls pressed together toggle group +// Pressing both Ctrl keys switches to the next or previous group +// (depending on which Ctrl is pressed first). partial modifier_keys xkb_symbols "ctrls_toggle" { - virtual_modifiers LControl, RControl; + virtual_modifiers LControl, RControl; key <LCTL> { - type[Group1]="PC_RCONTROL_LEVEL2", - symbols[Group1]= [ NoSymbol, ISO_Prev_Group ], - virtualMods= LControl + type[Group1]="PC_RCONTROL_LEVEL2", + symbols[Group1] = [ NoSymbol, ISO_Prev_Group ], + virtualMods= LControl }; key <RCTL> { - type[Group1]="PC_LCONTROL_LEVEL2", - symbols[Group1]= [ NoSymbol, ISO_Next_Group ], - virtualMods= RControl + type[Group1]="PC_LCONTROL_LEVEL2", + symbols[Group1] = [ NoSymbol, ISO_Next_Group ], + virtualMods= RControl }; }; -// Both Alts pressed together toggle group +// Pressing both Alt keys switches to the next or previous group +// (depending on which Alt is pressed first). partial modifier_keys xkb_symbols "alts_toggle" { - virtual_modifiers LAlt, RAlt; + virtual_modifiers LAlt, RAlt; key <LALT> { - type[Group1]="PC_RALT_LEVEL2", - symbols[Group1]= [ NoSymbol, ISO_Prev_Group ], - virtualMods= LAlt + type[Group1]="PC_RALT_LEVEL2", + symbols[Group1] = [ NoSymbol, ISO_Prev_Group ], + virtualMods= LAlt }; key <RALT> { - type[Group1]="PC_LALT_LEVEL2", - symbols[Group1]= [ NoSymbol, ISO_Next_Group ], - virtualMods= RAlt + type[Group1]="PC_LALT_LEVEL2", + symbols[Group1] = [ NoSymbol, ISO_Next_Group ], + virtualMods= RAlt }; }; -// Left Shift key toggles group +// Pressing the left Shift key switches to the next group. partial modifier_keys xkb_symbols "lshift_toggle" { - virtual_modifiers AltGr; - key <LFSH> { - symbols[Group1]= [ ISO_Next_Group ], - virtualMods= AltGr + virtual_modifiers AltGr; + key <LFSH> { + symbols[Group1] = [ ISO_Next_Group ], + virtualMods= AltGr }; }; -// Right Shift key toggles group +// Pressing the right Shift key switches to the next group. partial modifier_keys xkb_symbols "rshift_toggle" { - virtual_modifiers AltGr; - key <RTSH> { - symbols[Group1]= [ ISO_Next_Group ], - virtualMods= AltGr + virtual_modifiers AltGr; + key <RTSH> { + symbols[Group1] = [ ISO_Next_Group ], + virtualMods= AltGr }; }; -// Left Alt key toggles group +// Pressing the left Alt key switches to the next group. partial modifier_keys xkb_symbols "lalt_toggle" { - virtual_modifiers AltGr; - key <LALT> { - symbols[Group1]= [ ISO_Next_Group ], - virtualMods= AltGr + virtual_modifiers AltGr; + key <LALT> { + symbols[Group1] = [ ISO_Next_Group ], + virtualMods= AltGr }; }; -// Left Ctrl key toggles group +// Pressing the left Ctrl key switches to the next group. partial modifier_keys xkb_symbols "lctrl_toggle" { - virtual_modifiers AltGr; - key <LCTL> { - symbols[Group1]= [ ISO_Next_Group ], - virtualMods= AltGr + virtual_modifiers AltGr; + key <LCTL> { + symbols[Group1] = [ ISO_Next_Group ], + virtualMods= AltGr }; }; -// Right Ctrl key toggles group +// Pressing the right Ctrl key switches to the next group. partial modifier_keys xkb_symbols "rctrl_toggle" { - virtual_modifiers AltGr; - key <RCTL> { - symbols[Group1]= [ ISO_Next_Group ], - virtualMods= AltGr + virtual_modifiers AltGr; + key <RCTL> { + symbols[Group1] = [ ISO_Next_Group ], + virtualMods= AltGr }; }; -// using the group(alt_caps_toggle) map, pressing: -// Alt+Caps Lock toggles group -// Caps Lock toggles caps lock +// Pressing Alt+Caps_Lock switches to the next group, +// pressing Caps_Lock toggles CapsLock. partial modifier_keys xkb_symbols "alt_caps_toggle" { - key <CAPS> { + key <CAPS> { type="PC_ALT_LEVEL2", - symbols[Group1]= [ Caps_Lock, ISO_Next_Group] + symbols[Group1] = [ Caps_Lock, ISO_Next_Group ] }; }; partial hidden modifier_keys xkb_symbols "olpc" { - key <I219> { [ ISO_Next_Group, ISO_Prev_Group ] }; + key <I219> { [ ISO_Next_Group, ISO_Prev_Group ] }; }; partial modifier_keys xkb_symbols "alt_space_toggle" { key <SPCE> { - type[Group1]="PC_ALT_LEVEL2", - symbols[Group1]= [ space, ISO_Next_Group ] + type[Group1]="PC_ALT_LEVEL2", + symbols[Group1] = [ space, ISO_Next_Group ] }; }; -// using the group(sclk_toggle) map, pressing the Scroll Lock key -// toggles groups. +// Pressing the Scroll Lock key switches to the next group, partial modifier_keys xkb_symbols "sclk_toggle" { - virtual_modifiers AltGr; - key <SCLK> { - virtualMods= AltGr, - symbols[Group1] = [ ISO_Next_Group ] + virtual_modifiers AltGr; + key <SCLK> { + virtualMods= AltGr, + symbols[Group1] = [ ISO_Next_Group ] }; }; -// Control_L+Win_L locks the first group (presumably Lat). -// Control_R+Menu locks the second group (presumably Rus). +// Control_L+Win_L selects the first group (presumably Lat), +// Control_R+Menu selects the second group (presumably Rus). partial modifier_keys xkb_symbols "lctrl_lwin_rctrl_menu" { key <LWIN> { - type[ Group1 ] = "PC_CONTROL_LEVEL2", - symbols[ Group1 ] = [ Super_L, ISO_First_Group ] + type[Group1] = "PC_CONTROL_LEVEL2", + symbols[Group1] = [ Super_L, ISO_First_Group ] }; key <MENU> { - type[ Group1 ] = "PC_CONTROL_LEVEL2", - symbols[ Group1 ] = [ Menu, ISO_Last_Group ] + type[Group1] = "PC_CONTROL_LEVEL2", + symbols[Group1] = [ Menu, ISO_Last_Group ] }; -}; // lctrl_lwin_rctrl_menu +}; diff --git a/xorg-server/xkeyboard-config/symbols/hr b/xorg-server/xkeyboard-config/symbols/hr index bda2afd22..1ec0c809a 100644 --- a/xorg-server/xkeyboard-config/symbols/hr +++ b/xorg-server/xkeyboard-config/symbols/hr @@ -13,7 +13,7 @@ xkb_symbols "basic" { key <AB10> { [ minus, underscore, dead_belowdot, dead_abovedot ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "us" { name[Group1]= "Croatian (US keyboard with Croatian letters)"; @@ -48,7 +48,7 @@ xkb_symbols "us" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "alternatequotes" { name[Group1]= "Croatian (use guillemets for quotes)"; @@ -56,7 +56,7 @@ xkb_symbols "alternatequotes" { include "rs(latinalternatequotes)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "unicode" { name[Group1]= "Croatian (use Croatian digraphs)"; @@ -64,7 +64,7 @@ xkb_symbols "unicode" { include "rs(latinunicode)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "unicodeus" { name[Group1]= "Croatian (US keyboard with Croatian digraphs)"; diff --git a/xorg-server/xkeyboard-config/symbols/hu b/xorg-server/xkeyboard-config/symbols/hu index 75b17fee5..e743360a3 100644 --- a/xorg-server/xkeyboard-config/symbols/hu +++ b/xorg-server/xkeyboard-config/symbols/hu @@ -353,7 +353,7 @@ hidden partial keypad_keys xkb_symbols "def_dot" { key <KPDL> { [ KP_Delete, KP_Decimal ] }; }; - + // def_dead: // Dead keys support part @@ -398,6 +398,7 @@ hidden partial alphanumeric_keys xkb_symbols "def_common" { key <AD01> { [ q, Q, backslash ] }; key <AD02> { [ w, W, bar ] }; + key <AD03> { [ e, E, Adiaeresis ] }; key <AD07> { [ u, U, EuroSign ] }; key <AD08> { [ i, I, Iacute, iacute ] }; key <AD09> { [ o, O, doublelowquotemark ] }; diff --git a/xorg-server/xkeyboard-config/symbols/ie b/xorg-server/xkeyboard-config/symbols/ie index 48f7232f0..0830fede4 100644 --- a/xorg-server/xkeyboard-config/symbols/ie +++ b/xorg-server/xkeyboard-config/symbols/ie @@ -86,7 +86,7 @@ xkb_symbols "basic" { key <AC10> { [ semicolon, colon, ellipsis, doubledagger ] }; key <AC11> { [ apostrophe, at, ae, AE ] }; key <BKSL> { [ numbersign, asciitilde, guillemotleft, guillemotright ] }; - + // // \ZXCVBNM,./ @@ -401,7 +401,7 @@ xkb_symbols "ogam_is434" { // Also overcomes annoying use of Scroll Lock LED inherited from // US symbols but not relevant here since we're not changing group. key <SCLK> {type[Group1] = "ONE_LEVEL", [ Shift_Lock ] }; - modifier_map Shift { Shift_Lock }; + modifier_map Shift { Shift_Lock }; include "compose(rwin)" }; diff --git a/xorg-server/xkeyboard-config/symbols/il b/xorg-server/xkeyboard-config/symbols/il index fa7564fb5..a1f615c62 100644 --- a/xorg-server/xkeyboard-config/symbols/il +++ b/xorg-server/xkeyboard-config/symbols/il @@ -43,12 +43,12 @@ xkb_symbols "basic" { key <AB09> { [ hebrew_finalzade, less ] }; key.type[Group1] = "THREE_LEVEL"; - + key <TLDE> { [ semicolon, asciitilde,0x10005b0 ]}; // Sheva key <AB10> { [ period, question, 0x10005c3 ]}; // Sof Pasuq key <AD03> { [ hebrew_qoph, E, EuroSign ]}; key <AC01> { [ hebrew_shin, A, 0x10020AA ]}; - + // The following may get overriden by the iso9995-3(basic101) symbols. // therefore they are included here. // Including them isn't a great idea (for instance: what if group 1 uses @@ -67,11 +67,11 @@ xkb_symbols "basic" { key <AE10> { [ 0, parenleft , 0x10005c1 ]}; // Shin dot key <AE11> { [ minus, underscore , 0x10005b9 ]}; // Holam key <AE12> { [ equal, plus , 0x10005bc ]}; // Dagesh/Shuruq - + // Mirrored: key <AD11> { [ bracketright, braceright, 0x10005bf ]}; // Rafe key <AD12> { [ bracketleft, braceleft, 0x10005bd ]}; // Meteg - + key <BKSL> { [ backslash, bar, 0x10005bb ]}; // Qubuts include "level3(ralt_switch)" @@ -79,7 +79,7 @@ xkb_symbols "basic" { // nikud patter based on Dekel Tsur's Hebrew mapping for LyX -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "lyx" { name[Group1]= "Hebrew (lyx)"; @@ -103,7 +103,7 @@ xkb_symbols "lyx" { key <AC01> { [ hebrew_shin, 0x10005b0 ] }; // Sheva key <AC02> { [ hebrew_dalet, 0x10005bc ] }; // Dagesh/Shuruq key <AC03> { [ hebrew_gimel, hebrew_gimel ] }; - key <AC04> { [ hebrew_kaph, hebrew_kaph ] }; + key <AC04> { [ hebrew_kaph, hebrew_kaph ] }; key <AC05> { [ hebrew_ayin, 0x10005c2 ] }; // Sin dot key <AC06> { [ hebrew_yod, 0x10005c1 ] }; // Shin dot key <AC07> { [ hebrew_chet, 0x10005b4 ] }; // Hiriq @@ -136,13 +136,13 @@ xkb_symbols "lyx" { key <AE08> { [ 8, asterisk ]}; key <AE09> { [ 9, parenright ]}; key <AE10> { [ 0, parenleft ]}; - + key <AE11> { [ minus , 0x10005be ] }; // H. Hiphen key <AE12> { [ equal , plus ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "phonetic" { // uses the phonetic layout from old Slackware 'il.map' file @@ -199,7 +199,7 @@ xkb_symbols "phonetic" { // layout below does not include 'il(basic)' but redoes the _whole_ thing from // scratch. -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "biblical" { name[Group1]= "Hebrew (Biblical, Tiro)"; key.type = "FOUR_LEVEL_SEMIALPHABETIC"; @@ -267,7 +267,7 @@ xkb_symbols "biblical" { // The layout corresponds phonetically to a US standard layout or similar (Qwerty). // If you are using an actual Hebrew keyboard, you are probably better off using a Tiro compliant scholarly layout // This linux port created and maintained by Dennis Meulensteen, dennis@meulensteen.nl -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "biblicalSIL" { name[Group1]= "Hebrew (Biblical, SIL phonetic)"; key.type = "FOUR_LEVEL_SEMIALPHABETIC"; diff --git a/xorg-server/xkeyboard-config/symbols/in b/xorg-server/xkeyboard-config/symbols/in index 68f63e528..fdf008887 100644 --- a/xorg-server/xkeyboard-config/symbols/in +++ b/xorg-server/xkeyboard-config/symbols/in @@ -1,6 +1,6 @@ // This layout includes all Indian layouts, including: // - Devanagari (Hindi, Marathi, Sanskrit) -// - Bengali +// - Bangla // - Gujarati // - Kannada // - Malayalam @@ -12,12 +12,12 @@ // Links: // - Indic INSCRIPT keyboard layout diagrams: // http://java.sun.com/products/jfc/tsc/articles/InputMethod/indiclayout.html -// - Bengali Baishakhi (Bengali layouts): -// - Bengali Baishakhi Inscript (Bengali layouts): -// - Bengali Bornona (Bengali layouts): -// - Uni Gitanjali (Bengali layouts): +// - Bangla Baishakhi (Bangla layouts): +// - Bangla Baishakhi Inscript (Bangla layouts): +// - Bangla Bornona (Bangla layouts): +// - Uni Gitanjali (Bangla layouts): // http://nltr.org -// - Ekusheyr Shadhinota (Bengali layouts): +// - Ekusheyr Shadhinota (Bangla layouts): // http://ekushey.org/projects/shadhinota/index.html // - Microsoft Windows XP SP2: Indic Language Standards - an Introduction: // http://www.bhashaindia.com/MSProducts/XpSp2/Articles/IndicLanguageStandards.aspx @@ -135,9 +135,9 @@ xkb_symbols "bolnagri" { key <AD08> { [ U093F, U0940, U0907, U0908 ] }; // I: i, ii matras key <AD09> { [ U094B, U094C, U0913, U0914 ] }; // O: o, au matras key <AD10> { [ U092A, U092B ] }; // P: pa, pha - key <AD11> { [ bracketleft, braceleft ] }; + key <AD11> { [ bracketleft, braceleft ] }; key <AD12> { [ bracketright, braceright ] }; - + //A Row key <AC01> { [ U093E, U0906, U0905, U0906 ] }; // A: aa, full A, AA key <AC02> { [ U0938, U0937 ] }; // S: sa, ssa @@ -148,7 +148,7 @@ xkb_symbols "bolnagri" { key <AC07> { [ U091C, U091D ] }; // J: ja, jha key <AC08> { [ U0915, U0916 ] }; // K: ka, kha key <AC09> { [ U0932, U0933, U0962, U090C ] }; // L: la, vocalic L or lru matra - key <AC10> { [ semicolon, colon ] }; + key <AC10> { [ semicolon, colon ] }; key <AC11> { [apostrophe, quotedbl ] }; //Z Row @@ -176,7 +176,7 @@ xkb_symbols "bolnagri" { partial alphanumeric_keys xkb_symbols "ben" { - name[Group1]= "Bengali (India)"; + name[Group1]= "Bangla (India)"; // Mainly numbers. key <AE01> { [ U09E7 ] }; @@ -244,7 +244,7 @@ xkb_symbols "ben" { }; xkb_symbols "ben_probhat" { - name[Group1]= "Bengali (India, Probhat)"; + name[Group1]= "Bangla (India, Probhat)"; key <ESC> { [ Escape ] }; // numbers @@ -318,10 +318,10 @@ xkb_symbols "ben_probhat" { include "rupeesign(4)" }; -// Bengali Baishakhi, Bengali Baishakhi Inscript, Bengali Bornona, Uni Gitanjali Layouts are added by Promathesh Mandal <promathesh812004@gmail.com> +// Bangla Baishakhi, Bangla Baishakhi Inscript, Bangla Bornona, Uni Gitanjali Layouts are added by Promathesh Mandal <promathesh812004@gmail.com> xkb_symbols "ben_baishakhi" { - name[Group1]= "Bengali (India, Baishakhi)"; + name[Group1]= "Bangla (India, Baishakhi)"; key <ESC> { [ Escape ] }; // numbers @@ -398,7 +398,7 @@ xkb_symbols "ben_baishakhi" { }; xkb_symbols "ben_inscript" { - name[Group1]= "Bengali (India, Baishakhi Inscript)"; + name[Group1]= "Bangla (India, Baishakhi Inscript)"; // Mainly numbers. key <TLDE> { [ 0x100200D, 0x100200C ] }; @@ -464,7 +464,7 @@ xkb_symbols "ben_inscript" { }; xkb_symbols "ben_gitanjali" { - name[Group1]= "Bengali (India, Uni Gitanjali)"; + name[Group1]= "Bangla (India, Uni Gitanjali)"; key <ESC> { [ Escape ] }; // numbers @@ -542,7 +542,7 @@ xkb_symbols "ben_gitanjali" { xkb_symbols "ben_bornona" { - name[Group1]= "Bengali (India, Bornona)"; + name[Group1]= "Bangla (India, Bornona)"; key <ESC> { [ Escape ] }; // numbers @@ -616,7 +616,7 @@ xkb_symbols "ben_bornona" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "guj" { name[Group1]= "Gujarati"; @@ -683,7 +683,7 @@ xkb_symbols "guj" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "kan" { // Inscript layout for Kannada @@ -719,7 +719,7 @@ xkb_symbols "kan" { key <AD10> { [ U0c9c, U0c9d ] }; key <AD11> { [ U0ca1, U0ca2 ] }; key <AD12> { [ U0cbc, U0c9e ] }; - + key <AC01> { [ U0ccb, U0c93 ] }; key <AC02> { [ U0cc7, U0c8f ] }; key <AC03> { [ U0ccd, U0c85 ] }; @@ -757,13 +757,13 @@ xkb_symbols "kan" { // Date : Sat Aug 17 21:10:48 IST 2002 // Mapping: -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mal" { name[Group1] = "Malayalam"; //From grave to backslash (\) - + key <TLDE> { [ U0d4a , U0d12 ] }; // svu: @@ -771,7 +771,7 @@ xkb_symbols "mal" { // but the digits are replaced with the ones from 'mal_plusnum' - // for the integrity of all Indian layouts // -// key <AE01> { [1 , exclam ] }; +// key <AE01> { [1 , exclam ] }; // key <AE02> { [2 , at ] }; // key <AE03> { [3 , numbersign ] }; // key <AE04> { [4 , dollar ] }; @@ -797,9 +797,9 @@ xkb_symbols "mal" { key <AE12> { [ U0d43 , U0d0b ] }; key <BKSL> { [U0200c, U05C ]};//bksl: ZWNJ - + // From 'q' to right bracket (]) - + key <AD01> { [ U0d4c , U0d14 ] }; key <AD02> { [ U0d48 , U0d10 ] }; key <AD03> { [ U0d3e , U0d06 ] }; @@ -814,7 +814,7 @@ xkb_symbols "mal" { key <AD12> { [ U0200d , U0d1e ] }; // From 'a' to apostrophe (') - + key <AC01> { [ U0d4b , U0d13 ] }; key <AC02> { [ U0d47 , U0d0f ] }; key <AC03> { [ U0d4d , U0d05 ] }; @@ -826,9 +826,9 @@ xkb_symbols "mal" { key <AC09> { [ U0d24 , U0d25 ] }; key <AC10> { [ U0d1a , U0d1b ] }; key <AC11> { [ U0d1f , U0d20 ] }; - + // From 'z' to slash (/) - + key <AB01> { [ U0d46 , U0d0e ] }; key <AB02> { [ U0d02 , U200b ] };//X:ZWSP key <AB03> { [ U0d2e , U0d23 ] }; @@ -884,7 +884,7 @@ xkb_symbols "mal_lalitha" { key <AD10> { [ U0D2A ] }; // P: pa key <AD11> { [ bracketleft, braceleft ] };//braceleft: key <AD12> { [ bracketright, braceright ] };//braceright: - + //A Row key <AC01> { [ U0D3E, U0D05, U0D06, U0D05 ] }; // A: a,aa key <AC02> { [ U0D38, U0D37 ] }; // S: sa, ssa @@ -895,7 +895,7 @@ xkb_symbols "mal_lalitha" { key <AC07> { [ U0D1C, U0D1D ] }; // J: ja, jha key <AC08> { [ U0D15, U0D16 ] }; // K: ka, kha key <AC09> { [ U0D32, U0D33 ] }; // L: la, vocalic L or lru matra` - key <AC10> { [ semicolon, colon ] }; + key <AC10> { [ semicolon, colon ] }; key <AC11> { [apostrophe, quotedbl ] }; //Z Row @@ -919,14 +919,14 @@ xkb_symbols "mal_lalitha" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "ori" { // Inscript layout for Oriya // Author: G Karunakar <karunakar@freedomink.org> // Date: Wed Nov 13 18:16:19 IST 2002 name[Group1]= "Oriya"; - + key <AE01> { [ U0b67 ] }; key <AE02> { [ U0b68 ] }; key <AE03> { [ U0b69 ] }; @@ -952,7 +952,7 @@ xkb_symbols "ori" { key <AD10> { [ U0b1c, U0b1d ] }; key <AD11> { [ U0b21, U0b22 ] }; key <AD12> { [ U0b3c, U0b1e ] }; - + key <AC01> { [ U0b4b, U0b13 ] }; key <AC02> { [ U0b47, U0b0f ] }; key <AC03> { [ U0b4d, U0b05 ] }; @@ -964,7 +964,7 @@ xkb_symbols "ori" { key <AC09> { [ U0b24, U0b25 ] }; key <AC10> { [ U0b1a, U0b1b ] }; key <AC11> { [ U0b1f, U0b20 ] }; - + key <AB02> { [ U0b02, U0b01 ] }; key <AB03> { [ U0b2e, U0b23 ] }; key <AB04> { [ U0b28 ] }; @@ -985,7 +985,7 @@ xkb_symbols "ori" { // based on a keyboard map from an 'xkb/symbols/tml' file // INSCRIPT -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "tam" { name[Group1]= "Tamil"; @@ -1016,7 +1016,7 @@ xkb_symbols "tam" { // Mainly voiced consonants key <AD07> { [ U0BB9, U0B99 ] }; - key <AD10> { [ U0B9c ] }; + key <AD10> { [ U0B9c ] }; key <AD12> { [ U0B9E ] }; // Mainly short vowels @@ -1051,7 +1051,7 @@ xkb_symbols "tam" { include "rupeesign(4)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "tam_unicode" { // Description: A keymap based on the TamilNet'99 typewriter keyboard @@ -1061,7 +1061,7 @@ xkb_symbols "tam_unicode" { // Secondary contact: Sri Ramadoss M <amachu@au-kbc.org> // Date : Fri Sep 4 11:32:00 CST 2009 // Mapping: - + name[Group1]= "Tamil (Unicode)"; // granthas @@ -1105,7 +1105,7 @@ xkb_symbols "tam_unicode" { key <AC09> { [ U0B9F ] }; key <AC10> { [ U0BCD, U0B83 ] }; key <AC11> { [ U0B99 ] }; - + // Zrow key <AB01> { [ U0BA3 ] }; key <AB02> { [ U0B92, U0B93 ] }; @@ -1182,7 +1182,7 @@ xkb_symbols "tam_keyboard_with_numerals" { key <AB08> { [ U0B87, U0B88 ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "tam_TSCII" { // Description : A Tamil typewrite-style keymap @@ -1200,7 +1200,7 @@ xkb_symbols "tam_TSCII" { key <AE05> { [ 0x1000085, 0x100008a ] }; // sa key <AE06> { [ 0x1000086, 0x100008b ] }; // ha key <AE07> { [ 0x1000087, 0x100008c ] }; // ksha - + // Qrow key <AD01> { [ 0x10000bb, 0x100009a ] }; // nja key <AD02> { [ 0x10000c8, 0x10000da ] }; // Ra @@ -1226,7 +1226,7 @@ xkb_symbols "tam_TSCII" { key <AC09> { [ 0x10000bc, 0x10000ce ] }; // da key <AC10> { [ 0x10000c6, 0x10000d8 ] }; // zha key <AC11> { [ 0x10000b9, 0x1000099 ] }; // nga - + // Zrow key <AB01> { [ 0x10000bd, 0x10000cf ] }; // Na key <AB02> { [ 0x10000b4, 0x10000b5 ] }; // o, O @@ -1239,7 +1239,7 @@ xkb_symbols "tam_TSCII" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "tam_TAB" { // Description: A keymap based on the TamilNet'99 typewriter keyboard @@ -1257,7 +1257,7 @@ xkb_symbols "tam_TAB" { key <AE05> { [ 0x10000fd ] } ; key <AE06> { [ 0x10000fe ] } ; key <AE07> { [ 0x10000ff ] } ; - + // q-row key <AD01> { [ 0x10000eb, 0x10000b3 ] }; key <AD02> { [ 0x10000f8, 0x10000c1 ] }; @@ -1283,7 +1283,7 @@ xkb_symbols "tam_TAB" { key <AC09> { [ 0x10000ec, 0x10000b4 ] }; key <AC10> { [ 0x10000f6, 0x10000bf ] }; key <AC11> { [ 0x10000e9, 0x10000b1 ] }; - + // z-row key <AB01> { [ 0x10000ed, 0x10000b5 ] }; key <AB02> { [ 0x10000e5, 0x10000e6 ] }; @@ -1295,7 +1295,7 @@ xkb_symbols "tam_TAB" { key <AB08> { [ 0x10000de, 0x10000df ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "tel" { // Inscript layout for Telugu using Unicode @@ -1318,8 +1318,8 @@ xkb_symbols "tel" { key <AE10> { [ U0c66, parenright ] }; key <AE11> { [ U0c03, underscore ] }; key <AE12> { [ U0c43, U0c0b ] }; - key <BKSP> { [ BackSpace ] }; - + key <BKSP> { [ BackSpace ] }; + key <AD01> { [ U0c4c, U0c14 ] }; key <AD02> { [ U0c48, U0c10 ] }; key <AD03> { [ U0c3e, U0c06 ] }; @@ -1332,7 +1332,7 @@ xkb_symbols "tel" { key <AD10> { [ U0c1c, U0c1d ] }; key <AD11> { [ U0c21, U0c22 ] }; key <AD12> { [ U0c1e ] }; - + key <AC01> { [ U0c4b, U0c13 ] }; key <AC02> { [ U0c47, U0c0f ] }; key <AC03> { [ U0c4d, U0c05 ] }; @@ -1344,7 +1344,7 @@ xkb_symbols "tel" { key <AC09> { [ U0c24, U0c25 ] }; key <AC10> { [ U0c1a, U0c1b ] }; key <AC11> { [ U0c1f, U0c20 ] }; - + key <AB01> { [ U0c46, U0c0e ] }; key <AB02> { [ U0c02, U0c01 ] }; key <AB03> { [ U0c2e, U0c23 ] }; @@ -1364,19 +1364,19 @@ xkb_symbols "tel" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "urd-phonetic" { include "pk(urd-phonetic)" name[Group1]= "Urdu (phonetic)"; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "urd-phonetic3" { include "pk(urd-crulp)" name[Group1]= "Urdu (alternative phonetic)"; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "urd-winkeys" { include "pk(urd-nla)" name[Group1]= "Urdu (WinKeys)"; @@ -1457,7 +1457,7 @@ xkb_symbols "guru" { // http://www.satluj.org/Jhelum.html //Modified for Inscript to make //Original Author : Amanpreet Singh Alam <apreet.alam@gmail.com - + partial alphanumeric_keys xkb_symbols "jhelum" { name[Group1] = "Punjabi (Gurmukhi Jhelum)"; @@ -1478,7 +1478,7 @@ xkb_symbols "jhelum" { key <AE11> { [ minus,underscore] }; key <AE12> { [ equal,plus] }; key <BKSL> { [ U0964,U0965,U007C,U005C] }; //pipe : danda, double danda - + //Q Row key <AD01> { [ U0A4C, U0A14 ] }; // Q: oo, ooh key <AD02> { [ U0A48, U0A10 ] }; // W: ee, ae @@ -1490,9 +1490,9 @@ xkb_symbols "jhelum" { key <AD08> { [ U0A17, U0A18, U0A5A ] }; // I:ga, gha key <AD09> { [ U0A24, U0A1F ] }; // O: ta, tha key <AD10> { [ U0A2A, U0A5E, VoidSymbol,U0A5E ] }; // P: pa, pha - key <AD11> { [ U0A21, U0A22, bracketleft, braceleft ] }; + key <AD11> { [ U0A21, U0A22, bracketleft, braceleft ] }; key <AD12> { [ U0A19, U0A1E, bracketright, braceright ] }; - + //A Row key <AC01> { [ U0A4B, U0A13 ] }; // A: o, oo key <AC02> { [ U0A47, U0A0F ] }; // S: e, ee @@ -1505,7 +1505,7 @@ xkb_symbols "jhelum" { key <AC09> { [ U0A32, U0A25, U0A33 ] }; // L: la, tha key <AC10> { [ U0A38, colon, U0A36 ] }; //; sa key <AC11> { [apostrophe, quotedbl ] }; - + //Z Row key <AB01> { [ U0A71, U0A3C ] }; // Z: addak, par bindi key <AB02> { [ U0A02, U0A70 ] }; // X: bindi, tippi @@ -1517,7 +1517,7 @@ xkb_symbols "jhelum" { key <AB08> { [ comma, U262C ] };// comma: comma, dev abbreviation sign key <AB09> { [ period, U0A74 ] }; // period: period, nukta key <AB10> { [ slash, question ] }; - + // modifier_map Shift { Shift_L }; // modifier_map Lock { Caps_Lock }; // modifier_map Control{ Control_L }; @@ -1534,15 +1534,15 @@ xkb_symbols "olpc" { key <TLDE> { [ U094A, U0912 ] }; // DEVANAGARI VOWEL SIGN SHORT O; DEVANAGARI LETTER SHORT O key <AE01> { [ U0967, U090D ] }; // DEVANAGARI DIGIT ONE; DEVANAGARI LETTER CANDRA E key <AE02> { [ U0968, U0945 ] }; // DEVANAGARI DIGIT TWO; DEVANAGARI VOWEL SIGN CANDRA E - key <AE03> { [ U0969 ] }; // DEVANAGARI DIGIT THREE; - key <AE04> { [ U096A ] }; // DEVANAGARI DIGIT FOUR; - key <AE05> { [ U096B ] }; // DEVANAGARI DIGIT FIVE; - key <AE06> { [ U096C ] }; // DEVANAGARI DIGIT SIX; - key <AE07> { [ U096D ] }; // DEVANAGARI DIGIT SEVEN; - key <AE08> { [ U096E ] }; // DEVANAGARI DIGIT EIGHT; - key <AE09> { [ U096F, parenleft ] }; // DEVANAGARI DIGIT NINE; - key <AE10> { [ U0966, parenright ] }; // DEVANAGARI DIGIT ZERO; - key <AE11> { [ minus, U0903 ] }; // DEVANAGARI SIGN VISARGA; + key <AE03> { [ U0969 ] }; // DEVANAGARI DIGIT THREE; + key <AE04> { [ U096A ] }; // DEVANAGARI DIGIT FOUR; + key <AE05> { [ U096B ] }; // DEVANAGARI DIGIT FIVE; + key <AE06> { [ U096C ] }; // DEVANAGARI DIGIT SIX; + key <AE07> { [ U096D ] }; // DEVANAGARI DIGIT SEVEN; + key <AE08> { [ U096E ] }; // DEVANAGARI DIGIT EIGHT; + key <AE09> { [ U096F, parenleft ] }; // DEVANAGARI DIGIT NINE; + key <AE10> { [ U0966, parenright ] }; // DEVANAGARI DIGIT ZERO; + key <AE11> { [ minus, U0903 ] }; // DEVANAGARI SIGN VISARGA; key <AE12> { [ U0943, U090B ] }; // DEVANAGARI VOWEL SIGN VOCALIC R; DEVANAGARI LETTER VOCALIC R key <AD01> { [ U094C, U0914 ] }; // DEVANAGARI VOWEL SIGN AU; DEVANAGARI LETTER AU @@ -1591,7 +1591,7 @@ xkb_symbols "olpc" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "hin-wx" { name[Group1]= "Hindi (Wx)"; @@ -1678,13 +1678,13 @@ xkb_symbols "eng" { // Comment : Based on the Inscript Keyboard created by M Baiju // Mapping: -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mal_enhanced" { name[Group1] = "Malayalam (enhanced Inscript with Rupee Sign)"; //From grave to backslash (\) - + key <TLDE> { [ U0d4a , U0d12 ] }; key <AE01> { [ U0d67 , exclam ] }; key <AE02> { [ U0d68 , at ] }; @@ -1703,7 +1703,7 @@ xkb_symbols "mal_enhanced" { // From 'q' to right bracket (]) - + key <AD01> { [ U0d57 , U0d14 ] }; key <AD02> { [ U0d48 , U0d10 ] }; key <AD03> { [ U0d3e , U0d06 ] }; @@ -1718,7 +1718,7 @@ xkb_symbols "mal_enhanced" { key <AD12> { [ U0200d , U0d1e ] }; // From 'a' to apostrophe (') - + key <AC01> { [ U0d4b , U0d13 ] }; key <AC02> { [ U0d47 , U0d0f ] }; key <AC03> { [ U0d4d , U0d05 ] }; @@ -1730,9 +1730,9 @@ xkb_symbols "mal_enhanced" { key <AC09> { [ U0d24 , U0d25 ] }; key <AC10> { [ U0d1a , U0d1b ] }; key <AC11> { [ U0d1f , U0d20 ] }; - + // From 'z' to slash (/) - + key <AB01> { [ U0d46 , U0d0e ] }; key <AB02> { [ U0d02 , U0d7a ] }; key <AB03> { [ U0d2e , U0d23 ] }; diff --git a/xorg-server/xkeyboard-config/symbols/inet b/xorg-server/xkeyboard-config/symbols/inet index 839439a96..fe21f1ed7 100644 --- a/xorg-server/xkeyboard-config/symbols/inet +++ b/xorg-server/xkeyboard-config/symbols/inet @@ -1,8 +1,8 @@ -// EAK (Easy Access, Internet, Multimedia, PDA) keyboards +// EAK (Easy Access keyboards: Internet, Multimedia, PDA) // Copyright (C) 2002 Stanislav Brabec <sbrabec@suse.cz> // -// Based on LinEAK project -// LinEAK - Linux support for Easy Access and Internet Keyboards +// Based on the LinEAK project. +// LinEAK - Linux support for Easy Access and Internet Keyboards // Copyright (C) 2001, 2002 Mark Smulders <Mark@PIRnet.nl> // Usage in XF86Config: @@ -13,28 +13,25 @@ // Simple command line usage: // setxkbmap 'my_kb_layout' -variant 'my_kb_variant' -model 'my_eak_type' -// All keyboards listed here should be also mentioned in -// rules/base, base.lst and base.xml. - -// Very common set of media keys +// Very common set of media keys. partial hidden alphanumeric_keys xkb_symbols "media_common" { - key <I01> { [ XF86AudioMedia ] }; + key <I01> { [ XF86AudioMedia ] }; key <I10> { [ XF86AudioPrev ] }; key <I19> { [ XF86AudioNext ] }; key <I20> { [ XF86AudioMute ] }; key <I22> { [ XF86AudioPlay, XF86AudioPause ] }; key <I24> { [ XF86AudioStop, XF86Eject ] }; - key <I2E> { [ XF86AudioLowerVolume ] }; + key <I2E> { [ XF86AudioLowerVolume ] }; key <I30> { [ XF86AudioRaiseVolume ] }; key <K5A> { [ XF86Eject ] }; key <K6C> { [ XF86Eject ] }; }; -// popular web navigation combination +// Popular web navigation keys. partial hidden alphanumeric_keys xkb_symbols "nav_common" { - key <I21> { [ XF86Calculator ] }; + key <I21> { [ XF86Calculator ] }; key <I32> { [ XF86WWW ] }; key <I65> { [ XF86Search ] }; key <I66> { [ XF86Favorites ] }; @@ -44,7 +41,7 @@ xkb_symbols "nav_common" { key <I6A> { [ XF86Back ] }; key <I6B> { [ XF86MyComputer ] }; key <I6C> { [ XF86Mail ] }; - key <I6D> { [ XF86AudioMedia ] }; + key <I6D> { [ XF86AudioMedia ] }; }; // ACPI Standard @@ -58,7 +55,7 @@ xkb_symbols "acpi_common" { key <I16> { [ XF86Sleep ] }; }; -// Combined sections, for simplicity +// Combined sections, for simplicity. partial hidden alphanumeric_keys xkb_symbols "media_nav_common" { include "inet(media_common)" @@ -122,7 +119,7 @@ xkb_symbols "evdev" { key <FK20> { [ XF86AudioMicMute ] }; -// key <I120> { [ ] }; // KEY_MACRO +// key <I120> { [ ] }; // KEY_MACRO key <I126> { [ plusminus ] }; key <I128> { [ XF86LaunchA ] }; key <I147> { [ XF86MenuKB ] }; @@ -139,8 +136,8 @@ xkb_symbols "evdev" { key <I158> { [ XF86WWW ] }; key <I159> { [ XF86DOS ] }; key <I160> { [ XF86ScreenSaver ] }; -// key <I161> { [ ] }; // KEY_DIRECTION - key <I162> { [ XF86RotateWindows ] }; + key <I161> { [ XF86RotateWindows ] }; + key <I162> { [ XF86TaskPane ] }; key <I163> { [ XF86Mail ] }; key <I164> { [ XF86Favorites ] }; key <I165> { [ XF86MyComputer ] }; @@ -220,7 +217,7 @@ xkb_symbols "evdev" { // key <I253> { [ ] }; // KEY_DISPLAY_OFF -- turn off display // key <I254> { [ ] }; // KEY_WIMAX key <I255> { [ XF86Hibernate ] }; // KEY_HIBERNATE - + key <FK13> { [ XF86Tools ] }; key <FK14> { [ XF86Launch5 ] }; key <FK15> { [ XF86Launch6 ] }; @@ -230,6 +227,8 @@ xkb_symbols "evdev" { }; +// Acer + // Acer AirKey V partial alphanumeric_keys xkb_symbols "airkey" { @@ -299,15 +298,16 @@ xkb_symbols "acer_laptop" { key <K66> { [ XF86Launch3 ] }; // Fn+F2 (HAL) // Special Characters - // To avoid setting a precedent/ standard that will be broken in later + // To avoid setting a precedent/standard that will be broken in later // versions of HAL, these keys are commented out for now. When they are no // longer marked 'FIXME' and have saner keycodes, these two entries can be // fixed and permanently uncommented. In the meantime, just uncomment these - // to make the keys work + // to make the keys work. // key <K5D> { [ EuroSign ] }; // Euro (HAL) // key <K5E> { [ dollar ] }; // Dollar (HAL) }; + // Azona // Azona RF2300 wireless Internet Keyboard @@ -374,7 +374,6 @@ xkb_symbols "btc5113rf" { key <I32> { [ XF86Search ] }; }; - // BTC 9000 partial alphanumeric_keys xkb_symbols "btc9000" { @@ -444,7 +443,8 @@ xkb_symbols "btc9019u" { key <I02> { [ XF86HomePage ] }; }; -// Cherry Blue Line + +// Cherry // Cherry Blue Line CyBo@rd partial alphanumeric_keys @@ -509,7 +509,7 @@ xkb_symbols "cherrycyboard" { }; // Cherry CyMotion Expert -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "cherrycmexpert" { include "inet(cherryblueb)" include "inet(acpi_common)" @@ -520,7 +520,7 @@ xkb_symbols "cherrycmexpert" { // Chicony // Chicony Internet Keyboard -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "chicony" { include "inet(acpi_common)" key <I12> { [ XF86AudioMute ] }; @@ -542,7 +542,7 @@ xkb_symbols "chicony" { }; // Chicony KU-0108 -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "chicony0108" { include "inet(cherrycyboard)" }; @@ -592,7 +592,7 @@ xkb_symbols "compaqeak8" { }; // Compaq Internet Keyboard (7 keys) -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "compaqik7" { key <I12> { [ XF86LightBulb ] }; key <I1E> { [ XF86Mail ] }; @@ -630,7 +630,6 @@ xkb_symbols "compaqik18" { key <I68> { [ Print ] }; }; - // Laptop/notebook Compaq (eg. Armada, Evo) Laptop Keyboard partial alphanumeric_keys xkb_symbols "armada" { @@ -639,9 +638,9 @@ xkb_symbols "armada" { key <I1E> { [ XF86Mail ] }; key <I1F> { [ XF86HomePage ] }; key <I23> { [ XF86WWW ] }; - key <I59> { [ XF86Launch2 ] }; // Battery Monitor + key <I59> { [ XF86Launch2 ] }; // Battery Monitor key <I6F> { [ XF86AudioMedia ] }; - key <I75> { [ XF86Launch0 ] }; // Info Center + key <I75> { [ XF86Launch0 ] }; // Info Center }; // Laptop/notebook Compaq (eg. Presario) Internet Keyboard @@ -707,8 +706,8 @@ xkb_symbols "dellusbmm" { // From Olivier Lahaye <olivier dot lahaye at motorola dot com> include "inet(media_nav_acpi_common)" key <I02> { [ XF86HomePage ] }; - key <K67> { [ XF86MyComputer ] }; - key <XFER> { [ XF86AudioMedia ] }; + key <K67> { [ XF86MyComputer ] }; + key <XFER> { [ XF86AudioMedia ] }; }; @@ -751,8 +750,7 @@ xkb_symbols "genius" { key <I32> { [ XF86WWW ] }; }; - -// GeniusComfy21e +// Genius Comfy 21e partial alphanumeric_keys xkb_symbols "geniuscomfy2" { // Describes the extra keys on a Genius Comfy KB-21e-Scroll @@ -761,6 +759,7 @@ xkb_symbols "geniuscomfy2" { key <I23> { [ Return ] }; }; + // Gyration partial alphanumeric_keys @@ -781,7 +780,7 @@ xkb_symbols "gyration" { // Hewlett-Packard // Hewlett-Packard Internet Keyboard -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "hpi6" { include "inet(media_nav_acpi_common)" key <I02> { [ XF86HomePage ] }; @@ -944,9 +943,8 @@ xkb_symbols "honeywell_euroboard" { // IBM - // IBM Rapid Access -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "rapidaccess" { key <I12> { [ XF86AudioMute ] }; key <I17> { [ XF86Launch2 ] }; @@ -965,7 +963,7 @@ xkb_symbols "rapidaccess" { }; // IBM Rapid Access II -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "rapidaccess2" { include "inet(acpi_common)" key <I12> { [ XF86AudioNext ] }; @@ -999,6 +997,7 @@ xkb_symbols "ibm_spacesaver" { }; }; + // Logitech // Logitech common definitions @@ -1041,8 +1040,8 @@ xkb_symbols "logitech_set3" { partial alphanumeric_keys xkb_symbols "logiaccess" { include "inet(logitech_base)" - key <FK13> { [ XF86MailForward ] }; - key <FK14> { [ XF86Send ] }; + key <FK13> { [ XF86MailForward ] }; + key <FK14> { [ XF86Send ] }; key <I11> { [ XF86Messenger ] }; key <I12> { [ XF86WebCam ] }; }; @@ -1069,10 +1068,9 @@ partial alphanumeric_keys xkb_symbols "logiex110" { include "inet(logitech_base)" key <I2F> { [ XF86Close ] }; // Close - // Extended function keys // In the Console before starting X -// Using setkeycodes e03b 212 e03c 213 e03d 214 e03e 215 e03f 216 e040 217 +// Using setkeycodes e03b 212 e03c 213 e03d 214 e03e 215 e03f 216 e040 217 // setkeycodes e041 218 e042 219 e043 220 e044 221 e057 222 e058 223 6d 206 // *=keys that are there but need different symbol names. key <I3B> { [ Help ] }; // F1 @@ -1163,7 +1161,7 @@ xkb_symbols "logiultraxc" { key <KPDC> { [ XF86AudioRaiseVolume ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "logidinovo" { include "inet(media_nav_common)" key <I02> { [ XF86HomePage ] }; @@ -1175,7 +1173,7 @@ xkb_symbols "logidinovo" { key <XFER> { [ XF86AudioMedia ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "logidinovoedge" { include "inet(media_acpi_common)" key <I02> { [ XF86HomePage ] }; @@ -1315,39 +1313,39 @@ xkb_symbols "microsoftinet" { key <I68> { [ XF86AudioStop ] }; }; -// Microsoft Natural Keyboard Pro USB -partial alphanumeric_keys - xkb_symbols "microsoftprousb" { +// Microsoft Natural Keyboard Pro USB +partial alphanumeric_keys +xkb_symbols "microsoftprousb" { include "inet(nav_common)" - key <FK16> { [ XF86Reload ] }; - key <I01> { [ XF86AudioMedia ] }; - key <I02> { [ XF86HomePage ] }; - key <I17> { [ XF86AudioStop ] }; - key <I1E> { [ XF86AudioRaiseVolume ] }; - key <I1F> { [ XF86AudioPlay, XF86AudioPause ] }; - key <I22> { [ XF86AudioNext ] }; - key <I24> { [ XF86AudioPrev ] }; - key <I25> { [ XF86AudioLowerVolume ] }; - key <I26> { [ XF86AudioMute ] }; - key <I63> { [ XF86Standby ] }; - // Internet Section -- Left Side - // Multimedia Section -- Right Side - // My Computer Section -- Far Right - // My computer maps to printscreen, so leaving commented out for now - // key <PRSC> { [ XF86MyComputer ] }; -}; - -// Microsoft Natural Keyboard Pro OEM -partial alphanumeric_keys -xkb_symbols "microsoftprooem" { + key <FK16> { [ XF86Reload ] }; + key <I01> { [ XF86AudioMedia ] }; + key <I02> { [ XF86HomePage ] }; + key <I17> { [ XF86AudioStop ] }; + key <I1E> { [ XF86AudioRaiseVolume ] }; + key <I1F> { [ XF86AudioPlay, XF86AudioPause ] }; + key <I22> { [ XF86AudioNext ] }; + key <I24> { [ XF86AudioPrev ] }; + key <I25> { [ XF86AudioLowerVolume ] }; + key <I26> { [ XF86AudioMute ] }; + key <I63> { [ XF86Standby ] }; +// Internet Section -- Left Side +// Multimedia Section -- Right Side +// My Computer Section -- Far Right +// My computer maps to printscreen, so leaving commented out for now +// key <PRSC> { [ XF86MyComputer ] }; +}; + +// Microsoft Natural Keyboard Pro OEM +partial alphanumeric_keys +xkb_symbols "microsoftprooem" { include "inet(media_nav_common)" - key <FK17> { [ XF86Search ] }; - key <I02> { [ XF86HomePage ] }; - key <I63> { [ XF86Standby ] }; - key <K67> { [ XF86MyComputer ] }; -// Internet Section -- Left Side -// Multimedia Section -- Right Side -// My Computer Section -- Far Right + key <FK17> { [ XF86Search ] }; + key <I02> { [ XF86HomePage ] }; + key <I63> { [ XF86Standby ] }; + key <K67> { [ XF86MyComputer ] }; +// Internet Section -- Left Side +// Multimedia Section -- Right Side +// My Computer Section -- Far Right }; // Microsoft Internet Keyboard Pro, Swedish @@ -1401,28 +1399,28 @@ xkb_symbols "microsoftoffice" { key <RCTL> { [ XF86Paste ] }; }; -// Microsoft Wireless Multimedia Keyboard 1.0A -partial alphanumeric_keys -xkb_symbols "microsoftmult" { +// Microsoft Wireless Multimedia Keyboard 1.0A +partial alphanumeric_keys +xkb_symbols "microsoftmult" { include "inet(media_nav_acpi_common)" - key <AE13> { [ XF86Messenger ] }; - key <FK14> { [ XF86New ] }; - key <FK15> { [ XF86Open ] }; - key <FK16> { [ XF86Close ] }; - key <FK17> { [ XF86Reply ] }; - key <I07> { [ Redo ] }; - key <I08> { [ Undo ] }; - key <I16> { [ XF86LogOff ] }; - key <I23> { [ XF86Spell ] }; - key <I3B> { [ Help ] }; - key <I3C> { [ XF86Music ] }; - key <I42> { [ XF86Forward ] }; - key <I43> { [ XF86Send ] }; - key <I57> { [ XF86Save ] }; - key <I58> { [ Print ] }; - key <I64> { [ XF86Pictures ] }; - key <I80> { [ XF86Documents ] }; -}; + key <AE13> { [ XF86Messenger ] }; + key <FK14> { [ XF86New ] }; + key <FK15> { [ XF86Open ] }; + key <FK16> { [ XF86Close ] }; + key <FK17> { [ XF86Reply ] }; + key <I07> { [ Redo ] }; + key <I08> { [ Undo ] }; + key <I16> { [ XF86LogOff ] }; + key <I23> { [ XF86Spell ] }; + key <I3B> { [ Help ] }; + key <I3C> { [ XF86Music ] }; + key <I42> { [ XF86Forward ] }; + key <I43> { [ XF86Send ] }; + key <I57> { [ XF86Save ] }; + key <I58> { [ Print ] }; + key <I64> { [ XF86Pictures ] }; + key <I80> { [ XF86Documents ] }; +}; // Oretec @@ -1646,6 +1644,7 @@ xkb_symbols "symplon" { key <UP> { [ XF86MenuPB ] }; }; + // Toshiba // Toshiba Satellite S3000 @@ -1663,6 +1662,7 @@ xkb_symbols "toshiba_s3000" { key <I76> { [ XF86AudioLowerVolume ] }; }; + // Trust // Trust Wireless Keyboard Classic @@ -1673,7 +1673,6 @@ xkb_symbols "trust" { key <I1E> { [ XF86Eject ] }; }; - // Trust Direct Access Keyboard partial alphanumeric_keys xkb_symbols "trustda" { @@ -1711,6 +1710,7 @@ xkb_symbols "yahoo" { key <I28> { [ XF86WWW ] }; }; + // Apple keyboards (macbooks, powerbooks, powermac G5, etc) partial alphanumeric_keys xkb_symbols "apple" { @@ -1751,14 +1751,15 @@ xkb_symbols "cymotionlinux" { key <XFER> { [ XF86AudioMedia ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "silvercrest" { include "inet(media_nav_acpi_common)" - key <I02> { [ XF86HomePage ] }; + key <I02> { [ XF86HomePage ] }; key <I21> { [ XF86Launch2 ] }; key <K67> { [ XF86Launch1 ] }; }; + // eMachines partial alphanumeric_keys @@ -1782,13 +1783,12 @@ xkb_symbols "emachines" { key <KPSU> { [ KP_Subtract ] }; }; + // BenQ +// BenQ X* (X730, X500, X800) // -// BenQ X* -// (X730, X500, X800) -// -// to make the FN_LOCK and CONFIG key work on the BenQ X500 , use ... +// To make the FN_LOCK and CONFIG key work on the BenQ X500 , use: // setkeycodes e074 130 # KEY_PROPS from /usr/include/linux/input.h // setkeycodes e075 171 # KEY_CONFIG from /usr/include/linux/input.h partial alphanumeric_keys @@ -1800,15 +1800,17 @@ xkb_symbols "benqx" { key <I31> { [ XF86Calendar ] }; }; + // Intel // Intel Classmate partial alphanumeric_keys xkb_symbols "classmate" { - key <I2E> { [ XF86AudioLowerVolume ] }; + key <I2E> { [ XF86AudioLowerVolume ] }; key <I30> { [ XF86AudioRaiseVolume ] }; }; + // Unitek partial alphanumeric_keys @@ -1822,6 +1824,7 @@ xkb_symbols "unitekkb1925" { key <I1A> { [ XF86Reload ] }; }; + // Creative // Creative Desktop Wireless 7000 @@ -1831,6 +1834,7 @@ xkb_symbols "creativedw7000" { key <I66> { [ XF86Pictures ] }; }; + // Compal // Compal FL90 @@ -1846,13 +1850,13 @@ xkb_symbols "pc105" { include "inet(media_nav_acpi_common)" }; + // HTC Dream partial alphanumeric_keys xkb_symbols "htcdream" { key <BKSP> { [ BackSpace ] }; key <RTRN> { [ Return ] }; - //first row key <AE01> { [ 1, 1, exclam, exclam ] }; key <AE02> { [ 2, 2, at, at ] }; key <AE03> { [ 3, 3, numbersign, numbersign ] }; @@ -1864,12 +1868,10 @@ xkb_symbols "htcdream" { key <AE09> { [ 9, 9, parenleft, parenleft ] }; key <AE10> { [ 0, 0, parenright, parenright ] }; - //fifth row key <LFSH> { [ Shift_L ] }; key <SPCE> { [ space ] }; key <AB09> { [ period, period, slash, slash ] }; key <RTSH> { [ Shift_R ] }; - //modifiers modifier_map Shift { <LFSH>, <RTSH> }; }; diff --git a/xorg-server/xkeyboard-config/symbols/ir b/xorg-server/xkeyboard-config/symbols/ir index d0a11b749..983bf60d9 100644 --- a/xorg-server/xkeyboard-config/symbols/ir +++ b/xorg-server/xkeyboard-config/symbols/ir @@ -62,7 +62,7 @@ xkb_symbols "pes_part_basic" { key <AD09> { [ Arabic_khah, bracketright, 0x100202e ] }; key <AD10> { [ Arabic_hah, bracketleft, 0x100202c ] }; key <AD11> { [ Arabic_jeem, braceright, 0x100202a ] }; - key <AD12> { [ Arabic_tcheh, braceleft, 0x100202b ] }; + key <AD12> { [ Arabic_tcheh, braceleft, 0x100202b ] }; key <AC01> { [ Arabic_sheen, Arabic_hamzaonwaw, VoidSymbol ] }; key <AC02> { [ Arabic_seen, Arabic_hamzaonyeh, VoidSymbol ] }; @@ -73,17 +73,15 @@ xkb_symbols "pes_part_basic" { key <AC07> { [ Arabic_teh, Arabic_tehmarbuta, VoidSymbol ] }; key <AC08> { [ Arabic_noon, guillemotright, 0x100fd3e ] }; key <AC09> { [ Arabic_meem, guillemotleft, 0x100fd3f ] }; - key <AC10> { [ Arabic_keheh, colon, semicolon ] }; + key <AC10> { [ Arabic_keheh, colon, semicolon ] }; key <AC11> { [ Arabic_gaf, Arabic_semicolon, quotedbl ] }; key <AB01> { [ Arabic_zah, Arabic_kaf, VoidSymbol ] }; key <AB02> { [ Arabic_tah, 0x1000653, VoidSymbol ] }; key <AB03> { [ Arabic_zain, Arabic_jeh, VoidSymbol ] }; - key <AB04> { [ Arabic_ra, Arabic_superscript_alef -, 0x1000656 ] }; + key <AB04> { [ Arabic_ra, Arabic_superscript_alef,0x1000656 ] }; key <AB05> { [ Arabic_thal, 0x100200c, 0x100200d ] }; - key <AB06> { [ Arabic_dal, Arabic_hamza_above -, Arabic_hamza_below ] }; + key <AB06> { [ Arabic_dal, Arabic_hamza_above, Arabic_hamza_below ] }; key <AB07> { [ Arabic_peh, Arabic_hamza, ellipsis ] }; key <AB08> { [ Arabic_waw, greater, comma ] }; key <AB09> { [ period, less, apostrophe ] }; @@ -169,7 +167,7 @@ xkb_symbols "ku_alt" { // // Copyright (C) 2006 Erdal Ronahî, published under the GPL v2 // -// Special copyright note: author explicitly permitted to license this +// Special copyright note: author explicitly permitted to license this // layout under MIT/X11 license, for details see // https://bugs.freedesktop.org/show_bug.cgi?id=9541 // @@ -256,51 +254,51 @@ xkb_symbols "ave" { name[Group1] = "Avestan"; - key <AB01> { [ U10B30, U10B32 ] }; // 𐬰 𐬲 - key <AB02> { [ U10B11, U10B12 ] }; // 𐬑 𐬒 - key <AB03> { [ U10B17, UE102 ] }; // 𐬗 - key <AB04> { [ U10B2C, U10B13 ] }; // 𐬬 𐬓 - key <AB05> { [ U10B20, U10B21 ] }; // 𐬠 𐬡 - key <AB06> { [ U10B25, U10B27 ] }; // 𐬥 𐬧 - key <AB07> { [ U10B28, U10B29 ] }; // 𐬨 𐬩 - key <AB08> { [ U10B3C, U10B39 ] }; // 𐬼 𐬹 - key <AB09> { [ U10B3E, U10B3D ] }; // 𐬾 𐬽 - key <AB10> { [ U10B3F, periodcentered ] }; // 𐬿 · - - key <AC01> { [ U10B00, U10B01 ] }; // 𐬀 𐬁 - key <AC02> { [ U10B2F, U10B31 ] }; // 𐬯 𐬱 - key <AC03> { [ U10B1B, U10B1C ] }; // 𐬛 𐬜 - key <AC04> { [ U10B1F, U10B16 ] }; // 𐬟 𐬖 - key <AC05> { [ U10B14, U10B15 ] }; // 𐬔 𐬕 - key <AC06> { [ U10B35, UE100 ] }; // 𐬵 - key <AC07> { [ U10B18, U10B24 ] }; // 𐬘 𐬤 - key <AC08> { [ U10B10, UE101 ] }; // 𐬐 - key <AC09> { [ U10B2E, UE103 ] }; // 𐬮 - key <AC10> { [ U10B3B, U10B3A ] }; // 𐬻 𐬺 - key <AC11> { [ U10B1D ] }; // 𐬝 - - key <AD01> { [ U10B22, U10B23 ] }; // 𐬢 𐬣 - key <AD02> { [ U10B33, U10B34 ] }; // 𐬳 𐬴 - key <AD03> { [ U10B08, U10B09 ] }; // 𐬈 𐬉 - key <AD04> { [ U10B2D, U10B26 ] }; // 𐬭 𐬦 - key <AD05> { [ U10B19, U10B1A ] }; // 𐬙 𐬚 - key <AD06> { [ U10B2B, U10B2A ] }; // 𐬫 𐬪 - key <AD07> { [ U10B0E, U10B0F ] }; // 𐬎 𐬏 - key <AD08> { [ U10B0C, U10B0D ] }; // 𐬌 𐬍 + key <AB01> { [ U10B30, U10B32 ] }; // 𐬰 𐬲 + key <AB02> { [ U10B11, U10B12 ] }; // 𐬑 𐬒 + key <AB03> { [ U10B17, UE102 ] }; // 𐬗 + key <AB04> { [ U10B2C, U10B13 ] }; // 𐬬 𐬓 + key <AB05> { [ U10B20, U10B21 ] }; // 𐬠 𐬡 + key <AB06> { [ U10B25, U10B27 ] }; // 𐬥 𐬧 + key <AB07> { [ U10B28, U10B29 ] }; // 𐬨 𐬩 + key <AB08> { [ U10B3C, U10B39 ] }; // 𐬼 𐬹 + key <AB09> { [ U10B3E, U10B3D ] }; // 𐬾 𐬽 + key <AB10> { [ U10B3F, periodcentered ] }; // 𐬿 · + + key <AC01> { [ U10B00, U10B01 ] }; // 𐬀 𐬁 + key <AC02> { [ U10B2F, U10B31 ] }; // 𐬯 𐬱 + key <AC03> { [ U10B1B, U10B1C ] }; // 𐬛 𐬜 + key <AC04> { [ U10B1F, U10B16 ] }; // 𐬟 𐬖 + key <AC05> { [ U10B14, U10B15 ] }; // 𐬔 𐬕 + key <AC06> { [ U10B35, UE100 ] }; // 𐬵 + key <AC07> { [ U10B18, U10B24 ] }; // 𐬘 𐬤 + key <AC08> { [ U10B10, UE101 ] }; // 𐬐 + key <AC09> { [ U10B2E, UE103 ] }; // 𐬮 + key <AC10> { [ U10B3B, U10B3A ] }; // 𐬻 𐬺 + key <AC11> { [ U10B1D ] }; // 𐬝 + + key <AD01> { [ U10B22, U10B23 ] }; // 𐬢 𐬣 + key <AD02> { [ U10B33, U10B34 ] }; // 𐬳 𐬴 + key <AD03> { [ U10B08, U10B09 ] }; // 𐬈 𐬉 + key <AD04> { [ U10B2D, U10B26 ] }; // 𐬭 𐬦 + key <AD05> { [ U10B19, U10B1A ] }; // 𐬙 𐬚 + key <AD06> { [ U10B2B, U10B2A ] }; // 𐬫 𐬪 + key <AD07> { [ U10B0E, U10B0F ] }; // 𐬎 𐬏 + key <AD08> { [ U10B0C, U10B0D ] }; // 𐬌 𐬍 key <AD09> { [ U10B0A, U10B0B ] }; // 𐬊 𐬋 - key <AD10> { [ U10B1E ] }; // 𐬞 - key <AD11> { [ U10B06, U10B07 ] }; // 𐬆 𐬇 - key <AD12> { [ U10B02, U10B03 ] }; // 𐬂 𐬃 - - key <AE01> { [ U10B78 ] }; // 𐭸 - key <AE02> { [ U10B79 ] }; // 𐭹 - key <AE03> { [ U10B7A ] }; // 𐭺 - key <AE04> { [ U10B7B ] }; // 𐭻 - key <AE05> { [ U10B7C ] }; // 𐭼 - key <AE06> { [ U10B7D ] }; // 𐭽 - key <AE07> { [ U10B7E ] }; // 𐭾 - key <AE08> { [ U10B7F ] }; // 𐭿 - - key <BKSL> { [ U10B04, U10B05 ] }; // 𐬄 𐬅 - key <LSGT> { [ U10B04, U10B05 ] }; // 𐬄 𐬅 + key <AD10> { [ U10B1E ] }; // 𐬞 + key <AD11> { [ U10B06, U10B07 ] }; // 𐬆 𐬇 + key <AD12> { [ U10B02, U10B03 ] }; // 𐬂 𐬃 + + key <AE01> { [ U10B78 ] }; // 𐭸 + key <AE02> { [ U10B79 ] }; // 𐭹 + key <AE03> { [ U10B7A ] }; // 𐭺 + key <AE04> { [ U10B7B ] }; // 𐭻 + key <AE05> { [ U10B7C ] }; // 𐭼 + key <AE06> { [ U10B7D ] }; // 𐭽 + key <AE07> { [ U10B7E ] }; // 𐭾 + key <AE08> { [ U10B7F ] }; // 𐭿 + + key <BKSL> { [ U10B04, U10B05 ] }; // 𐬄 𐬅 + key <LSGT> { [ U10B04, U10B05 ] }; // 𐬄 𐬅 }; diff --git a/xorg-server/xkeyboard-config/symbols/is b/xorg-server/xkeyboard-config/symbols/is index 5137e2d71..34d6bed33 100644 --- a/xorg-server/xkeyboard-config/symbols/is +++ b/xorg-server/xkeyboard-config/symbols/is @@ -125,7 +125,7 @@ xkb_symbols "mac" { key <AE11> { [ odiaeresis, Odiaeresis, oslash, Ooblique ] }; key <AE12> { [ minus, underscore, endash, emdash ] }; - + //-- Row 4 (D) --// key <AD01> { [ q, Q, paragraph, VoidSymbol ] }; key <AD02> { [ w, W, U2211, VoidSymbol ] }; @@ -139,8 +139,8 @@ xkb_symbols "mac" { key <AD10> { [ p, P, Greek_pi, Greek_PI ] }; key <AD11> { [ eth, Eth, U201e, U201c ] }; key <AD12> { [ apostrophe, question, questiondown, U00B7 ] }; - - + + //-- Row 3 (C) --// key <AC01> { [ a, A, aring, Aring ] }; key <AC02> { [ s, S, ssharp, abovedot ] }; @@ -154,8 +154,8 @@ xkb_symbols "mac" { key <AC10> { [ ae, AE, oe, OE ] }; key <AC11> { [ dead_acute, dead_diaeresis, U201A, U2018 ] }; key <BKSL> { [ plus, asterisk, U2022, plusminus ] }; - - + + //-- Row 2 (B) --// key <LSGT> { [ less, greater, section, UF8FF ] }; key <AB01> { [ z, Z, U3A9, VoidSymbol ] }; @@ -191,7 +191,7 @@ xkb_symbols "mac" { // -- Ævar Arnfjörð Bjarmason <avarab@gmail.com> // Icelandic Dvorak -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "dvorak" { name[Group1]= "Icelandic (Dvorak)"; diff --git a/xorg-server/xkeyboard-config/symbols/it b/xorg-server/xkeyboard-config/symbols/it index 3e402c98a..8a66a306a 100644 --- a/xorg-server/xkeyboard-config/symbols/it +++ b/xorg-server/xkeyboard-config/symbols/it @@ -33,6 +33,8 @@ xkb_symbols "basic" { key <LSGT> { [ less, greater,guillemotleft,guillemotright] }; + include "kpdl(comma)" + include "level3(ralt_switch)" }; @@ -175,7 +177,7 @@ xkb_symbols "us" { include "us(euro)" name[Group1]= "Italian (US keyboard with Italian letters)"; - + key <TLDE> { [ grave, asciitilde, dead_grave, dead_tilde ] }; key <AE01> { [ 1, exclam, onesuperior ] }; key <AE02> { [ 2, at, twosuperior ] }; diff --git a/xorg-server/xkeyboard-config/symbols/jp b/xorg-server/xkeyboard-config/symbols/jp index 189228e57..52f574623 100644 --- a/xorg-server/xkeyboard-config/symbols/jp +++ b/xorg-server/xkeyboard-config/symbols/jp @@ -101,6 +101,14 @@ xkb_symbols "common" { }; partial alphanumeric_keys +xkb_symbols "henkan" { + key <XFER> { + type[Group1]="PC_ALT_LEVEL2", + symbols[Group1]= [ Henkan, Mode_switch ] + }; +}; + +partial alphanumeric_keys xkb_symbols "OADG109A" { include "jp(common)" diff --git a/xorg-server/xkeyboard-config/symbols/ke b/xorg-server/xkeyboard-config/symbols/ke index 74e8c2dd2..d58796d76 100644 --- a/xorg-server/xkeyboard-config/symbols/ke +++ b/xorg-server/xkeyboard-config/symbols/ke @@ -9,7 +9,7 @@ xkb_symbols "swa" { include "us" name[Group1]= "Swahili (Kenya)"; - + key <AC10> { [ semicolon, colon, 0x01000324, 0x01000324 ] }; //COMBINING DIAERESIS BELOW key <AC11> { [apostrophe, quotedbl, 0x01000301, 0x01000308 ] }; //COMBINING ACUTE ACCENT, COMBINING DIAERESIS key <TLDE> { [ grave, asciitilde, 0x01000300, 0x01000303 ] }; //COMBINING GRAVE ACCENT, COMBINING TILDE @@ -18,17 +18,17 @@ xkb_symbols "swa" { key <AE09> { [ 9, parenleft, 0x01000306 ] }; //COMBINING BREVE key <AE10> { [ 0, parenright, 0x0100030c ] }; //COMBINING CARON key <AE11> { [ minus, underscore, 0x01000304, 0x01000331 ] }; //COMBINING MACRON,COMBINING MACRON BELOW - + include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "kik" { include "us" name[Group1]= "Kikuyu"; - + key <AC10> { [ semicolon, colon, 0x01000324, 0x01000324 ] }; //COMBINING DIAERESIS BELOW key <AC11> { [apostrophe, quotedbl, 0x01000301, 0x01000308 ] }; //COMBINING ACUTE ACCENT, COMBINING DIAERESIS key <TLDE> { [ grave, asciitilde, 0x01000300, 0x01000303 ] }; //COMBINING GRAVE ACCENT, COMBINING TILDE @@ -37,6 +37,6 @@ xkb_symbols "kik" { key <AE09> { [ 9, parenleft, 0x01000306 ] }; //COMBINING BREVE key <AE10> { [ 0, parenright, 0x0100030c ] }; //COMBINING CARON key <AE11> { [ minus, underscore, 0x01000304, 0x01000331 ] }; //COMBINING MACRON,COMBINING MACRON BELOW - + include "level3(ralt_switch)" }; diff --git a/xorg-server/xkeyboard-config/symbols/keypad b/xorg-server/xkeyboard-config/symbols/keypad index bc47a90e9..9b49a5773 100644 --- a/xorg-server/xkeyboard-config/symbols/keypad +++ b/xorg-server/xkeyboard-config/symbols/keypad @@ -349,7 +349,7 @@ xkb_symbols "legacynumber" { key <KP7> { [ KP_Home, KP_7 ] }; // <home> 7 key <KP8> { [ KP_Up, KP_8 ] }; // <up> 8 key <KP9> { [ KP_Prior, KP_9 ] }; // <prior> 9 - + key <KP4> { [ KP_Left, KP_4 ] }; // <left> 4 key <KP5> { [ KP_Begin, KP_5 ] }; // <begin> 5 key <KP6> { [ KP_Right, KP_6 ] }; // <right> 6 @@ -391,7 +391,7 @@ xkb_symbols "legacynumber_wang" { key <KP7> { [ KP_Home, KP_7, less ] }; // <home> 7 < key <KP8> { [ KP_Up, KP_8, greater ] }; // <up> 8 > key <KP9> { [ KP_Prior, KP_9, asciicircum ] }; // <prior> 9 ^ - + key <KP4> { [ KP_Left, KP_4, bracketleft ] }; // <left> 4 [ key <KP5> { [ KP_Begin, KP_5, bracketright ] }; // <begin> 5 ] key <KP6> { [ KP_Right, KP_6, dollar ] }; // <right> 6 $ @@ -431,7 +431,7 @@ xkb_symbols "ossnumber" { key <KP7> { [ KP_Home, KP_7, 0x1002196, 0x10021D6 ] }; // <home> 7 ↖ ⇖ key <KP8> { [ KP_Up, KP_8, 0x1002191, 0x10021D1 ] }; // <up> 8 ↑ ⇑ key <KP9> { [ KP_Prior, KP_9, 0x1002197, 0x10021D7 ] }; // <prior> 9 ↗ ⇗ - + key <KP4> { [ KP_Left, KP_4, 0x1002190, 0x10021D0 ] }; // <left> 4 ← ⇐ key <KP5> { [ KP_Begin, KP_5, 0x1002194, 0x10021D4 ] }; // <begin> 5 ↔ ⇔ key <KP6> { [ KP_Right, KP_6, 0x1002192, 0x10021D2 ] }; // <right> 6 → ⇒ @@ -471,7 +471,7 @@ xkb_symbols "ossnumber_wang" { key <KP7> { [ KP_Home, KP_7, less, 0x1002196 ] }; // <home> 7 < ↖ key <KP8> { [ KP_Up, KP_8, greater, 0x1002191 ] }; // <up> 8 > ↑ key <KP9> { [ KP_Prior, KP_9, asciicircum, 0x1002197 ] }; // <prior> 9 ^ ↗ - + key <KP4> { [ KP_Left, KP_4, bracketleft, 0x1002190 ] }; // <left> 4 [ ← key <KP5> { [ KP_Begin, KP_5, bracketright, 0x1002194 ] }; // <begin> 5 ] ↔ key <KP6> { [ KP_Right, KP_6, dollar, 0x1002192 ] }; // <right> 6 $ → @@ -532,7 +532,7 @@ xkb_symbols "hex" { key <KP7> { [ NoSymbol, NoSymbol, a ] }; key <KP8> { [ NoSymbol, NoSymbol, b ] }; key <KP9> { [ NoSymbol, NoSymbol, c ] }; - + // home row key <KP4> { [ NoSymbol, NoSymbol, d ] }; key <KP5> { [ NoSymbol, NoSymbol, e ] }; diff --git a/xorg-server/xkeyboard-config/symbols/kh b/xorg-server/xkeyboard-config/symbols/kh index ee58abf2f..5c1723324 100644 --- a/xorg-server/xkeyboard-config/symbols/kh +++ b/xorg-server/xkeyboard-config/symbols/kh @@ -27,7 +27,7 @@ default partial alphanumeric_keys xkb_symbols "basic" { name[Group1]= "Khmer (Cambodia)"; - + // there are four levels defined: // // normal shift right-alt right-alt + shift @@ -93,13 +93,13 @@ xkb_symbols "basic" { // third level with right-Alt include "level3(ralt_switch)" - + }; partial alphanumeric_keys xkb_symbols "olpc" { include "kh(basic)" - + // Contact Walter@laptop.org key <AC10> { [ 0x10017be, 0x10017c8, 0x10017d6, 0x10019f5 ] }; diff --git a/xorg-server/xkeyboard-config/symbols/kr b/xorg-server/xkeyboard-config/symbols/kr index ced9a0720..84c0effca 100644 --- a/xorg-server/xkeyboard-config/symbols/kr +++ b/xorg-server/xkeyboard-config/symbols/kr @@ -16,13 +16,13 @@ xkb_symbols "kr104" { partial hidden function_keys xkb_symbols "koreankeys" { key <K71> { [ Hangul ] }; - key <K72> { [ Hangul_Hanja ] }; + key <K72> { [ Hangul_Hanja ] }; }; partial hidden function_keys xkb_symbols "koreankeys_raltctl" { key <RALT> { [ Hangul ] }; - key <RCTL> { [ Hangul_Hanja ] }; + key <RCTL> { [ Hangul_Hanja ] }; }; // EXTRAS: diff --git a/xorg-server/xkeyboard-config/symbols/lt b/xorg-server/xkeyboard-config/symbols/lt index 8b6b80e5f..ee6b73708 100644 --- a/xorg-server/xkeyboard-config/symbols/lt +++ b/xorg-server/xkeyboard-config/symbols/lt @@ -68,7 +68,7 @@ xkb_symbols "us" { // // Made by Gediminas Paulauskas <menesis@delfi.lt> // Minor modifications by Ričardas Čepas and Rimas Kudelis - + partial alphanumeric_keys modifier_keys xkb_symbols "std" { @@ -121,7 +121,7 @@ xkb_symbols "std" { // // Made by Piter PUNK <piterpk@terra.com.br> // Minor modifications and cleanup by Rimas Kudelis, 2010 - + partial alphanumeric_keys modifier_keys xkb_symbols "ibm" { @@ -169,12 +169,12 @@ xkb_symbols "ibm" { partial alphanumeric_keys modifier_keys xkb_symbols "lekp" { - + include "capslock(backspace)" include "level3(ralt_switch)" - + name[Group1]="Lithuanian (LEKP)"; - + key <TLDE> {[ grave, asciitilde, acute ]}; key <AE01> {[ slash, numbersign, bar ]}; key <AE02> {[ backslash, at, section ]}; diff --git a/xorg-server/xkeyboard-config/symbols/mao b/xorg-server/xkeyboard-config/symbols/mao index bf3482679..cc73d25f3 100644 --- a/xorg-server/xkeyboard-config/symbols/mao +++ b/xorg-server/xkeyboard-config/symbols/mao @@ -2,7 +2,7 @@ default partial alphanumeric_keys xkb_symbols "basic" { // Adds the macrons needed for the Maori language to - // a simple us keyboard layout. + // a simple US keyboard layout. include "latin" @@ -16,6 +16,7 @@ xkb_symbols "basic" { key <AD07> { [ u, U, umacron, Umacron ] }; key <RALT> { type[Group1]="TWO_LEVEL", - [ ISO_Level3_Shift, Multi_key ] }; + [ ISO_Level3_Shift, Multi_key ] }; + modifier_map Mod5 { <RALT> }; }; diff --git a/xorg-server/xkeyboard-config/symbols/md b/xorg-server/xkeyboard-config/symbols/md index 1664da9cd..cd3430beb 100644 --- a/xorg-server/xkeyboard-config/symbols/md +++ b/xorg-server/xkeyboard-config/symbols/md @@ -29,11 +29,11 @@ xkb_symbols "basic" { partial alphanumeric_keys xkb_symbols "gag" { - + include "us(basic)" name[Group1]="Moldavian (Gagauz)"; - + key <TLDE> { [ grave, asciitilde ] }; key <AE01> { [ 1, exclam ] }; key <AE02> { [ 2, quotedbl, at ] }; @@ -47,7 +47,7 @@ xkb_symbols "gag" { key <AE10> { [ 0, parenright ] }; key <AE11> { [ minus, underscore ] }; key <AE12> { [ equal, plus ] }; - + key <AD01> { [ tcedilla, Tcedilla, q, Q ] }; key <AD02> { [ ecircumflex, Ecircumflex, w, W ] }; key <AD03> { [ e, E ] }; @@ -60,7 +60,7 @@ xkb_symbols "gag" { key <AD10> { [ p, P ] }; key <AD11> { [ odiaeresis, Odiaeresis, bracketleft, braceleft ] }; key <AD12> { [ udiaeresis, Udiaeresis, bracketright, braceright ] }; - + key <AC01> { [ a, A ] }; key <AC02> { [ s, S ] }; key <AC03> { [ d, D ] }; @@ -72,7 +72,7 @@ xkb_symbols "gag" { key <AC09> { [ l, L ] }; key <AC10> { [ scedilla, Scedilla ] }; key <AC11> { [ idotless, I, apostrophe ] }; - + key <AB01> { [ z, Z ] }; key <AB02> { [ ccedilla, Ccedilla, x, X ] }; key <AB03> { [ c, Ccedilla ] }; @@ -83,7 +83,7 @@ xkb_symbols "gag" { key <AB08> { [ adiaeresis, Adiaeresis ] }; key <AB09> { [ comma, less ] }; key <AB10> { [ period, greater, slash ] }; - + key <BKSL> { [ backslash, bar ] }; include "level3(ralt_switch)" diff --git a/xorg-server/xkeyboard-config/symbols/mk b/xorg-server/xkeyboard-config/symbols/mk index 40075848a..0903d6617 100644 --- a/xorg-server/xkeyboard-config/symbols/mk +++ b/xorg-server/xkeyboard-config/symbols/mk @@ -53,7 +53,7 @@ xkb_symbols "basic" { key <AB08> { [ comma, semicolon ] }; key <AB09> { [ period, colon ] }; key <AB10> { [ slash, question ] }; - + include "kpdl(comma)" }; diff --git a/xorg-server/xkeyboard-config/symbols/mv b/xorg-server/xkeyboard-config/symbols/mv index cb05b8b3c..e6836f3bb 100644 --- a/xorg-server/xkeyboard-config/symbols/mv +++ b/xorg-server/xkeyboard-config/symbols/mv @@ -18,7 +18,7 @@ xkb_symbols "basic" { key <AE10> { [ 0, parenright ] }; key <AE11> { [ minus, underscore ] }; key <AE12> { [ equal, plus ] }; - + key <AD01> { [ 0x10007B0, 0x10007A4 ] }; key <AD02> { [ 0x1000787, 0x10007A2 ] }; key <AD03> { [ 0x10007AC, 0x10007AD ] }; diff --git a/xorg-server/xkeyboard-config/symbols/ng b/xorg-server/xkeyboard-config/symbols/ng index ea1fca278..ccd9d81ce 100644 --- a/xorg-server/xkeyboard-config/symbols/ng +++ b/xorg-server/xkeyboard-config/symbols/ng @@ -15,8 +15,8 @@ xkb_symbols "yoruba" { name[Group1]= "Yoruba"; key <AD01> { [ 0x01001EB9, 0x01001EB8, q, Q ] }; - key <AB02> { [ 0x01001ECD, 0x01001ECC, x, X ] }; - key <AB04> { [ 0x01001E63, 0x01001E62, v, V ] }; + key <AB02> { [ 0x01001ECD, 0x01001ECC, x, X ] }; + key <AB04> { [ 0x01001E63, 0x01001E62, v, V ] }; }; partial alphanumeric_keys @@ -26,7 +26,7 @@ xkb_symbols "igbo" { name[Group1]= "Igbo"; key <AD01> { [ 0x01001ECB, 0x01001ECA, q, Q ] }; - key <AB02> { [ 0x01001E45, 0x01001E44, x, X ] }; + key <AB02> { [ 0x01001E45, 0x01001E44, x, X ] }; key <AC10> { [ 0x01001EE5, 0x01001EE4, semicolon, colon ] }; key <AD11> { [ 0x01001ECD, 0x01001ECC, bracketleft, braceleft ] }; }; diff --git a/xorg-server/xkeyboard-config/symbols/nl b/xorg-server/xkeyboard-config/symbols/nl index ff60dbba7..1dde405f8 100644 --- a/xorg-server/xkeyboard-config/symbols/nl +++ b/xorg-server/xkeyboard-config/symbols/nl @@ -49,6 +49,8 @@ xkb_symbols "basic" { key <LSGT> { [bracketright, bracketleft, bar, brokenbar ] }; + include "kpdl(comma)" + include "level3(ralt_switch)" }; @@ -132,7 +134,7 @@ xkb_symbols "sundeadkeys" { }; // Copied from macintosh_vndr/nl -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac" { include "latin" diff --git a/xorg-server/xkeyboard-config/symbols/no b/xorg-server/xkeyboard-config/symbols/no index 5bba1959e..5609de06e 100644 --- a/xorg-server/xkeyboard-config/symbols/no +++ b/xorg-server/xkeyboard-config/symbols/no @@ -53,7 +53,7 @@ xkb_symbols "nodeadkeys" { }; // Norwegian Dvorak -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "dvorak" { include "us(dvorak)" @@ -186,7 +186,7 @@ xkb_symbols "smi_nodeadkeys" { }; // Copied from macintosh_vndr/no -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac" { // Describes the differences between a very simple en_US @@ -211,7 +211,7 @@ xkb_symbols "mac" { key <BKSL> { [ at, asterisk ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac_nodeadkeys" { // Modifies the basic Norwegian layout to eliminate dead keys @@ -222,7 +222,7 @@ xkb_symbols "mac_nodeadkeys" { key <AD12> { [ diaeresis, asciicircum, asciitilde, macron ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "colemak" { // Colemak layout - http://colemak.com/ diff --git a/xorg-server/xkeyboard-config/symbols/pk b/xorg-server/xkeyboard-config/symbols/pk index b85d887a3..8ab26ed5e 100644 --- a/xorg-server/xkeyboard-config/symbols/pk +++ b/xorg-server/xkeyboard-config/symbols/pk @@ -86,7 +86,7 @@ xkb_symbols "urd-crulp" { key <AE10> { [ 0x10006F0 , 0x1000030, 0x1000028 ] }; key <AE11> { [ 0x100002D , 0x100005F ] }; - key <AE12> { [ 0x100003D , 0x100002B ] }; + key <AE12> { [ 0x100003D , 0x100002B ] }; key <AD01> { [ 0x1000642 , 0x1000652 ] }; key <AD02> { [ 0x1000648 , 0x1000651, 0x1000602 ] }; key <AD03> { [ 0x1000639 , 0x1000670, 0x1000656 ] }; diff --git a/xorg-server/xkeyboard-config/symbols/pl b/xorg-server/xkeyboard-config/symbols/pl index a448e2baa..a468e790d 100644 --- a/xorg-server/xkeyboard-config/symbols/pl +++ b/xorg-server/xkeyboard-config/symbols/pl @@ -62,6 +62,7 @@ xkb_symbols "legacy" { name[Group1]="Polish (legacy)"; key <AD03> { [ e, E, eogonek, Eogonek ] }; + key <AD07> { [ u, U, EuroSign, cent ] }; key <AD09> { [ o, O, oacute, Oacute ] }; key <AC01> { [ a, A, aogonek, Aogonek ] }; @@ -131,10 +132,10 @@ xkb_symbols "qwertz" { // "1/!" key. If you do not use Polish quotes at all, you can use "pl_basic" map. // Basic Polish keymap (without Polish quotes) -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "dvorak" { include "us(dvorak)" - + name[Group1] = "Polish (Dvorak)"; key <AD08> { [ c, C, cacute, Cacute ] }; @@ -146,7 +147,7 @@ xkb_symbols "dvorak" { key <AC10> { [ s, S, sacute, Sacute ] }; key <AB09> { [ v, V, zacute, Zacute ] }; key <AB10> { [ z, Z, zabovedot, Zabovedot ] }; - + include "kpdl(comma)" include "level3(ralt_switch)" @@ -156,7 +157,7 @@ xkb_symbols "dvorak" { partial alphanumeric_keys xkb_symbols "dvorak_quotes" { include "pl(dvorak)" - + name[Group1] = "Polish (Dvorak, Polish quotes on quotemark key)"; key <AD01> { [ apostrophe, quotedbl, doublelowquotemark, rightdoublequotemark ] }; @@ -482,7 +483,7 @@ xkb_symbols "colemak" { key <AB02> { [ x, X, zacute, Zacute ] }; key <AB03> { [ c, C, cacute, Cacute ] }; key <AC01> { [ a, A, aogonek, Aogonek ] }; - key <AC03> { [ s, S, sacute, Sacute ] }; + key <AC03> { [ s, S, sacute, Sacute ] }; key <AC07> { [ n, N, nacute, Nacute ] }; key <AC08> { [ e, E, eogonek, Eogonek ] }; key <AC10> { [ o, O, oacute, Oacute ] }; diff --git a/xorg-server/xkeyboard-config/symbols/ru b/xorg-server/xkeyboard-config/symbols/ru index c48637637..043e011e6 100644 --- a/xorg-server/xkeyboard-config/symbols/ru +++ b/xorg-server/xkeyboard-config/symbols/ru @@ -22,7 +22,7 @@ xkb_symbols "winkeys" { key <BKSL> { [ backslash, slash ] }; }; -partial hidden alphanumeric_keys +partial hidden alphanumeric_keys xkb_symbols "common" { key <AE01> { [ 1, exclam ] }; @@ -179,7 +179,7 @@ xkb_symbols "phonetic" { key <LatA> { [ Cyrillic_a, Cyrillic_A ] }; key <LatW> { [ Cyrillic_ve, Cyrillic_VE ] }; key <LatC> { [ Cyrillic_tse, Cyrillic_TSE ] }; - key <LatX> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] }; + key <LatX> { [ Cyrillic_ha, Cyrillic_HA ] }; key <LatD> { [ Cyrillic_de, Cyrillic_DE ] }; key <LatE> { [ Cyrillic_ie, Cyrillic_IE ] }; key <LatV> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; @@ -188,7 +188,7 @@ xkb_symbols "phonetic" { key <LatR> { [ Cyrillic_er, Cyrillic_ER ] }; key <LatN> { [ Cyrillic_en, Cyrillic_EN ] }; key <LatB> { [ Cyrillic_be, Cyrillic_BE ] }; - key <LatH> { [ Cyrillic_ha, Cyrillic_HA ] }; + key <LatH> { [ Cyrillic_che, Cyrillic_CHE ] }; key <LatG> { [ Cyrillic_ghe, Cyrillic_GHE ] }; key <LatY> { [ Cyrillic_yeru, Cyrillic_YERU ] }; key <LatM> { [ Cyrillic_em, Cyrillic_EM ] }; @@ -201,7 +201,7 @@ xkb_symbols "phonetic" { key <LatP> { [ Cyrillic_pe, Cyrillic_PE ] }; key <AD11> { [ Cyrillic_sha, Cyrillic_SHA ] }; - key <AE12> { [ Cyrillic_che, Cyrillic_CHE ] }; + key <AE12> { [ Cyrillic_softsign, Cyrillic_softsign ] }; key <AD12> { [ Cyrillic_shcha, Cyrillic_SHCHA ] }; key <BKSL> { [ Cyrillic_e, Cyrillic_E ] }; }; @@ -242,7 +242,7 @@ xkb_symbols "tt" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "os_legacy" { include "ru(common)" @@ -253,7 +253,7 @@ xkb_symbols "os_legacy" { key <AC11> { [ 0x010004D5, 0x010004D4 ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "os_winkeys" { include "ru(winkeys)" @@ -336,7 +336,7 @@ xkb_symbols "cv_latin" { // Vlad Shakhov <lumpen.intellectual@gmail.com> // Last Changes 2007/10/23 by Vlad Shakhov <lumpen.intellectual@gmail.com> -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "kom" { include "ru(winkeys)" @@ -348,7 +348,7 @@ xkb_symbols "kom" { // cyrilllic o with diaeresis key <AC07> { [ Cyrillic_o, Cyrillic_O, U04E7, U04E6 ] }; - + // hard I as additional key for soft Cyrillic_I key <AB05> { [ Cyrillic_i, Cyrillic_I, Ukrainian_i, Ukrainian_I ] }; @@ -404,7 +404,7 @@ xkb_symbols "sah" { //based on the Kalmyk language layout: http://soft.oyrat.org/ //Nikolay Korneev <halmg@oyrat.org> //Toli Miron <mirontoli@gmail.com> - + partial alphanumeric_keys xkb_symbols "xal" { include "ru(winkeys)" @@ -416,24 +416,24 @@ xkb_symbols "xal" { key <AE01> { [ question, exclam, 1 ] }; key <AE02> { [ numerosign, quotedbl, 2 ] }; key <AE03> { [ Cyrillic_u_straight, Cyrillic_U_straight, 3 ] }; - key <AE04> { [ Cyrillic_schwa, Cyrillic_SCHWA, 4 ] }; + key <AE04> { [ Cyrillic_schwa, Cyrillic_SCHWA, 4 ] }; key <AE05> { [ asterisk, percent, 5 ] }; key <AE06> { [ Cyrillic_en_descender, Cyrillic_EN_descender, 6 ] }; - key <AE07> { [ Cyrillic_o_bar, Cyrillic_O_bar, 7 ] }; - key <AE08> { [ Cyrillic_shha, Cyrillic_SHHA, 8 ] }; + key <AE07> { [ Cyrillic_o_bar, Cyrillic_O_bar, 7 ] }; + key <AE08> { [ Cyrillic_shha, Cyrillic_SHHA, 8 ] }; key <AE09> { [ Cyrillic_zhe_descender, Cyrillic_ZHE_descender, 9 ] }; key <AE10> { [ semicolon, colon, 0 ] }; key <TLDE> { [ parenleft, parenright, Cyrillic_io, Cyrillic_IO ] }; key <AD02> { [ Cyrillic_tse, Cyrillic_TSE, dollar ] }; - key <AD03> { [ Cyrillic_u, Cyrillic_U, EuroSign ] }; - key <AD04> { [ Cyrillic_ka, Cyrillic_KA, registered ] }; - key <AD05> { [ Cyrillic_ie, Cyrillic_IE, trademark ] }; - key <AD11> { [ Cyrillic_ha, Cyrillic_HA, bracketleft ] }; + key <AD03> { [ Cyrillic_u, Cyrillic_U, EuroSign ] }; + key <AD04> { [ Cyrillic_ka, Cyrillic_KA, registered ] }; + key <AD05> { [ Cyrillic_ie, Cyrillic_IE, trademark ] }; + key <AD11> { [ Cyrillic_ha, Cyrillic_HA, bracketleft ] }; key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN, bracketright ] }; key <AC11> { [ Cyrillic_e, Cyrillic_E, apostrophe ] }; - key <AB03> { [ Cyrillic_es, Cyrillic_ES, copyright ] }; + key <AB03> { [ Cyrillic_es, Cyrillic_ES, copyright ] }; key <AB08> { [ Cyrillic_be, Cyrillic_BE, less ] }; key <AB09> { [ Cyrillic_yu, Cyrillic_YU, greater ] }; @@ -476,7 +476,7 @@ xkb_symbols "bak" { key <AE11> { [ minus, percent, minus, underscore ]}; key <AE12> { [ 0x010004af, 0x010004ae, equal, plus ]}; key <BKSL> { [ 0x010004a3, 0x010004a2, backslash, slash ]}; - + include "level3(ralt_switch)" }; @@ -511,7 +511,7 @@ xkb_symbols "srp" { partial alphanumeric_keys xkb_symbols "chm" { include "ru(common)" - + name[Group1]= "Mari"; key.type[group1]="FOUR_LEVEL_ALPHABETIC"; diff --git a/xorg-server/xkeyboard-config/symbols/se b/xorg-server/xkeyboard-config/symbols/se index a498f693d..7c37d2a1d 100644 --- a/xorg-server/xkeyboard-config/symbols/se +++ b/xorg-server/xkeyboard-config/symbols/se @@ -45,7 +45,7 @@ xkb_symbols "nodeadkeys" { }; // Swedish Dvorak -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "dvorak" { name[Group1]="Swedish (Dvorak)"; @@ -162,7 +162,7 @@ xkb_symbols "smi" { }; // Copied from macintosh_vndr/se -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "mac" { // Describes the differences between a very simple en_US diff --git a/xorg-server/xkeyboard-config/symbols/si b/xorg-server/xkeyboard-config/symbols/si index 6733d2bd1..cff5f5602 100644 --- a/xorg-server/xkeyboard-config/symbols/si +++ b/xorg-server/xkeyboard-config/symbols/si @@ -8,7 +8,7 @@ xkb_symbols "basic" { key <TLDE> { type[Group1]="TWO_LEVEL", [ cedilla, diaeresis ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "us" { name[Group1]= "Slovenian (US keyboard with Slovenian letters)"; @@ -19,7 +19,7 @@ xkb_symbols "us" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "alternatequotes" { name[Group1]= "Slovenian (use guillemets for quotes)"; diff --git a/xorg-server/xkeyboard-config/symbols/sk b/xorg-server/xkeyboard-config/symbols/sk index b48e5aa8d..2162d533d 100644 --- a/xorg-server/xkeyboard-config/symbols/sk +++ b/xorg-server/xkeyboard-config/symbols/sk @@ -1,6 +1,6 @@ default partial alphanumeric_keys xkb_symbols "basic" { - + // This layout conforms to a new sk compromise standard designed // to satisfy most unix, windows and mac users. // 2001 by Kamil Toman <ktoman@email.cz> @@ -46,7 +46,7 @@ xkb_symbols "basic" { key <AC07> { [ j, J, apostrophe, NoSymbol ] }; key <AC08> { [ k, K, lstroke, NoSymbol ] }; key <AC09> { [ l, L, Lstroke, NoSymbol ] }; - + key <AC10> { [ocircumflex, quotedbl, dollar, NoSymbol ] }; key <AC11> { [ section, exclam, apostrophe, ssharp ] }; key <AC12> { [ EuroSign, dead_diaeresis, NoSymbol, NoSymbol ] }; @@ -78,13 +78,13 @@ xkb_symbols "bksl" { key <BKSL> { [ backslash, bar, slash, NoSymbol ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "qwerty" { - + // This layout should work exactly as a sk with the exception // of 'Z' and 'Y' keys, which are in the qwerty style (ie. swapped). // 2001 by Kamil Toman <ktoman@email.cz> - + include "sk(basic)" name[Group1] = "Slovak (qwerty)"; diff --git a/xorg-server/xkeyboard-config/symbols/srvr_ctrl b/xorg-server/xkeyboard-config/symbols/srvr_ctrl index 52b4eb9a0..902c51cf7 100644 --- a/xorg-server/xkeyboard-config/symbols/srvr_ctrl +++ b/xorg-server/xkeyboard-config/symbols/srvr_ctrl @@ -1,4 +1,4 @@ -// Actions which control the server's behavior +// Actions which control the server's behavior. partial keypad_keys function_keys xkb_symbols "xfree86" { @@ -6,7 +6,7 @@ xkb_symbols "xfree86" { include "srvr_ctrl(fkey2vt)" }; -partial function_keys +partial function_keys xkb_symbols "fkey2vt" { key <FK01> { @@ -68,7 +68,6 @@ xkb_symbols "fkey2vt" { type="CTRL+ALT", symbols[Group1]= [ F12, F12, F12, F12, XF86_Switch_VT_12 ] }; - }; partial function_keys keypad_keys @@ -94,3 +93,18 @@ xkb_symbols "no_srvr_keys" { key <KPSU> { [ KP_Subtract, KP_Subtract ] }; key <KPAD> { [ KP_Add, KP_Add ] }; }; + +partial function_keys +xkb_symbols "grab_debug" { + + key <FK11> { + type="CTRL+ALT", + symbols[Group1]= [ F11, F11, F11, F11, XF86LogGrabInfo ] + }; + + key <FK12> { + type="CTRL+ALT", + symbols[Group1]= [ F12, F12, F12, F12, XF86LogWindowTree ] + }; + +}; diff --git a/xorg-server/xkeyboard-config/symbols/th b/xorg-server/xkeyboard-config/symbols/th index 9cdde53cd..c2390ffc4 100644 --- a/xorg-server/xkeyboard-config/symbols/th +++ b/xorg-server/xkeyboard-config/symbols/th @@ -59,12 +59,12 @@ xkb_symbols "basic" { key <BKSL> { [ Thai_khokhuat, Thai_khokhon ] }; }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "pat" { name[Group1]= "Thai (Pattachote)"; // The thai layout defines a second keyboard group and changes // the behavior of a few modifier keys. - + // converted to THai keysysms - Pablo Saratxaga pablo@mandrakesoft.com // Pattachote modification by Visanu Euarchukiati -- visanu@inet.co.th key <TLDE> { [ underscore, Thai_baht ] }; @@ -121,7 +121,7 @@ xkb_symbols "pat" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "tis" { name[Group1]= "Thai (TIS-820.2538)"; // The thai layout defines a second keyboard group and changes diff --git a/xorg-server/xkeyboard-config/symbols/tj b/xorg-server/xkeyboard-config/symbols/tj index 38a7cd257..e7816cbf9 100644 --- a/xorg-server/xkeyboard-config/symbols/tj +++ b/xorg-server/xkeyboard-config/symbols/tj @@ -16,57 +16,57 @@ xkb_symbols "basic" { name[Group1] = "Tajik"; - include "kpdl(comma)" + include "kpdl(comma)" include "level3(ralt_switch)" - key <AB01> { [ Cyrillic_ya, Cyrillic_YA ] }; // я Я - key <AB02> { [ Cyrillic_che, Cyrillic_CHE ] }; // ч Ч - key <AB03> { [ Cyrillic_es, Cyrillic_ES ] }; // с С - key <AB04> { [ Cyrillic_em, Cyrillic_EM ] }; // м М - key <AB05> { [ Cyrillic_i, Cyrillic_I ] }; // и И - key <AB06> { [ Cyrillic_te, Cyrillic_TE ] }; // т Т - key <AB07> { [ 0x10004e3, 0x10004e2 ] }; // ӣ Ӣ - key <AB08> { [ Cyrillic_be, Cyrillic_BE ] }; // б Б - key <AB09> { [ Cyrillic_yu, Cyrillic_YU ] }; // ю Ю - key <AB10> { [ period, comma ] }; // . , - key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] }; // ф Ф - key <AC02> { [ 0x10004b7, 0x10004b6 ] }; // ҷ Ҷ - key <AC03> { [ Cyrillic_ve, Cyrillic_VE ] }; // в В - key <AC04> { [ Cyrillic_a, Cyrillic_A ] }; // а А - key <AC05> { [ Cyrillic_pe, Cyrillic_PE ] }; // п П - key <AC06> { [ Cyrillic_er, Cyrillic_ER ] }; // р Р - key <AC07> { [ Cyrillic_o, Cyrillic_O ] }; // о О - key <AC08> { [ Cyrillic_el, Cyrillic_EL ] }; // л Л - key <AC09> { [ Cyrillic_de, Cyrillic_DE ] }; // д Д - key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; // ж Ж - key <AC11> { [ Cyrillic_e, Cyrillic_E ] }; // э Э - key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI ] }; // й Й - key <AD02> { [ 0x100049b, 0x100049a ] }; // қ Қ - key <AD03> { [ Cyrillic_u, Cyrillic_U ] }; // у У - key <AD04> { [ Cyrillic_ka, Cyrillic_KA ] }; // к К - key <AD05> { [ Cyrillic_ie, Cyrillic_IE ] }; // е Е - key <AD06> { [ Cyrillic_en, Cyrillic_EN ] }; // н Н - key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE ] }; // г Г - key <AD08> { [ Cyrillic_sha, Cyrillic_SHA ] }; // ш Ш - key <AD09> { [ 0x10004b3, 0x10004b2 ] }; // ҳ Ҳ - key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] }; // з З - key <AD11> { [ Cyrillic_ha, Cyrillic_HA ] }; // х Х - key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN ] }; // ъ Ъ - key <AE01> { [ 1, exclam, 0x10000a7 ] }; // 1 ! § - key <AE02> { [ 2, quotedbl, 0x10000ab, 0x10000bb ] }; // 2 " « » - key <AE03> { [ 3, numerosign ] }; // 3 № - key <AE04> { [ 4, semicolon ] }; // 4 ; - key <AE05> { [ 5, percent ] }; // 5 % - key <AE06> { [ 6, colon, 0x1002013 ] }; // 6 : – - key <AE07> { [ 7, question, ampersand ] }; // 7 ? & - key <AE08> { [ 8, asterisk ] }; // 8 * - key <AE09> { [ 9, parenleft ] }; // 9 ( - key <AE10> { [ 0, parenright, 0x10000b0 ] }; // 0 ) ° - key <AE11> { [ 0x1000493, 0x1000492, minus, underscore ] }; // ғ Ғ - _ - key <AE12> { [ 0x10004ef, 0x10004ee, equal, plus ] }; // ӯ Ӯ = + - key <BKSL> { [ backslash, slash ] }; // \ / - key <LSGT> { [ slash, bar ] }; // / | - key <TLDE> { [ Cyrillic_io, Cyrillic_IO ] }; // ё Ё + key <AB01> { [ Cyrillic_ya, Cyrillic_YA ] }; // я Я + key <AB02> { [ Cyrillic_che, Cyrillic_CHE ] }; // ч Ч + key <AB03> { [ Cyrillic_es, Cyrillic_ES ] }; // с С + key <AB04> { [ Cyrillic_em, Cyrillic_EM ] }; // м М + key <AB05> { [ Cyrillic_i, Cyrillic_I ] }; // и И + key <AB06> { [ Cyrillic_te, Cyrillic_TE ] }; // т Т + key <AB07> { [ 0x10004e3, 0x10004e2 ] }; // ӣ Ӣ + key <AB08> { [ Cyrillic_be, Cyrillic_BE ] }; // б Б + key <AB09> { [ Cyrillic_yu, Cyrillic_YU ] }; // ю Ю + key <AB10> { [ period, comma ] }; // . , + key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] }; // ф Ф + key <AC02> { [ 0x10004b7, 0x10004b6 ] }; // ҷ Ҷ + key <AC03> { [ Cyrillic_ve, Cyrillic_VE ] }; // в В + key <AC04> { [ Cyrillic_a, Cyrillic_A ] }; // а А + key <AC05> { [ Cyrillic_pe, Cyrillic_PE ] }; // п П + key <AC06> { [ Cyrillic_er, Cyrillic_ER ] }; // р Р + key <AC07> { [ Cyrillic_o, Cyrillic_O ] }; // о О + key <AC08> { [ Cyrillic_el, Cyrillic_EL ] }; // л Л + key <AC09> { [ Cyrillic_de, Cyrillic_DE ] }; // д Д + key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; // ж Ж + key <AC11> { [ Cyrillic_e, Cyrillic_E ] }; // э Э + key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI ] }; // й Й + key <AD02> { [ 0x100049b, 0x100049a ] }; // қ Қ + key <AD03> { [ Cyrillic_u, Cyrillic_U ] }; // у У + key <AD04> { [ Cyrillic_ka, Cyrillic_KA ] }; // к К + key <AD05> { [ Cyrillic_ie, Cyrillic_IE ] }; // е Е + key <AD06> { [ Cyrillic_en, Cyrillic_EN ] }; // н Н + key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE ] }; // г Г + key <AD08> { [ Cyrillic_sha, Cyrillic_SHA ] }; // ш Ш + key <AD09> { [ 0x10004b3, 0x10004b2 ] }; // ҳ Ҳ + key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] }; // з З + key <AD11> { [ Cyrillic_ha, Cyrillic_HA ] }; // х Х + key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN ] }; // ъ Ъ + key <AE01> { [ 1, exclam, 0x10000a7 ] }; // 1 ! § + key <AE02> { [ 2, quotedbl, 0x10000ab, 0x10000bb ] }; // 2 " « » + key <AE03> { [ 3, numerosign ] }; // 3 № + key <AE04> { [ 4, semicolon ] }; // 4 ; + key <AE05> { [ 5, percent ] }; // 5 % + key <AE06> { [ 6, colon, 0x1002013 ] }; // 6 : – + key <AE07> { [ 7, question, ampersand ] }; // 7 ? & + key <AE08> { [ 8, asterisk ] }; // 8 * + key <AE09> { [ 9, parenleft ] }; // 9 ( + key <AE10> { [ 0, parenright, 0x10000b0 ] }; // 0 ) ° + key <AE11> { [ 0x1000493, 0x1000492, minus, underscore ] }; // ғ Ғ - _ + key <AE12> { [ 0x10004ef, 0x10004ee, equal, plus ] }; // ӯ Ӯ = + + key <BKSL> { [ backslash, slash ] }; // \ / + key <LSGT> { [ slash, bar ] }; // / | + key <TLDE> { [ Cyrillic_io, Cyrillic_IO ] }; // ё Ё }; // -------------------------------------------------------------------- @@ -85,52 +85,52 @@ xkb_symbols "legacy" include "kpdl(comma)" include "level3(ralt_switch)" - key <AB01> { [ Cyrillic_ya, Cyrillic_YA ] }; // я Я - key <AB02> { [ Cyrillic_che, Cyrillic_CHE, 0x10004b7, 0x10004b6 ] }; // ч Ч ҷ Ҷ - key <AB03> { [ Cyrillic_es, Cyrillic_ES ] }; // с С - key <AB04> { [ Cyrillic_em, Cyrillic_EM ] }; // м М - key <AB05> { [ Cyrillic_i, Cyrillic_I, 0x10004e3, 0x10004e2 ] }; // и И ӣ Ӣ - key <AB06> { [ Cyrillic_te, Cyrillic_TE ] }; // т Т - key <AB07> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN ] }; // ь Ь - key <AB08> { [ Cyrillic_be, Cyrillic_BE ] }; // б Б - key <AB09> { [ Cyrillic_yu, Cyrillic_YU ] }; // ю Ю - key <AB10> { [ period, comma ] }; // . , - key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] }; // ф Ф - key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU ] }; // ы Ы - key <AC03> { [ Cyrillic_ve, Cyrillic_VE ] }; // в В - key <AC04> { [ Cyrillic_a, Cyrillic_A ] }; // а А - key <AC05> { [ Cyrillic_pe, Cyrillic_PE ] }; // п П - key <AC06> { [ Cyrillic_er, Cyrillic_ER ] }; // р Р - key <AC07> { [ Cyrillic_o, Cyrillic_O ] }; // о О - key <AC08> { [ Cyrillic_el, Cyrillic_EL ] }; // л Л - key <AC09> { [ Cyrillic_de, Cyrillic_DE ] }; // д Д - key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; // ж Ж - key <AC11> { [ Cyrillic_e, Cyrillic_E ] }; // э Э - key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI ] }; // й Й - key <AD02> { [ Cyrillic_tse, Cyrillic_TSE ] }; // ц Ц - key <AD03> { [ Cyrillic_u, Cyrillic_U, 0x10004ef, 0x10004ee ] }; // у У ӯ Ӯ - key <AD04> { [ Cyrillic_ka, Cyrillic_KA, 0x100049b, 0x100049a ] }; // к К қ Қ - key <AD05> { [ Cyrillic_ie, Cyrillic_IE ] }; // е Е - key <AD06> { [ Cyrillic_en, Cyrillic_EN ] }; // н Н - key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE, 0x1000493, 0x1000492 ] }; // г Г ғ Ғ - key <AD08> { [ Cyrillic_sha, Cyrillic_SHA ] }; // ш Ш - key <AD09> { [ Cyrillic_shcha, Cyrillic_SHCHA ] }; // щ Щ - key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] }; // з З - key <AD11> { [ Cyrillic_ha, Cyrillic_HA, 0x10004b3, 0x10004b2 ] }; // х Х ҳ Ҳ - key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN ] }; // ъ Ъ - key <AE01> { [ 1, exclam, 0x10000a7 ] }; // 1 ! § - key <AE02> { [ 2, quotedbl, 0x10000ab, 0x10000bb ] }; // 2 " « » - key <AE03> { [ 3, numerosign ] }; // 3 № - key <AE04> { [ 4, semicolon ] }; // 4 ; - key <AE05> { [ 5, percent ] }; // 5 % - key <AE06> { [ 6, colon, 0x1002013 ] }; // 6 : – - key <AE07> { [ 7, question, ampersand ] }; // 7 ? & - key <AE08> { [ 8, asterisk ] }; // 8 * - key <AE09> { [ 9, parenleft ] }; // 9 ( - key <AE10> { [ 0, parenright ] }; // 0 ) - key <AE11> { [ minus, underscore ] }; // - _ - key <AE12> { [ equal, plus ] }; // = + - key <BKSL> { [ backslash, slash ] }; // \ / - key <LSGT> { [ slash, bar ] }; // / | - key <TLDE> { [ Cyrillic_io, Cyrillic_IO ] }; // ё Ё + key <AB01> { [ Cyrillic_ya, Cyrillic_YA ] }; // я Я + key <AB02> { [ Cyrillic_che, Cyrillic_CHE, 0x10004b7, 0x10004b6 ] }; // ч Ч ҷ Ҷ + key <AB03> { [ Cyrillic_es, Cyrillic_ES ] }; // с С + key <AB04> { [ Cyrillic_em, Cyrillic_EM ] }; // м М + key <AB05> { [ Cyrillic_i, Cyrillic_I, 0x10004e3, 0x10004e2 ] }; // и И ӣ Ӣ + key <AB06> { [ Cyrillic_te, Cyrillic_TE ] }; // т Т + key <AB07> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN ] }; // ь Ь + key <AB08> { [ Cyrillic_be, Cyrillic_BE ] }; // б Б + key <AB09> { [ Cyrillic_yu, Cyrillic_YU ] }; // ю Ю + key <AB10> { [ period, comma ] }; // . , + key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] }; // ф Ф + key <AC02> { [ Cyrillic_yeru, Cyrillic_YERU ] }; // ы Ы + key <AC03> { [ Cyrillic_ve, Cyrillic_VE ] }; // в В + key <AC04> { [ Cyrillic_a, Cyrillic_A ] }; // а А + key <AC05> { [ Cyrillic_pe, Cyrillic_PE ] }; // п П + key <AC06> { [ Cyrillic_er, Cyrillic_ER ] }; // р Р + key <AC07> { [ Cyrillic_o, Cyrillic_O ] }; // о О + key <AC08> { [ Cyrillic_el, Cyrillic_EL ] }; // л Л + key <AC09> { [ Cyrillic_de, Cyrillic_DE ] }; // д Д + key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; // ж Ж + key <AC11> { [ Cyrillic_e, Cyrillic_E ] }; // э Э + key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI ] }; // й Й + key <AD02> { [ Cyrillic_tse, Cyrillic_TSE ] }; // ц Ц + key <AD03> { [ Cyrillic_u, Cyrillic_U, 0x10004ef, 0x10004ee ] }; // у У ӯ Ӯ + key <AD04> { [ Cyrillic_ka, Cyrillic_KA, 0x100049b, 0x100049a ] }; // к К қ Қ + key <AD05> { [ Cyrillic_ie, Cyrillic_IE ] }; // е Е + key <AD06> { [ Cyrillic_en, Cyrillic_EN ] }; // н Н + key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE, 0x1000493, 0x1000492 ] }; // г Г ғ Ғ + key <AD08> { [ Cyrillic_sha, Cyrillic_SHA ] }; // ш Ш + key <AD09> { [ Cyrillic_shcha, Cyrillic_SHCHA ] }; // щ Щ + key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] }; // з З + key <AD11> { [ Cyrillic_ha, Cyrillic_HA, 0x10004b3, 0x10004b2 ] }; // х Х ҳ Ҳ + key <AD12> { [ Cyrillic_hardsign, Cyrillic_HARDSIGN ] }; // ъ Ъ + key <AE01> { [ 1, exclam, 0x10000a7 ] }; // 1 ! § + key <AE02> { [ 2, quotedbl, 0x10000ab, 0x10000bb ] }; // 2 " « » + key <AE03> { [ 3, numerosign ] }; // 3 № + key <AE04> { [ 4, semicolon ] }; // 4 ; + key <AE05> { [ 5, percent ] }; // 5 % + key <AE06> { [ 6, colon, 0x1002013 ] }; // 6 : – + key <AE07> { [ 7, question, ampersand ] }; // 7 ? & + key <AE08> { [ 8, asterisk ] }; // 8 * + key <AE09> { [ 9, parenleft ] }; // 9 ( + key <AE10> { [ 0, parenright ] }; // 0 ) + key <AE11> { [ minus, underscore ] }; // - _ + key <AE12> { [ equal, plus ] }; // = + + key <BKSL> { [ backslash, slash ] }; // \ / + key <LSGT> { [ slash, bar ] }; // / | + key <TLDE> { [ Cyrillic_io, Cyrillic_IO ] }; // ё Ё }; diff --git a/xorg-server/xkeyboard-config/symbols/tm b/xorg-server/xkeyboard-config/symbols/tm index 8d84f9a85..e861b35c3 100644 --- a/xorg-server/xkeyboard-config/symbols/tm +++ b/xorg-server/xkeyboard-config/symbols/tm @@ -4,7 +4,7 @@ default partial xkb_symbols "basic" { name[Group1]="Turkmen"; - + include "us" key <TLDE> { [ zcaron, Zcaron, grave, asciitilde ] }; diff --git a/xorg-server/xkeyboard-config/symbols/ua b/xorg-server/xkeyboard-config/symbols/ua index e286f4835..9aea09e05 100644 --- a/xorg-server/xkeyboard-config/symbols/ua +++ b/xorg-server/xkeyboard-config/symbols/ua @@ -8,7 +8,7 @@ default partial alphanumeric_keys xkb_symbols "unicode" { include "ua(winkeys)" - + name[Group1]= "Ukrainian"; key <TLDE> { [ U2019, apostrophe, U0301, asciitilde ] }; // Apostrophe and Stress symbol @@ -43,7 +43,7 @@ xkb_symbols "unicode" { include "level3(ralt_switch)" }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "legacy" { name[Group1]= "Ukrainian (legacy)"; @@ -105,7 +105,7 @@ xkb_symbols "legacy" { partial alphanumeric_keys xkb_symbols "winkeys" { include "ua(legacy)" - + name[Group1]= "Ukrainian (WinKeys)"; key <AE03> { [ 3, numerosign ] }; @@ -149,7 +149,7 @@ xkb_symbols "typewriter" { partial alphanumeric_keys xkb_symbols "phonetic" { include "ua(legacy)" - + name[Group1]= "Ukrainian (phonetic)"; key <LatQ> { [ Cyrillic_ya, Cyrillic_YA ] }; diff --git a/xorg-server/xkeyboard-config/symbols/us b/xorg-server/xkeyboard-config/symbols/us index 0eff07539..4948a6345 100644 --- a/xorg-server/xkeyboard-config/symbols/us +++ b/xorg-server/xkeyboard-config/symbols/us @@ -425,7 +425,7 @@ xkb_symbols "dvorak-l" { partial alphanumeric_keys xkb_symbols "dvorak-r" { - + include "us(dvorak)" name[Group1]= "English (right handed Dvorak)"; @@ -726,7 +726,7 @@ xkb_symbols "mac" { include "level3(ralt_switch)" }; - + // Colemak symbols for xkb on X.Org Server 7.x // 2006-01-01 Shai Coleman, http://colemak.com/ @@ -894,11 +894,11 @@ xkb_symbols "classmate-intl" { oslash, Ooblique ] }; key <KPAD> { [ KP_Add, KP_Add, paragraph, degree ] }; - + key <KP0> { [ KP_Insert, KP_0, mu, mu ] }; key <KPDL> { [ KP_Delete, KP_Decimal, - dead_abovedot, dead_caron ] }; + dead_abovedot, dead_caron ] }; key <KPDV> { [ KP_Divide, KP_Divide, questiondown, dead_hook ] }; @@ -927,9 +927,9 @@ xkb_symbols "classmate-alt-intl" { key <KPAD> { [ KP_Add, KP_Add, dead_ogonek, dead_diaeresis ] }; - + key <KPDL> { [ KP_Delete, KP_Decimal, - dead_abovedot, dead_circumflex ] }; + dead_abovedot, dead_circumflex ] }; key <KPDV> { [ KP_Divide, KP_Divide, dead_hook, dead_hook ] }; @@ -975,11 +975,11 @@ xkb_symbols "classmate-altgr-intl" { oslash, Ooblique ] }; key <KPAD> { [ KP_Add, KP_Add, paragraph, degree ] }; - + key <KP0> { [ KP_Insert, KP_0, mu, mu ] }; key <KPDL> { [ KP_Delete, KP_Decimal, - dead_abovedot, dead_caron ] }; + dead_abovedot, dead_caron ] }; key <KPDV> { [ KP_Divide, KP_Divide, questiondown, dead_hook ] }; @@ -1399,7 +1399,7 @@ xkb_symbols "cz_sk_de" { key <AE10> { [ 0, parenright, eacute, Eacute ] }; key <AE11> { [minus, underscore, ssharp, 0x1001E9E ] }; key <AE12> { [equal, plus, dead_acute, dead_caron ] }; - + key <AD03> { [ e, E, EuroSign, Eacute ] }; key <AD11> { [bracketleft, braceleft, udiaeresis, Udiaeresis ] }; @@ -1514,7 +1514,7 @@ xkb_symbols "alt-intl-unicode" { }; -partial alphanumeric_keys +partial alphanumeric_keys xkb_symbols "ats" { include "us" @@ -1551,19 +1551,19 @@ xkb_symbols "crd" { name[Group1]= "Coeur d'Alene Salish"; - key <AD02> { [ w, W, U02B7, U02B7 ] }; - key <AE07> { [ 7, ampersand, U0294 ] }; - key <AD01> { [ q, Q, U221A ] }; - key <AB04> { [ v, V, U0259 ] }; - key <BKSL> { [ backslash, bar, U026B ] }; - key <AD03> { [ e, E, U025B ] }; - key <AD08> { [ i, I, U026A ] }; - key <AC07> { [ j, J, U01F0 ] }; - key <AE06> { [ 6, asciicircum, U0295 ] }; - key <AC02> { [ s, S, U0161 ] }; - key <AB03> { [ c, C, U010D ] }; - key <AD09> { [ o, O, U0254 ] }; - key <AB09> { [ period, greater, U0323 ] }; + key <AD02> { [ w, W, U02B7, U02B7 ] }; + key <AE07> { [ 7, ampersand, U0294 ] }; + key <AD01> { [ q, Q, U221A ] }; + key <AB04> { [ v, V, U0259 ] }; + key <BKSL> { [ backslash, bar, U026B ] }; + key <AD03> { [ e, E, U025B ] }; + key <AD08> { [ i, I, U026A ] }; + key <AC07> { [ j, J, U01F0 ] }; + key <AE06> { [ 6, asciicircum, U0295 ] }; + key <AC02> { [ s, S, U0161 ] }; + key <AB03> { [ c, C, U010D ] }; + key <AD09> { [ o, O, U0254 ] }; + key <AB09> { [ period, greater, U0323 ] }; include "level3(ralt_switch)" include "compose(rctrl)" diff --git a/xorg-server/xkeyboard-config/symbols/uz b/xorg-server/xkeyboard-config/symbols/uz index e88741b73..d76e3c9b9 100644 --- a/xorg-server/xkeyboard-config/symbols/uz +++ b/xorg-server/xkeyboard-config/symbols/uz @@ -6,17 +6,17 @@ // // Jun 2, 2003. Mashrab Kuvatov <kmashrab@uni-bremen.de> // -// Created based on Russian standard keyboard. AEN <aen@logic.ru> -// The following symbols of Russian standard keyboard were replaced: +// Created based on the Russian standard keyboard. AEN <aen@logic.ru> +// The following symbols of the Russian standard keyboard were replaced: // minus (key <AE11>) with Byelorussian_shortu (U045e), -// equal (key <AE12>) with Cyrillic_ka_descender (U049b) -// Cyrillic_ha (key <AD11>) with Cyrillic_ghe_bar (U0493) -// Cyrillic_hardsign (key <AD12>) with Cyrillic_ha_descender (U04b3) -// The following symbols of Russian standard keyboard were moved: -// Cyrillic_ze to key <AC02> (english 's'), -// Cyrillic_sha to key <AD08> (english 'i'), -// Cyrillic_ha to key <AD09> (english 'o'), -// Cyrillic_hardsign to key <AD10> (english 'p'). +// equal (key <AE12>) with Cyrillic_ka_descender (U049b), +// Cyrillic_ha (key <AD11>) with Cyrillic_ghe_bar (U0493), +// Cyrillic_hardsign (key <AD12>) with Cyrillic_ha_descender (U04b3). +// The following symbols of the Russian standard keyboard were moved: +// Cyrillic_ze to key <AC02> (English 's'), +// Cyrillic_sha to key <AD08> (English 'i'), +// Cyrillic_ha to key <AD09> (English 'o'), +// Cyrillic_hardsign to key <AD10> (English 'p'). // // Feb 25, 2007. Mashrab Kuvatov <kmashrab@uni-bremen.de> // @@ -28,62 +28,61 @@ // Latin variant is somewhat experimental, since there is no // official standard for it. It is a copy of "us" layout, where // apostrophe is replaced with U02BB. -// default partial alphanumeric_keys xkb_symbols "cyrillic" { name[Group1]= "Uzbek"; - key <AE01> { [ 1, exclam ] }; - key <AE02> { [ 2, quotedbl ] }; - key <AE03> { [ 3, numerosign ] }; - key <AE04> { [ 4, semicolon ] }; - key <AE05> { [ 5, percent ] }; + key <AE01> { [ 1, exclam ] }; + key <AE02> { [ 2, quotedbl ] }; + key <AE03> { [ 3, numerosign ] }; + key <AE04> { [ 4, semicolon ] }; + key <AE05> { [ 5, percent ] }; key <AE06> { [ 6, colon ] }; key <AE07> { [ 7, question ] }; key <AE08> { [ 8, asterisk ] }; key <AE09> { [ 9, parenleft ] }; key <AE10> { [ 0, parenright ] }; - key <BKSL> { [ backslash, bar ] }; + key <BKSL> { [ backslash, bar ] }; key <AB10> { [ period, comma ] }; - key <LSGT> { [ slash, bar ] }; + key <LSGT> { [ slash, bar ] }; key.type[group1]="ALPHABETIC"; - key <AE11> { [Cyrillic_ghe_bar, Cyrillic_GHE_bar ] }; + key <AE11> { [Cyrillic_ghe_bar, Cyrillic_GHE_bar ] }; key <AE12> { [Cyrillic_ha_descender, Cyrillic_HA_descender ] }; key <TLDE> { [ Cyrillic_io, Cyrillic_IO ] }; key <AD01> { [ Cyrillic_shorti, Cyrillic_SHORTI ] }; key <AD02> { [ Cyrillic_tse, Cyrillic_TSE ] }; - key <AD03> { [ Cyrillic_u, Cyrillic_U ] }; + key <AD03> { [ Cyrillic_u, Cyrillic_U ] }; key <AD04> { [ Cyrillic_ka, Cyrillic_KA ] }; key <AD05> { [ Cyrillic_ie, Cyrillic_IE ] }; key <AD06> { [ Cyrillic_en, Cyrillic_EN ] }; key <AD07> { [ Cyrillic_ghe, Cyrillic_GHE ] }; key <AD08> { [ Cyrillic_sha, Cyrillic_SHA ] }; key <AD09> { [ Byelorussian_shortu, Byelorussian_SHORTU ] }; - key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] }; - key <AD11> { [ Cyrillic_ha, Cyrillic_HA ] }; - key <AD12> { [Cyrillic_hardsign,Cyrillic_HARDSIGN ] }; + key <AD10> { [ Cyrillic_ze, Cyrillic_ZE ] }; + key <AD11> { [ Cyrillic_ha, Cyrillic_HA ] }; + key <AD12> { [Cyrillic_hardsign, Cyrillic_HARDSIGN ] }; key <AC01> { [ Cyrillic_ef, Cyrillic_EF ] }; key <AC02> { [Cyrillic_ka_descender, Cyrillic_KA_descender ] }; key <AC03> { [ Cyrillic_ve, Cyrillic_VE ] }; - key <AC04> { [ Cyrillic_a, Cyrillic_A ] }; + key <AC04> { [ Cyrillic_a, Cyrillic_A ] }; key <AC05> { [ Cyrillic_pe, Cyrillic_PE ] }; key <AC06> { [ Cyrillic_er, Cyrillic_ER ] }; - key <AC07> { [ Cyrillic_o, Cyrillic_O ] }; + key <AC07> { [ Cyrillic_o, Cyrillic_O ] }; key <AC08> { [ Cyrillic_el, Cyrillic_EL ] }; key <AC09> { [ Cyrillic_de, Cyrillic_DE ] }; key <AC10> { [ Cyrillic_zhe, Cyrillic_ZHE ] }; - key <AC11> { [ Cyrillic_e, Cyrillic_E ] }; + key <AC11> { [ Cyrillic_e, Cyrillic_E ] }; key <AB01> { [ Cyrillic_ya, Cyrillic_YA ] }; key <AB02> { [ Cyrillic_che, Cyrillic_CHE ] }; key <AB03> { [ Cyrillic_es, Cyrillic_ES ] }; key <AB04> { [ Cyrillic_em, Cyrillic_EM ] }; key <AB06> { [ Cyrillic_te, Cyrillic_TE ] }; - key <AB05> { [ Cyrillic_i, Cyrillic_I ] }; - key <AB07> { [Cyrillic_softsign,Cyrillic_SOFTSIGN ] }; + key <AB05> { [ Cyrillic_i, Cyrillic_I ] }; + key <AB07> { [Cyrillic_softsign, Cyrillic_SOFTSIGN ] }; key <AB08> { [ Cyrillic_be, Cyrillic_BE ] }; key <AB09> { [ Cyrillic_yu, Cyrillic_YU ] }; }; diff --git a/xorg-server/xkeyboard-config/symbols/za b/xorg-server/xkeyboard-config/symbols/za index 75f6d9a27..aba979196 100644 --- a/xorg-server/xkeyboard-config/symbols/za +++ b/xorg-server/xkeyboard-config/symbols/za @@ -1,42 +1,42 @@ -// based on the Latvian and GB keyboard maps +// Based on the Latvian and GB keyboard maps. default partial alphanumeric_keys modifier_keys xkb_symbols "basic" { - // Describes the differences between an en_US - // keyboard and a South African layout with - // dead keys. By Dwayne Bailey (dwayne@translate.org.za) + // Describes the differences between an en_US layout + // and a South African layout with dead keys. + // By Dwayne Bailey (dwayne@translate.org.za). include "latin" name[Group1]="English (South Africa)"; - key <TLDE> { [ grave, asciitilde, dead_grave ] }; - key <AE02> { [ 2, at, yen ] }; - key <AE03> { [ 3, numbersign, sterling ] }; - key <AE04> { [ 4, dollar, dollar ] }; - key <AE05> { [ 5, percent, EuroSign ] }; - key <AE06> { [ 6, asciicircum, dead_circumflex ] }; - - key <AD03> { [ e, E, ediaeresis, Ediaeresis ] }; - key <AD04> { [ r, R, ecircumflex, Ecircumflex ] }; - key <AD05> { [ t, T, U1e71, U1e70 ] }; - key <AD06> { [ y, Y, ucircumflex, Ucircumflex ] }; - key <AD07> { [ u, U, udiaeresis, Udiaeresis ] }; - key <AD08> { [ i, I, idiaeresis, Idiaeresis ] }; - key <AD09> { [ o, O, odiaeresis, Odiaeresis ] }; - key <AD10> { [ p, P, ocircumflex, Ocircumflex ] }; - - key <AC01> { [ a, A, adiaeresis, Adiaeresis ] }; - key <AC02> { [ s, S, scaron, Scaron ] }; - key <AC03> { [ d, D, U1e13, U1e12 ] }; - key <AC09> { [ l, L, U1e3d, U1e3c ] }; - key <AC10> { [ semicolon, colon, dead_diaeresis ] }; - key <AC11> { [apostrophe, quotedbl, dead_acute ] }; - - key <AB06> { [ n, N, U1e4b, U1e4a ] }; - key <AB07> { [ m, M, U1e45, U1e44 ] }; - key <AB09> { [ period, greater, dead_abovedot ] }; + key <TLDE> { [ grave, asciitilde, dead_grave ] }; + key <AE02> { [ 2, at, yen ] }; + key <AE03> { [ 3, numbersign, sterling ] }; + key <AE04> { [ 4, dollar, dollar ] }; + key <AE05> { [ 5, percent, EuroSign ] }; + key <AE06> { [ 6,asciicircum, dead_circumflex ] }; + + key <AD03> { [ e, E, ediaeresis, Ediaeresis ] }; + key <AD04> { [ r, R, ecircumflex, Ecircumflex ] }; + key <AD05> { [ t, T, U1e71, U1e70 ] }; + key <AD06> { [ y, Y, ucircumflex, Ucircumflex ] }; + key <AD07> { [ u, U, udiaeresis, Udiaeresis ] }; + key <AD08> { [ i, I, idiaeresis, Idiaeresis ] }; + key <AD09> { [ o, O, odiaeresis, Odiaeresis ] }; + key <AD10> { [ p, P, ocircumflex, Ocircumflex ] }; + + key <AC01> { [ a, A, adiaeresis, Adiaeresis ] }; + key <AC02> { [ s, S, scaron, Scaron ] }; + key <AC03> { [ d, D, U1e13, U1e12 ] }; + key <AC09> { [ l, L, U1e3d, U1e3c ] }; + key <AC10> { [ semicolon, colon, dead_diaeresis ] }; + key <AC11> { [apostrophe, quotedbl, dead_acute ] }; + + key <AB06> { [ n, N, U1e4b, U1e4a ] }; + key <AB07> { [ m, M, U1e45, U1e44 ] }; + key <AB09> { [ period, greater, dead_abovedot ] }; include "level3(ralt_switch)" }; |