diff --git a/nx-X11/extras/Mesa b/nx-X11/extras/Mesa index e5e99cbbe9..09d2454045 120000 --- a/nx-X11/extras/Mesa +++ b/nx-X11/extras/Mesa @@ -1 +1 @@ -Mesa_6.4.2 \ No newline at end of file +Mesa_7.2 \ No newline at end of file diff --git a/nx-X11/extras/Mesa.patches b/nx-X11/extras/Mesa.patches index e62962bff3..eb7decb2c2 120000 --- a/nx-X11/extras/Mesa.patches +++ b/nx-X11/extras/Mesa.patches @@ -1 +1 @@ -Mesa.patches_6.4.2 \ No newline at end of file +Mesa.patches_7.2 \ No newline at end of file diff --git a/nx-X11/extras/Mesa.patches_6.5/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch b/nx-X11/extras/Mesa.patches_6.5/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch new file mode 100644 index 0000000000..c73be36437 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.5/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch @@ -0,0 +1,54 @@ +From 44518d07398d663448d79e4f546736b40752630c Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller +Date: Wed, 16 Mar 2016 14:40:08 +0100 +Subject: [PATCH] Fix non-working GLX in 64bit Xorg 7.0 + +Found the needed patch in debian bugtracker at +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364233 +--- + src/glx/x11/indirect_vertex_array.c | 2 +- + src/mesa/drivers/dri/common/glcontextmodes.c | 3 +++ + src/mesa/main/glheader.h | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +Index: Mesa/src/glx/x11/indirect_vertex_array.c +=================================================================== +--- Mesa.orig/src/glx/x11/indirect_vertex_array.c ++++ Mesa/src/glx/x11/indirect_vertex_array.c +@@ -530,7 +530,7 @@ static GLubyte * + emit_DrawArrays_header_old( __GLXcontext * gc, + struct array_state_vector * arrays, + size_t * elements_per_request, +- size_t * total_requests, ++ unsigned int * total_requests, + GLenum mode, GLsizei count ) + { + size_t command_size; +Index: Mesa/src/mesa/main/glheader.h +=================================================================== +--- Mesa.orig/src/mesa/main/glheader.h ++++ Mesa/src/mesa/main/glheader.h +@@ -46,6 +46,9 @@ + #ifndef GLHEADER_H + #define GLHEADER_H + ++#ifdef HAVE_DIX_CONFIG_H ++#include "dix-config.h" ++#endif + + #if defined(XFree86LOADER) && defined(IN_MODULE) + #include "xf86_ansic.h" +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -39,6 +39,9 @@ + # include "imports.h" + # define __glXMemset memset + #else ++# if defined (HAVE_DIX_CONFIG_H) ++# include ++# endif + # include + # include + # include "GL/glxint.h" diff --git a/nx-X11/extras/Mesa.patches_6.5/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_6.5/4002_no-special-glx-memfunctions.patch new file mode 100644 index 0000000000..e2e5aa0f79 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.5/4002_no-special-glx-memfunctions.patch @@ -0,0 +1,26 @@ +Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly) +Author: Mike Gabriel + +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -49,14 +49,14 @@ + # ifdef XFree86Server + # include + # include +-# define _mesa_malloc(b) xalloc(b) +-# define _mesa_free(m) xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # define _mesa_memset memset + # else + # include + # define _mesa_memset memset +-# define _mesa_malloc(b) Xmalloc(b) +-# define _mesa_free(m) Xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # endif /* XFree86Server */ + #endif /* !defined(IN_MINI_GLX) */ + diff --git a/nx-X11/extras/Mesa.patches_6.5/4003_CreatePixmap-AllocationHints.patch b/nx-X11/extras/Mesa.patches_6.5/4003_CreatePixmap-AllocationHints.patch new file mode 100644 index 0000000000..f2caf28123 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.5/4003_CreatePixmap-AllocationHints.patch @@ -0,0 +1,13 @@ +Index: Mesa/include/GL/xmesa_xf86.h +=================================================================== +--- Mesa.orig/include/GL/xmesa_xf86.h ++++ Mesa/include/GL/xmesa_xf86.h +@@ -130,7 +130,7 @@ do { \ + + /* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ + #define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ +- (*__d->CreatePixmap)(__d, __w, __h, __depth) ++ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) + + #define XMesaFreePixmap(__d,__b) \ + (*__d->DestroyPixmap)(__b) diff --git a/nx-X11/extras/Mesa.patches_6.5/4004_define-USE_IEEE-macro-for-more-platforms.patch b/nx-X11/extras/Mesa.patches_6.5/4004_define-USE_IEEE-macro-for-more-platforms.patch new file mode 100644 index 0000000000..dff1599763 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.5/4004_define-USE_IEEE-macro-for-more-platforms.patch @@ -0,0 +1,16 @@ +Author: Mike Gabriel +Description: define USE_IEEE for __aarch64__ and __mc68000__, as well + +Index: Mesa/src/mesa/main/imports.h +=================================================================== +--- Mesa.orig/src/mesa/main/imports.h ++++ Mesa/src/mesa/main/imports.h +@@ -205,6 +205,8 @@ typedef union { GLfloat f; GLint i; } fi + defined(__hppa__) || defined(hpux) || \ + defined(__mips) || defined(_MIPS_ARCH) || \ + defined(__arm__) || \ ++ defined(__aarch64__) || \ ++ defined(__mc68000__) || \ + defined(__sh__) || \ + (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) + #define USE_IEEE diff --git a/nx-X11/extras/Mesa.patches_6.5/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch b/nx-X11/extras/Mesa.patches_6.5/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch new file mode 100644 index 0000000000..e371aa7245 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.5/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch @@ -0,0 +1,68 @@ +Description: Assure that headers from libNX_X11 are always included from ${INCDIR}/nx-X11/. +Author: Mike Gabriel + +Index: Mesa/include/GL/xmesa.h +=================================================================== +--- Mesa.orig/include/GL/xmesa.h ++++ Mesa/include/GL/xmesa.h +@@ -75,8 +75,8 @@ extern "C" { + #ifdef XFree86Server + #include "xmesa_xf86.h" + #else +-#include +-#include ++#include ++#include + #include "xmesa_x.h" + #endif + #include "GL/gl.h" +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -42,7 +42,7 @@ + # if defined(HAVE_DIX_CONFIG_H) + # include + # endif +-# include ++# include + # include + # include "GL/glxint.h" + +@@ -53,7 +53,7 @@ + # define _mesa_free(m) free(m) + # define _mesa_memset memset + # else +-# include ++# include + # define _mesa_memset memset + # define _mesa_malloc(b) malloc(b) + # define _mesa_free(m) free(m) +Index: Mesa/src/mesa/drivers/x11/glxheader.h +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/glxheader.h ++++ Mesa/src/mesa/drivers/x11/glxheader.h +@@ -43,8 +43,8 @@ + + #else + +-# include +-# include ++# include ++# include + # ifdef USE_XSHM /* was SHM */ + # include + # include +Index: Mesa/src/mesa/glapi/glthread.h +=================================================================== +--- Mesa.orig/src/mesa/glapi/glthread.h ++++ Mesa/src/mesa/glapi/glthread.h +@@ -180,7 +180,7 @@ typedef CRITICAL_SECTION _glthread_Mutex + * We wrap it again for GL. + */ + #ifdef USE_XTHREADS +-#include ++#include + + typedef struct { + xthread_key_t key; diff --git a/nx-X11/extras/Mesa.patches_6.5/5001_nasty-typo-fixes.patch b/nx-X11/extras/Mesa.patches_6.5/5001_nasty-typo-fixes.patch new file mode 100644 index 0000000000..b2f211997c --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.5/5001_nasty-typo-fixes.patch @@ -0,0 +1,94 @@ +Description: Some nasty typos fixed to silence lintian et al. +Author: Mike Gabriel + +Index: Mesa/src/mesa/main/debug.c +=================================================================== +--- Mesa.orig/src/mesa/main/debug.c ++++ Mesa/src/mesa/main/debug.c +@@ -43,7 +43,7 @@ const char *_mesa_prim_name[GL_POLYGON+4 + "GL_QUAD_STRIP", + "GL_POLYGON", + "outside begin/end", +- "inside unkown primitive", ++ "inside unknown primitive", + "unknown state" + }; + +Index: Mesa/src/mesa/shader/arbprogparse.c +=================================================================== +--- Mesa.orig/src/mesa/shader/arbprogparse.c ++++ Mesa/src/mesa/shader/arbprogparse.c +@@ -127,8 +127,8 @@ + * + * Cosmetic Stuff + * ----------------------------------------------------- +- * - remove any leftover unused grammer.c stuff (dict_ ?) +- * - fix grammer.c error handling so its not static ++ * - remove any leftover unused grammar.c stuff (dict_ ?) ++ * - fix grammar.c error handling so its not static + * - #ifdef around stuff pertaining to extentions + * + * Outstanding Questions: +@@ -1673,7 +1673,7 @@ + if (found) { + error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + attrib_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1864,7 +1864,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + param_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1972,7 +1972,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2023,7 +2023,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + output_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2057,7 +2057,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2106,7 +2106,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -3904,7 +3904,7 @@ + grammar_get_last_error ((GLubyte *) error_msg, 300, &error_pos); + _mesa_set_program_error (ctx, error_pos, error_msg); + _mesa_error (ctx, GL_INVALID_OPERATION, +- "glProgramString(Error loading grammer rule set)"); ++ "glProgramString(Error loading grammar rule set)"); + return GL_FALSE; + } + diff --git a/nx-X11/extras/Mesa.patches_6.5/series b/nx-X11/extras/Mesa.patches_6.5/series new file mode 100644 index 0000000000..09e99f2b54 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_6.5/series @@ -0,0 +1,6 @@ +#4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch +4002_no-special-glx-memfunctions.patch +4003_CreatePixmap-AllocationHints.patch +4004_define-USE_IEEE-macro-for-more-platforms.patch +5001_nasty-typo-fixes.patch +4005_adapt-all-libX11-include-paths-to-libNX_X11.patch diff --git a/nx-X11/extras/Mesa.patches_7.0.4/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch b/nx-X11/extras/Mesa.patches_7.0.4/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch new file mode 100644 index 0000000000..c73be36437 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0.4/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch @@ -0,0 +1,54 @@ +From 44518d07398d663448d79e4f546736b40752630c Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller +Date: Wed, 16 Mar 2016 14:40:08 +0100 +Subject: [PATCH] Fix non-working GLX in 64bit Xorg 7.0 + +Found the needed patch in debian bugtracker at +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364233 +--- + src/glx/x11/indirect_vertex_array.c | 2 +- + src/mesa/drivers/dri/common/glcontextmodes.c | 3 +++ + src/mesa/main/glheader.h | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +Index: Mesa/src/glx/x11/indirect_vertex_array.c +=================================================================== +--- Mesa.orig/src/glx/x11/indirect_vertex_array.c ++++ Mesa/src/glx/x11/indirect_vertex_array.c +@@ -530,7 +530,7 @@ static GLubyte * + emit_DrawArrays_header_old( __GLXcontext * gc, + struct array_state_vector * arrays, + size_t * elements_per_request, +- size_t * total_requests, ++ unsigned int * total_requests, + GLenum mode, GLsizei count ) + { + size_t command_size; +Index: Mesa/src/mesa/main/glheader.h +=================================================================== +--- Mesa.orig/src/mesa/main/glheader.h ++++ Mesa/src/mesa/main/glheader.h +@@ -46,6 +46,9 @@ + #ifndef GLHEADER_H + #define GLHEADER_H + ++#ifdef HAVE_DIX_CONFIG_H ++#include "dix-config.h" ++#endif + + #if defined(XFree86LOADER) && defined(IN_MODULE) + #include "xf86_ansic.h" +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -39,6 +39,9 @@ + # include "imports.h" + # define __glXMemset memset + #else ++# if defined (HAVE_DIX_CONFIG_H) ++# include ++# endif + # include + # include + # include "GL/glxint.h" diff --git a/nx-X11/extras/Mesa.patches_7.0.4/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_7.0.4/4002_no-special-glx-memfunctions.patch new file mode 100644 index 0000000000..d8ed2e28f8 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0.4/4002_no-special-glx-memfunctions.patch @@ -0,0 +1,26 @@ +Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly) +Author: Mike Gabriel + +Index: Mesa/src/glx/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -53,14 +53,14 @@ + # ifdef XFree86Server + # include + # include +-# define _mesa_malloc(b) xalloc(b) +-# define _mesa_free(m) xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # define _mesa_memset memset + # else + # include + # define _mesa_memset memset +-# define _mesa_malloc(b) Xmalloc(b) +-# define _mesa_free(m) Xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # endif /* XFree86Server */ + #endif /* !defined(IN_MINI_GLX) */ + diff --git a/nx-X11/extras/Mesa.patches_7.0.4/4003_CreatePixmap-AllocationHints.patch b/nx-X11/extras/Mesa.patches_7.0.4/4003_CreatePixmap-AllocationHints.patch new file mode 100644 index 0000000000..aeab193150 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0.4/4003_CreatePixmap-AllocationHints.patch @@ -0,0 +1,13 @@ +Index: Mesa/include/GL/xmesa_xf86.h +=================================================================== +--- Mesa.orig/include/GL/xmesa_xf86.h ++++ Mesa/include/GL/xmesa_xf86.h +@@ -142,7 +142,7 @@ do { \ + + /* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ + #define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ +- (*__d->CreatePixmap)(__d, __w, __h, __depth) ++ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) + + #define XMesaFreePixmap(__d,__b) \ + (*__d->DestroyPixmap)(__b) diff --git a/nx-X11/extras/Mesa.patches_7.0.4/4004_define-USE_IEEE-macro-for-more-platforms.patch b/nx-X11/extras/Mesa.patches_7.0.4/4004_define-USE_IEEE-macro-for-more-platforms.patch new file mode 100644 index 0000000000..dff1599763 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0.4/4004_define-USE_IEEE-macro-for-more-platforms.patch @@ -0,0 +1,16 @@ +Author: Mike Gabriel +Description: define USE_IEEE for __aarch64__ and __mc68000__, as well + +Index: Mesa/src/mesa/main/imports.h +=================================================================== +--- Mesa.orig/src/mesa/main/imports.h ++++ Mesa/src/mesa/main/imports.h +@@ -205,6 +205,8 @@ typedef union { GLfloat f; GLint i; } fi + defined(__hppa__) || defined(hpux) || \ + defined(__mips) || defined(_MIPS_ARCH) || \ + defined(__arm__) || \ ++ defined(__aarch64__) || \ ++ defined(__mc68000__) || \ + defined(__sh__) || \ + (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) + #define USE_IEEE diff --git a/nx-X11/extras/Mesa.patches_7.0.4/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch b/nx-X11/extras/Mesa.patches_7.0.4/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch new file mode 100644 index 0000000000..ff10f4a8fe --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0.4/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch @@ -0,0 +1,75 @@ +Description: Assure that headers from libNX_X11 are always included from ${INCDIR}/nx-X11/. +Author: Mike Gabriel + +Index: Mesa/include/GL/xmesa.h +=================================================================== +--- Mesa.orig/include/GL/xmesa.h ++++ Mesa/include/GL/xmesa.h +@@ -75,8 +75,8 @@ extern "C" { + #ifdef XFree86Server + #include "xmesa_xf86.h" + #else +-#include +-#include ++#include ++#include + #include "xmesa_x.h" + #endif + #include "GL/gl.h" +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -37,7 +37,7 @@ + #if defined(HAVE_DIX_CONFIG_H) + # include + #endif +-#include ++#include + #include + #include "GL/glxint.h" + #endif +@@ -57,7 +57,7 @@ + # define _mesa_free(m) free(m) + # define _mesa_memset memset + # else +-# include ++# include + # define _mesa_memset memset + # define _mesa_malloc(b) malloc(b) + # define _mesa_free(m) free(m) +Index: Mesa/src/mesa/drivers/x11/glxheader.h +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/glxheader.h ++++ Mesa/src/mesa/drivers/x11/glxheader.h +@@ -39,13 +39,13 @@ + + #else + +-# include +-# include +-# include ++# include ++# include ++# include + # ifdef USE_XSHM /* was SHM */ + # include + # include +-# include ++# include + # endif + # include + # include +Index: Mesa/src/mesa/glapi/glthread.h +=================================================================== +--- Mesa.orig/src/mesa/glapi/glthread.h ++++ Mesa/src/mesa/glapi/glthread.h +@@ -185,7 +185,7 @@ typedef CRITICAL_SECTION _glthread_Mutex; + * We wrap it again for GL. + */ + #ifdef USE_XTHREADS +-#include ++#include + + typedef struct { + xthread_key_t key; diff --git a/nx-X11/extras/Mesa.patches_7.0.4/5001_nasty-typo-fixes.patch b/nx-X11/extras/Mesa.patches_7.0.4/5001_nasty-typo-fixes.patch new file mode 100644 index 0000000000..b2f211997c --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0.4/5001_nasty-typo-fixes.patch @@ -0,0 +1,94 @@ +Description: Some nasty typos fixed to silence lintian et al. +Author: Mike Gabriel + +Index: Mesa/src/mesa/main/debug.c +=================================================================== +--- Mesa.orig/src/mesa/main/debug.c ++++ Mesa/src/mesa/main/debug.c +@@ -43,7 +43,7 @@ const char *_mesa_prim_name[GL_POLYGON+4 + "GL_QUAD_STRIP", + "GL_POLYGON", + "outside begin/end", +- "inside unkown primitive", ++ "inside unknown primitive", + "unknown state" + }; + +Index: Mesa/src/mesa/shader/arbprogparse.c +=================================================================== +--- Mesa.orig/src/mesa/shader/arbprogparse.c ++++ Mesa/src/mesa/shader/arbprogparse.c +@@ -127,8 +127,8 @@ + * + * Cosmetic Stuff + * ----------------------------------------------------- +- * - remove any leftover unused grammer.c stuff (dict_ ?) +- * - fix grammer.c error handling so its not static ++ * - remove any leftover unused grammar.c stuff (dict_ ?) ++ * - fix grammar.c error handling so its not static + * - #ifdef around stuff pertaining to extentions + * + * Outstanding Questions: +@@ -1673,7 +1673,7 @@ + if (found) { + error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + attrib_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1864,7 +1864,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + param_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1972,7 +1972,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2023,7 +2023,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + output_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2057,7 +2057,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2106,7 +2106,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -3904,7 +3904,7 @@ + grammar_get_last_error ((GLubyte *) error_msg, 300, &error_pos); + _mesa_set_program_error (ctx, error_pos, error_msg); + _mesa_error (ctx, GL_INVALID_OPERATION, +- "glProgramString(Error loading grammer rule set)"); ++ "glProgramString(Error loading grammar rule set)"); + return GL_FALSE; + } + diff --git a/nx-X11/extras/Mesa.patches_7.0.4/series b/nx-X11/extras/Mesa.patches_7.0.4/series new file mode 100644 index 0000000000..1cdc2f7966 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0.4/series @@ -0,0 +1,6 @@ +#4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch +4002_no-special-glx-memfunctions.patch +4003_CreatePixmap-AllocationHints.patch +#4004_define-USE_IEEE-macro-for-more-platforms.patch +#5001_nasty-typo-fixes.patch +4005_adapt-all-libX11-include-paths-to-libNX_X11.patch diff --git a/nx-X11/extras/Mesa.patches_7.0/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch b/nx-X11/extras/Mesa.patches_7.0/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch new file mode 100644 index 0000000000..c73be36437 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch @@ -0,0 +1,54 @@ +From 44518d07398d663448d79e4f546736b40752630c Mon Sep 17 00:00:00 2001 +From: Ulrich Sibiller +Date: Wed, 16 Mar 2016 14:40:08 +0100 +Subject: [PATCH] Fix non-working GLX in 64bit Xorg 7.0 + +Found the needed patch in debian bugtracker at +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=364233 +--- + src/glx/x11/indirect_vertex_array.c | 2 +- + src/mesa/drivers/dri/common/glcontextmodes.c | 3 +++ + src/mesa/main/glheader.h | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +Index: Mesa/src/glx/x11/indirect_vertex_array.c +=================================================================== +--- Mesa.orig/src/glx/x11/indirect_vertex_array.c ++++ Mesa/src/glx/x11/indirect_vertex_array.c +@@ -530,7 +530,7 @@ static GLubyte * + emit_DrawArrays_header_old( __GLXcontext * gc, + struct array_state_vector * arrays, + size_t * elements_per_request, +- size_t * total_requests, ++ unsigned int * total_requests, + GLenum mode, GLsizei count ) + { + size_t command_size; +Index: Mesa/src/mesa/main/glheader.h +=================================================================== +--- Mesa.orig/src/mesa/main/glheader.h ++++ Mesa/src/mesa/main/glheader.h +@@ -46,6 +46,9 @@ + #ifndef GLHEADER_H + #define GLHEADER_H + ++#ifdef HAVE_DIX_CONFIG_H ++#include "dix-config.h" ++#endif + + #if defined(XFree86LOADER) && defined(IN_MODULE) + #include "xf86_ansic.h" +Index: Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/dri/common/glcontextmodes.c ++++ Mesa/src/mesa/drivers/dri/common/glcontextmodes.c +@@ -39,6 +39,9 @@ + # include "imports.h" + # define __glXMemset memset + #else ++# if defined (HAVE_DIX_CONFIG_H) ++# include ++# endif + # include + # include + # include "GL/glxint.h" diff --git a/nx-X11/extras/Mesa.patches_7.0/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_7.0/4002_no-special-glx-memfunctions.patch new file mode 100644 index 0000000000..d8ed2e28f8 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4002_no-special-glx-memfunctions.patch @@ -0,0 +1,26 @@ +Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly) +Author: Mike Gabriel + +Index: Mesa/src/glx/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -53,14 +53,14 @@ + # ifdef XFree86Server + # include + # include +-# define _mesa_malloc(b) xalloc(b) +-# define _mesa_free(m) xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # define _mesa_memset memset + # else + # include + # define _mesa_memset memset +-# define _mesa_malloc(b) Xmalloc(b) +-# define _mesa_free(m) Xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # endif /* XFree86Server */ + #endif /* !defined(IN_MINI_GLX) */ + diff --git a/nx-X11/extras/Mesa.patches_7.0/4003_CreatePixmap-AllocationHints.patch b/nx-X11/extras/Mesa.patches_7.0/4003_CreatePixmap-AllocationHints.patch new file mode 100644 index 0000000000..aeab193150 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4003_CreatePixmap-AllocationHints.patch @@ -0,0 +1,13 @@ +Index: Mesa/include/GL/xmesa_xf86.h +=================================================================== +--- Mesa.orig/include/GL/xmesa_xf86.h ++++ Mesa/include/GL/xmesa_xf86.h +@@ -142,7 +142,7 @@ do { \ + + /* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */ + #define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \ +- (*__d->CreatePixmap)(__d, __w, __h, __depth) ++ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0) + + #define XMesaFreePixmap(__d,__b) \ + (*__d->DestroyPixmap)(__b) diff --git a/nx-X11/extras/Mesa.patches_7.0/4004_define-USE_IEEE-macro-for-more-platforms.patch b/nx-X11/extras/Mesa.patches_7.0/4004_define-USE_IEEE-macro-for-more-platforms.patch new file mode 100644 index 0000000000..dff1599763 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4004_define-USE_IEEE-macro-for-more-platforms.patch @@ -0,0 +1,16 @@ +Author: Mike Gabriel +Description: define USE_IEEE for __aarch64__ and __mc68000__, as well + +Index: Mesa/src/mesa/main/imports.h +=================================================================== +--- Mesa.orig/src/mesa/main/imports.h ++++ Mesa/src/mesa/main/imports.h +@@ -205,6 +205,8 @@ typedef union { GLfloat f; GLint i; } fi + defined(__hppa__) || defined(hpux) || \ + defined(__mips) || defined(_MIPS_ARCH) || \ + defined(__arm__) || \ ++ defined(__aarch64__) || \ ++ defined(__mc68000__) || \ + defined(__sh__) || \ + (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) + #define USE_IEEE diff --git a/nx-X11/extras/Mesa.patches_7.0/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch b/nx-X11/extras/Mesa.patches_7.0/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch new file mode 100644 index 0000000000..ff10f4a8fe --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch @@ -0,0 +1,75 @@ +Description: Assure that headers from libNX_X11 are always included from ${INCDIR}/nx-X11/. +Author: Mike Gabriel + +Index: Mesa/include/GL/xmesa.h +=================================================================== +--- Mesa.orig/include/GL/xmesa.h ++++ Mesa/include/GL/xmesa.h +@@ -75,8 +75,8 @@ extern "C" { + #ifdef XFree86Server + #include "xmesa_xf86.h" + #else +-#include +-#include ++#include ++#include + #include "xmesa_x.h" + #endif + #include "GL/gl.h" +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -37,7 +37,7 @@ + #if defined(HAVE_DIX_CONFIG_H) + # include + #endif +-#include ++#include + #include + #include "GL/glxint.h" + #endif +@@ -57,7 +57,7 @@ + # define _mesa_free(m) free(m) + # define _mesa_memset memset + # else +-# include ++# include + # define _mesa_memset memset + # define _mesa_malloc(b) malloc(b) + # define _mesa_free(m) free(m) +Index: Mesa/src/mesa/drivers/x11/glxheader.h +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/glxheader.h ++++ Mesa/src/mesa/drivers/x11/glxheader.h +@@ -39,13 +39,13 @@ + + #else + +-# include +-# include +-# include ++# include ++# include ++# include + # ifdef USE_XSHM /* was SHM */ + # include + # include +-# include ++# include + # endif + # include + # include +Index: Mesa/src/mesa/glapi/glthread.h +=================================================================== +--- Mesa.orig/src/mesa/glapi/glthread.h ++++ Mesa/src/mesa/glapi/glthread.h +@@ -185,7 +185,7 @@ typedef CRITICAL_SECTION _glthread_Mutex; + * We wrap it again for GL. + */ + #ifdef USE_XTHREADS +-#include ++#include + + typedef struct { + xthread_key_t key; diff --git a/nx-X11/extras/Mesa.patches_7.0/5001_nasty-typo-fixes.patch b/nx-X11/extras/Mesa.patches_7.0/5001_nasty-typo-fixes.patch new file mode 100644 index 0000000000..b2f211997c --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/5001_nasty-typo-fixes.patch @@ -0,0 +1,94 @@ +Description: Some nasty typos fixed to silence lintian et al. +Author: Mike Gabriel + +Index: Mesa/src/mesa/main/debug.c +=================================================================== +--- Mesa.orig/src/mesa/main/debug.c ++++ Mesa/src/mesa/main/debug.c +@@ -43,7 +43,7 @@ const char *_mesa_prim_name[GL_POLYGON+4 + "GL_QUAD_STRIP", + "GL_POLYGON", + "outside begin/end", +- "inside unkown primitive", ++ "inside unknown primitive", + "unknown state" + }; + +Index: Mesa/src/mesa/shader/arbprogparse.c +=================================================================== +--- Mesa.orig/src/mesa/shader/arbprogparse.c ++++ Mesa/src/mesa/shader/arbprogparse.c +@@ -127,8 +127,8 @@ + * + * Cosmetic Stuff + * ----------------------------------------------------- +- * - remove any leftover unused grammer.c stuff (dict_ ?) +- * - fix grammer.c error handling so its not static ++ * - remove any leftover unused grammar.c stuff (dict_ ?) ++ * - fix grammar.c error handling so its not static + * - #ifdef around stuff pertaining to extentions + * + * Outstanding Questions: +@@ -1673,7 +1673,7 @@ + if (found) { + error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) attrib_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + attrib_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1864,7 +1864,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) param_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + param_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -1972,7 +1972,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2023,7 +2023,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) output_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + output_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2057,7 +2057,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -2106,7 +2106,7 @@ + if (found) { + char *error_msg = (char *) + _mesa_malloc (_mesa_strlen ((char *) temp_var->name) + 40); +- _mesa_sprintf (error_msg, "Duplicate Varible Declaration: %s", ++ _mesa_sprintf (error_msg, "Duplicate Variable Declaration: %s", + temp_var->name); + + _mesa_set_program_error (ctx, Program->Position, error_msg); +@@ -3904,7 +3904,7 @@ + grammar_get_last_error ((GLubyte *) error_msg, 300, &error_pos); + _mesa_set_program_error (ctx, error_pos, error_msg); + _mesa_error (ctx, GL_INVALID_OPERATION, +- "glProgramString(Error loading grammer rule set)"); ++ "glProgramString(Error loading grammar rule set)"); + return GL_FALSE; + } + diff --git a/nx-X11/extras/Mesa.patches_7.0/series b/nx-X11/extras/Mesa.patches_7.0/series new file mode 100644 index 0000000000..1cdc2f7966 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.0/series @@ -0,0 +1,6 @@ +#4001_Fix-non-working-GLX-in-64bit-Xorg-7.0.patch +4002_no-special-glx-memfunctions.patch +4003_CreatePixmap-AllocationHints.patch +#4004_define-USE_IEEE-macro-for-more-platforms.patch +#5001_nasty-typo-fixes.patch +4005_adapt-all-libX11-include-paths-to-libNX_X11.patch diff --git a/nx-X11/extras/Mesa.patches_7.2/4002_no-special-glx-memfunctions.patch b/nx-X11/extras/Mesa.patches_7.2/4002_no-special-glx-memfunctions.patch new file mode 100644 index 0000000000..37d0a6fcf9 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.2/4002_no-special-glx-memfunctions.patch @@ -0,0 +1,58 @@ +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -53,14 +53,14 @@ + # ifdef XFree86Server + # include + # include +-# define _mesa_malloc(b) xalloc(b) +-# define _mesa_free(m) xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # define _mesa_memset memset + # else + # include + # define _mesa_memset memset +-# define _mesa_malloc(b) Xmalloc(b) +-# define _mesa_free(m) Xfree(m) ++# define _mesa_malloc(b) malloc(b) ++# define _mesa_free(m) free(m) + # endif /* XFree86Server */ + #endif /* !defined(IN_MINI_GLX) */ + +Index: Mesa/src/mesa/drivers/x11/xm_image.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/xm_image.c ++++ Mesa/src/mesa/drivers/x11/xm_image.c +@@ -49,7 +49,7 @@ XMesaImage *XMesaCreateImage(int bitsPer + { + XMesaImage *image; + +- image = (XMesaImage *)xalloc(sizeof(XMesaImage)); ++ image = (XMesaImage *)malloc(sizeof(XMesaImage)); + + if (image) { + image->width = width; +@@ -67,7 +67,7 @@ void XMesaDestroyImage(XMesaImage *image + { + if (image->data) + free(image->data); +- xfree(image); ++ free(image); + } + + unsigned long XMesaGetPixel(XMesaImage *image, int x, int y) +Index: Mesa/include/GL/xmesa_xf86.h +=================================================================== +--- Mesa.orig/include/GL/xmesa_xf86.h ++++ Mesa/include/GL/xmesa_xf86.h +@@ -133,7 +133,7 @@ static _X_INLINE XMesaImage *XMesaGetIma + unsigned int height, + unsigned long plane_mask, int format) + { +- XMesaImage *img = Xcalloc(sizeof(*img)); ++ XMesaImage *img = calloc(1, sizeof(*img)); + + img->width = p->drawable.width; + img->height = p->drawable.height; diff --git a/nx-X11/extras/Mesa.patches_7.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch b/nx-X11/extras/Mesa.patches_7.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch new file mode 100644 index 0000000000..aa321dc11f --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.2/4005_adapt-all-libX11-include-paths-to-libNX_X11.patch @@ -0,0 +1,43 @@ +Index: Mesa/src/glx/x11/glcontextmodes.c +=================================================================== +--- Mesa.orig/src/glx/x11/glcontextmodes.c ++++ Mesa/src/glx/x11/glcontextmodes.c +@@ -37,7 +37,7 @@ + #if defined(HAVE_DIX_CONFIG_H) + # include + #endif +-#include ++#include + #include + #include "GL/glxint.h" + #endif +Index: Mesa/src/mesa/drivers/x11/glxheader.h +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/glxheader.h ++++ Mesa/src/mesa/drivers/x11/glxheader.h +@@ -40,9 +40,9 @@ + + #else + +-# include +-# include +-# include ++# include ++# include ++# include + # ifdef USE_XSHM /* was SHM */ + # include + # include +Index: Mesa/src/mesa/drivers/x11/xm_image.c +=================================================================== +--- Mesa.orig/src/mesa/drivers/x11/xm_image.c ++++ Mesa/src/mesa/drivers/x11/xm_image.c +@@ -32,7 +32,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN + */ + + #include +-#include ++#include + + #include "glxheader.h" + #include "xmesaP.h" diff --git a/nx-X11/extras/Mesa.patches_7.2/series b/nx-X11/extras/Mesa.patches_7.2/series new file mode 100644 index 0000000000..78a8cc1411 --- /dev/null +++ b/nx-X11/extras/Mesa.patches_7.2/series @@ -0,0 +1,2 @@ +4002_no-special-glx-memfunctions.patch +4005_adapt-all-libX11-include-paths-to-libNX_X11.patch diff --git a/nx-X11/include/GL/Imakefile b/nx-X11/include/GL/Imakefile index 8afed568b2..de5e2baffe 100644 --- a/nx-X11/include/GL/Imakefile +++ b/nx-X11/include/GL/Imakefile @@ -1,10 +1,4 @@ -LinkSourceFile(gl.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(glext.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(glxext.h, $(MESASRCDIR)/include/GL) -LinkSourceFile(osmesa.h, $(MESASRCDIR)/include/GL) - -GLXHEADERS = gl.h glext.h glx.h glxint.h glxmd.h glxproto.h \ - glxtokens.h osmesa.h glxext.h +GLXHEADERS = glxint.h glxmd.h glxproto.h glxtokens.h HEADERS = $(GLXHEADERS) diff --git a/nx-X11/include/GL/glx.h b/nx-X11/include/GL/glx.h deleted file mode 100644 index 943aaaa4f6..0000000000 --- a/nx-X11/include/GL/glx.h +++ /dev/null @@ -1,225 +0,0 @@ -#ifndef __GLX_glx_h__ -#define __GLX_glx_h__ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -*/ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** GLX resources. -*/ -typedef XID GLXContextID; -typedef XID GLXPixmap; -typedef XID GLXDrawable; -typedef XID GLXPbuffer; -typedef XID GLXWindow; -typedef XID GLXFBConfigID; - -/* -** GLXContext is a pointer to opaque data. -*/ -typedef struct __GLXcontextRec *GLXContext; - -/* -** GLXFBConfig is a pointer to opaque data. -*/ -typedef struct __GLXFBConfigRec *GLXFBConfig; - -/************************************************************************/ - -extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList); -extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, unsigned long mask); -extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct); -extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap); -extern void glXDestroyContext (Display *dpy, GLXContext ctx); -extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix); -extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value); -extern GLXContext glXGetCurrentContext (void); -extern GLXDrawable glXGetCurrentDrawable (void); -extern Bool glXIsDirect (Display *dpy, GLXContext ctx); -extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx); -extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase); -extern Bool glXQueryVersion (Display *dpy, int *major, int *minor); -extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable); -extern void glXUseXFont (Font font, int first, int count, int listBase); -extern void glXWaitGL (void); -extern void glXWaitX (void); -extern const char * glXGetClientString (Display *dpy, int name ); -extern const char * glXQueryServerString (Display *dpy, int screen, int name ); -extern const char * glXQueryExtensionsString (Display *dpy, int screen ); - -/* New for GLX 1.3 */ -extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements); -extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements); -extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value); -extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config); -extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); -extern void glXDestroyWindow (Display *dpy, GLXWindow win); -extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); -extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap); -extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list); -extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf); -extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); -extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); -extern Bool glXMakeContextCurrent (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -extern GLXDrawable glXGetCurrentReadDrawable (void); -extern Display * glXGetCurrentDisplay (void); -extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value); -extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask); -extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask); - -/* GLX 1.4 and later */ -extern void (*glXGetProcAddress(const GLubyte *procname))(void); - - -#ifndef GLX_GLXEXT_LEGACY - -#include - -#else - -/* GLX extensions */ -#define GLX_EXT_import_context 1 -#define GLX_EXT_visual_info 1 -#define GLX_EXT_visual_rating 1 -#define GLX_ARB_get_proc_address 1 -extern GLXContextID glXGetContextIDEXT (const GLXContext ctx); -extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID); -extern void glXFreeContextEXT (Display *dpy, GLXContext ctx); -extern int glXQueryContextInfoEXT (Display *dpy, GLXContext ctx, int attribute, int *value); -extern Display * glXGetCurrentDisplayEXT (void); -extern void (*glXGetProcAddressARB(const GLubyte *procName))( void ); - - - -#endif /* GLX_GLXEXT_LEGACY */ - - -/** - ** The following aren't in glxext.h yet. - **/ - - -/* - * ???. GLX_NV_vertex_array_range - */ -#ifndef GLX_NV_vertex_array_range -#define GLX_NV_vertex_array_range - -extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -extern void glXFreeMemoryNV(GLvoid *pointer); -typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer); - -#endif /* GLX_NV_vertex_array_range */ - - - -/* - * ???. GLX_MESA_agp_offset (deprecated) - */ -#ifndef GLX_MESA_agp_offset -#define GLX_MESA_agp_offset 1 - -extern GLuint glXGetAGPOffsetMESA(const GLvoid *pointer); -typedef GLuint (* PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *pointer); - -#endif /* GLX_MESA_agp_offset */ - - -/* - * ???. GLX_MESA_allocate_memory - */ -#ifndef GLX_MESA_allocate_memory -#define GLX_MESA_allocate_memory 1 - -extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority); -extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer); -extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer); -typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority); -typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer); -typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer); - -#endif /* GLX_MESA_allocate_memory */ - -/* - * ???. GLX_ARB_render_texture - */ -#ifndef GLX_ARB_render_texture -#define GLX_ARB_render_texture 1 - -Bool glXBindTexImageARB( Display *dpy, GLXPbuffer pbuffer, int buffer ); -Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer ); -Bool glXDrawableAttribARB( Display *dpy, GLXDrawable draw, const int *attribList ); - -#endif - - - -/*** Should these go here, or in another header? */ -/* -** GLX Events -*/ -typedef struct { - int event_type; /* GLX_DAMAGED or GLX_SAVED */ - int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came for SendEvent request */ - Display *display; /* display the event was read from */ - GLXDrawable drawable; /* XID of Drawable */ - unsigned int buffer_mask; /* mask indicating which buffers are affected */ - unsigned int aux_buffer; /* which aux buffer was affected */ - int x, y; - int width, height; - int count; /* if nonzero, at least this many more */ -} GLXPbufferClobberEvent; - -typedef union __GLXEvent { - GLXPbufferClobberEvent glxpbufferclobber; - long pad[24]; -} GLXEvent; - -#ifdef __cplusplus -} -#endif - -#endif /* !__GLX_glx_h__ */ diff --git a/nx-X11/include/GL/glxint.h b/nx-X11/include/GL/glxint.h index d9239daf2d..d9e2581bb4 100644 --- a/nx-X11/include/GL/glxint.h +++ b/nx-X11/include/GL/glxint.h @@ -1,6 +1,7 @@ #ifndef __GLX_glxint_h__ #define __GLX_glxint_h__ +/* $XFree86: xc/include/GL/glxint.h,v 1.3 2000/11/18 19:37:04 tsi Exp $ */ /* ** The contents of this file are subject to the GLX Public License Version 1.0 ** (the "License"). You may not use this file except in compliance with the @@ -22,8 +23,8 @@ ** $SGI$ */ -#include -#include +#include +#include #include "GL/gl.h" typedef struct __GLXvisualConfigRec __GLXvisualConfig; diff --git a/nx-X11/include/GL/glxmd.h b/nx-X11/include/GL/glxmd.h index f0456483f7..3c4dc65701 100644 --- a/nx-X11/include/GL/glxmd.h +++ b/nx-X11/include/GL/glxmd.h @@ -1,6 +1,7 @@ #ifndef _GLX_glxmd_h_ #define _GLX_glxmd_h_ +/* $XFree86: xc/include/GL/glxmd.h,v 1.3 2001/03/21 15:51:38 dawes Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free diff --git a/nx-X11/include/GL/glxproto.h b/nx-X11/include/GL/glxproto.h index 304016445e..cbb97c5f61 100644 --- a/nx-X11/include/GL/glxproto.h +++ b/nx-X11/include/GL/glxproto.h @@ -1,6 +1,7 @@ #ifndef _GLX_glxproto_h_ #define _GLX_glxproto_h_ +/* $XFree86: xc/include/GL/glxproto.h,v 1.6 2003/09/28 20:14:58 alanh Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -2342,9 +2343,9 @@ typedef struct { #define X_GLvop_GetProgramEnvParameterivNV 1298 #define X_GLvop_GetProgramStringNV 1299 #define X_GLvop_GetTrackMatrixivNV 1300 -#define X_GLvop_GetVetrexAttribdvARB 1301 -#define X_GLvop_GetVetrexAttribfvARB 1302 -#define X_GLvop_GetVetrexAttribivARB 1303 +#define X_GLvop_GetVertexAttribdvARB 1301 +#define X_GLvop_GetVertexAttribfvARB 1302 +#define X_GLvop_GetVertexAttribivARB 1303 #define X_GLvop_IsProgramARB 1304 #define X_GLvop_GetProgramLocalParameterfvARB 1305 #define X_GLvop_GetProgramLocalParameterdvARB 1306 @@ -2386,7 +2387,8 @@ typedef struct { #define X_GLXvop_QueryHyperpipeConfigSGIX 65551 #define X_GLXvop_HyperpipeConfigSGIX 65552 #define X_GLXvop_DestroyHyperpipeConfigSGIX 65553 - +#define X_GLXvop_BindTexImageEXT 5152 +#define X_GLXvop_ReleaseTexImageEXT 5153 /* ARB extension opcodes */ @@ -2513,4 +2515,13 @@ typedef struct { /* 299. GL_EXT_blend_equation_separate */ #define X_GLrop_BlendEquationSeparateEXT 4228 +/* 310. GL_EXT_framebuffer_object */ +#define X_GLvop_IsRenderbufferEXT 1422 +#define X_GLvop_GenRenderbuffersEXT 1423 +#define X_GLvop_GetRenderbufferParameterivEXT 1424 +#define X_GLvop_IsFramebufferEXT 1425 +#define X_GLvop_GenFramebuffersEXT 1426 +#define X_GLvop_CheckFramebufferStatusEXT 1427 +#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428 + #endif /* _GLX_glxproto_h_ */ diff --git a/nx-X11/include/GL/glxtokens.h b/nx-X11/include/GL/glxtokens.h index bde5a66f62..9e1601a45b 100644 --- a/nx-X11/include/GL/glxtokens.h +++ b/nx-X11/include/GL/glxtokens.h @@ -1,6 +1,7 @@ #ifndef __GLX_glxtokens_h__ #define __GLX_glxtokens_h__ +/* $XFree86: xc/include/GL/glxtokens.h,v 1.5 2001/03/21 15:51:38 dawes Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -230,6 +231,48 @@ extern "C" { #define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */ #define GLX_SCREEN_EXT 0x800C /* screen number */ +/* +** GLX_EXT_texture_from_pixmap +*/ +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 + +#define GLX_TEXTURE_FORMAT_EXT 0x20D5 +#define GLX_TEXTURE_TARGET_EXT 0x20D6 +#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 + +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA + +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 + +#define GLX_TEXTURE_1D_EXT 0x20DB +#define GLX_TEXTURE_2D_EXT 0x20DC +#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD + +#define GLX_FRONT_LEFT_EXT 0x20DE +#define GLX_FRONT_RIGHT_EXT 0x20DF +#define GLX_BACK_LEFT_EXT 0x20E0 +#define GLX_BACK_RIGHT_EXT 0x20E1 +#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT +#define GLX_BACK_EXT GLX_BACK_LEFT_EXT +#define GLX_AUX0_EXT 0x20E2 +#define GLX_AUX1_EXT 0x20E3 +#define GLX_AUX2_EXT 0x20E4 +#define GLX_AUX3_EXT 0x20E5 +#define GLX_AUX4_EXT 0x20E6 +#define GLX_AUX5_EXT 0x20E7 +#define GLX_AUX6_EXT 0x20E8 +#define GLX_AUX7_EXT 0x20E9 +#define GLX_AUX8_EXT 0x20EA +#define GLX_AUX9_EXT 0x20EB + /* * GLX 1.4 and later: */ diff --git a/nx-X11/programs/Xserver/GL/glx/Imakefile b/nx-X11/programs/Xserver/GL/glx/Imakefile index 2ee2d17e63..9d8a1e7c22 100644 --- a/nx-X11/programs/Xserver/GL/glx/Imakefile +++ b/nx-X11/programs/Xserver/GL/glx/Imakefile @@ -9,10 +9,10 @@ NULL = #include -LinkSourceFile(glcontextmodes.c, $(MESASRCDIR)/src/mesa/drivers/dri/common) -LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/mesa/drivers/dri/common) -LinkSourceFile(indirect_size.c, $(MESASRCDIR)/src/glx/x11) -LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(glcontextmodes.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(glapi.c, $(MESASRCDIR)/src/mesa/glapi) +LinkSourceFile(glthread.c, $(MESASRCDIR)/src/mesa/glapi) #if (!(defined(NXAgentServer) && NXAgentServer)) NXAGENT_SKIP_SRCS = \ @@ -25,16 +25,23 @@ NXAGENT_SKIP_OBJS = \ NX_DEFINES = -DNXAGENT_SERVER #endif - SRCS = global.c \ - glxbuf.c \ - glxcmds.c \ - glxcmdsswap.c \ - glxfb.c \ - glximports.c \ - glxmem.c \ - glxpix.c \ + SRCS = g_disptab.c \ + g_disptab_EXT.c \ + glapi.c \ + glcontextmodes.c \ + global.c \ + glthread.c \ + glxcore.c \ + glxcmds.c \ + glxcmdsswap.c \ + glxvisuals.c \ glxscreens.c \ glxutil.c \ + indirect_dispatch.c \ + indirect_dispatch_swap.c \ + indirect_reqsize.c \ + indirect_size_get.c \ + indirect_util.c \ render2.c \ render2swap.c \ renderpix.c \ @@ -47,28 +54,27 @@ NXAGENT_SKIP_OBJS = \ singlepixswap.c \ singlesize.c \ xfont.c \ - g_disptab.c \ - g_disptab_EXT.c \ - g_render.c \ - g_renderswap.c \ - g_single.c \ - g_singleswap.c \ - glcontextmodes.c \ - indirect_size.c \ - $(MSRCS) \ + $(MSRCS) \ $(NXAGENT_SKIP_SRCS) \ $(NULL) - OBJS = global.o \ - glxbuf.o \ - glxcmds.o \ - glxcmdsswap.o \ - glxfb.o \ - glximports.o \ - glxmem.o \ - glxpix.o \ + OBJS = g_disptab.o \ + g_disptab_EXT.o \ + glapi.o \ + glcontextmodes.o \ + global.o \ + glthread.o \ + glxcore.o \ + glxcmds.o \ + glxcmdsswap.o \ + glxvisuals.o \ glxscreens.o \ glxutil.o \ + indirect_dispatch.o \ + indirect_dispatch_swap.o \ + indirect_reqsize.o \ + indirect_size_get.o \ + indirect_util.o \ render2.o \ render2swap.o \ renderpix.o \ @@ -81,15 +87,7 @@ NXAGENT_SKIP_OBJS = \ singlepixswap.o \ singlesize.o \ xfont.o \ - g_disptab.o \ - g_disptab_EXT.o \ - g_render.o \ - g_renderswap.o \ - g_single.o \ - g_singleswap.o \ - glcontextmodes.o \ - indirect_size.o \ - $(MOBJS) \ + $(MOBJS) \ $(NXAGENT_SKIP_OBJS) \ $(NULL) @@ -98,6 +96,11 @@ NXAGENT_SKIP_OBJS = \ -I$(SERVERSRC)/include \ -I$(INCLUDESRC) \ -I$(MESASRCDIR)/include \ + -I$(MESASRCDIR)/src/glx/x11 \ + -I$(MESASRCDIR)/src/mesa/glapi \ + -I$(MESASRCDIR)/src/mesa/main \ + -I$(MESASRCDIR)/src/mesa/drivers/x11 \ + -I$(MESASRCDIR)/src/mesa/ \ -I$(XINCLUDESRC) \ -I$(SERVERSRC)/mi \ -I$(EXTINCSRC) \ @@ -146,17 +149,21 @@ DependSubdirs($(SUBDIRS)) #endif #ifdef LinkDirectory +LinkSourceFile(g_disptab.c,LinkDirectory) +LinkSourceFile(g_disptab_EXT.c,LinkDirectory) +LinkSourceFile(glcontextmodes.c,LinkDirectory) LinkSourceFile(global.c,LinkDirectory) -LinkSourceFile(glxbuf.c,LinkDirectory) LinkSourceFile(glxcmds.c,LinkDirectory) LinkSourceFile(glxcmdsswap.c,LinkDirectory) LinkSourceFile(glxext.c,LinkDirectory) -LinkSourceFile(glxfb.c,LinkDirectory) -LinkSourceFile(glximports.c,LinkDirectory) -LinkSourceFile(glxmem.c,LinkDirectory) -LinkSourceFile(glxpix.c,LinkDirectory) +LinkSourceFile(glxvisuals.c,LinkDirectory) LinkSourceFile(glxscreens.c,LinkDirectory) LinkSourceFile(glxutil.c,LinkDirectory) +LinkSourceFile(indirect_dispatch.c,LinkDirectory) +LinkSourceFile(indirect_dispatch_swap.c,LinkDirectory) +LinkSourceFile(indirect_reqsize.c,LinkDirectory) +LinkSourceFile(indirect_size_get.c,LinkDirectory) +LinkSourceFile(indirect_util.c,LinkDirectory) LinkSourceFile(render2.c,LinkDirectory) LinkSourceFile(render2swap.c,LinkDirectory) LinkSourceFile(renderpix.c,LinkDirectory) @@ -169,10 +176,4 @@ LinkSourceFile(singlepix.c,LinkDirectory) LinkSourceFile(singlepixswap.c,LinkDirectory) LinkSourceFile(singlesize.c,LinkDirectory) LinkSourceFile(xfont.c,LinkDirectory) -LinkSourceFile(g_disptab.c,LinkDirectory) -LinkSourceFile(g_disptab_EXT.c,LinkDirectory) -LinkSourceFile(g_render.c,LinkDirectory) -LinkSourceFile(g_renderswap.c,LinkDirectory) -LinkSourceFile(g_single.c,LinkDirectory) -LinkSourceFile(g_singleswap.c,LinkDirectory) #endif diff --git a/nx-X11/programs/Xserver/GL/glx/g_disptab.c b/nx-X11/programs/Xserver/GL/glx/g_disptab.c index 533bc6c9d0..938dbac9a6 100644 --- a/nx-X11/programs/Xserver/GL/glx/g_disptab.c +++ b/nx-X11/programs/Xserver/GL/glx/g_disptab.c @@ -35,6 +35,8 @@ #include "glxserver.h" #include "glxext.h" #include "g_disptab.h" +#include "indirect_dispatch.h" + __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE] = { __glXNoSuchSingleOpcode, __glXRender, @@ -430,7 +432,7 @@ __GLXdispatchRenderProcPtr __glXRenderTable[] = { __glXNoSuchRenderOpcode, __glXDisp_SampleCoverageARB, #ifndef MISSING_GL_EXTS - __glXDisp_WindowPos3fARB /* 230 */ + __glXDisp_WindowPos3fvMESA /* 230 */ #else __glXNoSuchRenderOpcode #endif @@ -831,7 +833,7 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE] = { __glXNoSuchRenderOpcode, __glXDispSwap_SampleCoverageARB, #ifndef MISSING_GL_EXTS - __glXDispSwap_WindowPos3fARB /* 230 */ + __glXDispSwap_WindowPos3fvMESA /* 230 */ #else __glXNoSuchRenderOpcode #endif diff --git a/nx-X11/programs/Xserver/GL/glx/g_disptab.h b/nx-X11/programs/Xserver/GL/glx/g_disptab.h index 85906cb435..83c6fade13 100644 --- a/nx-X11/programs/Xserver/GL/glx/g_disptab.h +++ b/nx-X11/programs/Xserver/GL/glx/g_disptab.h @@ -45,6 +45,9 @@ extern int __glXWaitGL(__GLXclientState*, GLbyte*); extern int __glXWaitX(__GLXclientState*, GLbyte*); extern int __glXCopyContext(__GLXclientState*, GLbyte*); extern int __glXSwapBuffers(__GLXclientState*, GLbyte*); +extern int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc); +extern int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc); +extern int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); extern int __glXUseXFont(__GLXclientState*, GLbyte*); extern int __glXCreateGLXPixmap(__GLXclientState*, GLbyte*); extern int __glXGetVisualConfigs(__GLXclientState*, GLbyte*); @@ -59,281 +62,6 @@ extern int __glXGetFBConfigs(__GLXclientState*, GLbyte*); extern int __glXCreateNewContext(__GLXclientState*, GLbyte*); extern int __glXCreatePixmap(__GLXclientState*, GLbyte*); -extern int __glXDisp_NewList(__GLXclientState*, GLbyte*); -extern int __glXDisp_EndList(__GLXclientState*, GLbyte*); -extern int __glXDisp_DeleteLists(__GLXclientState*, GLbyte*); -extern int __glXDisp_GenLists(__GLXclientState*, GLbyte*); -extern int __glXDisp_FeedbackBuffer(__GLXclientState*, GLbyte*); -extern int __glXDisp_SelectBuffer(__GLXclientState*, GLbyte*); -extern int __glXDisp_RenderMode(__GLXclientState*, GLbyte*); -extern int __glXDisp_Finish(__GLXclientState*, GLbyte*); -extern int __glXDisp_PixelStoref(__GLXclientState*, GLbyte*); -extern int __glXDisp_PixelStorei(__GLXclientState*, GLbyte*); -extern int __glXDisp_ReadPixels(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetBooleanv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetClipPlane(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetDoublev(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetError(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetFloatv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetIntegerv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetLightfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetLightiv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetMapdv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetMapfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetMapiv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetMaterialfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetMaterialiv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetPixelMapfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetPixelMapuiv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetPixelMapusv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetPolygonStipple(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetString(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexEnvfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexEnviv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexGendv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexGenfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexGeniv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexImage(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexLevelParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetTexLevelParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDisp_IsEnabled(__GLXclientState*, GLbyte*); -extern int __glXDisp_IsList(__GLXclientState*, GLbyte*); -extern int __glXDisp_Flush(__GLXclientState*, GLbyte*); -extern int __glXDisp_AreTexturesResident(__GLXclientState*, GLbyte*); -extern int __glXDisp_DeleteTextures(__GLXclientState*, GLbyte*); -extern int __glXDisp_GenTextures(__GLXclientState*, GLbyte*); -extern int __glXDisp_IsTexture(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetColorTable(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetColorTableParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetColorTableParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetConvolutionFilter(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetConvolutionParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetConvolutionParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetSeparableFilter(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetHistogram(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetHistogramParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetHistogramParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetMinmax(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetMinmaxParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDisp_GetMinmaxParameteriv(__GLXclientState*, GLbyte*); - -extern void __glXDisp_CallList(GLbyte*); -extern void __glXDisp_CallLists(GLbyte*); -extern void __glXDisp_ListBase(GLbyte*); -extern void __glXDisp_Begin(GLbyte*); -extern void __glXDisp_Bitmap(GLbyte*); -extern void __glXDisp_Color3bv(GLbyte*); -extern void __glXDisp_Color3dv(GLbyte*); -extern void __glXDisp_Color3fv(GLbyte*); -extern void __glXDisp_Color3iv(GLbyte*); -extern void __glXDisp_Color3sv(GLbyte*); -extern void __glXDisp_Color3ubv(GLbyte*); -extern void __glXDisp_Color3uiv(GLbyte*); -extern void __glXDisp_Color3usv(GLbyte*); -extern void __glXDisp_Color4bv(GLbyte*); -extern void __glXDisp_Color4dv(GLbyte*); -extern void __glXDisp_Color4fv(GLbyte*); -extern void __glXDisp_Color4iv(GLbyte*); -extern void __glXDisp_Color4sv(GLbyte*); -extern void __glXDisp_Color4ubv(GLbyte*); -extern void __glXDisp_Color4uiv(GLbyte*); -extern void __glXDisp_Color4usv(GLbyte*); -extern void __glXDisp_EdgeFlagv(GLbyte*); -extern void __glXDisp_End(GLbyte*); -extern void __glXDisp_Indexdv(GLbyte*); -extern void __glXDisp_Indexfv(GLbyte*); -extern void __glXDisp_Indexiv(GLbyte*); -extern void __glXDisp_Indexsv(GLbyte*); -extern void __glXDisp_Normal3bv(GLbyte*); -extern void __glXDisp_Normal3dv(GLbyte*); -extern void __glXDisp_Normal3fv(GLbyte*); -extern void __glXDisp_Normal3iv(GLbyte*); -extern void __glXDisp_Normal3sv(GLbyte*); -extern void __glXDisp_RasterPos2dv(GLbyte*); -extern void __glXDisp_RasterPos2fv(GLbyte*); -extern void __glXDisp_RasterPos2iv(GLbyte*); -extern void __glXDisp_RasterPos2sv(GLbyte*); -extern void __glXDisp_RasterPos3dv(GLbyte*); -extern void __glXDisp_RasterPos3fv(GLbyte*); -extern void __glXDisp_RasterPos3iv(GLbyte*); -extern void __glXDisp_RasterPos3sv(GLbyte*); -extern void __glXDisp_RasterPos4dv(GLbyte*); -extern void __glXDisp_RasterPos4fv(GLbyte*); -extern void __glXDisp_RasterPos4iv(GLbyte*); -extern void __glXDisp_RasterPos4sv(GLbyte*); -extern void __glXDisp_Rectdv(GLbyte*); -extern void __glXDisp_Rectfv(GLbyte*); -extern void __glXDisp_Rectiv(GLbyte*); -extern void __glXDisp_Rectsv(GLbyte*); -extern void __glXDisp_TexCoord1dv(GLbyte*); -extern void __glXDisp_TexCoord1fv(GLbyte*); -extern void __glXDisp_TexCoord1iv(GLbyte*); -extern void __glXDisp_TexCoord1sv(GLbyte*); -extern void __glXDisp_TexCoord2dv(GLbyte*); -extern void __glXDisp_TexCoord2fv(GLbyte*); -extern void __glXDisp_TexCoord2iv(GLbyte*); -extern void __glXDisp_TexCoord2sv(GLbyte*); -extern void __glXDisp_TexCoord3dv(GLbyte*); -extern void __glXDisp_TexCoord3fv(GLbyte*); -extern void __glXDisp_TexCoord3iv(GLbyte*); -extern void __glXDisp_TexCoord3sv(GLbyte*); -extern void __glXDisp_TexCoord4dv(GLbyte*); -extern void __glXDisp_TexCoord4fv(GLbyte*); -extern void __glXDisp_TexCoord4iv(GLbyte*); -extern void __glXDisp_TexCoord4sv(GLbyte*); -extern void __glXDisp_Vertex2dv(GLbyte*); -extern void __glXDisp_Vertex2fv(GLbyte*); -extern void __glXDisp_Vertex2iv(GLbyte*); -extern void __glXDisp_Vertex2sv(GLbyte*); -extern void __glXDisp_Vertex3dv(GLbyte*); -extern void __glXDisp_Vertex3fv(GLbyte*); -extern void __glXDisp_Vertex3iv(GLbyte*); -extern void __glXDisp_Vertex3sv(GLbyte*); -extern void __glXDisp_Vertex4dv(GLbyte*); -extern void __glXDisp_Vertex4fv(GLbyte*); -extern void __glXDisp_Vertex4iv(GLbyte*); -extern void __glXDisp_Vertex4sv(GLbyte*); -extern void __glXDisp_ClipPlane(GLbyte*); -extern void __glXDisp_ColorMaterial(GLbyte*); -extern void __glXDisp_CullFace(GLbyte*); -extern void __glXDisp_Fogf(GLbyte*); -extern void __glXDisp_Fogfv(GLbyte*); -extern void __glXDisp_Fogi(GLbyte*); -extern void __glXDisp_Fogiv(GLbyte*); -extern void __glXDisp_FrontFace(GLbyte*); -extern void __glXDisp_Hint(GLbyte*); -extern void __glXDisp_Lightf(GLbyte*); -extern void __glXDisp_Lightfv(GLbyte*); -extern void __glXDisp_Lighti(GLbyte*); -extern void __glXDisp_Lightiv(GLbyte*); -extern void __glXDisp_LightModelf(GLbyte*); -extern void __glXDisp_LightModelfv(GLbyte*); -extern void __glXDisp_LightModeli(GLbyte*); -extern void __glXDisp_LightModeliv(GLbyte*); -extern void __glXDisp_LineStipple(GLbyte*); -extern void __glXDisp_LineWidth(GLbyte*); -extern void __glXDisp_Materialf(GLbyte*); -extern void __glXDisp_Materialfv(GLbyte*); -extern void __glXDisp_Materiali(GLbyte*); -extern void __glXDisp_Materialiv(GLbyte*); -extern void __glXDisp_PointSize(GLbyte*); -extern void __glXDisp_PolygonMode(GLbyte*); -extern void __glXDisp_PolygonStipple(GLbyte*); -extern void __glXDisp_Scissor(GLbyte*); -extern void __glXDisp_ShadeModel(GLbyte*); -extern void __glXDisp_TexParameterf(GLbyte*); -extern void __glXDisp_TexParameterfv(GLbyte*); -extern void __glXDisp_TexParameteri(GLbyte*); -extern void __glXDisp_TexParameteriv(GLbyte*); -extern void __glXDisp_TexImage1D(GLbyte*); -extern void __glXDisp_TexImage2D(GLbyte*); -extern void __glXDisp_TexEnvf(GLbyte*); -extern void __glXDisp_TexEnvfv(GLbyte*); -extern void __glXDisp_TexEnvi(GLbyte*); -extern void __glXDisp_TexEnviv(GLbyte*); -extern void __glXDisp_TexGend(GLbyte*); -extern void __glXDisp_TexGendv(GLbyte*); -extern void __glXDisp_TexGenf(GLbyte*); -extern void __glXDisp_TexGenfv(GLbyte*); -extern void __glXDisp_TexGeni(GLbyte*); -extern void __glXDisp_TexGeniv(GLbyte*); -extern void __glXDisp_InitNames(GLbyte*); -extern void __glXDisp_LoadName(GLbyte*); -extern void __glXDisp_PassThrough(GLbyte*); -extern void __glXDisp_PopName(GLbyte*); -extern void __glXDisp_PushName(GLbyte*); -extern void __glXDisp_DrawBuffer(GLbyte*); -extern void __glXDisp_Clear(GLbyte*); -extern void __glXDisp_ClearAccum(GLbyte*); -extern void __glXDisp_ClearIndex(GLbyte*); -extern void __glXDisp_ClearColor(GLbyte*); -extern void __glXDisp_ClearStencil(GLbyte*); -extern void __glXDisp_ClearDepth(GLbyte*); -extern void __glXDisp_StencilMask(GLbyte*); -extern void __glXDisp_ColorMask(GLbyte*); -extern void __glXDisp_DepthMask(GLbyte*); -extern void __glXDisp_IndexMask(GLbyte*); -extern void __glXDisp_Accum(GLbyte*); -extern void __glXDisp_Disable(GLbyte*); -extern void __glXDisp_Enable(GLbyte*); -extern void __glXDisp_PopAttrib(GLbyte*); -extern void __glXDisp_PushAttrib(GLbyte*); -extern void __glXDisp_Map1d(GLbyte*); -extern void __glXDisp_Map1f(GLbyte*); -extern void __glXDisp_Map2d(GLbyte*); -extern void __glXDisp_Map2f(GLbyte*); -extern void __glXDisp_MapGrid1d(GLbyte*); -extern void __glXDisp_MapGrid1f(GLbyte*); -extern void __glXDisp_MapGrid2d(GLbyte*); -extern void __glXDisp_MapGrid2f(GLbyte*); -extern void __glXDisp_EvalCoord1dv(GLbyte*); -extern void __glXDisp_EvalCoord1fv(GLbyte*); -extern void __glXDisp_EvalCoord2dv(GLbyte*); -extern void __glXDisp_EvalCoord2fv(GLbyte*); -extern void __glXDisp_EvalMesh1(GLbyte*); -extern void __glXDisp_EvalPoint1(GLbyte*); -extern void __glXDisp_EvalMesh2(GLbyte*); -extern void __glXDisp_EvalPoint2(GLbyte*); -extern void __glXDisp_AlphaFunc(GLbyte*); -extern void __glXDisp_BlendFunc(GLbyte*); -extern void __glXDisp_LogicOp(GLbyte*); -extern void __glXDisp_StencilFunc(GLbyte*); -extern void __glXDisp_StencilOp(GLbyte*); -extern void __glXDisp_DepthFunc(GLbyte*); -extern void __glXDisp_PixelZoom(GLbyte*); -extern void __glXDisp_PixelTransferf(GLbyte*); -extern void __glXDisp_PixelTransferi(GLbyte*); -extern void __glXDisp_PixelMapfv(GLbyte*); -extern void __glXDisp_PixelMapuiv(GLbyte*); -extern void __glXDisp_PixelMapusv(GLbyte*); -extern void __glXDisp_ReadBuffer(GLbyte*); -extern void __glXDisp_CopyPixels(GLbyte*); -extern void __glXDisp_DrawPixels(GLbyte*); -extern void __glXDisp_DepthRange(GLbyte*); -extern void __glXDisp_Frustum(GLbyte*); -extern void __glXDisp_LoadIdentity(GLbyte*); -extern void __glXDisp_LoadMatrixf(GLbyte*); -extern void __glXDisp_LoadMatrixd(GLbyte*); -extern void __glXDisp_MatrixMode(GLbyte*); -extern void __glXDisp_MultMatrixf(GLbyte*); -extern void __glXDisp_MultMatrixd(GLbyte*); -extern void __glXDisp_Ortho(GLbyte*); -extern void __glXDisp_PopMatrix(GLbyte*); -extern void __glXDisp_PushMatrix(GLbyte*); -extern void __glXDisp_Rotated(GLbyte*); -extern void __glXDisp_Rotatef(GLbyte*); -extern void __glXDisp_Scaled(GLbyte*); -extern void __glXDisp_Scalef(GLbyte*); -extern void __glXDisp_Translated(GLbyte*); -extern void __glXDisp_Translatef(GLbyte*); -extern void __glXDisp_Viewport(GLbyte*); -extern void __glXDisp_PolygonOffset(GLbyte*); -extern void __glXDisp_DrawArrays(GLbyte*); -extern void __glXDisp_Indexubv(GLbyte*); -extern void __glXDisp_ColorSubTable(GLbyte*); -extern void __glXDisp_CopyColorSubTable(GLbyte*); -extern void __glXDisp_ActiveTextureARB(GLbyte*); -extern void __glXDisp_MultiTexCoord1dvARB(GLbyte*); -extern void __glXDisp_MultiTexCoord1fvARB(GLbyte*); -extern void __glXDisp_MultiTexCoord1ivARB(GLbyte*); -extern void __glXDisp_MultiTexCoord1svARB(GLbyte*); -extern void __glXDisp_MultiTexCoord2dvARB(GLbyte*); -extern void __glXDisp_MultiTexCoord2fvARB(GLbyte*); -extern void __glXDisp_MultiTexCoord2ivARB(GLbyte*); -extern void __glXDisp_MultiTexCoord2svARB(GLbyte*); -extern void __glXDisp_MultiTexCoord3dvARB(GLbyte*); -extern void __glXDisp_MultiTexCoord3fvARB(GLbyte*); -extern void __glXDisp_MultiTexCoord3ivARB(GLbyte*); -extern void __glXDisp_MultiTexCoord3svARB(GLbyte*); -extern void __glXDisp_MultiTexCoord4dvARB(GLbyte*); -extern void __glXDisp_MultiTexCoord4fvARB(GLbyte*); -extern void __glXDisp_MultiTexCoord4ivARB(GLbyte*); -extern void __glXDisp_MultiTexCoord4svARB(GLbyte*); -extern void __glXDisp_SampleCoverageARB(GLbyte *); -extern void __glXDisp_WindowPos3fARB(GLbyte *); - extern int __glXSwapRender(__GLXclientState*, GLbyte*); extern int __glXSwapRenderLarge(__GLXclientState*, GLbyte*); extern int __glXSwapCreateContext(__GLXclientState*, GLbyte*); @@ -345,6 +73,9 @@ extern int __glXSwapWaitGL(__GLXclientState*, GLbyte*); extern int __glXSwapWaitX(__GLXclientState*, GLbyte*); extern int __glXSwapCopyContext(__GLXclientState*, GLbyte*); extern int __glXSwapSwapBuffers(__GLXclientState*, GLbyte*); +extern int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc); +extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc); +extern int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc); extern int __glXSwapUseXFont(__GLXclientState*, GLbyte*); extern int __glXSwapCreateGLXPixmap(__GLXclientState*, GLbyte*); extern int __glXSwapGetVisualConfigs(__GLXclientState*, GLbyte*); @@ -359,281 +90,6 @@ extern int __glXSwapGetFBConfigs(__GLXclientState*, GLbyte*); extern int __glXSwapCreateNewContext(__GLXclientState*, GLbyte*); extern int __glXSwapCreatePixmap(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_NewList(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_EndList(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_DeleteLists(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GenLists(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_FeedbackBuffer(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_SelectBuffer(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_RenderMode(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_Finish(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_PixelStoref(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_PixelStorei(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_ReadPixels(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetBooleanv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetClipPlane(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetDoublev(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetError(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetFloatv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetIntegerv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetLightfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetLightiv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetMapdv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetMapfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetMapiv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetMaterialfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetMaterialiv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetPixelMapfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetPixelMapuiv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetPixelMapusv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetPolygonStipple(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetString(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexEnvfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexEnviv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexGendv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexGenfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexGeniv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexImage(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_IsEnabled(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_IsList(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_Flush(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_AreTexturesResident(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_DeleteTextures(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GenTextures(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_IsTexture(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetColorTable(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetColorTableParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetColorTableParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetConvolutionFilter(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetSeparableFilter(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetHistogram(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetHistogramParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetHistogramParameteriv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetMinmax(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState*, GLbyte*); - -extern void __glXDispSwap_CallList(GLbyte*); -extern void __glXDispSwap_CallLists(GLbyte*); -extern void __glXDispSwap_ListBase(GLbyte*); -extern void __glXDispSwap_Begin(GLbyte*); -extern void __glXDispSwap_Bitmap(GLbyte*); -extern void __glXDispSwap_Color3bv(GLbyte*); -extern void __glXDispSwap_Color3dv(GLbyte*); -extern void __glXDispSwap_Color3fv(GLbyte*); -extern void __glXDispSwap_Color3iv(GLbyte*); -extern void __glXDispSwap_Color3sv(GLbyte*); -extern void __glXDispSwap_Color3ubv(GLbyte*); -extern void __glXDispSwap_Color3uiv(GLbyte*); -extern void __glXDispSwap_Color3usv(GLbyte*); -extern void __glXDispSwap_Color4bv(GLbyte*); -extern void __glXDispSwap_Color4dv(GLbyte*); -extern void __glXDispSwap_Color4fv(GLbyte*); -extern void __glXDispSwap_Color4iv(GLbyte*); -extern void __glXDispSwap_Color4sv(GLbyte*); -extern void __glXDispSwap_Color4ubv(GLbyte*); -extern void __glXDispSwap_Color4uiv(GLbyte*); -extern void __glXDispSwap_Color4usv(GLbyte*); -extern void __glXDispSwap_EdgeFlagv(GLbyte*); -extern void __glXDispSwap_End(GLbyte*); -extern void __glXDispSwap_Indexdv(GLbyte*); -extern void __glXDispSwap_Indexfv(GLbyte*); -extern void __glXDispSwap_Indexiv(GLbyte*); -extern void __glXDispSwap_Indexsv(GLbyte*); -extern void __glXDispSwap_Normal3bv(GLbyte*); -extern void __glXDispSwap_Normal3dv(GLbyte*); -extern void __glXDispSwap_Normal3fv(GLbyte*); -extern void __glXDispSwap_Normal3iv(GLbyte*); -extern void __glXDispSwap_Normal3sv(GLbyte*); -extern void __glXDispSwap_RasterPos2dv(GLbyte*); -extern void __glXDispSwap_RasterPos2fv(GLbyte*); -extern void __glXDispSwap_RasterPos2iv(GLbyte*); -extern void __glXDispSwap_RasterPos2sv(GLbyte*); -extern void __glXDispSwap_RasterPos3dv(GLbyte*); -extern void __glXDispSwap_RasterPos3fv(GLbyte*); -extern void __glXDispSwap_RasterPos3iv(GLbyte*); -extern void __glXDispSwap_RasterPos3sv(GLbyte*); -extern void __glXDispSwap_RasterPos4dv(GLbyte*); -extern void __glXDispSwap_RasterPos4fv(GLbyte*); -extern void __glXDispSwap_RasterPos4iv(GLbyte*); -extern void __glXDispSwap_RasterPos4sv(GLbyte*); -extern void __glXDispSwap_Rectdv(GLbyte*); -extern void __glXDispSwap_Rectfv(GLbyte*); -extern void __glXDispSwap_Rectiv(GLbyte*); -extern void __glXDispSwap_Rectsv(GLbyte*); -extern void __glXDispSwap_TexCoord1dv(GLbyte*); -extern void __glXDispSwap_TexCoord1fv(GLbyte*); -extern void __glXDispSwap_TexCoord1iv(GLbyte*); -extern void __glXDispSwap_TexCoord1sv(GLbyte*); -extern void __glXDispSwap_TexCoord2dv(GLbyte*); -extern void __glXDispSwap_TexCoord2fv(GLbyte*); -extern void __glXDispSwap_TexCoord2iv(GLbyte*); -extern void __glXDispSwap_TexCoord2sv(GLbyte*); -extern void __glXDispSwap_TexCoord3dv(GLbyte*); -extern void __glXDispSwap_TexCoord3fv(GLbyte*); -extern void __glXDispSwap_TexCoord3iv(GLbyte*); -extern void __glXDispSwap_TexCoord3sv(GLbyte*); -extern void __glXDispSwap_TexCoord4dv(GLbyte*); -extern void __glXDispSwap_TexCoord4fv(GLbyte*); -extern void __glXDispSwap_TexCoord4iv(GLbyte*); -extern void __glXDispSwap_TexCoord4sv(GLbyte*); -extern void __glXDispSwap_Vertex2dv(GLbyte*); -extern void __glXDispSwap_Vertex2fv(GLbyte*); -extern void __glXDispSwap_Vertex2iv(GLbyte*); -extern void __glXDispSwap_Vertex2sv(GLbyte*); -extern void __glXDispSwap_Vertex3dv(GLbyte*); -extern void __glXDispSwap_Vertex3fv(GLbyte*); -extern void __glXDispSwap_Vertex3iv(GLbyte*); -extern void __glXDispSwap_Vertex3sv(GLbyte*); -extern void __glXDispSwap_Vertex4dv(GLbyte*); -extern void __glXDispSwap_Vertex4fv(GLbyte*); -extern void __glXDispSwap_Vertex4iv(GLbyte*); -extern void __glXDispSwap_Vertex4sv(GLbyte*); -extern void __glXDispSwap_ClipPlane(GLbyte*); -extern void __glXDispSwap_ColorMaterial(GLbyte*); -extern void __glXDispSwap_CullFace(GLbyte*); -extern void __glXDispSwap_Fogf(GLbyte*); -extern void __glXDispSwap_Fogfv(GLbyte*); -extern void __glXDispSwap_Fogi(GLbyte*); -extern void __glXDispSwap_Fogiv(GLbyte*); -extern void __glXDispSwap_FrontFace(GLbyte*); -extern void __glXDispSwap_Hint(GLbyte*); -extern void __glXDispSwap_Lightf(GLbyte*); -extern void __glXDispSwap_Lightfv(GLbyte*); -extern void __glXDispSwap_Lighti(GLbyte*); -extern void __glXDispSwap_Lightiv(GLbyte*); -extern void __glXDispSwap_LightModelf(GLbyte*); -extern void __glXDispSwap_LightModelfv(GLbyte*); -extern void __glXDispSwap_LightModeli(GLbyte*); -extern void __glXDispSwap_LightModeliv(GLbyte*); -extern void __glXDispSwap_LineStipple(GLbyte*); -extern void __glXDispSwap_LineWidth(GLbyte*); -extern void __glXDispSwap_Materialf(GLbyte*); -extern void __glXDispSwap_Materialfv(GLbyte*); -extern void __glXDispSwap_Materiali(GLbyte*); -extern void __glXDispSwap_Materialiv(GLbyte*); -extern void __glXDispSwap_PointSize(GLbyte*); -extern void __glXDispSwap_PolygonMode(GLbyte*); -extern void __glXDispSwap_PolygonStipple(GLbyte*); -extern void __glXDispSwap_Scissor(GLbyte*); -extern void __glXDispSwap_ShadeModel(GLbyte*); -extern void __glXDispSwap_TexParameterf(GLbyte*); -extern void __glXDispSwap_TexParameterfv(GLbyte*); -extern void __glXDispSwap_TexParameteri(GLbyte*); -extern void __glXDispSwap_TexParameteriv(GLbyte*); -extern void __glXDispSwap_TexImage1D(GLbyte*); -extern void __glXDispSwap_TexImage2D(GLbyte*); -extern void __glXDispSwap_TexEnvf(GLbyte*); -extern void __glXDispSwap_TexEnvfv(GLbyte*); -extern void __glXDispSwap_TexEnvi(GLbyte*); -extern void __glXDispSwap_TexEnviv(GLbyte*); -extern void __glXDispSwap_TexGend(GLbyte*); -extern void __glXDispSwap_TexGendv(GLbyte*); -extern void __glXDispSwap_TexGenf(GLbyte*); -extern void __glXDispSwap_TexGenfv(GLbyte*); -extern void __glXDispSwap_TexGeni(GLbyte*); -extern void __glXDispSwap_TexGeniv(GLbyte*); -extern void __glXDispSwap_InitNames(GLbyte*); -extern void __glXDispSwap_LoadName(GLbyte*); -extern void __glXDispSwap_PassThrough(GLbyte*); -extern void __glXDispSwap_PopName(GLbyte*); -extern void __glXDispSwap_PushName(GLbyte*); -extern void __glXDispSwap_DrawBuffer(GLbyte*); -extern void __glXDispSwap_Clear(GLbyte*); -extern void __glXDispSwap_ClearAccum(GLbyte*); -extern void __glXDispSwap_ClearIndex(GLbyte*); -extern void __glXDispSwap_ClearColor(GLbyte*); -extern void __glXDispSwap_ClearStencil(GLbyte*); -extern void __glXDispSwap_ClearDepth(GLbyte*); -extern void __glXDispSwap_StencilMask(GLbyte*); -extern void __glXDispSwap_ColorMask(GLbyte*); -extern void __glXDispSwap_DepthMask(GLbyte*); -extern void __glXDispSwap_IndexMask(GLbyte*); -extern void __glXDispSwap_Accum(GLbyte*); -extern void __glXDispSwap_Disable(GLbyte*); -extern void __glXDispSwap_Enable(GLbyte*); -extern void __glXDispSwap_PopAttrib(GLbyte*); -extern void __glXDispSwap_PushAttrib(GLbyte*); -extern void __glXDispSwap_Map1d(GLbyte*); -extern void __glXDispSwap_Map1f(GLbyte*); -extern void __glXDispSwap_Map2d(GLbyte*); -extern void __glXDispSwap_Map2f(GLbyte*); -extern void __glXDispSwap_MapGrid1d(GLbyte*); -extern void __glXDispSwap_MapGrid1f(GLbyte*); -extern void __glXDispSwap_MapGrid2d(GLbyte*); -extern void __glXDispSwap_MapGrid2f(GLbyte*); -extern void __glXDispSwap_EvalCoord1dv(GLbyte*); -extern void __glXDispSwap_EvalCoord1fv(GLbyte*); -extern void __glXDispSwap_EvalCoord2dv(GLbyte*); -extern void __glXDispSwap_EvalCoord2fv(GLbyte*); -extern void __glXDispSwap_EvalMesh1(GLbyte*); -extern void __glXDispSwap_EvalPoint1(GLbyte*); -extern void __glXDispSwap_EvalMesh2(GLbyte*); -extern void __glXDispSwap_EvalPoint2(GLbyte*); -extern void __glXDispSwap_AlphaFunc(GLbyte*); -extern void __glXDispSwap_BlendFunc(GLbyte*); -extern void __glXDispSwap_LogicOp(GLbyte*); -extern void __glXDispSwap_StencilFunc(GLbyte*); -extern void __glXDispSwap_StencilOp(GLbyte*); -extern void __glXDispSwap_DepthFunc(GLbyte*); -extern void __glXDispSwap_PixelZoom(GLbyte*); -extern void __glXDispSwap_PixelTransferf(GLbyte*); -extern void __glXDispSwap_PixelTransferi(GLbyte*); -extern void __glXDispSwap_PixelMapfv(GLbyte*); -extern void __glXDispSwap_PixelMapuiv(GLbyte*); -extern void __glXDispSwap_PixelMapusv(GLbyte*); -extern void __glXDispSwap_ReadBuffer(GLbyte*); -extern void __glXDispSwap_CopyPixels(GLbyte*); -extern void __glXDispSwap_DrawPixels(GLbyte*); -extern void __glXDispSwap_DepthRange(GLbyte*); -extern void __glXDispSwap_Frustum(GLbyte*); -extern void __glXDispSwap_LoadIdentity(GLbyte*); -extern void __glXDispSwap_LoadMatrixf(GLbyte*); -extern void __glXDispSwap_LoadMatrixd(GLbyte*); -extern void __glXDispSwap_MatrixMode(GLbyte*); -extern void __glXDispSwap_MultMatrixf(GLbyte*); -extern void __glXDispSwap_MultMatrixd(GLbyte*); -extern void __glXDispSwap_Ortho(GLbyte*); -extern void __glXDispSwap_PopMatrix(GLbyte*); -extern void __glXDispSwap_PushMatrix(GLbyte*); -extern void __glXDispSwap_Rotated(GLbyte*); -extern void __glXDispSwap_Rotatef(GLbyte*); -extern void __glXDispSwap_Scaled(GLbyte*); -extern void __glXDispSwap_Scalef(GLbyte*); -extern void __glXDispSwap_Translated(GLbyte*); -extern void __glXDispSwap_Translatef(GLbyte*); -extern void __glXDispSwap_Viewport(GLbyte*); -extern void __glXDispSwap_PolygonOffset(GLbyte*); -extern void __glXDispSwap_DrawArrays(GLbyte*); -extern void __glXDispSwap_Indexubv(GLbyte*); -extern void __glXDispSwap_ColorSubTable(GLbyte*); -extern void __glXDispSwap_CopyColorSubTable(GLbyte*); -extern void __glXDispSwap_ActiveTextureARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord1dvARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord1fvARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord1ivARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord1svARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord2dvARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord2fvARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord2ivARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord2svARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord3dvARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord3fvARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord3ivARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord3svARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord4dvARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte*); -extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte*); -extern void __glXDispSwap_SampleCoverageARB(GLbyte *); -extern void __glXDispSwap_WindowPos3fARB(GLbyte *); - #define __GLX_MIN_GLXCMD_OPCODE 1 #define __GLX_MAX_GLXCMD_OPCODE 20 #define __GLX_MIN_RENDER_OPCODE 1 diff --git a/nx-X11/programs/Xserver/GL/glx/g_disptab_EXT.c b/nx-X11/programs/Xserver/GL/glx/g_disptab_EXT.c index 754e9854de..087fb24722 100644 --- a/nx-X11/programs/Xserver/GL/glx/g_disptab_EXT.c +++ b/nx-X11/programs/Xserver/GL/glx/g_disptab_EXT.c @@ -35,6 +35,8 @@ #include "glxserver.h" #include "glxext.h" #include "g_disptab_EXT.h" +#include "indirect_dispatch.h" + __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { __glXDisp_ColorTable, /* 2053 */ __glXDisp_ColorTableParameterfv, /* 2054 */ @@ -49,8 +51,8 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, #ifndef MISSING_GL_EXTS - __glXDisp_PointParameterfARB, /* 2065 */ - __glXDisp_PointParameterfvARB, /* 2066 */ + __glXDisp_PointParameterfEXT, /* 2065 */ + __glXDisp_PointParameterfvEXT, /* 2066 */ #else __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, @@ -2104,7 +2106,7 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __ __glXDisp_ResetMinmax, __glXDisp_TexImage3D, __glXDisp_TexSubImage3D, - __glXDisp_DrawArraysEXT, + __glXDisp_DrawArrays, __glXDisp_BindTexture, __glXDisp_PrioritizeTextures, __glXDisp_CopyTexImage1D, @@ -2113,17 +2115,17 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __ __glXDisp_CopyTexSubImage2D, /* 4122 */ __glXDisp_CopyTexSubImage3D, /* 4123 */ #ifndef MISSING_GL_EXTS - __glXDisp_FogCoordfv, /* 4124 */ - __glXDisp_FogCoorddv, /* 4125 */ - __glXDisp_SecondaryColor3bv, /* 4126 */ - __glXDisp_SecondaryColor3sv, /* 4127 */ - __glXDisp_SecondaryColor3iv, /* 4128 */ - __glXDisp_SecondaryColor3fv, /* 4129 */ - __glXDisp_SecondaryColor3dv, /* 4130 */ - __glXDisp_SecondaryColor3ubv, /* 4131 */ - __glXDisp_SecondaryColor3usv, /* 4132 */ - __glXDisp_SecondaryColor3uiv, /* 4133 */ - __glXDisp_BlendFuncSeparate, /* 4134 */ + __glXDisp_FogCoordfvEXT, /* 4124 */ + __glXDisp_FogCoorddvEXT, /* 4125 */ + __glXDisp_SecondaryColor3bvEXT, /* 4126 */ + __glXDisp_SecondaryColor3svEXT, /* 4127 */ + __glXDisp_SecondaryColor3ivEXT, /* 4128 */ + __glXDisp_SecondaryColor3fvEXT, /* 4129 */ + __glXDisp_SecondaryColor3dvEXT, /* 4130 */ + __glXDisp_SecondaryColor3ubvEXT, /* 4131 */ + __glXDisp_SecondaryColor3usvEXT, /* 4132 */ + __glXDisp_SecondaryColor3uivEXT, /* 4133 */ + __glXDisp_BlendFuncSeparateEXT, /* 4134 */ #else __glXNoSuchRenderOpcode, /* 4124 */ __glXNoSuchRenderOpcode, /* 4125 */ @@ -2231,10 +2233,114 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __ __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, #endif + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + + __glXDisp_BindRenderbufferEXT, /* 4316 */ + __glXDisp_DeleteRenderbuffersEXT, /* 4317 */ + __glXDisp_RenderbufferStorageEXT, /* 4318 */ + __glXDisp_BindFramebufferEXT, /* 4319 */ + __glXDisp_DeleteFramebuffersEXT, /* 4320 */ + __glXDisp_FramebufferTexture1DEXT, /* 4321 */ + __glXDisp_FramebufferTexture2DEXT, /* 4322 */ + __glXDisp_FramebufferTexture3DEXT, /* 4323 */ + __glXDisp_FramebufferRenderbufferEXT, /* 4324 */ + __glXDisp_GenerateMipmapEXT /* 4325 */ }; __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = { __glXDisp_AreTexturesResidentEXT, /* 11 */ - __glXDisp_DeleteTexturesEXT, /* 12 */ + __glXDisp_DeleteTextures, /* 12 */ __glXDisp_GenTexturesEXT, /* 13 */ __glXDisp_IsTextureEXT, /* 14 */ }; @@ -2254,8 +2360,8 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, #ifndef MISSING_GL_EXTS - __glXDispSwap_PointParameterfARB, /* 2065 */ - __glXDispSwap_PointParameterfvARB, /* 2066 */ + __glXDispSwap_PointParameterfEXT, /* 2065 */ + __glXDispSwap_PointParameterfvEXT, /* 2066 */ #else __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, @@ -4309,7 +4415,7 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT __glXDispSwap_ResetMinmax, __glXDispSwap_TexImage3D, __glXDispSwap_TexSubImage3D, - __glXDispSwap_DrawArraysEXT, + __glXDispSwap_DrawArrays, __glXDispSwap_BindTexture, __glXDispSwap_PrioritizeTextures, __glXDispSwap_CopyTexImage1D, @@ -4318,17 +4424,17 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT __glXDispSwap_CopyTexSubImage2D, /* 4122 */ __glXDispSwap_CopyTexSubImage3D, /* 4123 */ #ifndef MISSING_GL_EXTS - __glXDispSwap_FogCoordfv, /* 4124 */ - __glXDispSwap_FogCoorddv, /* 4125 */ - __glXDispSwap_SecondaryColor3bv, /* 4126 */ - __glXDispSwap_SecondaryColor3sv, /* 4127 */ - __glXDispSwap_SecondaryColor3iv, /* 4128 */ - __glXDispSwap_SecondaryColor3fv, /* 4129 */ - __glXDispSwap_SecondaryColor3dv, /* 4130 */ - __glXDispSwap_SecondaryColor3ubv, /* 4131 */ - __glXDispSwap_SecondaryColor3usv, /* 4132 */ - __glXDispSwap_SecondaryColor3uiv, /* 4133 */ - __glXDisp_BlendFuncSeparate, /* 4134 */ + __glXDispSwap_FogCoordfvEXT, /* 4124 */ + __glXDispSwap_FogCoorddvEXT, /* 4125 */ + __glXDispSwap_SecondaryColor3bvEXT, /* 4126 */ + __glXDispSwap_SecondaryColor3svEXT, /* 4127 */ + __glXDispSwap_SecondaryColor3ivEXT, /* 4128 */ + __glXDispSwap_SecondaryColor3fvEXT, /* 4129 */ + __glXDispSwap_SecondaryColor3dvEXT, /* 4130 */ + __glXDispSwap_SecondaryColor3ubvEXT, /* 4131 */ + __glXDispSwap_SecondaryColor3usvEXT, /* 4132 */ + __glXDispSwap_SecondaryColor3uivEXT, /* 4133 */ + __glXDisp_BlendFuncSeparateEXT, /* 4134 */ #else __glXNoSuchRenderOpcode, /* 4124 */ __glXNoSuchRenderOpcode, /* 4125 */ @@ -4436,10 +4542,114 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, #endif + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + __glXNoSuchRenderOpcode, + + __glXDispSwap_BindRenderbufferEXT, /* 4316 */ + __glXDispSwap_DeleteRenderbuffersEXT, /* 4317 */ + __glXDispSwap_RenderbufferStorageEXT, /* 4318 */ + __glXDispSwap_BindFramebufferEXT, /* 4319 */ + __glXDispSwap_DeleteFramebuffersEXT, /* 4320 */ + __glXDispSwap_FramebufferTexture1DEXT, /* 4321 */ + __glXDispSwap_FramebufferTexture2DEXT, /* 4322 */ + __glXDispSwap_FramebufferTexture3DEXT, /* 4323 */ + __glXDispSwap_FramebufferRenderbufferEXT, /* 4324 */ + __glXDispSwap_GenerateMipmapEXT /* 4325 */ }; __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = { __glXDispSwap_AreTexturesResidentEXT, /* 11 */ - __glXDispSwap_DeleteTexturesEXT, /* 12 */ + __glXDispSwap_DeleteTextures, /* 12 */ __glXDispSwap_GenTexturesEXT, /* 13 */ __glXDispSwap_IsTextureEXT, /* 14 */ }; diff --git a/nx-X11/programs/Xserver/GL/glx/g_disptab_EXT.h b/nx-X11/programs/Xserver/GL/glx/g_disptab_EXT.h index 3c1872f09d..62a7517c49 100644 --- a/nx-X11/programs/Xserver/GL/glx/g_disptab_EXT.h +++ b/nx-X11/programs/Xserver/GL/glx/g_disptab_EXT.h @@ -34,119 +34,8 @@ ** version 1.2.1 Specification. */ -extern int __glXDisp_AreTexturesResidentEXT(__GLXclientState*, GLbyte*); -extern int __glXDisp_DeleteTexturesEXT(__GLXclientState*, GLbyte*); -extern int __glXDisp_GenTexturesEXT(__GLXclientState*, GLbyte*); -extern int __glXDisp_IsTextureEXT(__GLXclientState*, GLbyte*); - -extern void __glXDisp_ColorTable(GLbyte*); -extern void __glXDisp_ColorTableParameterfv(GLbyte*); -extern void __glXDisp_ColorTableParameteriv(GLbyte*); -extern void __glXDisp_CopyColorTable(GLbyte*); -extern void __glXDisp_BlendColor(GLbyte*); -extern void __glXDisp_BlendEquation(GLbyte*); -extern void __glXDisp_TexSubImage1D(GLbyte*); -extern void __glXDisp_TexSubImage2D(GLbyte*); -extern void __glXDisp_ConvolutionFilter1D(GLbyte*); -extern void __glXDisp_ConvolutionFilter2D(GLbyte*); -extern void __glXDisp_ConvolutionParameterf(GLbyte*); -extern void __glXDisp_ConvolutionParameterfv(GLbyte*); -extern void __glXDisp_ConvolutionParameteri(GLbyte*); -extern void __glXDisp_ConvolutionParameteriv(GLbyte*); -extern void __glXDisp_CopyConvolutionFilter1D(GLbyte*); -extern void __glXDisp_CopyConvolutionFilter2D(GLbyte*); -extern void __glXDisp_SeparableFilter2D(GLbyte*); -extern void __glXDisp_Histogram(GLbyte*); -extern void __glXDisp_Minmax(GLbyte*); -extern void __glXDisp_ResetHistogram(GLbyte*); -extern void __glXDisp_ResetMinmax(GLbyte*); -extern void __glXDisp_TexImage3D(GLbyte*); -extern void __glXDisp_TexSubImage3D(GLbyte*); -extern void __glXDisp_DrawArraysEXT(GLbyte*); -extern void __glXDisp_BindTexture(GLbyte*); -extern void __glXDisp_PrioritizeTextures(GLbyte*); -extern void __glXDisp_CopyTexImage1D(GLbyte*); -extern void __glXDisp_CopyTexImage2D(GLbyte*); -extern void __glXDisp_CopyTexSubImage1D(GLbyte*); -extern void __glXDisp_CopyTexSubImage2D(GLbyte*); -extern void __glXDisp_CopyTexSubImage3D(GLbyte*); -extern void __glXDisp_PointParameterfARB(GLbyte*); -extern void __glXDisp_PointParameterfvARB(GLbyte*); - -extern void __glXDisp_FogCoordfv(GLbyte *); -extern void __glXDisp_FogCoorddv(GLbyte *); -extern void __glXDispSwap_FogCoordfv(GLbyte *); -extern void __glXDispSwap_FogCoorddv(GLbyte *); - -extern void __glXDisp_SecondaryColor3bv(GLbyte *); -extern void __glXDisp_SecondaryColor3sv(GLbyte *); -extern void __glXDisp_SecondaryColor3iv(GLbyte *); -extern void __glXDisp_SecondaryColor3ubv(GLbyte *); -extern void __glXDisp_SecondaryColor3usv(GLbyte *); -extern void __glXDisp_SecondaryColor3uiv(GLbyte *); -extern void __glXDisp_SecondaryColor3fv(GLbyte *); -extern void __glXDisp_SecondaryColor3dv(GLbyte *); -extern void __glXDispSwap_SecondaryColor3bv(GLbyte *); -extern void __glXDispSwap_SecondaryColor3sv(GLbyte *); -extern void __glXDispSwap_SecondaryColor3iv(GLbyte *); -extern void __glXDispSwap_SecondaryColor3ubv(GLbyte *); -extern void __glXDispSwap_SecondaryColor3usv(GLbyte *); -extern void __glXDispSwap_SecondaryColor3uiv(GLbyte *); -extern void __glXDispSwap_SecondaryColor3fv(GLbyte *); -extern void __glXDispSwap_SecondaryColor3dv(GLbyte *); - -extern void __glXDisp_BlendFuncSeparate(GLbyte *); -extern void __glXDispSwap_BlendFuncSeparate(GLbyte *); - -extern void __glXDisp_PointParameteriNV(GLbyte *); -extern void __glXDisp_PointParameterivNV(GLbyte *); -extern void __glXDispSwap_PointParameteriNV(GLbyte *); -extern void __glXDispSwap_PointParameterivNV(GLbyte *); - -extern void __glXDisp_ActiveStencilFaceEXT(GLbyte*); - -extern int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_DeleteTexturesEXT(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_GenTexturesEXT(__GLXclientState*, GLbyte*); -extern int __glXDispSwap_IsTextureEXT(__GLXclientState*, GLbyte*); - -extern void __glXDispSwap_ColorTable(GLbyte*); -extern void __glXDispSwap_ColorTableParameterfv(GLbyte*); -extern void __glXDispSwap_ColorTableParameteriv(GLbyte*); -extern void __glXDispSwap_CopyColorTable(GLbyte*); -extern void __glXDispSwap_BlendColor(GLbyte*); -extern void __glXDispSwap_BlendEquation(GLbyte*); -extern void __glXDispSwap_TexSubImage1D(GLbyte*); -extern void __glXDispSwap_TexSubImage2D(GLbyte*); -extern void __glXDispSwap_ConvolutionFilter1D(GLbyte*); -extern void __glXDispSwap_ConvolutionFilter2D(GLbyte*); -extern void __glXDispSwap_ConvolutionParameterf(GLbyte*); -extern void __glXDispSwap_ConvolutionParameterfv(GLbyte*); -extern void __glXDispSwap_ConvolutionParameteri(GLbyte*); -extern void __glXDispSwap_ConvolutionParameteriv(GLbyte*); -extern void __glXDispSwap_CopyConvolutionFilter1D(GLbyte*); -extern void __glXDispSwap_CopyConvolutionFilter2D(GLbyte*); -extern void __glXDispSwap_SeparableFilter2D(GLbyte*); -extern void __glXDispSwap_Histogram(GLbyte*); -extern void __glXDispSwap_Minmax(GLbyte*); -extern void __glXDispSwap_ResetHistogram(GLbyte*); -extern void __glXDispSwap_ResetMinmax(GLbyte*); -extern void __glXDispSwap_TexImage3D(GLbyte*); -extern void __glXDispSwap_TexSubImage3D(GLbyte*); -extern void __glXDispSwap_DrawArraysEXT(GLbyte*); -extern void __glXDispSwap_BindTexture(GLbyte*); -extern void __glXDispSwap_PrioritizeTextures(GLbyte*); -extern void __glXDispSwap_CopyTexImage1D(GLbyte*); -extern void __glXDispSwap_CopyTexImage2D(GLbyte*); -extern void __glXDispSwap_CopyTexSubImage1D(GLbyte*); -extern void __glXDispSwap_CopyTexSubImage2D(GLbyte*); -extern void __glXDispSwap_CopyTexSubImage3D(GLbyte*); -extern void __glXDispSwap_PointParameterfARB(GLbyte*); -extern void __glXDispSwap_PointParameterfvARB(GLbyte*); -extern void __glXDispSwap_ActiveStencilFaceEXT(GLbyte*); - #define __GLX_MIN_RENDER_OPCODE_EXT 2053 -#define __GLX_MAX_RENDER_OPCODE_EXT 4222 +#define __GLX_MAX_RENDER_OPCODE_EXT 4325 #define __GLX_MIN_VENDPRIV_OPCODE_EXT 11 #define __GLX_MAX_VENDPRIV_OPCODE_EXT 14 #define __GLX_VENDPRIV_TABLE_SIZE_EXT (__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1) diff --git a/nx-X11/programs/Xserver/GL/glx/g_render.c b/nx-X11/programs/Xserver/GL/glx/g_render.c deleted file mode 100644 index ae3416bedc..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/g_render.c +++ /dev/null @@ -1,2280 +0,0 @@ -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "glxext.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" -#include "unpack.h" -#include "impsize.h" -#include "singlesize.h" - -void __glXDisp_CallList(GLbyte *pc) -{ - glCallList( - *(GLuint *)(pc + 0) - ); -} - -void __glXDisp_ListBase(GLbyte *pc) -{ - glListBase( - *(GLuint *)(pc + 0) - ); -} - -void __glXDisp_Begin(GLbyte *pc) -{ - glBegin( - *(GLenum *)(pc + 0) - ); -} - -#define __GLX_SWAP_GLbyte(ptr) -#define __GLX_SWAP_GLshort(ptr) __GLX_SWAP_SHORT(ptr) -#define __GLX_SWAP_GLint(ptr) __GLX_SWAP_INT(ptr) -#define __GLX_SWAP_GLubyte(ptr) -#define __GLX_SWAP_GLushort(ptr) __GLX_SWAP_SHORT(ptr) -#define __GLX_SWAP_GLuint(ptr) __GLX_SWAP_INT(ptr) -#define __GLX_SWAP_GLdouble(ptr) __GLX_SWAP_DOUBLE(ptr) -#define __GLX_SWAP_GLfloat(ptr) __GLX_SWAP_FLOAT(ptr) - -#define __GLX_SWAP_GLbyte_ARRAY(ptr,count) (void) swapEnd; (void) swapPC; (void) sw; -#define __GLX_SWAP_GLshort_ARRAY(ptr,count) __GLX_SWAP_SHORT_ARRAY(ptr,count) -#define __GLX_SWAP_GLint_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count) -#define __GLX_SWAP_GLenum_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count) -#define __GLX_SWAP_GLubyte_ARRAY(ptr,count) (void) swapEnd; (void) swapPC; (void) sw; -#define __GLX_SWAP_GLushort_ARRAY(ptr,count) __GLX_SWAP_SHORT_ARRAY(ptr,count) -#define __GLX_SWAP_GLuint_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count) -#define __GLX_SWAP_GLdouble_ARRAY(ptr,count) __GLX_SWAP_DOUBLE_ARRAY(ptr,count) -#define __GLX_SWAP_GLfloat_ARRAY(ptr,count) __GLX_SWAP_FLOAT_ARRAY(ptr,count) - -#ifdef __GLX_ALIGN64 -/* If type is not GLdouble, the compiler should optimize this away. - */ -# define GLX_DO_ALIGN_MAGIC(count, type) \ - do { \ - if ( (sizeof(type) == 8) && ((unsigned long)(pc) & 7)) \ - { \ - __GLX_MEM_COPY(pc-4, pc, (count * sizeof( type ) )); \ - pc -= 4; \ - } \ - } while( 0 ) -#else -# define GLX_DO_ALIGN_MAGIC(count, type) -#endif - -#define dispatch_template_1( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - GLX_DO_ALIGN_MAGIC( 1, type ); \ - gl ## name ( (type *) pc ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - GLX_DO_ALIGN_MAGIC( 1, type ); \ - __GLX_SWAP_ ## type ( pc ); \ - gl ## name ( (type *) pc ); \ - } - -#define dispatch_template_3( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - GLX_DO_ALIGN_MAGIC( 3, type ); \ - gl ## name ( (type *) pc ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; \ - GLX_DO_ALIGN_MAGIC( 3, type ); \ - __GLX_SWAP_ ## type ## _ARRAY(pc, 3); \ - gl ## name ( (type *) pc ); \ - } - -#define dispatch_template_4( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - GLX_DO_ALIGN_MAGIC( 4, type ); \ - gl ## name ( (type *) pc ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; \ - GLX_DO_ALIGN_MAGIC( 4, type ); \ - __GLX_SWAP_ ## type ## _ARRAY(pc, 4); \ - gl ## name ( (type *) pc ); \ - } - -#define dispatch_template_4s( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - GLX_DO_ALIGN_MAGIC( 4, type ); \ - gl ## name ( ((type *) pc)[0], ((type *) pc)[1], \ - ((type *) pc)[2], ((type *) pc)[3] ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; \ - GLX_DO_ALIGN_MAGIC( 4, type ); \ - __GLX_SWAP_ ## type ## _ARRAY(pc, 4); \ - gl ## name ( ((type *) pc)[0], ((type *) pc)[1], \ - ((type *) pc)[2], ((type *) pc)[3] ); \ - } - -/** - * \bug All of the enum1 templates need to be updated to handle the case where - * \c type is \c GLdouble. When the type is a double, the data comes before - * the enum. This is also the reason the invocation of the - * \c GLX_DO_ALIGN_MAGIC macro was removed. - */ -#define dispatch_template_enum1_1s( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - gl ## name ( *(GLenum *) (pc + 0), \ - *(type *) (pc + 4) ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_SWAP_INT (pc + 0); \ - __GLX_SWAP_ ## type (pc + 4); \ - gl ## name ( *(GLenum *) (pc + 0), \ - *(type *) (pc + 4) ); \ - } - -#define dispatch_template_enum1_Vv( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - gl ## name ( *(GLenum *) (pc + 0), \ - (type *) (pc + 4) ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - GLenum pname; GLint compsize; \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; \ - __GLX_SWAP_INT(pc + 0); \ - pname = *(GLenum *)(pc + 0); \ - compsize = __gl ## name ## _size(pname); \ - if (compsize < 0) compsize = 0; \ - __GLX_SWAP_ ## type ## _ARRAY(pc + 4, compsize); \ - gl ## name ( *(GLenum *) (pc + 0), \ - (type *) (pc + 4) ); \ - } - -#ifndef MISSING_GL_EXTS -dispatch_template_1( FogCoordfv, GLfloat ) -dispatch_template_1( FogCoorddv, GLdouble ) -dispatch_template_3( SecondaryColor3bv, GLbyte ) -dispatch_template_3( SecondaryColor3sv, GLshort ) -dispatch_template_3( SecondaryColor3iv, GLint ) -dispatch_template_3( SecondaryColor3ubv, GLubyte ) -dispatch_template_3( SecondaryColor3usv, GLushort ) -dispatch_template_3( SecondaryColor3uiv, GLuint ) -dispatch_template_3( SecondaryColor3fv, GLfloat ) -dispatch_template_3( SecondaryColor3dv, GLdouble ) - -dispatch_template_4s( BlendFuncSeparate, GLenum ) -#endif /* !MISSING_GL_EXTS */ - -void __glXDisp_Color3bv(GLbyte *pc) -{ - glColor3bv( - (GLbyte *)(pc + 0) - ); -} - -void __glXDisp_Color3dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - glColor3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_Color3fv(GLbyte *pc) -{ - glColor3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_Color3iv(GLbyte *pc) -{ - glColor3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_Color3sv(GLbyte *pc) -{ - glColor3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_Color3ubv(GLbyte *pc) -{ - glColor3ubv( - (GLubyte *)(pc + 0) - ); -} - -void __glXDisp_Color3uiv(GLbyte *pc) -{ - glColor3uiv( - (GLuint *)(pc + 0) - ); -} - -void __glXDisp_Color3usv(GLbyte *pc) -{ - glColor3usv( - (GLushort *)(pc + 0) - ); -} - -void __glXDisp_Color4bv(GLbyte *pc) -{ - glColor4bv( - (GLbyte *)(pc + 0) - ); -} - -void __glXDisp_Color4dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - glColor4dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_Color4fv(GLbyte *pc) -{ - glColor4fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_Color4iv(GLbyte *pc) -{ - glColor4iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_Color4sv(GLbyte *pc) -{ - glColor4sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_Color4ubv(GLbyte *pc) -{ - glColor4ubv( - (GLubyte *)(pc + 0) - ); -} - -void __glXDisp_Color4uiv(GLbyte *pc) -{ - glColor4uiv( - (GLuint *)(pc + 0) - ); -} - -void __glXDisp_Color4usv(GLbyte *pc) -{ - glColor4usv( - (GLushort *)(pc + 0) - ); -} - -void __glXDisp_EdgeFlagv(GLbyte *pc) -{ - glEdgeFlagv( - (GLboolean *)(pc + 0) - ); -} - -void __glXDisp_End(GLbyte *pc) -{ - glEnd( - ); -} - -void __glXDisp_Indexdv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 8); - pc -= 4; - } -#endif - glIndexdv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_Indexfv(GLbyte *pc) -{ - glIndexfv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_Indexiv(GLbyte *pc) -{ - glIndexiv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_Indexsv(GLbyte *pc) -{ - glIndexsv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_Normal3bv(GLbyte *pc) -{ - glNormal3bv( - (GLbyte *)(pc + 0) - ); -} - -void __glXDisp_Normal3dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - glNormal3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_Normal3fv(GLbyte *pc) -{ - glNormal3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_Normal3iv(GLbyte *pc) -{ - glNormal3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_Normal3sv(GLbyte *pc) -{ - glNormal3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_RasterPos2dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - glRasterPos2dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_RasterPos2fv(GLbyte *pc) -{ - glRasterPos2fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_RasterPos2iv(GLbyte *pc) -{ - glRasterPos2iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_RasterPos2sv(GLbyte *pc) -{ - glRasterPos2sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_RasterPos3dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - glRasterPos3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_RasterPos3fv(GLbyte *pc) -{ - glRasterPos3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_RasterPos3iv(GLbyte *pc) -{ - glRasterPos3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_RasterPos3sv(GLbyte *pc) -{ - glRasterPos3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_RasterPos4dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - glRasterPos4dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_RasterPos4fv(GLbyte *pc) -{ - glRasterPos4fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_RasterPos4iv(GLbyte *pc) -{ - glRasterPos4iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_RasterPos4sv(GLbyte *pc) -{ - glRasterPos4sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_Rectdv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - glRectdv( - (GLdouble *)(pc + 0), - (GLdouble *)(pc + 16) - ); -} - -void __glXDisp_Rectfv(GLbyte *pc) -{ - glRectfv( - (GLfloat *)(pc + 0), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_Rectiv(GLbyte *pc) -{ - glRectiv( - (GLint *)(pc + 0), - (GLint *)(pc + 8) - ); -} - -void __glXDisp_Rectsv(GLbyte *pc) -{ - glRectsv( - (GLshort *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - -void __glXDisp_TexCoord1dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 8); - pc -= 4; - } -#endif - glTexCoord1dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_TexCoord1fv(GLbyte *pc) -{ - glTexCoord1fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_TexCoord1iv(GLbyte *pc) -{ - glTexCoord1iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_TexCoord1sv(GLbyte *pc) -{ - glTexCoord1sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_TexCoord2dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - glTexCoord2dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_TexCoord2fv(GLbyte *pc) -{ - glTexCoord2fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_TexCoord2iv(GLbyte *pc) -{ - glTexCoord2iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_TexCoord2sv(GLbyte *pc) -{ - glTexCoord2sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_TexCoord3dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - glTexCoord3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_TexCoord3fv(GLbyte *pc) -{ - glTexCoord3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_TexCoord3iv(GLbyte *pc) -{ - glTexCoord3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_TexCoord3sv(GLbyte *pc) -{ - glTexCoord3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_TexCoord4dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - glTexCoord4dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_TexCoord4fv(GLbyte *pc) -{ - glTexCoord4fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_TexCoord4iv(GLbyte *pc) -{ - glTexCoord4iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_TexCoord4sv(GLbyte *pc) -{ - glTexCoord4sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_Vertex2dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - glVertex2dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_Vertex2fv(GLbyte *pc) -{ - glVertex2fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_Vertex2iv(GLbyte *pc) -{ - glVertex2iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_Vertex2sv(GLbyte *pc) -{ - glVertex2sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_Vertex3dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - glVertex3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_Vertex3fv(GLbyte *pc) -{ - glVertex3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_Vertex3iv(GLbyte *pc) -{ - glVertex3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_Vertex3sv(GLbyte *pc) -{ - glVertex3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_Vertex4dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - glVertex4dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_Vertex4fv(GLbyte *pc) -{ - glVertex4fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_Vertex4iv(GLbyte *pc) -{ - glVertex4iv( - (GLint *)(pc + 0) - ); -} - -void __glXDisp_Vertex4sv(GLbyte *pc) -{ - glVertex4sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDisp_ClipPlane(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 36); - pc -= 4; - } -#endif - glClipPlane( - *(GLenum *)(pc + 32), - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_ColorMaterial(GLbyte *pc) -{ - glColorMaterial( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ); -} - -void __glXDisp_CullFace(GLbyte *pc) -{ - glCullFace( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_Fogf(GLbyte *pc) -{ - glFogf( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDisp_Fogfv(GLbyte *pc) -{ - glFogfv( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDisp_Fogi(GLbyte *pc) -{ - glFogi( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ); -} - -void __glXDisp_Fogiv(GLbyte *pc) -{ - glFogiv( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDisp_FrontFace(GLbyte *pc) -{ - glFrontFace( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_Hint(GLbyte *pc) -{ - glHint( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ); -} - -void __glXDisp_Lightf(GLbyte *pc) -{ - glLightf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_Lightfv(GLbyte *pc) -{ - glLightfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_Lighti(GLbyte *pc) -{ - glLighti( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDisp_Lightiv(GLbyte *pc) -{ - glLightiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDisp_LightModelf(GLbyte *pc) -{ - glLightModelf( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDisp_LightModelfv(GLbyte *pc) -{ - glLightModelfv( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDisp_LightModeli(GLbyte *pc) -{ - glLightModeli( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ); -} - -void __glXDisp_LightModeliv(GLbyte *pc) -{ - glLightModeliv( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDisp_LineStipple(GLbyte *pc) -{ - glLineStipple( - *(GLint *)(pc + 0), - *(GLushort *)(pc + 4) - ); -} - -void __glXDisp_LineWidth(GLbyte *pc) -{ - glLineWidth( - *(GLfloat *)(pc + 0) - ); -} - -void __glXDisp_Materialf(GLbyte *pc) -{ - glMaterialf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_Materialfv(GLbyte *pc) -{ - glMaterialfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_Materiali(GLbyte *pc) -{ - glMateriali( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDisp_Materialiv(GLbyte *pc) -{ - glMaterialiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDisp_PointSize(GLbyte *pc) -{ - glPointSize( - *(GLfloat *)(pc + 0) - ); -} - -void __glXDisp_PolygonMode(GLbyte *pc) -{ - glPolygonMode( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ); -} - -void __glXDisp_Scissor(GLbyte *pc) -{ - glScissor( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ); -} - -void __glXDisp_ShadeModel(GLbyte *pc) -{ - glShadeModel( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_TexParameterf(GLbyte *pc) -{ - glTexParameterf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_TexParameterfv(GLbyte *pc) -{ - glTexParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_TexParameteri(GLbyte *pc) -{ - glTexParameteri( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDisp_TexParameteriv(GLbyte *pc) -{ - glTexParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDisp_TexEnvf(GLbyte *pc) -{ - glTexEnvf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_TexEnvfv(GLbyte *pc) -{ - glTexEnvfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_TexEnvi(GLbyte *pc) -{ - glTexEnvi( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDisp_TexEnviv(GLbyte *pc) -{ - glTexEnviv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDisp_TexGend(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - glTexGend( - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12), - *(GLdouble *)(pc + 0) - ); -} - -void __glXDisp_TexGendv(GLbyte *pc) -{ -#ifdef __GLX_ALIGN64 - GLenum pname; - GLint cmdlen; - GLint compsize; - - pname = *(GLenum *)(pc + 4); - compsize = __glTexGendv_size(pname); - if (compsize < 0) compsize = 0; - cmdlen = __GLX_PAD(8+compsize*8); - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - glTexGendv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLdouble *)(pc + 8) - ); -} - -void __glXDisp_TexGenf(GLbyte *pc) -{ - glTexGenf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_TexGenfv(GLbyte *pc) -{ - glTexGenfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_TexGeni(GLbyte *pc) -{ - glTexGeni( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDisp_TexGeniv(GLbyte *pc) -{ - glTexGeniv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDisp_InitNames(GLbyte *pc) -{ - glInitNames( - ); -} - -void __glXDisp_LoadName(GLbyte *pc) -{ - glLoadName( - *(GLuint *)(pc + 0) - ); -} - -void __glXDisp_PassThrough(GLbyte *pc) -{ - glPassThrough( - *(GLfloat *)(pc + 0) - ); -} - -void __glXDisp_PopName(GLbyte *pc) -{ - glPopName( - ); -} - -void __glXDisp_PushName(GLbyte *pc) -{ - glPushName( - *(GLuint *)(pc + 0) - ); -} - -void __glXDisp_DrawBuffer(GLbyte *pc) -{ - glDrawBuffer( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_Clear(GLbyte *pc) -{ - glClear( - *(GLbitfield *)(pc + 0) - ); -} - -void __glXDisp_ClearAccum(GLbyte *pc) -{ - glClearAccum( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLfloat *)(pc + 12) - ); -} - -void __glXDisp_ClearIndex(GLbyte *pc) -{ - glClearIndex( - *(GLfloat *)(pc + 0) - ); -} - -void __glXDisp_ClearColor(GLbyte *pc) -{ - glClearColor( - *(GLclampf *)(pc + 0), - *(GLclampf *)(pc + 4), - *(GLclampf *)(pc + 8), - *(GLclampf *)(pc + 12) - ); -} - -void __glXDisp_ClearStencil(GLbyte *pc) -{ - glClearStencil( - *(GLint *)(pc + 0) - ); -} - -void __glXDisp_ClearDepth(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 8); - pc -= 4; - } -#endif - glClearDepth( - *(GLclampd *)(pc + 0) - ); -} - -void __glXDisp_StencilMask(GLbyte *pc) -{ - glStencilMask( - *(GLuint *)(pc + 0) - ); -} - -void __glXDisp_ColorMask(GLbyte *pc) -{ - glColorMask( - *(GLboolean *)(pc + 0), - *(GLboolean *)(pc + 1), - *(GLboolean *)(pc + 2), - *(GLboolean *)(pc + 3) - ); -} - -void __glXDisp_DepthMask(GLbyte *pc) -{ - glDepthMask( - *(GLboolean *)(pc + 0) - ); -} - -void __glXDisp_IndexMask(GLbyte *pc) -{ - glIndexMask( - *(GLuint *)(pc + 0) - ); -} - -void __glXDisp_Accum(GLbyte *pc) -{ - glAccum( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDisp_Disable(GLbyte *pc) -{ - glDisable( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_Enable(GLbyte *pc) -{ - glEnable( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_PopAttrib(GLbyte *pc) -{ - glPopAttrib( - ); -} - -void __glXDisp_PushAttrib(GLbyte *pc) -{ - glPushAttrib( - *(GLbitfield *)(pc + 0) - ); -} - -void __glXDisp_MapGrid1d(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 20); - pc -= 4; - } -#endif - glMapGrid1d( - *(GLint *)(pc + 16), - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8) - ); -} - -void __glXDisp_MapGrid1f(GLbyte *pc) -{ - glMapGrid1f( - *(GLint *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_MapGrid2d(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 40); - pc -= 4; - } -#endif - glMapGrid2d( - *(GLint *)(pc + 32), - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLint *)(pc + 36), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24) - ); -} - -void __glXDisp_MapGrid2f(GLbyte *pc) -{ - glMapGrid2f( - *(GLint *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLint *)(pc + 12), - *(GLfloat *)(pc + 16), - *(GLfloat *)(pc + 20) - ); -} - -void __glXDisp_EvalCoord1dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 8); - pc -= 4; - } -#endif - glEvalCoord1dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_EvalCoord1fv(GLbyte *pc) -{ - glEvalCoord1fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_EvalCoord2dv(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - glEvalCoord2dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_EvalCoord2fv(GLbyte *pc) -{ - glEvalCoord2fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_EvalMesh1(GLbyte *pc) -{ - glEvalMesh1( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDisp_EvalPoint1(GLbyte *pc) -{ - glEvalPoint1( - *(GLint *)(pc + 0) - ); -} - -void __glXDisp_EvalMesh2(GLbyte *pc) -{ - glEvalMesh2( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16) - ); -} - -void __glXDisp_EvalPoint2(GLbyte *pc) -{ - glEvalPoint2( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4) - ); -} - -void __glXDisp_AlphaFunc(GLbyte *pc) -{ - glAlphaFunc( - *(GLenum *)(pc + 0), - *(GLclampf *)(pc + 4) - ); -} - -void __glXDisp_BlendFunc(GLbyte *pc) -{ - glBlendFunc( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ); -} - -void __glXDisp_LogicOp(GLbyte *pc) -{ - glLogicOp( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_StencilFunc(GLbyte *pc) -{ - glStencilFunc( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLuint *)(pc + 8) - ); -} - -void __glXDisp_StencilOp(GLbyte *pc) -{ - glStencilOp( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8) - ); -} - -void __glXDisp_DepthFunc(GLbyte *pc) -{ - glDepthFunc( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_PixelZoom(GLbyte *pc) -{ - glPixelZoom( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDisp_PixelTransferf(GLbyte *pc) -{ - glPixelTransferf( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDisp_PixelTransferi(GLbyte *pc) -{ - glPixelTransferi( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ); -} - -void __glXDisp_PixelMapfv(GLbyte *pc) -{ - glPixelMapfv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_PixelMapuiv(GLbyte *pc) -{ - glPixelMapuiv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - (GLuint *)(pc + 8) - ); -} - -void __glXDisp_PixelMapusv(GLbyte *pc) -{ - glPixelMapusv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - (GLushort *)(pc + 8) - ); -} - -void __glXDisp_ReadBuffer(GLbyte *pc) -{ - glReadBuffer( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_CopyPixels(GLbyte *pc) -{ - glCopyPixels( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLenum *)(pc + 16) - ); -} - -void __glXDisp_DepthRange(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - glDepthRange( - *(GLclampd *)(pc + 0), - *(GLclampd *)(pc + 8) - ); -} - -void __glXDisp_Frustum(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 48); - pc -= 4; - } -#endif - glFrustum( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24), - *(GLdouble *)(pc + 32), - *(GLdouble *)(pc + 40) - ); -} - -void __glXDisp_LoadIdentity(GLbyte *pc) -{ - glLoadIdentity( - ); -} - -void __glXDisp_LoadMatrixf(GLbyte *pc) -{ - glLoadMatrixf( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_LoadMatrixd(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 128); - pc -= 4; - } -#endif - glLoadMatrixd( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_MatrixMode(GLbyte *pc) -{ - glMatrixMode( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_MultMatrixf(GLbyte *pc) -{ - glMultMatrixf( - (GLfloat *)(pc + 0) - ); -} - -void __glXDisp_MultMatrixd(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 128); - pc -= 4; - } -#endif - glMultMatrixd( - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_Ortho(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 48); - pc -= 4; - } -#endif - glOrtho( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24), - *(GLdouble *)(pc + 32), - *(GLdouble *)(pc + 40) - ); -} - -void __glXDisp_PopMatrix(GLbyte *pc) -{ - glPopMatrix( - ); -} - -void __glXDisp_PushMatrix(GLbyte *pc) -{ - glPushMatrix( - ); -} - -void __glXDisp_Rotated(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - glRotated( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24) - ); -} - -void __glXDisp_Rotatef(GLbyte *pc) -{ - glRotatef( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLfloat *)(pc + 12) - ); -} - -void __glXDisp_Scaled(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - glScaled( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16) - ); -} - -void __glXDisp_Scalef(GLbyte *pc) -{ - glScalef( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_Translated(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - glTranslated( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16) - ); -} - -void __glXDisp_Translatef(GLbyte *pc) -{ - glTranslatef( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_Viewport(GLbyte *pc) -{ - glViewport( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ); -} - -void __glXDisp_PolygonOffset(GLbyte *pc) -{ - glPolygonOffset( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDisp_CopyTexImage1D(GLbyte *pc) -{ - 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) -{ - 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) -{ - glCopyTexSubImage1D( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20) - ); -} - -void __glXDisp_CopyTexSubImage2D(GLbyte *pc) -{ - 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) - ); -} - -void __glXDisp_BindTexture(GLbyte *pc) -{ - glBindTexture( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ); -} - -void __glXDisp_PrioritizeTextures(GLbyte *pc) -{ - GLsizei n; - - n = *(GLsizei *)(pc + 0); - - glPrioritizeTextures( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4), - (GLclampf *)(pc + 4+n*4) - ); -} - -void __glXDisp_Indexubv(GLbyte *pc) -{ - glIndexubv( - (GLubyte *)(pc + 0) - ); -} - -void __glXDisp_BlendColor(GLbyte *pc) -{ - glBlendColor( - *(GLclampf *)(pc + 0), - *(GLclampf *)(pc + 4), - *(GLclampf *)(pc + 8), - *(GLclampf *)(pc + 12) - ); -} - -void __glXDisp_BlendEquation(GLbyte *pc) -{ - glBlendEquation( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_ColorTableParameterfv(GLbyte *pc) -{ - glColorTableParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_ColorTableParameteriv(GLbyte *pc) -{ - glColorTableParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDisp_CopyColorTable(GLbyte *pc) -{ - glCopyColorTable( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ); -} - -void __glXDisp_CopyColorSubTable(GLbyte *pc) -{ - glCopyColorSubTable( - *(GLenum *)(pc + 0), - *(GLsizei *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ); -} - -void __glXDisp_ConvolutionParameterf(GLbyte *pc) -{ - glConvolutionParameterf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDisp_ConvolutionParameterfv(GLbyte *pc) -{ - glConvolutionParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDisp_ConvolutionParameteri(GLbyte *pc) -{ - glConvolutionParameteri( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDisp_ConvolutionParameteriv(GLbyte *pc) -{ - glConvolutionParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDisp_CopyConvolutionFilter1D(GLbyte *pc) -{ - glCopyConvolutionFilter1D( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ); -} - -void __glXDisp_CopyConvolutionFilter2D(GLbyte *pc) -{ - glCopyConvolutionFilter2D( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20) - ); -} - -void __glXDisp_Histogram(GLbyte *pc) -{ - glHistogram( - *(GLenum *)(pc + 0), - *(GLsizei *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLboolean *)(pc + 12) - ); -} - -void __glXDisp_Minmax(GLbyte *pc) -{ - glMinmax( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLboolean *)(pc + 8) - ); -} - -void __glXDisp_ResetHistogram(GLbyte *pc) -{ - glResetHistogram( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_ResetMinmax(GLbyte *pc) -{ - glResetMinmax( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_CopyTexSubImage3D(GLbyte *pc) -{ - 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_ActiveTextureARB(GLbyte *pc) -{ - glActiveTextureARB( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_MultiTexCoord1dvARB(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 12); - pc -= 4; - } -#endif - glMultiTexCoord1dvARB( - *(GLenum *)(pc + 8), - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_MultiTexCoord1fvARB(GLbyte *pc) -{ - glMultiTexCoord1fvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord1ivARB(GLbyte *pc) -{ - glMultiTexCoord1ivARB( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord1svARB(GLbyte *pc) -{ - glMultiTexCoord1svARB( - *(GLenum *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord2dvARB(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 20); - pc -= 4; - } -#endif - glMultiTexCoord2dvARB( - *(GLenum *)(pc + 16), - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_MultiTexCoord2fvARB(GLbyte *pc) -{ - glMultiTexCoord2fvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord2ivARB(GLbyte *pc) -{ - glMultiTexCoord2ivARB( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord2svARB(GLbyte *pc) -{ - glMultiTexCoord2svARB( - *(GLenum *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord3dvARB(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 28); - pc -= 4; - } -#endif - glMultiTexCoord3dvARB( - *(GLenum *)(pc + 24), - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_MultiTexCoord3fvARB(GLbyte *pc) -{ - glMultiTexCoord3fvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord3ivARB(GLbyte *pc) -{ - glMultiTexCoord3ivARB( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord3svARB(GLbyte *pc) -{ - glMultiTexCoord3svARB( - *(GLenum *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord4dvARB(GLbyte *pc) -{ - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 36); - pc -= 4; - } -#endif - glMultiTexCoord4dvARB( - *(GLenum *)(pc + 32), - (GLdouble *)(pc + 0) - ); -} - -void __glXDisp_MultiTexCoord4fvARB(GLbyte *pc) -{ - glMultiTexCoord4fvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord4ivARB(GLbyte *pc) -{ - glMultiTexCoord4ivARB( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDisp_MultiTexCoord4svARB(GLbyte *pc) -{ - glMultiTexCoord4svARB( - *(GLenum *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - - -/* - * Extensions - */ - -#ifndef MISSING_GL_EXTS - -void __glXDisp_PointParameterfARB(GLbyte *pc) -{ - glPointParameterfARB( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - - -void __glXDisp_PointParameterfvARB(GLbyte *pc) -{ - glPointParameterfvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -dispatch_template_enum1_1s(PointParameteriNV, GLint) -dispatch_template_enum1_Vv(PointParameterivNV, GLint) - -void __glXDisp_ActiveStencilFaceEXT(GLbyte *pc) -{ - glActiveStencilFaceEXT( - *(GLenum *)(pc + 0) - ); -} - -void __glXDisp_WindowPos3fARB(GLbyte *pc) -{ - glWindowPos3fARB( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} -#endif /* !MISSING_GL_EXTS */ - -void __glXDisp_SampleCoverageARB(GLbyte *pc) -{ - glSampleCoverageARB( - *(GLfloat *)(pc + 0), - *(GLboolean *)(pc + 4) - ); -} diff --git a/nx-X11/programs/Xserver/GL/glx/g_renderswap.c b/nx-X11/programs/Xserver/GL/glx/g_renderswap.c deleted file mode 100644 index 38b1497f14..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/g_renderswap.c +++ /dev/null @@ -1,3385 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "glxext.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" -#include "unpack.h" -#include "impsize.h" -#include "singlesize.h" - -void __glXDispSwap_CallList(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glCallList( - *(GLuint *)(pc + 0) - ); -} - -void __glXDispSwap_ListBase(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glListBase( - *(GLuint *)(pc + 0) - ); -} - -void __glXDispSwap_Begin(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glBegin( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_Color3bv(GLbyte *pc) -{ - glColor3bv( - (GLbyte *)(pc + 0) - ); -} - -void __glXDispSwap_Color3dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3); - - glColor3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_Color3fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); - - glColor3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_Color3iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 3); - - glColor3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_Color3sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); - - glColor3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_Color3ubv(GLbyte *pc) -{ - glColor3ubv( - (GLubyte *)(pc + 0) - ); -} - -void __glXDispSwap_Color3uiv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 3); - - glColor3uiv( - (GLuint *)(pc + 0) - ); -} - -void __glXDispSwap_Color3usv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); - - glColor3usv( - (GLushort *)(pc + 0) - ); -} - -void __glXDispSwap_Color4bv(GLbyte *pc) -{ - glColor4bv( - (GLbyte *)(pc + 0) - ); -} - -void __glXDispSwap_Color4dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4); - - glColor4dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_Color4fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); - - glColor4fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_Color4iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 4); - - glColor4iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_Color4sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); - - glColor4sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_Color4ubv(GLbyte *pc) -{ - glColor4ubv( - (GLubyte *)(pc + 0) - ); -} - -void __glXDispSwap_Color4uiv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 4); - - glColor4uiv( - (GLuint *)(pc + 0) - ); -} - -void __glXDispSwap_Color4usv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); - - glColor4usv( - (GLushort *)(pc + 0) - ); -} - -void __glXDispSwap_EdgeFlagv(GLbyte *pc) -{ - glEdgeFlagv( - (GLboolean *)(pc + 0) - ); -} - -void __glXDispSwap_End(GLbyte *pc) -{ - glEnd( - ); -} - -void __glXDispSwap_Indexdv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 8); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1); - - glIndexdv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_Indexfv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); - - glIndexfv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_Indexiv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 1); - - glIndexiv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_Indexsv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 1); - - glIndexsv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_Normal3bv(GLbyte *pc) -{ - glNormal3bv( - (GLbyte *)(pc + 0) - ); -} - -void __glXDispSwap_Normal3dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3); - - glNormal3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_Normal3fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); - - glNormal3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_Normal3iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 3); - - glNormal3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_Normal3sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); - - glNormal3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos2dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2); - - glRasterPos2dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos2fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); - - glRasterPos2fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos2iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 2); - - glRasterPos2iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos2sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); - - glRasterPos2sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos3dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3); - - glRasterPos3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos3fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); - - glRasterPos3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos3iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 3); - - glRasterPos3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos3sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); - - glRasterPos3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos4dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4); - - glRasterPos4dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos4fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); - - glRasterPos4fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos4iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 4); - - glRasterPos4iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_RasterPos4sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); - - glRasterPos4sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_Rectdv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2); - __GLX_SWAP_DOUBLE_ARRAY(pc + 16, 2); - - glRectdv( - (GLdouble *)(pc + 0), - (GLdouble *)(pc + 16) - ); -} - -void __glXDispSwap_Rectfv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, 2); - - glRectfv( - (GLfloat *)(pc + 0), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_Rectiv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 2); - __GLX_SWAP_INT_ARRAY(pc + 8, 2); - - glRectiv( - (GLint *)(pc + 0), - (GLint *)(pc + 8) - ); -} - -void __glXDispSwap_Rectsv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); - __GLX_SWAP_SHORT_ARRAY(pc + 4, 2); - - glRectsv( - (GLshort *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - -void __glXDispSwap_TexCoord1dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 8); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1); - - glTexCoord1dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord1fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); - - glTexCoord1fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord1iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 1); - - glTexCoord1iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord1sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 1); - - glTexCoord1sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord2dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2); - - glTexCoord2dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord2fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); - - glTexCoord2fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord2iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 2); - - glTexCoord2iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord2sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); - - glTexCoord2sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord3dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3); - - glTexCoord3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord3fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); - - glTexCoord3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord3iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 3); - - glTexCoord3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord3sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); - - glTexCoord3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord4dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4); - - glTexCoord4dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord4fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); - - glTexCoord4fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord4iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 4); - - glTexCoord4iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_TexCoord4sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); - - glTexCoord4sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex2dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2); - - glVertex2dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex2fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); - - glVertex2fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex2iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 2); - - glVertex2iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex2sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); - - glVertex2sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex3dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3); - - glVertex3dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex3fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); - - glVertex3fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex3iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 3); - - glVertex3iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex3sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); - - glVertex3sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex4dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4); - - glVertex4dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex4fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); - - glVertex4fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex4iv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT_ARRAY(pc + 0, 4); - - glVertex4iv( - (GLint *)(pc + 0) - ); -} - -void __glXDispSwap_Vertex4sv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); - - glVertex4sv( - (GLshort *)(pc + 0) - ); -} - -void __glXDispSwap_ClipPlane(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 36); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 32); - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4); - - glClipPlane( - *(GLenum *)(pc + 32), - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_ColorMaterial(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glColorMaterial( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ); -} - -void __glXDispSwap_CullFace(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glCullFace( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_Fogf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - - glFogf( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_Fogfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glFogfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize); - - glFogfv( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_Fogi(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glFogi( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ); -} - -void __glXDispSwap_Fogiv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glFogiv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT_ARRAY(pc + 4, compsize); - - glFogiv( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDispSwap_FrontFace(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glFrontFace( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_Hint(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glHint( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ); -} - -void __glXDispSwap_Lightf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glLightf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_Lightfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glLightfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); - - glLightfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_Lighti(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glLighti( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDispSwap_Lightiv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glLightiv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 8, compsize); - - glLightiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDispSwap_LightModelf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - - glLightModelf( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_LightModelfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glLightModelfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize); - - glLightModelfv( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_LightModeli(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glLightModeli( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ); -} - -void __glXDispSwap_LightModeliv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glLightModeliv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT_ARRAY(pc + 4, compsize); - - glLightModeliv( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDispSwap_LineStipple(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_SHORT(pc + 4); - - glLineStipple( - *(GLint *)(pc + 0), - *(GLushort *)(pc + 4) - ); -} - -void __glXDispSwap_LineWidth(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - - glLineWidth( - *(GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_Materialf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glMaterialf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_Materialfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glMaterialfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); - - glMaterialfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_Materiali(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glMateriali( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDispSwap_Materialiv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glMaterialiv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 8, compsize); - - glMaterialiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDispSwap_PointSize(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - - glPointSize( - *(GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_PolygonMode(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glPolygonMode( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ); -} - -void __glXDispSwap_Scissor(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - - glScissor( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ); -} - -void __glXDispSwap_ShadeModel(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glShadeModel( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_TexParameterf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glTexParameterf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_TexParameterfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glTexParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); - - glTexParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_TexParameteri(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glTexParameteri( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDispSwap_TexParameteriv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glTexParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 8, compsize); - - glTexParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDispSwap_TexEnvf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glTexEnvf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_TexEnvfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glTexEnvfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); - - glTexEnvfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_TexEnvi(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glTexEnvi( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDispSwap_TexEnviv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glTexEnviv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 8, compsize); - - glTexEnviv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDispSwap_TexGend(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_DOUBLE(pc + 0); - - glTexGend( - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12), - *(GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_TexGendv(GLbyte *pc) -{ - GLenum pname; -#ifdef __GLX_ALIGN64 - GLint cmdlen; -#endif - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glTexGendv_size(pname); - if (compsize < 0) compsize = 0; - -#ifdef __GLX_ALIGN64 - cmdlen = __GLX_PAD(8+compsize*8); - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_DOUBLE_ARRAY(pc + 8, compsize); - - glTexGendv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLdouble *)(pc + 8) - ); -} - -void __glXDispSwap_TexGenf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glTexGenf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_TexGenfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glTexGenfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); - - glTexGenfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_TexGeni(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glTexGeni( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDispSwap_TexGeniv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glTexGeniv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 8, compsize); - - glTexGeniv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDispSwap_InitNames(GLbyte *pc) -{ - glInitNames( - ); -} - -void __glXDispSwap_LoadName(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glLoadName( - *(GLuint *)(pc + 0) - ); -} - -void __glXDispSwap_PassThrough(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - - glPassThrough( - *(GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_PopName(GLbyte *pc) -{ - glPopName( - ); -} - -void __glXDispSwap_PushName(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glPushName( - *(GLuint *)(pc + 0) - ); -} - -void __glXDispSwap_DrawBuffer(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glDrawBuffer( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_Clear(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glClear( - *(GLbitfield *)(pc + 0) - ); -} - -void __glXDispSwap_ClearAccum(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - __GLX_SWAP_FLOAT(pc + 12); - - glClearAccum( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLfloat *)(pc + 12) - ); -} - -void __glXDispSwap_ClearIndex(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - - glClearIndex( - *(GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_ClearColor(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - __GLX_SWAP_FLOAT(pc + 12); - - glClearColor( - *(GLclampf *)(pc + 0), - *(GLclampf *)(pc + 4), - *(GLclampf *)(pc + 8), - *(GLclampf *)(pc + 12) - ); -} - -void __glXDispSwap_ClearStencil(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glClearStencil( - *(GLint *)(pc + 0) - ); -} - -void __glXDispSwap_ClearDepth(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 8); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE(pc + 0); - - glClearDepth( - *(GLclampd *)(pc + 0) - ); -} - -void __glXDispSwap_StencilMask(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glStencilMask( - *(GLuint *)(pc + 0) - ); -} - -void __glXDispSwap_ColorMask(GLbyte *pc) -{ - glColorMask( - *(GLboolean *)(pc + 0), - *(GLboolean *)(pc + 1), - *(GLboolean *)(pc + 2), - *(GLboolean *)(pc + 3) - ); -} - -void __glXDispSwap_DepthMask(GLbyte *pc) -{ - glDepthMask( - *(GLboolean *)(pc + 0) - ); -} - -void __glXDispSwap_IndexMask(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glIndexMask( - *(GLuint *)(pc + 0) - ); -} - -void __glXDispSwap_Accum(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - - glAccum( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_Disable(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glDisable( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_Enable(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glEnable( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_PopAttrib(GLbyte *pc) -{ - glPopAttrib( - ); -} - -void __glXDispSwap_PushAttrib(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glPushAttrib( - *(GLbitfield *)(pc + 0) - ); -} - -void __glXDispSwap_MapGrid1d(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 20); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 16); - __GLX_SWAP_DOUBLE(pc + 0); - __GLX_SWAP_DOUBLE(pc + 8); - - glMapGrid1d( - *(GLint *)(pc + 16), - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8) - ); -} - -void __glXDispSwap_MapGrid1f(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glMapGrid1f( - *(GLint *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_MapGrid2d(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 40); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 32); - __GLX_SWAP_DOUBLE(pc + 0); - __GLX_SWAP_DOUBLE(pc + 8); - __GLX_SWAP_INT(pc + 36); - __GLX_SWAP_DOUBLE(pc + 16); - __GLX_SWAP_DOUBLE(pc + 24); - - glMapGrid2d( - *(GLint *)(pc + 32), - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLint *)(pc + 36), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24) - ); -} - -void __glXDispSwap_MapGrid2f(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_FLOAT(pc + 16); - __GLX_SWAP_FLOAT(pc + 20); - - glMapGrid2f( - *(GLint *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLint *)(pc + 12), - *(GLfloat *)(pc + 16), - *(GLfloat *)(pc + 20) - ); -} - -void __glXDispSwap_EvalCoord1dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 8); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1); - - glEvalCoord1dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_EvalCoord1fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); - - glEvalCoord1fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_EvalCoord2dv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2); - - glEvalCoord2dv( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_EvalCoord2fv(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); - - glEvalCoord2fv( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_EvalMesh1(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glEvalMesh1( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDispSwap_EvalPoint1(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glEvalPoint1( - *(GLint *)(pc + 0) - ); -} - -void __glXDispSwap_EvalMesh2(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - - glEvalMesh2( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16) - ); -} - -void __glXDispSwap_EvalPoint2(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glEvalPoint2( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4) - ); -} - -void __glXDispSwap_AlphaFunc(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - - glAlphaFunc( - *(GLenum *)(pc + 0), - *(GLclampf *)(pc + 4) - ); -} - -void __glXDispSwap_BlendFunc(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glBlendFunc( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ); -} - -void __glXDispSwap_LogicOp(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glLogicOp( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_StencilFunc(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glStencilFunc( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLuint *)(pc + 8) - ); -} - -void __glXDispSwap_StencilOp(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glStencilOp( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8) - ); -} - -void __glXDispSwap_DepthFunc(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glDepthFunc( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_PixelZoom(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - - glPixelZoom( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_PixelTransferf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - - glPixelTransferf( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_PixelTransferi(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glPixelTransferi( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ); -} - -void __glXDispSwap_PixelMapfv(GLbyte *pc) -{ - GLint mapsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - mapsize = *(GLint *)(pc + 4); - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, mapsize); - - glPixelMapfv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_PixelMapuiv(GLbyte *pc) -{ - GLint mapsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - mapsize = *(GLint *)(pc + 4); - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 8, mapsize); - - glPixelMapuiv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - (GLuint *)(pc + 8) - ); -} - -void __glXDispSwap_PixelMapusv(GLbyte *pc) -{ - GLint mapsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - mapsize = *(GLint *)(pc + 4); - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_SHORT_ARRAY(pc + 8, mapsize); - - glPixelMapusv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - (GLushort *)(pc + 8) - ); -} - -void __glXDispSwap_ReadBuffer(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glReadBuffer( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_CopyPixels(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - - glCopyPixels( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLenum *)(pc + 16) - ); -} - -void __glXDispSwap_DepthRange(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 16); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE(pc + 0); - __GLX_SWAP_DOUBLE(pc + 8); - - glDepthRange( - *(GLclampd *)(pc + 0), - *(GLclampd *)(pc + 8) - ); -} - -void __glXDispSwap_Frustum(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 48); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE(pc + 0); - __GLX_SWAP_DOUBLE(pc + 8); - __GLX_SWAP_DOUBLE(pc + 16); - __GLX_SWAP_DOUBLE(pc + 24); - __GLX_SWAP_DOUBLE(pc + 32); - __GLX_SWAP_DOUBLE(pc + 40); - - glFrustum( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24), - *(GLdouble *)(pc + 32), - *(GLdouble *)(pc + 40) - ); -} - -void __glXDispSwap_LoadIdentity(GLbyte *pc) -{ - glLoadIdentity( - ); -} - -void __glXDispSwap_LoadMatrixf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16); - - glLoadMatrixf( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_LoadMatrixd(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 128); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16); - - glLoadMatrixd( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_MatrixMode(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glMatrixMode( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_MultMatrixf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16); - - glMultMatrixf( - (GLfloat *)(pc + 0) - ); -} - -void __glXDispSwap_MultMatrixd(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 128); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16); - - glMultMatrixd( - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_Ortho(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 48); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE(pc + 0); - __GLX_SWAP_DOUBLE(pc + 8); - __GLX_SWAP_DOUBLE(pc + 16); - __GLX_SWAP_DOUBLE(pc + 24); - __GLX_SWAP_DOUBLE(pc + 32); - __GLX_SWAP_DOUBLE(pc + 40); - - glOrtho( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24), - *(GLdouble *)(pc + 32), - *(GLdouble *)(pc + 40) - ); -} - -void __glXDispSwap_PopMatrix(GLbyte *pc) -{ - glPopMatrix( - ); -} - -void __glXDispSwap_PushMatrix(GLbyte *pc) -{ - glPushMatrix( - ); -} - -void __glXDispSwap_Rotated(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 32); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE(pc + 0); - __GLX_SWAP_DOUBLE(pc + 8); - __GLX_SWAP_DOUBLE(pc + 16); - __GLX_SWAP_DOUBLE(pc + 24); - - glRotated( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24) - ); -} - -void __glXDispSwap_Rotatef(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - __GLX_SWAP_FLOAT(pc + 12); - - glRotatef( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLfloat *)(pc + 12) - ); -} - -void __glXDispSwap_Scaled(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE(pc + 0); - __GLX_SWAP_DOUBLE(pc + 8); - __GLX_SWAP_DOUBLE(pc + 16); - - glScaled( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16) - ); -} - -void __glXDispSwap_Scalef(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glScalef( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_Translated(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 24); - pc -= 4; - } -#endif - __GLX_SWAP_DOUBLE(pc + 0); - __GLX_SWAP_DOUBLE(pc + 8); - __GLX_SWAP_DOUBLE(pc + 16); - - glTranslated( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16) - ); -} - -void __glXDispSwap_Translatef(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glTranslatef( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_Viewport(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - - glViewport( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ); -} - -void __glXDispSwap_PolygonOffset(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - - glPolygonOffset( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_CopyTexImage1D(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - __GLX_SWAP_INT(pc + 20); - __GLX_SWAP_INT(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 __glXDispSwap_CopyTexImage2D(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - __GLX_SWAP_INT(pc + 20); - __GLX_SWAP_INT(pc + 24); - __GLX_SWAP_INT(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 __glXDispSwap_CopyTexSubImage1D(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - __GLX_SWAP_INT(pc + 20); - - glCopyTexSubImage1D( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20) - ); -} - -void __glXDispSwap_CopyTexSubImage2D(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - __GLX_SWAP_INT(pc + 20); - __GLX_SWAP_INT(pc + 24); - __GLX_SWAP_INT(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) - ); -} - -void __glXDispSwap_BindTexture(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glBindTexture( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ); -} - -void __glXDispSwap_PrioritizeTextures(GLbyte *pc) -{ - GLsizei n; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - n = *(GLsizei *)(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, n); - __GLX_SWAP_FLOAT_ARRAY(pc + 4+n*4, n); - - glPrioritizeTextures( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4), - (GLclampf *)(pc + 4+n*4) - ); -} - -void __glXDispSwap_Indexubv(GLbyte *pc) -{ - glIndexubv( - (GLubyte *)(pc + 0) - ); -} - -void __glXDispSwap_BlendColor(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - __GLX_SWAP_FLOAT(pc + 12); - - glBlendColor( - *(GLclampf *)(pc + 0), - *(GLclampf *)(pc + 4), - *(GLclampf *)(pc + 8), - *(GLclampf *)(pc + 12) - ); -} - -void __glXDispSwap_BlendEquation(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glBlendEquation( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_ColorTableParameterfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glColorTableParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); - - glColorTableParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_ColorTableParameteriv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glColorTableParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 8, compsize); - - glColorTableParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDispSwap_CopyColorTable(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - - glCopyColorTable( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ); -} - -void __glXDispSwap_CopyColorSubTable(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - - glCopyColorSubTable( - *(GLenum *)(pc + 0), - *(GLsizei *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ); -} - -void __glXDispSwap_ConvolutionParameterf(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - - glConvolutionParameterf( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_ConvolutionParameterfv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glConvolutionParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize); - - glConvolutionParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *)(pc + 8) - ); -} - -void __glXDispSwap_ConvolutionParameteri(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glConvolutionParameteri( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ); -} - -void __glXDispSwap_ConvolutionParameteriv(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glConvolutionParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 8, compsize); - - glConvolutionParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *)(pc + 8) - ); -} - -void __glXDispSwap_CopyConvolutionFilter1D(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - - glCopyConvolutionFilter1D( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ); -} - -void __glXDispSwap_CopyConvolutionFilter2D(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - __GLX_SWAP_INT(pc + 20); - - glCopyConvolutionFilter2D( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20) - ); -} - -void __glXDispSwap_Histogram(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - - glHistogram( - *(GLenum *)(pc + 0), - *(GLsizei *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLboolean *)(pc + 12) - ); -} - -void __glXDispSwap_Minmax(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glMinmax( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLboolean *)(pc + 8) - ); -} - -void __glXDispSwap_ResetHistogram(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glResetHistogram( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_ResetMinmax(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glResetMinmax( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_CopyTexSubImage3D(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_INT(pc + 12); - __GLX_SWAP_INT(pc + 16); - __GLX_SWAP_INT(pc + 20); - __GLX_SWAP_INT(pc + 24); - __GLX_SWAP_INT(pc + 28); - __GLX_SWAP_INT(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 __glXDispSwap_ActiveTextureARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glActiveTextureARB( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_MultiTexCoord1dvARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 12); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 8); - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1); - - glMultiTexCoord1dvARB( - *(GLenum *)(pc + 8), - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_MultiTexCoord1fvARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 4, 1); - - glMultiTexCoord1fvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord1ivARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, 1); - - glMultiTexCoord1ivARB( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord1svARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_SHORT_ARRAY(pc + 4, 1); - - glMultiTexCoord1svARB( - *(GLenum *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord2dvARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 20); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 16); - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2); - - glMultiTexCoord2dvARB( - *(GLenum *)(pc + 16), - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_MultiTexCoord2fvARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 4, 2); - - glMultiTexCoord2fvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord2ivARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, 2); - - glMultiTexCoord2ivARB( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord2svARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_SHORT_ARRAY(pc + 4, 2); - - glMultiTexCoord2svARB( - *(GLenum *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord3dvARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 28); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 24); - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3); - - glMultiTexCoord3dvARB( - *(GLenum *)(pc + 24), - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_MultiTexCoord3fvARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 4, 3); - - glMultiTexCoord3fvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord3ivARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, 3); - - glMultiTexCoord3ivARB( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord3svARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_SHORT_ARRAY(pc + 4, 3); - - glMultiTexCoord3svARB( - *(GLenum *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - __GLX_MEM_COPY(pc-4, pc, 36); - pc -= 4; - } -#endif - __GLX_SWAP_INT(pc + 32); - __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4); - - glMultiTexCoord4dvARB( - *(GLenum *)(pc + 32), - (GLdouble *)(pc + 0) - ); -} - -void __glXDispSwap_MultiTexCoord4fvARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT_ARRAY(pc + 4, 4); - - glMultiTexCoord4fvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord4ivARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, 4); - - glMultiTexCoord4ivARB( - *(GLenum *)(pc + 0), - (GLint *)(pc + 4) - ); -} - -void __glXDispSwap_MultiTexCoord4svARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_SHORT_ARRAY(pc + 4, 4); - - glMultiTexCoord4svARB( - *(GLenum *)(pc + 0), - (GLshort *)(pc + 4) - ); -} - - -/* - * Extensions - */ - -#ifndef MISSING_GL_EXTS - -void __glXDispSwap_PointParameterfARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - glPointParameterfARB( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_PointParameterfvARB(GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glPointParameterfvEXT_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize); - - glPointParameterfvARB( - *(GLenum *)(pc + 0), - (GLfloat *)(pc + 4) - ); -} - -void __glXDispSwap_ActiveStencilFaceEXT(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(pc + 0); - - glActiveStencilFaceEXT( - *(GLenum *)(pc + 0) - ); -} - -void __glXDispSwap_WindowPos3fARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - __GLX_SWAP_FLOAT(pc + 8); - glWindowPos3fARB( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ); -} -#endif /* !MISSING_GL_EXTS */ - -void __glXDispSwap_SampleCoverageARB(GLbyte *pc) -{ - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_SWAP_FLOAT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glSampleCoverageARB( - *(GLfloat *)(pc + 0), - *(GLboolean *)(pc + 4) - ); -} diff --git a/nx-X11/programs/Xserver/GL/glx/g_single.c b/nx-X11/programs/Xserver/GL/glx/g_single.c deleted file mode 100644 index 486ae7a25d..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/g_single.c +++ /dev/null @@ -1,1785 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "glxext.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" -#include "unpack.h" -#include "impsize.h" -#include "singlesize.h" - -int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - glNewList( - *(GLuint *)(pc + 0), - *(GLenum *)(pc + 4) - ); - __GLX_NOTE_UNFLUSHED_CMDS(cx); - return Success; -} - -int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - - glEndList( - ); - return Success; -} - -int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - glDeleteLists( - *(GLuint *)(pc + 0), - *(GLsizei *)(pc + 4) - ); - __GLX_NOTE_UNFLUSHED_CMDS(cx); - return Success; -} - -int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc) -{ - GLuint retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - retval = - glGenLists( - *(GLsizei *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_BEGIN_REPLY(0); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - glPixelStoref( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); - __GLX_NOTE_UNFLUSHED_CMDS(cx); - return Success; -} - -int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - glPixelStorei( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ); - __GLX_NOTE_UNFLUSHED_CMDS(cx); - return Success; -} - -int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLboolean answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 0); - compsize = __glGetBooleanv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); - __glXClearErrorOccured(); - glGetBooleanv( - *(GLenum *)(pc + 0), - (GLboolean *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_BYTE(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_BYTE_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 0); - compsize = __glGetDoublev_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*8,8); - __glXClearErrorOccured(); - glGetDoublev( - *(GLenum *)(pc + 0), - (GLdouble *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_DOUBLE(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*8); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc) -{ - GLenum retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - - retval = - glGetError( - ); - __GLX_PUT_RETVAL(retval); - __GLX_BEGIN_REPLY(0); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 0); - compsize = __glGetFloatv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetFloatv( - *(GLenum *)(pc + 0), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 0); - compsize = __glGetIntegerv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetIntegerv( - *(GLenum *)(pc + 0), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetLightfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetLightfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetLightiv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetLightiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum target; - GLenum query; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - target = *(GLenum *)(pc + 0); - query = *(GLenum *)(pc + 4); - compsize = __glGetMapdv_size(target,query); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*8,8); - __glXClearErrorOccured(); - glGetMapdv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLdouble *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_DOUBLE(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*8); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum target; - GLenum query; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - target = *(GLenum *)(pc + 0); - query = *(GLenum *)(pc + 4); - compsize = __glGetMapfv_size(target,query); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMapfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum target; - GLenum query; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - target = *(GLenum *)(pc + 0); - query = *(GLenum *)(pc + 4); - compsize = __glGetMapiv_size(target,query); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMapiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetMaterialfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMaterialfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetMaterialiv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMaterialiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum map; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - map = *(GLenum *)(pc + 0); - compsize = __glGetPixelMapfv_size(map); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetPixelMapfv( - *(GLenum *)(pc + 0), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum map; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLuint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - map = *(GLenum *)(pc + 0); - compsize = __glGetPixelMapuiv_size(map); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetPixelMapuiv( - *(GLenum *)(pc + 0), - (GLuint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum map; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLushort answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - map = *(GLenum *)(pc + 0); - compsize = __glGetPixelMapusv_size(map); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*2,2); - __glXClearErrorOccured(); - glGetPixelMapusv( - *(GLenum *)(pc + 0), - (GLushort *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_SHORT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*2); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_SHORT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexEnvfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexEnvfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexEnviv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexEnviv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexGendv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*8,8); - __glXClearErrorOccured(); - glGetTexGendv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLdouble *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_DOUBLE(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*8); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexGenfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexGenfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexGeniv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexGeniv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexParameterfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexParameteriv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 8); - compsize = __glGetTexLevelParameterfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexLevelParameterfv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 8); - compsize = __glGetTexLevelParameteriv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexLevelParameteriv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc) -{ - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - retval = - glIsEnabled( - *(GLenum *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_BEGIN_REPLY(0); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc) -{ - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - retval = - glIsList( - *(GLuint *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_BEGIN_REPLY(0); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLboolean answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - n = *(GLsizei *)(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,n,1); - retval = - glAreTexturesResident( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4), - (GLboolean *) answer - ); - __GLX_PUT_RETVAL(retval); - __GLX_BEGIN_REPLY(n); - __GLX_SEND_HEADER(); - __GLX_SEND_BYTE_ARRAY(n); - return Success; -} - -int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - glDeleteTextures( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4) - ); - return Success; -} - -int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLuint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - n = *(GLsizei *)(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,n*4,4); - glGenTextures( - *(GLsizei *)(pc + 0), - (GLuint *) answer - ); - __GLX_BEGIN_REPLY(n*4); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(n); - return Success; -} - -int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) -{ - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - retval = - glIsTexture( - *(GLuint *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_BEGIN_REPLY(0); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetColorTableParameterfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetColorTableParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetColorTableParameteriv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetColorTableParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetConvolutionParameterfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetConvolutionParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetConvolutionParameteriv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetConvolutionParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetHistogramParameterfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetHistogramParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetHistogramParameteriv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetHistogramParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetMinmaxParameterfv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMinmaxParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - pname = *(GLenum *)(pc + 4); - compsize = __glGetMinmaxParameteriv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMinmaxParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_PUT_SIZE(1); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_PUT_SIZE(compsize); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLboolean answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_VENDPRIV_HDR_SIZE; - n = *(GLsizei *)(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,n,1); - retval = - glAreTexturesResidentEXT( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4), - (GLboolean *) answer - ); - __GLX_PUT_RETVAL(retval); - __GLX_BEGIN_REPLY(n); - __GLX_SEND_HEADER(); - __GLX_SEND_BYTE_ARRAY(n); - return Success; -} - -int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_VENDPRIV_HDR_SIZE; - - glDeleteTexturesEXT( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4) - ); - return Success; -} - -int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLuint answerBuffer[200]; - char *answer; - - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_VENDPRIV_HDR_SIZE; - n = *(GLsizei *)(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,n*4,4); - glGenTexturesEXT( - *(GLsizei *)(pc + 0), - (GLuint *) answer - ); - __GLX_BEGIN_REPLY(n*4); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(n); - return Success; -} - -int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) -{ - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_VENDPRIV_HDR_SIZE; - - retval = - glIsTextureEXT( - *(GLuint *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_BEGIN_REPLY(0); - __GLX_SEND_HEADER(); - return Success; -} - diff --git a/nx-X11/programs/Xserver/GL/glx/g_singleswap.c b/nx-X11/programs/Xserver/GL/glx/g_singleswap.c deleted file mode 100644 index 7ec32dd963..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/g_singleswap.c +++ /dev/null @@ -1,2206 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "glxext.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" -#include "unpack.h" -#include "impsize.h" -#include "singlesize.h" - -int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glNewList( - *(GLuint *)(pc + 0), - *(GLenum *)(pc + 4) - ); - __GLX_NOTE_UNFLUSHED_CMDS(cx); - return Success; -} - -int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - - glEndList( - ); - return Success; -} - -int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glDeleteLists( - *(GLuint *)(pc + 0), - *(GLsizei *)(pc + 4) - ); - __GLX_NOTE_UNFLUSHED_CMDS(cx); - return Success; -} - -int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc) -{ - GLuint retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - - retval = - glGenLists( - *(GLsizei *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_SWAP_REPLY_RETVAL(); - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_FLOAT(pc + 4); - - glPixelStoref( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ); - __GLX_NOTE_UNFLUSHED_CMDS(cx); - return Success; -} - -int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - glPixelStorei( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ); - __GLX_NOTE_UNFLUSHED_CMDS(cx); - return Success; -} - -int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLboolean answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glGetBooleanv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); - __glXClearErrorOccured(); - glGetBooleanv( - *(GLenum *)(pc + 0), - (GLboolean *) answer - ); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_BYTE(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_BYTE_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glGetDoublev_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*8,8); - __glXClearErrorOccured(); - glGetDoublev( - *(GLenum *)(pc + 0), - (GLdouble *) answer - ); - __GLX_SWAP_DOUBLE_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_DOUBLE(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*8); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc) -{ - GLenum retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - - retval = - glGetError( - ); - __GLX_PUT_RETVAL(retval); - __GLX_SWAP_REPLY_RETVAL(); - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glGetFloatv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetFloatv( - *(GLenum *)(pc + 0), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - pname = *(GLenum *)(pc + 0); - compsize = __glGetIntegerv_size(pname); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetIntegerv( - *(GLenum *)(pc + 0), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetLightfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetLightfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetLightiv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetLightiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum target; - GLenum query; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - target = *(GLenum *)(pc + 0); - query = *(GLenum *)(pc + 4); - compsize = __glGetMapdv_size(target,query); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*8,8); - __glXClearErrorOccured(); - glGetMapdv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLdouble *) answer - ); - __GLX_SWAP_DOUBLE_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_DOUBLE(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*8); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum target; - GLenum query; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - target = *(GLenum *)(pc + 0); - query = *(GLenum *)(pc + 4); - compsize = __glGetMapfv_size(target,query); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMapfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum target; - GLenum query; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - target = *(GLenum *)(pc + 0); - query = *(GLenum *)(pc + 4); - compsize = __glGetMapiv_size(target,query); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMapiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetMaterialfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMaterialfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetMaterialiv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMaterialiv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum map; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - map = *(GLenum *)(pc + 0); - compsize = __glGetPixelMapfv_size(map); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetPixelMapfv( - *(GLenum *)(pc + 0), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum map; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLuint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - map = *(GLenum *)(pc + 0); - compsize = __glGetPixelMapuiv_size(map); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetPixelMapuiv( - *(GLenum *)(pc + 0), - (GLuint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum map; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLushort answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - map = *(GLenum *)(pc + 0); - compsize = __glGetPixelMapusv_size(map); - if (compsize < 0) compsize = 0; - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*2,2); - __glXClearErrorOccured(); - glGetPixelMapusv( - *(GLenum *)(pc + 0), - (GLushort *) answer - ); - __GLX_SWAP_SHORT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_SHORT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*2); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_SHORT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexEnvfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexEnvfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexEnviv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexEnviv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexGendv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*8,8); - __glXClearErrorOccured(); - glGetTexGendv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLdouble *) answer - ); - __GLX_SWAP_DOUBLE_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_DOUBLE(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*8); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexGenfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexGenfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexGeniv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexGeniv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetTexParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 8); - pname = *(GLenum *)(pc + 8); - compsize = __glGetTexLevelParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexLevelParameterfv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 8); - pname = *(GLenum *)(pc + 8); - compsize = __glGetTexLevelParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - __GLX_SWAP_INT(pc + 4); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetTexLevelParameteriv( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc) -{ - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - - retval = - glIsEnabled( - *(GLenum *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_SWAP_REPLY_RETVAL(); - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc) -{ - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - - retval = - glIsList( - *(GLuint *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_SWAP_REPLY_RETVAL(); - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLboolean answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - n = *(GLsizei *)(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, n); - - __GLX_GET_ANSWER_BUFFER(answer,cl,n,1); - retval = - glAreTexturesResident( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4), - (GLboolean *) answer - ); - __GLX_PUT_RETVAL(retval); - __GLX_SWAP_REPLY_RETVAL(); - __GLX_BEGIN_REPLY(n); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - __GLX_SEND_BYTE_ARRAY(n); - return Success; -} - -int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - __GLXcontext *cx; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - n = *(GLsizei *)(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, n); - - glDeleteTextures( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4) - ); - return Success; -} - -int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLuint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - n = *(GLsizei *)(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,n*4,4); - glGenTextures( - *(GLsizei *)(pc + 0), - (GLuint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, n); - __GLX_BEGIN_REPLY(n*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(n); - return Success; -} - -int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) -{ - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - - retval = - glIsTexture( - *(GLuint *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_SWAP_REPLY_RETVAL(); - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - return Success; -} - -int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetColorTableParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetColorTableParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetColorTableParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetColorTableParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetConvolutionParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetConvolutionParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetConvolutionParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetConvolutionParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetHistogramParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetHistogramParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetHistogramParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetHistogramParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLfloat answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetMinmaxParameterfv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMinmaxParameterfv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLfloat *) answer - ); - __GLX_SWAP_FLOAT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_FLOAT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_FLOAT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - GLenum pname; - GLint compsize; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 4); - pname = *(GLenum *)(pc + 4); - compsize = __glGetMinmaxParameteriv_size(pname); - if (compsize < 0) compsize = 0; - __GLX_SWAP_INT(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,compsize*4,4); - __glXClearErrorOccured(); - glGetMinmaxParameteriv( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - (GLint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, compsize); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(0); - __GLX_SEND_HEADER(); - } else if (compsize == 1) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(1); - __GLX_SWAP_REPLY_SIZE(); - __GLX_PUT_INT(); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(compsize*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_PUT_SIZE(compsize); - __GLX_SWAP_REPLY_SIZE(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(compsize); - } - return Success; -} - -int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLboolean answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_VENDPRIV_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - n = *(GLsizei *)(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, n); - - __GLX_GET_ANSWER_BUFFER(answer,cl,n,1); - retval = - glAreTexturesResidentEXT( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4), - (GLboolean *) answer - ); - __GLX_PUT_RETVAL(retval); - __GLX_SWAP_REPLY_RETVAL(); - __GLX_BEGIN_REPLY(n); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - __GLX_SEND_BYTE_ARRAY(n); - return Success; -} - -int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - __GLXcontext *cx; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_VENDPRIV_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - n = *(GLsizei *)(pc + 0); - __GLX_SWAP_INT_ARRAY(pc + 4, n); - - glDeleteTexturesEXT( - *(GLsizei *)(pc + 0), - (GLuint *)(pc + 4) - ); - return Success; -} - -int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - GLsizei n; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLuint answerBuffer[200]; - char *answer; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_VENDPRIV_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - n = *(GLsizei *)(pc + 0); - - __GLX_GET_ANSWER_BUFFER(answer,cl,n*4,4); - glGenTexturesEXT( - *(GLsizei *)(pc + 0), - (GLuint *) answer - ); - __GLX_SWAP_INT_ARRAY(answer, n); - __GLX_BEGIN_REPLY(n*4); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - __GLX_SEND_INT_ARRAY(n); - return Success; -} - -int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) -{ - GLboolean retval; - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_VENDPRIV_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - - retval = - glIsTextureEXT( - *(GLuint *)(pc + 0) - ); - __GLX_PUT_RETVAL(retval); - __GLX_SWAP_REPLY_RETVAL(); - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - return Success; -} - diff --git a/nx-X11/programs/Xserver/GL/glx/global.c b/nx-X11/programs/Xserver/GL/glx/global.c index 2ce275ba3d..a1e9560d8f 100644 --- a/nx-X11/programs/Xserver/GL/glx/global.c +++ b/nx-X11/programs/Xserver/GL/glx/global.c @@ -51,6 +51,7 @@ __GLXcontext *__glXLastContext; RESTYPE __glXContextRes; RESTYPE __glXClientRes; RESTYPE __glXPixmapRes; +RESTYPE __glXDrawableRes; RESTYPE __glXSwapBarrierRes; /* diff --git a/nx-X11/programs/Xserver/GL/glx/glxbuf.c b/nx-X11/programs/Xserver/GL/glx/glxbuf.c deleted file mode 100644 index 047bc569e7..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glxbuf.c +++ /dev/null @@ -1,295 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "glxutil.h" -#include "glxbuf.h" -#include "glxfb.h" -#include "glxmem.h" -#include "glxpix.h" - -void -__glXFBInitDrawable(__GLXdrawablePrivate *glxPriv, __GLcontextModes *modes) -{ - __GLdrawablePrivate *glPriv; - GLint rgbBits; - GLint accumBits; - - glPriv = &glxPriv->glPriv; - rgbBits = modes->rgbBits; - accumBits = modes->accumRedBits + modes->accumGreenBits + - modes->accumBlueBits + modes->accumAlphaBits; - -#if defined(__GL_ALIGNED_BUFFERS) - /* initialize pixel alignments (for more details see context.h) */ - glPriv->xAlignment = 1; - glPriv->yAlignment = 1; -#endif - - glxPriv->swapBuffers = __glXFBMemSwapBuffers; - - glPriv->yInverted = GL_TRUE; /* Y is upside-down */ - - if (modes->doubleBufferMode) { - if (modes->colorIndexMode) { - __glXInitFB(&glPriv->frontBuffer, glPriv, modes->indexBits); - __glXInitMem(&glPriv->backBuffer, glPriv, modes->indexBits); - } else { - __glXInitFB(&glPriv->frontBuffer, glPriv, rgbBits); - __glXInitMem(&glPriv->backBuffer, glPriv, rgbBits); - } - } else { - if (modes->colorIndexMode) { - __glXInitFB(&glPriv->frontBuffer, glPriv, modes->indexBits); - } else { - __glXInitFB(&glPriv->frontBuffer, glPriv, rgbBits); - } - } - -#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0) - if (modes->maxAuxBuffers > 0) { - GLint i; - - for (i=0; i < modes->maxAuxBuffers; i++) { - if (modes->colorIndexMode) { - __glXInitMem(&glPriv->auxBuffer[i], glPriv, modes->indexBits); - } else { - __glXInitMem(&glPriv->auxBuffer[i], glPriv, rgbBits); - } - } - } -#endif - - if (modes->haveAccumBuffer) { - __glXInitMem(&glPriv->accumBuffer, glPriv, accumBits); - } - if (modes->haveDepthBuffer) { - __glXInitMem(&glPriv->depthBuffer, glPriv, modes->depthBits); - } - if (modes->haveStencilBuffer) { - __glXInitMem(&glPriv->stencilBuffer, glPriv, modes->stencilBits); - } -} - -void -__glXPixInitDrawable(__GLXdrawablePrivate *glxPriv, __GLcontextModes *modes) -{ - __GLdrawablePrivate *glPriv; - GLint rgbBits; - GLint accumBits; - - assert(glxPriv->pGlxPixmap); - - glPriv = &glxPriv->glPriv; - rgbBits = modes->rgbBits; - accumBits = modes->accumRedBits + modes->accumGreenBits + - modes->accumBlueBits + modes->accumAlphaBits; - -#if defined(__GL_ALIGNED_BUFFERS) - /* initialize pixel alignments (for more details see context.h) */ - glPriv->xAlignment = 1; - glPriv->yAlignment = 1; -#endif - - glxPriv->swapBuffers = (GLboolean (*)(__GLXdrawablePrivate *))__glXNop; - - glPriv->yInverted = GL_FALSE; - - if (modes->doubleBufferMode) { - if (modes->colorIndexMode) { - __glXInitPix(&glPriv->frontBuffer, glPriv, rgbBits, - glxPriv->drawId, glxPriv->pGlxPixmap); - __glXInitMem(&glPriv->backBuffer, glPriv, modes->indexBits); - } else { - __glXInitPix(&glPriv->frontBuffer, glPriv, rgbBits, - glxPriv->drawId, glxPriv->pGlxPixmap); - __glXInitMem(&glPriv->backBuffer, glPriv, rgbBits); - } - } else { - if (modes->colorIndexMode) { - __glXInitPix(&glPriv->frontBuffer, glPriv, rgbBits, - glxPriv->drawId, glxPriv->pGlxPixmap); - } else { - __glXInitPix(&glPriv->frontBuffer, glPriv, rgbBits, - glxPriv->drawId, glxPriv->pGlxPixmap); - } - } - -#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0) - if (modes->maxAuxBuffers > 0) { - GLint i; - - for (i=0; i < modes->maxAuxBuffers; i++) { - if (modes->colorIndexMode) { - __glXInitMem(&glPriv->auxBuffer[i], glPriv, modes->indexBits); - } else { - __glXInitMem(&glPriv->auxBuffer[i], glPriv, rgbBits); - } - } - } -#endif - - if (modes->haveAccumBuffer) { - __glXInitMem(&glPriv->accumBuffer, glPriv, accumBits); - } - if (modes->haveDepthBuffer) { - __glXInitMem(&glPriv->depthBuffer, glPriv, modes->depthBits); - } - if (modes->haveStencilBuffer) { - __glXInitMem(&glPriv->stencilBuffer, glPriv, modes->stencilBits); - } -} - - -#define __GLX_SET_ACCEL_BUFFER_MASK(bm) \ - if (status == GL_FALSE) return GL_FALSE; \ - if (status == GL_TRUE) accelBufferMask |= bm; \ - /* for __GL_BUFFER_FALLBACK don't do anything */ - -GLboolean -__glXResizeBuffers(__GLdrawablePrivate *glPriv, - GLint x, GLint y, GLuint width, GLuint height) -{ - __GLcontextModes *modes; - __GLdrawableRegion *glRegion; - GLboolean status; - GLuint accelBufferMask; - - modes = glPriv->modes; - accelBufferMask = 0; - - status = (*glPriv->frontBuffer.resize)(&glPriv->frontBuffer, - x, y, width, height, glPriv, - __GL_FRONT_BUFFER_MASK); - __GLX_SET_ACCEL_BUFFER_MASK(__GL_FRONT_BUFFER_MASK); - - if (modes->doubleBufferMode) { - status = (*glPriv->backBuffer.resize)(&glPriv->backBuffer, - x, y, width, height, glPriv, - __GL_BACK_BUFFER_MASK); - __GLX_SET_ACCEL_BUFFER_MASK(__GL_BACK_BUFFER_MASK); - } - -#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0) - if (modes->maxAuxBuffers > 0) { - GLint i; - - for (i=0; i < modes->maxAuxBuffers; i++) { - status = (*glPriv->auxBuffers[i].resize)(&glPriv->auxBuffer[i], - x, y, width, height, - glPriv, - __GL_AUX_BUFFER_MASK(i)); - __GLX_SET_ACCEL_BUFFER_MASK(__GL_AUX_BUFFER_MASK(i)); - } - } -#endif - - if (modes->haveAccumBuffer) { - status = (*glPriv->accumBuffer.resize)(&glPriv->accumBuffer, - x, y, width, height, glPriv, - __GL_ACCUM_BUFFER_MASK); - __GLX_SET_ACCEL_BUFFER_MASK(__GL_ACCUM_BUFFER_MASK); - } - - if (modes->haveDepthBuffer) { - status = (*glPriv->depthBuffer.resize)(&glPriv->depthBuffer, - x, y, width, height, glPriv, - __GL_DEPTH_BUFFER_MASK); - __GLX_SET_ACCEL_BUFFER_MASK(__GL_DEPTH_BUFFER_MASK); - } - - if (modes->haveStencilBuffer) { - status = (*glPriv->stencilBuffer.resize)(&glPriv->stencilBuffer, - x, y, width, height, glPriv, - __GL_STENCIL_BUFFER_MASK); - __GLX_SET_ACCEL_BUFFER_MASK(__GL_STENCIL_BUFFER_MASK); - } - - glPriv->accelBufferMask = accelBufferMask; - - /* finally, update the ownership region */ - glRegion = &glPriv->ownershipRegion; - glRegion->numRects = 1; - glRegion->rects[0].x0 = 0; - glRegion->rects[0].y0 = 0; - glRegion->rects[0].x1 = width; - glRegion->rects[0].y1 = height; - - return GL_TRUE; -} - -void -__glXFreeBuffers(__GLXdrawablePrivate *glxPriv) -{ - __GLdrawablePrivate *glPriv = &glxPriv->glPriv; -#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0) - __GLcontextModes *modes = glPriv->modes; -#endif - - if (glPriv->frontBuffer.free) { - (*glPriv->frontBuffer.free)(&glPriv->frontBuffer, glPriv); - } - if (glPriv->backBuffer.free) { - (*glPriv->backBuffer.free)(&glPriv->backBuffer, glPriv); - } - -#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0) - if (modes->maxAuxBuffers > 0) { - GLint i; - - for (i=0; i < modes->maxAuxBuffers; i++) { - if (glPriv->auxBuffer[i].free) { - (*glPriv->auxBuffer[i].free)(&glPriv->auxBuffer[i], glPriv); - } - } - } -#endif - - if (glPriv->accumBuffer.free) { - (*glPriv->accumBuffer.free)(&glPriv->accumBuffer, glPriv); - } - - if (glPriv->depthBuffer.free) { - (*glPriv->depthBuffer.free)(&glPriv->depthBuffer, glPriv); - } - - if (glPriv->stencilBuffer.free) { - (*glPriv->stencilBuffer.free)(&glPriv->stencilBuffer, glPriv); - } -} diff --git a/nx-X11/programs/Xserver/GL/glx/glxbuf.h b/nx-X11/programs/Xserver/GL/glx/glxbuf.h deleted file mode 100644 index 9354dc4f8a..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glxbuf.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _glxbuf_h_ -#define _glxbuf_h_ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -extern void __glXFBInitDrawable(__GLXdrawablePrivate *glxPriv, - __GLcontextModes *modes); -extern void __glXPixInitDrawable(__GLXdrawablePrivate *glxPriv, - __GLcontextModes *modes); - -extern GLboolean __glXResizeBuffers(__GLdrawablePrivate *glPriv, - GLint x, GLint y, - GLuint width, GLuint height); - -extern void __glXFreeBuffers(__GLXdrawablePrivate *glxPriv); -extern void __glXUpdatePalette(__GLXdrawablePrivate *); - -#endif /* _glxbuf_h_ */ - diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmds.c b/nx-X11/programs/Xserver/GL/glx/glxcmds.c index efe5b25e90..525add87f9 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxcmds.c +++ b/nx-X11/programs/Xserver/GL/glx/glxcmds.c @@ -48,30 +48,30 @@ #include #include #include "g_disptab_EXT.h" -#include "glximports.h" #include "glxutil.h" #include "glxext.h" #include "glcontextmodes.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "indirect_dispatch.h" + +#ifndef GLX_TEXTURE_TARGET_EXT +#define GLX_TEXTURE_TARGET_EXT 0x6001 +#define GLX_TEXTURE_2D_EXT 0x6002 +#define GLX_TEXTURE_RECTANGLE_EXT 0x6003 +#define GLX_NO_TEXTURE_EXT 0x6004 +#define GLX_Y_INVERTED_EXT 0x6006 +#endif /************************************************************************/ -static __GLimports imports = { - __glXImpMalloc, - __glXImpCalloc, - __glXImpRealloc, - __glXImpFree, - __glXImpWarning, - __glXImpFatal, - __glXImpGetenv, - __glXImpAtoi, - __glXImpSprintf, - __glXImpFopen, - __glXImpFclose, - __glXImpFprintf, - __glXImpGetDrawablePrivate, - __glXImpGetReadablePrivate, - NULL -}; +void +GlxSetRenderTables (struct _glapi_table *table) +{ + _glapi_set_dispatch (table); +} static int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc); static int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); @@ -88,6 +88,35 @@ static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); /************************************************************************/ +void +__glXContextDestroy(__GLXcontext *context) +{ + __glXFlushContextCache(); +} + + +static void __glXdirectContextDestroy(__GLXcontext *context) +{ + __glXContextDestroy(context); + free(context); +} + +static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen, + __GLcontextModes *modes, + __GLXcontext *shareContext) +{ + __GLXcontext *context; + + context = malloc (sizeof (__GLXcontext)); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + context->destroy = __glXdirectContextDestroy; + + return context; +} + /** * Create a GL context with the given properties. This routine is used * to implement \c glXCreateContext, \c glXCreateNewContext, and @@ -105,8 +134,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, ScreenPtr pScreen; __GLXcontext *glxc, *shareglxc; __GLcontextModes *modes; - __GLXscreenInfo *pGlxScreen; - __GLinterface *shareGC; + __GLXscreen *pGlxScreen; GLint i; LEGAL_NEW_RESOURCE(gcId, client); @@ -119,7 +147,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, return BadValue; } pScreen = screenInfo.screens[screen]; - pGlxScreen = &__glXActiveScreens[screen]; + pGlxScreen = __glXActiveScreens[screen]; /* ** Check if the visual ID is valid for this screen. @@ -161,7 +189,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, ** for multithreaded servers, we don't do this. */ if (shareList == None) { - shareGC = 0; + shareglxc = 0; } else { shareglxc = (__GLXcontext *) LookupIDByType(shareList, __glXContextRes); if (!shareglxc) { @@ -187,17 +215,18 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, */ isDirect = GL_FALSE; } - shareGC = shareglxc->gc; } /* ** Allocate memory for the new context */ - glxc = (__GLXcontext *) malloc(sizeof(__GLXcontext)); + if (!isDirect) + glxc = pGlxScreen->createContext(pGlxScreen, modes, shareglxc); + else + glxc = __glXdirectContextCreate(pGlxScreen, modes, shareglxc); if (!glxc) { return BadAlloc; } - memset(glxc, 0, sizeof(__GLXcontext)); /* ** Initially, setup the part of the context that could be used by @@ -208,32 +237,11 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, glxc->pVisual = pVisual; glxc->modes = modes; - if (!isDirect) { - - /* - ** Allocate a GL context - */ - imports.other = (void *)glxc; - glxc->gc = (*pGlxScreen->createContext)(&imports, glxc->modes, shareGC); - if (!glxc->gc) { - free(glxc); - client->errorValue = gcId; - return BadAlloc; - } - } else { - /* - ** Don't need local GL context for a direct context. - */ - glxc->gc = 0; - } /* ** Register this context as a resource. */ if (!AddResource(gcId, __glXContextRes, (void *)glxc)) { - if (!isDirect) { - (*glxc->gc->exports.destroyContext)((__GLcontext *)glxc->gc); - } - free(glxc); + (*glxc->destroy)(glxc); client->errorValue = gcId; return BadAlloc; } @@ -514,9 +522,8 @@ int DoMakeCurrent( __GLXclientState *cl, __GLXpixmap *drawPixmap = NULL; __GLXpixmap *readPixmap = NULL; __GLXcontext *glxc, *prevglxc; - __GLinterface *gc, *prevgc; - __GLXdrawablePrivate *drawPriv = NULL; - __GLXdrawablePrivate *readPriv = NULL; + __GLXdrawable *drawPriv = NULL; + __GLXdrawable *readPriv = NULL; GLint error; GLuint mask; @@ -548,10 +555,8 @@ int DoMakeCurrent( __GLXclientState *cl, client->errorValue = prevglxc->id; return __glXBadContextState; } - prevgc = prevglxc->gc; } else { prevglxc = 0; - prevgc = 0; } /* @@ -569,8 +574,6 @@ int DoMakeCurrent( __GLXclientState *cl, /* Context is current to somebody else */ return BadAccess; } - gc = glxc->gc; - assert( drawId != None ); assert( readId != None ); @@ -594,14 +597,14 @@ int DoMakeCurrent( __GLXclientState *cl, /* FIXME: Finish refactoring this. - idr */ /* get the drawable private */ if (pDraw) { - drawPriv = __glXGetDrawablePrivate(pDraw, drawId, glxc->modes); + drawPriv = __glXGetDrawable(glxc, pDraw, drawId); if (drawPriv == NULL) { return __glXBadDrawable; } } if (pRead != pDraw) { - readPriv = __glXGetDrawablePrivate(pRead, readId, glxc->modes); + readPriv = __glXGetDrawable(glxc, pRead, readId); if (readPriv == NULL) { return __glXBadDrawable; } @@ -612,7 +615,6 @@ int DoMakeCurrent( __GLXclientState *cl, } else { /* Switching to no context. Ignore new drawable. */ glxc = 0; - gc = 0; pDraw = 0; pRead = 0; } @@ -624,7 +626,7 @@ int DoMakeCurrent( __GLXclientState *cl, */ if (__GLX_HAS_UNFLUSHED_CMDS(prevglxc)) { if (__glXForceCurrent(cl, tag, (int *)&error)) { - glFlush(); + CALL_Flush( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(prevglxc); } else { return error; @@ -634,9 +636,10 @@ int DoMakeCurrent( __GLXclientState *cl, /* ** Make the previous context not current. */ - if (!(*prevgc->exports.loseCurrent)((__GLcontext *)prevgc)) { + if (!(*prevglxc->loseCurrent)(prevglxc)) { return __glXBadContext; } + __glXFlushContextCache(); __glXDeassociateContext(prevglxc); } @@ -645,19 +648,18 @@ int DoMakeCurrent( __GLXclientState *cl, glxc->drawPriv = drawPriv; glxc->readPriv = readPriv; - __glXCacheDrawableSize(drawPriv); /* make the context current */ - if (!(*gc->exports.makeCurrent)((__GLcontext *)gc)) { + if (!(*glxc->makeCurrent)(glxc)) { glxc->drawPriv = NULL; glxc->readPriv = NULL; return __glXBadContext; } /* resize the buffers */ - if (!__glXResizeDrawableBuffers(drawPriv)) { + if (!(*drawPriv->resize)(drawPriv)) { /* could not do initial resize. make current failed */ - (*gc->exports.loseCurrent)((__GLcontext *)gc); + (*glxc->loseCurrent)(glxc); glxc->drawPriv = NULL; glxc->readPriv = NULL; return __glXBadContext; @@ -812,7 +814,7 @@ int __glXWaitGL(__GLXclientState *cl, GLbyte *pc) if (!__glXForceCurrent(cl, req->contextTag, &error)) { return error; } - glFinish(); + CALL_Finish( GET_DISPATCH(), () ); return Success; } @@ -898,7 +900,7 @@ int __glXCopyContext(__GLXclientState *cl, GLbyte *pc) ** Do whatever is needed to make sure that all preceding requests ** in both streams are completed before the copy is executed. */ - glFinish(); + CALL_Finish( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(tagcx); } else { return error; @@ -907,9 +909,7 @@ int __glXCopyContext(__GLXclientState *cl, GLbyte *pc) /* ** Issue copy. The only reason for failure is a bad mask. */ - if (!(*dst->gc->exports.copyContext)((__GLcontext *)dst->gc, - (__GLcontext *)src->gc, - mask)) { + if (!(*dst->copy)(dst, src, mask)) { client->errorValue = mask; return BadValue; } @@ -922,7 +922,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, { ClientPtr client = cl->client; xGLXGetVisualConfigsReply reply; - __GLXscreenInfo *pGlxScreen; + __GLXscreen *pGlxScreen; __GLcontextModes *modes; CARD32 buf[__GLX_TOTAL_CONFIG]; int p; @@ -934,7 +934,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, client->errorValue = screen; return BadValue; } - pGlxScreen = &__glXActiveScreens[screen]; + pGlxScreen = __glXActiveScreens[screen]; reply.numVisuals = pGlxScreen->numUsableVisuals; reply.numProps = __GLX_TOTAL_CONFIG; @@ -1013,6 +1013,70 @@ int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc) } +/* Composite adds a 32 bit ARGB visual after glxvisuals.c have created + * the context modes for the screens. This visual is useful for GLX + * pixmaps, so we create a single mode for this visual with no extra + * buffers. */ +static void +__glXCreateARGBConfig(__GLXscreen *screen) +{ + __GLcontextModes *modes; + VisualPtr visual; + int i; + + visual = NULL; + for (i = 0; i < screen->pScreen->numVisuals; i++) + if (screen->pScreen->visuals[i].nplanes == 32) { + visual = &screen->pScreen->visuals[i]; + break; + } + + if (visual == NULL || visual->class != TrueColor) + return; + + /* Stop now if we already added the mode. */ + if (_gl_context_modes_find_visual (screen->modes, visual->vid)) + return; + + modes = _gl_context_modes_create(1, sizeof(__GLcontextModes)); + if (modes == NULL) + return; + + modes->next = screen->modes; + screen->modes = modes; + screen->numUsableVisuals++; + screen->numVisuals++; + + modes->visualID = visual->vid; + modes->fbconfigID = visual->vid; + modes->visualType = GLX_TRUE_COLOR; + modes->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; + modes->renderType = GLX_RGBA_BIT; + modes->xRenderable = GL_TRUE; + modes->rgbMode = TRUE; + modes->colorIndexMode = FALSE; + modes->doubleBufferMode = FALSE; + modes->stereoMode = FALSE; + modes->haveAccumBuffer = FALSE; + + modes->redBits = visual->bitsPerRGBValue;; + modes->greenBits = visual->bitsPerRGBValue; + modes->blueBits = visual->bitsPerRGBValue; + modes->alphaBits = visual->bitsPerRGBValue; + + modes->rgbBits = 4 * visual->bitsPerRGBValue; + modes->indexBits = 0; + modes->level = 0; + modes->numAuxBuffers = 0; + + modes->haveDepthBuffer = FALSE; + modes->depthBits = 0; + modes->haveStencilBuffer = FALSE; + modes->stencilBits = 0; + + modes->visualRating = GLX_NON_CONFORMANT_CONFIG; +} + #define __GLX_TOTAL_FBCONFIG_ATTRIBS (28) #define __GLX_FBCONFIG_ATTRIBS_LENGTH (__GLX_TOTAL_FBCONFIG_ATTRIBS * 2) @@ -1030,7 +1094,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap) { ClientPtr client = cl->client; xGLXGetFBConfigsReply reply; - __GLXscreenInfo *pGlxScreen; + __GLXscreen *pGlxScreen; CARD32 buf[__GLX_FBCONFIG_ATTRIBS_LENGTH]; int p; __GLcontextModes *modes; @@ -1043,7 +1107,9 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap) client->errorValue = screen; return BadValue; } - pGlxScreen = &__glXActiveScreens[screen]; + pGlxScreen = __glXActiveScreens[screen]; + + __glXCreateARGBConfig(pGlxScreen); reply.numFBConfigs = pGlxScreen->numUsableVisuals; reply.numAttribs = __GLX_TOTAL_FBCONFIG_ATTRIBS; @@ -1141,7 +1207,7 @@ int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual, ScreenPtr pScreen; VisualPtr pVisual; __GLXpixmap *pGlxPixmap; - __GLXscreenInfo *pGlxScreen; + __GLXscreen *pGlxScreen; __GLcontextModes *modes; int i; @@ -1184,7 +1250,7 @@ int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual, /* ** Get configuration of the visual. */ - pGlxScreen = &__glXActiveScreens[screenNum]; + pGlxScreen = __glXActiveScreens[screenNum]; modes = _gl_context_modes_find_visual( pGlxScreen->modes, visual ); if (modes == NULL) { /* @@ -1327,7 +1393,7 @@ int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc) ** Do whatever is needed to make sure that all preceding requests ** in both streams are completed before the swap is executed. */ - glFinish(); + CALL_Finish( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(glxc); } else { return error; @@ -1335,16 +1401,16 @@ int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc) } if (pDraw) { - __GLXdrawablePrivate *glxPriv; + __GLXdrawable *glxPriv; if (glxc) { - glxPriv = __glXGetDrawablePrivate(pDraw, drawId, glxc->modes); + glxPriv = __glXGetDrawable(glxc, pDraw, drawId); if (glxPriv == NULL) { return __glXBadDrawable; } } else { - glxPriv = __glXFindDrawablePrivate(drawId); + glxPriv = __glXFindDrawable(drawId); if (glxPriv == NULL) { /* This is a window we've never seen before, do nothing */ return Success; @@ -1408,6 +1474,128 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) } +int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + __GLXpixmap *pGlxPixmap; + __GLXcontext *context; + GLXDrawable drawId; + int buffer; + int error; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + buffer = *((INT32 *) (pc + 4)); + + if (buffer != GLX_FRONT_LEFT_EXT) + return __glXBadPixmap; + + context = __glXForceCurrent (cl, req->contextTag, &error); + if (!context) + return error; + + pGlxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); + if (!pGlxPixmap) { + client->errorValue = drawId; + return __glXBadPixmap; + } + + if (!context->textureFromPixmap) + return __glXUnsupportedPrivateRequest; + + return context->textureFromPixmap->bindTexImage(context, + buffer, + pGlxPixmap); +} + +int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + ClientPtr client = cl->client; + __GLXpixmap *pGlxPixmap; + __GLXcontext *context; + GLXDrawable drawId; + int buffer; + int error; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + buffer = *((INT32 *) (pc + 4)); + + context = __glXForceCurrent (cl, req->contextTag, &error); + if (!context) + return error; + + pGlxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); + if (!pGlxPixmap) { + client->errorValue = drawId; + return __glXBadDrawable; + } + + if (!context->textureFromPixmap) + return __glXUnsupportedPrivateRequest; + + return context->textureFromPixmap->releaseTexImage(context, + buffer, + pGlxPixmap); +} + +/* +** Get drawable attributes +*/ +static int +DoGetDrawableAttributes(__GLXclientState *cl, XID drawId) +{ + ClientPtr client = cl->client; + __GLXpixmap *glxPixmap; + xGLXGetDrawableAttributesReply reply; + CARD32 attributes[4]; + int numAttribs; + + glxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); + if (!glxPixmap) { + client->errorValue = drawId; + return __glXBadPixmap; + } + + numAttribs = 2; + reply.length = numAttribs << 1; + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.numAttribs = numAttribs; + + attributes[0] = GLX_TEXTURE_TARGET_EXT; + attributes[1] = GLX_TEXTURE_RECTANGLE_EXT; + attributes[2] = GLX_Y_INVERTED_EXT; + attributes[3] = GL_FALSE; + + if (client->swapped) { + __glXSwapGetDrawableAttributesReply(client, &reply, attributes); + } else { + WriteToClient(client, sz_xGLXGetDrawableAttributesReply, + (char *)&reply); + WriteToClient(client, reply.length * sizeof (CARD32), + (char *)attributes); + } + + return Success; +} + +int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; + CARD32 *data; + XID drawable; + + data = (CARD32 *) (req + 1); + drawable = data[0]; + + return DoGetDrawableAttributes(cl, drawable); +} + /************************************************************************/ /* @@ -1752,10 +1940,10 @@ static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) XID drawable = req->drawable; int barrier = req->barrier; DrawablePtr pDraw = (DrawablePtr) LookupDrawable(drawable, client); - int screen = pDraw->pScreen->myNum; - + int screen; if (pDraw && (pDraw->type == DRAWABLE_WINDOW)) { + screen = pDraw->pScreen->myNum; if (__glXSwapBarrierFuncs && __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc) { int ret = __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc(screen, drawable, barrier); @@ -1987,14 +2175,18 @@ int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc) #ifndef __DARWIN__ switch( vendorcode ) { case X_GLvop_SampleMaskSGIS: - glSampleMaskSGIS(*(GLfloat *)(pc + 4), - *(GLboolean *)(pc + 8)); + CALL_SampleMaskSGIS( GET_DISPATCH(), + (*(GLfloat *)(pc + 4), *(GLboolean *)(pc + 8)) ); return Success; case X_GLvop_SamplePatternSGIS: - glSamplePatternSGIS( *(GLenum *)(pc + 4)); + CALL_SamplePatternSGIS( GET_DISPATCH(), (*(GLenum *)(pc + 4)) ); return Success; case X_GLXvop_BindSwapBarrierSGIX: return __glXBindSwapBarrierSGIX(cl, pc); + case X_GLXvop_BindTexImageEXT: + return __glXBindTexImageEXT(cl, pc); + case X_GLXvop_ReleaseTexImageEXT: + return __glXReleaseTexImageEXT(cl, pc); } #endif @@ -2040,6 +2232,22 @@ int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) return __glXCreateContextWithConfigSGIX(cl, pc); case X_GLXvop_CreateGLXPixmapWithConfigSGIX: return __glXCreateGLXPixmapWithConfigSGIX(cl, pc); + case X_GLXvop_GetDrawableAttributesSGIX: + return __glXGetDrawableAttributesSGIX(cl, pc); + case X_GLvop_IsRenderbufferEXT: + return __glXDisp_IsRenderbufferEXT(cl, pc); + case X_GLvop_GenRenderbuffersEXT: + return __glXDisp_GenRenderbuffersEXT(cl, pc); + case X_GLvop_GetRenderbufferParameterivEXT: + return __glXDisp_GetRenderbufferParameterivEXT(cl, pc); + case X_GLvop_IsFramebufferEXT: + return __glXDisp_IsFramebufferEXT(cl, pc); + case X_GLvop_GenFramebuffersEXT: + return __glXDisp_GenFramebuffersEXT(cl, pc); + case X_GLvop_CheckFramebufferStatusEXT: + return __glXDisp_CheckFramebufferStatusEXT(cl, pc); + case X_GLvop_GetFramebufferAttachmentParameterivEXT: + return __glXDisp_GetFramebufferAttachmentParameterivEXT(cl, pc); default: break; } @@ -2074,7 +2282,7 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) return BadValue; } - ptr = __glXActiveScreens[screen].GLXextensions; + ptr = __glXActiveScreens[screen]->GLXextensions; n = strlen(ptr) + 1; length = __GLX_PAD(n) >> 2; @@ -2122,13 +2330,13 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) } switch(name) { case GLX_VENDOR: - ptr = __glXActiveScreens[screen].GLXvendor; + ptr = __glXActiveScreens[screen]->GLXvendor; break; case GLX_VERSION: - ptr = __glXActiveScreens[screen].GLXversion; + ptr = __glXActiveScreens[screen]->GLXversion; break; case GLX_EXTENSIONS: - ptr = __glXActiveScreens[screen].GLXextensions; + ptr = __glXActiveScreens[screen]->GLXextensions; break; default: return BadValue; @@ -2141,7 +2349,8 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) reply.length = length; reply.n = n; - if ((buf = (char *) malloc(length << 2)) == NULL) { + buf = (char *) malloc(length << 2); + if (buf == NULL) { return BadAlloc; } memcpy(buf, ptr, n); diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c b/nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c index 98acfe5af5..8fcb40a53c 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c +++ b/nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c @@ -38,6 +38,7 @@ #include #endif +#include #include "glxserver.h" #include "glxutil.h" #include @@ -47,6 +48,11 @@ #include #include #include "glxext.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "indirect_dispatch.h" static int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc); static int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); @@ -337,7 +343,7 @@ int __glXSwapUseXFont(__GLXclientState *cl, GLbyte *pc) int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) { - xGLXQueryExtensionsStringReq *req = NULL; + xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); @@ -382,6 +388,64 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) return __glXQueryContextInfoEXT(cl, pc); } +int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = ((GLXDrawable *) (pc)); + buffer = ((int *) (pc + 4)); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(drawId); + __GLX_SWAP_INT(buffer); + + return __glXBindTexImageEXT(cl, (GLbyte *)pc); +} + +int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXDrawable *drawId; + int *buffer; + + __GLX_DECLARE_SWAP_VARIABLES; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = ((GLXDrawable *) (pc)); + buffer = ((int *) (pc + 4)); + + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(drawId); + __GLX_SWAP_INT(buffer); + + return __glXReleaseTexImageEXT(cl, (GLbyte *)pc); +} + +int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; + CARD32 *data; + + __GLX_DECLARE_SWAP_VARIABLES; + + data = (CARD32 *) (req + 1); + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + __GLX_SWAP_INT(data); + + return __glXGetDrawableAttributesSGIX(cl, (GLbyte *)pc); +} + + /************************************************************************/ /* @@ -456,6 +520,19 @@ void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXT WriteToClient(client, length << 2, buf); } +void __glXSwapGetDrawableAttributesReply(ClientPtr client, + xGLXGetDrawableAttributesReply *reply, CARD32 *buf) +{ + int length = reply->length; + __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; + __GLX_SWAP_SHORT(&reply->sequenceNumber); + __GLX_SWAP_INT(&reply->length); + __GLX_SWAP_INT(&reply->numAttribs); + WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *)reply); + __GLX_SWAP_INT_ARRAY((int *)buf, length); + WriteToClient(client, length << 2, (char *)buf); +} /************************************************************************/ @@ -828,13 +905,17 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc) case X_GLvop_SampleMaskSGIS: __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_INT(pc + 8); - glSampleMaskSGIS(*(GLfloat *)(pc + 4), - *(GLboolean *)(pc + 8)); + CALL_SampleMaskSGIS( GET_DISPATCH(), + (*(GLfloat *)(pc + 4), *(GLboolean *)(pc + 8)) ); return Success; case X_GLvop_SamplePatternSGIS: __GLX_SWAP_INT(pc + 4); - glSamplePatternSGIS( *(GLenum *)(pc + 4)); + CALL_SamplePatternSGIS( GET_DISPATCH(), (*(GLenum *)(pc + 4)) ); return Success; + case X_GLXvop_BindTexImageEXT: + return __glXSwapBindTexImageEXT(cl, pc); + case X_GLXvop_ReleaseTexImageEXT: + return __glXSwapReleaseTexImageEXT(cl, pc); } #endif @@ -874,6 +955,22 @@ int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) return __glXSwapCreateContextWithConfigSGIX(cl, pc); case X_GLXvop_CreateGLXPixmapWithConfigSGIX: return __glXSwapCreateGLXPixmapWithConfigSGIX(cl, pc); + case X_GLXvop_GetDrawableAttributesSGIX: + return __glXSwapGetDrawableAttributesSGIX(cl, pc); + case X_GLvop_IsRenderbufferEXT: + return __glXDispSwap_IsRenderbufferEXT(cl, pc); + case X_GLvop_GenRenderbuffersEXT: + return __glXDispSwap_GenRenderbuffersEXT(cl, pc); + case X_GLvop_GetRenderbufferParameterivEXT: + return __glXDispSwap_GetRenderbufferParameterivEXT(cl, pc); + case X_GLvop_IsFramebufferEXT: + return __glXDispSwap_IsFramebufferEXT(cl, pc); + case X_GLvop_GenFramebuffersEXT: + return __glXDispSwap_GenFramebuffersEXT(cl, pc); + case X_GLvop_CheckFramebufferStatusEXT: + return __glXDispSwap_CheckFramebufferStatusEXT(cl, pc); + case X_GLvop_GetFramebufferAttachmentParameterivEXT: + return __glXDispSwap_GetFramebufferAttachmentParameterivEXT(cl, pc); default: break; } diff --git a/nx-X11/programs/Xserver/GL/glx/glxcontext.h b/nx-X11/programs/Xserver/GL/glx/glxcontext.h index 25f8daf443..55b9e42dc5 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxcontext.h +++ b/nx-X11/programs/Xserver/GL/glx/glxcontext.h @@ -40,32 +40,48 @@ ** */ -typedef struct __GLXcontextRec __GLXcontext; - /* XXX: should be defined somewhere globally */ #define CAPI #include "GL/internal/glcore.h" -struct __GLXcontextRec { +typedef struct __GLXtextureFromPixmap __GLXtextureFromPixmap; +struct __GLXtextureFromPixmap { + int (*bindTexImage) (__GLXcontext *baseContext, + int buffer, + __GLXpixmap *pixmap); + int (*releaseTexImage) (__GLXcontext *baseContext, + int buffer, + __GLXpixmap *pixmap); +}; + + +struct __GLXcontext { + void (*destroy) (__GLXcontext *context); + int (*makeCurrent) (__GLXcontext *context); + int (*loseCurrent) (__GLXcontext *context); + int (*copy) (__GLXcontext *dst, + __GLXcontext *src, + unsigned long mask); + int (*forceCurrent) (__GLXcontext *context); + + __GLXdrawable *(*createDrawable)(__GLXcontext *context, + DrawablePtr pDraw, + XID drawId); + + __GLXtextureFromPixmap *textureFromPixmap; + /* ** list of context structs */ - struct __GLXcontextRec *last; - struct __GLXcontextRec *next; + __GLXcontext *last; + __GLXcontext *next; /* ** list of contexts bound to the same drawable */ - struct __GLXcontextRec *nextDrawPriv; - struct __GLXcontextRec *nextReadPriv; - - /* - ** Opaque pointer the context object created by the GL that the - ** server is bound with. Never dereferenced by this code, but used - ** as a handle to feed to the routines in the screen info struct. - */ - __GLinterface *gc; + __GLXcontext *nextDrawPriv; + __GLXcontext *nextReadPriv; /* ** mode struct for this context @@ -77,7 +93,7 @@ struct __GLXcontextRec { ** when the context is created. */ ScreenPtr pScreen; - __GLXscreenInfo *pGlxScreen; + __GLXscreen *pGlxScreen; /* ** This context is created with respect to this visual. @@ -151,8 +167,8 @@ struct __GLXcontextRec { /* ** The drawable private this context is bound to */ - __GLXdrawablePrivate *drawPriv; - __GLXdrawablePrivate *readPriv; + __GLXdrawable *drawPriv; + __GLXdrawable *readPriv; }; /* pending state defines */ @@ -160,4 +176,6 @@ struct __GLXcontextRec { #define __GLX_PENDING_DESTROY 0x2 #define __GLX_PENDING_SWAP 0x4 +void __glXContextDestroy(__GLXcontext *context); + #endif /* !__GLX_context_h__ */ diff --git a/nx-X11/programs/Xserver/GL/glx/glxcore.c b/nx-X11/programs/Xserver/GL/glx/glxcore.c new file mode 100644 index 0000000000..9572ccc580 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/glxcore.c @@ -0,0 +1,443 @@ +/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.19 2003/07/16 01:38:27 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Brian E. Paul + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "context.h" +#include "xmesaP.h" +#include +#include "context.h" + +#include "glcontextmodes.h" +#include "os.h" + +/* + * This define is for the glcore.h header file. + * If you add it here, then make sure you also add it in + * ../../../glx/Imakefile. + */ +#if 0 +#define DEBUG +#include +#undef DEBUG +#else +#include +#endif + +typedef struct __GLXMESAscreen __GLXMESAscreen; +typedef struct __GLXMESAcontext __GLXMESAcontext; +typedef struct __GLXMESAdrawable __GLXMESAdrawable; + +struct __GLXMESAscreen { + __GLXscreen base; + int index; + XMesaVisual *xm_vis; +}; + +struct __GLXMESAcontext { + __GLXcontext base; + XMesaContext xmesa; +}; + +struct __GLXMESAdrawable { + __GLXdrawable base; + XMesaBuffer xm_buf; +}; + +static XMesaVisual find_mesa_visual(__GLXscreen *screen, VisualID vid); + + +static void +__glXMesaDrawableDestroy(__GLXdrawable *base) +{ + __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; + + if (glxPriv->xm_buf != NULL) + XMesaDestroyBuffer(glxPriv->xm_buf); + free(glxPriv); +} + +static GLboolean +__glXMesaDrawableResize(__GLXdrawable *base) +{ + __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; + + XMesaResizeBuffers(glxPriv->xm_buf); + + return GL_TRUE; +} + +static GLboolean +__glXMesaDrawableSwapBuffers(__GLXdrawable *base) +{ + __GLXMESAdrawable *glxPriv = (__GLXMESAdrawable *) base; + + /* This is terrifying: XMesaSwapBuffers() ends up calling CopyArea + * to do the buffer swap, but this assumes that the server holds + * the lock and has its context visible. If another screen uses a + * DRI driver, that will have installed the DRI enter/leave server + * functions, which lifts the lock during GLX dispatch. This is + * why we need to re-take the lock and swap in the server context + * before calling XMesaSwapBuffers() here. /me shakes head. */ + + __glXenterServer(); + + XMesaSwapBuffers(glxPriv->xm_buf); + + __glXleaveServer(); + + return GL_TRUE; +} + + +static __GLXdrawable * +__glXMesaContextCreateDrawable(__GLXcontext *context, + DrawablePtr pDraw, + XID drawId) +{ + __GLXMESAdrawable *glxPriv; + __GLXscreen *pGlxScreen; + XMesaVisual xm_vis; + + glxPriv = malloc(sizeof *glxPriv); + if (glxPriv == NULL) + return NULL; + + memset(glxPriv, 0, sizeof *glxPriv); + + if (!__glXDrawableInit(&glxPriv->base, context, pDraw, drawId)) { + free(glxPriv); + return NULL; + } + + glxPriv->base.destroy = __glXMesaDrawableDestroy; + glxPriv->base.resize = __glXMesaDrawableResize; + glxPriv->base.swapBuffers = __glXMesaDrawableSwapBuffers; + + pGlxScreen = __glXActiveScreens[pDraw->pScreen->myNum]; + + if (glxPriv->base.type == DRAWABLE_WINDOW) { + VisualID vid = wVisual((WindowPtr)pDraw); + + glxPriv->base.modes = _gl_context_modes_find_visual(pGlxScreen->modes, + vid); + } else { + glxPriv->base.modes = glxPriv->base.pGlxPixmap->modes; + } + + xm_vis = find_mesa_visual(pGlxScreen, glxPriv->base.modes->visualID); + if (xm_vis == NULL) { + ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n", + glxPriv->base.modes->visualID); + free(glxPriv); + return NULL; + } + + if (glxPriv->base.type == DRAWABLE_WINDOW) { + glxPriv->xm_buf = XMesaCreateWindowBuffer(xm_vis, (WindowPtr)pDraw); + } else { + glxPriv->xm_buf = XMesaCreatePixmapBuffer(xm_vis, (PixmapPtr)pDraw, 0); + } + + return &glxPriv->base; +} + +static void +__glXMesaContextDestroy(__GLXcontext *baseContext) +{ + __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; + + XMesaDestroyContext(context->xmesa); + __glXContextDestroy(context); + free(context); +} + +static int +__glXMesaContextMakeCurrent(__GLXcontext *baseContext) + +{ + __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; + __GLXMESAdrawable *drawPriv = (__GLXMESAdrawable *) context->base.drawPriv; + __GLXMESAdrawable *readPriv = (__GLXMESAdrawable *) context->base.readPriv; + + return XMesaMakeCurrent2(context->xmesa, + drawPriv->xm_buf, + readPriv->xm_buf); +} + +static int +__glXMesaContextLoseCurrent(__GLXcontext *baseContext) +{ + __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; + + return XMesaLoseCurrent(context->xmesa); +} + +static int +__glXMesaContextCopy(__GLXcontext *baseDst, + __GLXcontext *baseSrc, + unsigned long mask) +{ + __GLXMESAcontext *dst = (__GLXMESAcontext *) baseDst; + __GLXMESAcontext *src = (__GLXMESAcontext *) baseSrc; + + _mesa_copy_context(&src->xmesa->mesa, &dst->xmesa->mesa, mask); + return GL_TRUE; +} + +static int +__glXMesaContextForceCurrent(__GLXcontext *baseContext) +{ + __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; + + GlxSetRenderTables (context->xmesa->mesa.CurrentDispatch); + + return XMesaForceCurrent(context->xmesa); +} + +static __GLXcontext * +__glXMesaScreenCreateContext(__GLXscreen *screen, + __GLcontextModes *modes, + __GLXcontext *baseShareContext) +{ + __GLXMESAcontext *context; + __GLXMESAcontext *shareContext = (__GLXMESAcontext *) baseShareContext; + XMesaVisual xm_vis; + XMesaContext xm_share; + + context = malloc (sizeof (__GLXMESAcontext)); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + + context->base.pGlxScreen = screen; + context->base.modes = modes; + + context->base.destroy = __glXMesaContextDestroy; + context->base.makeCurrent = __glXMesaContextMakeCurrent; + context->base.loseCurrent = __glXMesaContextLoseCurrent; + context->base.copy = __glXMesaContextCopy; + context->base.forceCurrent = __glXMesaContextForceCurrent; + context->base.createDrawable = __glXMesaContextCreateDrawable; + + xm_vis = find_mesa_visual(screen, modes->visualID); + if (!xm_vis) { + ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n", + modes->visualID); + free(context); + return NULL; + } + + xm_share = shareContext ? shareContext->xmesa : NULL; + context->xmesa = XMesaCreateContext(xm_vis, xm_share); + if (!context->xmesa) { + free(context); + return NULL; + } + + return &context->base; +} + +static void +__glXMesaScreenDestroy(__GLXscreen *screen) +{ + __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen; + int i; + + for (i = 0; i < screen->numVisuals; i++) { + if (mesaScreen->xm_vis[i]) + XMesaDestroyVisual(mesaScreen->xm_vis[i]); + } + + free(mesaScreen->xm_vis); + + __glXScreenDestroy(screen); + + free(screen); +} + +static XMesaVisual +find_mesa_visual(__GLXscreen *screen, VisualID vid) +{ + __GLXMESAscreen *mesaScreen = (__GLXMESAscreen *) screen; + const __GLcontextModes *modes; + unsigned i = 0; + + for ( modes = screen->modes ; modes != NULL ; modes = modes->next ) { + if ( modes->visualID == vid ) { + break; + } + + i++; + } + + return (modes != NULL) ? mesaScreen->xm_vis[i] : NULL; +} + +static void init_screen_visuals(__GLXMESAscreen *screen) +{ + ScreenPtr pScreen = screen->base.pScreen; + __GLcontextModes *modes; + XMesaVisual *pXMesaVisual; + int *used; + int i, j, size; + + /* Alloc space for the list of XMesa visuals */ + size = screen->base.numVisuals * sizeof(XMesaVisual); + pXMesaVisual = (XMesaVisual *) malloc(size); + memset(pXMesaVisual, 0, size); + + /* FIXME: Change 'used' to be a array of bits (rather than of ints), + * FIXME: create a stack array of 8 or 16 bytes. If 'numVisuals' is less + * FIXME: than 64 or 128 the stack array can be used instead of calling + * FIXME: __glXMalloc / __glXFree. If nothing else, convert 'used' to + * FIXME: array of bytes instead of ints! + */ + used = (int *) malloc(pScreen->numVisuals * sizeof(int)); + memset(used, 0, pScreen->numVisuals * sizeof(int)); + + i = 0; + for ( modes = screen->base.modes; modes != NULL; modes = modes->next ) { + const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); + const int nplanes = (modes->rgbBits - modes->alphaBits); + const VisualPtr pVis = pScreen->visuals; + + for (j = 0; j < pScreen->numVisuals; j++) { + if (pVis[j].class == vis_class && + pVis[j].nplanes == nplanes && + pVis[j].redMask == modes->redMask && + pVis[j].greenMask == modes->greenMask && + pVis[j].blueMask == modes->blueMask && + !used[j]) { + + /* Create the XMesa visual */ + pXMesaVisual[i] = + XMesaCreateVisual(pScreen, + &pVis[j], + modes->rgbMode, + (modes->alphaBits > 0), + modes->doubleBufferMode, + modes->stereoMode, + GL_TRUE, /* ximage_flag */ + modes->depthBits, + modes->stencilBits, + modes->accumRedBits, + modes->accumGreenBits, + modes->accumBlueBits, + modes->accumAlphaBits, + modes->samples, + modes->level, + modes->visualRating); + /* Set the VisualID */ + modes->visualID = pVis[j].vid; + + /* Mark this visual used */ + used[j] = 1; + break; + } + } + + if ( j == pScreen->numVisuals ) { + ErrorF("No matching visual for __GLcontextMode with " + "visual class = %d (%d), nplanes = %u\n", + vis_class, + modes->visualType, + (modes->rgbBits - modes->alphaBits) ); + } + else if ( modes->visualID == -1 ) { + FatalError( "Matching visual found, but visualID still -1!\n" ); + } + + i++; + } + + free(used); + + screen->xm_vis = pXMesaVisual; +} + +static __GLXscreen * +__glXMesaScreenProbe(ScreenPtr pScreen) +{ + __GLXMESAscreen *screen; + + screen = malloc(sizeof *screen); + if (screen == NULL) + return NULL; + + __glXScreenInit(&screen->base, pScreen); + + screen->base.destroy = __glXMesaScreenDestroy; + screen->base.createContext = __glXMesaScreenCreateContext; + screen->base.pScreen = pScreen; + + /* + * Find the GLX visuals that are supported by this screen and create + * XMesa's visuals. + */ + init_screen_visuals(screen); + + return &screen->base; +} + +__GLXprovider __glXMesaProvider = { + __glXMesaScreenProbe, + "MESA", + NULL +}; + +__GLXprovider * +GlxGetMesaProvider (void) +{ + return &__glXMesaProvider; +} diff --git a/nx-X11/programs/Xserver/GL/glx/glxdrawable.h b/nx-X11/programs/Xserver/GL/glx/glxdrawable.h index a7c975a44d..a840097163 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxdrawable.h +++ b/nx-X11/programs/Xserver/GL/glx/glxdrawable.h @@ -44,19 +44,23 @@ typedef struct { DrawablePtr pDraw; __GLcontextModes *modes; - __GLXscreenInfo *pGlxScreen; + __GLXscreen *pGlxScreen; ScreenPtr pScreen; Bool idExists; int refcnt; } __GLXpixmap; -struct __GLXdrawablePrivateRec { +struct __GLXdrawable { + void (*destroy)(__GLXdrawable *private); + GLboolean (*resize)(__GLXdrawable *private); + GLboolean (*swapBuffers)(__GLXdrawable *); + /* ** list of drawable private structs */ - struct __GLXdrawablePrivateRec *last; - struct __GLXdrawablePrivateRec *next; + __GLXdrawable *last; + __GLXdrawable *next; DrawablePtr pDraw; XID drawId; @@ -74,33 +78,14 @@ struct __GLXdrawablePrivateRec { */ __GLcontextModes *modes; - /* - ** cached drawable size and origin - */ - - GLint xorigin, yorigin; - GLint width, height; - /* ** Lists of contexts bound to this drawable. There are two lists here. ** One list is of the contexts that have this drawable bound for drawing, ** and the other is the list of contexts that have this drawable bound ** for reading. */ - struct __GLXcontextRec *drawGlxc; - struct __GLXcontextRec *readGlxc; - - /* - ** "methods" that the drawble should be able to respond to. - */ - void (*freeBuffers)(struct __GLXdrawablePrivateRec *); - void (*updatePalette)(struct __GLXdrawablePrivateRec *); - GLboolean (*swapBuffers)(struct __GLXdrawablePrivateRec *); - - /* - ** The GL drawable (information shared between GLX and the GL core) - */ - __GLdrawablePrivate glPriv; + __GLXcontext *drawGlxc; + __GLXcontext *readGlxc; /* ** reference count diff --git a/nx-X11/programs/Xserver/GL/glx/glxdri.c b/nx-X11/programs/Xserver/GL/glx/glxdri.c new file mode 100644 index 0000000000..a83a9f7651 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/glxdri.c @@ -0,0 +1,929 @@ +/* + * Copyright © 2006 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 the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of Red Hat, + * Inc not be used in advertising or publicity pertaining to + * distribution of the software without specific, written prior + * permission. Red Hat, Inc makes no representations about the + * suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN + * NO EVENT SHALL RED HAT, INC BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#define _XF86DRI_SERVER_ +#include +#include +#include +#include +#include +#include + +#define DRI_NEW_INTERFACE_ONLY +#include "glxserver.h" +#include "glxutil.h" +#include "glcontextmodes.h" + +#include "g_disptab.h" +#include "g_disptab_EXT.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + + +#define STRINGIFY(macro_or_string) STRINGIFY_ARG (macro_or_string) +#define STRINGIFY_ARG(contents) #contents + +typedef struct __GLXDRIscreen __GLXDRIscreen; +typedef struct __GLXDRIcontext __GLXDRIcontext; +typedef struct __GLXDRIdrawable __GLXDRIdrawable; + +struct __GLXDRIscreen { + __GLXscreen base; + + __DRIscreen driScreen; + void *driver; +}; + +struct __GLXDRIcontext { + __GLXcontext base; + + __DRIcontext driContext; +}; + +struct __GLXDRIdrawable { + __GLXdrawable base; + + __DRIdrawable *driDrawable; +}; + +/* History: + * 20021121 - Initial version + * 20021128 - Added __glXWindowExists() function + * 20021207 - Added support for dynamic GLX extensions, + * GLX_SGI_swap_control, GLX_SGI_video_sync, + * GLX_OML_sync_control, and GLX_MESA_swap_control. + * Never officially released. Do NOT test against + * this version. Use 20030317 instead. + * 20030317 - Added support GLX_SGIX_fbconfig, + * GLX_MESA_swap_frame_usage, GLX_OML_swap_method, + * GLX_{ARB,SGIS}_multisample, and + * GLX_SGIX_visual_select_group. + * 20030606 - Added support for GLX_SGI_make_current_read. + * 20030813 - Made support for dynamic extensions multi-head aware. + * 20030818 - Added support for GLX_MESA_allocate_memory in place of the + * deprecated GLX_NV_vertex_array_range & GLX_MESA_agp_offset + * interfaces. + * 20031201 - Added support for the first round of DRI interface changes. + * Do NOT test against this version! It has binary + * compatibility bugs, use 20040317 instead. + * 20040317 - Added the 'mode' field to __DRIcontextRec. + * 20040415 - Added support for bindContext3 and unbindContext3. + * 20040602 - Add __glXGetDrawableInfo. I though that was there + * months ago. :( + * 20050727 - Gut all the old interfaces. This breaks compatability with + * any DRI driver built to any previous version. + */ +#define INTERNAL_VERSION 20050727 + +static const char CREATE_NEW_SCREEN_FUNC[] = + "__driCreateNewScreen_" STRINGIFY (INTERNAL_VERSION); + +static void +__glXDRIleaveServer(void) +{ + int i; + + for (i = 0; i < screenInfo.numScreens; i++) + DRIDoBlockHandler(i, NULL, NULL, NULL); +} + +static void +__glXDRIenterServer(void) +{ + int i; + + for (i = 0; i < screenInfo.numScreens; i++) + DRIDoWakeupHandler(i, NULL, 0, NULL); +} + +static void +__glXDRIdrawableDestroy(__GLXdrawable *private) +{ +#if 0 + (*glxPriv->driDrawable.destroyDrawable)(NULL, + glxPriv->driDrawable.private); +#endif + + free(private); +} + +static GLboolean +__glXDRIdrawableResize(__GLXdrawable *glxPriv) +{ + /* Nothing to do here, the DRI driver asks the server for drawable + * geometry when it sess the SAREA timestamps change.*/ + + return GL_TRUE; +} + +static GLboolean +__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + __GLXDRIscreen *screen; + + /* FIXME: We're jumping through hoops here to get the DRIdrawable + * which the dri driver tries to keep to it self... cf. FIXME in + * createDrawable. */ + + screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum); + private->driDrawable = (screen->driScreen.getDrawable)(NULL, + private->base.drawId, + screen->driScreen.private); + + (*private->driDrawable->swapBuffers)(NULL, + private->driDrawable->private); + + return TRUE; +} + +static __GLXdrawable * +__glXDRIcontextCreateDrawable(__GLXcontext *context, + DrawablePtr pDraw, + XID drawId) +{ + __GLXDRIdrawable *private; + + private = malloc(sizeof *private); + if (private == NULL) + return NULL; + + memset(private, 0, sizeof *private); + + if (!__glXDrawableInit(&private->base, context, pDraw, drawId)) { + free(private); + return NULL; + } + + private->base.destroy = __glXDRIdrawableDestroy; + private->base.resize = __glXDRIdrawableResize; + private->base.swapBuffers = __glXDRIdrawableSwapBuffers; + +#if 0 + /* FIXME: It would only be natural that we called + * driScreen->createNewDrawable here but the DRI drivers manage + * them a little oddly. FIXME: describe this better.*/ + + /* The last argument is 'attrs', which is used with pbuffers which + * we currently don't support. */ + + glxPriv->driDrawable.private = + (pGlxScreen->driScreen.createNewDrawable)(NULL, modes, + drawId, + &glxPriv->driDrawable, + 0, + NULL); +#endif + + return &private->base; +} + + +static void +__glXDRIcontextDestroy(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + context->driContext.destroyContext(NULL, + context->base.pScreen->myNum, + context->driContext.private); + __glXContextDestroy(&context->base); + free(context); +} + +static int +__glXDRIcontextMakeCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + return (*context->driContext.bindContext)(NULL, + context->base.pScreen->myNum, + baseContext->drawPriv->drawId, + baseContext->readPriv->drawId, + &context->driContext); +} + +static int +__glXDRIcontextLoseCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + return (*context->driContext.unbindContext)(NULL, + context->base.pScreen->myNum, + baseContext->drawPriv->drawId, + baseContext->readPriv->drawId, + &context->driContext); +} + +static int +__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, + unsigned long mask) +{ + __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; + __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; + + /* FIXME: We will need to add DRIcontext::copyContext for this. */ + + (void) dst; + (void) src; + + return FALSE; +} + +static int +__glXDRIcontextForceCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + return (*context->driContext.bindContext)(NULL, + context->base.pScreen->myNum, + baseContext->drawPriv->drawId, + baseContext->readPriv->drawId, + &context->driContext); +} + +static int +glxCountBits(int word) +{ + int ret = 0; + + while (word) { + ret += (word & 1); + word >>= 1; + } + + return ret; +} + +static void +glxFillAlphaChannel (PixmapPtr pixmap) +{ + int i, j; + CARD32 *pixels = (CARD32 *)pixmap->devPrivate.ptr; + CARD32 rowstride = pixmap->devKind / 4; + CARD32 x, y; + + x = pixmap->drawable.x; + y = pixmap->drawable.y; + + for (i = y; i < pixmap->drawable.height + y; ++i) + { + for (j = x; j < pixmap->drawable.width + x; ++j) + { + int index = i * rowstride + j; + + pixels[index] |= 0xFF000000; + } + } +} + +/* + * (sticking this here for lack of a better place) + * Known issues with the GLX_EXT_texture_from_pixmap implementation: + * - In general we ignore the fbconfig, lots of examples follow + * - No fbconfig handling for multiple mipmap levels + * - No fbconfig handling for 1D textures + * - No fbconfig handling for TEXTURE_TARGET + * - No fbconfig exposure of Y inversion state + * - No GenerateMipmapEXT support (due to no FBO support) + * - No damage tracking between binds + * - No support for anything but 16bpp and 32bpp-sparse pixmaps + */ + +static int +__glXDRIbindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXpixmap *glxPixmap) +{ + PixmapPtr pixmap; + int bpp; + Bool npot; + + pixmap = (PixmapPtr) glxPixmap->pDraw; + bpp = pixmap->drawable.depth >= 24 ? 4 : 2; /* XXX 24bpp packed, 8, etc */ + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, + pixmap->devKind / bpp) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, + pixmap->drawable.y) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, + pixmap->drawable.x) ); + + if (pixmap->drawable.depth == 24) + glxFillAlphaChannel(pixmap); + + npot = !(glxCountBits(pixmap->drawable.width) == 1 && + glxCountBits(pixmap->drawable.height) == 1) /* || + strstr(CALL_GetString(GL_EXTENSIONS, + "GL_ARB_texture_non_power_of_two")) */ ; + + CALL_TexImage2D( GET_DISPATCH(), + ( npot ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D, + 0, + bpp == 4 ? 4 : 3, + pixmap->drawable.width, + pixmap->drawable.height, + 0, + bpp == 4 ? GL_BGRA : GL_RGB, + bpp == 4 ? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT_5_6_5, + pixmap->devPrivate.ptr ) ); + + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXpixmap *pixmap) +{ + return Success; +} + +static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { + __glXDRIbindTexImage, + __glXDRIreleaseTexImage +}; + +static void +__glXDRIscreenDestroy(__GLXscreen *baseScreen) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + + screen->driScreen.destroyScreen(NULL, + screen->base.pScreen->myNum, + screen->driScreen.private); + + dlclose(screen->driver); + + __glXScreenDestroy(baseScreen); + + free(screen); +} + +static __GLXcontext * +__glXDRIscreenCreateContext(__GLXscreen *baseScreen, + __GLcontextModes *modes, + __GLXcontext *baseShareContext) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + __GLXDRIcontext *context, *shareContext; + void *sharePrivate; + + shareContext = (__GLXDRIcontext *) baseShareContext; + if (shareContext) + sharePrivate = shareContext->driContext.private; + else + sharePrivate = NULL; + + context = malloc(sizeof *context); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + context->base.destroy = __glXDRIcontextDestroy; + context->base.makeCurrent = __glXDRIcontextMakeCurrent; + context->base.loseCurrent = __glXDRIcontextLoseCurrent; + context->base.copy = __glXDRIcontextCopy; + context->base.forceCurrent = __glXDRIcontextForceCurrent; + context->base.createDrawable = __glXDRIcontextCreateDrawable; + + context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + + context->driContext.private = + screen->driScreen.createNewContext(NULL, modes, + 0, /* render type */ + sharePrivate, + &context->driContext); + + context->driContext.mode = modes; + + return &context->base; +} + +static unsigned +filter_modes(__GLcontextModes **server_modes, + const __GLcontextModes *driver_modes) +{ + __GLcontextModes * m; + __GLcontextModes ** prev_next; + const __GLcontextModes * check; + unsigned modes_count = 0; + + if ( driver_modes == NULL ) { + LogMessage(X_WARNING, + "AIGLX: 3D driver returned no fbconfigs.\n"); + return 0; + } + + /* For each mode in server_modes, check to see if a matching mode exists + * in driver_modes. If not, then the mode is not available. + */ + + prev_next = server_modes; + for ( m = *prev_next ; m != NULL ; m = *prev_next ) { + GLboolean do_delete = GL_TRUE; + + for ( check = driver_modes ; check != NULL ; check = check->next ) { + if ( _gl_context_modes_are_same( m, check ) ) { + do_delete = GL_FALSE; + break; + } + } + + /* The 3D has to support all the modes that match the GLX visuals + * sent from the X server. + */ + if ( do_delete && (m->visualID != 0) ) { + do_delete = GL_FALSE; + + LogMessage(X_WARNING, + "AIGLX: 3D driver claims to not support " + "visual 0x%02x\n", m->visualID); + } + + if ( do_delete ) { + *prev_next = m->next; + + m->next = NULL; + _gl_context_modes_destroy( m ); + } + else { + modes_count++; + prev_next = & m->next; + } + } + + return modes_count; +} + + +static __DRIfuncPtr getProcAddress(const char *proc_name) +{ + return NULL; +} + +static __DRIscreen *findScreen(__DRInativeDisplay *dpy, int scrn) +{ + __GLXDRIscreen *screen = + (__GLXDRIscreen *) __glXgetActiveScreen(scrn); + + return &screen->driScreen; +} + +static GLboolean windowExists(__DRInativeDisplay *dpy, __DRIid draw) +{ + WindowPtr pWin = (WindowPtr) LookupIDByType(draw, RT_WINDOW); + + return pWin == NULL ? GL_FALSE : GL_TRUE; +} + +static GLboolean createContext(__DRInativeDisplay *dpy, int screen, + int configID, void *contextID, + drm_context_t *hw_context) +{ + XID fakeID; + VisualPtr visual; + int i; + ScreenPtr pScreen; + GLboolean retval; + + pScreen = screenInfo.screens[screen]; + + /* Find the requested X visual */ + visual = pScreen->visuals; + for (i = 0; i < pScreen->numVisuals; i++, visual++) + if (visual->vid == configID) + break; + if (i == pScreen->numVisuals) + return GL_FALSE; + + fakeID = FakeClientID(0); + *(XID *) contextID = fakeID; + + __glXDRIenterServer(); + retval = DRICreateContext(pScreen, visual, fakeID, hw_context); + __glXDRIleaveServer(); + return retval; +} + +static GLboolean destroyContext(__DRInativeDisplay *dpy, int screen, + __DRIid context) +{ + GLboolean retval; + + __glXDRIenterServer(); + retval = DRIDestroyContext(screenInfo.screens[screen], context); + __glXDRIleaveServer(); + return retval; +} + +static GLboolean +createDrawable(__DRInativeDisplay *dpy, int screen, + __DRIid drawable, drm_drawable_t *hHWDrawable) +{ + DrawablePtr pDrawable; + GLboolean retval; + + pDrawable = (DrawablePtr) LookupIDByClass(drawable, RC_DRAWABLE); + if (!pDrawable) + return GL_FALSE; + + __glXDRIenterServer(); + retval = DRICreateDrawable(screenInfo.screens[screen], + drawable, + pDrawable, + hHWDrawable); + __glXDRIleaveServer(); + return retval; +} + +static GLboolean +destroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable) +{ + DrawablePtr pDrawable; + GLboolean retval; + + pDrawable = (DrawablePtr) LookupIDByClass(drawable, RC_DRAWABLE); + if (!pDrawable) + return GL_FALSE; + + __glXDRIenterServer(); + retval = DRIDestroyDrawable(screenInfo.screens[screen], + drawable, + pDrawable); + __glXDRIleaveServer(); + return retval; +} + +static GLboolean +getDrawableInfo(__DRInativeDisplay *dpy, int screen, + __DRIid drawable, unsigned int *index, unsigned int *stamp, + int *x, int *y, int *width, int *height, + int *numClipRects, drm_clip_rect_t **ppClipRects, + int *backX, int *backY, + int *numBackClipRects, drm_clip_rect_t **ppBackClipRects) +{ + DrawablePtr pDrawable; + drm_clip_rect_t *pClipRects, *pBackClipRects; + GLboolean retval; + size_t size; + + pDrawable = (DrawablePtr) LookupIDByClass(drawable, RC_DRAWABLE); + if (!pDrawable) { + ErrorF("getDrawableInfo failed to look up window\n"); + + *index = 0; + *stamp = 0; + *x = 0; + *y = 0; + *width = 0; + *height = 0; + *numClipRects = 0; + *ppClipRects = NULL; + *backX = 0; + *backY = 0; + *numBackClipRects = 0; + *ppBackClipRects = NULL; + + return GL_FALSE; + } + + __glXDRIenterServer(); + retval = DRIGetDrawableInfo(screenInfo.screens[screen], + pDrawable, index, stamp, + x, y, width, height, + numClipRects, &pClipRects, + backX, backY, + numBackClipRects, &pBackClipRects); + __glXDRIleaveServer(); + + if (*numClipRects > 0) { + size = sizeof (drm_clip_rect_t) * *numClipRects; + *ppClipRects = malloc (size); + if (*ppClipRects != NULL) + memcpy (*ppClipRects, pClipRects, size); + } + else { + *ppClipRects = NULL; + } + + if (*numBackClipRects > 0) { + size = sizeof (drm_clip_rect_t) * *numBackClipRects; + *ppBackClipRects = malloc (size); + if (*ppBackClipRects != NULL) + memcpy (*ppBackClipRects, pBackClipRects, size); + } + else { + *ppBackClipRects = NULL; + } + + return GL_TRUE; +} + +static int +getUST(int64_t *ust) +{ + struct timeval tv; + + if (ust == NULL) + return -EFAULT; + + if (gettimeofday(&tv, NULL) == 0) { + ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; + return 0; + } else { + return -errno; + } +} + +/* Table of functions that we export to the driver. */ +static const __DRIinterfaceMethods interface_methods = { + getProcAddress, + + _gl_context_modes_create, + _gl_context_modes_destroy, + + findScreen, + windowExists, + + createContext, + destroyContext, + + createDrawable, + destroyDrawable, + getDrawableInfo, + + getUST, + NULL, /* glXGetMscRateOML, */ +}; + +static const char dri_driver_path[] = DRI_DRIVER_PATH; + +static __GLXscreen * +__glXDRIscreenProbe(ScreenPtr pScreen) +{ + PFNCREATENEWSCREENFUNC createNewScreen; + drm_handle_t hSAREA; + drmAddress pSAREA = NULL; + char *BusID; + __DRIversion ddx_version; + __DRIversion dri_version; + __DRIversion drm_version; + __DRIframebuffer framebuffer; + int fd = -1; + int status; + int api_ver = INTERNAL_VERSION; + drm_magic_t magic; + drmVersionPtr version; + char *driverName; + drm_handle_t hFB; + int junk; + __GLcontextModes * driver_modes; + __GLXDRIscreen *screen; + void *dev_priv = NULL; + char filename[128]; + Bool isCapable; + + if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable")) { + LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n"); + return NULL; + } + + if (!DRIQueryDirectRenderingCapable(pScreen, &isCapable) || !isCapable) { + LogMessage(X_ERROR, + "AIGLX: Screen %d is not DRI capable\n", pScreen->myNum); + return NULL; + } + + screen = malloc(sizeof *screen); + if (screen == NULL) + return NULL; + memset(screen, 0, sizeof *screen); + + screen->base.destroy = __glXDRIscreenDestroy; + screen->base.createContext = __glXDRIscreenCreateContext; + screen->base.pScreen = pScreen; + + /* DRI protocol version. */ + dri_version.major = XF86DRI_MAJOR_VERSION; + dri_version.minor = XF86DRI_MINOR_VERSION; + dri_version.patch = XF86DRI_PATCH_VERSION; + + framebuffer.base = NULL; + framebuffer.dev_priv = NULL; + + if (!DRIOpenConnection(pScreen, &hSAREA, &BusID)) { + LogMessage(X_ERROR, "AIGLX error: DRIOpenConnection failed\n"); + goto handle_error; + } + + fd = drmOpen(NULL, BusID); + + if (fd < 0) { + LogMessage(X_ERROR, "AIGLX error: drmOpen failed (%s)\n", + strerror(-fd)); + goto handle_error; + } + + if (drmGetMagic(fd, &magic)) { + LogMessage(X_ERROR, "AIGLX error: drmGetMagic failed\n"); + goto handle_error; + } + + version = drmGetVersion(fd); + if (version) { + drm_version.major = version->version_major; + drm_version.minor = version->version_minor; + drm_version.patch = version->version_patchlevel; + drmFreeVersion(version); + } + else { + drm_version.major = -1; + drm_version.minor = -1; + drm_version.patch = -1; + } + + if (!DRIAuthConnection(pScreen, magic)) { + LogMessage(X_ERROR, "AIGLX error: DRIAuthConnection failed\n"); + goto handle_error; + } + + /* Get device name (like "tdfx") and the ddx version numbers. + * We'll check the version in each DRI driver's "createNewScreen" + * function. */ + if (!DRIGetClientDriverName(pScreen, + &ddx_version.major, + &ddx_version.minor, + &ddx_version.patch, + &driverName)) { + LogMessage(X_ERROR, "AIGLX error: DRIGetClientDriverName failed\n"); + goto handle_error; + } + + snprintf(filename, sizeof filename, "%s/%s_dri.so", + dri_driver_path, driverName); + + screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); + if (screen->driver == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", + filename, dlerror()); + goto handle_error; + } + + createNewScreen = dlsym(screen->driver, CREATE_NEW_SCREEN_FUNC); + if (createNewScreen == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlsym for %s failed (%s)\n", + CREATE_NEW_SCREEN_FUNC, dlerror()); + goto handle_error; + } + + /* + * Get device-specific info. pDevPriv will point to a struct + * (such as DRIRADEONRec in xfree86/driver/ati/radeon_dri.h) that + * has information about the screen size, depth, pitch, ancilliary + * buffers, DRM mmap handles, etc. + */ + if (!DRIGetDeviceInfo(pScreen, &hFB, &junk, + &framebuffer.size, &framebuffer.stride, + &framebuffer.dev_priv_size, &framebuffer.dev_priv)) { + LogMessage(X_ERROR, "AIGLX error: XF86DRIGetDeviceInfo failed"); + goto handle_error; + } + + /* Sigh... the DRI interface is broken; the DRI driver will free + * the dev private pointer using _mesa_free() on screen destroy, + * but we can't use _mesa_malloc() here. In fact, the DRI driver + * shouldn't free data it didn't allocate itself, but what can you + * do... */ + dev_priv = malloc(framebuffer.dev_priv_size); + if (dev_priv == NULL) { + LogMessage(X_ERROR, "AIGLX error: dev_priv allocation failed"); + goto handle_error; + } + memcpy(dev_priv, framebuffer.dev_priv, framebuffer.dev_priv_size); + framebuffer.dev_priv = dev_priv; + + framebuffer.width = pScreen->width; + framebuffer.height = pScreen->height; + + /* Map the framebuffer region. */ + status = drmMap(fd, hFB, framebuffer.size, + (drmAddressPtr)&framebuffer.base); + if (status != 0) { + LogMessage(X_ERROR, "AIGLX error: drmMap of framebuffer failed (%s)", + strerror(-status)); + goto handle_error; + } + + /* Map the SAREA region. Further mmap regions may be setup in + * each DRI driver's "createNewScreen" function. + */ + status = drmMap(fd, hSAREA, SAREA_MAX, &pSAREA); + if (status != 0) { + LogMessage(X_ERROR, "AIGLX error: drmMap of SAREA failed (%s)", + strerror(-status)); + goto handle_error; + } + + driver_modes = NULL; + screen->driScreen.private = + (*createNewScreen)(NULL, pScreen->myNum, + &screen->driScreen, + screen->base.modes, + &ddx_version, + &dri_version, + &drm_version, + &framebuffer, + pSAREA, + fd, + api_ver, + &interface_methods, + &driver_modes); + + if (screen->driScreen.private == NULL) { + LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed"); + goto handle_error; + } + + __glXScreenInit(&screen->base, pScreen); + + filter_modes(&screen->base.modes, driver_modes); + _gl_context_modes_destroy(driver_modes); + + __glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer); + + LogMessage(X_INFO, + "AIGLX: Loaded and initialized %s\n", filename); + + return &screen->base; + + handle_error: + if (pSAREA != NULL) + drmUnmap(pSAREA, SAREA_MAX); + + if (framebuffer.base != NULL) + drmUnmap((drmAddress)framebuffer.base, framebuffer.size); + + if (dev_priv != NULL) + free(dev_priv); + + if (fd >= 0) + drmClose(fd); + + DRICloseConnection(pScreen); + + if (screen->driver) + dlclose(screen->driver); + + free(screen); + + LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); + + return NULL; +} + +__GLXprovider __glXDRIProvider = { + __glXDRIscreenProbe, + "DRI", + NULL +}; diff --git a/nx-X11/programs/Xserver/GL/glx/glxext.c b/nx-X11/programs/Xserver/GL/glx/glxext.c index cb82dc6091..af5429e0fa 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxext.c +++ b/nx-X11/programs/Xserver/GL/glx/glxext.c @@ -22,6 +22,7 @@ #include #endif +#include #include "glxserver.h" #include #include @@ -30,19 +31,12 @@ #include "unpack.h" #include "glxutil.h" #include "glxext.h" -#include "micmap.h" - -void GlxWrapInitVisuals(miInitVisualsProcPtr *); -void GlxSetVisualConfigs(int nconfigs, - __GLXvisualConfig *configs, void **privates); - -static __GLXextensionInfo *__glXExt /* = &__glDDXExtensionInfo */; +static Bool inDispatch; /* ** Forward declarations. */ -static int __glXSwapDispatch(ClientPtr); static int __glXDispatch(ClientPtr); /* @@ -51,8 +45,7 @@ static int __glXDispatch(ClientPtr); static void ResetExtension(ExtensionEntry* extEntry) { __glXFlushContextCache(); - (*__glXExt->resetExtension)(); - __glXScreenReset(); + __glXResetScreens(); } /* @@ -158,6 +151,40 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id) return True; } +/* +** Destroy routine that gets called when a drawable is freed. A drawable +** contains the ancillary buffers needed for rendering. +*/ +static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) +{ + __GLXcontext *cx, *cx1; + + /* + ** Use glxPriv->type to figure out what kind of drawable this is. Don't + ** use glxPriv->pDraw->type because by the time this routine is called, + ** the pDraw might already have been freed. + */ + if (glxPriv->type == DRAWABLE_WINDOW) { + /* + ** When a window is destroyed, notify all context bound to + ** it, that there are no longer bound to anything. + */ + for (cx = glxPriv->drawGlxc; cx; cx = cx1) { + cx1 = cx->nextDrawPriv; + cx->pendingState |= __GLX_PENDING_DESTROY; + } + + for (cx = glxPriv->readGlxc; cx; cx = cx1) { + cx1 = cx->nextReadPriv; + cx->pendingState |= __GLX_PENDING_DESTROY; + } + } + + __glXUnrefDrawable(glxPriv); + + return True; +} + /* ** Free a context. */ @@ -165,18 +192,24 @@ GLboolean __glXFreeContext(__GLXcontext *cx) { if (cx->idExists || cx->isCurrent) return GL_FALSE; - if (!cx->isDirect) { - if ((*cx->gc->exports.destroyContext)((__GLcontext *)cx->gc) == GL_FALSE) { - return GL_FALSE; - } - } if (cx->feedbackBuf) free(cx->feedbackBuf); if (cx->selectBuf) free(cx->selectBuf); - free(cx); if (cx == __glXLastContext) { __glXFlushContextCache(); } + /* We can get here through both regular dispatching from + * __glXDispatch() or as a callback from the resource manager. In + * the latter case we need to lift the DRI lock manually. */ + + if (!inDispatch) + __glXleaveServer(); + + cx->destroy(cx); + + if (!inDispatch) + __glXenterServer(); + return GL_TRUE; } @@ -206,11 +239,12 @@ static GLboolean errorOccured = GL_FALSE; /* ** The GL was will call this routine if an error occurs. */ +/* void __glXErrorCallBack(__GLinterface *gc, GLenum code) { errorOccured = GL_TRUE; } - +*/ /* ** Clear the error flag before calling the GL command. */ @@ -240,13 +274,14 @@ void GlxExtensionInit(void) __glXContextRes = CreateNewResourceType((DeleteType)ContextGone); __glXClientRes = CreateNewResourceType((DeleteType)ClientGone); __glXPixmapRes = CreateNewResourceType((DeleteType)PixmapGone); + __glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone); /* ** Add extension to server extensions. */ extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS, __GLX_NUMBER_ERRORS, __glXDispatch, - __glXSwapDispatch, ResetExtension, + __glXDispatch, ResetExtension, StandardMinorOpcode); if (!extEntry) { FatalError("__glXExtensionInit: AddExtensions failed\n"); @@ -280,53 +315,7 @@ void GlxExtensionInit(void) /* ** Initialize screen specific data. */ - __glXScreenInit(screenInfo.numScreens); -} - -/************************************************************************/ - -Bool __glXCoreType(void) -{ - return __glXExt->type; -} - -/************************************************************************/ - -void GlxSetVisualConfigs(int nconfigs, - __GLXvisualConfig *configs, void **privates) -{ - (*__glXExt->setVisualConfigs)(nconfigs, configs, privates); -} - -static miInitVisualsProcPtr saveInitVisualsProc; - -Bool GlxInitVisuals(VisualPtr *visualp, DepthPtr *depthp, - int *nvisualp, int *ndepthp, - int *rootDepthp, VisualID *defaultVisp, - unsigned long sizes, int bitsPerRGB, - int preferredVis) -{ - Bool ret; - - if (saveInitVisualsProc) { - ret = saveInitVisualsProc(visualp, depthp, nvisualp, ndepthp, - rootDepthp, defaultVisp, sizes, bitsPerRGB, - preferredVis); - if (!ret) - return False; - } - (*__glXExt->initVisuals)(visualp, depthp, nvisualp, ndepthp, rootDepthp, - defaultVisp, sizes, bitsPerRGB); - return True; -} - -void -GlxWrapInitVisuals(miInitVisualsProcPtr *initVisProc) -{ - saveInitVisualsProc = *initVisProc; - *initVisProc = GlxInitVisuals; - /* HACK: this shouldn't be done here but it's the earliest time */ - __glXExt = __glXglDDXExtensionInfo(); /* from GLcore */ + __glXInitScreens(); } /************************************************************************/ @@ -377,7 +366,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag, /* Make this context the current one for the GL. */ if (!cx->isDirect) { - if (!(*cx->gc->exports.forceCurrent)((__GLcontext *)cx->gc)) { + if (!(*cx->forceCurrent)(cx)) { /* Bind failed, and set the error code. Bummer */ cl->client->errorValue = cx->id; *error = __glXBadContextState; @@ -390,6 +379,44 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag, /************************************************************************/ +/* +** Top level dispatcher; all commands are executed from here down. +*/ + +/* I cried when I wrote this. Damn you XAA! */ + +static void +__glXnopEnterServer(void) +{ +} + +static void +__glXnopLeaveServer(void) +{ +} + +static void (*__glXenterServerFunc)(void) = __glXnopEnterServer; +static void (*__glXleaveServerFunc)(void) = __glXnopLeaveServer; + +void __glXsetEnterLeaveServerFuncs(void (*enter)(void), + void (*leave)(void)) +{ + __glXenterServerFunc = enter; + __glXleaveServerFunc = leave; +} + + +void __glXenterServer(void) +{ + (*__glXenterServerFunc)(); +} + +void __glXleaveServer(void) +{ + (*__glXleaveServerFunc)(); +} + + #ifndef NXAGENT_SERVER /* @@ -401,6 +428,7 @@ static int __glXDispatch(ClientPtr client) CARD8 opcode; int (*proc)(__GLXclientState *cl, GLbyte *pc); __GLXclientState *cl; + int retval; opcode = stuff->glxCode; cl = __glXClients[client->index]; @@ -445,54 +473,22 @@ static int __glXDispatch(ClientPtr client) /* ** Use the opcode to index into the procedure table. */ - proc = __glXSingleTable[opcode]; - return (*proc)(cl, (GLbyte *) stuff); -} + if (client->swapped) + proc = __glXSwapSingleTable[opcode]; + else + proc = __glXSingleTable[opcode]; -static int __glXSwapDispatch(ClientPtr client) -{ - REQUEST(xGLXSingleReq); - CARD8 opcode; - int (*proc)(__GLXclientState *cl, GLbyte *pc); - __GLXclientState *cl; + __glXleaveServer(); - opcode = stuff->glxCode; - cl = __glXClients[client->index]; - if (!cl) { - cl = (__GLXclientState *) malloc(sizeof(__GLXclientState)); - __glXClients[client->index] = cl; - if (!cl) { - return BadAlloc; - } - memset(cl, 0, sizeof(__GLXclientState)); - } - - if (!cl->inUse) { - /* - ** This is first request from this client. Associate a resource - ** with the client so we will be notified when the client dies. - */ - XID xid = FakeClientID(client->index); - if (!AddResource( xid, __glXClientRes, (void *)(long)client->index)) { - return BadAlloc; - } - ResetClientState(client->index); - cl->inUse = GL_TRUE; - cl->client = client; - } + inDispatch = True; - /* - ** Check for valid opcode. - */ - if (opcode >= __GLX_SINGLE_TABLE_SIZE) { - return BadRequest; - } + retval = proc(cl, (GLbyte *) stuff); - /* - ** Use the opcode to index into the procedure table. - */ - proc = __glXSwapSingleTable[opcode]; - return (*proc)(cl, (GLbyte *) stuff); + inDispatch = False; + + __glXenterServer(); + + return retval; } #endif /* NXAGENT_SERVER */ diff --git a/nx-X11/programs/Xserver/GL/glx/glxext.h b/nx-X11/programs/Xserver/GL/glx/glxext.h index edb65a5f36..db705773b5 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxext.h +++ b/nx-X11/programs/Xserver/GL/glx/glxext.h @@ -68,7 +68,7 @@ extern void __glXFlushContextCache(void); extern void __glXNoSuchRenderOpcode(GLbyte*); extern int __glXNoSuchSingleOpcode(__GLXclientState*, GLbyte*); -extern void __glXErrorCallBack(__GLinterface *gc, GLenum code); +/*extern void __glXErrorCallBack(__GLinterface *gc, GLenum code);*/ extern void __glXClearErrorOccured(void); extern GLboolean __glXErrorOccured(void); extern void __glXResetLargeCommandStatus(__GLXclientState*); diff --git a/nx-X11/programs/Xserver/GL/glx/glxfb.c b/nx-X11/programs/Xserver/GL/glx/glxfb.c deleted file mode 100644 index 7248b6ffb1..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glxfb.c +++ /dev/null @@ -1,182 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -/* -** An implementation of a buffer which is part of the front buffer -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "glxutil.h" -#include "glxfb.h" - -#include - -/* so we don't include glmath.h */ -extern GLuint __glFloorLog2(GLuint); - -typedef struct __GLFBbufferInfoRec { - GCPtr pGC; -} __GLFBbufferInfo; - -extern PixmapPtr __glXPrivPixGetPtr(__GLdrawableBuffer *); - -/* ---------------------------------------------------------- */ - -static GLboolean -Resize(__GLdrawableBuffer *buf, - GLint x, GLint y, GLuint width, GLuint height, - __GLdrawablePrivate *glPriv, GLuint bufferMask) -{ - buf->width = width; - buf->height = height; - buf->byteWidth = width * buf->elementSize; - buf->outerWidth = width; - - return GL_TRUE; -} - -static void -Lock(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ -} - -static void -Unlock(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ -} - -/* -** Do a swap buffer with -** a memory surface as a back buffer -** a FB surface as a front buffer -*/ -GLboolean -__glXFBMemSwapBuffers(__GLXdrawablePrivate *glxPriv) -{ - __GLdrawablePrivate *glPriv = &glxPriv->glPriv; - __GLdrawableBuffer *front = &glPriv->frontBuffer; - __GLdrawableBuffer *back = &glPriv->backBuffer; - __GLFBbufferInfo *bufferInfo; - GCPtr pGC; - GLint width, height, depth, pad; - GLubyte *buf; - - bufferInfo = (__GLFBbufferInfo *) front->other; - pGC = bufferInfo->pGC; - - width = back->width; - height = back->height; - depth = back->depth; - buf = back->base; - pad = back->outerWidth - back->width; /* back buffer padding */ - /* adjust buffer padding. X wants left, GL has right */ - buf -= pad; - - ValidateGC(glxPriv->pDraw, pGC); - (*pGC->ops->PutImage)(glxPriv->pDraw, pGC, - depth, - 0, 0, width, height, - pad, ZPixmap, - buf); - - return GL_TRUE; -} - -static void -Free(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ - __GLFBbufferInfo *bufferInfo; - - bufferInfo = (__GLFBbufferInfo *) buf->other; - - if (bufferInfo->pGC) { - FreeScratchGC(bufferInfo->pGC); - } - - free(bufferInfo); - buf->other = NULL; -} - -/* -** function to return the X GC of this buffer (to be used by DDX) -*/ -GCPtr __glXFBGetGC(__GLdrawableBuffer *buf) -{ - __GLFBbufferInfo *bufferInfo; - - bufferInfo = (__GLFBbufferInfo *) buf->other; - - if (bufferInfo) { - return bufferInfo->pGC; - } else { - return NULL; - } -} - - -void -__glXInitFB(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, GLint bits) -{ - __GLFBbufferInfo *bufferInfo; - __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *) glPriv->other; - GCPtr pGC; - - buf->depth = bits; - buf->width = buf->height = 0; /* to be filled during Update */ - buf->handle = buf->base = NULL; /* to be filled during Update */ - buf->size = 0; - buf->byteWidth = 0; - buf->elementSize = ((bits-1) / 8) + 1; - buf->elementSizeLog2 = __glFloorLog2(buf->elementSize); - - buf->resize = Resize; - buf->lock = Lock; - buf->unlock = Unlock; - buf->fill = NULL; - buf->free = Free; - - /* allocate local information */ - bufferInfo = (__GLFBbufferInfo *) malloc(sizeof(__GLFBbufferInfo)); - buf->other = (void *) bufferInfo; - - pGC = CreateScratchGC(glxPriv->pDraw->pScreen, - glxPriv->pDraw->depth); - bufferInfo->pGC = pGC; - (*pGC->funcs->ChangeClip)(pGC, CT_NONE, NULL, 0); -} diff --git a/nx-X11/programs/Xserver/GL/glx/glxfb.h b/nx-X11/programs/Xserver/GL/glx/glxfb.h deleted file mode 100644 index f414728f3f..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glxfb.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _glxfb_h_ -#define _glxfb_h_ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -extern void __glXInitFB(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, - GLint bits); - -extern GCPtr __glXFBGetGC(__GLdrawableBuffer *buf); - -extern GLboolean __glXFBMemSwapBuffers(__GLXdrawablePrivate *glxPriv); - -#endif /* _glxfb_h_ */ - diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.c b/nx-X11/programs/Xserver/GL/glx/glximports.c deleted file mode 100644 index fb4d508a9b..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glximports.c +++ /dev/null @@ -1,186 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "glxserver.h" -#include "glxcontext.h" -#include "glximports.h" - -void *__glXImpMalloc(__GLcontext *gc, size_t size) -{ - void *addr; - - if (size == 0) { - return NULL; - } - addr = malloc(size); - if (addr == NULL) { - /* XXX: handle out of memory error */ - return NULL; - } - return addr; -} - -void *__glXImpCalloc(__GLcontext *gc, size_t numElements, size_t elementSize) -{ - void *addr; - size_t size; - - if ((numElements == 0) || (elementSize == 0)) { - return NULL; - } - size = numElements * elementSize; - addr = malloc(size); - if (addr == NULL) { - /* XXX: handle out of memory error */ - return NULL; - } - /* zero out memory */ - memset(addr, 0, size); - - return addr; -} - -void __glXImpFree(__GLcontext *gc, void *addr) -{ - if (addr) { - free(addr); - } -} - -void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize) -{ - void *newAddr; - - if (addr) { - if (newSize == 0) { - free(addr); - return NULL; - } - newAddr = realloc(addr, newSize); - } else { - if (newSize == 0) { - return NULL; - } - newAddr = malloc(newSize); - } - if (newAddr == NULL) { - return NULL; /* XXX: out of memory error */ - } - - return newAddr; -} - -void __glXImpWarning(__GLcontext *gc, char *msg) -{ - ErrorF("%s",(char *)msg); -} - -void __glXImpFatal(__GLcontext *gc, char *msg) -{ - ErrorF("%s",(char *)msg); - abort(); -} - -char *__glXImpGetenv(__GLcontext *gc, const char *var) -{ - return getenv(var); -} - -int __glXImpAtoi(__GLcontext *gc, const char *str) -{ - return atoi(str); -} - -int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...) -{ - va_list ap; - int ret; - - /* have to deal with var args */ - va_start(ap, fmt); - ret = vsprintf(str, fmt, ap); - va_end(ap); - - return ret; -} - -void *__glXImpFopen(__GLcontext *gc, const char *path, const char *mode) -{ - return (void *) fopen(path, mode); -} - -int __glXImpFclose(__GLcontext *gc, void *stream) -{ - return fclose((FILE *)stream); -} - -int __glXImpFprintf(__GLcontext *gc, void *stream, const char *fmt, ...) -{ - va_list ap; - int ret; - - /* have to deal with var args */ - va_start(ap, fmt); - ret = vfprintf((FILE *)stream, fmt, ap); - va_end(ap); - - return ret; -} - - -__GLdrawablePrivate *__glXImpGetDrawablePrivate(__GLcontext *gc) -{ - __GLinterface *glci = (__GLinterface *) gc; - __GLXcontext *glrc = (__GLXcontext *) glci->imports.other; - - return &glrc->drawPriv->glPriv; -} - - -__GLdrawablePrivate *__glXImpGetReadablePrivate(__GLcontext *gc) -{ - __GLinterface *glci = (__GLinterface *) gc; - __GLXcontext *glrc = (__GLXcontext *) glci->imports.other; - - return &glrc->readPriv->glPriv; -} diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.h b/nx-X11/programs/Xserver/GL/glx/glximports.h deleted file mode 100644 index f57004b348..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glximports.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _glximports_h_ -#define _glximports_h_ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -extern void *__glXImpMalloc(__GLcontext *gc, size_t size); -extern void *__glXImpCalloc(__GLcontext *gc, size_t nElem, size_t eSize); -extern void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize); -extern void __glXImpFree(__GLcontext *gc, void *addr); - -extern void __glXImpWarning(__GLcontext *gc, char *msg); -extern void __glXImpFatal(__GLcontext *gc, char *msg); - -extern char *__glXImpGetenv(__GLcontext *gc, const char *var); -extern int __glXImpAtoi(__GLcontext *gc, const char *str); -extern int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...); -extern void *__glXImpFopen(__GLcontext *gc, const char *path, - const char *mode); -extern int __glXImpFclose(__GLcontext *gc, void *stream); -extern int __glXImpFprintf(__GLcontext *gc, void *stream, - const char *fmt, ...); - -extern __GLdrawablePrivate *__glXImpGetDrawablePrivate(__GLcontext *gc); -extern __GLdrawablePrivate *__glXImpGetReadablePrivate(__GLcontext *gc); - - -#endif /* _glximports_h_ */ - diff --git a/nx-X11/programs/Xserver/GL/glx/glxmem.c b/nx-X11/programs/Xserver/GL/glx/glxmem.c deleted file mode 100644 index e1487da940..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glxmem.c +++ /dev/null @@ -1,150 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -/* -** Implementation of a buffer in main memory -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "glxmem.h" -#include "glxext.h" -#include "GL/internal/glcore.h" - -/* don't want to include glmath.h */ -extern GLuint __glFloorLog2(GLuint); - -/* ---------------------------------------------------------- */ - -#define BUF_ALIGN 32 /* x86 cache alignment (used for assembly paths) */ -#define BUF_ALIGN_MASK (BUF_ALIGN-1) - -static GLboolean -Resize(__GLdrawableBuffer *buf, - GLint x, GLint y, GLuint width, GLuint height, - __GLdrawablePrivate *glPriv, GLuint bufferMask) -{ - GLuint newSize; - void *ubase; - GLint pixelWidth; - GLint alignedWidth; - - /* - ** Note: - ** buf->handle : unaligned base - ** buf->base : aligned base - */ - - pixelWidth = BUF_ALIGN / buf->elementSize; - alignedWidth = (width & ~(pixelWidth-1)) + pixelWidth; - - newSize = alignedWidth * height * buf->elementSize; - - /* - ** Only allocate buffer space for the SGI core. - ** Mesa and Aqua handle their own buffer allocations. - */ -#if defined(__GL_BUFFER_SIZE_TRACKS_WINDOW) - if (__glXCoreType() == GL_CORE_SGI) { -#else - if (newSize > buf->size && __glXCoreType() == GL_CORE_SGI) { -#endif - if (buf->handle) { - ubase = (*glPriv->realloc)(buf->handle, newSize + BUF_ALIGN_MASK); - if (ubase == NULL) { - return GL_FALSE; - } - } else { - ubase = (*glPriv->malloc)(newSize + BUF_ALIGN_MASK); - if (ubase == NULL) { - return GL_FALSE; - } - } - buf->size = newSize; - - buf->handle = ubase; - buf->base = (void *)(((size_t)ubase + BUF_ALIGN_MASK) & - (unsigned int) ~BUF_ALIGN_MASK); - assert(((size_t)buf->base % BUF_ALIGN) == 0); - } - - buf->width = width; - buf->height = height; - buf->byteWidth = alignedWidth * buf->elementSize; - buf->outerWidth = alignedWidth; - - return GL_TRUE; -} - -static void -Lock(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ -} - -static void -Unlock(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ -} - -static void -Free(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ - if (buf->handle) { - (*glPriv->free)(buf->handle); - buf->handle = NULL; - } -} - - -void -__glXInitMem(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, GLint bits) -{ - buf->width = buf->height = 0; /* to be filled during Update */ - buf->depth = bits; - buf->size = 0; - buf->handle = buf->base = NULL; /* to be filled during Update */ - buf->byteWidth = 0; - buf->elementSize = ((bits - 1) / 8) + 1; - buf->elementSizeLog2 = __glFloorLog2(buf->elementSize); - - buf->resize = Resize; - buf->lock = Lock; - buf->unlock = Unlock; - buf->fill = NULL; - buf->free = Free; -} diff --git a/nx-X11/programs/Xserver/GL/glx/glxmem.h b/nx-X11/programs/Xserver/GL/glx/glxmem.h deleted file mode 100644 index b4116dfa98..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glxmem.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _glxmem_h_ -#define _glxmem_h_ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -extern void __glXInitMem(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, - GLint bits); - -#endif /* _glxmem_h_ */ - diff --git a/nx-X11/programs/Xserver/GL/glx/glxpix.c b/nx-X11/programs/Xserver/GL/glx/glxpix.c deleted file mode 100644 index 81e29a9c54..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glxpix.c +++ /dev/null @@ -1,131 +0,0 @@ -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -/* -** An implementation of a glx pixmap buffer -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "glxutil.h" -#include "glxpix.h" - -#include - -/* don't want to include glmath.h */ -extern GLuint __glFloorLog2(GLuint); - -typedef struct __GLPixBufferInfoRec { - GCPtr pGC; -} __GLPixBufferInfo; - -/* ---------------------------------------------------------- */ - -static GLboolean -Resize(__GLdrawableBuffer *buf, - GLint x, GLint y, GLuint width, GLuint height, - __GLdrawablePrivate *glPriv, GLuint bufferMask) -{ - buf->width = width; - buf->height = width; - buf->byteWidth = width * buf->elementSize; - buf->outerWidth = width; - - return GL_TRUE; -} - -static void -Lock(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ -} - -static void -Unlock(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ -} - -static void -Free(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv) -{ - __GLPixBufferInfo *bufferInfo; - - if (LookupIDByType((XID)(long)buf->handle, __glXPixmapRes)) { - FreeResource((XID)(long)buf->handle, FALSE); - buf->handle = NULL; - } - - bufferInfo = (__GLPixBufferInfo *) buf->other; - - if (bufferInfo->pGC) { - FreeScratchGC(bufferInfo->pGC); - } - - free(bufferInfo); - buf->other = NULL; -} - -void -__glXInitPix(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, - GLint bits, XID glxpixmapId, __GLXpixmap *pGlxPixmap) -{ - __GLPixBufferInfo *bufferInfo; - - buf->width = buf->height = 0; /* to be filled during Update */ - buf->depth = bits; - buf->size = 0; - buf->base = NULL; - buf->byteWidth = 0; - buf->elementSize = ((bits-1) / 8) + 1; - buf->elementSizeLog2 = __glFloorLog2(buf->elementSize); - - buf->handle = (void *)(long) glxpixmapId; - pGlxPixmap->refcnt++; - - buf->resize = Resize; - buf->lock = Lock; - buf->unlock = Unlock; - buf->fill = NULL; - buf->free = Free; - - /* allocate local information */ - bufferInfo = (__GLPixBufferInfo *) malloc(sizeof(__GLPixBufferInfo)); - buf->other = (void *) bufferInfo; - - bufferInfo->pGC = CreateScratchGC(pGlxPixmap->pDraw->pScreen, - pGlxPixmap->pDraw->depth); -} diff --git a/nx-X11/programs/Xserver/GL/glx/glxpix.h b/nx-X11/programs/Xserver/GL/glx/glxpix.h deleted file mode 100644 index 285cf490c3..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/glxpix.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _glxpix_h_ -#define _glxpix_h_ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -extern void __glXInitPix(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, - GLint bits, XID glxpixmapId, __GLXpixmap *pGlxPixmap); - -#endif /* _glxpix_h_ */ - diff --git a/nx-X11/programs/Xserver/GL/glx/glxscreens.c b/nx-X11/programs/Xserver/GL/glx/glxscreens.c index 1bff4bc3ac..185c7c6186 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxscreens.c +++ b/nx-X11/programs/Xserver/GL/glx/glxscreens.c @@ -38,9 +38,8 @@ #endif #include -#include - #include +#include #include "glxserver.h" #include "glxutil.h" @@ -64,6 +63,7 @@ static const char GLServerExtensions[] = "GL_ARB_texture_mirrored_repeat " "GL_ARB_transpose_matrix " "GL_ARB_window_pos " + "GL_ARB_texture_non_power_of_two " "GL_EXT_abgr " "GL_EXT_bgra " "GL_EXT_blend_color " @@ -96,6 +96,7 @@ static const char GLServerExtensions[] = "GL_EXT_texture_object " "GL_EXT_texture_rectangle " "GL_EXT_vertex_array " + "GL_EXT_framebuffer_object " "GL_APPLE_packed_pixels " "GL_ATI_texture_mirror_once " "GL_ATI_texture_env_combine3 " @@ -107,6 +108,7 @@ static const char GLServerExtensions[] = "GL_NV_point_sprite " "GL_NV_texgen_reflection " "GL_NV_texture_rectangle " + "GL_NV_texture_env_combine4 " "GL_SGIS_generate_mipmap " "GL_SGIS_texture_border_clamp " "GL_SGIS_texture_edge_clamp " @@ -127,6 +129,7 @@ static char GLXServerExtensions[] = "GLX_EXT_visual_info " "GLX_EXT_visual_rating " "GLX_EXT_import_context " + "GLX_EXT_texture_from_pixmap " "GLX_OML_swap_method " "GLX_SGI_make_current_read " #ifndef __DARWIN__ @@ -137,75 +140,17 @@ static char GLXServerExtensions[] = "GLX_SGIX_fbconfig " ; -/* - * __glDDXScreenInfo comes from GLcore, so we can't resolve this symbol at - * module open time. Leave a placeholder, and fill this in when we first - * need it (in __glXScreenInit). XXX Why make this an array? - */ -static __GLXscreenInfo *__glXScreens[] = { - NULL /* &__glDDXScreenInfo */ , -}; - -static GLint __glXNumStaticScreens = - (sizeof __glXScreens / sizeof __glXScreens[0]); - -__GLXscreenInfo *__glXActiveScreens; -GLint __glXNumActiveScreens; +__GLXscreen **__glXActiveScreens; __GLXSwapBarrierExtensionFuncs *__glXSwapBarrierFuncs = NULL; static int __glXNumSwapBarrierFuncs = 0; __GLXHyperpipeExtensionFuncs *__glXHyperpipeFuncs = NULL; static int __glXNumHyperpipeFuncs = 0; - -RESTYPE __glXDrawableRes; - -__GLXscreenInfo *__glXgetActiveScreen(int num) { - return &__glXActiveScreens[num]; +__GLXscreen *__glXgetActiveScreen(int num) { + return __glXActiveScreens[num]; } -/* -** Destroy routine that gets called when a drawable is freed. A drawable -** contains the ancillary buffers needed for rendering. -*/ -static Bool DrawableGone(__GLXdrawablePrivate *glxPriv, XID xid) -{ - __GLXcontext *cx, *cx1; - - /* - ** Use glxPriv->type to figure out what kind of drawable this is. Don't - ** use glxPriv->pDraw->type because by the time this routine is called, - ** the pDraw might already have been freed. - */ - if (glxPriv->type == DRAWABLE_WINDOW) { - /* - ** When a window is destroyed, notify all context bound to - ** it, that there are no longer bound to anything. - */ - for (cx = glxPriv->drawGlxc; cx; cx = cx1) { - cx1 = cx->nextDrawPriv; - cx->pendingState |= __GLX_PENDING_DESTROY; - } - - for (cx = glxPriv->readGlxc; cx; cx = cx1) { - cx1 = cx->nextReadPriv; - cx->pendingState |= __GLX_PENDING_DESTROY; - } - } - - /* - ** set the size to 0, so that context that may still be using this - ** drawable not do anything harmful - */ - glxPriv->xorigin = 0; - glxPriv->yorigin = 0; - glxPriv->width = 0; - glxPriv->height = 0; - - __glXUnrefDrawablePrivate(glxPriv); - - return True; -} /* ** This hook gets called when a window moves or changes size. @@ -214,7 +159,7 @@ static Bool PositionWindow(WindowPtr pWin, int x, int y) { ScreenPtr pScreen; __GLXcontext *glxc; - __GLXdrawablePrivate *glxPriv; + __GLXdrawable *glxPriv; Bool ret; /* @@ -222,7 +167,7 @@ static Bool PositionWindow(WindowPtr pWin, int x, int y) */ pScreen = pWin->drawable.pScreen; pScreen->PositionWindow = - __glXActiveScreens[pScreen->myNum].WrappedPositionWindow; + __glXActiveScreens[pScreen->myNum]->WrappedPositionWindow; ret = (*pScreen->PositionWindow)(pWin, x, y); pScreen->PositionWindow = PositionWindow; @@ -230,8 +175,8 @@ static Bool PositionWindow(WindowPtr pWin, int x, int y) ** Tell all contexts rendering into this window that the window size ** has changed. */ - glxPriv = (__GLXdrawablePrivate *) LookupIDByType(pWin->drawable.id, - __glXDrawableRes); + glxPriv = (__GLXdrawable *) LookupIDByType(pWin->drawable.id, + __glXDrawableRes); if (glxPriv == NULL) { /* ** This window is not being used by the OpenGL. @@ -243,7 +188,7 @@ static Bool PositionWindow(WindowPtr pWin, int x, int y) ** resize the drawable */ /* first change the drawable size */ - if (__glXResizeDrawableBuffers(glxPriv) == GL_FALSE) { + if (glxPriv->resize(glxPriv) == GL_FALSE) { /* resize failed! */ /* XXX: what can we possibly do here? */ ret = False; @@ -262,18 +207,6 @@ static Bool PositionWindow(WindowPtr pWin, int x, int y) return ret; } -/* -** Wrap our own PositionWindow routine around the server's, so we can -** be notified when a window changes size -*/ -static void wrapPositionWindow(int screen) -{ - ScreenPtr pScreen = screenInfo.screens[screen]; - - __glXActiveScreens[screen].WrappedPositionWindow = pScreen->PositionWindow; - pScreen->PositionWindow = PositionWindow; -} - /* * If your DDX driver wants to register support for swap barriers or hyperpipe * topology, it should call __glXHyperpipeInit() or __glXSwapBarrierInit() @@ -317,57 +250,80 @@ void __glXSwapBarrierInit(int screen, __GLXSwapBarrierExtensionFuncs *funcs) funcs->queryMaxSwapBarriersFunc; } -void __glXScreenInit(GLint numscreens) +static __GLXprovider *__glXProviderStack; + +void GlxPushProvider(__GLXprovider *provider) +{ + provider->next = __glXProviderStack; + __glXProviderStack = provider; +} + +void __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen) { - GLint i,j; + screen->pScreen = pScreen; + screen->GLextensions = xstrdup(GLServerExtensions); + screen->GLXvendor = xstrdup(GLXServerVendorName); + screen->GLXversion = xstrdup(GLXServerVersion); + screen->GLXextensions = xstrdup(GLXServerExtensions); - __glXScreens[0] = __glXglDDXScreenInfo(); /* from GLcore */ + screen->WrappedPositionWindow = pScreen->PositionWindow; + pScreen->PositionWindow = PositionWindow; + + __glXScreenInitVisuals(screen); +} + +void +__glXScreenDestroy(__GLXscreen *screen) +{ + free(screen->GLXvendor); + free(screen->GLXversion); + free(screen->GLXextensions); + free(screen->GLextensions); +} + +void __glXInitScreens(void) +{ + GLint i; + ScreenPtr pScreen; + __GLXprovider *p; + size_t size; /* ** This alloc has to work or else the server might as well core dump. */ - __glXActiveScreens = - (__GLXscreenInfo *) malloc(sizeof(__GLXscreenInfo) * numscreens); + size = screenInfo.numScreens * sizeof(__GLXscreen *); + __glXActiveScreens = malloc(size); + memset(__glXActiveScreens, 0, size); - for (i=0; i < numscreens; i++) { - /* - ** Probe each static screen to see which exists. - */ - for (j=0; j < __glXNumStaticScreens; j++) { - if ((*__glXScreens[j]->screenProbe)(i)) { - __glXActiveScreens[i] = *__glXScreens[j]; - - __glXActiveScreens[i].numUsableVisuals = __glXActiveScreens[i].numVisuals; - __glXActiveScreens[i].GLextensions = strdup(GLServerExtensions); - __glXActiveScreens[i].GLXvendor = strdup(GLXServerVendorName); - __glXActiveScreens[i].GLXversion = strdup(GLXServerVersion); - __glXActiveScreens[i].GLXextensions = strdup(GLXServerExtensions); - - __glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone); - wrapPositionWindow(i); + for (i = 0; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + + for (p = __glXProviderStack; p != NULL; p = p->next) { + __glXActiveScreens[i] = p->screenProbe(pScreen); + if (__glXActiveScreens[i] != NULL) { + LogMessage(X_INFO, + "GLX: Initialized %s GL provider for screen %d\n", + p->name, i); + break; } } } - __glXNumActiveScreens = numscreens; } -void __glXScreenReset(void) +void __glXResetScreens(void) { int i; - for (i = 0; i < __glXNumActiveScreens; i++) { - free(__glXActiveScreens[i].GLXvendor); - free(__glXActiveScreens[i].GLXversion); - free(__glXActiveScreens[i].GLXextensions); - free(__glXActiveScreens[i].GLextensions); - } + for (i = 0; i < screenInfo.numScreens; i++) + if (__glXActiveScreens[i]) + __glXActiveScreens[i]->destroy(__glXActiveScreens[i]); + free(__glXActiveScreens); free(__glXHyperpipeFuncs); free(__glXSwapBarrierFuncs); - __glXNumHyperpipeFuncs = 0; - __glXNumSwapBarrierFuncs = 0; - __glXHyperpipeFuncs = NULL; - __glXSwapBarrierFuncs = NULL; - __glXActiveScreens = NULL; - __glXNumActiveScreens = 0; + __glXNumHyperpipeFuncs = 0; + __glXNumSwapBarrierFuncs = 0; + __glXHyperpipeFuncs = NULL; + __glXSwapBarrierFuncs = NULL; + __glXActiveScreens = NULL; } diff --git a/nx-X11/programs/Xserver/GL/glx/glxscreens.h b/nx-X11/programs/Xserver/GL/glx/glxscreens.h index dae21e9c91..a4cb8c283b 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxscreens.h +++ b/nx-X11/programs/Xserver/GL/glx/glxscreens.h @@ -50,28 +50,15 @@ ** and DDX layers of the GLX server extension. The methods provide an ** interface for context management on a screen. */ -typedef struct { - /* - ** Probe the screen and see if it supports GL rendering. It will - ** return GL_FALSE if it doesn't, GL_TRUE otherwise. - */ - Bool (*screenProbe)(int screen); +typedef struct __GLXscreen __GLXscreen; +struct __GLXscreen { + void (*destroy)(__GLXscreen *screen); - /* - ** Create a context using configuration information from modes. - ** Use imports as callbacks back to the OS. Return an opaque handle - ** on the context (NULL if failure). - */ - __GLinterface *(*createContext)(__GLimports *imports, - __GLcontextModes *modes, - __GLinterface *shareGC); + __GLXcontext *(*createContext)(__GLXscreen *screen, + __GLcontextModes *modes, + __GLXcontext *shareContext); - /* - ** Create a buffer using information from glxPriv. This routine - ** sets up any wrappers necessary to resize, swap or destroy the - ** buffer. - */ - void (*createBuffer)(__GLXdrawablePrivate *glxPriv); + ScreenPtr pScreen; /** * Linked list of valid context modes for this screen. @@ -93,10 +80,13 @@ typedef struct { */ Bool (*WrappedPositionWindow)(WindowPtr pWin, int x, int y); -} __GLXscreenInfo; +}; + +void __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen); +void __glXScreenDestroy(__GLXscreen *screen); -extern void __glXScreenInit(GLint); -extern void __glXScreenReset(void); +void __glXInitScreens(void); +extern void __glXResetScreens(void); #endif /* !__GLX_screens_h__ */ diff --git a/nx-X11/programs/Xserver/GL/glx/glxserver.h b/nx-X11/programs/Xserver/GL/glx/glxserver.h index 2debc84351..924d428152 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxserver.h +++ b/nx-X11/programs/Xserver/GL/glx/glxserver.h @@ -65,7 +65,8 @@ #include /* For glxscreens.h */ -typedef struct __GLXdrawablePrivateRec __GLXdrawablePrivate; +typedef struct __GLXdrawable __GLXdrawable; +typedef struct __GLXcontext __GLXcontext; #include "glxscreens.h" #include "glxdrawable.h" @@ -90,15 +91,22 @@ typedef XID GLXContextID; typedef XID GLXPixmap; typedef XID GLXDrawable; -typedef struct __GLXcontextRec *GLXContext; typedef struct __GLXclientStateRec __GLXclientState; -extern __GLXscreenInfo *__glXActiveScreens; +extern __GLXscreen **__glXActiveScreens; extern GLint __glXNumActiveScreens; -extern __GLXscreenInfo *__glXgetActiveScreen(int num); +extern __GLXscreen *__glXgetActiveScreen(int num); /************************************************************************/ +void GlxSetVisualConfigs(int nconfigs, + __GLXvisualConfig *configs, void **privates); + +struct _glapi_table; +void GlxSetRenderTables (struct _glapi_table *table); + +void __glXScreenInitVisuals(__GLXscreen *screen); + /* ** The last context used (from the server's persective) is cached. */ @@ -115,6 +123,20 @@ extern __GLXcontext *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*); /************************************************************************/ +typedef struct __GLXprovider __GLXprovider; +struct __GLXprovider { + __GLXscreen *(*screenProbe)(ScreenPtr pScreen); + const char *name; + __GLXprovider *next; +}; + +void GlxPushProvider(__GLXprovider *provider); + +void __glXsetEnterLeaveServerFuncs(void (*enter)(void), + void (*leave)(void)); +void __glXenterServer(void); +void __glXleaveServer(void); + /* ** State kept per client. */ @@ -177,7 +199,7 @@ extern __GLXprocPtr __glXProcTable[]; */ typedef struct { int bytes; - int (*varsize)(GLbyte *pc, Bool swap, int left); + int (*varsize)(const GLbyte *pc, Bool swap, int left); } __GLXrenderSizeData; extern __GLXrenderSizeData __glXRenderSizeTable[]; extern __GLXrenderSizeData __glXRenderSizeTable_EXT[]; @@ -213,6 +235,8 @@ extern void __glXSwapQueryVersionReply(ClientPtr client, extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXTReply *reply, int *buf); +extern void __glXSwapGetDrawableAttributesReply(ClientPtr client, + xGLXGetDrawableAttributesReply *reply, CARD32 *buf); extern void glxSwapQueryExtensionsStringReply(ClientPtr client, xGLXQueryExtensionsStringReply *reply, char *buf); extern void glxSwapQueryServerStringReply(ClientPtr client, @@ -269,58 +293,6 @@ extern int __glXImageSize(GLenum format, GLenum type, GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows, GLint alignment); -extern int __glXCallListsReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXBitmapReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXFogfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXFogivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXLightfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXLightivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXLightModelfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXLightModelivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXMaterialfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXMaterialivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexParameterfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexParameterivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexImage1DReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexImage2DReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexEnvfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexEnvivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexGendvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexGenfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexGenivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXMap1dReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXMap1fReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXMap2dReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXMap2fReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXPixelMapfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXPixelMapuivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXPixelMapusvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXDrawPixelsReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXDrawArraysSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXPrioritizeTexturesReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexSubImage1DReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexSubImage2DReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXTexImage3DReqSize(GLbyte *pc, Bool swap, int reqlen ); -extern int __glXTexSubImage3DReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXConvolutionFilter1DReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXConvolutionFilter2DReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXConvolutionParameterivReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXConvolutionParameterfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXSeparableFilter2DReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXColorTableReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXColorSubTableReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXColorTableParameterfvReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXColorTableParameterivReqSize(GLbyte *pc, Bool swap, int reqlen); - -/* - * Routines for computing the size of returned data. - */ -extern int __glXConvolutionParameterivSize(GLenum pname); -extern int __glXConvolutionParameterfvSize(GLenum pname); -extern int __glXColorTableParameterfvSize(GLenum pname); -extern int __glXColorTableParameterivSize(GLenum pname); - -extern int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap, int reqlen); -extern int __glXPointParameterivReqSize(GLbyte *pc, Bool swap, int reqlen); +extern int __glXDrawArraysSize(const GLbyte *pc, Bool swap, int reqlen); #endif /* !__GLX_server_h__ */ diff --git a/nx-X11/programs/Xserver/GL/glx/glxutil.c b/nx-X11/programs/Xserver/GL/glx/glxutil.c index b4cd10a849..cd46949d6c 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxutil.c +++ b/nx-X11/programs/Xserver/GL/glx/glxutil.c @@ -46,17 +46,11 @@ #include #include #include "glxutil.h" -#include "glxbuf.h" #include "GL/internal/glcore.h" #include "GL/glxint.h" #include "glcontextmodes.h" /************************************************************************/ - -void __glXNop(void) {} - -/************************************************************************/ - /* Context stuff */ /* @@ -68,13 +62,13 @@ __glXAssociateContext(__GLXcontext *glxc) glxc->nextDrawPriv = glxc->drawPriv->drawGlxc; glxc->drawPriv->drawGlxc = glxc; - __glXRefDrawablePrivate(glxc->drawPriv); + __glXRefDrawable(glxc->drawPriv); glxc->nextReadPriv = glxc->readPriv->readGlxc; glxc->readPriv->readGlxc = glxc; - __glXRefDrawablePrivate(glxc->readPriv); + __glXRefDrawable(glxc->readPriv); } /* @@ -97,7 +91,7 @@ __glXDeassociateContext(__GLXcontext *glxc) prev->nextDrawPriv = curr->nextDrawPriv; } curr->nextDrawPriv = NULL; - __glXUnrefDrawablePrivate(glxc->drawPriv); + __glXUnrefDrawable(glxc->drawPriv); break; } } @@ -115,319 +109,76 @@ __glXDeassociateContext(__GLXcontext *glxc) prev->nextReadPriv = curr->nextReadPriv; } curr->nextReadPriv = NULL; - __glXUnrefDrawablePrivate(glxc->readPriv); + __glXUnrefDrawable(glxc->readPriv); break; } } } -/************************************************************************/ - -void -__glXGetDrawableSize(__GLdrawablePrivate *glPriv, - GLint *x, GLint *y, GLuint *width, GLuint *height) -{ - __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *)glPriv->other; - - if (glxPriv) { - *x = glxPriv->xorigin; - *y = glxPriv->yorigin; - *width = glxPriv->width; - *height = glxPriv->height; - } else { - *x = *y = *width = *height = 0; - } -} - -GLboolean -__glXResizeDrawable(__GLdrawablePrivate *glPriv) -{ - /* nothing to be done here */ - return GL_TRUE; -} - - -/*****************************************************************************/ -/* accessing the drawable private */ - -static void -LockDP(__GLdrawablePrivate *glPriv, __GLcontext *gc) -{ - __GLinterface *glci = (__GLinterface *) gc; - __GLXcontext *glxc = (__GLXcontext *) glci->imports.other; - - /* quick exit test */ - if ((glxc->pendingState & - (__GLX_PENDING_RESIZE | - __GLX_PENDING_DESTROY | - __GLX_PENDING_SWAP)) == 0x0) - return; - - /* some pending state. Deal with it */ - if (glxc->pendingState & __GLX_PENDING_RESIZE) { - glxc->pendingState &= ~__GLX_PENDING_RESIZE; - - (*glci->exports.notifyResize)(gc); - assert((glxc->pendingState & __GLX_PENDING_RESIZE) == 0x0); - } - if (glxc->pendingState & __GLX_PENDING_DESTROY) { - glxc->pendingState &= ~__GLX_PENDING_DESTROY; - - assert(glxc->drawPriv->xorigin == 0); - assert(glxc->drawPriv->yorigin == 0); - assert(glxc->drawPriv->width == 0); - assert(glxc->drawPriv->height == 0); - assert(glxc->readPriv->xorigin == 0); - assert(glxc->readPriv->yorigin == 0); - assert(glxc->readPriv->width == 0); - assert(glxc->readPriv->height == 0); - (*glci->exports.notifyDestroy)(gc); - __glXDeassociateContext(glxc); - assert((glxc->pendingState & __GLX_PENDING_DESTROY) == 0x0); - } - if (glxc->pendingState & __GLX_PENDING_SWAP) { - - glxc->pendingState &= ~__GLX_PENDING_SWAP; - - (*glci->exports.notifySwapBuffers)(gc); - assert((glxc->pendingState & __GLX_PENDING_SWAP) == 0x0); - } -} - -static void -UnlockDP(__GLdrawablePrivate *glPriv) -{ -} - /*****************************************************************************/ /* Drawable private stuff */ void -__glXRefDrawablePrivate(__GLXdrawablePrivate *glxPriv) +__glXRefDrawable(__GLXdrawable *glxPriv) { glxPriv->refCount++; } void -__glXUnrefDrawablePrivate(__GLXdrawablePrivate *glxPriv) +__glXUnrefDrawable(__GLXdrawable *glxPriv) { glxPriv->refCount--; if (glxPriv->refCount == 0) { - __glXDestroyDrawablePrivate(glxPriv); + /* remove the drawable from the drawable list */ + FreeResourceByType(glxPriv->drawId, __glXDrawableRes, FALSE); + glxPriv->destroy(glxPriv); } } -__GLXdrawablePrivate * -__glXCreateDrawablePrivate(DrawablePtr pDraw, XID drawId, - __GLcontextModes *modes) +GLboolean +__glXDrawableInit(__GLXdrawable *drawable, + __GLXcontext *ctx, DrawablePtr pDraw, XID drawId) { - __GLXdrawablePrivate *glxPriv; - __GLdrawablePrivate *glPriv; - __GLXscreenInfo *pGlxScreen; - - glxPriv = (__GLXdrawablePrivate *) malloc(sizeof(*glxPriv)); - memset(glxPriv, 0, sizeof(__GLXdrawablePrivate)); - - glxPriv->type = pDraw->type; - glxPriv->pDraw = pDraw; - glxPriv->drawId = drawId; + drawable->type = pDraw->type; + drawable->pDraw = pDraw; + drawable->drawId = drawId; + drawable->refCount = 1; /* if not a pixmap, lookup will fail, so pGlxPixmap will be NULL */ - glxPriv->pGlxPixmap = (__GLXpixmap *) + drawable->pGlxPixmap = (__GLXpixmap *) LookupIDByType(drawId, __glXPixmapRes); - /* since we are creating the drawablePrivate, drawId should be new */ - if (!AddResource(drawId, __glXDrawableRes, glxPriv)) { - /* oops! */ - free(glxPriv); - return NULL; - } - - /* fill up glPriv */ - glPriv = &glxPriv->glPriv; - glPriv->modes = (__GLcontextModes *) malloc(sizeof(__GLcontextModes)); - *glPriv->modes = *modes; - glPriv->malloc = malloc; - glPriv->calloc = calloc; - glPriv->realloc = realloc; - glPriv->free = free; - glPriv->addSwapRect = NULL; - glPriv->setClipRect = (void (*)(__GLdrawablePrivate *, GLint, GLint, GLsizei, GLsizei)) __glXNop; - glPriv->lockDP = LockDP; - glPriv->unlockDP = UnlockDP; - glPriv->getDrawableSize = __glXGetDrawableSize; - glPriv->resize = __glXResizeDrawable; - glPriv->other = glxPriv; - - /* allocate a one-rect ownership region */ - glPriv->ownershipRegion.rects = - (__GLregionRect *)calloc(1, sizeof(__GLregionRect)); - glPriv->ownershipRegion.numRects = 1; - - glxPriv->freeBuffers = __glXFreeBuffers; - glxPriv->updatePalette = (void (*)(__GLXdrawablePrivate *)) __glXNop; - - pGlxScreen = &__glXActiveScreens[pDraw->pScreen->myNum]; - - if (glxPriv->type == DRAWABLE_WINDOW) { - VisualID vid = wVisual((WindowPtr)pDraw); - - glxPriv->modes = _gl_context_modes_find_visual( pGlxScreen->modes, vid ); - __glXFBInitDrawable(glxPriv, modes); - } else { - glxPriv->modes = glxPriv->pGlxPixmap->modes; - __glXPixInitDrawable(glxPriv, modes); - } - - /* initialize the core's private buffer information */ - (*pGlxScreen->createBuffer)(glxPriv); - - return glxPriv; -} - -GLboolean -__glXDestroyDrawablePrivate(__GLXdrawablePrivate *glxPriv) -{ - __GLdrawablePrivate *glPriv = &glxPriv->glPriv; - - /* remove the drawable from the drawable list */ - FreeResourceByType(glxPriv->drawId, __glXDrawableRes, FALSE); - - /* Have the core free any memory it may have attached to the drawable */ - if (glPriv->freePrivate) { - (*glPriv->freePrivate)(glPriv); - } - - /* Free any framebuffer memory attached to the drawable */ - if (glxPriv->freeBuffers) { - (*glxPriv->freeBuffers)(glxPriv); - } - - /* Free the drawable Private */ - free(glxPriv->glPriv.modes); - free(glxPriv->glPriv.ownershipRegion.rects); - free(glxPriv); return GL_TRUE; } -__GLXdrawablePrivate * -__glXFindDrawablePrivate(XID drawId) +__GLXdrawable * +__glXFindDrawable(XID drawId) { - __GLXdrawablePrivate *glxPriv; + __GLXdrawable *glxPriv; - glxPriv = (__GLXdrawablePrivate *)LookupIDByType(drawId, __glXDrawableRes); + glxPriv = (__GLXdrawable *)LookupIDByType(drawId, __glXDrawableRes); return glxPriv; } -__GLXdrawablePrivate * -__glXGetDrawablePrivate(DrawablePtr pDraw, XID drawId, - __GLcontextModes *modes) +__GLXdrawable * +__glXGetDrawable(__GLXcontext *ctx, DrawablePtr pDraw, XID drawId) { - __GLXdrawablePrivate *glxPriv; + __GLXdrawable *glxPriv; - glxPriv = __glXFindDrawablePrivate(drawId); + glxPriv = __glXFindDrawable(drawId); - if (glxPriv == NULL) { - glxPriv = __glXCreateDrawablePrivate(pDraw, drawId, modes); - if (glxPriv) { - __glXRefDrawablePrivate(glxPriv); - } - } - - return glxPriv; -} + if (glxPriv == NULL) + { + glxPriv = ctx->createDrawable(ctx, pDraw, drawId); -void -__glXCacheDrawableSize(__GLXdrawablePrivate *glxPriv) -{ - if (glxPriv) { - if (glxPriv->pDraw) { - glxPriv->xorigin = glxPriv->pDraw->x; - glxPriv->yorigin = glxPriv->pDraw->y; - glxPriv->width = glxPriv->pDraw->width; - glxPriv->height = glxPriv->pDraw->height; + /* since we are creating the drawablePrivate, drawId should be new */ + if (!AddResource(drawId, __glXDrawableRes, glxPriv)) + { + glxPriv->destroy (glxPriv); + return NULL; } } -} - -/* -** resize/move the drawable. Called during the actual resize callback -** to update the drawable side of the buffers -*/ -GLboolean -__glXResizeDrawableBuffers(__GLXdrawablePrivate *glxPriv) -{ - __GLdrawablePrivate *glPriv = &glxPriv->glPriv; - GLint x, y; - GLuint w, h; -#if defined(__GL_ALIGNED_BUFFERS) - GLint xAlignment, yAlignment; - GLint xOffset, yOffset; - GLint xStart, xEnd; - GLint yStart, yEnd; - GLuint xAlignedMask, yAlignedMask; -#endif - GLboolean status = GL_TRUE; - - __glXCacheDrawableSize(glxPriv); - - w = glxPriv->width; - h = glxPriv->height; - x = glxPriv->xorigin; - y = glxPriv->yorigin; - -#if defined(__GL_ALIGNED_BUFFERS) - xAlignment = glPriv->xAlignment; - yAlignment = glPriv->yAlignment; - - xOffset = x & (xAlignment-1); - yOffset = y & (yAlignment-1); - - xAlignedMask = ~(xAlignment-1); - yAlignedMask = ~(yAlignment-1); - - xStart = x; xEnd = x+w; - yStart = y; yEnd = y+h; - - xStart &= xAlignedMask; - if (xEnd & ~xAlignedMask) { - xEnd = (xEnd&xAlignedMask) + xAlignment; - } - yStart &= yAlignedMask; - if (yEnd & ~yAlignedMask) { - yEnd = (yEnd&yAlignedMask) + yAlignment; - } - x = xStart; y = yStart; - w = xEnd-xStart; h = yEnd-yStart; -#endif - - if ((x != glPriv->xOrigin) || - (y != glPriv->yOrigin) || -#if defined(__GL_ALIGNED_BUFFERS) - (xOffset != glPriv->xOffset) || - (yOffset != glPriv->yOffset) || -#endif - (w != glPriv->width) || - (h != glPriv->height) || - (!w && !h)) { - /* set up the glPriv info */ - glPriv->width = w; - glPriv->height = h; - glPriv->xOrigin = x; - glPriv->yOrigin = y; -#if defined(__GL_ALIGNED_BUFFERS) - glPriv->xOffset = xOffset; - glPriv->yOffset = yOffset; -#endif - - /* notify the buffers */ - status = __glXResizeBuffers(glPriv, x, y, w, h); - } - - return status; + return glxPriv; } - -/************************************************************************/ - diff --git a/nx-X11/programs/Xserver/GL/glx/glxutil.h b/nx-X11/programs/Xserver/GL/glx/glxutil.h index a0a2e57b72..4665c30dea 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxutil.h +++ b/nx-X11/programs/Xserver/GL/glx/glxutil.h @@ -47,24 +47,27 @@ extern void __glXAssociateContext(__GLXcontext *glxc); extern void __glXDeassociateContext(__GLXcontext *glxc); /* drawable operation */ -extern void __glXGetDrawableSize(__GLdrawablePrivate *glPriv, +/*extern void __glXGetDrawableSize(__GLdrawablePrivate *glPriv, GLint *x, GLint *y, GLuint *width, GLuint *height); extern GLboolean __glXResizeDrawable(__GLdrawablePrivate *glPriv); -extern GLboolean __glXResizeDrawableBuffers(__GLXdrawablePrivate *glxPriv); +*/extern GLboolean __glXResizeDrawableBuffers(__GLXdrawable *glxPriv); /* drawable management */ -extern void __glXRefDrawablePrivate(__GLXdrawablePrivate *glxPriv); -extern void __glXUnrefDrawablePrivate(__GLXdrawablePrivate *glxPriv); -extern __GLXdrawablePrivate *__glXCreateDrawablePrivate(DrawablePtr pDraw, - XID glxpixmapId, - __GLcontextModes *modes); -extern GLboolean __glXDestroyDrawablePrivate(__GLXdrawablePrivate *glxPriv); -extern __GLXdrawablePrivate *__glXFindDrawablePrivate(XID glxpixmapId); -extern __GLXdrawablePrivate *__glXGetDrawablePrivate(DrawablePtr pDraw, - XID glxpixmapId, - __GLcontextModes *modes); -extern void __glXCacheDrawableSize(__GLXdrawablePrivate *glxPriv); +extern void __glXRefDrawable(__GLXdrawable *glxPriv); +extern void __glXUnrefDrawable(__GLXdrawable *glxPriv); + +extern __GLXdrawable *__glXCreateDrawable(__GLXcontext *ctx, + DrawablePtr pDraw, + XID glxpixmapId); +extern GLboolean __glXDrawableInit(__GLXdrawable *drawable, __GLXcontext *ctx, + DrawablePtr pDraw, XID drawID); +extern GLboolean __glXDestroyDrawable(__GLXdrawable *glxPriv); +extern __GLXdrawable *__glXFindDrawable(XID glxpixmapId); +extern __GLXdrawable *__glXGetDrawable(__GLXcontext *ctx, + DrawablePtr pDraw, + XID glxpixmapId); +extern void __glXCacheDrawableSize(__GLXdrawable *glxPriv); /* context helper routines */ extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag); diff --git a/nx-X11/programs/Xserver/GL/glx/glxvisuals.c b/nx-X11/programs/Xserver/GL/glx/glxvisuals.c new file mode 100644 index 0000000000..7fb48cfd21 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/glxvisuals.c @@ -0,0 +1,518 @@ +/* + * Copyright © 2006 Red Hat, Inc. + * (C) Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * RED HAT, INC, OR PRECISION INSIGHT AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT + * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* + * Authors: + * Kevin E. Martin + * Brian Paul + * Kristian Høgsberg + * + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void GlxWrapInitVisuals(miInitVisualsProcPtr *); + +#include "glcontextmodes.h" + +struct ScreenVisualsRec { + int num_vis; + void *private; + __GLcontextModes *modes; +}; +typedef struct ScreenVisualsRec ScreenVisuals; + +static ScreenVisuals screenVisuals[MAXSCREENS]; + +static int numConfigs = 0; +static __GLXvisualConfig *visualConfigs = NULL; +static void **visualPrivates = NULL; + +static int count_bits(unsigned int n) +{ + int bits = 0; + + while (n > 0) { + if (n & 1) bits++; + n >>= 1; + } + return bits; +} + +/* + * In the case the driver defines no GLX visuals we'll use these. + * Note that for TrueColor and DirectColor visuals, bufferSize is the + * sum of redSize, greenSize, blueSize and alphaSize, which may be larger + * than the nplanes/rootDepth of the server's X11 visuals + */ +#define NUM_FALLBACK_CONFIGS 5 +static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = { + /* [0] = RGB, double buffered, Z */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [1] = RGB, double buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 16, 16, 16, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [2] = RGB+Alpha, double buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 8, /* rgba sizes */ + -1, -1, -1, -1, /* rgba masks */ + 16, 16, 16, 16, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [3] = RGB+Alpha, single buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 8, /* rgba sizes */ + -1, -1, -1, -1, /* rgba masks */ + 16, 16, 16, 16, /* rgba accum sizes */ + False, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [4] = CI, double buffered, Z */ + { + -1, /* vid */ + -1, /* class */ + False, /* rgba? (false = color index) */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE, /* visualRating */ + GLX_NONE, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, +}; + + +static Bool init_visuals(int *nvisualp, VisualPtr *visualp, + VisualID *defaultVisp, + int ndepth, DepthPtr pdepth, + int rootDepth) +{ + int numRGBconfigs; + int numCIconfigs; + int numVisuals = *nvisualp; + int numNewVisuals; + int numNewConfigs; + VisualPtr pVisual = *visualp; + VisualPtr pVisualNew = NULL; + VisualID *orig_vid = NULL; + __GLcontextModes *modes; + __GLXvisualConfig *pNewVisualConfigs = NULL; + void **glXVisualPriv; + void **pNewVisualPriv; + int found_default; + int i, j, k; + + if (numConfigs > 0) + numNewConfigs = numConfigs; + else + numNewConfigs = NUM_FALLBACK_CONFIGS; + + /* Alloc space for the list of new GLX visuals */ + pNewVisualConfigs = (__GLXvisualConfig *) + malloc(numNewConfigs * sizeof(__GLXvisualConfig)); + if (!pNewVisualConfigs) { + return FALSE; + } + + /* Alloc space for the list of new GLX visual privates */ + pNewVisualPriv = (void **) malloc(numNewConfigs * sizeof(void *)); + if (!pNewVisualPriv) { + free(pNewVisualConfigs); + return FALSE; + } + + /* + ** If SetVisualConfigs was not called, then use default GLX + ** visual configs. + */ + if (numConfigs == 0) { + memcpy(pNewVisualConfigs, FallbackConfigs, + NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig)); + memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *)); + } + else { + /* copy driver's visual config info */ + for (i = 0; i < numConfigs; i++) { + pNewVisualConfigs[i] = visualConfigs[i]; + pNewVisualPriv[i] = visualPrivates[i]; + } + } + + /* Count the number of RGB and CI visual configs */ + numRGBconfigs = 0; + numCIconfigs = 0; + for (i = 0; i < numNewConfigs; i++) { + if (pNewVisualConfigs[i].rgba) + numRGBconfigs++; + else + numCIconfigs++; + } + + /* Count the total number of visuals to compute */ + numNewVisuals = 0; + for (i = 0; i < numVisuals; i++) { + numNewVisuals += + (pVisual[i].class == TrueColor || pVisual[i].class == DirectColor) + ? numRGBconfigs : numCIconfigs; + } + + /* Reset variables for use with the next screen/driver's visual configs */ + visualConfigs = NULL; + numConfigs = 0; + + /* Alloc temp space for the list of orig VisualIDs for each new visual */ + orig_vid = (VisualID *) malloc(numNewVisuals * sizeof(VisualID)); + if (!orig_vid) { + free(pNewVisualPriv); + free(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisuals */ + modes = _gl_context_modes_create(numNewVisuals, sizeof(__GLcontextModes)); + if (modes == NULL) { + free(orig_vid); + free(pNewVisualPriv); + free(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisualPrivates */ + glXVisualPriv = (void **)malloc(numNewVisuals * sizeof(void *)); + if (!glXVisualPriv) { + _gl_context_modes_destroy( modes ); + free(orig_vid); + free(pNewVisualPriv); + free(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the new list of the X server's visuals */ + pVisualNew = (VisualPtr)malloc(numNewVisuals * sizeof(VisualRec)); + if (!pVisualNew) { + free(glXVisualPriv); + _gl_context_modes_destroy( modes ); + free(orig_vid); + free(pNewVisualPriv); + free(pNewVisualConfigs); + return FALSE; + } + + /* Initialize the new visuals */ + found_default = FALSE; + screenVisuals[screenInfo.numScreens-1].modes = modes; + for (i = j = 0; i < numVisuals; i++) { + int is_rgb = (pVisual[i].class == TrueColor || + pVisual[i].class == DirectColor); + + for (k = 0; k < numNewConfigs; k++) { + if (pNewVisualConfigs[k].rgba != is_rgb) + continue; + + assert( modes != NULL ); + + /* Initialize the new visual */ + pVisualNew[j] = pVisual[i]; + pVisualNew[j].vid = FakeClientID(0); + + /* Check for the default visual */ + if (!found_default && pVisual[i].vid == *defaultVisp) { + *defaultVisp = pVisualNew[j].vid; + found_default = TRUE; + } + + /* Save the old VisualID */ + orig_vid[j] = pVisual[i].vid; + + /* Initialize the glXVisual */ + _gl_copy_visual_to_context_mode( modes, & pNewVisualConfigs[k] ); + modes->visualID = pVisualNew[j].vid; + if (modes->fbconfigID == GLX_DONT_CARE) + modes->fbconfigID = modes->visualID; + + /* + * If the class is -1, then assume the X visual information + * is identical to what GLX needs, and take them from the X + * visual. NOTE: if class != -1, then all other fields MUST + * be initialized. + */ + if (modes->visualType == GLX_NONE) { + modes->visualType = _gl_convert_from_x_visual_type( pVisual[i].class ); + modes->redBits = count_bits(pVisual[i].redMask); + modes->greenBits = count_bits(pVisual[i].greenMask); + modes->blueBits = count_bits(pVisual[i].blueMask); + modes->alphaBits = modes->alphaBits; + modes->redMask = pVisual[i].redMask; + modes->greenMask = pVisual[i].greenMask; + modes->blueMask = pVisual[i].blueMask; + modes->alphaMask = modes->alphaMask; + modes->rgbBits = (is_rgb) + ? (modes->redBits + modes->greenBits + + modes->blueBits + modes->alphaBits) + : rootDepth; + } + + /* Save the device-dependent private for this visual */ + glXVisualPriv[j] = pNewVisualPriv[k]; + + j++; + modes = modes->next; + } + } + + assert(j <= numNewVisuals); + + /* Save the GLX visuals in the screen structure */ + screenVisuals[screenInfo.numScreens-1].num_vis = numNewVisuals; + screenVisuals[screenInfo.numScreens-1].private = glXVisualPriv; + + /* Set up depth's VisualIDs */ + for (i = 0; i < ndepth; i++) { + int numVids = 0; + VisualID *pVids = NULL; + int k, n = 0; + + /* Count the new number of VisualIDs at this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + numVids++; + + /* Allocate a new list of VisualIDs for this depth */ + pVids = (VisualID *)malloc(numVids * sizeof(VisualID)); + + /* Initialize the new list of VisualIDs for this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + pVids[n++] = pVisualNew[k].vid; + + /* Update this depth's list of VisualIDs */ + free(pdepth[i].vids); + pdepth[i].vids = pVids; + pdepth[i].numVids = numVids; + } + + /* Update the X server's visuals */ + *nvisualp = numNewVisuals; + *visualp = pVisualNew; + + /* Free the old list of the X server's visuals */ + free(pVisual); + + /* Clean up temporary allocations */ + free(orig_vid); + free(pNewVisualPriv); + free(pNewVisualConfigs); + + /* Free the private list created by DDX HW driver */ + if (visualPrivates) + free(visualPrivates); + visualPrivates = NULL; + + return TRUE; +} + +void GlxSetVisualConfigs(int nconfigs, + __GLXvisualConfig *configs, void **privates) +{ + numConfigs = nconfigs; + visualConfigs = configs; + visualPrivates = privates; +} + +static miInitVisualsProcPtr saveInitVisualsProc; + +Bool GlxInitVisuals(VisualPtr *visualp, DepthPtr *depthp, + int *nvisualp, int *ndepthp, + int *rootDepthp, VisualID *defaultVisp, + unsigned long sizes, int bitsPerRGB, + int preferredVis) +{ + Bool ret; + + if (saveInitVisualsProc) { + ret = saveInitVisualsProc(visualp, depthp, nvisualp, ndepthp, + rootDepthp, defaultVisp, sizes, bitsPerRGB, + preferredVis); + if (!ret) + return False; + } + + /* + * Setup the visuals supported by this particular screen. + */ + init_visuals(nvisualp, visualp, defaultVisp, + *ndepthp, *depthp, *rootDepthp); + + + return True; +} + + +/************************************************************************/ + + +void +GlxWrapInitVisuals(miInitVisualsProcPtr *initVisProc) +{ + saveInitVisualsProc = *initVisProc; + *initVisProc = GlxInitVisuals; +} + +static void fixup_visuals(int screen) +{ + ScreenPtr pScreen = screenInfo.screens[screen]; + ScreenVisuals *psv = &screenVisuals[screen]; + int j; + __GLcontextModes *modes; + + for ( modes = psv->modes ; modes != NULL ; modes = modes->next ) { + const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); + const int nplanes = (modes->rgbBits - modes->alphaBits); + const VisualPtr pVis = pScreen->visuals; + + /* Find a visual that matches the GLX visual's class and size */ + for (j = 0; j < pScreen->numVisuals; j++) { + if (pVis[j].class == vis_class && + pVis[j].nplanes == nplanes) { + + /* Fixup the masks */ + modes->redMask = pVis[j].redMask; + modes->greenMask = pVis[j].greenMask; + modes->blueMask = pVis[j].blueMask; + + /* Recalc the sizes */ + modes->redBits = count_bits(modes->redMask); + modes->greenBits = count_bits(modes->greenMask); + modes->blueBits = count_bits(modes->blueMask); + } + } + } +} + +void __glXScreenInitVisuals(__GLXscreen *screen) +{ + int index = screen->pScreen->myNum; + + screen->modes = screenVisuals[index].modes; + screen->pVisualPriv = screenVisuals[index].private; + screen->numVisuals = screenVisuals[index].num_vis; + screen->numUsableVisuals = screenVisuals[index].num_vis; + + /* + * The ordering of the rgb compenents might have been changed by the + * driver after mi initialized them. + */ + fixup_visuals(index); +} diff --git a/nx-X11/programs/Xserver/GL/glx/impsize.h b/nx-X11/programs/Xserver/GL/glx/impsize.h deleted file mode 100644 index 53777c6e37..0000000000 --- a/nx-X11/programs/Xserver/GL/glx/impsize.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _impsize_h_ -#define _impsize_h_ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: The application programming interfaces -** established by SGI in conjunction with the Original Code are The -** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released -** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version -** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X -** Window System(R) (Version 1.3), released October 19, 1998. This software -** was created using the OpenGL(R) version 1.2.1 Sample Implementation -** published by SGI, but has not been independently verified as being -** compliant with the OpenGL(R) version 1.2.1 Specification. -** -*/ - -/* -** These are defined in libsampleGL.a. They are not technically part of -** the defined interface between libdixGL.a and libsampleGL.a (that interface -** being the functions in the __glXScreenInfo structure, plus the OpenGL API -** itself), but we thought it was better to call these routines than to -** replicate the code in here. -*/ - -#include "indirect_size.h" - -extern int __glDrawPixels_size(GLenum format, GLenum type, GLsizei w,GLsizei h); - -#endif /* _impsize_h_ */ diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_dispatch.c b/nx-X11/programs/Xserver/GL/glx/indirect_dispatch.c new file mode 100644 index 0000000000..62dc8fb8b4 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_dispatch.c @@ -0,0 +1,5668 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "indirect_util.h" +#include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +typedef struct { + __GLX_PIXEL_3D_HDR; +} __GLXpixel3DHeader; + +extern GLboolean __glXErrorOccured( void ); +extern void __glXClearErrorOccured( void ); + +static const unsigned dummy_answer[2] = {0, 0}; + +int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_EndList( GET_DISPATCH(), () ); + error = Success; + } + + return error; +} + +void __glXDisp_CallList(GLbyte * pc) +{ + CALL_CallList( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_CallLists(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + const GLenum type = *(GLenum *)(pc + 4); + const GLvoid * lists = (const GLvoid *)(pc + 8); + + lists = (const GLvoid *) (pc + 8); + + CALL_CallLists( GET_DISPATCH(), ( + n, + type, + lists + ) ); +} + +int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLuint retval; + retval = CALL_GenLists( GET_DISPATCH(), ( + *(GLsizei *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_ListBase(GLbyte * pc) +{ + CALL_ListBase( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Begin(GLbyte * pc) +{ + CALL_Begin( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Bitmap(GLbyte * 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) ); + + CALL_Bitmap( GET_DISPATCH(), ( + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLfloat *)(pc + 28), + *(GLfloat *)(pc + 32), + *(GLfloat *)(pc + 36), + *(GLfloat *)(pc + 40), + bitmap + ) ); +} + +void __glXDisp_Color3bv(GLbyte * pc) +{ + CALL_Color3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Color3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Color3fv(GLbyte * pc) +{ + CALL_Color3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Color3iv(GLbyte * pc) +{ + CALL_Color3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Color3sv(GLbyte * pc) +{ + CALL_Color3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Color3ubv(GLbyte * pc) +{ + CALL_Color3ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color3uiv(GLbyte * pc) +{ + CALL_Color3uiv( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Color3usv(GLbyte * pc) +{ + CALL_Color3usv( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +void __glXDisp_Color4bv(GLbyte * pc) +{ + CALL_Color4bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Color4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Color4fv(GLbyte * pc) +{ + CALL_Color4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Color4iv(GLbyte * pc) +{ + CALL_Color4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Color4sv(GLbyte * pc) +{ + CALL_Color4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Color4ubv(GLbyte * pc) +{ + CALL_Color4ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_Color4uiv(GLbyte * pc) +{ + CALL_Color4uiv( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Color4usv(GLbyte * pc) +{ + CALL_Color4usv( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +void __glXDisp_EdgeFlagv(GLbyte * pc) +{ + CALL_EdgeFlagv( GET_DISPATCH(), ( + (const GLboolean *)(pc + 0) + ) ); +} + +void __glXDisp_End(GLbyte * pc) +{ + CALL_End( GET_DISPATCH(), () ); +} + +void __glXDisp_Indexdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_Indexdv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Indexfv(GLbyte * pc) +{ + CALL_Indexfv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Indexiv(GLbyte * pc) +{ + CALL_Indexiv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Indexsv(GLbyte * pc) +{ + CALL_Indexsv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3bv(GLbyte * pc) +{ + CALL_Normal3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Normal3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3fv(GLbyte * pc) +{ + CALL_Normal3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3iv(GLbyte * pc) +{ + CALL_Normal3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Normal3sv(GLbyte * pc) +{ + CALL_Normal3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_RasterPos2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2fv(GLbyte * pc) +{ + CALL_RasterPos2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2iv(GLbyte * pc) +{ + CALL_RasterPos2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos2sv(GLbyte * pc) +{ + CALL_RasterPos2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_RasterPos3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3fv(GLbyte * pc) +{ + CALL_RasterPos3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3iv(GLbyte * pc) +{ + CALL_RasterPos3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos3sv(GLbyte * pc) +{ + CALL_RasterPos3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_RasterPos4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4fv(GLbyte * pc) +{ + CALL_RasterPos4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4iv(GLbyte * pc) +{ + CALL_RasterPos4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_RasterPos4sv(GLbyte * pc) +{ + CALL_RasterPos4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Rectdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_Rectfv(GLbyte * pc) +{ + CALL_Rectfv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Rectiv(GLbyte * pc) +{ + CALL_Rectiv( GET_DISPATCH(), ( + (const GLint *)(pc + 0), + (const GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Rectsv(GLbyte * pc) +{ + CALL_Rectsv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_TexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_TexCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1fv(GLbyte * pc) +{ + CALL_TexCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1iv(GLbyte * pc) +{ + CALL_TexCoord1iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord1sv(GLbyte * pc) +{ + CALL_TexCoord1sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_TexCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2fv(GLbyte * pc) +{ + CALL_TexCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2iv(GLbyte * pc) +{ + CALL_TexCoord2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord2sv(GLbyte * pc) +{ + CALL_TexCoord2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_TexCoord3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3fv(GLbyte * pc) +{ + CALL_TexCoord3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3iv(GLbyte * pc) +{ + CALL_TexCoord3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord3sv(GLbyte * pc) +{ + CALL_TexCoord3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_TexCoord4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4fv(GLbyte * pc) +{ + CALL_TexCoord4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4iv(GLbyte * pc) +{ + CALL_TexCoord4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_TexCoord4sv(GLbyte * pc) +{ + CALL_TexCoord4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_Vertex2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2fv(GLbyte * pc) +{ + CALL_Vertex2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2iv(GLbyte * pc) +{ + CALL_Vertex2iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex2sv(GLbyte * pc) +{ + CALL_Vertex2sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_Vertex3dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3fv(GLbyte * pc) +{ + CALL_Vertex3fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3iv(GLbyte * pc) +{ + CALL_Vertex3iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex3sv(GLbyte * pc) +{ + CALL_Vertex3sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 32); + pc -= 4; + } +#endif + + CALL_Vertex4dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4fv(GLbyte * pc) +{ + CALL_Vertex4fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4iv(GLbyte * pc) +{ + CALL_Vertex4iv( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_Vertex4sv(GLbyte * pc) +{ + CALL_Vertex4sv( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_ClipPlane(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_ColorMaterial(GLbyte * pc) +{ + CALL_ColorMaterial( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_CullFace(GLbyte * pc) +{ + CALL_CullFace( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Fogf(GLbyte * pc) +{ + CALL_Fogf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_Fogfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_Fogfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_Fogi(GLbyte * pc) +{ + CALL_Fogi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_Fogiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_Fogiv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_FrontFace(GLbyte * pc) +{ + CALL_FrontFace( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Hint(GLbyte * pc) +{ + CALL_Hint( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_Lightf(GLbyte * pc) +{ + CALL_Lightf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Lightfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_Lightfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_Lighti(GLbyte * pc) +{ + CALL_Lighti( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Lightiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_Lightiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_LightModelf(GLbyte * pc) +{ + CALL_LightModelf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_LightModelfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_LightModelfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_LightModeli(GLbyte * pc) +{ + CALL_LightModeli( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_LightModeliv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_LightModeliv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_LineStipple(GLbyte * pc) +{ + CALL_LineStipple( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_LineWidth(GLbyte * pc) +{ + CALL_LineWidth( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_Materialf(GLbyte * pc) +{ + CALL_Materialf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Materialfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_Materialfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_Materiali(GLbyte * pc) +{ + CALL_Materiali( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_Materialiv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_Materialiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_PointSize(GLbyte * pc) +{ + CALL_PointSize( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_PolygonMode(GLbyte * pc) +{ + CALL_PolygonMode( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_PolygonStipple(GLbyte * 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) ); + + CALL_PolygonStipple( GET_DISPATCH(), ( + mask + ) ); +} + +void __glXDisp_Scissor(GLbyte * pc) +{ + CALL_Scissor( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + +void __glXDisp_ShadeModel(GLbyte * pc) +{ + CALL_ShadeModel( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_TexParameterf(GLbyte * pc) +{ + CALL_TexParameterf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexParameteri(GLbyte * pc) +{ + CALL_TexParameteri( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexImage1D(GLbyte * 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) ); + + 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 + ) ); +} + +void __glXDisp_TexImage2D(GLbyte * 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) ); + + 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 + ) ); +} + +void __glXDisp_TexEnvf(GLbyte * pc) +{ + CALL_TexEnvf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexEnvfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexEnvfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexEnvi(GLbyte * pc) +{ + CALL_TexEnvi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexEnviv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexEnviv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGend(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_TexGendv(GLbyte * pc) +{ + 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); + pc -= 4; + } +#endif + + params = (const GLdouble *) (pc + 8); + + CALL_TexGendv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGenf(GLbyte * pc) +{ + CALL_TexGenf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_TexGenfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_TexGenfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_TexGeni(GLbyte * pc) +{ + CALL_TexGeni( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_TexGeniv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_TexGeniv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_InitNames(GLbyte * pc) +{ + CALL_InitNames( GET_DISPATCH(), () ); +} + +void __glXDisp_LoadName(GLbyte * pc) +{ + CALL_LoadName( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_PassThrough(GLbyte * pc) +{ + CALL_PassThrough( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_PopName(GLbyte * pc) +{ + CALL_PopName( GET_DISPATCH(), () ); +} + +void __glXDisp_PushName(GLbyte * pc) +{ + CALL_PushName( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_DrawBuffer(GLbyte * pc) +{ + CALL_DrawBuffer( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Clear(GLbyte * pc) +{ + CALL_Clear( GET_DISPATCH(), ( + *(GLbitfield *)(pc + 0) + ) ); +} + +void __glXDisp_ClearAccum(GLbyte * pc) +{ + CALL_ClearAccum( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8), + *(GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_ClearIndex(GLbyte * pc) +{ + CALL_ClearIndex( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_ClearColor(GLbyte * pc) +{ + CALL_ClearColor( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLclampf *)(pc + 4), + *(GLclampf *)(pc + 8), + *(GLclampf *)(pc + 12) + ) ); +} + +void __glXDisp_ClearStencil(GLbyte * pc) +{ + CALL_ClearStencil( GET_DISPATCH(), ( + *(GLint *)(pc + 0) + ) ); +} + +void __glXDisp_ClearDepth(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_ClearDepth( GET_DISPATCH(), ( + *(GLclampd *)(pc + 0) + ) ); +} + +void __glXDisp_StencilMask(GLbyte * pc) +{ + CALL_StencilMask( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_ColorMask(GLbyte * pc) +{ + CALL_ColorMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0), + *(GLboolean *)(pc + 1), + *(GLboolean *)(pc + 2), + *(GLboolean *)(pc + 3) + ) ); +} + +void __glXDisp_DepthMask(GLbyte * pc) +{ + CALL_DepthMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0) + ) ); +} + +void __glXDisp_IndexMask(GLbyte * pc) +{ + CALL_IndexMask( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_Accum(GLbyte * pc) +{ + CALL_Accum( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_Disable(GLbyte * pc) +{ + CALL_Disable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_Enable(GLbyte * pc) +{ + CALL_Enable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_PopAttrib(GLbyte * pc) +{ + CALL_PopAttrib( GET_DISPATCH(), () ); +} + +void __glXDisp_PushAttrib(GLbyte * pc) +{ + CALL_PushAttrib( GET_DISPATCH(), ( + *(GLbitfield *)(pc + 0) + ) ); +} + +void __glXDisp_MapGrid1d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_MapGrid1f(GLbyte * pc) +{ + CALL_MapGrid1f( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_MapGrid2d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +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) + ) ); +} + +void __glXDisp_EvalCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_EvalCoord1dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord1fv(GLbyte * pc) +{ + CALL_EvalCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_EvalCoord2dv( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_EvalCoord2fv(GLbyte * pc) +{ + CALL_EvalCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_EvalMesh1(GLbyte * pc) +{ + CALL_EvalMesh1( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_EvalPoint1(GLbyte * pc) +{ + CALL_EvalPoint1( GET_DISPATCH(), ( + *(GLint *)(pc + 0) + ) ); +} + +void __glXDisp_EvalMesh2(GLbyte * pc) +{ + CALL_EvalMesh2( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_EvalPoint2(GLbyte * pc) +{ + CALL_EvalPoint2( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_AlphaFunc(GLbyte * pc) +{ + CALL_AlphaFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLclampf *)(pc + 4) + ) ); +} + +void __glXDisp_BlendFunc(GLbyte * pc) +{ + CALL_BlendFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); +} + +void __glXDisp_LogicOp(GLbyte * pc) +{ + CALL_LogicOp( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_StencilFunc(GLbyte * pc) +{ + CALL_StencilFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLuint *)(pc + 8) + ) ); +} + +void __glXDisp_StencilOp(GLbyte * pc) +{ + CALL_StencilOp( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8) + ) ); +} + +void __glXDisp_DepthFunc(GLbyte * pc) +{ + CALL_DepthFunc( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_PixelZoom(GLbyte * pc) +{ + CALL_PixelZoom( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PixelTransferf(GLbyte * pc) +{ + CALL_PixelTransferf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PixelTransferi(GLbyte * pc) +{ + CALL_PixelTransferi( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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) + ) ); + error = Success; + } + + return error; +} + +void __glXDisp_PixelMapfv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_PixelMapuiv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapuiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLuint *)(pc + 8) + ) ); +} + +void __glXDisp_PixelMapusv(GLbyte * pc) +{ + const GLsizei mapsize = *(GLsizei *)(pc + 4); + + CALL_PixelMapusv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + mapsize, + (const GLushort *)(pc + 8) + ) ); +} + +void __glXDisp_ReadBuffer(GLbyte * pc) +{ + CALL_ReadBuffer( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_CopyPixels(GLbyte * pc) +{ + CALL_CopyPixels( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16) + ) ); +} + +void __glXDisp_DrawPixels(GLbyte * 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) ); + + CALL_DrawPixels( GET_DISPATCH(), ( + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLenum *)(pc + 28), + *(GLenum *)(pc + 32), + pixels + ) ); +} + +int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetBooleanv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLdouble equation[4]; + CALL_GetClipPlane( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + equation + ) ); + __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetDoublev( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_GetError( GET_DISPATCH(), () ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetFloatv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetIntegerv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetLightiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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); + + const GLuint compsize = __glGetMapdv_size(target,query); + GLdouble answerBuffer[200]; + GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapdv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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); + + const GLuint compsize = __glGetMapfv_size(target,query); + GLfloat answerBuffer[200]; + GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapfv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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); + + const GLuint compsize = __glGetMapiv_size(target,query); + GLint answerBuffer[200]; + GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapiv( GET_DISPATCH(), ( + target, + query, + v + ) ); + __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMaterialiv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapfv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapuiv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapusv( GET_DISPATCH(), ( + map, + values + ) ); + __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnvfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexEnviv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGendv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGenfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexGeniv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsEnabled( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsList( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_DepthRange(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 16); + pc -= 4; + } +#endif + + CALL_DepthRange( GET_DISPATCH(), ( + *(GLclampd *)(pc + 0), + *(GLclampd *)(pc + 8) + ) ); +} + +void __glXDisp_Frustum(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_LoadIdentity(GLbyte * pc) +{ + CALL_LoadIdentity( GET_DISPATCH(), () ); +} + +void __glXDisp_LoadMatrixf(GLbyte * pc) +{ + CALL_LoadMatrixf( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_LoadMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_LoadMatrixd( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MatrixMode(GLbyte * pc) +{ + CALL_MatrixMode( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_MultMatrixf(GLbyte * pc) +{ + CALL_MultMatrixf( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_MultMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 128); + pc -= 4; + } +#endif + + CALL_MultMatrixd( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_Ortho(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_PopMatrix(GLbyte * pc) +{ + CALL_PopMatrix( GET_DISPATCH(), () ); +} + +void __glXDisp_PushMatrix(GLbyte * pc) +{ + CALL_PushMatrix( GET_DISPATCH(), () ); +} + +void __glXDisp_Rotated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_Rotatef(GLbyte * pc) +{ + CALL_Rotatef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8), + *(GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_Scaled(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_Scalef(GLbyte * pc) +{ + CALL_Scalef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Translated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_Translatef(GLbyte * pc) +{ + CALL_Translatef( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_Viewport(GLbyte * pc) +{ + CALL_Viewport( GET_DISPATCH(), ( + *(GLint *)(pc + 0), + *(GLint *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + +void __glXDisp_BindTexture(GLbyte * pc) +{ + CALL_BindTexture( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_Indexubv(GLbyte * pc) +{ + CALL_Indexubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_PolygonOffset(GLbyte * pc) +{ + CALL_PolygonOffset( GET_DISPATCH(), ( + *(GLfloat *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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 + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +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) + ) ); +} + +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) + ) ); +} + +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) + ) ); +} + +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) + ) ); +} + +int __glXDisp_DeleteTextures(__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 GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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 + ) ); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_PrioritizeTextures(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_PrioritizeTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + (const GLclampf *)(pc + 4) + ) ); +} + +void __glXDisp_TexSubImage1D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (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) ); + + CALL_TexSubImage1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLint *)(pc + 24), + *(GLint *)(pc + 28), + *(GLsizei *)(pc + 36), + *(GLenum *)(pc + 44), + *(GLenum *)(pc + 48), + pixels + ) ); +} + +void __glXDisp_TexSubImage2D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (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) ); + + 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 + ) ); +} + +void __glXDisp_BlendColor(GLbyte * pc) +{ + CALL_BlendColor( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLclampf *)(pc + 4), + *(GLclampf *)(pc + 8), + *(GLclampf *)(pc + 12) + ) ); +} + +void __glXDisp_BlendEquation(GLbyte * pc) +{ + CALL_BlendEquation( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_ColorTable(GLbyte * 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) ); + + CALL_ColorTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + *(GLenum *)(pc + 36), + table + ) ); +} + +void __glXDisp_ColorTableParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_ColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_ColorTableParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_ColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_CopyColorTable(GLbyte * pc) +{ + CALL_CopyColorTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ColorSubTable(GLbyte * 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) ); + + CALL_ColorSubTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + *(GLenum *)(pc + 36), + data + ) ); +} + +void __glXDisp_CopyColorSubTable(GLbyte * pc) +{ + CALL_CopyColorSubTable( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLsizei *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +void __glXDisp_ConvolutionFilter1D(GLbyte * 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) ); + + CALL_ConvolutionFilter1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 36), + *(GLenum *)(pc + 40), + image + ) ); +} + +void __glXDisp_ConvolutionFilter2D(GLbyte * 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) ); + + CALL_ConvolutionFilter2D( GET_DISPATCH(), ( + *(GLenum *)(pc + 20), + *(GLenum *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLsizei *)(pc + 32), + *(GLenum *)(pc + 36), + *(GLenum *)(pc + 40), + image + ) ); +} + +void __glXDisp_ConvolutionParameterf(GLbyte * pc) +{ + CALL_ConvolutionParameterf( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ConvolutionParameterfv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLfloat * params; + + params = (const GLfloat *) (pc + 8); + + CALL_ConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_ConvolutionParameteri(GLbyte * pc) +{ + CALL_ConvolutionParameteri( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8) + ) ); +} + +void __glXDisp_ConvolutionParameteriv(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 4); + const GLint * params; + + params = (const GLint *) (pc + 8); + + CALL_ConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); +} + +void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc) +{ + CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16) + ) ); +} + +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) + ) ); +} + +int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + 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); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + 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_Minmax(GLbyte * pc) +{ + CALL_Minmax( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLboolean *)(pc + 8) + ) ); +} + +void __glXDisp_ResetHistogram(GLbyte * pc) +{ + CALL_ResetHistogram( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_ResetMinmax(GLbyte * pc) +{ + CALL_ResetMinmax( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +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); + + 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) ); + + 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 + ) ); +} + +void __glXDisp_TexSubImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (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) ); + + 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 + ) ); +} + +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) + ) ); +} + +void __glXDisp_ActiveTextureARB(GLbyte * pc) +{ + CALL_ActiveTextureARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 8), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord1svARB(GLbyte * pc) +{ + CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 16), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord2svARB(GLbyte * pc) +{ + CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 24), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord3svARB(GLbyte * pc) +{ + CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 32), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_MultiTexCoord4svARB(GLbyte * pc) +{ + CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_SampleCoverageARB(GLbyte * pc) +{ + CALL_SampleCoverageARB( GET_DISPATCH(), ( + *(GLclampf *)(pc + 0), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDisp_DrawBuffersARB(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DrawBuffersARB( GET_DISPATCH(), ( + n, + (const GLenum *)(pc + 4) + ) ); +} + +int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ +#ifdef NXAGENT_SERVER + return BadAlloc; +#else + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + 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_AreTexturesResidentEXT( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + residences + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + return error; +#endif +} + +int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ +#ifdef NXAGENT_SERVER + return BadAlloc; +#else + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTexturesEXT( GET_DISPATCH(), ( + n, + textures + ) ); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +#endif +} + +int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ +#ifdef NXAGENT_SERVER + return BadAlloc; +#else + 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_IsTextureEXT( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +#endif +} + +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_PointParameterfEXT(GLbyte * pc) +{ + CALL_PointParameterfEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_PointParameterfvEXT(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLfloat * params; + + params = (const GLfloat *) (pc + 4); + + CALL_PointParameterfvEXT( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_WindowPos3fvMESA(GLbyte * pc) +{ + CALL_WindowPos3fvMESA( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc) +{ + CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12) + ) ); +} + +void __glXDisp_FogCoordfvEXT(GLbyte * pc) +{ + CALL_FogCoordfvEXT( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_FogCoorddvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_FogCoorddvEXT( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_CompressedTexImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 28); + + CALL_CompressedTexImage3DARB( 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) + ) ); +} + +void __glXDisp_CompressedTexImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 24); + + CALL_CompressedTexImage2DARB( 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) + ) ); +} + +void __glXDisp_CompressedTexImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 20); + + CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLint *)(pc + 16), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 36); + + CALL_CompressedTexSubImage3DARB( 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) + ) ); +} + +void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 28); + + CALL_CompressedTexSubImage2DARB( 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) + ) ); +} + +void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 20); + + CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( + (const GLint *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3svEXT(GLbyte * pc) +{ + CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( + (const GLshort *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( + (const GLuint *)(pc + 0) + ) ); +} + +void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( + (const GLushort *)(pc + 0) + ) ); +} + +int __glXDisp_AreProgramsResidentNV(__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 GLsizei n = *(GLsizei *)(pc + 0); + + 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_BindProgramNV(GLbyte * pc) +{ + CALL_BindProgramNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_DeleteProgramsNV(__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 GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + 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_GenProgramsNV(__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 GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenProgramsNV( GET_DISPATCH(), ( + n, + programs + ) ); + __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +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_GetVertexAttribdvARB(__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 = __glGetVertexAttribdvARB_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribfvARB(__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 = __glGetVertexAttribfvARB_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribivARB(__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 = __glGetVertexAttribivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsProgramNV(__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_IsProgramNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_LoadProgramNV(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 8); + + CALL_LoadProgramNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + len, + (const GLubyte *)(pc + 12) + ) ); +} + +void __glXDisp_ProgramParameter4dvNV(GLbyte * pc) +{ +#ifndef NXAGENT_SERVER +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLdouble *)(pc + 8) + ) ); +#endif +} + +void __glXDisp_ProgramParameter4fvNV(GLbyte * pc) +{ +#ifndef NXAGENT_SERVER + CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +#endif +} + +void __glXDisp_ProgramParameters4dvNV(GLbyte * pc) +{ + const GLuint num = *(GLuint *)(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) + ) ); +} + +void __glXDisp_ProgramParameters4fvNV(GLbyte * pc) +{ + const GLuint num = *(GLuint *)(pc + 8); + + CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + num, + (const GLfloat *)(pc + 12) + ) ); +} + +void __glXDisp_RequestResidentProgramsNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_TrackMatrixNV(GLbyte * pc) +{ + CALL_TrackMatrixNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12) + ) ); +} + +void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 8), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_VertexAttrib1fvARB(GLbyte * pc) +{ + CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1svARB(GLbyte * pc) +{ + CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 16), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_VertexAttrib2fvARB(GLbyte * pc) +{ + CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2svARB(GLbyte * pc) +{ + CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 24), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_VertexAttrib3fvARB(GLbyte * pc) +{ + CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3svARB(GLbyte * pc) +{ + CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 32), + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_VertexAttrib4fvARB(GLbyte * pc) +{ + CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4svARB(GLbyte * pc) +{ + CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttribs1dvNV(GLbyte * pc) +{ + 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); + pc -= 4; + } +#endif + + CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs1fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs1svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs1svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2dvNV(GLbyte * pc) +{ + 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); + pc -= 4; + } +#endif + + CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs2svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs2svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3dvNV(GLbyte * pc) +{ + 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); + pc -= 4; + } +#endif + + CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3fvNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs3svNV(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 4); + + CALL_VertexAttribs3svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + n, + (const GLshort *)(pc + 8) + ) ); +} + +void __glXDisp_VertexAttribs4dvNV(GLbyte * pc) +{ + 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); + 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) + ) ); +} + +void __glXDisp_PointParameteriNV(GLbyte * pc) +{ + CALL_PointParameteriNV( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4) + ) ); +} + +void __glXDisp_PointParameterivNV(GLbyte * pc) +{ + const GLenum pname = *(GLenum *)(pc + 0); + const GLint * params; + + params = (const GLint *) (pc + 4); + + CALL_PointParameterivNV( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc) +{ + CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +void __glXDisp_VertexAttrib4bvARB(GLbyte * pc) +{ + CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ivARB(GLbyte * pc) +{ + CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4usvARB(GLbyte * pc) +{ + CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4uivARB(GLbyte * pc) +{ + CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_ProgramStringARB(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 8); + + CALL_ProgramStringARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + len, + (const GLvoid *)(pc + 12) + ) ); +} + +void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +int __glXDisp_GetProgramEnvParameterdvARB(__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_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramEnvParameterfvARB(__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_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramLocalParameterdvARB(__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_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramLocalParameterfvARB(__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_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramivARB(__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 = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 4); + + CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 24), + (const GLfloat *)(pc + 8) + ) ); +} + +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) + ) ); +} + +int __glXDisp_GetProgramNamedParameterfvNV(__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 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; +} + +int __glXDisp_GetProgramNamedParameterdvNV(__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 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; +} + +int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenQueriesARB( GET_DISPATCH(), ( + n, + ids + ) ); + __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteQueriesARB( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsQueryARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_BeginQueryARB(GLbyte * pc) +{ + CALL_BeginQueryARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_EndQueryARB(GLbyte * pc) +{ + CALL_EndQueryARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryObjectivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryObjectuivARB_size(pname); + GLuint answerBuffer[200]; + GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 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); + error = Success; + } + + return error; +} + +void __glXDisp_VertexAttrib1dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_VertexAttrib1fvNV(GLbyte * pc) +{ + CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1svNV(GLbyte * pc) +{ + CALL_VertexAttrib1svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_VertexAttrib2fvNV(GLbyte * pc) +{ + CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2svNV(GLbyte * pc) +{ + CALL_VertexAttrib2svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_VertexAttrib3fvNV(GLbyte * pc) +{ + CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3svNV(GLbyte * pc) +{ + CALL_VertexAttrib3svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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) + ) ); +} + +void __glXDisp_VertexAttrib4fvNV(GLbyte * pc) +{ + CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4svNV(GLbyte * pc) +{ + CALL_VertexAttrib4svNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc) +{ + CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +int __glXDisp_IsRenderbufferEXT(__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_IsRenderbufferEXT( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_BindRenderbufferEXT(GLbyte * pc) +{ + CALL_BindRenderbufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_GenRenderbuffersEXT(__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 GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( + n, + renderbuffers + ) ); + __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_RenderbufferStorageEXT(GLbyte * pc) +{ + CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) + ) ); +} + +int __glXDisp_GetRenderbufferParameterivEXT(__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_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsFramebufferEXT(__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_IsFramebufferEXT( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_BindFramebufferEXT(GLbyte * pc) +{ + CALL_BindFramebufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_GenFramebuffersEXT(__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 GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenFramebuffersEXT( GET_DISPATCH(), ( + n, + framebuffers + ) ); + __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_CheckFramebufferStatusEXT(__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 ) { + GLenum retval; + retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20) + ) ); +} + +void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc) +{ + CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12) + ) ); +} + +int __glXDisp_GetFramebufferAttachmentParameterivEXT(__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_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_GenerateMipmapEXT(GLbyte * pc) +{ + CALL_GenerateMipmapEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_dispatch.h b/nx-X11/programs/Xserver/GL/glx/indirect_dispatch.h new file mode 100644 index 0000000000..950d484bd0 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_dispatch.h @@ -0,0 +1,931 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_DISPATCH_H_ ) +# define _INDIRECT_DISPATCH_H_ + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define HIDDEN __attribute__((visibility("hidden"))) +# else +# define HIDDEN +# endif +struct __GLXclientStateRec; + +extern HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc); +extern HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc); +extern HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc); +extern HIDDEN void __glXDisp_SampleCoverageARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SampleCoverageARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDisp_BeginQueryARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BeginQueryARB(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointParameteriNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameteriNV(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc); +extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Histogram(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Histogram(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color3uiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3ubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModeliv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendColor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc); +extern HIDDEN void __glXDisp_CallLists(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc); +extern HIDDEN void __glXDisp_Viewport(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); +extern HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameter4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointSize(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointSize(GLbyte * pc); +extern HIDDEN void __glXDisp_PopName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopName(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexEnvi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc); +extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Scaled(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scaled(GLbyte * pc); +extern HIDDEN void __glXDisp_Scalef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); +extern HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Rotated(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); +extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc); +extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_GenerateMipmapEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc); +extern HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc); +extern HIDDEN void __glXDisp_Scissor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Scissor(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4usv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogi(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc); +extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc); +extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RenderbufferStorageEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc); +extern HIDDEN void __glXDisp_Accum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Accum(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc); +extern HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ClearStencil(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearIndex(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc); +extern HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadProgramNV(GLbyte * pc); +extern HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc); +extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_End(GLbyte * pc); +extern HIDDEN void __glXDispSwap_End(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendEquation(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc); +extern HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Indexdv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc); +extern HIDDEN void __glXDisp_PushName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushName(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_EndQueryARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EndQueryARB(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc); +extern HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4bv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc); +extern HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc); +extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc); +extern HIDDEN void __glXDisp_PointParameterivNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PointParameterivNV(GLbyte * pc); +extern HIDDEN void __glXDisp_BlendFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Color4uiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_BindFramebufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindFramebufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_PushAttrib(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc); +extern HIDDEN void __glXDisp_WindowPos3fvMESA(GLbyte * pc); +extern HIDDEN void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc); +extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc); +extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Frustum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc); +extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexEnvf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc); +extern HIDDEN int __glXDisp_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); +extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_Lightfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearDepth(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Lightiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib2dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectdv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexGeni(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGenf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGend(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGend(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PixelZoom(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc); +extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SamplePatternSGIS(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SamplePatternSGIS(GLbyte * pc); +extern HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc); +extern HIDDEN int __glXDisp_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc); +extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_FrontFace(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Lightf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lightf(GLbyte * pc); +extern HIDDEN void __glXDisp_MatrixMode(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc); +extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Lighti(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Lighti(GLbyte * pc); +extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc); +extern HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TrackMatrixNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TrackMatrixNV(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ClearColor(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc); +extern HIDDEN void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc); +extern HIDDEN void __glXDisp_Map1d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map1d(GLbyte * pc); +extern HIDDEN void __glXDisp_Map1f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map1f(GLbyte * pc); +extern HIDDEN void __glXDisp_CompressedTexImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc); +extern HIDDEN void __glXDisp_TexImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameters4fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_PushMatrix(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc); +extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); +extern HIDDEN void __glXDisp_Clear(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc); +extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc); +extern HIDDEN void __glXDisp_Ortho(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc); +extern HIDDEN void __glXDisp_ListBase(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ListBase(GLbyte * pc); +extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectiv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc); +extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LineWidth(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc); +extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc); +extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc); +extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CallList(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc); +extern HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); +extern HIDDEN void __glXDisp_Color3iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramParameters4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc); +extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc); +extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc); +extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Map2d(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map2d(GLbyte * pc); +extern HIDDEN void __glXDisp_Map2f(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc); +extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_Materialf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materialf(GLbyte * pc); +extern HIDDEN void __glXDisp_Materiali(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Materiali(GLbyte * pc); +extern HIDDEN void __glXDisp_Indexsv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord4svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModelfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc); +extern HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc); +extern HIDDEN int __glXDisp_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Translated(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Translated(GLbyte * pc); +extern HIDDEN void __glXDisp_Translatef(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Translatef(GLbyte * pc); +extern HIDDEN void __glXDisp_StencilMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc); +extern HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_LoadName(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LoadName(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc); +extern HIDDEN void __glXDisp_CullFace(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CullFace(GLbyte * pc); +extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_StencilFunc(GLbyte * pc); +extern HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyPixels(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectsv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc); +extern HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc); +extern HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc); +extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc); +extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc); +extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc); +extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc); +extern HIDDEN void __glXDisp_BindProgramNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_BindProgramNV(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_PopAttrib(GLbyte * pc); +extern HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc); +extern HIDDEN void __glXDisp_Fogfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc); +extern HIDDEN void __glXDisp_InitNames(GLbyte * pc); +extern HIDDEN void __glXDispSwap_InitNames(GLbyte * pc); +extern HIDDEN void __glXDisp_Normal3sv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc); +extern HIDDEN void __glXDisp_Minmax(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Minmax(GLbyte * pc); +extern HIDDEN void __glXDisp_FogCoorddvEXT(GLbyte * pc); +extern HIDDEN void __glXDispSwap_FogCoorddvEXT(GLbyte * pc); +extern HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Hint(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Hint(GLbyte * pc); +extern HIDDEN void __glXDisp_Color4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib2svARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc); +extern HIDDEN int __glXDisp_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc); +extern HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc); +extern HIDDEN void __glXDisp_Begin(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Begin(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); +extern HIDDEN void __glXDisp_Rectfv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc); +extern HIDDEN void __glXDisp_LightModelf(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc); +extern HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_Disable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Disable(GLbyte * pc); +extern HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc); +extern HIDDEN int __glXDisp_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); +extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); +extern HIDDEN void __glXDisp_ColorMask(GLbyte * pc); +extern HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc); +extern HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc); +extern HIDDEN void __glXDisp_Enable(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Enable(GLbyte * pc); +extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc); +extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc); +extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc); +extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc); +extern HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc); +extern HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc); +extern HIDDEN int __glXDisp_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN int __glXDispSwap_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); +extern HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc); +extern HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc); + +# undef HIDDEN + +#endif /* !defined( _INDIRECT_DISPATCH_H_ ) */ diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_dispatch_swap.c b/nx-X11/programs/Xserver/GL/glx/indirect_dispatch_swap.c new file mode 100644 index 0000000000..532044fca6 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_dispatch_swap.c @@ -0,0 +1,5836 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include +#ifdef __linux__ +#include +#elif defined(__OpenBSD__) +#include +#define bswap_16 __swap16 +#define bswap_32 __swap32 +#define bswap_64 __swap64 +#else +#include +#define bswap_16 bswap16 +#define bswap_32 bswap32 +#define bswap_64 bswap64 +#endif +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "indirect_util.h" +#include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +typedef struct { + __GLX_PIXEL_3D_HDR; +} __GLXpixel3DHeader; + +extern GLboolean __glXErrorOccured( void ); +extern void __glXClearErrorOccured( void ); + +static const unsigned dummy_answer[2] = {0, 0}; + +static GLsizei +bswap_CARD32( const void * 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 ) +{ + union { uint16_t dst; GLshort ret; } x; + x.dst = bswap_16( *(uint16_t *) src ); + return x.ret; +} + +static GLenum +bswap_ENUM( const void * src ) +{ + union { uint32_t dst; GLenum ret; } x; + x.dst = bswap_32( *(uint32_t *) src ); + return x.ret; +} + +static GLdouble +bswap_FLOAT64( const void * 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 ) +{ + 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 ) +{ + unsigned i; + + for ( i = 0 ; i < count ; i++ ) { + uint16_t temp = bswap_16( src[i] ); + src[i] = temp; + } + + return src; +} + +static void * +bswap_32_array( uint32_t * src, unsigned count ) +{ + unsigned i; + + for ( i = 0 ; i < count ; i++ ) { + uint32_t temp = bswap_32( src[i] ); + src[i] = temp; + } + + return src; +} + +static void * +bswap_64_array( uint64_t * src, unsigned count ) +{ + unsigned 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) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + CALL_EndList( GET_DISPATCH(), () ); + error = Success; + } + + return error; +} + +void __glXDispSwap_CallList(GLbyte * pc) +{ + CALL_CallList( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_CallLists(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + const GLenum type = (GLenum )bswap_ENUM ( pc + 4 ); + const GLvoid * lists; + + 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; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + 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; + default: + return; + } + + CALL_CallLists( GET_DISPATCH(), ( + n, + type, + lists + ) ); +} + +int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLuint retval; + retval = CALL_GenLists( GET_DISPATCH(), ( + (GLsizei )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_ListBase(GLbyte * pc) +{ + CALL_ListBase( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Begin(GLbyte * pc) +{ + CALL_Begin( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Bitmap(GLbyte * 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 )) ); + + 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 + ) ); +} + +void __glXDispSwap_Color3bv(GLbyte * pc) +{ + CALL_Color3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Color3fv(GLbyte * pc) +{ + CALL_Color3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3iv(GLbyte * pc) +{ + CALL_Color3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3sv(GLbyte * pc) +{ + CALL_Color3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3ubv(GLbyte * pc) +{ + CALL_Color3ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color3uiv(GLbyte * pc) +{ + CALL_Color3uiv( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color3usv(GLbyte * pc) +{ + CALL_Color3usv( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Color4bv(GLbyte * pc) +{ + CALL_Color4bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Color4fv(GLbyte * pc) +{ + CALL_Color4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4iv(GLbyte * pc) +{ + CALL_Color4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4sv(GLbyte * pc) +{ + CALL_Color4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4ubv(GLbyte * pc) +{ + CALL_Color4ubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Color4uiv(GLbyte * pc) +{ + CALL_Color4uiv( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Color4usv(GLbyte * pc) +{ + CALL_Color4usv( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_EdgeFlagv(GLbyte * pc) +{ + CALL_EdgeFlagv( GET_DISPATCH(), ( + (const GLboolean *)(pc + 0) + ) ); +} + +void __glXDispSwap_End(GLbyte * pc) +{ + CALL_End( GET_DISPATCH(), () ); +} + +void __glXDispSwap_Indexdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Indexfv(GLbyte * pc) +{ + CALL_Indexfv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Indexiv(GLbyte * pc) +{ + CALL_Indexiv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Indexsv(GLbyte * pc) +{ + CALL_Indexsv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_Normal3bv(GLbyte * pc) +{ + CALL_Normal3bv( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_Normal3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Normal3fv(GLbyte * pc) +{ + CALL_Normal3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Normal3iv(GLbyte * pc) +{ + CALL_Normal3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Normal3sv(GLbyte * pc) +{ + CALL_Normal3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_RasterPos2fv(GLbyte * pc) +{ + CALL_RasterPos2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos2iv(GLbyte * pc) +{ + CALL_RasterPos2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos2sv(GLbyte * pc) +{ + CALL_RasterPos2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_RasterPos3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_RasterPos3fv(GLbyte * pc) +{ + CALL_RasterPos3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos3iv(GLbyte * pc) +{ + CALL_RasterPos3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos3sv(GLbyte * pc) +{ + CALL_RasterPos3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_RasterPos4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_RasterPos4fv(GLbyte * pc) +{ + CALL_RasterPos4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_RasterPos4iv(GLbyte * pc) +{ + CALL_RasterPos4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_RasterPos4sv(GLbyte * pc) +{ + CALL_RasterPos4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Rectdv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +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 ) + ) ); +} + +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 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_TexCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_TexCoord1fv(GLbyte * pc) +{ + CALL_TexCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord1iv(GLbyte * pc) +{ + CALL_TexCoord1iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord1sv(GLbyte * pc) +{ + CALL_TexCoord1sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_TexCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_TexCoord2fv(GLbyte * pc) +{ + CALL_TexCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord2iv(GLbyte * pc) +{ + CALL_TexCoord2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord2sv(GLbyte * pc) +{ + CALL_TexCoord2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_TexCoord3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_TexCoord3fv(GLbyte * pc) +{ + CALL_TexCoord3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord3iv(GLbyte * pc) +{ + CALL_TexCoord3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord3sv(GLbyte * pc) +{ + CALL_TexCoord3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_TexCoord4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_TexCoord4fv(GLbyte * pc) +{ + CALL_TexCoord4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_TexCoord4iv(GLbyte * pc) +{ + CALL_TexCoord4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_TexCoord4sv(GLbyte * pc) +{ + CALL_TexCoord4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Vertex2fv(GLbyte * pc) +{ + CALL_Vertex2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex2iv(GLbyte * pc) +{ + CALL_Vertex2iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex2sv(GLbyte * pc) +{ + CALL_Vertex2sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_Vertex3dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Vertex3fv(GLbyte * pc) +{ + CALL_Vertex3fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex3iv(GLbyte * pc) +{ + CALL_Vertex3iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex3sv(GLbyte * pc) +{ + CALL_Vertex3sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_Vertex4dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Vertex4fv(GLbyte * pc) +{ + CALL_Vertex4fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex4iv(GLbyte * pc) +{ + CALL_Vertex4iv( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_Vertex4sv(GLbyte * pc) +{ + CALL_Vertex4sv( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_ClipPlane(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_ColorMaterial(GLbyte * pc) +{ + CALL_ColorMaterial( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_CullFace(GLbyte * pc) +{ + CALL_CullFace( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Fogf(GLbyte * pc) +{ + CALL_Fogf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_Fogfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) ); + + CALL_Fogfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_Fogi(GLbyte * pc) +{ + CALL_Fogi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Fogiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) ); + + CALL_Fogiv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_FrontFace(GLbyte * pc) +{ + CALL_FrontFace( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Hint(GLbyte * pc) +{ + CALL_Hint( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Lightf(GLbyte * pc) +{ + CALL_Lightf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Lightfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) ); + + CALL_Lightfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_Lighti(GLbyte * pc) +{ + CALL_Lighti( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_Lightiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) ); + + CALL_Lightiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_LightModelf(GLbyte * pc) +{ + CALL_LightModelf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_LightModelfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) ); + + CALL_LightModelfv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_LightModeli(GLbyte * pc) +{ + CALL_LightModeli( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LightModeliv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) ); + + CALL_LightModeliv( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_LineStipple(GLbyte * pc) +{ + CALL_LineStipple( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLushort)bswap_CARD16 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LineWidth(GLbyte * pc) +{ + CALL_LineWidth( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_Materialf(GLbyte * pc) +{ + CALL_Materialf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Materialfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) ); + + CALL_Materialfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_Materiali(GLbyte * pc) +{ + CALL_Materiali( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_Materialiv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) ); + + CALL_Materialiv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_PointSize(GLbyte * pc) +{ + CALL_PointSize( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_PolygonMode(GLbyte * pc) +{ + CALL_PolygonMode( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_PolygonStipple(GLbyte * 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 )) ); + + CALL_PolygonStipple( GET_DISPATCH(), ( + mask + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_ShadeModel(GLbyte * pc) +{ + CALL_ShadeModel( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_TexParameterf(GLbyte * pc) +{ + CALL_TexParameterf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) ); + + CALL_TexParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexParameteri(GLbyte * pc) +{ + CALL_TexParameteri( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) ); + + CALL_TexParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexImage1D(GLbyte * 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 )) ); + + 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 + ) ); +} + +void __glXDispSwap_TexImage2D(GLbyte * 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 )) ); + + 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 + ) ); +} + +void __glXDispSwap_TexEnvf(GLbyte * pc) +{ + CALL_TexEnvf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexEnvfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) ); + + CALL_TexEnvfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexEnvi(GLbyte * pc) +{ + CALL_TexEnvi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexEnviv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) ); + + CALL_TexEnviv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGend(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_TexGendv(GLbyte * pc) +{ + 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); + pc -= 4; + } +#endif + + params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) ); + + CALL_TexGendv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGenf(GLbyte * pc) +{ + CALL_TexGenf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexGenfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) ); + + CALL_TexGenfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_TexGeni(GLbyte * pc) +{ + CALL_TexGeni( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_TexGeniv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) ); + + CALL_TexGeniv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_InitNames(GLbyte * pc) +{ + CALL_InitNames( GET_DISPATCH(), () ); +} + +void __glXDispSwap_LoadName(GLbyte * pc) +{ + CALL_LoadName( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PassThrough(GLbyte * pc) +{ + CALL_PassThrough( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +void __glXDispSwap_PopName(GLbyte * pc) +{ + CALL_PopName( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushName(GLbyte * pc) +{ + CALL_PushName( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_DrawBuffer(GLbyte * pc) +{ + CALL_DrawBuffer( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Clear(GLbyte * pc) +{ + CALL_Clear( GET_DISPATCH(), ( + (GLbitfield)bswap_CARD32 ( pc + 0 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_ClearIndex(GLbyte * pc) +{ + CALL_ClearIndex( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_ClearStencil(GLbyte * pc) +{ + CALL_ClearStencil( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ClearDepth(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_ClearDepth( GET_DISPATCH(), ( + (GLclampd)bswap_FLOAT64( pc + 0 ) + ) ); +} + +void __glXDispSwap_StencilMask(GLbyte * pc) +{ + CALL_StencilMask( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ColorMask(GLbyte * pc) +{ + CALL_ColorMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0), + *(GLboolean *)(pc + 1), + *(GLboolean *)(pc + 2), + *(GLboolean *)(pc + 3) + ) ); +} + +void __glXDispSwap_DepthMask(GLbyte * pc) +{ + CALL_DepthMask( GET_DISPATCH(), ( + *(GLboolean *)(pc + 0) + ) ); +} + +void __glXDispSwap_IndexMask(GLbyte * pc) +{ + CALL_IndexMask( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Accum(GLbyte * pc) +{ + CALL_Accum( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_Disable(GLbyte * pc) +{ + CALL_Disable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_Enable(GLbyte * pc) +{ + CALL_Enable( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PopAttrib(GLbyte * pc) +{ + CALL_PopAttrib( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushAttrib(GLbyte * pc) +{ + CALL_PushAttrib( GET_DISPATCH(), ( + (GLbitfield)bswap_CARD32 ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MapGrid1d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_MapGrid1f(GLbyte * pc) +{ + CALL_MapGrid1f( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_MapGrid2d(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_EvalCoord1dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_EvalCoord1fv(GLbyte * pc) +{ + CALL_EvalCoord1fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_EvalCoord2dv(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_EvalCoord2fv(GLbyte * pc) +{ + CALL_EvalCoord2fv( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_EvalMesh1(GLbyte * pc) +{ + CALL_EvalMesh1( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_EvalPoint1(GLbyte * pc) +{ + CALL_EvalPoint1( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_EvalPoint2(GLbyte * pc) +{ + CALL_EvalPoint2( GET_DISPATCH(), ( + (GLint )bswap_CARD32 ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_AlphaFunc(GLbyte * pc) +{ + CALL_AlphaFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLclampf)bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_BlendFunc(GLbyte * pc) +{ + CALL_BlendFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); +} + +void __glXDispSwap_LogicOp(GLbyte * pc) +{ + CALL_LogicOp( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_StencilFunc(GLbyte * pc) +{ + CALL_StencilFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLuint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_StencilOp(GLbyte * pc) +{ + CALL_StencilOp( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ) + ) ); +} + +void __glXDispSwap_DepthFunc(GLbyte * pc) +{ + CALL_DepthFunc( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_PixelZoom(GLbyte * pc) +{ + CALL_PixelZoom( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PixelTransferf(GLbyte * pc) +{ + CALL_PixelTransferf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PixelTransferi(GLbyte * pc) +{ + CALL_PixelTransferi( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ) + ) ); + error = Success; + } + + return error; +} + +void __glXDispSwap_PixelMapfv(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_PixelMapuiv(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_PixelMapusv(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_ReadBuffer(GLbyte * pc) +{ + CALL_ReadBuffer( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_DrawPixels(GLbyte * 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 )) ); + + 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 + ) ); +} + +int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetBooleanv_size(pname); + GLboolean answerBuffer[200]; + GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetBooleanv( GET_DISPATCH(), ( + pname, + params + ) ); + __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLdouble equation[4]; + CALL_GetClipPlane( GET_DISPATCH(), ( + (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; + } + + return error; +} + +int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetDoublev_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetDoublev( GET_DISPATCH(), ( + 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_GetError(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_GetError( GET_DISPATCH(), () ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetFloatv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetFloatv( GET_DISPATCH(), ( + 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_GetIntegerv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetIntegerv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetIntegerv( GET_DISPATCH(), ( + 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_GetLightfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetLightfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetLightiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetMapdv_size(target,query); + GLdouble answerBuffer[200]; + GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapdv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_64_array( (uint64_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetMapfv_size(target,query); + GLfloat answerBuffer[200]; + GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapfv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_32_array( (uint32_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetMapiv_size(target,query); + GLint answerBuffer[200]; + GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (v == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMapiv( GET_DISPATCH(), ( + target, + query, + v + ) ); + (void) bswap_32_array( (uint32_t *) v, compsize ); + __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetMaterialfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetMaterialiv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetPixelMapfv_size(map); + GLfloat answerBuffer[200]; + GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapfv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_32_array( (uint32_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetPixelMapuiv_size(map); + GLuint answerBuffer[200]; + GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapuiv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_32_array( (uint32_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetPixelMapusv_size(map); + GLushort answerBuffer[200]; + GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); + + if (values == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetPixelMapusv( GET_DISPATCH(), ( + map, + values + ) ); + (void) bswap_16_array( (uint16_t *) values, compsize ); + __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexEnvfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexEnviv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexGendv_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexGenfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexGeniv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexLevelParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetTexLevelParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsEnabled( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsList( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_DepthRange(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Frustum(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_LoadIdentity(GLbyte * pc) +{ + CALL_LoadIdentity( GET_DISPATCH(), () ); +} + +void __glXDispSwap_LoadMatrixf(GLbyte * pc) +{ + CALL_LoadMatrixf( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_LoadMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_MatrixMode(GLbyte * pc) +{ + CALL_MatrixMode( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MultMatrixf(GLbyte * pc) +{ + CALL_MultMatrixf( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) + ) ); +} + +void __glXDispSwap_MultMatrixd(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Ortho(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_PopMatrix(GLbyte * pc) +{ + CALL_PopMatrix( GET_DISPATCH(), () ); +} + +void __glXDispSwap_PushMatrix(GLbyte * pc) +{ + CALL_PushMatrix( GET_DISPATCH(), () ); +} + +void __glXDispSwap_Rotated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_Scaled(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Scalef(GLbyte * pc) +{ + CALL_Scalef( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_Translated(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_Translatef(GLbyte * pc) +{ + CALL_Translatef( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_BindTexture(GLbyte * pc) +{ + CALL_BindTexture( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_Indexubv(GLbyte * pc) +{ + CALL_Indexubv( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_PolygonOffset(GLbyte * pc) +{ + CALL_PolygonOffset( GET_DISPATCH(), ( + (GLfloat )bswap_FLOAT32( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + 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 + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + +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 ) + ) ); +} + +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 ) + ) ); +} + +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 ) + ) ); +} + +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 ) + ) ); +} + +int __glXDispSwap_DeleteTextures(__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 n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + 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 ); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_PrioritizeTextures(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_TexSubImage1D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (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 )) ); + + 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 + ) ); +} + +void __glXDispSwap_TexSubImage2D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (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 )) ); + + 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 + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_BlendEquation(GLbyte * pc) +{ + CALL_BlendEquation( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ColorTable(GLbyte * 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 )) ); + + 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 + ) ); +} + +void __glXDispSwap_ColorTableParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) ); + + CALL_ColorTableParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_ColorTableParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) ); + + CALL_ColorTableParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +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 ) + ) ); +} + +int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ColorSubTable(GLbyte * 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 )) ); + + 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 + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_ConvolutionFilter1D(GLbyte * 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 )) ); + + 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 + ) ); +} + +void __glXDispSwap_ConvolutionFilter2D(GLbyte * 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 )) ); + + 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 + ) ); +} + +void __glXDispSwap_ConvolutionParameterf(GLbyte * pc) +{ + CALL_ConvolutionParameterf( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLfloat )bswap_FLOAT32( pc + 8 ) + ) ); +} + +void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) ); + + CALL_ConvolutionParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +void __glXDispSwap_ConvolutionParameteri(GLbyte * pc) +{ + CALL_ConvolutionParameteri( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ) + ) ); +} + +void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) ); + + CALL_ConvolutionParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); +} + +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 ) + ) ); +} + +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 ) + ) ); +} + +int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + 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_Minmax(GLbyte * pc) +{ + CALL_Minmax( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + *(GLboolean *)(pc + 8) + ) ); +} + +void __glXDispSwap_ResetHistogram(GLbyte * pc) +{ + CALL_ResetHistogram( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_ResetMinmax(GLbyte * pc) +{ + CALL_ResetMinmax( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +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); + + 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 )) ); + + 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 + ) ); +} + +void __glXDispSwap_TexSubImage3D(GLbyte * pc) +{ + const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); + const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (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 )) ); + + 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 + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_ActiveTextureARB(GLbyte * pc) +{ + CALL_ActiveTextureARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 8 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc) +{ + CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 16 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc) +{ + CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 24 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc) +{ + CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 32 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc) +{ + CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc) +{ + CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc) +{ + CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_SampleCoverageARB(GLbyte * pc) +{ + CALL_SampleCoverageARB( GET_DISPATCH(), ( + (GLclampf)bswap_FLOAT32( pc + 0 ), + *(GLboolean *)(pc + 4) + ) ); +} + +void __glXDispSwap_DrawBuffersARB(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DrawBuffersARB( GET_DISPATCH(), ( + n, + (const GLenum *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ +#ifdef NXAGENT_SERVER + return BadAlloc; +#else + 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 n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResidentEXT( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + residences + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +#endif +} + +int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ +#ifdef NXAGENT_SERVER + return BadAlloc; +#else + 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 n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTexturesEXT( GET_DISPATCH(), ( + n, + textures + ) ); + (void) bswap_32_array( (uint32_t *) textures, n ); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +#endif +} + +int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ +#ifdef NXAGENT_SERVER + return BadAlloc; +#else + 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_IsTextureEXT( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +#endif +} + +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_PointParameterfEXT(GLbyte * pc) +{ + CALL_PointParameterfEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLfloat )bswap_FLOAT32( pc + 4 ) + ) ); +} + +void __glXDispSwap_PointParameterfvEXT(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLfloat * params; + + params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfvEXT_size(pname) ); + + CALL_PointParameterfvEXT( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc) +{ + CALL_WindowPos3fvMESA( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc) +{ + CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLenum )bswap_ENUM ( pc + 12 ) + ) ); +} + +void __glXDispSwap_FogCoordfvEXT(GLbyte * pc) +{ + CALL_FogCoordfvEXT( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_FogCoorddvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_FogCoorddvEXT( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); + + CALL_CompressedTexImage3DARB( 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) + ) ); +} + +void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 24 ); + + CALL_CompressedTexImage2DARB( 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) + ) ); +} + +void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); + + CALL_CompressedTexImage1DARB( 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) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 36 ); + + CALL_CompressedTexSubImage3DARB( 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) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); + + CALL_CompressedTexSubImage2DARB( 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) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); + + CALL_CompressedTexSubImage1DARB( 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) + ) ); +} + +void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( + (const GLbyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 24); + pc -= 4; + } +#endif + + CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( + (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc) +{ + CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( + (const GLubyte *)(pc + 0) + ) ); +} + +void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc) +{ + CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc) +{ + CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) + ) ); +} + +int __glXDispSwap_AreProgramsResidentNV(__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 n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + 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_BindProgramNV(GLbyte * pc) +{ + CALL_BindProgramNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_DeleteProgramsNV(__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 n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteProgramsNV( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + 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_GenProgramsNV(__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 n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenProgramsNV( GET_DISPATCH(), ( + n, + programs + ) ); + (void) bswap_32_array( (uint32_t *) programs, n ); + __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +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_GetVertexAttribdvARB(__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 = __glGetVertexAttribdvARB_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvARB( 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_GetVertexAttribfvARB(__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 = __glGetVertexAttribfvARB_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvARB( 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_GetVertexAttribivARB(__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 = __glGetVertexAttribivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivARB( 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_IsProgramNV(__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_IsProgramNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_LoadProgramNV(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_ProgramParameter4dvNV(GLbyte * pc) +{ +#ifndef NXAGENT_SERVER +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) + ) ); +#endif +} + +void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc) +{ +#ifndef NXAGENT_SERVER + CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +#endif +} + +void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc) +{ + const GLuint num = (GLuint )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 ) + ) ); +} + +void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc) +{ + const GLuint num = (GLuint )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 ) + ) ); +} + +void __glXDispSwap_RequestResidentProgramsNV(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 ) + ) ); +} + +void __glXDispSwap_TrackMatrixNV(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 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 8 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) +{ + CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc) +{ + CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 16 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) +{ + CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc) +{ + CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 24 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) +{ + CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc) +{ + CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 32 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) +{ + CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc) +{ + CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc) +{ + 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); + pc -= 4; + } +#endif + + CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc) +{ + 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); + pc -= 4; + } +#endif + + CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc) +{ + 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); + pc -= 4; + } +#endif + + CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + n, + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc) +{ + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc) +{ + 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); + 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_PointParameteriNV(GLbyte * pc) +{ + CALL_PointParameteriNV( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_PointParameterivNV(GLbyte * pc) +{ + const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); + const GLint * params; + + params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterivNV_size(pname) ); + + CALL_PointParameterivNV( GET_DISPATCH(), ( + pname, + params + ) ); +} + +void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc) +{ + CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc) +{ + CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc) +{ + CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc) +{ + CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc) +{ + CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_ProgramStringARB(GLbyte * pc) +{ + 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) + ) ); +} + +void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +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 ) + ) ); +} + +void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +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 ) + ) ); +} + +int __glXDispSwap_GetProgramEnvParameterdvARB(__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_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( + (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; + } + + return error; +} + +int __glXDispSwap_GetProgramEnvParameterfvARB(__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_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( + (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; + } + + return error; +} + +int __glXDispSwap_GetProgramLocalParameterdvARB(__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_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( + (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; + } + + return error; +} + +int __glXDispSwap_GetProgramLocalParameterfvARB(__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_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( + (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; + } + + return error; +} + +int __glXDispSwap_GetProgramivARB(__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 = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + 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 ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc) +{ + const GLsizei len = (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 ) + ) ); +} + +void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( 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 )bswap_CARD32 ( pc + 32 ), + len, + (const GLubyte *)(pc + 40), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); +} + +int __glXDispSwap_GetProgramNamedParameterfvNV(__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 ); + + 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; +} + +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; +} + +int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + GLuint answerBuffer[200]; + GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenQueriesARB( GET_DISPATCH(), ( + n, + ids + ) ); + (void) bswap_32_array( (uint32_t *) ids, n ); + __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + CALL_DeleteQueriesARB( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsQueryARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_BeginQueryARB(GLbyte * pc) +{ + CALL_BeginQueryARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_EndQueryARB(GLbyte * pc) +{ + CALL_EndQueryARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetQueryivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryivARB( GET_DISPATCH(), ( + (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; + } + + return error; +} + +int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetQueryObjectivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectivARB( 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_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int 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 ); + + const GLuint compsize = __glGetQueryObjectuivARB_size(pname); + GLuint answerBuffer[200]; + GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectuivARB( 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_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); + error = Success; + } + + return error; +} + +void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) +{ + CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc) +{ + CALL_VertexAttrib1svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) +{ + CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc) +{ + CALL_VertexAttrib2svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) +{ + CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc) +{ + CALL_VertexAttrib3svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + 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 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) +{ + CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc) +{ + CALL_VertexAttrib4svNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) +{ + CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +int __glXDispSwap_IsRenderbufferEXT(__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_IsRenderbufferEXT( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc) +{ + CALL_BindRenderbufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +int __glXDispSwap_GenRenderbuffersEXT(__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 n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( + n, + renderbuffers + ) ); + (void) bswap_32_array( (uint32_t *) renderbuffers, n ); + __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc) +{ + CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ) + ) ); +} + +int __glXDispSwap_GetRenderbufferParameterivEXT(__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_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( + (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; + } + + return error; +} + +int __glXDispSwap_IsFramebufferEXT(__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_IsFramebufferEXT( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_BindFramebufferEXT(GLbyte * pc) +{ + CALL_BindFramebufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + +int __glXDispSwap_GenFramebuffersEXT(__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 n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenFramebuffersEXT( GET_DISPATCH(), ( + n, + framebuffers + ) ); + (void) bswap_32_array( (uint32_t *) framebuffers, n ); + __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_CheckFramebufferStatusEXT(__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 ) { + GLenum retval; + retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture1DEXT( 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 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture2DEXT( 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 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture3DEXT( 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 ) + ) ); +} + +void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc) +{ + CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ) + ) ); +} + +int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__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_GetFramebufferAttachmentParameterivEXT( 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 ); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc) +{ + CALL_GenerateMipmapEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_reqsize.c b/nx-X11/programs/Xserver/GL/glx/indirect_reqsize.c new file mode 100644 index 0000000000..3906bd11d7 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_reqsize.c @@ -0,0 +1,838 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#include +#include "glxserver.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" + +#if defined(linux) +# include +# define SWAP_32(v) do { (v) = bswap_32(v); } while(0) +#else +# define SWAP_32(v) do { char tmp; swapl(&v, tmp); } while(0) +#endif + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +#if defined(__CYGWIN__) || defined(__MINGW32__) +# undef HAVE_ALIAS +#endif +#ifdef HAVE_ALIAS +# define ALIAS2(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + __attribute__ ((alias( # to ))); +# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) +#else +# define ALIAS(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + { return __glX ## to ## ReqSize( pc, swap ); } +#endif + + +int +__glXCallListsReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 0); + GLenum type = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( n ); + SWAP_32( type ); + } + + compsize = __glCallLists_size(type); + return __GLX_PAD((compsize * n)); +} + +int +__glXBitmapReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLsizei width = *(GLsizei *)(pc + 20); + GLsizei height = *(GLsizei *)(pc + 24); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( width ); + SWAP_32( height ); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXFogfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 0); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glFogfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glLightfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightModelfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 0); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glLightModelfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXMaterialfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glMaterialfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPolygonStippleReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexParameterfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glTexParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage1DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 32); + GLenum format = * (GLenum *)(pc + 44); + GLenum type = * (GLenum *)(pc + 48); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexImage2DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 32); + GLsizei height = *(GLsizei *)(pc + 36); + GLenum format = * (GLenum *)(pc + 44); + GLenum type = * (GLenum *)(pc + 48); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( height ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexEnvfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glTexEnvfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexGendvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glTexGendv_size(pname); + return __GLX_PAD((compsize * 8)); +} + +int +__glXTexGenfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glTexGenfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPixelMapfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei mapsize = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( mapsize ); + } + + return __GLX_PAD((mapsize * 4)); +} + +int +__glXPixelMapusvReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei mapsize = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( mapsize ); + } + + return __GLX_PAD((mapsize * 2)); +} + +int +__glXDrawPixelsReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLsizei width = *(GLsizei *)(pc + 20); + GLsizei height = *(GLsizei *)(pc + 24); + GLenum format = * (GLenum *)(pc + 28); + GLenum type = * (GLenum *)(pc + 32); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( width ); + SWAP_32( height ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXPrioritizeTexturesReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 0); + + if (swap) { + SWAP_32( n ); + } + + return __GLX_PAD((n * 4) + (n * 4)); +} + +int +__glXTexSubImage1DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 36); + GLenum format = * (GLenum *)(pc + 44); + GLenum type = * (GLenum *)(pc + 48); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage2DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 36); + GLsizei height = *(GLsizei *)(pc + 40); + GLenum format = * (GLenum *)(pc + 44); + GLenum type = * (GLenum *)(pc + 48); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( height ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 28); + GLenum format = * (GLenum *)(pc + 32); + GLenum type = * (GLenum *)(pc + 36); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableParameterfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glColorTableParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXColorSubTableReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei count = *(GLsizei *)(pc + 28); + GLenum format = * (GLenum *)(pc + 32); + GLenum type = * (GLenum *)(pc + 36); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( count ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, count, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter1DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 28); + GLenum format = * (GLenum *)(pc + 36); + GLenum type = * (GLenum *)(pc + 40); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter2DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 28); + GLsizei height = *(GLsizei *)(pc + 32); + GLenum format = * (GLenum *)(pc + 36); + GLenum type = * (GLenum *)(pc + 40); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( skip_rows ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( height ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionParameterfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glConvolutionParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage3DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = * (GLint *)(pc + 8); + GLint skip_rows = * (GLint *)(pc + 16); + GLint skip_images = * (GLint *)(pc + 20); + GLint alignment = * (GLint *)(pc + 32); + GLenum target = * (GLenum *)(pc + 36); + GLsizei width = *(GLsizei *)(pc + 48); + GLsizei height = *(GLsizei *)(pc + 52); + GLsizei depth = *(GLsizei *)(pc + 56); + GLenum format = * (GLenum *)(pc + 68); + GLenum type = * (GLenum *)(pc + 72); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( image_height ); + SWAP_32( skip_rows ); + SWAP_32( skip_images ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( height ); + SWAP_32( depth ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage3DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = * (GLint *)(pc + 8); + GLint skip_rows = * (GLint *)(pc + 16); + GLint skip_images = * (GLint *)(pc + 20); + GLint alignment = * (GLint *)(pc + 32); + GLenum target = * (GLenum *)(pc + 36); + GLsizei width = *(GLsizei *)(pc + 60); + GLsizei height = *(GLsizei *)(pc + 64); + GLsizei depth = *(GLsizei *)(pc + 68); + GLenum format = * (GLenum *)(pc + 76); + GLenum type = * (GLenum *)(pc + 80); + + if (swap) { + SWAP_32( row_length ); + SWAP_32( image_height ); + SWAP_32( skip_rows ); + SWAP_32( skip_images ); + SWAP_32( alignment ); + SWAP_32( target ); + SWAP_32( width ); + SWAP_32( height ); + SWAP_32( depth ); + SWAP_32( format ); + SWAP_32( type ); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXDrawBuffersARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 0); + + if (swap) { + SWAP_32( n ); + } + + return __GLX_PAD((n * 4)); +} + +int +__glXPointParameterfvEXTReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 0); + GLsizei compsize; + + if (swap) { + SWAP_32( pname ); + } + + compsize = __glPointParameterfvEXT_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXCompressedTexImage3DARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei imageSize = *(GLsizei *)(pc + 28); + + if (swap) { + SWAP_32( imageSize ); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexImage2DARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei imageSize = *(GLsizei *)(pc + 24); + + if (swap) { + SWAP_32( imageSize ); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexImage1DARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei imageSize = *(GLsizei *)(pc + 20); + + if (swap) { + SWAP_32( imageSize ); + } + + return __GLX_PAD(imageSize); +} + +int +__glXCompressedTexSubImage3DARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei imageSize = *(GLsizei *)(pc + 36); + + if (swap) { + SWAP_32( imageSize ); + } + + return __GLX_PAD(imageSize); +} + +int +__glXLoadProgramNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei len = *(GLsizei *)(pc + 8); + + if (swap) { + SWAP_32( len ); + } + + return __GLX_PAD(len); +} + +int +__glXProgramParameters4dvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLuint num = * (GLuint *)(pc + 8); + + if (swap) { + SWAP_32( num ); + } + + return __GLX_PAD((num * 32)); +} + +int +__glXProgramParameters4fvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLuint num = * (GLuint *)(pc + 8); + + if (swap) { + SWAP_32( num ); + } + + return __GLX_PAD((num * 16)); +} + +int +__glXVertexAttribs1dvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( n ); + } + + return __GLX_PAD((n * 8)); +} + +int +__glXVertexAttribs2dvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( n ); + } + + return __GLX_PAD((n * 16)); +} + +int +__glXVertexAttribs3dvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( n ); + } + + return __GLX_PAD((n * 24)); +} + +int +__glXVertexAttribs3fvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( n ); + } + + return __GLX_PAD((n * 12)); +} + +int +__glXVertexAttribs3svNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( n ); + } + + return __GLX_PAD((n * 6)); +} + +int +__glXVertexAttribs4dvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( n ); + } + + return __GLX_PAD((n * 32)); +} + +int +__glXProgramNamedParameter4fvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei len = *(GLsizei *)(pc + 4); + + if (swap) { + SWAP_32( len ); + } + + return __GLX_PAD(len); +} + +ALIAS( Fogiv, Fogfv ) +ALIAS( Lightiv, Lightfv ) +ALIAS( LightModeliv, LightModelfv ) +ALIAS( Materialiv, Materialfv ) +ALIAS( TexParameteriv, TexParameterfv ) +ALIAS( TexEnviv, TexEnvfv ) +ALIAS( TexGeniv, TexGenfv ) +ALIAS( PixelMapuiv, PixelMapfv ) +ALIAS( ColorTableParameteriv, ColorTableParameterfv ) +ALIAS( ConvolutionParameteriv, ConvolutionParameterfv ) +ALIAS( CompressedTexSubImage2DARB, CompressedTexImage3DARB ) +ALIAS( CompressedTexSubImage1DARB, CompressedTexImage1DARB ) +ALIAS( RequestResidentProgramsNV, DrawBuffersARB ) +ALIAS( VertexAttribs1fvNV, PixelMapfv ) +ALIAS( VertexAttribs1svNV, PixelMapusv ) +ALIAS( VertexAttribs2fvNV, VertexAttribs1dvNV ) +ALIAS( VertexAttribs2svNV, PixelMapfv ) +ALIAS( VertexAttribs4fvNV, VertexAttribs2dvNV ) +ALIAS( VertexAttribs4svNV, VertexAttribs1dvNV ) +ALIAS( VertexAttribs4ubvNV, PixelMapfv ) +ALIAS( PointParameterivNV, PointParameterfvEXT ) +ALIAS( ProgramStringARB, LoadProgramNV ) +ALIAS( ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB ) +ALIAS( DeleteRenderbuffersEXT, DrawBuffersARB ) +ALIAS( DeleteFramebuffersEXT, DrawBuffersARB ) diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_reqsize.h b/nx-X11/programs/Xserver/GL/glx/indirect_reqsize.h new file mode 100644 index 0000000000..2ea3089e60 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_reqsize.h @@ -0,0 +1,121 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_REQSIZE_H_ ) +# define _INDIRECT_REQSIZE_H_ + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define HIDDEN __attribute__((visibility("hidden"))) +# else +# define HIDDEN +# endif + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap, int reqlen); +extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap, int reqlen); +extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap, int reqlen); +extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap, int reqlen); +extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap, int reqlen); +extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap); + +# undef HIDDEN +# undef PURE + +#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */ diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_size_get.c b/nx-X11/programs/Xserver/GL/glx/indirect_size_get.c new file mode 100644 index 0000000000..85b5cfba6b --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_size_get.c @@ -0,0 +1,1163 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#include +#include "indirect_size_get.h" +#include "glxserver.h" +#include "indirect_util.h" +#include "indirect_size.h" + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + + +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) +# undef HAVE_ALIAS +#endif +#ifdef HAVE_ALIAS +# define ALIAS2(from,to) \ + INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + __attribute__ ((alias( # to ))); +# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) +#else +# define ALIAS(from,to) \ + INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + { return __gl ## to ## _size( e ); } +#endif + + +INTERNAL PURE FASTCALL GLint +__glCallLists_size( GLenum e ) +{ + switch( e ) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + return 1; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + return 2; + case GL_3_BYTES: + return 3; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + case GL_4_BYTES: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glFogfv_size( GLenum e ) +{ + switch( e ) { + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_FOG_OFFSET_VALUE_SGIX: + case GL_FOG_DISTANCE_MODE_NV: + return 1; + case GL_FOG_COLOR: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glLightfv_size( GLenum e ) +{ + switch( e ) { + case GL_SPOT_EXPONENT: + case GL_SPOT_CUTOFF: + case GL_CONSTANT_ATTENUATION: + case GL_LINEAR_ATTENUATION: + case GL_QUADRATIC_ATTENUATION: + return 1; + case GL_SPOT_DIRECTION: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_POSITION: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glLightModelfv_size( GLenum e ) +{ + switch( e ) { + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_LIGHT_MODEL_COLOR_CONTROL: +/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ + return 1; + case GL_LIGHT_MODEL_AMBIENT: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMaterialfv_size( GLenum e ) +{ + switch( e ) { + case GL_SHININESS: + return 1; + case GL_COLOR_INDEXES: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_EMISSION: + case GL_AMBIENT_AND_DIFFUSE: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexEnvfv_size( GLenum e ) +{ + switch( e ) { + case GL_ALPHA_SCALE: + case GL_TEXTURE_ENV_MODE: + case GL_TEXTURE_LOD_BIAS: + case GL_COMBINE_RGB: + case GL_COMBINE_ALPHA: + case GL_RGB_SCALE: + case GL_SOURCE0_RGB: + case GL_SOURCE1_RGB: + case GL_SOURCE2_RGB: + case GL_SOURCE3_RGB_NV: + case GL_SOURCE0_ALPHA: + case GL_SOURCE1_ALPHA: + case GL_SOURCE2_ALPHA: + case GL_SOURCE3_ALPHA_NV: + case GL_OPERAND0_RGB: + case GL_OPERAND1_RGB: + case GL_OPERAND2_RGB: + case GL_OPERAND3_RGB_NV: + case GL_OPERAND0_ALPHA: + case GL_OPERAND1_ALPHA: + case GL_OPERAND2_ALPHA: + case GL_OPERAND3_ALPHA_NV: + case GL_COORD_REPLACE_ARB: +/* case GL_COORD_REPLACE_NV:*/ + return 1; + case GL_TEXTURE_ENV_COLOR: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexGendv_size( GLenum e ) +{ + switch( e ) { + case GL_TEXTURE_GEN_MODE: + return 1; + case GL_OBJECT_PLANE: + case GL_EYE_PLANE: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMap1d_size( GLenum e ) +{ + switch( e ) { + case GL_MAP1_INDEX: + case GL_MAP1_TEXTURE_COORD_1: + return 1; + case GL_MAP1_TEXTURE_COORD_2: + return 2; + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_VERTEX_3: + return 3; + case GL_MAP1_COLOR_4: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_4: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMap2d_size( GLenum e ) +{ + switch( e ) { + case GL_MAP2_INDEX: + case GL_MAP2_TEXTURE_COORD_1: + return 1; + case GL_MAP2_TEXTURE_COORD_2: + return 2; + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_VERTEX_3: + return 3; + case GL_MAP2_COLOR_4: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_4: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetBooleanv_size( GLenum e ) +{ + switch( e ) { + case GL_CURRENT_INDEX: + case GL_CURRENT_RASTER_INDEX: + case GL_CURRENT_RASTER_POSITION_VALID: + case GL_CURRENT_RASTER_DISTANCE: + case GL_POINT_SMOOTH: + case GL_POINT_SIZE: + case GL_SMOOTH_POINT_SIZE_GRANULARITY: + case GL_LINE_SMOOTH: + case GL_LINE_WIDTH: + case GL_LINE_WIDTH_GRANULARITY: + case GL_LINE_STIPPLE: + case GL_LINE_STIPPLE_PATTERN: + case GL_LINE_STIPPLE_REPEAT: + case GL_LIST_MODE: + case GL_MAX_LIST_NESTING: + case GL_LIST_BASE: + case GL_LIST_INDEX: + case GL_POLYGON_SMOOTH: + case GL_POLYGON_STIPPLE: + case GL_EDGE_FLAG: + case GL_CULL_FACE: + case GL_CULL_FACE_MODE: + case GL_FRONT_FACE: + case GL_LIGHTING: + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_SHADE_MODEL: + case GL_COLOR_MATERIAL_FACE: + case GL_COLOR_MATERIAL_PARAMETER: + case GL_COLOR_MATERIAL: + case GL_FOG: + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_DEPTH_TEST: + case GL_DEPTH_WRITEMASK: + case GL_DEPTH_CLEAR_VALUE: + case GL_DEPTH_FUNC: + case GL_STENCIL_TEST: + case GL_STENCIL_CLEAR_VALUE: + case GL_STENCIL_FUNC: + case GL_STENCIL_VALUE_MASK: + case GL_STENCIL_FAIL: + case GL_STENCIL_PASS_DEPTH_FAIL: + case GL_STENCIL_PASS_DEPTH_PASS: + case GL_STENCIL_REF: + case GL_STENCIL_WRITEMASK: + case GL_MATRIX_MODE: + case GL_NORMALIZE: + case GL_MODELVIEW_STACK_DEPTH: + case GL_PROJECTION_STACK_DEPTH: + case GL_TEXTURE_STACK_DEPTH: + case GL_ATTRIB_STACK_DEPTH: + case GL_ALPHA_TEST: + case GL_ALPHA_TEST_FUNC: + case GL_ALPHA_TEST_REF: + case GL_DITHER: + case GL_BLEND_DST: + case GL_BLEND_SRC: + case GL_BLEND: + case GL_LOGIC_OP_MODE: + case GL_LOGIC_OP: + case GL_AUX_BUFFERS: + case GL_DRAW_BUFFER: + case GL_READ_BUFFER: + case GL_SCISSOR_TEST: + case GL_INDEX_CLEAR_VALUE: + case GL_INDEX_WRITEMASK: + case GL_INDEX_MODE: + case GL_RGBA_MODE: + case GL_DOUBLEBUFFER: + case GL_STEREO: + case GL_RENDER_MODE: + case GL_PERSPECTIVE_CORRECTION_HINT: + case GL_POINT_SMOOTH_HINT: + case GL_LINE_SMOOTH_HINT: + case GL_POLYGON_SMOOTH_HINT: + case GL_FOG_HINT: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_Q: + case GL_PIXEL_MAP_I_TO_I: + case GL_PIXEL_MAP_I_TO_I_SIZE: + case GL_PIXEL_MAP_S_TO_S_SIZE: + case GL_PIXEL_MAP_I_TO_R_SIZE: + case GL_PIXEL_MAP_I_TO_G_SIZE: + case GL_PIXEL_MAP_I_TO_B_SIZE: + case GL_PIXEL_MAP_I_TO_A_SIZE: + case GL_PIXEL_MAP_R_TO_R_SIZE: + case GL_PIXEL_MAP_G_TO_G_SIZE: + case GL_PIXEL_MAP_B_TO_B_SIZE: + case GL_PIXEL_MAP_A_TO_A_SIZE: + case GL_UNPACK_SWAP_BYTES: + case GL_UNPACK_LSB_FIRST: + case GL_UNPACK_ROW_LENGTH: + case GL_UNPACK_SKIP_ROWS: + case GL_UNPACK_SKIP_PIXELS: + case GL_UNPACK_ALIGNMENT: + case GL_PACK_SWAP_BYTES: + case GL_PACK_LSB_FIRST: + case GL_PACK_ROW_LENGTH: + case GL_PACK_SKIP_ROWS: + case GL_PACK_SKIP_PIXELS: + case GL_PACK_ALIGNMENT: + case GL_MAP_COLOR: + case GL_MAP_STENCIL: + case GL_INDEX_SHIFT: + case GL_INDEX_OFFSET: + case GL_RED_SCALE: + case GL_RED_BIAS: + case GL_ZOOM_X: + case GL_ZOOM_Y: + case GL_GREEN_SCALE: + case GL_GREEN_BIAS: + case GL_BLUE_SCALE: + case GL_BLUE_BIAS: + case GL_ALPHA_SCALE: + case GL_ALPHA_BIAS: + case GL_DEPTH_SCALE: + case GL_DEPTH_BIAS: + case GL_MAX_EVAL_ORDER: + case GL_MAX_LIGHTS: + case GL_MAX_CLIP_PLANES: + case GL_MAX_TEXTURE_SIZE: + case GL_MAX_PIXEL_MAP_TABLE: + case GL_MAX_ATTRIB_STACK_DEPTH: + case GL_MAX_MODELVIEW_STACK_DEPTH: + case GL_MAX_NAME_STACK_DEPTH: + case GL_MAX_PROJECTION_STACK_DEPTH: + case GL_MAX_TEXTURE_STACK_DEPTH: + case GL_SUBPIXEL_BITS: + case GL_INDEX_BITS: + case GL_RED_BITS: + case GL_GREEN_BITS: + case GL_BLUE_BITS: + case GL_ALPHA_BITS: + case GL_DEPTH_BITS: + case GL_STENCIL_BITS: + case GL_ACCUM_RED_BITS: + case GL_ACCUM_GREEN_BITS: + case GL_ACCUM_BLUE_BITS: + case GL_ACCUM_ALPHA_BITS: + case GL_NAME_STACK_DEPTH: + case GL_AUTO_NORMAL: + case GL_MAP1_COLOR_4: + case GL_MAP1_INDEX: + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_4: + case GL_MAP2_COLOR_4: + case GL_MAP2_INDEX: + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_4: + case GL_MAP1_GRID_SEGMENTS: + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_POLYGON_OFFSET_UNITS: + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + case GL_BLEND_EQUATION: +/* case GL_BLEND_EQUATION_EXT:*/ + case GL_CONVOLUTION_1D: + case GL_CONVOLUTION_2D: + case GL_SEPARABLE_2D: + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + case GL_POST_CONVOLUTION_RED_SCALE: +/* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_SCALE: +/* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_SCALE: +/* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_SCALE: +/* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_RED_BIAS: +/* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_BIAS: +/* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_BIAS: +/* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_BIAS: +/* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ + case GL_HISTOGRAM: + case GL_MINMAX: + case GL_POLYGON_OFFSET_FACTOR: + case GL_RESCALE_NORMAL: +/* case GL_RESCALE_NORMAL_EXT:*/ + case GL_TEXTURE_BINDING_1D: + case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_3D: + case GL_PACK_SKIP_IMAGES: + case GL_PACK_IMAGE_HEIGHT: + case GL_UNPACK_SKIP_IMAGES: + case GL_UNPACK_IMAGE_HEIGHT: + case GL_TEXTURE_3D: + case GL_VERTEX_ARRAY: + case GL_NORMAL_ARRAY: + case GL_COLOR_ARRAY: + case GL_INDEX_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + case GL_EDGE_FLAG_ARRAY: + case GL_VERTEX_ARRAY_SIZE: + case GL_VERTEX_ARRAY_TYPE: + case GL_VERTEX_ARRAY_STRIDE: + case GL_NORMAL_ARRAY_TYPE: + case GL_NORMAL_ARRAY_STRIDE: + case GL_COLOR_ARRAY_SIZE: + case GL_COLOR_ARRAY_TYPE: + case GL_COLOR_ARRAY_STRIDE: + case GL_INDEX_ARRAY_TYPE: + case GL_INDEX_ARRAY_STRIDE: + case GL_TEXTURE_COORD_ARRAY_SIZE: + case GL_TEXTURE_COORD_ARRAY_TYPE: + case GL_TEXTURE_COORD_ARRAY_STRIDE: + case GL_EDGE_FLAG_ARRAY_STRIDE: + case GL_MULTISAMPLE: +/* case GL_MULTISAMPLE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_COVERAGE: +/* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_ONE: +/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ + case GL_SAMPLE_COVERAGE: +/* case GL_SAMPLE_COVERAGE_ARB:*/ + case GL_SAMPLE_BUFFERS: +/* case GL_SAMPLE_BUFFERS_ARB:*/ + case GL_SAMPLES: +/* case GL_SAMPLES_ARB:*/ + case GL_SAMPLE_COVERAGE_VALUE: +/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ + case GL_SAMPLE_COVERAGE_INVERT: +/* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ + case GL_COLOR_MATRIX_STACK_DEPTH: + case GL_MAX_COLOR_MATRIX_STACK_DEPTH: + case GL_POST_COLOR_MATRIX_RED_SCALE: + case GL_POST_COLOR_MATRIX_GREEN_SCALE: + case GL_POST_COLOR_MATRIX_BLUE_SCALE: + case GL_POST_COLOR_MATRIX_ALPHA_SCALE: + case GL_POST_COLOR_MATRIX_RED_BIAS: + case GL_POST_COLOR_MATRIX_GREEN_BIAS: + case GL_POST_COLOR_MATRIX_BLUE_BIAS: + case GL_POST_COLOR_MATRIX_ALPHA_BIAS: + case GL_BLEND_DST_RGB: + case GL_BLEND_SRC_RGB: + case GL_BLEND_DST_ALPHA: + case GL_BLEND_SRC_ALPHA: + case GL_COLOR_TABLE: + case GL_POST_CONVOLUTION_COLOR_TABLE: + case GL_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_MAX_ELEMENTS_VERTICES: + case GL_MAX_ELEMENTS_INDICES: + case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: + case GL_OCCLUSION_TEST_HP: + case GL_OCCLUSION_TEST_RESULT_HP: + case GL_LIGHT_MODEL_COLOR_CONTROL: + case GL_CURRENT_FOG_COORD: + case GL_FOG_COORDINATE_ARRAY_TYPE: + case GL_FOG_COORDINATE_ARRAY_STRIDE: + case GL_FOG_COORD_ARRAY: + case GL_COLOR_SUM_ARB: + case GL_SECONDARY_COLOR_ARRAY_SIZE: + case GL_SECONDARY_COLOR_ARRAY_TYPE: + case GL_SECONDARY_COLOR_ARRAY_STRIDE: + case GL_SECONDARY_COLOR_ARRAY: + case GL_ACTIVE_TEXTURE: +/* case GL_ACTIVE_TEXTURE_ARB:*/ + case GL_CLIENT_ACTIVE_TEXTURE: +/* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ + case GL_MAX_TEXTURE_UNITS: +/* case GL_MAX_TEXTURE_UNITS_ARB:*/ + case GL_TEXTURE_COMPRESSION_HINT: +/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ + case GL_TEXTURE_RECTANGLE_ARB: +/* case GL_TEXTURE_RECTANGLE_NV:*/ + case GL_TEXTURE_BINDING_RECTANGLE_ARB: +/* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ + case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: +/* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ + case GL_MAX_TEXTURE_LOD_BIAS: + case GL_MAX_SHININESS_NV: + case GL_MAX_SPOT_EXPONENT_NV: + case GL_TEXTURE_CUBE_MAP: +/* case GL_TEXTURE_CUBE_MAP_ARB:*/ + case GL_TEXTURE_BINDING_CUBE_MAP: +/* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ + case GL_MAX_CUBE_MAP_TEXTURE_SIZE: +/* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ + case GL_MULTISAMPLE_FILTER_HINT_NV: + case GL_FOG_DISTANCE_MODE_NV: + case GL_VERTEX_PROGRAM_ARB: + case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: + case GL_MAX_PROGRAM_MATRICES_ARB: + case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: + case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: + case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: + case GL_PROGRAM_ERROR_POSITION_ARB: + case GL_DEPTH_CLAMP_NV: + case GL_NUM_COMPRESSED_TEXTURE_FORMATS: +/* case GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB:*/ + case GL_MAX_VERTEX_UNITS_ARB: + case GL_ACTIVE_VERTEX_UNITS_ARB: + case GL_WEIGHT_SUM_UNITY_ARB: + case GL_VERTEX_BLEND_ARB: + case GL_CURRENT_WEIGHT_ARB: + case GL_WEIGHT_ARRAY_TYPE_ARB: + case GL_WEIGHT_ARRAY_STRIDE_ARB: + case GL_WEIGHT_ARRAY_SIZE_ARB: + case GL_WEIGHT_ARRAY_ARB: + case GL_PACK_INVERT_MESA: + case GL_FRAGMENT_PROGRAM_ARB: + case GL_MAX_DRAW_BUFFERS_ARB: +/* case GL_MAX_DRAW_BUFFERS_ATI:*/ + case GL_DRAW_BUFFER0_ARB: +/* case GL_DRAW_BUFFER0_ATI:*/ + case GL_DRAW_BUFFER1_ARB: +/* case GL_DRAW_BUFFER1_ATI:*/ + case GL_DRAW_BUFFER2_ARB: +/* case GL_DRAW_BUFFER2_ATI:*/ + case GL_DRAW_BUFFER3_ARB: +/* case GL_DRAW_BUFFER3_ATI:*/ + case GL_DRAW_BUFFER4_ARB: +/* case GL_DRAW_BUFFER4_ATI:*/ + case GL_DRAW_BUFFER5_ARB: +/* case GL_DRAW_BUFFER5_ATI:*/ + case GL_DRAW_BUFFER6_ARB: +/* case GL_DRAW_BUFFER6_ATI:*/ + case GL_DRAW_BUFFER7_ARB: +/* case GL_DRAW_BUFFER7_ATI:*/ + case GL_DRAW_BUFFER8_ARB: +/* case GL_DRAW_BUFFER8_ATI:*/ + case GL_DRAW_BUFFER9_ARB: +/* case GL_DRAW_BUFFER9_ATI:*/ + case GL_DRAW_BUFFER10_ARB: +/* case GL_DRAW_BUFFER10_ATI:*/ + case GL_DRAW_BUFFER11_ARB: +/* case GL_DRAW_BUFFER11_ATI:*/ + case GL_DRAW_BUFFER12_ARB: +/* case GL_DRAW_BUFFER12_ATI:*/ + case GL_DRAW_BUFFER13_ARB: +/* case GL_DRAW_BUFFER13_ATI:*/ + case GL_DRAW_BUFFER14_ARB: +/* case GL_DRAW_BUFFER14_ATI:*/ + case GL_DRAW_BUFFER15_ARB: +/* case GL_DRAW_BUFFER15_ATI:*/ + case GL_BLEND_EQUATION_ALPHA_EXT: + case GL_MATRIX_PALETTE_ARB: + case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: + case GL_MAX_PALETTE_MATRICES_ARB: + case GL_CURRENT_PALETTE_MATRIX_ARB: + case GL_MATRIX_INDEX_ARRAY_ARB: + case GL_CURRENT_MATRIX_INDEX_ARB: + case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: + case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: + case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: + case GL_POINT_SPRITE_ARB: +/* case GL_POINT_SPRITE_NV:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_MAX_VERTEX_ATTRIBS_ARB: + case GL_DEPTH_BOUNDS_TEST_EXT: + case GL_STENCIL_TEST_TWO_SIDE_EXT: + case GL_ACTIVE_STENCIL_FACE_EXT: + case GL_RASTER_POSITION_UNCLIPPED_IBM: + return 1; + case GL_SMOOTH_POINT_SIZE_RANGE: + case GL_LINE_WIDTH_RANGE: + case GL_POLYGON_MODE: + case GL_DEPTH_RANGE: + case GL_MAX_VIEWPORT_DIMS: + case GL_MAP1_GRID_DOMAIN: + case GL_MAP2_GRID_SEGMENTS: + case GL_ALIASED_POINT_SIZE_RANGE: + case GL_ALIASED_LINE_WIDTH_RANGE: + case GL_DEPTH_BOUNDS_EXT: + return 2; + case GL_CURRENT_NORMAL: + return 3; + case GL_CURRENT_COLOR: + case GL_CURRENT_TEXTURE_COORDS: + case GL_CURRENT_RASTER_COLOR: + case GL_CURRENT_RASTER_TEXTURE_COORDS: + case GL_CURRENT_RASTER_POSITION: + case GL_LIGHT_MODEL_AMBIENT: + case GL_FOG_COLOR: + case GL_ACCUM_CLEAR_VALUE: + case GL_VIEWPORT: + case GL_SCISSOR_BOX: + case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_WRITEMASK: + case GL_MAP2_GRID_DOMAIN: + case GL_BLEND_COLOR: +/* case GL_BLEND_COLOR_EXT:*/ + case GL_CURRENT_SECONDARY_COLOR: + return 4; + case GL_MODELVIEW_MATRIX: + case GL_PROJECTION_MATRIX: + case GL_TEXTURE_MATRIX: + case GL_MODELVIEW0_ARB: + case GL_COLOR_MATRIX: + case GL_MODELVIEW1_ARB: + case GL_CURRENT_MATRIX_ARB: + case GL_MODELVIEW2_ARB: + case GL_MODELVIEW3_ARB: + case GL_MODELVIEW4_ARB: + case GL_MODELVIEW5_ARB: + case GL_MODELVIEW6_ARB: + case GL_MODELVIEW7_ARB: + case GL_MODELVIEW8_ARB: + case GL_MODELVIEW9_ARB: + case GL_MODELVIEW10_ARB: + case GL_MODELVIEW11_ARB: + case GL_MODELVIEW12_ARB: + case GL_MODELVIEW13_ARB: + case GL_MODELVIEW14_ARB: + case GL_MODELVIEW15_ARB: + case GL_MODELVIEW16_ARB: + case GL_MODELVIEW17_ARB: + case GL_MODELVIEW18_ARB: + case GL_MODELVIEW19_ARB: + case GL_MODELVIEW20_ARB: + case GL_MODELVIEW21_ARB: + case GL_MODELVIEW22_ARB: + case GL_MODELVIEW23_ARB: + case GL_MODELVIEW24_ARB: + case GL_MODELVIEW25_ARB: + case GL_MODELVIEW26_ARB: + case GL_MODELVIEW27_ARB: + case GL_MODELVIEW28_ARB: + case GL_MODELVIEW29_ARB: + case GL_MODELVIEW30_ARB: + case GL_MODELVIEW31_ARB: + case GL_TRANSPOSE_CURRENT_MATRIX_ARB: + return 16; + case GL_FOG_COORDINATE_SOURCE: + case GL_COMPRESSED_TEXTURE_FORMATS: + return __glGetBooleanv_variable_size( e ); + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetTexParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_RESIDENT: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetTexLevelParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_TEXTURE_WIDTH: + case GL_TEXTURE_HEIGHT: + case GL_TEXTURE_COMPONENTS: + case GL_TEXTURE_BORDER: + case GL_TEXTURE_RED_SIZE: +/* case GL_TEXTURE_RED_SIZE_EXT:*/ + case GL_TEXTURE_GREEN_SIZE: +/* case GL_TEXTURE_GREEN_SIZE_EXT:*/ + case GL_TEXTURE_BLUE_SIZE: +/* case GL_TEXTURE_BLUE_SIZE_EXT:*/ + case GL_TEXTURE_ALPHA_SIZE: +/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ + case GL_TEXTURE_LUMINANCE_SIZE: +/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ + case GL_TEXTURE_INTENSITY_SIZE: +/* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ + case GL_TEXTURE_DEPTH: + case GL_TEXTURE_INDEX_SIZE_EXT: + case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: +/* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ + case GL_TEXTURE_COMPRESSED: +/* case GL_TEXTURE_COMPRESSED_ARB:*/ + case GL_TEXTURE_DEPTH_SIZE: +/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glColorTableParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetColorTableParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_COLOR_TABLE_FORMAT: +/* case GL_COLOR_TABLE_FORMAT_EXT:*/ + case GL_COLOR_TABLE_WIDTH: +/* case GL_COLOR_TABLE_WIDTH_EXT:*/ + case GL_COLOR_TABLE_RED_SIZE: +/* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ + case GL_COLOR_TABLE_GREEN_SIZE: +/* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ + case GL_COLOR_TABLE_BLUE_SIZE: +/* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ + case GL_COLOR_TABLE_ALPHA_SIZE: +/* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ + case GL_COLOR_TABLE_LUMINANCE_SIZE: +/* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ + case GL_COLOR_TABLE_INTENSITY_SIZE: +/* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ + return 1; + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glConvolutionParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + case GL_CONVOLUTION_FORMAT: +/* case GL_CONVOLUTION_FORMAT_EXT:*/ + case GL_CONVOLUTION_WIDTH: +/* case GL_CONVOLUTION_WIDTH_EXT:*/ + case GL_CONVOLUTION_HEIGHT: +/* case GL_CONVOLUTION_HEIGHT_EXT:*/ + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetHistogramParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_HISTOGRAM_WIDTH: + case GL_HISTOGRAM_FORMAT: + case GL_HISTOGRAM_RED_SIZE: + case GL_HISTOGRAM_GREEN_SIZE: + case GL_HISTOGRAM_BLUE_SIZE: + case GL_HISTOGRAM_ALPHA_SIZE: + case GL_HISTOGRAM_LUMINANCE_SIZE: + case GL_HISTOGRAM_SINK: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetMinmaxParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_MINMAX_FORMAT: + case GL_MINMAX_SINK: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glPointParameterfvEXT_size( GLenum e ) +{ + switch( e ) { + case GL_POINT_SIZE_MIN: +/* case GL_POINT_SIZE_MIN_ARB:*/ +/* case GL_POINT_SIZE_MIN_SGIS:*/ + case GL_POINT_SIZE_MAX: +/* case GL_POINT_SIZE_MAX_ARB:*/ +/* case GL_POINT_SIZE_MAX_SGIS:*/ + case GL_POINT_FADE_THRESHOLD_SIZE: +/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ +/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_POINT_SPRITE_COORD_ORIGIN: + return 1; + case GL_POINT_DISTANCE_ATTENUATION: +/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ +/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ + return 3; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetProgramivNV_size( GLenum e ) +{ + switch( e ) { + case GL_PROGRAM_LENGTH_NV: + case GL_PROGRAM_TARGET_NV: + case GL_PROGRAM_RESIDENT_NV: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvARB_size( GLenum e ) +{ + switch( e ) { + case GL_VERTEX_PROGRAM_ARB: + case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: + case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: + case GL_CURRENT_VERTEX_ATTRIB_ARB: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetProgramivARB_size( GLenum e ) +{ + switch( e ) { + case GL_PROGRAM_LENGTH_ARB: + case GL_PROGRAM_BINDING_ARB: + case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_TEXTURE_COORDS_ARB: + case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: + case GL_PROGRAM_FORMAT_ARB: + case GL_PROGRAM_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_TEMPORARIES_ARB: + case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_PROGRAM_PARAMETERS_ARB: + case GL_MAX_PROGRAM_PARAMETERS_ARB: + case GL_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_PROGRAM_ATTRIBS_ARB: + case GL_MAX_PROGRAM_ATTRIBS_ARB: + case GL_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: + case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: + case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: + case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: + case GL_MAX_PROGRAM_CALL_DEPTH_NV: + case GL_MAX_PROGRAM_IF_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_COUNT_NV: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryivARB_size( GLenum e ) +{ + switch( e ) { + case GL_QUERY_COUNTER_BITS_ARB: + case GL_CURRENT_QUERY_ARB: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryObjectivARB_size( GLenum e ) +{ + switch( e ) { + case GL_QUERY_RESULT_ARB: + case GL_QUERY_RESULT_AVAILABLE_ARB: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvNV_size( GLenum e ) +{ + switch( e ) { + case GL_ATTRIB_ARRAY_SIZE_NV: + case GL_ATTRIB_ARRAY_STRIDE_NV: + case GL_ATTRIB_ARRAY_TYPE_NV: + case GL_CURRENT_ATTRIB_NV: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetFramebufferAttachmentParameterivEXT_size( GLenum e ) +{ + switch( e ) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: + return 1; + default: return 0; + } +} + +ALIAS( Fogiv, Fogfv ) +ALIAS( Lightiv, Lightfv ) +ALIAS( LightModeliv, LightModelfv ) +ALIAS( Materialiv, Materialfv ) +ALIAS( TexParameteriv, TexParameterfv ) +ALIAS( TexEnviv, TexEnvfv ) +ALIAS( TexGenfv, TexGendv ) +ALIAS( TexGeniv, TexGendv ) +ALIAS( Map1f, Map1d ) +ALIAS( Map2f, Map2d ) +ALIAS( GetDoublev, GetBooleanv ) +ALIAS( GetFloatv, GetBooleanv ) +ALIAS( GetIntegerv, GetBooleanv ) +ALIAS( GetLightfv, Lightfv ) +ALIAS( GetLightiv, Lightfv ) +ALIAS( GetMaterialfv, Materialfv ) +ALIAS( GetMaterialiv, Materialfv ) +ALIAS( GetTexEnvfv, TexEnvfv ) +ALIAS( GetTexEnviv, TexEnvfv ) +ALIAS( GetTexGendv, TexGendv ) +ALIAS( GetTexGenfv, TexGendv ) +ALIAS( GetTexGeniv, TexGendv ) +ALIAS( GetTexParameteriv, GetTexParameterfv ) +ALIAS( GetTexLevelParameteriv, GetTexLevelParameterfv ) +ALIAS( ColorTableParameteriv, ColorTableParameterfv ) +ALIAS( GetColorTableParameteriv, GetColorTableParameterfv ) +ALIAS( ConvolutionParameteriv, ConvolutionParameterfv ) +ALIAS( GetConvolutionParameteriv, GetConvolutionParameterfv ) +ALIAS( GetHistogramParameteriv, GetHistogramParameterfv ) +ALIAS( GetMinmaxParameteriv, GetMinmaxParameterfv ) +ALIAS( GetVertexAttribfvARB, GetVertexAttribdvARB ) +ALIAS( GetVertexAttribivARB, GetVertexAttribdvARB ) +ALIAS( PointParameterivNV, PointParameterfvEXT ) +ALIAS( GetQueryObjectuivARB, GetQueryObjectivARB ) +ALIAS( GetVertexAttribfvNV, GetVertexAttribdvNV ) +ALIAS( GetVertexAttribivNV, GetVertexAttribdvNV ) + +# undef PURE +# undef FASTCALL +# undef INTERNAL diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_size_get.h b/nx-X11/programs/Xserver/GL/glx/indirect_size_get.h new file mode 100644 index 0000000000..5329d41bf2 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_size_get.h @@ -0,0 +1,99 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_SIZE_GET_H_ ) +# define _INDIRECT_SIZE_GET_H_ + +/** + * \file + * Prototypes for functions used to determine the number of data elements in + * various GLX protocol messages. + * + * \author Ian Romanick + */ + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + +extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetFramebufferAttachmentParameterivEXT_size(GLenum); + +# undef PURE +# undef FASTCALL +# undef INTERNAL + +#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */ diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_util.c b/nx-X11/programs/Xserver/GL/glx/indirect_util.c new file mode 100644 index 0000000000..3b2090e6ed --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_util.c @@ -0,0 +1,206 @@ +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include + +#include +#include +#include +#ifdef __linux__ +#include +#elif defined(__OpenBSD__) +#include +#define bswap_16 __swap16 +#define bswap_32 __swap32 +#define bswap_64 __swap64 +#else +#include +#define bswap_16 bswap16 +#define bswap_32 bswap32 +#define bswap_64 bswap64 +#endif +#include +#include "indirect_size.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glxserver.h" +#include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "glxext.h" +#include "indirect_util.h" + + +#define __GLX_PAD(a) (((a)+3)&~3) + +extern xGLXSingleReply __glXReply; + + +GLint +__glGetBooleanv_variable_size( GLenum e ) +{ + if ( e == GL_COMPRESSED_TEXTURE_FORMATS ) { + GLint temp; + + CALL_GetIntegerv( GET_DISPATCH(), + (GL_NUM_COMPRESSED_TEXTURE_FORMATS, & temp) ); + return temp; + } + else { + return 0; + } +} + + +/** + * Get a properly aligned buffer to hold reply data. + * + * \warning + * This function assumes that \c local_buffer is already properly aligned. + * It also assumes that \c alignment is a power of two. + */ +void * +__glXGetAnswerBuffer( __GLXclientState * cl, size_t required_size, + void * local_buffer, size_t local_size, unsigned alignment ) +{ + void * buffer = local_buffer; + const unsigned mask = alignment - 1; + + if ( local_size < required_size ) { + const size_t worst_case_size = required_size + alignment; + intptr_t temp_buf; + + if ( cl->returnBufSize < worst_case_size ) { + void * temp = realloc( cl->returnBuf, worst_case_size ); + + if ( temp == NULL ) { + return NULL; + } + + cl->returnBuf = temp; + cl->returnBufSize = worst_case_size; + } + + temp_buf = (intptr_t) cl->returnBuf; + temp_buf = (temp_buf + mask) & ~mask; + buffer = (void *) temp_buf; + } + + return buffer; +} + + +/** + * Send a GLX reply to the client. + * + * Technically speaking, there are several different ways to encode a GLX + * reply. The primary difference is whether or not certain fields (e.g., + * retval, size, and "pad3") are set. This function gets around that by + * always setting all of the fields to "reasonable" values. This does no + * harm to clients, but it does make the server-side code much more compact. + */ +void +__glXSendReply( ClientPtr client, const void * data, size_t elements, + size_t element_size, GLboolean always_array, CARD32 retval ) +{ + size_t reply_ints = 0; + + if ( __glXErrorOccured() ) { + elements = 0; + } + else if ( (elements > 1) || always_array ) { + reply_ints = ((elements * element_size) + 3) >> 2; + } + + __glXReply.length = reply_ints; + __glXReply.type = X_Reply; + __glXReply.sequenceNumber = client->sequence; + __glXReply.size = elements; + __glXReply.retval = retval; + + + /* It is faster on almost always every architecture to just copy the 8 + * bytes, even when not necessary, than check to see of the value of + * elements requires it. Copying the data when not needed will do no + * harm. + */ + + (void) memcpy( & __glXReply.pad3, data, 8 ); + WriteToClient( client, sz_xGLXSingleReply, (char *) & __glXReply ); + + if ( reply_ints != 0 ) { + WriteToClient( client, reply_ints * 4, (char *) data ); + } +} + + +/** + * Send a GLX reply to the client. + * + * Technically speaking, there are several different ways to encode a GLX + * reply. The primary difference is whether or not certain fields (e.g., + * retval, size, and "pad3") are set. This function gets around that by + * always setting all of the fields to "reasonable" values. This does no + * harm to clients, but it does make the server-side code much more compact. + * + * \warning + * This function assumes that values stored in \c data will be byte-swapped + * by the caller if necessary. + */ +void +__glXSendReplySwap( ClientPtr client, const void * data, size_t elements, + size_t element_size, GLboolean always_array, CARD32 retval ) +{ + size_t reply_ints = 0; + + if ( __glXErrorOccured() ) { + elements = 0; + } + else if ( (elements > 1) || always_array ) { + reply_ints = ((elements * element_size) + 3) >> 2; + } + + __glXReply.length = bswap_32( reply_ints ); + __glXReply.type = bswap_32( X_Reply ); + __glXReply.sequenceNumber = bswap_32( client->sequence ); + __glXReply.size = bswap_32( elements ); + __glXReply.retval = bswap_32( retval ); + + + /* It is faster on almost always every architecture to just copy the 8 + * bytes, even when not necessary, than check to see of the value of + * elements requires it. Copying the data when not needed will do no + * harm. + */ + + (void) memcpy( & __glXReply.pad3, data, 8 ); + WriteToClient( client, sz_xGLXSingleReply, (char *) & __glXReply ); + + if ( reply_ints != 0 ) { + WriteToClient( client, reply_ints * 4, (char *) data ); + } +} diff --git a/nx-X11/programs/Xserver/GL/glx/indirect_util.h b/nx-X11/programs/Xserver/GL/glx/indirect_util.h new file mode 100644 index 0000000000..3abe81f137 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/indirect_util.h @@ -0,0 +1,43 @@ +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef __GLX_INDIRECT_UTIL_H__ +#define __GLX_INDIRECT_UTIL_H__ + +extern GLint __glGetBooleanv_variable_size( GLenum e ); + +extern void * __glXGetAnswerBuffer( __GLXclientState * cl, + size_t required_size, void * local_buffer, size_t local_size, + unsigned alignment ); + +extern void __glXSendReply( ClientPtr client, const void * data, + size_t elements, size_t element_size, GLboolean always_array, + CARD32 retval ); + +extern void __glXSendReplySwap( ClientPtr client, const void * data, + size_t elements, size_t element_size, GLboolean always_array, + CARD32 retval ); + +#endif /* __GLX_INDIRECT_UTIL_H__ */ diff --git a/nx-X11/programs/Xserver/GL/glx/oldstuff/Imakefile b/nx-X11/programs/Xserver/GL/glx/oldstuff/Imakefile new file mode 100644 index 0000000000..2ee2d17e63 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/oldstuff/Imakefile @@ -0,0 +1,178 @@ +NULL = + + +/* Large PIC tables needed for SPARC builds */ +#if defined(sparc) || defined(SparcArchitecture) +# define LargePICTable YES + PICFLAGS = LargePositionIndependentCFlags +#endif + +#include + +LinkSourceFile(glcontextmodes.c, $(MESASRCDIR)/src/mesa/drivers/dri/common) +LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/mesa/drivers/dri/common) +LinkSourceFile(indirect_size.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) + +#if (!(defined(NXAgentServer) && NXAgentServer)) +NXAGENT_SKIP_SRCS = \ + glxext.c \ + $(NULL) +NXAGENT_SKIP_OBJS = \ + glxext.o \ + $(NULL) +#else + NX_DEFINES = -DNXAGENT_SERVER +#endif + + SRCS = global.c \ + glxbuf.c \ + glxcmds.c \ + glxcmdsswap.c \ + glxfb.c \ + glximports.c \ + glxmem.c \ + glxpix.c \ + glxscreens.c \ + glxutil.c \ + render2.c \ + render2swap.c \ + renderpix.c \ + renderpixswap.c \ + rensize.c \ + rensizetab.c \ + single2.c \ + single2swap.c \ + singlepix.c \ + singlepixswap.c \ + singlesize.c \ + xfont.c \ + g_disptab.c \ + g_disptab_EXT.c \ + g_render.c \ + g_renderswap.c \ + g_single.c \ + g_singleswap.c \ + glcontextmodes.c \ + indirect_size.c \ + $(MSRCS) \ + $(NXAGENT_SKIP_SRCS) \ + $(NULL) + + OBJS = global.o \ + glxbuf.o \ + glxcmds.o \ + glxcmdsswap.o \ + glxfb.o \ + glximports.o \ + glxmem.o \ + glxpix.o \ + glxscreens.o \ + glxutil.o \ + render2.o \ + render2swap.o \ + renderpix.o \ + renderpixswap.o \ + rensize.o \ + rensizetab.o \ + single2.o \ + single2swap.o \ + singlepix.o \ + singlepixswap.o \ + singlesize.o \ + xfont.o \ + g_disptab.o \ + g_disptab_EXT.o \ + g_render.o \ + g_renderswap.o \ + g_single.o \ + g_singleswap.o \ + glcontextmodes.o \ + indirect_size.o \ + $(MOBJS) \ + $(NXAGENT_SKIP_OBJS) \ + $(NULL) + + INCLUDES = -I$(SERVERSRC)/GL/glx \ + -I$(SERVERSRC)/GL/include \ + -I$(SERVERSRC)/include \ + -I$(INCLUDESRC) \ + -I$(MESASRCDIR)/include \ + -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/mi \ + -I$(EXTINCSRC) \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) \ + `pkg-config --cflags-only-I pixman-1` \ + $(NULL) + +#if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6) + NO_EXT_DEFS = -DMISSING_GL_EXTS +#endif +#if defined(Win32Architecture) +# undef __stdcall + APIENTRY_DEFS = -DAPIENTRY=__stdcall +#endif + +XCOMM If you add "-DDEBUG" in DEFINES, then make sure you also +XCOMM add DEBUG to the define in ../mesa/src/X/xf86glx.c + DEFINES = \ + $(GLX_DEFINES) \ + $(NO_EXT_DEFS) \ + $(APIENTRY_DEFS) \ + $(NX_DEFINES) \ + $(NULL) + +NormalLibraryObjectRule() +NormalLibraryTarget(glx,$(OBJS)) +#if defined(GlxUseWindows) && GlxUseWindows +clean:: + RemoveFiles($(foreach obj,$(OBJS), stdcall/$(obj))) +includes:: + MakeDir(stdcall) +SpecialObjectRule(stdcall/%.o,%.c,-DUSE_OPENGL32 -o $@) +NormalLibraryTarget(glx_stdcall,$(foreach obj,$(OBJS), stdcall/$(obj))) +#endif +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(glx,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +#ifdef LinkDirectory +LinkSourceFile(global.c,LinkDirectory) +LinkSourceFile(glxbuf.c,LinkDirectory) +LinkSourceFile(glxcmds.c,LinkDirectory) +LinkSourceFile(glxcmdsswap.c,LinkDirectory) +LinkSourceFile(glxext.c,LinkDirectory) +LinkSourceFile(glxfb.c,LinkDirectory) +LinkSourceFile(glximports.c,LinkDirectory) +LinkSourceFile(glxmem.c,LinkDirectory) +LinkSourceFile(glxpix.c,LinkDirectory) +LinkSourceFile(glxscreens.c,LinkDirectory) +LinkSourceFile(glxutil.c,LinkDirectory) +LinkSourceFile(render2.c,LinkDirectory) +LinkSourceFile(render2swap.c,LinkDirectory) +LinkSourceFile(renderpix.c,LinkDirectory) +LinkSourceFile(renderpixswap.c,LinkDirectory) +LinkSourceFile(rensize.c,LinkDirectory) +LinkSourceFile(rensizetab.c,LinkDirectory) +LinkSourceFile(single2.c,LinkDirectory) +LinkSourceFile(single2swap.c,LinkDirectory) +LinkSourceFile(singlepix.c,LinkDirectory) +LinkSourceFile(singlepixswap.c,LinkDirectory) +LinkSourceFile(singlesize.c,LinkDirectory) +LinkSourceFile(xfont.c,LinkDirectory) +LinkSourceFile(g_disptab.c,LinkDirectory) +LinkSourceFile(g_disptab_EXT.c,LinkDirectory) +LinkSourceFile(g_render.c,LinkDirectory) +LinkSourceFile(g_renderswap.c,LinkDirectory) +LinkSourceFile(g_single.c,LinkDirectory) +LinkSourceFile(g_singleswap.c,LinkDirectory) +#endif diff --git a/nx-X11/programs/Xserver/GL/glx/oldstuff/Imakefile.bak b/nx-X11/programs/Xserver/GL/glx/oldstuff/Imakefile.bak new file mode 100644 index 0000000000..9ef54ba602 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/oldstuff/Imakefile.bak @@ -0,0 +1,177 @@ +NULL = + + +/* Large PIC tables needed for SPARC builds */ +#if defined(sparc) || defined(SparcArchitecture) +# define LargePICTable YES + PICFLAGS = LargePositionIndependentCFlags +#endif + +#include + +LinkSourceFile(glcontextmodes.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_dispatch.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_dispatch.h, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_dispatch_swap.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_reqsize.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_reqsize.h, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_size_get.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_size_get.h, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_util.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_util.h, $(MESASRCDIR)/src/glx/x11) + +#if (!(defined(NXAgentServer) && NXAgentServer)) +NXAGENT_SKIP_SRCS = \ + glxext.c \ + $(NULL) +NXAGENT_SKIP_OBJS = \ + glxext.o \ + $(NULL) +#else + NX_DEFINES = -DNXAGENT_SERVER +#endif + + SRCS = global.c \ + glthread.c \ + glxcmds.c \ + glxcmdsswap.c \ + glxvisuals.c \ + glxscreens.c \ + glxutil.c \ + render2.c \ + render2swap.c \ + renderpix.c \ + renderpixswap.c \ + rensize.c \ + rensizetab.c \ + single2.c \ + single2swap.c \ + singlepix.c \ + singlepixswap.c \ + singlesize.c \ + xfont.c \ + g_disptab.c \ + g_disptab_EXT.c \ + glapi.c \ + glcontextmodes.c \ + indirect_dispatch.c \ + indirect_dispatch_swap.c \ + indirect_reqsize.c \ + indirect_size_get.c \ + indirect_util.c \ + $(MSRCS) \ + $(NXAGENT_SKIP_SRCS) \ + $(NULL) + + OBJS = global.o \ + glxthread.o \ + glxcmds.o \ + glxcmdsswap.o \ + glxvisuals.o \ + glxscreens.o \ + glxutil.o \ + render2.o \ + render2swap.o \ + renderpix.o \ + renderpixswap.o \ + rensize.o \ + rensizetab.o \ + single2.o \ + single2swap.o \ + singlepix.o \ + singlepixswap.o \ + singlesize.o \ + xfont.o \ + g_disptab.o \ + g_disptab_EXT.o \ + glapi.o \ + glcontextmodes.o \ + indirect_size.o \ + indirect_dispatch.o \ + indirect_dispatch_swap.o \ + indirect_reqsize.o \ + indirect_size_get.o \ + indirect_util.o \ + $(MOBJS) \ + $(NXAGENT_SKIP_OBJS) \ + $(NULL) + + INCLUDES = -I$(SERVERSRC)/GL/glx \ + -I$(SERVERSRC)/GL/include \ + -I$(SERVERSRC)/include \ + -I$(INCLUDESRC) \ + -I$(MESASRCDIR)/include \ + -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/mi \ + -I$(EXTINCSRC) \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) \ + `pkg-config --cflags-only-I pixman-1` \ + $(NULL) + +#if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6) + NO_EXT_DEFS = -DMISSING_GL_EXTS +#endif +#if defined(Win32Architecture) +# undef __stdcall + APIENTRY_DEFS = -DAPIENTRY=__stdcall +#endif + +XCOMM If you add "-DDEBUG" in DEFINES, then make sure you also +XCOMM add DEBUG to the define in ../mesa/src/X/xf86glx.c + DEFINES = \ + $(GLX_DEFINES) \ + $(NO_EXT_DEFS) \ + $(APIENTRY_DEFS) \ + $(NX_DEFINES) \ + $(NULL) + +NormalLibraryObjectRule() +NormalLibraryTarget(glx,$(OBJS)) +#if defined(GlxUseWindows) && GlxUseWindows +clean:: + RemoveFiles($(foreach obj,$(OBJS), stdcall/$(obj))) +includes:: + MakeDir(stdcall) +SpecialObjectRule(stdcall/%.o,%.c,-DUSE_OPENGL32 -o $@) +NormalLibraryTarget(glx_stdcall,$(foreach obj,$(OBJS), stdcall/$(obj))) +#endif +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(glx,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +#ifdef LinkDirectory +LinkSourceFile(global.c,LinkDirectory) +LinkSourceFile(glthread.c,LinkDirectory) +LinkSourceFile(glxcmds.c,LinkDirectory) +LinkSourceFile(glxcmdsswap.c,LinkDirectory) +LinkSourceFile(glxext.c,LinkDirectory) +LinkSourceFile(glxvisuals.c,LinkDirectory) +LinkSourceFile(glxscreens.c,LinkDirectory) +LinkSourceFile(glxutil.c,LinkDirectory) +LinkSourceFile(render2.c,LinkDirectory) +LinkSourceFile(render2swap.c,LinkDirectory) +LinkSourceFile(renderpix.c,LinkDirectory) +LinkSourceFile(renderpixswap.c,LinkDirectory) +LinkSourceFile(rensize.c,LinkDirectory) +LinkSourceFile(rensizetab.c,LinkDirectory) +LinkSourceFile(single2.c,LinkDirectory) +LinkSourceFile(single2swap.c,LinkDirectory) +LinkSourceFile(singlepix.c,LinkDirectory) +LinkSourceFile(singlepixswap.c,LinkDirectory) +LinkSourceFile(singlesize.c,LinkDirectory) +LinkSourceFile(xfont.c,LinkDirectory) +LinkSourceFile(g_disptab.c,LinkDirectory) +LinkSourceFile(g_disptab_EXT.c,LinkDirectory) +LinkSourceFile(glapi.c,LinkDirectory) +#endif diff --git a/nx-X11/programs/Xserver/GL/glx/render2.c b/nx-X11/programs/Xserver/GL/glx/render2.c index 1336e25913..d1fde2afb8 100644 --- a/nx-X11/programs/Xserver/GL/glx/render2.c +++ b/nx-X11/programs/Xserver/GL/glx/render2.c @@ -39,9 +39,13 @@ #include #include "unpack.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" #include "indirect_size.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + void __glXDisp_Map1f(GLbyte *pc) { @@ -56,7 +60,7 @@ void __glXDisp_Map1f(GLbyte *pc) points = (GLfloat *)(pc + 16); k = __glMap1f_size(target); - glMap1f(target, u1, u2, k, order, points); + CALL_Map1f( GET_DISPATCH(), (target, u1, u2, k, order, points) ); } void __glXDisp_Map2f(GLbyte *pc) @@ -78,7 +82,7 @@ void __glXDisp_Map2f(GLbyte *pc) ustride = vorder * k; vstride = k; - glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); + CALL_Map2f( GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) ); } void __glXDisp_Map1d(GLbyte *pc) @@ -120,7 +124,7 @@ void __glXDisp_Map1d(GLbyte *pc) #else points = (GLdouble*) pc; #endif - glMap1d(target, u1, u2, k, order, points); + CALL_Map1d( GET_DISPATCH(), (target, u1, u2, k, order, points) ); } void __glXDisp_Map2d(GLbyte *pc) @@ -168,17 +172,7 @@ void __glXDisp_Map2d(GLbyte *pc) #else points = (GLdouble*) pc; #endif - glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); -} - -void __glXDisp_CallLists(GLbyte *pc) -{ - GLenum type; - GLsizei n; - - type = *(GLenum *)(pc + 4); - n = *(GLsizei *)(pc + 0); - glCallLists(n, type, pc + 8); + CALL_Map2d( GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) ); } void __glXDisp_DrawArrays(GLbyte *pc) @@ -212,36 +206,36 @@ void __glXDisp_DrawArrays(GLbyte *pc) switch (component) { case GL_VERTEX_ARRAY: - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(numVals, datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_VERTEX_ARRAY) ); + CALL_VertexPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); break; case GL_NORMAL_ARRAY: - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_NORMAL_ARRAY) ); + CALL_NormalPointer( GET_DISPATCH(), (datatype, stride, pc) ); break; case GL_COLOR_ARRAY: - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(numVals, datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_COLOR_ARRAY) ); + CALL_ColorPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); break; case GL_INDEX_ARRAY: - glEnableClientState(GL_INDEX_ARRAY); - glIndexPointer(datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_INDEX_ARRAY) ); + CALL_IndexPointer( GET_DISPATCH(), (datatype, stride, pc) ); break; case GL_TEXTURE_COORD_ARRAY: - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(numVals, datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY) ); + CALL_TexCoordPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); break; case GL_EDGE_FLAG_ARRAY: - glEnableClientState(GL_EDGE_FLAG_ARRAY); - glEdgeFlagPointer(stride, (const GLboolean *)pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY) ); + CALL_EdgeFlagPointer( GET_DISPATCH(), (stride, (const GLboolean *)pc) ); break; case GL_SECONDARY_COLOR_ARRAY: - glEnableClientState(GL_SECONDARY_COLOR_ARRAY); - glSecondaryColorPointer(numVals, datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY) ); + CALL_SecondaryColorPointerEXT( GET_DISPATCH(), (numVals, datatype, stride, pc) ); break; case GL_FOG_COORD_ARRAY: - glEnableClientState(GL_FOG_COORD_ARRAY); - glFogCoordPointer(datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_FOG_COORD_ARRAY) ); + CALL_FogCoordPointerEXT( GET_DISPATCH(), (datatype, stride, pc) ); break; default: break; @@ -250,17 +244,17 @@ void __glXDisp_DrawArrays(GLbyte *pc) pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); } - glDrawArrays(primType, 0, numVertexes); + CALL_DrawArrays( GET_DISPATCH(), (primType, 0, numVertexes) ); /* turn off anything we might have turned on */ - 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); + 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) ); } void __glXDisp_DrawArraysEXT(GLbyte *pc) diff --git a/nx-X11/programs/Xserver/GL/glx/render2swap.c b/nx-X11/programs/Xserver/GL/glx/render2swap.c index ea35d514d1..681dd0b8a4 100644 --- a/nx-X11/programs/Xserver/GL/glx/render2swap.c +++ b/nx-X11/programs/Xserver/GL/glx/render2swap.c @@ -39,9 +39,13 @@ #include "glxserver.h" #include "unpack.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" #include "indirect_size.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" + void __glXDispSwap_Map1f(GLbyte *pc) { @@ -72,7 +76,7 @@ void __glXDispSwap_Map1f(GLbyte *pc) } __GLX_SWAP_FLOAT_ARRAY(points, compsize); - glMap1f(target, u1, u2, k, order, points); + CALL_Map1f( GET_DISPATCH(), (target, u1, u2, k, order, points) ); } void __glXDispSwap_Map2f(GLbyte *pc) @@ -113,7 +117,7 @@ void __glXDispSwap_Map2f(GLbyte *pc) } __GLX_SWAP_FLOAT_ARRAY(points, compsize); - glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); + CALL_Map2f( GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) ); } void __glXDispSwap_Map1d(GLbyte *pc) @@ -157,7 +161,7 @@ void __glXDispSwap_Map1d(GLbyte *pc) #else points = (GLdouble*) pc; #endif - glMap1d(target, u1, u2, k, order, points); + CALL_Map1d( GET_DISPATCH(), (target, u1, u2, k, order, points) ); } void __glXDispSwap_Map2d(GLbyte *pc) @@ -209,42 +213,7 @@ void __glXDispSwap_Map2d(GLbyte *pc) #else points = (GLdouble*) pc; #endif - glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); -} - -void __glXDispSwap_CallLists(GLbyte *pc) -{ - GLenum type; - GLsizei n; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(pc + 4); - __GLX_SWAP_INT(pc + 0); - type = *(GLenum *)(pc + 4); - n = *(GLsizei *)(pc + 0); - - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_2_BYTES: - case GL_3_BYTES: - case GL_4_BYTES: - break; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - __GLX_SWAP_SHORT_ARRAY(pc+8, n); - break; - case GL_INT: - case GL_UNSIGNED_INT: - __GLX_SWAP_INT_ARRAY(pc+8, n); - break; - case GL_FLOAT: - __GLX_SWAP_FLOAT_ARRAY(pc+8, n); - break; - } - - glCallLists(n, type, pc+8); + CALL_Map2d( GET_DISPATCH(), (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) ); } static void swapArray(GLint numVals, GLenum datatype, @@ -340,32 +309,44 @@ void __glXDispSwap_DrawArrays(GLbyte *pc) GLint numVals = compHeader[i].numVals; GLenum component = compHeader[i].component; + __GLX_SWAP_INT(&datatype); + __GLX_SWAP_INT(&numVals); + __GLX_SWAP_INT(&component); + swapArray(numVals, datatype, stride, numVertexes, pc); switch (component) { case GL_VERTEX_ARRAY: - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(numVals, datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_VERTEX_ARRAY) ); + CALL_VertexPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); break; case GL_NORMAL_ARRAY: - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_NORMAL_ARRAY) ); + CALL_NormalPointer( GET_DISPATCH(), (datatype, stride, pc) ); break; case GL_COLOR_ARRAY: - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(numVals, datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_COLOR_ARRAY) ); + CALL_ColorPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); break; case GL_INDEX_ARRAY: - glEnableClientState(GL_INDEX_ARRAY); - glIndexPointer(datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_INDEX_ARRAY) ); + CALL_IndexPointer( GET_DISPATCH(), (datatype, stride, pc) ); break; case GL_TEXTURE_COORD_ARRAY: - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(numVals, datatype, stride, pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY) ); + CALL_TexCoordPointer( GET_DISPATCH(), (numVals, datatype, stride, pc) ); break; case GL_EDGE_FLAG_ARRAY: - glEnableClientState(GL_EDGE_FLAG_ARRAY); - glEdgeFlagPointer(stride, (const GLboolean *)pc); + CALL_EnableClientState( GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY) ); + CALL_EdgeFlagPointer( GET_DISPATCH(), (stride, (const GLboolean *)pc) ); + break; + case GL_SECONDARY_COLOR_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY) ); + CALL_SecondaryColorPointerEXT( GET_DISPATCH(), (numVals, datatype, stride, pc) ); + break; + case GL_FOG_COORD_ARRAY: + CALL_EnableClientState( GET_DISPATCH(), (GL_FOG_COORD_ARRAY) ); + CALL_FogCoordPointerEXT( GET_DISPATCH(), (datatype, stride, pc) ); break; default: break; @@ -374,15 +355,17 @@ void __glXDispSwap_DrawArrays(GLbyte *pc) pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); } - glDrawArrays(primType, 0, numVertexes); + CALL_DrawArrays( GET_DISPATCH(), (primType, 0, numVertexes) ); /* turn off anything we might have turned on */ - 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); + 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) ); } void __glXDispSwap_DrawArraysEXT(GLbyte *pc) diff --git a/nx-X11/programs/Xserver/GL/glx/renderpix.c b/nx-X11/programs/Xserver/GL/glx/renderpix.c index d1997b5ad0..c6f83d4b77 100644 --- a/nx-X11/programs/Xserver/GL/glx/renderpix.c +++ b/nx-X11/programs/Xserver/GL/glx/renderpix.c @@ -39,247 +39,11 @@ #include "glxserver.h" #include "unpack.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" - -void __glXDisp_PolygonStipple(GLbyte *pc) -{ - __GLXpixelHeader *hdr = (__GLXpixelHeader *) pc; - - 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); - - glPolygonStipple((GLubyte *)(hdr+1)); -} - -void __glXDisp_Bitmap(GLbyte *pc) -{ - __GLXdispatchBitmapHeader *hdr = (__GLXdispatchBitmapHeader *) pc; - - 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); - - glBitmap((GLsizei) hdr->width, - (GLsizei) hdr->height, - (GLfloat) hdr->xorig, - (GLfloat) hdr->yorig, - (GLfloat) hdr->xmove, - (GLfloat) hdr->ymove, - (GLubyte *)(hdr+1)); -} - -void __glXDisp_TexImage1D(GLbyte *pc) -{ - __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc; - - 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); - - glTexImage1D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->components, - (GLsizei) hdr->width, - (GLint) hdr->border, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDisp_TexImage2D(GLbyte *pc) -{ - __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc; - - 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); - - glTexImage2D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->components, - (GLsizei) hdr->width, - (GLsizei) hdr->height, - (GLint) hdr->border, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDisp_TexImage3D(GLbyte *pc) -{ - __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc; - - glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, hdr->imageHeight); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, hdr->skipImages); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glTexImage3D(hdr->target, hdr->level, hdr->internalformat, hdr->width, - hdr->height, hdr->depth, hdr->border, hdr->format, hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDisp_DrawPixels(GLbyte *pc) -{ - __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc; - - 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); - - glDrawPixels((GLsizei) hdr->width, - (GLsizei) hdr->height, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDisp_TexSubImage1D(GLbyte *pc) -{ - __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - - 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); - - glTexSubImage1D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->xoffset, - (GLsizei) hdr->width, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDisp_TexSubImage2D(GLbyte *pc) -{ - __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - - 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); - - glTexSubImage2D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->xoffset, - (GLint) hdr->yoffset, - (GLsizei) hdr->width, - (GLsizei) hdr->height, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDisp_TexSubImage3D(GLbyte *pc) -{ - __GLXdispatchTexSubImage3DHeader *hdr = - (__GLXdispatchTexSubImage3DHeader *) pc; - - glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, hdr->imageHeight); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, hdr->skipImages); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glTexSubImage3D(hdr->target, hdr->level, hdr->xoffset, hdr->yoffset, - hdr->zoffset, hdr->width, hdr->height, hdr->depth, - hdr->format, hdr->type, (GLvoid *)(hdr+1)); -} - -void __glXDisp_ColorTable(GLbyte *pc) -{ - __GLXdispatchColorTableHeader *hdr = - (__GLXdispatchColorTableHeader *) pc; - - glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glColorTable(hdr->target, hdr->internalformat, - hdr->width, hdr->format, hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDisp_ColorSubTable(GLbyte *pc) -{ - __GLXdispatchColorSubTableHeader *hdr = - (__GLXdispatchColorSubTableHeader *) pc; - - glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glColorSubTable(hdr->target, hdr->start, hdr->count, hdr->format, - hdr->type, (GLvoid *)(hdr+1)); -} - -void __glXDisp_ConvolutionFilter1D(GLbyte *pc) -{ - __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; - - glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glConvolutionFilter1D(hdr->target, hdr->internalformat, - hdr->width, hdr->format, hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDisp_ConvolutionFilter2D(GLbyte *pc) -{ - __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; - - glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glConvolutionFilter2D(hdr->target, hdr->internalformat, - hdr->width, hdr->height, hdr->format, hdr->type, - (GLvoid *)(hdr+1)); -} +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" void __glXDisp_SeparableFilter2D(GLbyte *pc) { @@ -289,12 +53,12 @@ void __glXDisp_SeparableFilter2D(GLbyte *pc) hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE); - glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + 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, hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, hdr->alignment) ); /* XXX check this usage - internal code called ** a version without the packing parameters @@ -304,7 +68,7 @@ void __glXDisp_SeparableFilter2D(GLbyte *pc) hdr->alignment); image1len = __GLX_PAD(image1len); - glSeparableFilter2D(hdr->target, hdr->internalformat, + CALL_SeparableFilter2D( GET_DISPATCH(), (hdr->target, hdr->internalformat, hdr->width, hdr->height, hdr->format, hdr->type, - ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)); + ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)) ); } diff --git a/nx-X11/programs/Xserver/GL/glx/renderpixswap.c b/nx-X11/programs/Xserver/GL/glx/renderpixswap.c index a527a859ab..5e9905fe44 100644 --- a/nx-X11/programs/Xserver/GL/glx/renderpixswap.c +++ b/nx-X11/programs/Xserver/GL/glx/renderpixswap.c @@ -39,472 +39,11 @@ #include "glxserver.h" #include "unpack.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" - -void __glXDispSwap_PolygonStipple(GLbyte *pc) -{ - __GLXpixelHeader *hdr = (__GLXpixelHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&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); - - glPolygonStipple((GLubyte *)(hdr+1)); -} - -void __glXDispSwap_Bitmap(GLbyte *pc) -{ - __GLXdispatchBitmapHeader *hdr = (__GLXdispatchBitmapHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_FLOAT((GLbyte *)&hdr->xorig); - __GLX_SWAP_FLOAT((GLbyte *)&hdr->yorig); - __GLX_SWAP_FLOAT((GLbyte *)&hdr->xmove); - __GLX_SWAP_FLOAT((GLbyte *)&hdr->ymove); - - 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); - - glBitmap((GLsizei) hdr->width, - (GLsizei) hdr->height, - (GLfloat) hdr->xorig, - (GLfloat) hdr->yorig, - (GLfloat) hdr->xmove, - (GLfloat) hdr->ymove, - (GLubyte *)(hdr+1)); -} - -void __glXDispSwap_TexImage1D(GLbyte *pc) -{ - __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->level); - __GLX_SWAP_INT((GLbyte *)&hdr->components); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_INT((GLbyte *)&hdr->border); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - 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); - - glTexImage1D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->components, - (GLsizei) hdr->width, - (GLint) hdr->border, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_TexImage2D(GLbyte *pc) -{ - __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->level); - __GLX_SWAP_INT((GLbyte *)&hdr->components); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_INT((GLbyte *)&hdr->border); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - 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); - - glTexImage2D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->components, - (GLsizei) hdr->width, - (GLsizei) hdr->height, - (GLint) hdr->border, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_TexImage3D(GLbyte *pc) -{ - __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->imageHeight); - __GLX_SWAP_INT((GLbyte *)&hdr->imageDepth); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipImages); - __GLX_SWAP_INT((GLbyte *)&hdr->skipVolumes); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->level); - __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_INT((GLbyte *)&hdr->depth); - __GLX_SWAP_INT((GLbyte *)&hdr->size4d); - __GLX_SWAP_INT((GLbyte *)&hdr->border); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, hdr->imageHeight); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, hdr->skipImages); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glTexImage3D(hdr->target, hdr->level, hdr->internalformat, hdr->width, - hdr->height, hdr->depth, hdr->border, hdr->format, hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_DrawPixels(GLbyte *pc) -{ - __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - 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); - - glDrawPixels((GLsizei) hdr->width, - (GLsizei) hdr->height, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_TexSubImage1D(GLbyte *pc) -{ - __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->level); - __GLX_SWAP_INT((GLbyte *)&hdr->xoffset); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - 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); - - glTexSubImage1D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->xoffset, - (GLsizei) hdr->width, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_TexSubImage2D(GLbyte *pc) -{ - __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->level); - __GLX_SWAP_INT((GLbyte *)&hdr->xoffset); - __GLX_SWAP_INT((GLbyte *)&hdr->yoffset); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - 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); - - glTexSubImage2D(hdr->target, - (GLint) hdr->level, - (GLint) hdr->xoffset, - (GLint) hdr->yoffset, - (GLsizei) hdr->width, - (GLsizei) hdr->height, - hdr->format, - hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_TexSubImage3D(GLbyte *pc) -{ - __GLXdispatchTexSubImage3DHeader *hdr = - (__GLXdispatchTexSubImage3DHeader *) pc; - - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->imageHeight); - __GLX_SWAP_INT((GLbyte *)&hdr->imageDepth); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipImages); - __GLX_SWAP_INT((GLbyte *)&hdr->skipVolumes); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->level); - __GLX_SWAP_INT((GLbyte *)&hdr->xoffset); - __GLX_SWAP_INT((GLbyte *)&hdr->yoffset); - __GLX_SWAP_INT((GLbyte *)&hdr->zoffset); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_INT((GLbyte *)&hdr->depth); - __GLX_SWAP_INT((GLbyte *)&hdr->size4d); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, hdr->imageHeight); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_IMAGES, hdr->skipImages); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glTexSubImage3D(hdr->target, hdr->level, hdr->xoffset, hdr->yoffset, - hdr->zoffset, hdr->width, hdr->height, hdr->depth, - hdr->format, hdr->type, (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_ColorTable(GLbyte *pc) -{ - __GLXdispatchColorTableHeader *hdr = - (__GLXdispatchColorTableHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glColorTable(hdr->target, hdr->internalformat, - hdr->width, hdr->format, hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_ColorSubTable(GLbyte *pc) -{ - __GLXdispatchColorSubTableHeader *hdr = - (__GLXdispatchColorSubTableHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->start); - __GLX_SWAP_INT((GLbyte *)&hdr->count); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glColorSubTable(hdr->target, hdr->start, hdr->count, hdr->format, - hdr->type, (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_ConvolutionFilter1D(GLbyte *pc) -{ - __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glConvolutionFilter2D(hdr->target, hdr->internalformat, - hdr->width, 1, hdr->format, hdr->type, - (GLvoid *)(hdr+1)); -} - -void __glXDispSwap_ConvolutionFilter2D(GLbyte *pc) -{ - __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; - __GLX_DECLARE_SWAP_VARIABLES; - - __GLX_SWAP_INT((GLbyte *)&hdr->rowLength); - __GLX_SWAP_INT((GLbyte *)&hdr->skipRows); - __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels); - __GLX_SWAP_INT((GLbyte *)&hdr->alignment); - - __GLX_SWAP_INT((GLbyte *)&hdr->target); - __GLX_SWAP_INT((GLbyte *)&hdr->internalformat); - __GLX_SWAP_INT((GLbyte *)&hdr->width); - __GLX_SWAP_INT((GLbyte *)&hdr->height); - __GLX_SWAP_INT((GLbyte *)&hdr->format); - __GLX_SWAP_INT((GLbyte *)&hdr->type); - - /* - ** Just invert swapBytes flag; the GL will figure out if it needs to swap - ** the pixel data. - */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); - - glConvolutionFilter2D(hdr->target, hdr->internalformat, - hdr->width, hdr->height, hdr->format, hdr->type, - (GLvoid *)(hdr+1)); -} +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" void __glXDispSwap_SeparableFilter2D(GLbyte *pc) { @@ -531,12 +70,12 @@ void __glXDispSwap_SeparableFilter2D(GLbyte *pc) ** Just invert swapBytes flag; the GL will figure out if it needs to swap ** the pixel data. */ - glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); - glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); - glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); - glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); + 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, hdr->rowLength) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, hdr->skipRows) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, hdr->skipPixels) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, hdr->alignment) ); /* XXX check this usage - internal code called ** a version without the packing parameters @@ -547,7 +86,7 @@ void __glXDispSwap_SeparableFilter2D(GLbyte *pc) image1len = __GLX_PAD(image1len); - glSeparableFilter2D(hdr->target, hdr->internalformat, + CALL_SeparableFilter2D( GET_DISPATCH(), (hdr->target, hdr->internalformat, hdr->width, hdr->height, hdr->format, hdr->type, - ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)); + ((GLubyte *)hdr+hdrlen), ((GLubyte *)hdr+hdrlen+image1len)) ); } diff --git a/nx-X11/programs/Xserver/GL/glx/rensize.c b/nx-X11/programs/Xserver/GL/glx/rensize.c index d3a819cd58..e74621abed 100644 --- a/nx-X11/programs/Xserver/GL/glx/rensize.c +++ b/nx-X11/programs/Xserver/GL/glx/rensize.c @@ -41,134 +41,16 @@ #include "glxserver.h" #include "GL/glxproto.h" #include "unpack.h" -#include "impsize.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" #define SWAPL(a) \ (((a & 0xff000000U)>>24) | ((a & 0xff0000U)>>8) | \ ((a & 0xff00U)<<8) | ((a & 0xffU)<<24)) -int __glXCallListsReqSize(GLbyte *pc, Bool swap, int reqlen) +int __glXMap1dReqSize( const GLbyte *pc, Bool swap, int reqlen ) { - GLsizei n = *(GLsizei *)(pc + 0); - GLenum type = *(GLenum *)(pc + 4); - - if (swap) { - n = SWAPL( n ); - type = SWAPL( type ); - } - return n * __glCallLists_size( type ); -} - -int __glXFogivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 0); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glFogiv_size( pname ); /* defined in samplegl lib */ -} - -int __glXFogfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - return __glXFogivReqSize( pc, swap, reqlen); -} - -int __glXLightfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glLightfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXLightivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - return __glXLightfvReqSize( pc, swap, reqlen); -} - -int __glXLightModelfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 0); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glLightModelfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXLightModelivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - return __glXLightModelfvReqSize( pc, swap, reqlen); -} - -int __glXMaterialfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glMaterialfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXMaterialivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - return __glXMaterialfvReqSize( pc, swap, reqlen); -} - -int __glXTexGendvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 8 * __glTexGendv_size( pname ); /* defined in samplegl lib */ -} - -int __glXTexGenfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glTexGenfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXTexGenivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - return __glXTexGenfvReqSize( pc, swap, reqlen); -} - -int __glXTexParameterfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glTexParameterfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXTexParameterivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - return __glXTexParameterfvReqSize( pc, swap, reqlen); -} - -int __glXTexEnvfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glTexEnvfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXTexEnvivReqSize(GLbyte *pc, Bool swap, int reqlen ) -{ - return __glXTexEnvfvReqSize( pc, swap, reqlen); -} - -int __glXMap1dReqSize(GLbyte *pc, Bool swap, int reqlen ) -{ - GLenum target; + GLenum target; GLint order; target = *(GLenum*) (pc + 16); @@ -182,7 +64,7 @@ int __glXMap1dReqSize(GLbyte *pc, Bool swap, int reqlen ) return safe_mul(8, safe_mul(__glMap1d_size(target), order)); } -int __glXMap1fReqSize(GLbyte *pc, Bool swap, int reqlen ) +int __glXMap1fReqSize( const GLbyte *pc, Bool swap, int reqlen ) { GLenum target; GLint order; @@ -204,7 +86,7 @@ static int Map2Size(int k, int majorOrder, int minorOrder) return safe_mul(k, safe_mul(majorOrder, minorOrder)); } -int __glXMap2dReqSize(GLbyte *pc, Bool swap, int reqlen) +int __glXMap2dReqSize( const GLbyte *pc, Bool swap, int reqlen) { GLenum target; GLint uorder, vorder; @@ -220,7 +102,7 @@ int __glXMap2dReqSize(GLbyte *pc, Bool swap, int reqlen) return safe_mul(8, Map2Size(__glMap2d_size(target), uorder, vorder)); } -int __glXMap2fReqSize(GLbyte *pc, Bool swap, int reqlen) +int __glXMap2fReqSize( const GLbyte *pc, Bool swap, int reqlen) { GLenum target; GLint uorder, vorder; @@ -236,31 +118,6 @@ int __glXMap2fReqSize(GLbyte *pc, Bool swap, int reqlen) return safe_mul(4, Map2Size(__glMap2f_size(target), uorder, vorder)); } -int __glXPixelMapfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLint mapsize; - mapsize = *(GLint *)(pc + 4); - if (swap) { - mapsize = SWAPL( mapsize ); - } - return 4 * mapsize; -} - -int __glXPixelMapuivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - return __glXPixelMapfvReqSize( pc, swap, reqlen); -} - -int __glXPixelMapusvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLint mapsize; - mapsize = *(GLint *)(pc + 4); - if (swap) { - mapsize = SWAPL( mapsize ); - } - return 2 * mapsize; -} - /** * Calculate the size of an image. * @@ -457,110 +314,6 @@ int __glXImageSize( GLenum format, GLenum type, GLenum target, } -int __glXDrawPixelsReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - return __glXImageSize( format, type, 0, w, h, 1, - 0, rowLength, 0, skipRows, alignment ); -} - -int __glXBitmapReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchBitmapHeader *hdr = (__GLXdispatchBitmapHeader *) pc; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - return __glXImageSize( GL_COLOR_INDEX, GL_BITMAP, 0, w, h, 1, - 0, rowLength, 0, skipRows, alignment ); -} - -int __glXTexImage1DReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc; - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - target = SWAPL( target ); - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - if (target == GL_PROXY_TEXTURE_1D) { - return 0; - } else if (format == GL_STENCIL_INDEX || format == GL_DEPTH_COMPONENT) { - return -1; - } - return __glXImageSize( format, type, 0, w, 1, 1, - 0, rowLength, 0, skipRows, alignment ); -} - -int __glXTexImage2DReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc; - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - target = SWAPL( target ); - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - if (target == GL_PROXY_TEXTURE_2D || target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - return 0; - } else if (format == GL_STENCIL_INDEX || format == GL_DEPTH_COMPONENT) { - return -1; - } - return __glXImageSize( format, type, 0, w, h, 1, - 0, rowLength, 0, skipRows, alignment ); -} - /* XXX this is used elsewhere - should it be exported from glxserver.h? */ int __glXTypeSize(GLenum enm) { @@ -577,7 +330,7 @@ int __glXTypeSize(GLenum enm) } } -int __glXDrawArraysSize( GLbyte *pc, Bool swap, int reqlen) +int __glXDrawArraysSize( const GLbyte *pc, Bool swap, int reqlen) { __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; __GLXdispatchDrawArraysComponentHeader *compHeader; @@ -653,217 +406,7 @@ int __glXDrawArraysSize( GLbyte *pc, Bool swap, int reqlen) return safe_add(size, safe_mul(numVertexes, arrayElementSize)); } -int __glXPrioritizeTexturesReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLint n = *(GLsizei *)(pc + 0); - if (swap) n = SWAPL(n); - return(8*n); /* 4*n for textures, 4*n for priorities */ -} - -int __glXTexSubImage1DReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - return __glXImageSize( format, type, 0, w, 1, 1, - 0, rowLength, 0, skipRows, alignment ); -} - -int __glXTexSubImage2DReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - return __glXImageSize( format, type, 0, w, h, 1, - 0, rowLength, 0, skipRows, alignment ); -} - -int __glXTexImage3DReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc; - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint d = hdr->depth; - GLint imageHeight = hdr->imageHeight; - GLint rowLength = hdr->rowLength; - GLint skipImages = hdr->skipImages; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - GLint nullImage = hdr->nullimage; - - if (swap) { - target = SWAPL( target ); - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - d = SWAPL( d ); - imageHeight = SWAPL( imageHeight ); - rowLength = SWAPL( rowLength ); - skipImages = SWAPL( skipImages ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - if (target == GL_PROXY_TEXTURE_3D || nullImage) { - return 0; - } else { - return __glXImageSize( format, type, target, w, h, d, imageHeight, - rowLength, skipImages, skipRows, alignment ); - } -} - -int __glXTexSubImage3DReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchTexSubImage3DHeader *hdr = - (__GLXdispatchTexSubImage3DHeader *) pc; - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint d = hdr->depth; - GLint imageHeight = hdr->imageHeight; - GLint rowLength = hdr->rowLength; - GLint skipImages = hdr->skipImages; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - target = SWAPL( target ); - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - d = SWAPL( d ); - imageHeight = SWAPL( imageHeight ); - rowLength = SWAPL( rowLength ); - skipImages = SWAPL( skipImages ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - if (target == GL_PROXY_TEXTURE_3D) { - return 0; - } else { - return __glXImageSize( format, type, target, w, h, d, imageHeight, - rowLength, skipImages, skipRows, alignment ); - } -} - -int __glXConvolutionFilter1DReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; - - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint rowLength = hdr->rowLength; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - rowLength = SWAPL( rowLength ); - alignment = SWAPL( alignment ); - } - - return __glXImageSize( format, type, 0, w, 1, 1, - 0, rowLength, 0, 0, alignment ); -} - -int __glXConvolutionFilter2DReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; - - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - - return __glXImageSize( format, type, 0, w, h, 1, - 0, rowLength, 0, skipRows, alignment ); -} - -int __glXConvolutionParameterivSize(GLenum pname) -{ - switch (pname) { - case GL_CONVOLUTION_BORDER_COLOR: - case GL_CONVOLUTION_FILTER_SCALE: - case GL_CONVOLUTION_FILTER_BIAS: - return 4; - case GL_CONVOLUTION_BORDER_MODE: - return 1; - default: - return -1; - } -} - -int __glXConvolutionParameterfvSize(GLenum pname) -{ - return __glXConvolutionParameterivSize(pname); -} - -int __glXConvolutionParameterivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glXConvolutionParameterivSize( pname ); -} - -int __glXConvolutionParameterfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - return __glXConvolutionParameterivReqSize( pc, swap, reqlen); -} - -int __glXSeparableFilter2DReqSize(GLbyte *pc, Bool swap, int reqlen) +int __glXSeparableFilter2DReqSize( const GLbyte *pc, Bool swap, int reqlen ) { __GLXdispatchConvolutionFilterHeader *hdr = (__GLXdispatchConvolutionFilterHeader *) pc; @@ -893,109 +436,3 @@ int __glXSeparableFilter2DReqSize(GLbyte *pc, Bool swap, int reqlen) return safe_add(safe_pad(image1size), image2size); } - -int __glXColorTableParameterfvSize(GLenum pname) -{ - /* currently, only scale and bias are supported; return RGBA */ - switch(pname) { - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: - return 0; - } -} - -int __glXColorTableParameterivSize(GLenum pname) -{ - /* fv and iv are the same in this context */ - return __glXColorTableParameterfvSize(pname); -} - -int __glXColorTableReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchColorTableHeader *hdr = - (__GLXdispatchColorTableHeader *) pc; - - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint rowLength = hdr->rowLength; - GLint alignment = hdr->alignment; - - switch (target) { - case GL_PROXY_TEXTURE_1D: - case GL_PROXY_TEXTURE_2D: - case GL_PROXY_TEXTURE_3D: - case GL_PROXY_COLOR_TABLE: - case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: - case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - return 0; - } - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - rowLength = SWAPL( rowLength ); - alignment = SWAPL( alignment ); - } - - return __glXImageSize( format, type, 0, w, 1, 1, - 0, rowLength, 0, 0, alignment ); -} - -int __glXColorSubTableReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - __GLXdispatchColorSubTableHeader *hdr = - (__GLXdispatchColorSubTableHeader *) pc; - - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint count = hdr->count; - GLint rowLength = hdr->rowLength; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - count = SWAPL( count ); - rowLength = SWAPL( rowLength ); - alignment = SWAPL( alignment ); - } - - return __glXImageSize( format, type, 0, count, 1, 1, - 0, rowLength, 0, 0, alignment ); -} - -int __glXColorTableParameterfvReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glXColorTableParameterfvSize(pname); -} - -int __glXColorTableParameterivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - /* no difference between fv and iv versions */ - return __glXColorTableParameterfvReqSize(pc, swap, reqlen); -} - -int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - GLenum pname = *(GLenum *)(pc + 0); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glPointParameterfvEXT_size( pname ); -} - -int __glXPointParameterivReqSize(GLbyte *pc, Bool swap, int reqlen) -{ - /* no difference between fv and iv versions */ - return __glXPointParameterfvARBReqSize(pc, swap, reqlen); -} diff --git a/nx-X11/programs/Xserver/GL/glx/rensizetab.c b/nx-X11/programs/Xserver/GL/glx/rensizetab.c index 9d5abe844c..b9768a5b5d 100644 --- a/nx-X11/programs/Xserver/GL/glx/rensizetab.c +++ b/nx-X11/programs/Xserver/GL/glx/rensizetab.c @@ -38,6 +38,7 @@ #endif #include "glxserver.h" +#include "indirect_reqsize.h" #include "g_disptab_EXT.h" __GLXrenderSizeData __glXRenderSizeTable[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { @@ -271,7 +272,7 @@ __GLXrenderSizeData __glXRenderSizeTable[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, - /* WindowPos3fARB 230 */ { 16, 0 }, + /* WindowPos3fvMESA 230 */ { 16, 0 }, }; __GLXrenderSizeData __glXRenderSizeTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { /* ColorTable 2053 */ { 44, __glXColorTableReqSize }, @@ -286,8 +287,8 @@ __GLXrenderSizeData __glXRenderSizeTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, - /* PointParameterfARB 2065 */ { 12, 0 }, - /* PointParameterfvARB 2066 */ { 8, __glXPointParameterfvARBReqSize }, + /* PointParameterfEXT 2065 */ { 12, 0 }, + /* PointParameterfvEXT 2066 */ { 8, __glXPointParameterfvEXTReqSize }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, @@ -2442,6 +2443,110 @@ __GLXrenderSizeData __glXRenderSizeTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* ActiveStencilFaceEXT 4220 */ { 8, 0 }, - /* PointParameteri 4221 */ { 12, 0 }, - /* PointParameteriv 4222 */ { 8, __glXPointParameterivReqSize }, + /* PointParameteriNV 4221 */ { 12, 0 }, + /* PointParameterivNV 4222 */ { 8, __glXPointParameterivNVReqSize }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + /* no such opcode */ { 0, 0 }, + + /* BindRenderbufferEXT */ { 12, 0 }, + /* DeleteRenderbuffersEXT */ { 8, __glXDeleteRenderbuffersEXTReqSize }, + /* RenderbufferStorageEXT */ { 20, 0 }, + /* BindFramebufferEXT */ { 12, 0 }, + /* DeleteFramebuffersEXT */ { 8, __glXDeleteFramebuffersEXTReqSize }, + /* FramebufferTexture1DEXT */ { 24, 0 }, + /* FramebufferTexture2DEXT */ { 24, 0 }, + /* FramebufferTexture3DEXT */ { 28, 0 }, + /* FramebufferRenderbufferTexture3DEXT */ { 20, 0 }, + /* GenerateMipmapEXT */ { 8, 0 } }; diff --git a/nx-X11/programs/Xserver/GL/glx/single2.c b/nx-X11/programs/Xserver/GL/glx/single2.c index 47ba628af9..7ad6b20ebd 100644 --- a/nx-X11/programs/Xserver/GL/glx/single2.c +++ b/nx-X11/programs/Xserver/GL/glx/single2.c @@ -44,8 +44,12 @@ #include "glxserver.h" #include "glxutil.h" #include "glxext.h" +#include "indirect_dispatch.h" #include "unpack.h" -#include "g_disptab.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) { @@ -75,7 +79,7 @@ int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) } cx->feedbackBufSize = size; } - glFeedbackBuffer(size, type, cx->feedbackBuf); + CALL_FeedbackBuffer( GET_DISPATCH(), (size, type, cx->feedbackBuf) ); __GLX_NOTE_UNFLUSHED_CMDS(cx); return Success; } @@ -105,7 +109,7 @@ int __glXDisp_SelectBuffer(__GLXclientState *cl, GLbyte *pc) } cx->selectBufSize = size; } - glSelectBuffer(size, cx->selectBuf); + CALL_SelectBuffer( GET_DISPATCH(), (size, cx->selectBuf) ); __GLX_NOTE_UNFLUSHED_CMDS(cx); return Success; } @@ -129,10 +133,10 @@ int __glXDisp_RenderMode(__GLXclientState *cl, GLbyte *pc) pc += __GLX_SINGLE_HDR_SIZE; newMode = *(GLenum*) pc; - retval = glRenderMode(newMode); + retval = CALL_RenderMode( GET_DISPATCH(), (newMode) ); /* Check that render mode worked */ - glGetIntegerv(GL_RENDER_MODE, &newModeCheck); + CALL_GetIntegerv( GET_DISPATCH(), (GL_RENDER_MODE, &newModeCheck) ); if (newModeCheck != newMode) { /* Render mode change failed. Bail */ newMode = newModeCheck; @@ -221,7 +225,7 @@ int __glXDisp_Flush(__GLXclientState *cl, GLbyte *pc) return error; } - glFlush(); + CALL_Flush( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(cx); return Success; } @@ -239,7 +243,7 @@ int __glXDisp_Finish(__GLXclientState *cl, GLbyte *pc) } /* Do a local glFinish */ - glFinish(); + CALL_Finish( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(cx); /* Send empty reply packet to indicate finish is finished */ @@ -272,12 +276,12 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string) if (clen > slen) { combo_string = (char *) malloc(slen + 2); s1 = (char *) malloc(slen + 2); - strcpy(s1, sext_string); + if (s1) strcpy(s1, sext_string); s2 = cext_string; } else { combo_string = (char *) malloc(clen + 2); s1 = (char *) malloc(clen + 2); - strcpy(s1, cext_string); + if (s1) strcpy(s1, cext_string); s2 = sext_string; } if (!combo_string || !s1) { @@ -343,7 +347,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) pc += __GLX_SINGLE_HDR_SIZE; name = *(GLenum *)(pc + 0); - string = (const char *)glGetString(name); + string = (const char *) CALL_GetString( GET_DISPATCH(), (name) ); /* ** Restrict extensions to those that are supported by both the @@ -386,9 +390,9 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) __GLX_SEND_HEADER(); WriteToClient(client, length, string); - if (buf != NULL) { + if (buf != NULL) free(buf); - } + return Success; } @@ -396,30 +400,3 @@ int __glXDisp_GetString(__GLXclientState *cl, GLbyte *pc) { return DoGetString(cl, pc, GL_FALSE); } - -int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answer[4]; - - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - - __glXClearErrorOccured(); - glGetClipPlane(*(GLenum *)(pc + 0), answer); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SEND_HEADER(); - } else { - __GLX_BEGIN_REPLY(32); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(4); - } - return Success; -} - diff --git a/nx-X11/programs/Xserver/GL/glx/single2swap.c b/nx-X11/programs/Xserver/GL/glx/single2swap.c index 6fdc7e7f21..5383189c07 100644 --- a/nx-X11/programs/Xserver/GL/glx/single2swap.c +++ b/nx-X11/programs/Xserver/GL/glx/single2swap.c @@ -40,8 +40,12 @@ #include "glxserver.h" #include "glxutil.h" #include "glxext.h" +#include "indirect_dispatch.h" #include "unpack.h" -#include "g_disptab.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) { @@ -74,7 +78,7 @@ int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) } cx->feedbackBufSize = size; } - glFeedbackBuffer(size, type, cx->feedbackBuf); + CALL_FeedbackBuffer( GET_DISPATCH(), (size, type, cx->feedbackBuf) ); __GLX_NOTE_UNFLUSHED_CMDS(cx); return Success; } @@ -107,7 +111,7 @@ int __glXDispSwap_SelectBuffer(__GLXclientState *cl, GLbyte *pc) } cx->selectBufSize = size; } - glSelectBuffer(size, cx->selectBuf); + CALL_SelectBuffer( GET_DISPATCH(), (size, cx->selectBuf) ); __GLX_NOTE_UNFLUSHED_CMDS(cx); return Success; } @@ -135,10 +139,10 @@ int __glXDispSwap_RenderMode(__GLXclientState *cl, GLbyte *pc) pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc); newMode = *(GLenum*) pc; - retval = glRenderMode(newMode); + retval = CALL_RenderMode( GET_DISPATCH(), (newMode) ); /* Check that render mode worked */ - glGetIntegerv(GL_RENDER_MODE, &newModeCheck); + CALL_GetIntegerv( GET_DISPATCH(), (GL_RENDER_MODE, &newModeCheck) ); if (newModeCheck != newMode) { /* Render mode change failed. Bail */ newMode = newModeCheck; @@ -236,7 +240,7 @@ int __glXDispSwap_Flush(__GLXclientState *cl, GLbyte *pc) return error; } - glFlush(); + CALL_Flush( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(cx); return Success; } @@ -256,7 +260,7 @@ int __glXDispSwap_Finish(__GLXclientState *cl, GLbyte *pc) } /* Do a local glFinish */ - glFinish(); + CALL_Finish( GET_DISPATCH(), () ); __GLX_NOTE_FLUSHED_CMDS(cx); /* Send empty reply packet to indicate finish is finished */ @@ -272,36 +276,3 @@ int __glXDispSwap_GetString(__GLXclientState *cl, GLbyte *pc) { return DoGetString(cl, pc, GL_TRUE); } - -int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) -{ - __GLXcontext *cx; - ClientPtr client = cl->client; - int error; - GLdouble answer[4]; - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - - __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); - cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); - if (!cx) { - return error; - } - pc += __GLX_SINGLE_HDR_SIZE; - __GLX_SWAP_INT(pc + 0); - - __glXClearErrorOccured(); - glGetClipPlane(*(GLenum *)(pc + 0), answer); - if (__glXErrorOccured()) { - __GLX_BEGIN_REPLY(0); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - } else { - __GLX_SWAP_DOUBLE_ARRAY((GLbyte *)answer, 4); - __GLX_BEGIN_REPLY(32); - __GLX_SWAP_REPLY_HEADER(); - __GLX_SEND_HEADER(); - __GLX_SEND_DOUBLE_ARRAY(4); - } - return Success; -} diff --git a/nx-X11/programs/Xserver/GL/glx/singlepix.c b/nx-X11/programs/Xserver/GL/glx/singlepix.c index 9e3e363336..5241c6e1e5 100644 --- a/nx-X11/programs/Xserver/GL/glx/singlepix.c +++ b/nx-X11/programs/Xserver/GL/glx/singlepix.c @@ -41,8 +41,12 @@ #include "glxext.h" #include "singlesize.h" #include "unpack.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" +#include "indirect_size_get.h" +#include "indirect_dispatch.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) { @@ -72,11 +76,11 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) compsize = __glReadPixels_size(format,type,width,height); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); - glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glReadPixels( + CALL_ReadPixels( GET_DISPATCH(), ( *(GLint *)(pc + 0), *(GLint *)(pc + 4), *(GLsizei *)(pc + 8), @@ -84,7 +88,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) *(GLenum *)(pc + 16), *(GLenum *)(pc + 20), answer - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -121,10 +125,10 @@ int __glXDisp_GetTexImage(__GLXclientState *cl, GLbyte *pc) target = *(GLenum *)(pc + 0); swapBytes = *(GLboolean *)(pc + 16); - glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width); - glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height); + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_WIDTH, &width) ); + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_HEIGHT, &height) ); if ( target == GL_TEXTURE_3D) { - glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth); + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_DEPTH, &depth) ); } /* * The three queries above might fail if we're in a state where queries @@ -133,16 +137,16 @@ int __glXDisp_GetTexImage(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,level,format,type,width,height,depth); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetTexImage( + CALL_GetTexImage( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLint *)(pc + 4), *(GLenum *)(pc + 8), *(GLenum *)(pc + 12), answer - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -175,13 +179,11 @@ int __glXDisp_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc) pc += __GLX_SINGLE_HDR_SIZE; lsbFirst = *(GLboolean *)(pc + 0); - glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst) ); __GLX_GET_ANSWER_BUFFER(answer,cl,128,1); __glXClearErrorOccured(); - glGetPolygonStipple( - (GLubyte *) answer - ); + CALL_GetPolygonStipple( GET_DISPATCH(), ((GLubyte *) answer) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -220,8 +222,8 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc) /* target must be SEPARABLE_2D, however I guess we can let the GL barf on this one.... */ - glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); - glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) ); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) ); /* * The two queries above might fail if we're in a state where queries * are illegal, but then width and height would still be zero anyway. @@ -232,17 +234,17 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc) if ((compsize = safe_pad(compsize)) < 0) return BadLength; if ((compsize2 = safe_pad(compsize2)) < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,safe_add(compsize, compsize2),1); __glXClearErrorOccured(); - glGetSeparableFilter( + CALL_GetSeparableFilter( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLenum *)(pc + 4), *(GLenum *)(pc + 8), answer, answer + compsize, NULL - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -281,11 +283,11 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc) target = *(GLenum *)(pc + 0); swapBytes = *(GLboolean *)(pc + 12); - glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) ); if (target == GL_CONVOLUTION_1D) { height = 1; } else { - glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) ); } /* * The two queries above might fail if we're in a state where queries @@ -294,15 +296,15 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,1,format,type,width,height,1); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetConvolutionFilter( + CALL_GetConvolutionFilter( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLenum *)(pc + 4), *(GLenum *)(pc + 8), answer - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -343,7 +345,7 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc) swapBytes = *(GLboolean *)(pc + 12); reset = *(GLboolean *)(pc + 13); - glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width); + CALL_GetHistogramParameteriv( GET_DISPATCH(), (target, GL_HISTOGRAM_WIDTH, &width) ); /* * The one query above might fail if we're in a state where queries * are illegal, but then width would still be zero anyway. @@ -351,10 +353,10 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,1,format,type,width,1,1); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetHistogram( target, reset, format, type, answer); + CALL_GetHistogram( GET_DISPATCH(), (target, reset, format, type, answer) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -396,10 +398,10 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,1,format,type,2,1,1); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetMinmax( target, reset, format, type, answer); + CALL_GetMinmax( GET_DISPATCH(), (target, reset, format, type, answer) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -437,7 +439,7 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc) type = *(GLenum *)(pc + 8); swapBytes = *(GLboolean *)(pc + 12); - glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width); + CALL_GetColorTableParameteriv( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) ); /* * The one query above might fail if we're in a state where queries * are illegal, but then width would still be zero anyway. @@ -445,15 +447,15 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,1,format,type,width,1,1); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetColorTable( + CALL_GetColorTable( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLenum *)(pc + 4), *(GLenum *)(pc + 8), answer - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); diff --git a/nx-X11/programs/Xserver/GL/glx/singlepixswap.c b/nx-X11/programs/Xserver/GL/glx/singlepixswap.c index f029fd6021..0eb5ac5802 100644 --- a/nx-X11/programs/Xserver/GL/glx/singlepixswap.c +++ b/nx-X11/programs/Xserver/GL/glx/singlepixswap.c @@ -41,8 +41,12 @@ #include "glxext.h" #include "singlesize.h" #include "unpack.h" -#include "g_disptab.h" -#include "g_disptab_EXT.h" +#include "indirect_dispatch.h" +#include "indirect_size_get.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc) { @@ -81,18 +85,18 @@ int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc) compsize = __glReadPixels_size(format,type,width,height); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); - glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glReadPixels( - *(GLint *)(pc + 0), + CALL_ReadPixels( GET_DISPATCH(), + (*(GLint *)(pc + 0), *(GLint *)(pc + 4), *(GLsizei *)(pc + 8), *(GLsizei *)(pc + 12), *(GLenum *)(pc + 16), *(GLenum *)(pc + 20), - answer + answer) ); if (__glXErrorOccured()) { @@ -139,10 +143,10 @@ int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc) target = *(GLenum *)(pc + 0); swapBytes = *(GLboolean *)(pc + 16); - glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width); - glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height); + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_WIDTH, &width) ); + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_HEIGHT, &height) ); if ( target == GL_TEXTURE_3D) { - glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth); + CALL_GetTexLevelParameteriv( GET_DISPATCH(), (target, level, GL_TEXTURE_DEPTH, &depth) ); } /* * The three queries above might fail if we're in a state where queries @@ -151,16 +155,16 @@ int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,level,format,type,width,height,depth); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetTexImage( + CALL_GetTexImage( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLint *)(pc + 4), *(GLenum *)(pc + 8), *(GLenum *)(pc + 12), answer - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -200,13 +204,11 @@ int __glXDispSwap_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc) pc += __GLX_SINGLE_HDR_SIZE; lsbFirst = *(GLboolean *)(pc + 0); - glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst) ); __GLX_GET_ANSWER_BUFFER(answer,cl,128,1); __glXClearErrorOccured(); - glGetPolygonStipple( - (GLubyte *) answer - ); + CALL_GetPolygonStipple( GET_DISPATCH(), ((GLubyte *) answer) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); @@ -251,8 +253,8 @@ int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc) /* target must be SEPARABLE_2D, however I guess we can let the GL barf on this one.... */ - glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); - glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) ); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) ); /* * The two queries above might fail if we're in a state where queries * are illegal, but then width and height would still be zero anyway. @@ -263,17 +265,17 @@ int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc) if ((compsize = safe_pad(compsize)) < 0) return BadLength; if ((compsize2 = safe_pad(compsize2)) < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,safe_add(compsize, compsize2),1); __glXClearErrorOccured(); - glGetSeparableFilter( + CALL_GetSeparableFilter( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLenum *)(pc + 4), *(GLenum *)(pc + 8), answer, answer + compsize, NULL - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -319,11 +321,11 @@ int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc) target = *(GLenum *)(pc + 0); swapBytes = *(GLboolean *)(pc + 12); - glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) ); if (target == GL_CONVOLUTION_2D) { height = 1; } else { - glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); + CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) ); } /* * The two queries above might fail if we're in a state where queries @@ -332,15 +334,15 @@ int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,1,format,type,width,height,1); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetConvolutionFilter( + CALL_GetConvolutionFilter( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLenum *)(pc + 4), *(GLenum *)(pc + 8), answer - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -387,7 +389,7 @@ int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc) swapBytes = *(GLboolean *)(pc + 12); reset = *(GLboolean *)(pc + 13); - glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width); + CALL_GetHistogramParameteriv( GET_DISPATCH(), (target, GL_HISTOGRAM_WIDTH, &width) ); /* * The one query above might fail if we're in a state where queries * are illegal, but then width would still be zero anyway. @@ -395,10 +397,10 @@ int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,1,format,type,width,1,1); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetHistogram( target, reset, format, type, answer); + CALL_GetHistogram( GET_DISPATCH(), (target, reset, format, type, answer) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -445,10 +447,10 @@ int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,1,format,type,2,1,1); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetMinmax( target, reset, format, type, answer); + CALL_GetMinmax( GET_DISPATCH(), (target, reset, format, type, answer) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); @@ -490,7 +492,7 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc) target = *(GLenum *)(pc + 0); swapBytes = *(GLboolean *)(pc + 12); - glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width); + CALL_GetColorTableParameteriv( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) ); /* * The one query above might fail if we're in a state where queries * are illegal, but then width would still be zero anyway. @@ -498,15 +500,15 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc) compsize = __glGetTexImage_size(target,1,format,type,width,1,1); if (compsize < 0) return BadLength; - glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); + CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes) ); __GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1); __glXClearErrorOccured(); - glGetColorTable( + CALL_GetColorTable( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLenum *)(pc + 4), *(GLenum *)(pc + 8), answer - ); + ) ); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); diff --git a/nx-X11/programs/Xserver/GL/glx/singlesize.c b/nx-X11/programs/Xserver/GL/glx/singlesize.c index 6d77f8be94..b5a74f30d3 100644 --- a/nx-X11/programs/Xserver/GL/glx/singlesize.c +++ b/nx-X11/programs/Xserver/GL/glx/singlesize.c @@ -40,6 +40,11 @@ #include #include "glxserver.h" #include "singlesize.h" +#include "indirect_size_get.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" /* ** These routines compute the size of variable-size returned parameters. @@ -53,183 +58,6 @@ GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h) return __glXImageSize( format, type, 0, w, h, 1, 0, 0, 0, 0, 4 ); } -/** - * Determine the number of data elements that go with the specified \c pname - * to a \c glGetTexEnvfv or \c glGetTexEnviv call. - * - * \todo - * Replace this function with a call to \c __glTexEnvfv_size. Make that there - * aren't any values of \c pname that are valid for one but not the other. - */ -GLint __glGetTexEnvfv_size(GLenum pname) -{ - switch (pname) { - case GL_TEXTURE_ENV_MODE: - case GL_TEXTURE_LOD_BIAS: - case GL_COMBINE_RGB: - case GL_COMBINE_ALPHA: - case GL_SOURCE0_RGB: - case GL_SOURCE1_RGB: - case GL_SOURCE2_RGB: - case GL_SOURCE0_ALPHA: - case GL_SOURCE1_ALPHA: - case GL_SOURCE2_ALPHA: - case GL_OPERAND0_RGB: - case GL_OPERAND1_RGB: - case GL_OPERAND2_RGB: - case GL_OPERAND0_ALPHA: - case GL_OPERAND1_ALPHA: - case GL_OPERAND2_ALPHA: - case GL_RGB_SCALE: - case GL_ALPHA_SCALE: - - /* GL_ARB_point_sprite / GL_NV_point_sprite */ - case GL_COORD_REPLACE_ARB: - - /* GL_NV_texture_env_combine4 */ - case GL_SOURCE3_RGB_NV: - case GL_SOURCE3_ALPHA_NV: - case GL_OPERAND3_RGB_NV: - case GL_OPERAND3_ALPHA_NV: - return 1; - - case GL_TEXTURE_ENV_COLOR: - return 4; - default: - return -1; - } -} - - -GLint __glGetTexEnviv_size(GLenum pname) -{ - return __glGetTexEnvfv_size(pname); -} - -GLint __glGetTexGenfv_size(GLenum pname) -{ - switch (pname) { - case GL_TEXTURE_GEN_MODE: - return 1; - case GL_OBJECT_PLANE: - return 4; - case GL_EYE_PLANE: - return 4; - default: - return -1; - } -} - -GLint __glGetTexGendv_size(GLenum pname) -{ - return __glGetTexGenfv_size(pname); -} - -GLint __glGetTexGeniv_size(GLenum pname) -{ - return __glGetTexGenfv_size(pname); -} - -GLint __glGetTexParameterfv_size(GLenum pname) -{ - switch (pname) { - case GL_TEXTURE_BORDER_COLOR: - return 4; - - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - - /* GL_SGIS_texture_lod / GL_EXT_texture_lod / GL 1.2 */ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - - /* GL_SGIX_texture_lod_bias */ - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - - /* GL_ARB_shadow / GL 1.4 */ - case GL_TEXTURE_COMPARE_MODE: - case GL_TEXTURE_COMPARE_FUNC: - - /* GL_SGIS_generate_mipmap / GL 1.4 */ - case GL_GENERATE_MIPMAP: - - /* GL_ARB_depth_texture / GL 1.4 */ - case GL_DEPTH_TEXTURE_MODE: - - /* GL_EXT_texture_lod_bias / GL 1.4 */ - case GL_TEXTURE_LOD_BIAS: - - /* GL_SGIX_shadow_ambient / GL_ARB_shadow_ambient */ - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: - - /* GL_SGIX_shadow */ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - - /* GL_SGIX_texture_coordinate_clamp */ - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - - /* GL_EXT_texture_filter_anisotropic */ - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - - /* GL_NV_texture_expand_normal */ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - - default: - return -1; - } -} - -GLint __glGetTexParameteriv_size(GLenum pname) -{ - return __glGetTexParameterfv_size(pname); -} - -GLint __glGetLightfv_size(GLenum pname) -{ - switch (pname) { - case GL_AMBIENT: - return 4; - case GL_DIFFUSE: - return 4; - case GL_SPECULAR: - return 4; - case GL_POSITION: - return 4; - case GL_SPOT_DIRECTION: - return 3; - case GL_SPOT_EXPONENT: - return 1; - case GL_SPOT_CUTOFF: - return 1; - case GL_CONSTANT_ATTENUATION: - return 1; - case GL_LINEAR_ATTENUATION: - return 1; - case GL_QUADRATIC_ATTENUATION: - return 1; - default: - return -1; - } -} - -GLint __glGetLightiv_size(GLenum pname) -{ - return __glGetLightfv_size(pname); -} - GLint __glGetMap_size(GLenum target, GLenum query) { GLint k, order=0, majorMinor[2]; @@ -250,7 +78,7 @@ GLint __glGetMap_size(GLenum target, GLenum query) switch (query) { case GL_COEFF: k = __glMap1d_size(target); - glGetMapiv(target, GL_ORDER, &order); + CALL_GetMapiv( GET_DISPATCH(), (target, GL_ORDER, &order) ); /* ** The query above might fail, but then order will be zero anyway. */ @@ -274,7 +102,7 @@ GLint __glGetMap_size(GLenum target, GLenum query) case GL_COEFF: k = __glMap2d_size(target); majorMinor[0] = majorMinor[1] = 0; - glGetMapiv(target, GL_ORDER, majorMinor); + CALL_GetMapiv( GET_DISPATCH(), (target, GL_ORDER, majorMinor) ); /* ** The query above might fail, but then majorMinor will be zeroes */ @@ -304,33 +132,6 @@ GLint __glGetMapiv_size(GLenum target, GLenum query) return __glGetMap_size(target, query); } -GLint __glGetMaterialfv_size(GLenum pname) -{ - switch (pname) { - case GL_SHININESS: - return 1; - case GL_COLOR_INDEXES: - return 3; - case GL_EMISSION: - return 4; - case GL_AMBIENT: - return 4; - case GL_DIFFUSE: - return 4; - case GL_SPECULAR: - return 4; - case GL_AMBIENT_AND_DIFFUSE: - return 4; - default: - return -1; - } -} - -GLint __glGetMaterialiv_size(GLenum pname) -{ - return __glGetMaterialfv_size(pname); -} - GLint __glGetPixelMap_size(GLenum map) { GLint size; @@ -370,7 +171,7 @@ GLint __glGetPixelMap_size(GLenum map) default: return -1; } - glGetIntegerv(query, &size); + CALL_GetIntegerv( GET_DISPATCH(), (query, &size) ); return size; } @@ -389,833 +190,9 @@ GLint __glGetPixelMapusv_size(GLenum map) return __glGetPixelMap_size(map); } -/* -** Return the number of words needed to pass back the requested -** value. -*/ -GLint __glGet_size(GLenum sq) -{ - switch (sq) { - case GL_MAX_TEXTURE_SIZE: - return 1; - case GL_SUBPIXEL_BITS: - return 1; - case GL_MAX_LIST_NESTING: - return 1; - case GL_MAP1_COLOR_4: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - return 1; - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - return 1; - case GL_AUTO_NORMAL: - return 1; - case GL_CURRENT_COLOR: - return 4; - case GL_CURRENT_INDEX: - return 1; - case GL_CURRENT_NORMAL: - return 3; - case GL_CURRENT_TEXTURE_COORDS: - return 4; - case GL_CURRENT_RASTER_INDEX: - return 1; - case GL_CURRENT_RASTER_COLOR: - return 4; - case GL_CURRENT_RASTER_TEXTURE_COORDS: - return 4; - case GL_CURRENT_RASTER_POSITION: - return 4; - case GL_CURRENT_RASTER_POSITION_VALID: - return 1; - case GL_CURRENT_RASTER_DISTANCE: - return 1; - case GL_POINT_SIZE: - return 1; - case GL_POINT_SIZE_RANGE: - /* case GL_SMOOTH_POINT_SIZE_RANGE: */ /* alias */ - return 2; - case GL_POINT_SIZE_GRANULARITY: - /* case GL_SMOOTH_POINT_SIZE_GRANULARITY: */ /* alias */ - return 1; - case GL_ALIASED_POINT_SIZE_RANGE: - return 2; - case GL_POINT_SMOOTH: - return 1; - case GL_LINE_SMOOTH: - return 1; - case GL_LINE_WIDTH: - return 1; - case GL_LINE_WIDTH_RANGE: - /* case GL_SMOOTH_LINE_WIDTH_RANGE: */ /* alias */ - return 2; - case GL_LINE_WIDTH_GRANULARITY: - /* case GL_SMOOTH_LINE_WIDTH_GRANULARITY: */ /* alias */ - return 1; - case GL_ALIASED_LINE_WIDTH_RANGE: - return 2; - case GL_LINE_STIPPLE_PATTERN: - return 1; - case GL_LINE_STIPPLE_REPEAT: - return 1; - case GL_LINE_STIPPLE: - return 1; - case GL_POLYGON_MODE: - return 2; - case GL_POLYGON_SMOOTH: - return 1; - case GL_POLYGON_STIPPLE: - return 1; - case GL_EDGE_FLAG: - return 1; - case GL_CULL_FACE: - return 1; - case GL_CULL_FACE_MODE: - return 1; - case GL_FRONT_FACE: - return 1; - case GL_LIGHTING: - return 1; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - return 1; - case GL_LIGHT_MODEL_TWO_SIDE: - return 1; - case GL_LIGHT_MODEL_AMBIENT: - return 4; - case GL_LIGHT_MODEL_COLOR_CONTROL: - return 1; - case GL_COLOR_MATERIAL: - return 1; - case GL_COLOR_MATERIAL_FACE: - return 1; - case GL_COLOR_MATERIAL_PARAMETER: - return 1; - case GL_SHADE_MODEL: - return 1; - case GL_FOG: - return 1; - case GL_FOG_INDEX: - return 1; - case GL_FOG_DENSITY: - return 1; - case GL_FOG_START: - return 1; - case GL_FOG_END: - return 1; - case GL_FOG_MODE: - return 1; - case GL_FOG_COLOR: - return 4; - case GL_DEPTH_RANGE: - return 2; - case GL_DEPTH_TEST: - return 1; - case GL_DEPTH_WRITEMASK: - return 1; - case GL_DEPTH_CLEAR_VALUE: - return 1; - case GL_DEPTH_FUNC: - return 1; - case GL_ACCUM_CLEAR_VALUE: - return 4; - case GL_STENCIL_TEST: - return 1; - case GL_STENCIL_CLEAR_VALUE: - return 1; - case GL_STENCIL_FUNC: - return 1; - case GL_STENCIL_VALUE_MASK: - return 1; - case GL_STENCIL_FAIL: - return 1; - case GL_STENCIL_PASS_DEPTH_FAIL: - return 1; - case GL_STENCIL_PASS_DEPTH_PASS: - return 1; - case GL_STENCIL_REF: - return 1; - case GL_STENCIL_WRITEMASK: - return 1; - case GL_MATRIX_MODE: - return 1; - case GL_NORMALIZE: - return 1; - case GL_VIEWPORT: - return 4; - case GL_ATTRIB_STACK_DEPTH: - return 1; - case GL_MODELVIEW_STACK_DEPTH: - return 1; - case GL_PROJECTION_STACK_DEPTH: - return 1; - case GL_TEXTURE_STACK_DEPTH: - return 1; - case GL_MODELVIEW_MATRIX: - return 16; - case GL_PROJECTION_MATRIX: - return 16; - case GL_TEXTURE_MATRIX: - return 16; - case GL_ALPHA_TEST: - return 1; - case GL_ALPHA_TEST_FUNC: - return 1; - case GL_ALPHA_TEST_REF: - return 1; - case GL_DITHER: - return 1; - case GL_BLEND_DST: - return 1; - case GL_BLEND_SRC: - return 1; - case GL_BLEND: - return 1; - case GL_LOGIC_OP_MODE: - return 1; - case GL_LOGIC_OP: - return 1; - case GL_DRAW_BUFFER: - return 1; - case GL_READ_BUFFER: - return 1; - case GL_SCISSOR_TEST: - return 1; - case GL_SCISSOR_BOX: - return 4; - case GL_INDEX_CLEAR_VALUE: - return 1; - case GL_INDEX_MODE: - return 1; - case GL_INDEX_WRITEMASK: - return 1; - case GL_COLOR_CLEAR_VALUE: - return 4; - case GL_RGBA_MODE: - return 1; - case GL_COLOR_WRITEMASK: - return 4; - case GL_RENDER_MODE: - return 1; - case GL_PERSPECTIVE_CORRECTION_HINT: - return 1; - case GL_POINT_SMOOTH_HINT: - return 1; - case GL_LINE_SMOOTH_HINT: - return 1; - case GL_POLYGON_SMOOTH_HINT: - return 1; - case GL_FOG_HINT: - return 1; - case GL_LIST_BASE: - return 1; - case GL_LIST_INDEX: - return 1; - case GL_LIST_MODE: - return 1; - case GL_TEXTURE_GEN_S: - return 1; - case GL_TEXTURE_GEN_T: - return 1; - case GL_TEXTURE_GEN_R: - return 1; - case GL_TEXTURE_GEN_Q: - return 1; - case GL_PACK_SWAP_BYTES: - return 1; - case GL_PACK_LSB_FIRST: - return 1; - case GL_PACK_ROW_LENGTH: - return 1; - case GL_PACK_IMAGE_HEIGHT: - return 1; - case GL_PACK_SKIP_ROWS: - return 1; - case GL_PACK_SKIP_PIXELS: - return 1; - case GL_PACK_SKIP_IMAGES: - return 1; - case GL_PACK_ALIGNMENT: - return 1; - case GL_UNPACK_SWAP_BYTES: - return 1; - case GL_UNPACK_LSB_FIRST: - return 1; - case GL_UNPACK_ROW_LENGTH: - return 1; - case GL_UNPACK_IMAGE_HEIGHT: - return 1; - case GL_UNPACK_SKIP_ROWS: - return 1; - case GL_UNPACK_SKIP_PIXELS: - return 1; - case GL_UNPACK_SKIP_IMAGES: - return 1; - case GL_UNPACK_ALIGNMENT: - return 1; - case GL_MAP_COLOR: - return 1; - case GL_MAP_STENCIL: - return 1; - case GL_INDEX_SHIFT: - return 1; - case GL_INDEX_OFFSET: - return 1; - case GL_RED_SCALE: - case GL_GREEN_SCALE: - case GL_BLUE_SCALE: - case GL_ALPHA_SCALE: - case GL_DEPTH_SCALE: - return 1; - case GL_RED_BIAS: - case GL_GREEN_BIAS: - case GL_BLUE_BIAS: - case GL_ALPHA_BIAS: - case GL_DEPTH_BIAS: - return 1; - case GL_ZOOM_X: - case GL_ZOOM_Y: - return 1; - case GL_PIXEL_MAP_I_TO_I_SIZE: case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: case GL_PIXEL_MAP_A_TO_A_SIZE: - return 1; - case GL_MAX_EVAL_ORDER: - return 1; - case GL_MAX_LIGHTS: - return 1; - case GL_MAX_CLIP_PLANES: - return 1; - case GL_MAX_PIXEL_MAP_TABLE: - return 1; - case GL_MAX_ATTRIB_STACK_DEPTH: - return 1; - case GL_MAX_MODELVIEW_STACK_DEPTH: - return 1; - case GL_MAX_NAME_STACK_DEPTH: - return 1; - case GL_MAX_PROJECTION_STACK_DEPTH: - return 1; - case GL_MAX_TEXTURE_STACK_DEPTH: - return 1; - case GL_INDEX_BITS: - return 1; - case GL_RED_BITS: - return 1; - case GL_GREEN_BITS: - return 1; - case GL_BLUE_BITS: - return 1; - case GL_ALPHA_BITS: - return 1; - case GL_DEPTH_BITS: - return 1; - case GL_STENCIL_BITS: - return 1; - case GL_ACCUM_RED_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_ALPHA_BITS: - return 1; - case GL_MAP1_GRID_DOMAIN: - return 2; - case GL_MAP1_GRID_SEGMENTS: - return 1; - case GL_MAP2_GRID_DOMAIN: - return 4; - case GL_MAP2_GRID_SEGMENTS: - return 2; - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - return 1; - case GL_NAME_STACK_DEPTH: - return 1; - case GL_MAX_VIEWPORT_DIMS: - return 2; - case GL_DOUBLEBUFFER: - return 1; - case GL_AUX_BUFFERS: - return 1; - case GL_STEREO: - return 1; - case GL_CLIP_PLANE0: case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: case GL_CLIP_PLANE5: - return 1; - case GL_LIGHT0: case GL_LIGHT1: - case GL_LIGHT2: case GL_LIGHT3: - case GL_LIGHT4: case GL_LIGHT5: - case GL_LIGHT6: case GL_LIGHT7: - return 1; - case GL_VERTEX_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_TYPE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_NORMAL_ARRAY: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMAL_ARRAY_STRIDE: - case GL_COLOR_ARRAY: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_ARRAY_STRIDE: - case GL_INDEX_ARRAY: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_EDGE_FLAG_ARRAY: - case GL_EDGE_FLAG_ARRAY_STRIDE: - return 1; - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_BINDING_3D: - return 1; - case GL_BLEND_COLOR: - return 4; - case GL_BLEND_EQUATION: - return 1; - case GL_COLOR_MATRIX: - return 16; - case GL_COLOR_MATRIX_STACK_DEPTH: - return 1; - case GL_COLOR_TABLE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_SEPARABLE_2D: - case GL_HISTOGRAM: - case GL_MINMAX: - return 1; - case GL_POLYGON_OFFSET_FACTOR: - case GL_POLYGON_OFFSET_UNITS: - return 1; - case GL_POST_CONVOLUTION_RED_SCALE: - case GL_POST_CONVOLUTION_GREEN_SCALE: - case GL_POST_CONVOLUTION_BLUE_SCALE: - case GL_POST_CONVOLUTION_ALPHA_SCALE: - case GL_POST_CONVOLUTION_RED_BIAS: - case GL_POST_CONVOLUTION_GREEN_BIAS: - case GL_POST_CONVOLUTION_BLUE_BIAS: - case GL_POST_CONVOLUTION_ALPHA_BIAS: - return 1; - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - return 1; - case GL_RESCALE_NORMAL: - return 1; - case GL_MAX_ELEMENTS_INDICES: - case GL_MAX_ELEMENTS_VERTICES: - return 1; - case GL_ACTIVE_TEXTURE_ARB: - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - case GL_MAX_TEXTURE_UNITS_ARB: - return 1; - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_CONVOLUTION_WIDTH: - case GL_MAX_CONVOLUTION_HEIGHT: - return 1; - case GL_OCCLUSION_TEST_RESULT_HP: - case GL_OCCLUSION_TEST_HP: - return 1; - case GL_PACK_INVERT_MESA: - return 1; - case GL_CULL_VERTEX_IBM: - return 1; - case GL_RASTER_POSITION_UNCLIPPED_IBM: - return 1; - - /* GL_ARB_texture_cube_map / GL 1.3 */ - case GL_TEXTURE_CUBE_MAP: - case GL_TEXTURE_BINDING_CUBE_MAP: - case GL_MAX_CUBE_MAP_TEXTURE_SIZE: - - /* GL_ARB_multisample / GL 1.3 */ - case GL_MULTISAMPLE: - case GL_SAMPLE_ALPHA_TO_COVERAGE: - case GL_SAMPLE_ALPHA_TO_ONE: - case GL_SAMPLE_COVERAGE: - case GL_SAMPLE_BUFFERS: - case GL_SAMPLES: - case GL_SAMPLE_COVERAGE_VALUE: - case GL_SAMPLE_COVERAGE_INVERT: - - /* GL_ARB_texture_comrpession / GL 1.3 */ - case GL_TEXTURE_COMPRESSION_HINT: - case GL_NUM_COMPRESSED_TEXTURE_FORMATS: - - /* GL_EXT_blend_func_separate / GL 1.4 */ - case GL_BLEND_DST_RGB: - case GL_BLEND_SRC_RGB: - case GL_BLEND_DST_ALPHA: - case GL_BLEND_SRC_ALPHA: - - /* GL_EXT_fog_coord / GL 1.4 */ - case GL_CURRENT_FOG_COORD: - case GL_FOG_COORD_ARRAY_TYPE: - case GL_FOG_COORD_ARRAY_STRIDE: - case GL_FOG_COORD_ARRAY: - case GL_FOG_COORD_SRC: - - /* GL_EXT_secondary_color / GL 1.4 */ - case GL_COLOR_SUM: - case GL_SECONDARY_COLOR_ARRAY_SIZE: - case GL_SECONDARY_COLOR_ARRAY_TYPE: - case GL_SECONDARY_COLOR_ARRAY_STRIDE: - case GL_SECONDARY_COLOR_ARRAY: - - /* GL_EXT_texture_lod_bias / GL 1.4 */ - case GL_MAX_TEXTURE_LOD_BIAS: - - /* GL_ARB_point_sprite */ - case GL_POINT_SPRITE_ARB: - - /* GL_ARB_vertex_blend */ - case GL_MAX_VERTEX_UNITS_ARB: - case GL_ACTIVE_VERTEX_UNITS_ARB: - case GL_WEIGHT_SUM_UNITY_ARB: - case GL_VERTEX_BLEND_ARB: - case GL_CURRENT_WEIGHT_ARB: - case GL_WEIGHT_ARRAY_ARB: - case GL_WEIGHT_ARRAY_TYPE_ARB: - case GL_WEIGHT_ARRAY_STRIDE_ARB: - case GL_WEIGHT_ARRAY_SIZE_ARB: - - /* GL_ARB_matrix_palette */ - case GL_MATRIX_PALETTE_ARB: - case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: - case GL_MAX_PALETTE_MATRICES_ARB: - case GL_CURRENT_PALETTE_MATRIX_ARB: - case GL_CURRENT_MATRIX_INDEX_ARB: - case GL_MATRIX_INDEX_ARRAY_ARB: - case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: - case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: - case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: - - /* GL_EXT_clip_volume_hint */ - case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: - - /* GL_EXT_depth_bounds_test */ - case GL_DEPTH_BOUNDS_TEST_EXT: - - /* GL_EXT_stencil_two_size */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - case GL_ACTIVE_STENCIL_FACE_EXT: - - /* GL_EXT_vertex_weighting */ - case GL_VERTEX_WEIGHTING_EXT: - case GL_MODELVIEW0_EXT: - case GL_MODELVIEW1_EXT: - case GL_CURRENT_VERTEX_WEIGHT_EXT: - case GL_VERTEX_WEIGHT_ARRAY_EXT: - case GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT: - case GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT: - case GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT: - /* case GL_MODELVIEW0_STACK_DEPTH_EXT: */ /* alias */ - case GL_MODELVIEW1_STACK_DEPTH_EXT: - - /* GL_EXT_blend_equation_separate */ - /* case GL_BLEND_EQUATION_RGB_EXT: */ /* alias */ - case GL_BLEND_EQUATION_ALPHA_EXT: - - /* GL_ATI_vertex_streams */ - case GL_MAX_VERTEX_STREAMS_ATI: - - /* GL_ATI_draw_buffers */ - case GL_MAX_DRAW_BUFFERS_ATI: - case GL_DRAW_BUFFER0_ATI: - case GL_DRAW_BUFFER1_ATI: - case GL_DRAW_BUFFER2_ATI: - case GL_DRAW_BUFFER3_ATI: - case GL_DRAW_BUFFER4_ATI: - case GL_DRAW_BUFFER5_ATI: - case GL_DRAW_BUFFER6_ATI: - case GL_DRAW_BUFFER7_ATI: - case GL_DRAW_BUFFER8_ATI: - case GL_DRAW_BUFFER9_ATI: - case GL_DRAW_BUFFER10_ATI: - case GL_DRAW_BUFFER11_ATI: - case GL_DRAW_BUFFER12_ATI: - case GL_DRAW_BUFFER13_ATI: - case GL_DRAW_BUFFER14_ATI: - case GL_DRAW_BUFFER15_ATI: - - /* GL_ATI_separate_stencil */ - case GL_STENCIL_BACK_FUNC_ATI: - case GL_STENCIL_BACK_FAIL_ATI: - case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI: - case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI: - - /* GL_NV_depth_clamp */ - case GL_DEPTH_CLAMP_NV: - - /* GL_NV_fog_distance */ - case GL_FOG_DISTANCE_MODE_NV: - - /* GL_NV_light_max_exponent */ - case GL_MAX_SHININESS_NV: - case GL_MAX_SPOT_EXPONENT_NV: - - /* GL_NV_multisample_filter_hint */ - case GL_MULTISAMPLE_FILTER_HINT_NV: - - /* GL_NV_point_sprite */ - /* case GL_POINT_SPRITE_NV: */ /* alias */ - case GL_POINT_SPRITE_R_MODE_NV: - - /* GL_NV_primitive_restart */ - case GL_PRIMITIVE_RESTART_NV: - case GL_PRIMITIVE_RESTART_INDEX_NV: - - /* GL_NV_register_combiners */ - case GL_REGISTER_COMBINERS_NV: - case GL_NUM_GENERAL_COMBINERS_NV: - case GL_COLOR_SUM_CLAMP_NV: - case GL_MAX_GENERAL_COMBINERS_NV: - - /* GL_NV_register_combiners2 */ - case GL_PER_STAGE_CONSTANTS_NV: - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - case GL_TEXTURE_BINDING_RECTANGLE_NV: - case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV: - return 1; - - /* GL_EXT_depth_bounds_test */ - case GL_DEPTH_BOUNDS_EXT: - return 2; - - /* GL_EXT_secondary_color / GL 1.4 */ - case GL_CURRENT_SECONDARY_COLOR: - - /* GL_NV_register_combiners */ - case GL_CONSTANT_COLOR0_NV: - case GL_CONSTANT_COLOR1_NV: - return 4; - - /* GL_ARB_vertex_blend */ - /* case GL_MODELVIEW0_ARB: */ /* alias */ - /* case GL_MODELVIEW1_ARB: */ /* alias */ - case GL_MODELVIEW2_ARB: - case GL_MODELVIEW3_ARB: - case GL_MODELVIEW4_ARB: - case GL_MODELVIEW5_ARB: - case GL_MODELVIEW6_ARB: - case GL_MODELVIEW7_ARB: - case GL_MODELVIEW8_ARB: - case GL_MODELVIEW9_ARB: - case GL_MODELVIEW10_ARB: - case GL_MODELVIEW11_ARB: - case GL_MODELVIEW12_ARB: - case GL_MODELVIEW13_ARB: - case GL_MODELVIEW14_ARB: - case GL_MODELVIEW15_ARB: - case GL_MODELVIEW16_ARB: - case GL_MODELVIEW17_ARB: - case GL_MODELVIEW18_ARB: - case GL_MODELVIEW19_ARB: - case GL_MODELVIEW20_ARB: - case GL_MODELVIEW21_ARB: - case GL_MODELVIEW22_ARB: - case GL_MODELVIEW23_ARB: - case GL_MODELVIEW24_ARB: - case GL_MODELVIEW25_ARB: - case GL_MODELVIEW26_ARB: - case GL_MODELVIEW27_ARB: - case GL_MODELVIEW28_ARB: - case GL_MODELVIEW29_ARB: - case GL_MODELVIEW30_ARB: - case GL_MODELVIEW31_ARB: - - /* GL_EXT_vertex_weighting */ - /* case GL_MODELVIEW0_MATRIX_EXT: */ /* alias */ - case GL_MODELVIEW1_MATRIX_EXT: - return 32; - - /* GL_ARB_texture_comrpession / GL 1.3 */ - case GL_COMPRESSED_TEXTURE_FORMATS: { - GLint temp; - - glGetIntegerv( GL_NUM_COMPRESSED_TEXTURE_FORMATS, & temp ); - return temp; - } - - default: - return -1; - } -} - -GLint __glGetDoublev_size(GLenum sq) -{ - return __glGet_size(sq); -} - -GLint __glGetFloatv_size(GLenum sq) -{ - return __glGet_size(sq); -} - -GLint __glGetIntegerv_size(GLenum sq) -{ - return __glGet_size(sq); -} - -GLint __glGetBooleanv_size(GLenum sq) -{ - return __glGet_size(sq); -} - -GLint __glGetTexLevelParameterfv_size(GLenum pname) -{ - switch (pname) { - case GL_TEXTURE_WIDTH: - case GL_TEXTURE_HEIGHT: - case GL_TEXTURE_DEPTH: - case GL_TEXTURE_COMPONENTS: - case GL_TEXTURE_BORDER: - case GL_TEXTURE_RED_SIZE: - case GL_TEXTURE_GREEN_SIZE: - case GL_TEXTURE_BLUE_SIZE: - case GL_TEXTURE_ALPHA_SIZE: - case GL_TEXTURE_LUMINANCE_SIZE: - case GL_TEXTURE_INTENSITY_SIZE: - - /* GL_ARB_texture_compression / GL 1.3 */ - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - case GL_TEXTURE_COMPRESSED: - - /* GL_ARB_depth_texture / GL 1.4 */ - case GL_TEXTURE_DEPTH_SIZE: - return 1; - - default: - return -1; - } -} - -GLint __glGetTexLevelParameteriv_size(GLenum pname) -{ - return __glGetTexLevelParameterfv_size(pname); -} - GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, GLenum type, GLint width, GLint height, GLint depth) { return __glXImageSize( format, type, target, width, height, depth, 0, 0, 0, 0, 4 ); } - -GLint __glGetConvolutionParameteriv_size(GLenum pname) -{ - switch (pname) { - case GL_CONVOLUTION_BORDER_COLOR: - case GL_CONVOLUTION_FILTER_SCALE: - case GL_CONVOLUTION_FILTER_BIAS: - return 4; - case GL_CONVOLUTION_BORDER_MODE: - case GL_CONVOLUTION_FORMAT: - case GL_CONVOLUTION_WIDTH: - case GL_CONVOLUTION_HEIGHT: - case GL_MAX_CONVOLUTION_WIDTH: - case GL_MAX_CONVOLUTION_HEIGHT: - return 1; - default: - return -1; - } -} - -GLint __glGetConvolutionParameterfv_size(GLenum pname) -{ - return __glGetConvolutionParameteriv_size(pname); -} - - -GLint __glGetHistogramParameterfv_size(GLenum pname) -{ - switch (pname) { - case GL_HISTOGRAM_WIDTH: - case GL_HISTOGRAM_FORMAT: - case GL_HISTOGRAM_RED_SIZE: - case GL_HISTOGRAM_GREEN_SIZE: - case GL_HISTOGRAM_BLUE_SIZE: - case GL_HISTOGRAM_ALPHA_SIZE: - case GL_HISTOGRAM_LUMINANCE_SIZE: - case GL_HISTOGRAM_SINK: - return 1; - default: - return -1; - } -} - -GLint __glGetHistogramParameteriv_size(GLenum pname) -{ - return __glGetHistogramParameterfv_size(pname); -} - -GLint __glGetMinmaxParameterfv_size(GLenum pname) -{ - switch (pname) { - case GL_MINMAX_FORMAT: - case GL_MINMAX_SINK: - return 1; - default: - return -1; - } -} - -GLint __glGetMinmaxParameteriv_size(GLenum pname) -{ - return __glGetMinmaxParameterfv_size(pname); -} - -GLint __glGetColorTableParameterfv_size(GLenum pname) -{ - switch(pname) { - - case GL_COLOR_TABLE_SCALE: /* return RGBA */ - case GL_COLOR_TABLE_BIAS: - return 4; - case GL_COLOR_TABLE_FORMAT: - case GL_COLOR_TABLE_WIDTH: - case GL_COLOR_TABLE_RED_SIZE: - case GL_COLOR_TABLE_GREEN_SIZE: - case GL_COLOR_TABLE_BLUE_SIZE: - case GL_COLOR_TABLE_ALPHA_SIZE: - case GL_COLOR_TABLE_LUMINANCE_SIZE: - case GL_COLOR_TABLE_INTENSITY_SIZE: - return 1; - default: - return 0; - } -} - -GLint __glGetColorTableParameteriv_size(GLenum pname) -{ - return __glGetColorTableParameterfv_size(pname); -} - diff --git a/nx-X11/programs/Xserver/GL/glx/singlesize.h b/nx-X11/programs/Xserver/GL/glx/singlesize.h index 7cd52eae82..1cce1bcbc1 100644 --- a/nx-X11/programs/Xserver/GL/glx/singlesize.h +++ b/nx-X11/programs/Xserver/GL/glx/singlesize.h @@ -44,43 +44,16 @@ extern GLint __glReadPixels_size(GLenum format, GLenum type, GLint width, GLint height); -extern GLint __glGetTexEnvfv_size(GLenum pname); -extern GLint __glGetTexEnviv_size(GLenum pname); -extern GLint __glGetTexGenfv_size(GLenum pname); -extern GLint __glGetTexGendv_size(GLenum pname); -extern GLint __glGetTexGeniv_size(GLenum pname); -extern GLint __glGetTexParameterfv_size(GLenum pname); -extern GLint __glGetTexParameteriv_size(GLenum pname); -extern GLint __glGetLightfv_size(GLenum pname); -extern GLint __glGetLightiv_size(GLenum pname); extern GLint __glGetMap_size(GLenum pname, GLenum query); extern GLint __glGetMapdv_size(GLenum target, GLenum query); extern GLint __glGetMapfv_size(GLenum target, GLenum query); extern GLint __glGetMapiv_size(GLenum target, GLenum query); -extern GLint __glGetMaterialfv_size(GLenum pname); -extern GLint __glGetMaterialiv_size(GLenum pname); extern GLint __glGetPixelMap_size(GLenum map); extern GLint __glGetPixelMapfv_size(GLenum map); extern GLint __glGetPixelMapuiv_size(GLenum map); extern GLint __glGetPixelMapusv_size(GLenum map); -extern GLint __glGet_size(GLenum sq); -extern GLint __glGetDoublev_size(GLenum sq); -extern GLint __glGetFloatv_size(GLenum sq); -extern GLint __glGetIntegerv_size(GLenum sq); -extern GLint __glGetBooleanv_size(GLenum sq); -extern GLint __glGetTexLevelParameterfv_size(GLenum pname); -extern GLint __glGetTexLevelParameteriv_size(GLenum pname); extern GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, GLenum type, GLint width, GLint height, GLint depth); -extern GLint __glGetColorTableParameterfv_size(GLenum pname); -extern GLint __glGetColorTableParameteriv_size(GLenum pname); -extern GLint __glGetConvolutionParameterfv_size(GLenum pname); -extern GLint __glGetConvolutionParameteriv_size(GLenum pname); -extern GLint __glGetHistogramParameterfv_size(GLenum pname); -extern GLint __glGetHistogramParameteriv_size(GLenum pname); -extern GLint __glGetMinmaxParameterfv_size(GLenum pname); -extern GLint __glGetMinmaxParameteriv_size(GLenum pname); #endif /* _singlesize_h_ */ - diff --git a/nx-X11/programs/Xserver/GL/glx/update70/head/Imakefile b/nx-X11/programs/Xserver/GL/glx/update70/head/Imakefile new file mode 100644 index 0000000000..2ee2d17e63 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/update70/head/Imakefile @@ -0,0 +1,178 @@ +NULL = + + +/* Large PIC tables needed for SPARC builds */ +#if defined(sparc) || defined(SparcArchitecture) +# define LargePICTable YES + PICFLAGS = LargePositionIndependentCFlags +#endif + +#include + +LinkSourceFile(glcontextmodes.c, $(MESASRCDIR)/src/mesa/drivers/dri/common) +LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/mesa/drivers/dri/common) +LinkSourceFile(indirect_size.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) + +#if (!(defined(NXAgentServer) && NXAgentServer)) +NXAGENT_SKIP_SRCS = \ + glxext.c \ + $(NULL) +NXAGENT_SKIP_OBJS = \ + glxext.o \ + $(NULL) +#else + NX_DEFINES = -DNXAGENT_SERVER +#endif + + SRCS = global.c \ + glxbuf.c \ + glxcmds.c \ + glxcmdsswap.c \ + glxfb.c \ + glximports.c \ + glxmem.c \ + glxpix.c \ + glxscreens.c \ + glxutil.c \ + render2.c \ + render2swap.c \ + renderpix.c \ + renderpixswap.c \ + rensize.c \ + rensizetab.c \ + single2.c \ + single2swap.c \ + singlepix.c \ + singlepixswap.c \ + singlesize.c \ + xfont.c \ + g_disptab.c \ + g_disptab_EXT.c \ + g_render.c \ + g_renderswap.c \ + g_single.c \ + g_singleswap.c \ + glcontextmodes.c \ + indirect_size.c \ + $(MSRCS) \ + $(NXAGENT_SKIP_SRCS) \ + $(NULL) + + OBJS = global.o \ + glxbuf.o \ + glxcmds.o \ + glxcmdsswap.o \ + glxfb.o \ + glximports.o \ + glxmem.o \ + glxpix.o \ + glxscreens.o \ + glxutil.o \ + render2.o \ + render2swap.o \ + renderpix.o \ + renderpixswap.o \ + rensize.o \ + rensizetab.o \ + single2.o \ + single2swap.o \ + singlepix.o \ + singlepixswap.o \ + singlesize.o \ + xfont.o \ + g_disptab.o \ + g_disptab_EXT.o \ + g_render.o \ + g_renderswap.o \ + g_single.o \ + g_singleswap.o \ + glcontextmodes.o \ + indirect_size.o \ + $(MOBJS) \ + $(NXAGENT_SKIP_OBJS) \ + $(NULL) + + INCLUDES = -I$(SERVERSRC)/GL/glx \ + -I$(SERVERSRC)/GL/include \ + -I$(SERVERSRC)/include \ + -I$(INCLUDESRC) \ + -I$(MESASRCDIR)/include \ + -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/mi \ + -I$(EXTINCSRC) \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) \ + `pkg-config --cflags-only-I pixman-1` \ + $(NULL) + +#if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6) + NO_EXT_DEFS = -DMISSING_GL_EXTS +#endif +#if defined(Win32Architecture) +# undef __stdcall + APIENTRY_DEFS = -DAPIENTRY=__stdcall +#endif + +XCOMM If you add "-DDEBUG" in DEFINES, then make sure you also +XCOMM add DEBUG to the define in ../mesa/src/X/xf86glx.c + DEFINES = \ + $(GLX_DEFINES) \ + $(NO_EXT_DEFS) \ + $(APIENTRY_DEFS) \ + $(NX_DEFINES) \ + $(NULL) + +NormalLibraryObjectRule() +NormalLibraryTarget(glx,$(OBJS)) +#if defined(GlxUseWindows) && GlxUseWindows +clean:: + RemoveFiles($(foreach obj,$(OBJS), stdcall/$(obj))) +includes:: + MakeDir(stdcall) +SpecialObjectRule(stdcall/%.o,%.c,-DUSE_OPENGL32 -o $@) +NormalLibraryTarget(glx_stdcall,$(foreach obj,$(OBJS), stdcall/$(obj))) +#endif +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(glx,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +#ifdef LinkDirectory +LinkSourceFile(global.c,LinkDirectory) +LinkSourceFile(glxbuf.c,LinkDirectory) +LinkSourceFile(glxcmds.c,LinkDirectory) +LinkSourceFile(glxcmdsswap.c,LinkDirectory) +LinkSourceFile(glxext.c,LinkDirectory) +LinkSourceFile(glxfb.c,LinkDirectory) +LinkSourceFile(glximports.c,LinkDirectory) +LinkSourceFile(glxmem.c,LinkDirectory) +LinkSourceFile(glxpix.c,LinkDirectory) +LinkSourceFile(glxscreens.c,LinkDirectory) +LinkSourceFile(glxutil.c,LinkDirectory) +LinkSourceFile(render2.c,LinkDirectory) +LinkSourceFile(render2swap.c,LinkDirectory) +LinkSourceFile(renderpix.c,LinkDirectory) +LinkSourceFile(renderpixswap.c,LinkDirectory) +LinkSourceFile(rensize.c,LinkDirectory) +LinkSourceFile(rensizetab.c,LinkDirectory) +LinkSourceFile(single2.c,LinkDirectory) +LinkSourceFile(single2swap.c,LinkDirectory) +LinkSourceFile(singlepix.c,LinkDirectory) +LinkSourceFile(singlepixswap.c,LinkDirectory) +LinkSourceFile(singlesize.c,LinkDirectory) +LinkSourceFile(xfont.c,LinkDirectory) +LinkSourceFile(g_disptab.c,LinkDirectory) +LinkSourceFile(g_disptab_EXT.c,LinkDirectory) +LinkSourceFile(g_render.c,LinkDirectory) +LinkSourceFile(g_renderswap.c,LinkDirectory) +LinkSourceFile(g_single.c,LinkDirectory) +LinkSourceFile(g_singleswap.c,LinkDirectory) +#endif diff --git a/nx-X11/programs/Xserver/GL/glx/update70/merged/Imakefile b/nx-X11/programs/Xserver/GL/glx/update70/merged/Imakefile new file mode 100644 index 0000000000..c643f24fef --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/update70/merged/Imakefile @@ -0,0 +1,151 @@ +NULL = + + +/* Large PIC tables needed for SPARC builds */ +#if defined(sparc) || defined(SparcArchitecture) +# define LargePICTable YES + PICFLAGS = LargePositionIndependentCFlags +#endif + +#include + +LinkSourceFile(glcontextmodes.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_size.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) + +#if (!(defined(NXAgentServer) && NXAgentServer)) +NXAGENT_SKIP_SRCS = \ + glxext.c \ + $(NULL) +NXAGENT_SKIP_OBJS = \ + glxext.o \ + $(NULL) +#else + NX_DEFINES = -DNXAGENT_SERVER +#endif + + SRCS = global.c \ + glxcmds.c \ + glxcmdsswap.c \ + glxscreens.c \ + glxutil.c \ + render2.c \ + render2swap.c \ + renderpix.c \ + renderpixswap.c \ + rensize.c \ + rensizetab.c \ + single2.c \ + single2swap.c \ + singlepix.c \ + singlepixswap.c \ + singlesize.c \ + xfont.c \ + g_disptab.c \ + g_disptab_EXT.c \ + glcontextmodes.c \ + indirect_size.c \ + $(MSRCS) \ + $(NXAGENT_SKIP_SRCS) \ + $(NULL) + + OBJS = global.o \ + glxcmds.o \ + glxcmdsswap.o \ + glxscreens.o \ + glxutil.o \ + render2.o \ + render2swap.o \ + renderpix.o \ + renderpixswap.o \ + rensize.o \ + rensizetab.o \ + single2.o \ + single2swap.o \ + singlepix.o \ + singlepixswap.o \ + singlesize.o \ + xfont.o \ + g_disptab.o \ + g_disptab_EXT.o \ + glcontextmodes.o \ + indirect_size.o \ + $(MOBJS) \ + $(NXAGENT_SKIP_OBJS) \ + $(NULL) + + INCLUDES = -I$(SERVERSRC)/GL/glx \ + -I$(SERVERSRC)/GL/include \ + -I$(SERVERSRC)/include \ + -I$(INCLUDESRC) \ + -I$(MESASRCDIR)/include \ + -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/mi \ + -I$(EXTINCSRC) \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) \ + `pkg-config --cflags-only-I pixman-1` \ + $(NULL) + +#if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6) + NO_EXT_DEFS = -DMISSING_GL_EXTS +#endif +#if defined(Win32Architecture) +# undef __stdcall + APIENTRY_DEFS = -DAPIENTRY=__stdcall +#endif + +XCOMM If you add "-DDEBUG" in DEFINES, then make sure you also +XCOMM add DEBUG to the define in ../mesa/src/X/xf86glx.c + DEFINES = \ + $(GLX_DEFINES) \ + $(NO_EXT_DEFS) \ + $(APIENTRY_DEFS) \ + $(NX_DEFINES) \ + $(NULL) + +NormalLibraryObjectRule() +NormalLibraryTarget(glx,$(OBJS)) +#if defined(GlxUseWindows) && GlxUseWindows +clean:: + RemoveFiles($(foreach obj,$(OBJS), stdcall/$(obj))) +includes:: + MakeDir(stdcall) +SpecialObjectRule(stdcall/%.o,%.c,-DUSE_OPENGL32 -o $@) +NormalLibraryTarget(glx_stdcall,$(foreach obj,$(OBJS), stdcall/$(obj))) +#endif +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(glx,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +#ifdef LinkDirectory +LinkSourceFile(global.c,LinkDirectory) +LinkSourceFile(glxcmds.c,LinkDirectory) +LinkSourceFile(glxcmdsswap.c,LinkDirectory) +LinkSourceFile(glxext.c,LinkDirectory) +LinkSourceFile(glxscreens.c,LinkDirectory) +LinkSourceFile(glxutil.c,LinkDirectory) +LinkSourceFile(render2.c,LinkDirectory) +LinkSourceFile(render2swap.c,LinkDirectory) +LinkSourceFile(renderpix.c,LinkDirectory) +LinkSourceFile(renderpixswap.c,LinkDirectory) +LinkSourceFile(rensize.c,LinkDirectory) +LinkSourceFile(rensizetab.c,LinkDirectory) +LinkSourceFile(single2.c,LinkDirectory) +LinkSourceFile(single2swap.c,LinkDirectory) +LinkSourceFile(singlepix.c,LinkDirectory) +LinkSourceFile(singlepixswap.c,LinkDirectory) +LinkSourceFile(singlesize.c,LinkDirectory) +LinkSourceFile(xfont.c,LinkDirectory) +LinkSourceFile(g_disptab.c,LinkDirectory) +LinkSourceFile(g_disptab_EXT.c,LinkDirectory) +#endif diff --git a/nx-X11/programs/Xserver/GL/glx/update70/nxorig/Imakefile b/nx-X11/programs/Xserver/GL/glx/update70/nxorig/Imakefile new file mode 100644 index 0000000000..5283e22862 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/update70/nxorig/Imakefile @@ -0,0 +1,118 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/glx/Imakefile,v 1.11 2004/01/28 18:11:50 alanh Exp $ + +#if DoLoadableServer +# if !BuildModuleInSubdir +# define IHaveModules +# elif !defined(IHaveModules) +# define IHaveSubdirs +SUBDIRS = module +# endif +#endif + +/* Large PIC tables needed for SPARC builds */ +#if defined(sparc) || defined(SparcArchitecture) +# define LargePICTable YES + PICFLAGS = LargePositionIndependentCFlags +#endif + +#include + +LinkSourceFile(glcontextmodes.c, $(MESASRCDIR)/src/mesa/drivers/dri/common) +LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/mesa/drivers/dri/common) +LinkSourceFile(indirect_size.c, $(MESASRCDIR)/src/glx/x11) +LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) + + SRCS = global.c glxbuf.c glxcmds.c glxcmdsswap.c glxext.c \ + glxfb.c glximports.c glxmem.c glxpix.c glxscreens.c \ + glxutil.c render2.c render2swap.c renderpix.c \ + renderpixswap.c rensize.c rensizetab.c single2.c \ + single2swap.c singlepix.c singlepixswap.c \ + singlesize.c xfont.c g_disptab.c g_disptab_EXT.c \ + g_render.c g_renderswap.c g_single.c g_singleswap.c \ + glcontextmodes.c indirect_size.c $(MSRCS) + + OBJS = global.o glxbuf.o glxcmds.o glxcmdsswap.o glxext.o \ + glxfb.o glximports.o glxmem.o glxpix.o glxscreens.o \ + glxutil.o render2.o render2swap.o renderpix.o \ + renderpixswap.o rensize.o rensizetab.o single2.o \ + single2swap.o singlepix.o singlepixswap.o \ + singlesize.o xfont.o g_disptab.o g_disptab_EXT.o \ + g_render.o g_renderswap.o g_single.o g_singleswap.o \ + glcontextmodes.o indirect_size.o $(MOBJS) + + INCLUDES = -I$(SERVERSRC)/GL/glx -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/include -I$(INCLUDESRC) -I$(MESASRCDIR)/include \ + -I$(XINCLUDESRC) -I$(SERVERSRC)/mi \ + -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) + +#if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6) + NO_EXT_DEFS = -DMISSING_GL_EXTS +#endif +#if defined(Win32Architecture) +# undef __stdcall + APIENTRY_DEFS = -DAPIENTRY=__stdcall +#endif + +XCOMM If you add "-DDEBUG" in DEFINES, then make sure you also +XCOMM add DEBUG to the define in ../mesa/src/X/xf86glx.c + DEFINES = $(GLX_DEFINES) $(NO_EXT_DEFS) $(APIENTRY_DEFS) + + +#ifdef IHaveModules +ModuleObjectRule() +LibraryModuleTarget(glx,$(OBJS)) +#else +NormalLibraryObjectRule() +NormalLibraryTarget(glx,$(OBJS)) +#if defined(GlxUseWindows) && GlxUseWindows +clean:: + RemoveFiles($(foreach obj,$(OBJS), stdcall/$(obj))) +includes:: + MakeDir(stdcall) +SpecialObjectRule(stdcall/%.o,%.c,-DUSE_OPENGL32 -o $@) +NormalLibraryTarget(glx_stdcall,$(foreach obj,$(OBJS), stdcall/$(obj))) +#endif +#endif +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(glx,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +#ifdef LinkDirectory +LinkSourceFile(global.c,LinkDirectory) +LinkSourceFile(glxbuf.c,LinkDirectory) +LinkSourceFile(glxcmds.c,LinkDirectory) +LinkSourceFile(glxcmdsswap.c,LinkDirectory) +LinkSourceFile(glxext.c,LinkDirectory) +LinkSourceFile(glxfb.c,LinkDirectory) +LinkSourceFile(glximports.c,LinkDirectory) +LinkSourceFile(glxmem.c,LinkDirectory) +LinkSourceFile(glxpix.c,LinkDirectory) +LinkSourceFile(glxscreens.c,LinkDirectory) +LinkSourceFile(glxutil.c,LinkDirectory) +LinkSourceFile(render2.c,LinkDirectory) +LinkSourceFile(render2swap.c,LinkDirectory) +LinkSourceFile(renderpix.c,LinkDirectory) +LinkSourceFile(renderpixswap.c,LinkDirectory) +LinkSourceFile(rensize.c,LinkDirectory) +LinkSourceFile(rensizetab.c,LinkDirectory) +LinkSourceFile(single2.c,LinkDirectory) +LinkSourceFile(single2swap.c,LinkDirectory) +LinkSourceFile(singlepix.c,LinkDirectory) +LinkSourceFile(singlepixswap.c,LinkDirectory) +LinkSourceFile(singlesize.c,LinkDirectory) +LinkSourceFile(xfont.c,LinkDirectory) +LinkSourceFile(g_disptab.c,LinkDirectory) +LinkSourceFile(g_disptab_EXT.c,LinkDirectory) +LinkSourceFile(g_render.c,LinkDirectory) +LinkSourceFile(g_renderswap.c,LinkDirectory) +LinkSourceFile(g_single.c,LinkDirectory) +LinkSourceFile(g_singleswap.c,LinkDirectory) +#endif diff --git a/nx-X11/programs/Xserver/GL/glx/update70/nxorig/module/Imakefile b/nx-X11/programs/Xserver/GL/glx/update70/nxorig/module/Imakefile new file mode 100644 index 0000000000..d063bc28d3 --- /dev/null +++ b/nx-X11/programs/Xserver/GL/glx/update70/nxorig/module/Imakefile @@ -0,0 +1,4 @@ +#define IHaveModules +#define LinkDirectory .. + +#include "../Imakefile" diff --git a/nx-X11/programs/Xserver/GL/glx/xfont.c b/nx-X11/programs/Xserver/GL/glx/xfont.c index 780183609b..6f1feb0f4a 100644 --- a/nx-X11/programs/Xserver/GL/glx/xfont.c +++ b/nx-X11/programs/Xserver/GL/glx/xfont.c @@ -39,8 +39,12 @@ #include "glxserver.h" #include "glxutil.h" +#include "unpack.h" #include "g_disptab.h" -#include +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" #include #include #include @@ -94,8 +98,10 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) pglyph -= widthPadded; p += widthPadded; } - glBitmap(w, h, -pci->metrics.leftSideBearing, pci->metrics.descent, - pci->metrics.characterWidth, 0, allocbuf ? allocbuf : buf); + CALL_Bitmap( GET_DISPATCH(), (w, h, -pci->metrics.leftSideBearing, + pci->metrics.descent, + pci->metrics.characterWidth, 0, + allocbuf ? allocbuf : buf) ); if (allocbuf) { free(allocbuf); @@ -118,12 +124,12 @@ MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base) int rv; /* return value */ int encoding = (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit; - glPixelStorei(GL_UNPACK_SWAP_BYTES, FALSE); - glPixelStorei(GL_UNPACK_LSB_FIRST, BITMAP_BIT_ORDER == LSBFirst); - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, GLYPHPADBYTES); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, FALSE) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, BITMAP_BIT_ORDER == LSBFirst) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, 0) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, 0) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, 0) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, GLYPHPADBYTES) ); for (i=0; i < count; i++) { chs[0] = (first + i) >> 8; /* high byte is first byte */ chs[1] = first + i; @@ -134,14 +140,14 @@ MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base) /* ** Define a display list containing just a glBitmap() call. */ - glNewList(list_base + i, GL_COMPILE); + CALL_NewList( GET_DISPATCH(), (list_base + i, GL_COMPILE) ); if (nglyphs ) { rv = __glXMakeBitmapFromGlyph(pFont, pci); if (rv) { return rv; } } - glEndList(); + CALL_EndList( GET_DISPATCH(), () ); } return Success; } @@ -164,7 +170,7 @@ int __glXUseXFont(__GLXclientState *cl, GLbyte *pc) return error; } - glGetIntegerv(GL_LIST_INDEX, (GLint*) ¤tListIndex); + CALL_GetIntegerv( GET_DISPATCH(), (GL_LIST_INDEX, (GLint*) ¤tListIndex) ); if (currentListIndex != 0) { /* ** A display list is currently being made. It is an error diff --git a/nx-X11/programs/Xserver/GL/include/GL/glx_ansic.h b/nx-X11/programs/Xserver/GL/include/GL/glx_ansic.h deleted file mode 100644 index 2f7cff193b..0000000000 --- a/nx-X11/programs/Xserver/GL/include/GL/glx_ansic.h +++ /dev/null @@ -1,5 +0,0 @@ -/* no-op file to make current Mesa happy */ - -#ifndef _glx_ansic_h_ -#define _glx_ansic_h_ -#endif diff --git a/nx-X11/programs/Xserver/GL/mesa/GLcore/Imakefile b/nx-X11/programs/Xserver/GL/mesa/GLcore/Imakefile index 5fb93b3646..22bf7a1e9c 100644 --- a/nx-X11/programs/Xserver/GL/mesa/GLcore/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/GLcore/Imakefile @@ -3,20 +3,20 @@ #define NeedAllMesaSrc #define MesaInXServer #define MesaBuildDir ../main/ -#define MesaACBuildDir ../array_cache/ #define MesaMathBuildDir ../math/ #define MesaSwrastBuildDir ../swrast/ #define MesaSwrastSetupBuildDir ../swrast_setup/ #define MesaTnlBuildDir ../tnl/ +#define MesaVboBuildDir ../vbo/ #define MesaShaderBuildDir ../shader/ #define MesaGrammarBuildDir ../shader/grammar/ #define MesaSlangBuildDir ../shader/slang/ #define MesaXBuildDir ../X/ -#include "../array_cache/Imakefile.inc" #include "../swrast/Imakefile.inc" #include "../swrast_setup/Imakefile.inc" #include "../tnl/Imakefile.inc" +#include "../vbo/Imakefile.inc" #include "../main/Imakefile.inc" #include "../math/Imakefile.inc" #include "../shader/Imakefile.inc" @@ -29,9 +29,9 @@ OBJS = $(COREMESAOBJS) $(MOBJS) - DONES = ../main/DONE ../X/DONE ../array_cache/DONE \ + DONES = ../main/DONE ../X/DONE \ ../math/DONE ../swrast/DONE ../swrast_setup/DONE \ - ../tnl/DONE ../shader/DONE ../shader/grammar/DONE \ + ../tnl/DONE ../vbo/DONE ../shader/DONE ../shader/grammar/DONE \ ../shader/slang/DONE INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ diff --git a/nx-X11/programs/Xserver/GL/mesa/Imakefile b/nx-X11/programs/Xserver/GL/mesa/Imakefile index f1dbbe1019..a4362640a9 100644 --- a/nx-X11/programs/Xserver/GL/mesa/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/Imakefile @@ -1,5 +1,5 @@ #define IHaveSubdirs - SUBDIRS = main math array_cache swrast swrast_setup tnl shader X GLcore $(MODSUBDIR) + SUBDIRS = main math swrast swrast_setup tnl vbo shader X GLcore $(MODSUBDIR) #include diff --git a/nx-X11/programs/Xserver/GL/mesa/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/Imakefile.inc index 1bff5782e0..503d404f90 100644 --- a/nx-X11/programs/Xserver/GL/mesa/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/Imakefile.inc @@ -6,6 +6,7 @@ COREMESASRCS = $(COREMESABASESRCS) \ $(MESA_SWRAST_SRCS) \ $(MESA_SWR_SETUP_SRCS) \ $(MESA_TNL_SRCS) \ + $(MESA_VBO_SRCS) \ $(MESA_SHADER_SRCS) \ $(MESA_GRAMMAR_SRCS) \ $(MESA_SLANG_SRCS) @@ -16,6 +17,7 @@ COREMESAOBJS = $(COREMESABASEOBJS) \ $(MESA_SWRAST_OBJS) \ $(MESA_SWR_SETUP_OBJS) \ $(MESA_TNL_OBJS) \ + $(MESA_VBO_OBJS) \ $(MESA_SHADER_OBJS) \ $(MESA_GRAMMAR_OBJS) \ $(MESA_SLANG_OBJS) @@ -26,6 +28,7 @@ COREMESAUOBJS = $(COREMESABASEUOBJS) \ $(MESA_SWRAST_UOBJS) \ $(MESA_SWR_SETUP_UOBJS) \ $(MESA_TNL_UOBJS) \ + $(MESA_VBO_UOBJS) \ $(MESA_SHADER_UOBJS) \ $(MESA_GRAMMAR_UOBJS) \ $(MESA_SLANG_UOBJS) @@ -36,6 +39,7 @@ COREMESADOBJS = $(COREMESABASEDOBJS) \ $(MESA_SWRAST_DOBJS) \ $(MESA_SWR_SETUP_DOBJS) \ $(MESA_TNL_DOBJS) \ + $(MESA_VBO_DOBJS) \ $(MESA_SHADER_DOBJS) \ $(MESA_GRAMMAR_DOBJS) \ $(MESA_SLANG_DOBJS) @@ -46,6 +50,7 @@ COREMESAPOBJS = $(COREMESABASEPOBJS) \ $(MESA_SWRAST_POBJS) \ $(MESA_SWR_SETUP_POBJS) \ $(MESA_TNL_POBJS) \ + $(MESA_VBO_POBJS) \ $(MESA_SHADER_POBJS) \ $(MESA_GRAMMAR_POBJS) \ $(MESA_SLANG_POBJS) diff --git a/nx-X11/programs/Xserver/GL/mesa/X/Imakefile b/nx-X11/programs/Xserver/GL/mesa/X/Imakefile index f8812e0965..8333c1c787 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/X/Imakefile @@ -15,8 +15,8 @@ LinkSourceFile(compsize.c,$(MESASRCDIR)/src/glx/x11) COMMON_SRCS = driverfuncs.c COMMON_OBJS = driverfuncs.o - GLX_SRCS = xf86glx.c xf86glx_util.c compsize.c - GLX_OBJS = xf86glx.o xf86glx_util.o compsize.o + GLX_SRCS = compsize.c + GLX_OBJS = compsize.o SRCS = $(DRIVER_SRCS) $(GLX_SRCS) $(COMMON_SRCS) OBJS = $(DRIVER_OBJS) $(GLX_OBJS) $(COMMON_OBJS) @@ -26,6 +26,7 @@ LinkSourceFile(compsize.c,$(MESASRCDIR)/src/glx/x11) -I$(MESASRCDIR)/src/mesa \ -I$(MESASRCDIR)/src/mesa/main \ -I$(MESASRCDIR)/src/mesa/glapi \ + -I$(MESASRCDIR)/src/glx/x11 \ -I$(MESASRCDIR)/src/mesa/shader \ -I$(MESASRCDIR)/src -I$(MESASRCDIR)/src/mesa/drivers/x11 \ -I$(MESASRCDIR)/include \ diff --git a/nx-X11/programs/Xserver/GL/mesa/X/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/X/Imakefile.inc index 67eaf78045..b99ea4f192 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/X/Imakefile.inc @@ -11,6 +11,7 @@ XMESA_GLX_SRCS = $(MESAXBUILDDIR)fakeglx.c \ $(MESAXBUILDDIR)xm_api.c \ $(MESAXBUILDDIR)xm_buffer.c \ $(MESAXBUILDDIR)xm_dd.c \ + $(MESAXBUILDDIR)xm_image.c \ $(MESAXBUILDDIR)xm_line.c \ $(MESAXBUILDDIR)xm_span.c \ $(MESAXBUILDDIR)xm_tri.c @@ -26,6 +27,7 @@ LinkSourceFile(xfonts.c, $(MESASRCDIR)/src/mesa/drivers/x11) LinkSourceFile(xm_api.c, $(MESASRCDIR)/src/mesa/drivers/x11) LinkSourceFile(xm_buffer.c, $(MESASRCDIR)/src/mesa/drivers/x11) LinkSourceFile(xm_dd.c, $(MESASRCDIR)/src/mesa/drivers/x11) +LinkSourceFile(xm_image.c, $(MESASRCDIR)/src/mesa/drivers/x11) LinkSourceFile(xm_line.c, $(MESASRCDIR)/src/mesa/drivers/x11) LinkSourceFile(xm_span.c, $(MESASRCDIR)/src/mesa/drivers/x11) LinkSourceFile(xm_tri.c, $(MESASRCDIR)/src/mesa/drivers/x11) @@ -42,6 +44,7 @@ XMESA_GLX_OBJS = $(MESAXBUILDDIR)fakeglx.o \ $(MESAXBUILDDIR)xm_api.o \ $(MESAXBUILDDIR)xm_buffer.o \ $(MESAXBUILDDIR)xm_dd.o \ + $(MESAXBUILDDIR)xm_image.o \ $(MESAXBUILDDIR)xm_line.o \ $(MESAXBUILDDIR)xm_span.o \ $(MESAXBUILDDIR)xm_tri.o @@ -58,6 +61,7 @@ XMESA_GLX_UOBJS = $(MESAXBUILDDIR)unshared/fakeglx.o \ $(MESAXBUILDDIR)unshared/xm_api.o \ $(MESAXBUILDDIR)unshared/xm_buffer.o \ $(MESAXBUILDDIR)unshared/xm_dd.o \ + $(MESAXBUILDDIR)unshared/xm_image.o \ $(MESAXBUILDDIR)unshared/xm_line.o \ $(MESAXBUILDDIR)unshared/xm_span.o \ $(MESAXBUILDDIR)unshared/xm_tri.o @@ -77,6 +81,7 @@ XMESA_GLX_DOBJS = $(MESAXBUILDDIR)debugger/fakeglx.o \ $(MESAXBUILDDIR)debugger/xm_api.o \ $(MESAXBUILDDIR)debugger/xm_buffer.o \ $(MESAXBUILDDIR)debugger/xm_dd.o \ + $(MESAXBUILDDIR)debugger/xm_image.o \ $(MESAXBUILDDIR)debugger/xm_line.o \ $(MESAXBUILDDIR)debugger/xm_span.o \ $(MESAXBUILDDIR)debugger/xm_tri.o @@ -92,6 +97,7 @@ XMESA_GLX_POBJS = $(MESAXBUILDDIR)profiled/fakeglx.o \ $(MESAXBUILDDIR)profiled/xm_api.o \ $(MESAXBUILDDIR)profiled/xm_buffer.o \ $(MESAXBUILDDIR)profiled/xm_dd.o \ + $(MESAXBUILDDIR)profiled/xm_iamge.o \ $(MESAXBUILDDIR)profiled/xm_line.o \ $(MESAXBUILDDIR)profiled/xm_span.o \ $(MESAXBUILDDIR)profiled/xm_tri.o diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c deleted file mode 100644 index da0e771346..0000000000 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx.c +++ /dev/null @@ -1,950 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Brian E. Paul - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "xf86glxint.h" -#include "context.h" -#include "xmesaP.h" -#include "context.h" - -/* - * This define is for the glcore.h header file. - * If you add it here, then make sure you also add it in - * ../../../glx/Imakefile. - */ -#if 0 -#define DEBUG -#include -#undef DEBUG -#else -#include -#endif - -#include "glcontextmodes.h" - -#ifdef NXAGENT_SERVER -#include "../main/WSDrawBuffer.h" -#endif - -/* - * This structure is statically allocated in the __glXScreens[] - * structure. This struct is not used anywhere other than in - * __glXScreenInit to initialize each of the active screens - * (__glXActiveScreens[]). Several of the fields must be initialized by - * the screenProbe routine before they are copied to the active screens - * struct. In particular, the contextCreate, pGlxVisual, numVisuals, - * and numUsableVisuals fields must be initialized. - */ -static __GLXscreenInfo __glDDXScreenInfo = { - __MESA_screenProbe, /* Must be generic and handle all screens */ - __MESA_createContext, /* Substitute screen's createContext routine */ - __MESA_createBuffer, /* Substitute screen's createBuffer routine */ - NULL, /* Set up modes in probe */ - NULL, /* Set up pVisualPriv in probe */ - 0, /* Set up numVisuals in probe */ - 0, /* Set up numUsableVisuals in probe */ - NULL, /* GLextensions is overwritten by __glXScreenInit */ - "Vendor String", /* GLXvendor is overwritten by __glXScreenInit */ - "Version String", /* GLXversion is overwritten by __glXScreenInit */ - "Extensions String", /* GLXextensions is overwritten by __glXScreenInit */ - NULL /* WrappedPositionWindow is overwritten */ -}; - -#ifdef NXAGENT_SERVER -WSDrawBufferPtr pWSDrawBuffer = NULL; - -void AddWSDrawBuffer(GLframebuffer *mesa_buffer) -{ - WSDrawBufferPtr prevWSDB; - WSDrawBufferPtr newWSDB; - WSDrawBufferPtr p; - - prevWSDB = NULL; - newWSDB = NULL; - p = pWSDrawBuffer; - while (p != NULL) { - prevWSDB = p; - if (prevWSDB -> DrawBuffer == mesa_buffer) { - return; - } - p = p -> next; - } - newWSDB = malloc(sizeof(WSDrawBufferRec)); - newWSDB -> DrawBuffer = mesa_buffer; - newWSDB -> next = NULL; - - if (pWSDrawBuffer == NULL) - pWSDrawBuffer = newWSDB; - else - prevWSDB -> next = newWSDB; -} -#endif - -void *__glXglDDXScreenInfo(void) { - return &__glDDXScreenInfo; -} - -static __GLXextensionInfo __glDDXExtensionInfo = { - GL_CORE_MESA, - __MESA_resetExtension, - __MESA_initVisuals, - __MESA_setVisualConfigs -}; - -void *__glXglDDXExtensionInfo(void) { - return &__glDDXExtensionInfo; -} - -static __MESA_screen MESAScreens[MAXSCREENS]; -static __GLcontext *MESA_CC = NULL; - -static int numConfigs = 0; -static __GLXvisualConfig *visualConfigs = NULL; -static void **visualPrivates = NULL; - - -static int count_bits(unsigned int n) -{ - int bits = 0; - - while (n > 0) { - if (n & 1) bits++; - n >>= 1; - } - return bits; -} - - -static XMesaVisual find_mesa_visual(int screen, VisualID vid) -{ - __MESA_screen * const pMScr = &MESAScreens[screen]; - const __GLcontextModes *modes; - unsigned i = 0; - - for ( modes = pMScr->modes ; modes != NULL ; modes = modes->next ) { - if ( modes->visualID == vid ) { - break; - } - - i++; - } - - return (modes != NULL) ? pMScr->xm_vis[i] : NULL; -} - - -/* - * In the case the driver defines no GLX visuals we'll use these. - * Note that for TrueColor and DirectColor visuals, bufferSize is the - * sum of redSize, greenSize, blueSize and alphaSize, which may be larger - * than the nplanes/rootDepth of the server's X11 visuals - */ -#define NUM_FALLBACK_CONFIGS 5 -static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = { - /* [0] = RGB, double buffered, Z */ - { - -1, /* vid */ - -1, /* class */ - True, /* rgba */ - -1, -1, -1, 0, /* rgba sizes */ - -1, -1, -1, 0, /* rgba masks */ - 0, 0, 0, 0, /* rgba accum sizes */ - True, /* doubleBuffer */ - False, /* stereo */ - -1, /* bufferSize */ - 16, /* depthSize */ - 0, /* stencilSize */ - 0, /* auxBuffers */ - 0, /* level */ - GLX_NONE, /* visualRating */ - GLX_NONE, /* transparentPixel */ - 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ - 0 /* transparentIndex */ - }, - /* [1] = RGB, double buffered, Z, stencil, accum */ - { - -1, /* vid */ - -1, /* class */ - True, /* rgba */ - -1, -1, -1, 0, /* rgba sizes */ - -1, -1, -1, 0, /* rgba masks */ - 16, 16, 16, 0, /* rgba accum sizes */ - True, /* doubleBuffer */ - False, /* stereo */ - -1, /* bufferSize */ - 16, /* depthSize */ - 8, /* stencilSize */ - 0, /* auxBuffers */ - 0, /* level */ - GLX_NONE, /* visualRating */ - GLX_NONE, /* transparentPixel */ - 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ - 0 /* transparentIndex */ - }, - /* [2] = RGB+Alpha, double buffered, Z, stencil, accum */ - { - -1, /* vid */ - -1, /* class */ - True, /* rgba */ - -1, -1, -1, 8, /* rgba sizes */ - -1, -1, -1, -1, /* rgba masks */ - 16, 16, 16, 16, /* rgba accum sizes */ - True, /* doubleBuffer */ - False, /* stereo */ - -1, /* bufferSize */ - 16, /* depthSize */ - 8, /* stencilSize */ - 0, /* auxBuffers */ - 0, /* level */ - GLX_NONE, /* visualRating */ - GLX_NONE, /* transparentPixel */ - 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ - 0 /* transparentIndex */ - }, - /* [3] = RGB+Alpha, single buffered, Z, stencil, accum */ - { - -1, /* vid */ - -1, /* class */ - True, /* rgba */ - -1, -1, -1, 8, /* rgba sizes */ - -1, -1, -1, -1, /* rgba masks */ - 16, 16, 16, 16, /* rgba accum sizes */ - False, /* doubleBuffer */ - False, /* stereo */ - -1, /* bufferSize */ - 16, /* depthSize */ - 8, /* stencilSize */ - 0, /* auxBuffers */ - 0, /* level */ - GLX_NONE, /* visualRating */ - GLX_NONE, /* transparentPixel */ - 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ - 0 /* transparentIndex */ - }, - /* [4] = CI, double buffered, Z */ - { - -1, /* vid */ - -1, /* class */ - False, /* rgba? (false = color index) */ - -1, -1, -1, 0, /* rgba sizes */ - -1, -1, -1, 0, /* rgba masks */ - 0, 0, 0, 0, /* rgba accum sizes */ - True, /* doubleBuffer */ - False, /* stereo */ - -1, /* bufferSize */ - 16, /* depthSize */ - 0, /* stencilSize */ - 0, /* auxBuffers */ - 0, /* level */ - GLX_NONE, /* visualRating */ - GLX_NONE, /* transparentPixel */ - 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ - 0 /* transparentIndex */ - }, -}; - - -static Bool init_visuals(int *nvisualp, VisualPtr *visualp, - VisualID *defaultVisp, - int ndepth, DepthPtr pdepth, - int rootDepth) -{ - int numRGBconfigs; - int numCIconfigs; - int numVisuals = *nvisualp; - int numNewVisuals; - int numNewConfigs; - VisualPtr pVisual = *visualp; - VisualPtr pVisualNew = NULL; - VisualID *orig_vid = NULL; - __GLcontextModes *modes; - __GLXvisualConfig *pNewVisualConfigs = NULL; - void **glXVisualPriv; - void **pNewVisualPriv; - int found_default; - int i, j, k; - - if (numConfigs > 0) - numNewConfigs = numConfigs; - else - numNewConfigs = NUM_FALLBACK_CONFIGS; - - /* Alloc space for the list of new GLX visuals */ - pNewVisualConfigs = (__GLXvisualConfig *) - malloc(numNewConfigs * sizeof(__GLXvisualConfig)); - if (!pNewVisualConfigs) { - return FALSE; - } - - /* Alloc space for the list of new GLX visual privates */ - pNewVisualPriv = (void **) malloc(numNewConfigs * sizeof(void *)); - if (!pNewVisualPriv) { - free(pNewVisualConfigs); - return FALSE; - } - - /* - ** If SetVisualConfigs was not called, then use default GLX - ** visual configs. - */ - if (numConfigs == 0) { - memcpy(pNewVisualConfigs, FallbackConfigs, - NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig)); - memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *)); - } - else { - /* copy driver's visual config info */ - for (i = 0; i < numConfigs; i++) { - pNewVisualConfigs[i] = visualConfigs[i]; - pNewVisualPriv[i] = visualPrivates[i]; - } - } - - /* Count the number of RGB and CI visual configs */ - numRGBconfigs = 0; - numCIconfigs = 0; - for (i = 0; i < numNewConfigs; i++) { - if (pNewVisualConfigs[i].rgba) - numRGBconfigs++; - else - numCIconfigs++; - } - - /* Count the total number of visuals to compute */ - numNewVisuals = 0; - for (i = 0; i < numVisuals; i++) { - numNewVisuals += - (pVisual[i].class == TrueColor || pVisual[i].class == DirectColor) - ? numRGBconfigs : numCIconfigs; - } - - /* Reset variables for use with the next screen/driver's visual configs */ - visualConfigs = NULL; - numConfigs = 0; - - /* Alloc temp space for the list of orig VisualIDs for each new visual */ - orig_vid = (VisualID *)malloc(numNewVisuals * sizeof(VisualID)); - if (!orig_vid) { - free(pNewVisualPriv); - free(pNewVisualConfigs); - return FALSE; - } - - /* Alloc space for the list of glXVisuals */ - modes = _gl_context_modes_create(numNewVisuals, sizeof(__GLcontextModes)); - if (modes == NULL) { - free(orig_vid); - free(pNewVisualPriv); - free(pNewVisualConfigs); - return FALSE; - } - - /* Alloc space for the list of glXVisualPrivates */ - glXVisualPriv = (void **)malloc(numNewVisuals * sizeof(void *)); - if (!glXVisualPriv) { - _gl_context_modes_destroy( modes ); - free(orig_vid); - free(pNewVisualPriv); - free(pNewVisualConfigs); - return FALSE; - } - - /* Alloc space for the new list of the X server's visuals */ - pVisualNew = (VisualPtr)malloc(numNewVisuals * sizeof(VisualRec)); - if (!pVisualNew) { - free(glXVisualPriv); - _gl_context_modes_destroy( modes ); - free(orig_vid); - free(pNewVisualPriv); - free(pNewVisualConfigs); - return FALSE; - } - - /* Initialize the new visuals */ - found_default = FALSE; - MESAScreens[screenInfo.numScreens-1].modes = modes; - for (i = j = 0; i < numVisuals; i++) { - int is_rgb = (pVisual[i].class == TrueColor || - pVisual[i].class == DirectColor); - - for (k = 0; k < numNewConfigs; k++) { - if (pNewVisualConfigs[k].rgba != is_rgb) - continue; - - assert( modes != NULL ); - - /* Initialize the new visual */ - pVisualNew[j] = pVisual[i]; - pVisualNew[j].vid = FakeClientID(0); - - /* Check for the default visual */ - if (!found_default && pVisual[i].vid == *defaultVisp) { - *defaultVisp = pVisualNew[j].vid; - found_default = TRUE; - } - - /* Save the old VisualID */ - orig_vid[j] = pVisual[i].vid; - - /* Initialize the glXVisual */ - _gl_copy_visual_to_context_mode( modes, & pNewVisualConfigs[k] ); - modes->visualID = pVisualNew[j].vid; - - /* - * If the class is -1, then assume the X visual information - * is identical to what GLX needs, and take them from the X - * visual. NOTE: if class != -1, then all other fields MUST - * be initialized. - */ - if (modes->visualType == GLX_NONE) { - modes->visualType = _gl_convert_from_x_visual_type( pVisual[i].class ); - modes->redBits = count_bits(pVisual[i].redMask); - modes->greenBits = count_bits(pVisual[i].greenMask); - modes->blueBits = count_bits(pVisual[i].blueMask); - modes->alphaBits = modes->alphaBits; - modes->redMask = pVisual[i].redMask; - modes->greenMask = pVisual[i].greenMask; - modes->blueMask = pVisual[i].blueMask; - modes->alphaMask = modes->alphaMask; - modes->rgbBits = (is_rgb) - ? (modes->redBits + modes->greenBits + - modes->blueBits + modes->alphaBits) - : rootDepth; - } - - /* Save the device-dependent private for this visual */ - glXVisualPriv[j] = pNewVisualPriv[k]; - - j++; - modes = modes->next; - } - } - - assert(j <= numNewVisuals); - - /* Save the GLX visuals in the screen structure */ - MESAScreens[screenInfo.numScreens-1].num_vis = numNewVisuals; - MESAScreens[screenInfo.numScreens-1].private = glXVisualPriv; - - /* Set up depth's VisualIDs */ - for (i = 0; i < ndepth; i++) { - int numVids = 0; - VisualID *pVids = NULL; - int k, n = 0; - - /* Count the new number of VisualIDs at this depth */ - for (j = 0; j < pdepth[i].numVids; j++) - for (k = 0; k < numNewVisuals; k++) - if (pdepth[i].vids[j] == orig_vid[k]) - numVids++; - - /* Allocate a new list of VisualIDs for this depth */ - pVids = (VisualID *)malloc(numVids * sizeof(VisualID)); - - /* Initialize the new list of VisualIDs for this depth */ - for (j = 0; j < pdepth[i].numVids; j++) - for (k = 0; k < numNewVisuals; k++) - if (pdepth[i].vids[j] == orig_vid[k]) - pVids[n++] = pVisualNew[k].vid; - - /* Update this depth's list of VisualIDs */ - free(pdepth[i].vids); - pdepth[i].vids = pVids; - pdepth[i].numVids = numVids; - } - - /* Update the X server's visuals */ - *nvisualp = numNewVisuals; - *visualp = pVisualNew; - - /* Free the old list of the X server's visuals */ - free(pVisual); - - /* Clean up temporary allocations */ - free(orig_vid); - free(pNewVisualPriv); - free(pNewVisualConfigs); - - /* Free the private list created by DDX HW driver */ - if (visualPrivates) - free(visualPrivates); - visualPrivates = NULL; - - return TRUE; -} - -void __MESA_setVisualConfigs(int nconfigs, __GLXvisualConfig *configs, - void **privates) -{ - numConfigs = nconfigs; - visualConfigs = configs; - visualPrivates = privates; -} - -Bool __MESA_initVisuals(VisualPtr *visualp, DepthPtr *depthp, - int *nvisualp, int *ndepthp, int *rootDepthp, - VisualID *defaultVisp, unsigned long sizes, - int bitsPerRGB) -{ - /* - * Setup the visuals supported by this particular screen. - */ - return init_visuals(nvisualp, visualp, defaultVisp, - *ndepthp, *depthp, *rootDepthp); -} - -static void fixup_visuals(int screen) -{ - ScreenPtr pScreen = screenInfo.screens[screen]; - __MESA_screen *pMScr = &MESAScreens[screen]; - int j; - __GLcontextModes *modes; - - for ( modes = pMScr->modes ; modes != NULL ; modes = modes->next ) { - const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); - const int nplanes = (modes->rgbBits - modes->alphaBits); - const VisualPtr pVis = pScreen->visuals; - - /* Find a visual that matches the GLX visual's class and size */ - for (j = 0; j < pScreen->numVisuals; j++) { - if (pVis[j].class == vis_class && - pVis[j].nplanes == nplanes) { - - /* Fixup the masks */ - modes->redMask = pVis[j].redMask; - modes->greenMask = pVis[j].greenMask; - modes->blueMask = pVis[j].blueMask; - - /* Recalc the sizes */ - modes->redBits = count_bits(modes->redMask); - modes->greenBits = count_bits(modes->greenMask); - modes->blueBits = count_bits(modes->blueMask); - } - } - } -} - -static void init_screen_visuals(int screen) -{ - ScreenPtr pScreen = screenInfo.screens[screen]; - __GLcontextModes *modes; - XMesaVisual *pXMesaVisual; - int *used; - int i, j; - - /* Alloc space for the list of XMesa visuals */ - pXMesaVisual = (XMesaVisual *)malloc(MESAScreens[screen].num_vis * - sizeof(XMesaVisual)); - memset(pXMesaVisual, 0, - MESAScreens[screen].num_vis * sizeof(XMesaVisual)); - - /* FIXME: Change 'used' to be a array of bits (rather than of ints), - * FIXME: create a stack array of 8 or 16 bytes. If 'numVisuals' is less - * FIXME: than 64 or 128 the stack array can be used instead of calling - * FIXME: malloc / free. If nothing else, convert 'used' to - * FIXME: array of bytes instead of ints! - */ - used = (int *)malloc(pScreen->numVisuals * sizeof(int)); - memset(used, 0, pScreen->numVisuals * sizeof(int)); - - i = 0; - for ( modes = MESAScreens[screen].modes - ; modes != NULL - ; modes = modes->next ) { - const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); - const int nplanes = (modes->rgbBits - modes->alphaBits); - const VisualPtr pVis = pScreen->visuals; - - for (j = 0; j < pScreen->numVisuals; j++) { - if (pVis[j].class == vis_class && - pVis[j].nplanes == nplanes && - pVis[j].redMask == modes->redMask && - pVis[j].greenMask == modes->greenMask && - pVis[j].blueMask == modes->blueMask && - !used[j]) { - - /* Create the XMesa visual */ - pXMesaVisual[i] = - XMesaCreateVisual(pScreen, - pVis, - modes->rgbMode, - (modes->alphaBits > 0), - modes->doubleBufferMode, - modes->stereoMode, - GL_TRUE, /* ximage_flag */ - modes->depthBits, - modes->stencilBits, - modes->accumRedBits, - modes->accumGreenBits, - modes->accumBlueBits, - modes->accumAlphaBits, - modes->samples, - modes->level, - modes->visualRating); - /* Set the VisualID */ - modes->visualID = pVis[j].vid; - - /* Mark this visual used */ - used[j] = 1; - break; - } - } - - if ( j == pScreen->numVisuals ) { - ErrorF("No matching visual for __GLcontextMode with " - "visual class = %d (%d), nplanes = %u\n", - vis_class, - modes->visualType, - (modes->rgbBits - modes->alphaBits) ); - } - else if ( modes->visualID == -1 ) { - FatalError( "Matching visual found, but visualID still -1!\n" ); - } - - i++; - } - - free(used); - - MESAScreens[screen].xm_vis = pXMesaVisual; -} - -Bool __MESA_screenProbe(int screen) -{ - /* - * Set up the current screen's visuals. - */ - __glDDXScreenInfo.modes = MESAScreens[screen].modes; - __glDDXScreenInfo.pVisualPriv = MESAScreens[screen].private; - __glDDXScreenInfo.numVisuals = - __glDDXScreenInfo.numUsableVisuals = MESAScreens[screen].num_vis; - - /* - * Set the current screen's createContext routine. This could be - * wrapped by a DDX GLX context creation routine. - */ - __glDDXScreenInfo.createContext = __MESA_createContext; - - /* - * The ordering of the rgb compenents might have been changed by the - * driver after mi initialized them. - */ - fixup_visuals(screen); - - /* - * Find the GLX visuals that are supported by this screen and create - * XMesa's visuals. - */ - init_screen_visuals(screen); - - return TRUE; -} - -extern void __MESA_resetExtension(void) -{ - int i, j; - - XMesaReset(); - - for (i = 0; i < screenInfo.numScreens; i++) { - for (j = 0; j < MESAScreens[i].num_vis; j++) { - if (MESAScreens[i].xm_vis[j]) { - XMesaDestroyVisual(MESAScreens[i].xm_vis[j]); - MESAScreens[i].xm_vis[j] = NULL; - } - } - _gl_context_modes_destroy( MESAScreens[i].modes ); - MESAScreens[i].modes = NULL; - free(MESAScreens[i].private); - MESAScreens[i].private = NULL; - free(MESAScreens[i].xm_vis); - MESAScreens[i].xm_vis = NULL; - MESAScreens[i].num_vis = 0; - } - __glDDXScreenInfo.modes = NULL; - MESA_CC = NULL; -} - -void __MESA_createBuffer(__GLXdrawablePrivate *glxPriv) -{ - DrawablePtr pDraw = glxPriv->pDraw; - XMesaVisual xm_vis = find_mesa_visual(pDraw->pScreen->myNum, - glxPriv->modes->visualID); - __GLdrawablePrivate *glPriv = &glxPriv->glPriv; - __MESA_buffer buf; - - if (xm_vis == NULL) { - ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n", - glxPriv->modes->visualID); - } - buf = (__MESA_buffer)malloc(sizeof(struct __MESA_bufferRec)); - - /* Create Mesa's buffers */ - if (glxPriv->type == DRAWABLE_WINDOW) { - buf->xm_buf = (void *)XMesaCreateWindowBuffer(xm_vis, - (WindowPtr)pDraw); - } else { - buf->xm_buf = (void *)XMesaCreatePixmapBuffer(xm_vis, - (PixmapPtr)pDraw, 0); - } - - /* Wrap the front buffer's resize routine */ - buf->fbresize = glPriv->frontBuffer.resize; - glPriv->frontBuffer.resize = __MESA_resizeBuffers; - - /* Wrap the swap buffers routine */ - buf->fbswap = glxPriv->swapBuffers; - glxPriv->swapBuffers = __MESA_swapBuffers; - - /* Save Mesa's private buffer structure */ - glPriv->private = (void *)buf; - glPriv->freePrivate = __MESA_destroyBuffer; -} - -GLboolean __MESA_resizeBuffers(__GLdrawableBuffer *buffer, - GLint x, GLint y, - GLuint width, GLuint height, - __GLdrawablePrivate *glPriv, - GLuint bufferMask) -{ - __MESA_buffer buf = (__MESA_buffer)glPriv->private; - - if (buf->xm_buf) - XMesaResizeBuffers(buf->xm_buf); - - return (*buf->fbresize)(buffer, x, y, width, height, glPriv, bufferMask); -} - -GLboolean __MESA_swapBuffers(__GLXdrawablePrivate *glxPriv) -{ - __MESA_buffer buf = (__MESA_buffer)glxPriv->glPriv.private; - - /* - ** Do not call the wrapped swap buffers routine since Mesa has - ** already done the swap. - */ - XMesaSwapBuffers(buf->xm_buf); - - return GL_TRUE; -} - -void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv) -{ - __MESA_buffer buf = (__MESA_buffer)glPriv->private; - __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *)glPriv->other; - -#ifdef NXAGENT_SERVER - AddWSDrawBuffer(& (buf -> xm_buf -> mesa_buffer) ); -#endif - - /* Destroy Mesa's buffers */ - if (buf->xm_buf) - XMesaDestroyBuffer(buf->xm_buf); - - /* Unwrap these routines */ - glxPriv->swapBuffers = buf->fbswap; - glPriv->frontBuffer.resize = buf->fbresize; - - free(glPriv->private); - glPriv->private = NULL; -} - -__GLinterface *__MESA_createContext(__GLimports *imports, - __GLcontextModes *modes, - __GLinterface *shareGC) -{ - __GLcontext *gl_ctx = NULL; - __GLcontext *m_share = NULL; - __GLXcontext *glxc = (__GLXcontext *)imports->other; - XMesaVisual xm_vis; - - if (shareGC) - m_share = (__GLcontext *)shareGC; - - xm_vis = find_mesa_visual(glxc->pScreen->myNum, glxc->modes->visualID); - if (xm_vis) { - XMesaContext xmshare = m_share ? m_share->DriverCtx : 0; - XMesaContext xmctx = XMesaCreateContext(xm_vis, xmshare); - gl_ctx = xmctx ? &xmctx->mesa : 0; - } - else { - ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n", - glxc->modes->visualID); - } - - - if (!gl_ctx) - return NULL; - - gl_ctx->imports = *imports; - gl_ctx->exports.destroyContext = __MESA_destroyContext; - gl_ctx->exports.loseCurrent = __MESA_loseCurrent; - gl_ctx->exports.makeCurrent = __MESA_makeCurrent; - gl_ctx->exports.shareContext = __MESA_shareContext; - gl_ctx->exports.copyContext = __MESA_copyContext; - gl_ctx->exports.forceCurrent = __MESA_forceCurrent; - gl_ctx->exports.notifyResize = __MESA_notifyResize; - gl_ctx->exports.notifyDestroy = __MESA_notifyDestroy; - gl_ctx->exports.notifySwapBuffers = __MESA_notifySwapBuffers; - gl_ctx->exports.dispatchExec = __MESA_dispatchExec; - gl_ctx->exports.beginDispatchOverride = __MESA_beginDispatchOverride; - gl_ctx->exports.endDispatchOverride = __MESA_endDispatchOverride; - - return (__GLinterface *)gl_ctx; -} - -GLboolean __MESA_destroyContext(__GLcontext *gc) -{ - XMesaContext xmesa = (XMesaContext) gc->DriverCtx; - XMesaDestroyContext( xmesa ); - return GL_TRUE; -} - -GLboolean __MESA_loseCurrent(__GLcontext *gc) -{ - XMesaContext xmesa = (XMesaContext) gc->DriverCtx; - MESA_CC = NULL; - __glXLastContext = NULL; - return XMesaLoseCurrent(xmesa); -} - -GLboolean __MESA_makeCurrent(__GLcontext *gc) -{ - __GLdrawablePrivate *drawPriv = gc->imports.getDrawablePrivate( gc ); - __MESA_buffer drawBuf = (__MESA_buffer)drawPriv->private; - __GLdrawablePrivate *readPriv = gc->imports.getReadablePrivate( gc ); - __MESA_buffer readBuf = (__MESA_buffer)readPriv->private; - XMesaContext xmesa = (XMesaContext) gc->DriverCtx; - - MESA_CC = gc; - return XMesaMakeCurrent2(xmesa, drawBuf->xm_buf, readBuf->xm_buf); -} - -GLboolean __MESA_shareContext(__GLcontext *gc, __GLcontext *gcShare) -{ - /* NOT_DONE */ - /* XXX I don't see where/how this could ever be called */ - ErrorF("__MESA_shareContext\n"); - return GL_FALSE; -} - -GLboolean __MESA_copyContext(__GLcontext *dst, const __GLcontext *src, - GLuint mask) -{ - XMesaContext xm_dst = (XMesaContext) dst->DriverCtx; - const XMesaContext xm_src = (const XMesaContext) src->DriverCtx; - _mesa_copy_context(&xm_src->mesa, &xm_dst->mesa, mask); - return GL_TRUE; -} - -GLboolean __MESA_forceCurrent(__GLcontext *gc) -{ - XMesaContext xmesa = (XMesaContext) gc->DriverCtx; - MESA_CC = gc; - return XMesaForceCurrent(xmesa); -} - -GLboolean __MESA_notifyResize(__GLcontext *gc) -{ - /* NOT_DONE */ - ErrorF("__MESA_notifyResize\n"); - return GL_FALSE; -} - -void __MESA_notifyDestroy(__GLcontext *gc) -{ - /* NOT_DONE */ - ErrorF("__MESA_notifyDestroy\n"); - return; -} - -void __MESA_notifySwapBuffers(__GLcontext *gc) -{ - _mesa_notifySwapBuffers(gc); -} - -struct __GLdispatchStateRec *__MESA_dispatchExec(__GLcontext *gc) -{ - /* NOT_DONE */ - ErrorF("__MESA_dispatchExec\n"); - return NULL; -} - -void __MESA_beginDispatchOverride(__GLcontext *gc) -{ - /* NOT_DONE */ - ErrorF("__MESA_beginDispatchOverride\n"); - return; -} - -void __MESA_endDispatchOverride(__GLcontext *gc) -{ - /* NOT_DONE */ - ErrorF("__MESA_endDispatchOverride\n"); - return; -} - - -/* - * Server-side GLX uses these functions which are normally defined - * in the OpenGL SI. - */ - -GLuint __glFloorLog2(GLuint val) -{ - int c = 0; - - while (val > 1) { - c++; - val >>= 1; - } - return c; -} - diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c deleted file mode 100644 index fad84ec7e0..0000000000 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c +++ /dev/null @@ -1,151 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Brian Paul - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include - -#include -#include "pixmapstr.h" -#include "xf86glx_util.h" -#include - -#ifdef ROUNDUP -#undef ROUNDUP -#endif - -#define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad)-1)) / (pad)) * ((pad)>>3)) - -XMesaImage *XMesaCreateImage(int bitsPerPixel, int width, int height, char *data) -{ - XMesaImage *image; - - image = (XMesaImage *)malloc(sizeof(XMesaImage)); - - if (image) { - image->width = width; - image->height = height; - image->data = data; - /* Always pad to 32 bits */ - image->bytes_per_line = ROUNDUP((bitsPerPixel * width), 32); - image->bits_per_pixel = bitsPerPixel; - } - - return image; -} - -void XMesaDestroyImage(XMesaImage *image) -{ - if (image->data) - free(image->data); - free(image); -} - -unsigned long XMesaGetPixel(XMesaImage *image, int x, int y) -{ - CARD8 *row = (CARD8 *)(image->data + y*image->bytes_per_line); - CARD8 *i8; - CARD16 *i16; - CARD32 *i32; - switch (image->bits_per_pixel) { - case 8: - i8 = (CARD8 *)row; - return i8[x]; - break; - case 15: - case 16: - i16 = (CARD16 *)row; - return i16[x]; - break; - case 24: /* WARNING: architecture specific code */ - i8 = (CARD8 *)row; - return (((CARD32)i8[x*3]) | - (((CARD32)i8[x*3+1])<<8) | - (((CARD32)i8[x*3+2])<<16)); - break; - case 32: - i32 = (CARD32 *)row; - return i32[x]; - break; - } - return 0; -} - -#ifndef XMESA_USE_PUTPIXEL_MACRO -void XMesaPutPixel(XMesaImage *image, int x, int y, unsigned long pixel) -{ - CARD8 *row = (CARD8 *)(image->data + y*image->bytes_per_line); - CARD8 *i8; - CARD16 *i16; - CARD32 *i32; - switch (image->bits_per_pixel) { - case 8: - i8 = (CARD8 *)row; - i8[x] = (CARD8)pixel; - break; - case 15: - case 16: - i16 = (CARD16 *)row; - i16[x] = (CARD16)pixel; - break; - case 24: /* WARNING: architecture specific code */ - i8 = (CARD8 *)__row; - i8[x*3] = (CARD8)(p); - i8[x*3+1] = (CARD8)(p>>8); - i8[x*3+2] = (CARD8)(p>>16); - case 32: - i32 = (CARD32 *)row; - i32[x] = (CARD32)pixel; - break; - } -} -#endif - -void XMesaPutImageHelper(ScreenPtr display, - DrawablePtr d, GCPtr gc, - XMesaImage *image, - int src_x, int src_y, - int dest_x, int dest_y, - unsigned int width, unsigned int height) -{ - /* NOT_DONE: Verify that the following works for all depths */ - char *src = (image->data + - src_y * image->bytes_per_line + - ((src_x * image->bits_per_pixel) >> 3)); - - ValidateGC(d, gc); - (*gc->ops->PutImage)(d, gc, d->depth, dest_x, dest_y, width, height, - 0, ZPixmap, src); -} diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.h b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.h deleted file mode 100644 index bb314128d4..0000000000 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.h +++ /dev/null @@ -1,105 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Brian Paul - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _XF86GLX_UTIL_H_ -#define _XF86GLX_UTIL_H_ - -#ifdef __CYGWIN__ -#undef WIN32 -#undef _WIN32 -#endif - -#include -#include -#include -#include "GL/xmesa.h" - -#define XMESA_USE_PUTPIXEL_MACRO - -struct _XMesaImageRec { - int width, height; - char *data; - int bytes_per_line; /* Padded to 32 bits */ - int bits_per_pixel; -}; - -extern XMesaImage *XMesaCreateImage(int bitsPerPixel, int width, int height, - char *data); -extern void XMesaDestroyImage(XMesaImage *image); -extern unsigned long XMesaGetPixel(XMesaImage *image, int x, int y); -#ifdef XMESA_USE_PUTPIXEL_MACRO -#define XMesaPutPixel(__i,__x,__y,__p) \ -{ \ - CARD8 *__row = (CARD8 *)(__i->data + __y*__i->bytes_per_line); \ - CARD8 *__i8; \ - CARD16 *__i16; \ - CARD32 *__i32; \ - switch (__i->bits_per_pixel) { \ - case 8: \ - __i8 = (CARD8 *)__row; \ - __i8[__x] = (CARD8)__p; \ - break; \ - case 15: \ - case 16: \ - __i16 = (CARD16 *)__row; \ - __i16[__x] = (CARD16)__p; \ - break; \ - case 24: /* WARNING: architecture specific code */ \ - __i8 = (CARD8 *)__row; \ - __i8[__x*3] = (CARD8)(__p); \ - __i8[__x*3+1] = (CARD8)(__p>>8); \ - __i8[__x*3+2] = (CARD8)(__p>>16); \ - break; \ - case 32: \ - __i32 = (CARD32 *)__row; \ - __i32[__x] = (CARD32)__p; \ - break; \ - } \ -} -#else -extern void XMesaPutPixel(XMesaImage *image, int x, int y, - unsigned long pixel); -#endif - -extern void XMesaPutImageHelper(ScreenPtr display, - DrawablePtr d, GCPtr gc, - XMesaImage *image, - int src_x, int src_y, - int dest_x, int dest_y, - unsigned int width, unsigned int height); - -#endif /* _XF86GLX_UTIL_H_ */ diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glxint.h b/nx-X11/programs/Xserver/GL/mesa/X/xf86glxint.h index 4784566a48..4e51215bcc 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glxint.h +++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glxint.h @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.4 2002/02/22 21:45:08 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -42,60 +43,4 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -typedef struct __MESA_screenRec __MESA_screen; -struct __MESA_screenRec { - int num_vis; - __GLcontextModes *modes; - XMesaVisual *xm_vis; - void **private; -}; - -typedef struct __MESA_bufferRec *__MESA_buffer; -struct __MESA_bufferRec { - XMesaBuffer xm_buf; - GLboolean (*fbresize)(__GLdrawableBuffer *buf, - GLint x, GLint y, GLuint width, GLuint height, - __GLdrawablePrivate *glPriv, GLuint bufferMask); - GLboolean (*fbswap)(__GLXdrawablePrivate *glxPriv); -}; - -extern void __MESA_setVisualConfigs(int nconfigs, __GLXvisualConfig *configs, - void **privates); -extern Bool __MESA_initVisuals(VisualPtr *visualp, DepthPtr *depthp, - int *nvisualp, int *ndepthp, int *rootDepthp, - VisualID *defaultVisp, unsigned long sizes, - int bitsPerRGB); -extern Bool __MESA_screenProbe(int screen); - -extern void __MESA_resetExtension(void); - -extern void __MESA_createBuffer(__GLXdrawablePrivate *glxPriv); -extern GLboolean __MESA_resizeBuffers(__GLdrawableBuffer *buf, - GLint x, GLint y, - GLuint width, GLuint height, - __GLdrawablePrivate *glPriv, - GLuint bufferMask); -extern GLboolean __MESA_swapBuffers(__GLXdrawablePrivate *glxPriv); -extern void __MESA_destroyBuffer(__GLdrawablePrivate *glPriv); - -extern __GLinterface *__MESA_createContext(__GLimports *imports, - __GLcontextModes *modes, - __GLinterface *shareGC); -extern GLboolean __MESA_destroyContext(__GLcontext *gc); -extern GLboolean __MESA_loseCurrent(__GLcontext *gc); -extern GLboolean __MESA_makeCurrent(__GLcontext *gc); -extern GLboolean __MESA_shareContext(__GLcontext *gc, __GLcontext *gcShare); -extern GLboolean __MESA_copyContext(__GLcontext *dst, const __GLcontext *src, - GLuint mask); -extern GLboolean __MESA_forceCurrent(__GLcontext *gc); - -extern GLboolean __MESA_notifyResize(__GLcontext *gc); -extern void __MESA_notifyDestroy(__GLcontext *gc); -extern void __MESA_notifySwapBuffers(__GLcontext *gc); -extern struct __GLdispatchStateRec *__MESA_dispatchExec(__GLcontext *gc); -extern void __MESA_beginDispatchOverride(__GLcontext *gc); -extern void __MESA_endDispatchOverride(__GLcontext *gc); - -extern GLuint __glFloorLog2(GLuint val); - #endif /* _XF86GLXINT_H_ */ diff --git a/nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile.inc deleted file mode 100644 index 39f6e24000..0000000000 --- a/nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile.inc +++ /dev/null @@ -1,28 +0,0 @@ -MESAACBUILDDIR = MesaACBuildDir - - MESA_AC_SRCS = $(MESAACBUILDDIR)ac_context.c \ - $(MESAACBUILDDIR)ac_import.c - -#ifdef NeedToLinkMesaSrc -LinkSourceFile(acache.h, $(MESASRCDIR)/src/mesa/array_cache) -LinkSourceFile(ac_context.c, $(MESASRCDIR)/src/mesa/array_cache) -LinkSourceFile(ac_context.h, $(MESASRCDIR)/src/mesa/array_cache) -LinkSourceFile(ac_import.c, $(MESASRCDIR)/src/mesa/array_cache) -#endif - - MESA_AC_OBJS = $(MESAACBUILDDIR)ac_context.o \ - $(MESAACBUILDDIR)ac_import.o - -#if defined(DoSharedLib) && DoSharedLib - MESA_AC_UOBJS = $(MESAACBUILDDIR)unshared/ac_context.o \ - $(MESAACBUILDDIR)unshared/ac_import.o -#else - MESA_AC_UOBJS = $(MESA_AC_OBJS) -#endif - - MESA_AC_DOBJS = $(MESAACBUILDDIR)debugger/ac_context.o \ - $(MESAACBUILDDIR)debugger/ac_import.o - - MESA_AC_POBJS = $(MESAACBUILDDIR)profiled/ac_context.o \ - $(MESAACBUILDDIR)profiled/ac_import.o - diff --git a/nx-X11/programs/Xserver/GL/mesa/main/Imakefile b/nx-X11/programs/Xserver/GL/mesa/main/Imakefile index d6e914b892..873128e671 100644 --- a/nx-X11/programs/Xserver/GL/mesa/main/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/main/Imakefile @@ -13,17 +13,17 @@ SRCS = $(COREMESABASESRCS) OBJS = $(COREMESABASEOBJS) - INCLUDES = -I$(MESASRCDIR)/src/mesa \ + INCLUDES = -I$(MESASRCDIR)/include \ + -I$(MESASRCDIR)/src/mesa \ -I$(MESASRCDIR)/src/mesa/main \ -I$(MESASRCDIR)/src/mesa/shader \ -I$(MESASRCDIR)/src/mesa/glapi \ - -I$(MESASRCDIR)/include \ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ -I$(LIBSRC)/GL/include \ -I$(XF86SRC) -I$(INCLUDESRC) - DEFINES = $(GLX_DEFINES) -DNXAGENT_SERVER /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ + DEFINES = $(GLX_DEFINES) -DNXAGENT_SERVER /*-DUSE_X86_ASM*/ /* -DUSE_X86_64_ASM *//*-DUSE_SPARC_ASM*/ NormalLibraryObjectRule() diff --git a/nx-X11/programs/Xserver/GL/mesa/main/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/main/Imakefile.inc index 3e98f91497..920cb21d7b 100644 --- a/nx-X11/programs/Xserver/GL/mesa/main/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/main/Imakefile.inc @@ -4,13 +4,13 @@ MESABUILDDIR = MesaBuildDir #ifdef NeedAllMesaSrc - DISPATCHSRCS = $(MESABUILDDIR)dispatch.c +/* DISPATCHSRCS = $(MESABUILDDIR)dispatch.c*/ + DISPATCHSRCS = GLAPISRCS = $(MESABUILDDIR)glapi.c GLTHREADSRCS = $(MESABUILDDIR)glthread.c #endif -MESA_CORE_INCLUDES = -I$(MESASRCDIR)/src/array_cache \ - -I$(MESASRCDIR)/src/math -I$(MESASRCDIR)/src/shader \ +MESA_CORE_INCLUDES = -I$(MESASRCDIR)/src/math -I$(MESASRCDIR)/src/shader \ -I$(MESASRCDIR)/src/swrast -I$(MESASRCDIR)/src/swrast_setup \ -I$(MESASRCDIR)/src/tnl -I$(MESASRCDIR)/src/tnl_dd @@ -20,6 +20,7 @@ COREMESABASESRCS = \ $(MESABUILDDIR)api_noop.c \ $(MESABUILDDIR)api_validate.c \ $(MESABUILDDIR)accum.c \ + $(MESABUILDDIR)arrayob.c \ $(MESABUILDDIR)attrib.c \ $(MESABUILDDIR)blend.c \ $(MESABUILDDIR)bufferobj.c \ @@ -30,6 +31,7 @@ COREMESABASESRCS = \ $(MESABUILDDIR)convolve.c \ $(MESABUILDDIR)debug.c \ $(MESABUILDDIR)depth.c \ + $(MESABUILDDIR)depthstencil.c \ $(MESABUILDDIR)dlist.c \ $(MESABUILDDIR)drawpix.c \ $(MESABUILDDIR)enable.c \ @@ -51,13 +53,15 @@ COREMESABASESRCS = \ $(MESABUILDDIR)light.c \ $(MESABUILDDIR)lines.c \ $(MESABUILDDIR)matrix.c \ + $(MESABUILDDIR)mipmap.c \ $(MESABUILDDIR)mm.c \ - $(MESABUILDDIR)occlude.c \ + $(MESABUILDDIR)queryobj.c \ $(MESABUILDDIR)pixel.c \ $(MESABUILDDIR)points.c \ $(MESABUILDDIR)polygon.c \ $(MESABUILDDIR)rastpos.c \ $(MESABUILDDIR)renderbuffer.c \ + $(MESABUILDDIR)shaders.c \ $(MESABUILDDIR)state.c \ $(MESABUILDDIR)stencil.c \ $(MESABUILDDIR)texcompress.c \ @@ -83,6 +87,8 @@ LinkSourceFile(api_noop.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(api_noop.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(api_validate.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(api_validate.h, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(arrayobj.c, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(arrayobj.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(accum.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(accum.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(attrib.c, $(MESASRCDIR)/src/mesa/main) @@ -107,10 +113,14 @@ LinkSourceFile(dd.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(debug.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(debug.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(depth.c, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(depthstencil.h, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(depthstencil.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(depth.h, $(MESASRCDIR)/src/mesa/main) +/* #ifdef NeedAllMesaSrc LinkSourceFile(dispatch.c, $(MESASRCDIR)/src/mesa/main) #endif +*/ LinkSourceFile(dlist.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(dlist.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(drawpix.c, $(MESASRCDIR)/src/mesa/main) @@ -157,11 +167,13 @@ LinkSourceFile(lines.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(macros.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(matrix.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(matrix.h, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(mipmap.c, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(mipmap.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(mm.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(mm.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(mtypes.h, $(MESASRCDIR)/src/mesa/main) -LinkSourceFile(occlude.c, $(MESASRCDIR)/src/mesa/main) -LinkSourceFile(occlude.h, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(queryobj.c, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(queryobj.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(pixel.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(pixel.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(points.c, $(MESASRCDIR)/src/mesa/main) @@ -175,6 +187,8 @@ LinkSourceFile(renderbuffer.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(simple_list.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(state.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(state.h, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(shaders.c, $(MESASRCDIR)/src/mesa/main) +LinkSourceFile(shaders.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(stencil.c, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(stencil.h, $(MESASRCDIR)/src/mesa/main) LinkSourceFile(texcompress.c, $(MESASRCDIR)/src/mesa/main) @@ -205,7 +219,8 @@ LinkSourceFile(vtxfmt_tmp.h, $(MESASRCDIR)/src/mesa/main) #endif #ifdef NeedAllMesaSrc - DISPATCHOBJS = $(MESABUILDDIR)dispatch.o +/* DISPATCHOBJS = $(MESABUILDDIR)dispatch.o*/ + DISPATCHOBJS = GLAPIOBJS = $(MESABUILDDIR)glapi.o GLTHREADOBJS = $(MESABUILDDIR)glthread.o #endif @@ -219,6 +234,7 @@ COREMESABASEOBJS = \ $(MESABUILDDIR)api_noop.o \ $(MESABUILDDIR)api_validate.o \ $(MESABUILDDIR)accum.o \ + $(MESABUILDDIR)arrayobj.o\ $(MESABUILDDIR)attrib.o \ $(MESABUILDDIR)blend.o \ $(MESABUILDDIR)bufferobj.o \ @@ -229,6 +245,7 @@ COREMESABASEOBJS = \ $(MESABUILDDIR)convolve.o \ $(MESABUILDDIR)debug.o \ $(MESABUILDDIR)depth.o \ + $(MESABUILDDIR)depthstencil.o \ $(MESABUILDDIR)dlist.o \ $(MESABUILDDIR)drawpix.o \ $(MESABUILDDIR)enable.o \ @@ -250,13 +267,15 @@ COREMESABASEOBJS = \ $(MESABUILDDIR)light.o \ $(MESABUILDDIR)lines.o \ $(MESABUILDDIR)matrix.o \ + $(MESABUILDDIR)mipmap.o \ $(MESABUILDDIR)mm.o \ - $(MESABUILDDIR)occlude.o \ + $(MESABUILDDIR)queryobj.o \ $(MESABUILDDIR)pixel.o \ $(MESABUILDDIR)points.o \ $(MESABUILDDIR)polygon.o \ $(MESABUILDDIR)rastpos.o \ $(MESABUILDDIR)renderbuffer.o \ + $(MESABUILDDIR)shaders.o \ $(MESABUILDDIR)state.o \ $(MESABUILDDIR)stencil.o \ $(MESABUILDDIR)texcompress.o \ @@ -273,7 +292,8 @@ COREMESABASEOBJS = \ $(MESABUILDDIR)vtxfmt.o #ifdef NeedAllMesaSrc - DISPATCHUOBJS = $(MESABUILDDIR)unshared/dispatch.o +/* DISPATCHUOBJS = $(MESABUILDDIR)unshared/dispatch.o*/ + DISPATCHUOBJS = GLAPIUOBJS = $(MESABUILDDIR)unshared/glapi.o GLTHREADUOBJS = $(MESABUILDDIR)unshared/glthread.o #endif @@ -288,6 +308,7 @@ COREMESABASEUOBJS = \ $(MESABUILDDIR)unshared/api_noop.o \ $(MESABUILDDIR)unshared/api_validate.o \ $(MESABUILDDIR)unshared/accum.o \ + $(MESABUILDDIR)unshared/arrayobj.o \ $(MESABUILDDIR)unshared/attrib.o \ $(MESABUILDDIR)unshared/blend.o \ $(MESABUILDDIR)unshared/bufferobj.o \ @@ -298,6 +319,7 @@ COREMESABASEUOBJS = \ $(MESABUILDDIR)unshared/convolve.o \ $(MESABUILDDIR)unshared/debug.o \ $(MESABUILDDIR)unshared/depth.o \ + $(MESABUILDDIR)unshared/depthstencil.o \ $(MESABUILDDIR)unshared/dlist.o \ $(MESABUILDDIR)unshared/drawpix.o \ $(MESABUILDDIR)unshared/enable.o \ @@ -319,13 +341,15 @@ COREMESABASEUOBJS = \ $(MESABUILDDIR)unshared/light.o \ $(MESABUILDDIR)unshared/lines.o \ $(MESABUILDDIR)unshared/matrix.o \ + $(MESABUILDDIR)unshared/mipmap.o \ $(MESABUILDDIR)unshared/mm.o \ - $(MESABUILDDIR)unshared/occlude.o \ + $(MESABUILDDIR)unshared/queryobj.o \ $(MESABUILDDIR)unshared/pixel.o \ $(MESABUILDDIR)unshared/points.o \ $(MESABUILDDIR)unshared/polygon.o \ $(MESABUILDDIR)unshared/rastpos.o \ $(MESABUILDDIR)unshared/renderbuffer.o \ + $(MESABUILDDIR)unshared/shaders.o \ $(MESABUILDDIR)unshared/state.o \ $(MESABUILDDIR)unshared/stencil.o \ $(MESABUILDDIR)unshared/texcompress.o \ @@ -345,7 +369,8 @@ COREMESABASEUOBJS = $(COREMESABASEOBJS) #endif #ifdef NeedAllMesaSrc - DISPATCHDOBJS = $(MESABUILDDIR)debugger/dispatch.o + /* DISPATCHDOBJS = $(MESABUILDDIR)debugger/dispatch.o*/ + DISPATCHDOBJS = GLAPIDOBJS = $(MESABUILDDIR)debugger/glapi.o GLTHREADDOBJS = $(MESABUILDDIR)debugger/glthread.o #endif @@ -359,6 +384,7 @@ COREMESABASEDOBJS = \ $(MESABUILDDIR)debugger/api_noop.o \ $(MESABUILDDIR)debugger/api_validate.o \ $(MESABUILDDIR)debugger/accum.o \ + $(MESABUILDDIR)debugger/arrayobj.o \ $(MESABUILDDIR)debugger/attrib.o \ $(MESABUILDDIR)debugger/blend.o \ $(MESABUILDDIR)debugger/bufferobj.o \ @@ -369,6 +395,7 @@ COREMESABASEDOBJS = \ $(MESABUILDDIR)debugger/convolve.o \ $(MESABUILDDIR)debugger/debug.o \ $(MESABUILDDIR)debugger/depth.o \ + $(MESABUILDDIR)debugger/depthstencil.o \ $(MESABUILDDIR)debugger/dlist.o \ $(MESABUILDDIR)debugger/drawpix.o \ $(MESABUILDDIR)debugger/enable.o \ @@ -390,13 +417,15 @@ COREMESABASEDOBJS = \ $(MESABUILDDIR)debugger/light.o \ $(MESABUILDDIR)debugger/lines.o \ $(MESABUILDDIR)debugger/matrix.o \ + $(MESABUILDDIR)debugger/mipmap.o \ $(MESABUILDDIR)debugger/mm.o \ - $(MESABUILDDIR)debugger/occlude.o \ + $(MESABUILDDIR)debugger/queryobj.o \ $(MESABUILDDIR)debugger/pixel.o \ $(MESABUILDDIR)debugger/points.o \ $(MESABUILDDIR)debugger/polygon.o \ $(MESABUILDDIR)debugger/rastpos.o \ $(MESABUILDDIR)debugger/renderbuffer.o \ + $(MESABUILDDIR)debugger/shaders.o \ $(MESABUILDDIR)debugger/state.o \ $(MESABUILDDIR)debugger/stencil.o \ $(MESABUILDDIR)debugger/texcompress.o \ @@ -413,7 +442,8 @@ COREMESABASEDOBJS = \ $(MESABUILDDIR)debugger/vtxfmt.o #ifdef NeedAllMesaSrc - DISPATCHPOBJS = $(MESABUILDDIR)profiled/dispatch.o +/* DISPATCHPOBJS = $(MESABUILDDIR)profiled/dispatch.o*/ + DISPATCHPOBJS = GLAPIPOBJS = $(MESABUILDDIR)profiled/glapi.o GLTHREADPOBJS = $(MESABUILDDIR)profiled/glthread.o #endif @@ -427,6 +457,7 @@ COREMESABASEPOBJS = \ $(MESABUILDDIR)profiled/api_noop.o \ $(MESABUILDDIR)profiled/api_validate.o \ $(MESABUILDDIR)profiled/accum.o \ + $(MESABUILDDIR)profiled/arrayobj.o \ $(MESABUILDDIR)profiled/attrib.o \ $(MESABUILDDIR)profiled/blend.o \ $(MESABUILDDIR)profiled/bufferobj.o \ @@ -437,6 +468,7 @@ COREMESABASEPOBJS = \ $(MESABUILDDIR)profiled/convolve.o \ $(MESABUILDDIR)profiled/debug.o \ $(MESABUILDDIR)profiled/depth.o \ + $(MESABUILDDIR)profiled/depthstencil.o \ $(MESABUILDDIR)profiled/dlist.o \ $(MESABUILDDIR)profiled/drawpix.o \ $(MESABUILDDIR)profiled/enable.o \ @@ -458,13 +490,15 @@ COREMESABASEPOBJS = \ $(MESABUILDDIR)profiled/light.o \ $(MESABUILDDIR)profiled/lines.o \ $(MESABUILDDIR)profiled/matrix.o \ + $(MESABUILDDIR)profiled/mipmap.o \ $(MESABUILDDIR)profiled/mm.o \ - $(MESABUILDDIR)profiled/occlude.o \ + $(MESABUILDDIR)profiled/queryobj.o \ $(MESABUILDDIR)profiled/pixel.o \ $(MESABUILDDIR)profiled/points.o \ $(MESABUILDDIR)profiled/polygon.o \ $(MESABUILDDIR)profiled/rastpos.o \ $(MESABUILDDIR)profiled/renderbuffer.o \ + $(MESABUILDDIR)profiled/shaders.o \ $(MESABUILDDIR)profiled/state.o \ $(MESABUILDDIR)profiled/stencil.o \ $(MESABUILDDIR)profiled/texcompress.o \ diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/shader/Imakefile.inc index 185103996d..de6946c6cf 100644 --- a/nx-X11/programs/Xserver/GL/mesa/shader/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/shader/Imakefile.inc @@ -2,99 +2,125 @@ MESASHADERBUILDDIR = MesaShaderBuildDir MESA_SHADER_SRCS = $(MESASHADERBUILDDIR)arbprogparse.c \ $(MESASHADERBUILDDIR)arbprogram.c \ - $(MESASHADERBUILDDIR)arbfragparse.c \ - $(MESASHADERBUILDDIR)arbvertparse.c \ $(MESASHADERBUILDDIR)atifragshader.c \ $(MESASHADERBUILDDIR)nvprogram.c \ $(MESASHADERBUILDDIR)nvfragparse.c \ - $(MESASHADERBUILDDIR)nvvertexec.c \ $(MESASHADERBUILDDIR)nvvertparse.c \ + $(MESASHADERBUILDDIR)shader_api.c \ + $(MESASHADERBUILDDIR)prog_debug.c \ + $(MESASHADERBUILDDIR)prog_execute.c \ + $(MESASHADERBUILDDIR)prog_instruction.c \ + $(MESASHADERBUILDDIR)prog_parameter.c \ + $(MESASHADERBUILDDIR)prog_print.c \ + $(MESASHADERBUILDDIR)prog_uniform.c \ $(MESASHADERBUILDDIR)program.c \ - $(MESASHADERBUILDDIR)shaderobjects.c \ - $(MESASHADERBUILDDIR)shaderobjects_3dlabs.c + $(MESASHADERBUILDDIR)programopt.c \ + $(MESASHADERBUILDDIR)prog_statevars.c #ifdef NeedToLinkMesaSrc LinkSourceFile(arbprogparse.c, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(arbprogram.c, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(arbfragparse.c, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(arbvertparse.c, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(arbfragparse.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(arbprogparse.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(arbprogram.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(arbprogram_syn.h, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(arbvertparse.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(atifragshader.c, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(atifragshader.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(nvfragparse.h, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(nvfragprog.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(nvprogram.c, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(nvprogram.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(nvfragparse.c, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(nvvertexec.c, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(nvvertexec.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(nvvertparse.c, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(nvvertparse.h, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(nvvertprog.h, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(program.c, $(MESASRCDIR)/src/mesa/shader) LinkSourceFile(program.h, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(shaderobjects.c, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(shaderobjects.h, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(shaderobjects_3dlabs.c, $(MESASRCDIR)/src/mesa/shader) -LinkSourceFile(shaderobjects_3dlabs.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(shader_api.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(shader_api.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_debug.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_debug.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_execute.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_execute.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_instruction.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_instruction.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_parameter.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_parameter.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_print.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_print.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_uniform.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_uniform.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(programopt.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(programopt.h, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_statevars.c, $(MESASRCDIR)/src/mesa/shader) +LinkSourceFile(prog_statevars.h, $(MESASRCDIR)/src/mesa/shader) #endif MESA_SHADER_OBJS = $(MESASHADERBUILDDIR)arbprogparse.o \ $(MESASHADERBUILDDIR)arbprogram.o \ - $(MESASHADERBUILDDIR)arbfragparse.o \ - $(MESASHADERBUILDDIR)arbvertparse.o \ $(MESASHADERBUILDDIR)atifragshader.o \ $(MESASHADERBUILDDIR)nvprogram.o \ $(MESASHADERBUILDDIR)nvfragparse.o \ - $(MESASHADERBUILDDIR)nvvertexec.o \ $(MESASHADERBUILDDIR)nvvertparse.o \ + $(MESASHADERBUILDDIR)shader_api.o \ + $(MESASHADERBUILDDIR)prog_debug.o \ + $(MESASHADERBUILDDIR)prog_execute.o \ + $(MESASHADERBUILDDIR)prog_instruction.o \ + $(MESASHADERBUILDDIR)prog_parameter.o \ + $(MESASHADERBUILDDIR)prog_print.o \ + $(MESASHADERBUILDDIR)prog_uniform.o \ $(MESASHADERBUILDDIR)program.o \ - $(MESASHADERBUILDDIR)shaderobjects.o \ - $(MESASHADERBUILDDIR)shaderobjects_3dlabs.o + $(MESASHADERBUILDDIR)programopt.o \ + $(MESASHADERBUILDDIR)prog_statevars.o #if defined(DoSharedLib) && DoSharedLib MESA_SHADER_UOBJS = $(MESASHADERBUILDDIR)unshared/arbprogparse.o \ $(MESASHADERBUILDDIR)unshared/arbprogram.o \ - $(MESASHADERBUILDDIR)unshared/arbfragparse.o \ - $(MESASHADERBUILDDIR)unshared/arbvertparse.o \ $(MESASHADERBUILDDIR)unshared/atifragshader.o \ $(MESASHADERBUILDDIR)unshared/nvprogram.o \ $(MESASHADERBUILDDIR)unshared/nvfragparse.o \ - $(MESASHADERBUILDDIR)unshared/nvvertexec.o \ $(MESASHADERBUILDDIR)unshared/nvvertparse.o \ + $(MESASHADERBUILDDIR)unshared/shader_api.o \ + $(MESASHADERBUILDDIR)unshared/prog_debug.o \ + $(MESASHADERBUILDDIR)unshared/prog_execute.o \ + $(MESASHADERBUILDDIR)unshared/prog_instruction.o \ + $(MESASHADERBUILDDIR)unshared/prog_parameter.o \ + $(MESASHADERBUILDDIR)unshared/prog_print.o \ + $(MESASHADERBUILDDIR)unshared/prog_uniform.o \ $(MESASHADERBUILDDIR)unshared/program.o \ - $(MESASHADERBUILDDIR)unshared/shaderobjects.o \ - $(MESASHADERBUILDDIR)unshared/shaderobjects_3dlabs.o + $(MESASHADERBUILDDIR)unshared/programopt.o \ + $(MESASHADERBUILDDIR)unshared/prog_statevars.o #else MESA_SHADER_UOBJS = $(MESA_SHADER_OBJS) #endif MESA_SHADER_DOBJS = $(MESASHADERBUILDDIR)debugger/arbprogparse.o \ $(MESASHADERBUILDDIR)debugger/arbprogram.o \ - $(MESASHADERBUILDDIR)debugger/arbfragparse.o \ - $(MESASHADERBUILDDIR)debugger/arbvertparse.o \ $(MESASHADERBUILDDIR)debugger/atifragshader.o \ $(MESASHADERBUILDDIR)debugger/nvprogram.o \ $(MESASHADERBUILDDIR)debugger/nvfragparse.o \ - $(MESASHADERBUILDDIR)debugger/nvvertexec.o \ $(MESASHADERBUILDDIR)debugger/nvvertparse.o \ + $(MESASHADERBUILDDIR)debugger/shader_api.o \ + $(MESASHADERBUILDDIR)debugger/prog_debug.o \ + $(MESASHADERBUILDDIR)debugger/prog_execute.o \ + $(MESASHADERBUILDDIR)debugger/prog_instruction.o \ + $(MESASHADERBUILDDIR)debugger/prog_parameter.o \ + $(MESASHADERBUILDDIR)debugger/prog_print.o \ + $(MESASHADERBUILDDIR)debugger/prog_uniform.o \ $(MESASHADERBUILDDIR)debugger/program.o \ - $(MESASHADERBUILDDIR)debugger/shaderobjects.o \ - $(MESASHADERBUILDDIR)debugger/shaderobjects_3dlabs.o + $(MESASHADERBUILDDIR)debugger/programopt.o \ + $(MESASHADERBUILDDIR)debugger/prog_statevars.o MESA_SHADER_POBJS = $(MESASHADERBUILDDIR)profiled/arbprogparse.o \ $(MESASHADERBUILDDIR)profiled/arbprogram.o \ - $(MESASHADERBUILDDIR)profiled/arbfragparse.o \ - $(MESASHADERBUILDDIR)profiled/arbvertparse.o \ $(MESASHADERBUILDDIR)profiled/atifragshader.o \ $(MESASHADERBUILDDIR)profiled/nvprogram.o \ $(MESASHADERBUILDDIR)profiled/nvfragparse.o \ - $(MESASHADERBUILDDIR)profiled/nvvertexec.o \ $(MESASHADERBUILDDIR)profiled/nvvertparse.o \ + $(MESASHADERBUILDDIR)profiled/shader_api.o \ + $(MESASHADERBUILDDIR)profiled/prog_debug.o \ + $(MESASHADERBUILDDIR)profiled/prog_execute.o \ + $(MESASHADERBUILDDIR)profiled/prog_instruction.o \ + $(MESASHADERBUILDDIR)profiled/prog_parameter.o \ + $(MESASHADERBUILDDIR)profiled/prog_print.o \ + $(MESASHADERBUILDDIR)profiled/prog_uniform.o \ $(MESASHADERBUILDDIR)profiled/program.o \ - $(MESASHADERBUILDDIR)profiled/shaderobjects.o \ - $(MESASHADERBUILDDIR)profiled/shaderobjects_3dlabs.o + $(MESASHADERBUILDDIR)profiled/programopt.o \ + $(MESASHADERBUILDDIR)profiled/prog_statevars.o diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile b/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile index d5ec4d6cf3..a493e90518 100644 --- a/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile @@ -17,13 +17,14 @@ -I$(MESASRCDIR)/src/mesa/shader/grammar \ -I$(MESASRCDIR)/src/mesa/main \ -I$(MESASRCDIR)/src/mesa/glapi \ + -I$(MESASRCDIR)/src/mesa/shader/slang \ -I$(MESASRCDIR)/include \ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ -I$(LIBSRC)/GL/include \ -I$(XF86SRC) -I$(INCLUDESRC) - DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ + DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_X86_64_ASM*/ /*-DUSE_SPARC_ASM*/ NormalLibraryObjectRule() diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile.inc index 4ffa7805f6..c4af1a10ac 100644 --- a/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/shader/slang/Imakefile.inc @@ -1,84 +1,160 @@ MESASLANGBUILDDIR=MesaSlangBuildDir - MESA_SLANG_SRCS = $(MESASLANGBUILDDIR)slang_assemble_assignment.c \ - $(MESASLANGBUILDDIR)slang_assemble.c \ - $(MESASLANGBUILDDIR)slang_assemble_conditional.c \ - $(MESASLANGBUILDDIR)slang_assemble_constructor.c \ - $(MESASLANGBUILDDIR)slang_assemble_typeinfo.c \ - $(MESASLANGBUILDDIR)slang_compile.c \ - $(MESASLANGBUILDDIR)slang_execute.c \ - $(MESASLANGBUILDDIR)slang_preprocess.c \ - $(MESASLANGBUILDDIR)slang_storage.c \ - $(MESASLANGBUILDDIR)slang_utility.c + MESA_SLANG_SRCS = $(MESASLANGBUILDDIR)slang_builtin.c \ + $(MESASLANGBUILDDIR)slang_codegen.c \ + $(MESASLANGBUILDDIR)slang_compile.c \ + $(MESASLANGBUILDDIR)slang_compile_function.c \ + $(MESASLANGBUILDDIR)slang_compile_operation.c \ + $(MESASLANGBUILDDIR)slang_compile_struct.c \ + $(MESASLANGBUILDDIR)slang_compile_variable.c \ + $(MESASLANGBUILDDIR)slang_emit.c \ + $(MESASLANGBUILDDIR)slang_ir.c \ + $(MESASLANGBUILDDIR)slang_label.c \ + $(MESASLANGBUILDDIR)slang_library_noise.c \ + $(MESASLANGBUILDDIR)slang_link.c \ + $(MESASLANGBUILDDIR)slang_log.c \ + $(MESASLANGBUILDDIR)slang_mem.c \ + $(MESASLANGBUILDDIR)slang_preprocess.c \ + $(MESASLANGBUILDDIR)slang_print.c \ + $(MESASLANGBUILDDIR)slang_simplify.c \ + $(MESASLANGBUILDDIR)slang_storage.c \ + $(MESASLANGBUILDDIR)slang_typeinfo.c \ + $(MESASLANGBUILDDIR)slang_utility.c \ + $(MESASLANGBUILDDIR)slang_vartable.c #ifdef NeedToLinkMesaSrc -LinkSourceFile(slang_assemble_assignment.c, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble_assignment.h, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble.c, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble.h, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble_conditional.c, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble_conditional.h, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble_constructor.c, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble_constructor.h, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble_typeinfo.c, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_assemble_typeinfo.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_builtin.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_builtin.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_codegen.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_codegen.h, $(MESASRCDIR)/src/mesa/shader/slang) LinkSourceFile(slang_compile.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_compile_function.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_compile_function.h, $(MESASRCDIR)/src/mesa/shader/slang) LinkSourceFile(slang_compile.h, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_execute.c, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(slang_execute.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_compile_operation.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_compile_operation.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_compile_struct.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_compile_struct.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_compile_variable.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_compile_variable.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_emit.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_emit.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_ir.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_ir.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_label.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_label.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_library_noise.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_library_noise.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_link.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_link.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_log.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_log.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_mem.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_mem.h, $(MESASRCDIR)/src/mesa/shader/slang) LinkSourceFile(slang_preprocess.c, $(MESASRCDIR)/src/mesa/shader/slang) LinkSourceFile(slang_preprocess.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_print.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_print.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_simplify.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_simplify.h, $(MESASRCDIR)/src/mesa/shader/slang) LinkSourceFile(slang_storage.c, $(MESASRCDIR)/src/mesa/shader/slang) LinkSourceFile(slang_storage.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_typeinfo.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_typeinfo.h, $(MESASRCDIR)/src/mesa/shader/slang) LinkSourceFile(slang_utility.c, $(MESASRCDIR)/src/mesa/shader/slang) LinkSourceFile(slang_utility.h, $(MESASRCDIR)/src/mesa/shader/slang) -LinkSourceFile(traverse_wrap.h, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_vartable.c, $(MESASRCDIR)/src/mesa/shader/slang) +LinkSourceFile(slang_vartable.h, $(MESASRCDIR)/src/mesa/shader/slang) #endif - MESA_SLANG_OBJS = $(MESASLANGBUILDDIR)slang_assemble_assignment.o \ - $(MESASLANGBUILDDIR)slang_assemble.o \ - $(MESASLANGBUILDDIR)slang_assemble_conditional.o \ - $(MESASLANGBUILDDIR)slang_assemble_constructor.o \ - $(MESASLANGBUILDDIR)slang_assemble_typeinfo.o \ - $(MESASLANGBUILDDIR)slang_compile.o \ - $(MESASLANGBUILDDIR)slang_execute.o \ - $(MESASLANGBUILDDIR)slang_preprocess.o \ - $(MESASLANGBUILDDIR)slang_storage.o \ - $(MESASLANGBUILDDIR)slang_utility.o + MESA_SLANG_OBJS = $(MESASLANGBUILDDIR)slang_builtin.o \ + $(MESASLANGBUILDDIR)slang_codegen.o \ + $(MESASLANGBUILDDIR)slang_compile.o \ + $(MESASLANGBUILDDIR)slang_compile_function.o \ + $(MESASLANGBUILDDIR)slang_compile_operation.o \ + $(MESASLANGBUILDDIR)slang_compile_struct.o \ + $(MESASLANGBUILDDIR)slang_compile_variable.o \ + $(MESASLANGBUILDDIR)slang_emit.o \ + $(MESASLANGBUILDDIR)slang_ir.o \ + $(MESASLANGBUILDDIR)slang_label.o \ + $(MESASLANGBUILDDIR)slang_library_noise.o \ + $(MESASLANGBUILDDIR)slang_link.o \ + $(MESASLANGBUILDDIR)slang_log.o \ + $(MESASLANGBUILDDIR)slang_mem.o \ + $(MESASLANGBUILDDIR)slang_preprocess.o \ + $(MESASLANGBUILDDIR)slang_print.o \ + $(MESASLANGBUILDDIR)slang_simplify.o \ + $(MESASLANGBUILDDIR)slang_storage.o \ + $(MESASLANGBUILDDIR)slang_typeinfo.o \ + $(MESASLANGBUILDDIR)slang_utility.o \ + $(MESASLANGBUILDDIR)slang_vartable.o #if defined(DoSharedLib) && DoSharedLib - MESA_SLANG_UOBJS = $(MESASLANGBUILDDIR)unshared/slang_assemble_assignment.o \ - $(MESASLANGBUILDDIR)unshared/slang_assemble.o \ - $(MESASLANGBUILDDIR)unshared/slang_assemble_conditional.o \ - $(MESASLANGBUILDDIR)unshared/slang_assemble_constructor.o \ - $(MESASLANGBUILDDIR)unshared/slang_assemble_typeinfo.o \ - $(MESASLANGBUILDDIR)unshared/slang_compile.o \ - $(MESASLANGBUILDDIR)unshared/slang_execute.o \ - $(MESASLANGBUILDDIR)unshared/slang_preprocess.o \ - $(MESASLANGBUILDDIR)unshared/slang_storage.o \ - $(MESASLANGBUILDDIR)unshared/slang_utility.o + MESA_SLANG_UOBJS = $(MESASLANGBUILDDIR)/unshared/slang_builtin.o \ + $(MESASLANGBUILDDIR)/unshared/slang_codegen.o \ + $(MESASLANGBUILDDIR)/unshared/slang_compile.o \ + $(MESASLANGBUILDDIR)/unshared/slang_compile_function.o \ + $(MESASLANGBUILDDIR)/unshared/slang_compile_operation.o \ + $(MESASLANGBUILDDIR)/unshared/slang_compile_struct.o \ + $(MESASLANGBUILDDIR)/unshared/slang_compile_variable.o \ + $(MESASLANGBUILDDIR)/unshared/slang_emit.o \ + $(MESASLANGBUILDDIR)/unshared/slang_ir.o \ + $(MESASLANGBUILDDIR)/unshared/slang_label.o \ + $(MESASLANGBUILDDIR)/unshared/slang_library_noise.o \ + $(MESASLANGBUILDDIR)/unshared/slang_link.o \ + $(MESASLANGBUILDDIR)/unshared/slang_log.o \ + $(MESASLANGBUILDDIR)/unshared/slang_mem.o \ + $(MESASLANGBUILDDIR)/unshared/slang_preprocess.o \ + $(MESASLANGBUILDDIR)/unshared/slang_print.o \ + $(MESASLANGBUILDDIR)/unshared/slang_simplify.o \ + $(MESASLANGBUILDDIR)/unshared/slang_storage.o \ + $(MESASLANGBUILDDIR)/unshared/slang_typeinfo.o \ + $(MESASLANGBUILDDIR)/unshared/slang_utility.o \ + $(MESASLANGBUILDDIR)/unshared/slang_vartable.o #else MESA_SLANG_UOBJS = $(MESA_SLANG_OBJS) #endif - MESA_SLANG_DOBJS = $(MESASLANGBUILDDIR)debuggerslang_assemble_assignment.o \ - $(MESASLANGBUILDDIR)debuggerslang_assemble.o \ - $(MESASLANGBUILDDIR)debuggerslang_assemble_conditional.o \ - $(MESASLANGBUILDDIR)debuggerslang_assemble_constructor.o \ - $(MESASLANGBUILDDIR)debuggerslang_assemble_typeinfo.o \ - $(MESASLANGBUILDDIR)debuggerslang_compile.o \ - $(MESASLANGBUILDDIR)debuggerslang_execute.o \ - $(MESASLANGBUILDDIR)debuggerslang_preprocess.o \ - $(MESASLANGBUILDDIR)debuggerslang_storage.o \ - $(MESASLANGBUILDDIR)debuggerslang_utility.o + MESA_SLANG_UOBJS = $(MESASLANGBUILDDIR)/debugger/slang_builtin.o \ + $(MESASLANGBUILDDIR)/debugger/slang_codegen.o \ + $(MESASLANGBUILDDIR)/debugger/slang_compile.o \ + $(MESASLANGBUILDDIR)/debugger/slang_compile_function.o \ + $(MESASLANGBUILDDIR)/debugger/slang_compile_operation.o \ + $(MESASLANGBUILDDIR)/debugger/slang_compile_struct.o \ + $(MESASLANGBUILDDIR)/debugger/slang_compile_variable.o \ + $(MESASLANGBUILDDIR)/debugger/slang_emit.o \ + $(MESASLANGBUILDDIR)/debugger/slang_ir.o \ + $(MESASLANGBUILDDIR)/debugger/slang_label.o \ + $(MESASLANGBUILDDIR)/debugger/slang_library_noise.o \ + $(MESASLANGBUILDDIR)/debugger/slang_link.o \ + $(MESASLANGBUILDDIR)/debugger/slang_log.o \ + $(MESASLANGBUILDDIR)/debugger/slang_mem.o \ + $(MESASLANGBUILDDIR)/debugger/slang_preprocess.o \ + $(MESASLANGBUILDDIR)/debugger/slang_print.o \ + $(MESASLANGBUILDDIR)/debugger/slang_simplify.o \ + $(MESASLANGBUILDDIR)/debugger/slang_storage.o \ + $(MESASLANGBUILDDIR)/debugger/slang_typeinfo.o \ + $(MESASLANGBUILDDIR)/debugger/slang_utility.o \ + $(MESASLANGBUILDDIR)/debugger/slang_vartable.o - MESA_SLANG_POBJS = $(MESASLANGBUILDDIR)profiled/slang_assemble_assignment.o \ - $(MESASLANGBUILDDIR)profiled/slang_assemble.o \ - $(MESASLANGBUILDDIR)profiled/slang_assemble_conditional.o \ - $(MESASLANGBUILDDIR)profiled/slang_assemble_constructor.o \ - $(MESASLANGBUILDDIR)profiled/slang_assemble_typeinfo.o \ - $(MESASLANGBUILDDIR)profiled/slang_compile.o \ - $(MESASLANGBUILDDIR)profiled/slang_execute.o \ - $(MESASLANGBUILDDIR)profiled/slang_preprocess.o \ - $(MESASLANGBUILDDIR)profiled/slang_storage.o \ - $(MESASLANGBUILDDIR)profiled/slang_utility.o + MESA_SLANG_POBJS = $(MESASLANGBUILDDIR)/profiled/slang_builtin.o \ + $(MESASLANGBUILDDIR)/profiled/slang_codegen.o \ + $(MESASLANGBUILDDIR)/profiled/slang_compile.o \ + $(MESASLANGBUILDDIR)/profiled/slang_compile_function.o \ + $(MESASLANGBUILDDIR)/profiled/slang_compile_operation.o \ + $(MESASLANGBUILDDIR)/profiled/slang_compile_struct.o \ + $(MESASLANGBUILDDIR)/profiled/slang_compile_variable.o \ + $(MESASLANGBUILDDIR)/profiled/slang_emit.o \ + $(MESASLANGBUILDDIR)/profiled/slang_ir.o \ + $(MESASLANGBUILDDIR)/profiled/slang_label.o \ + $(MESASLANGBUILDDIR)/profiled/slang_library_noise.o \ + $(MESASLANGBUILDDIR)/profiled/slang_link.o \ + $(MESASLANGBUILDDIR)/profiled/slang_log.o \ + $(MESASLANGBUILDDIR)/profiled/slang_mem.o \ + $(MESASLANGBUILDDIR)/profiled/slang_preprocess.o \ + $(MESASLANGBUILDDIR)/profiled/slang_print.o \ + $(MESASLANGBUILDDIR)/profiled/slang_simplify.o \ + $(MESASLANGBUILDDIR)/profiled/slang_storage.o \ + $(MESASLANGBUILDDIR)/profiled/slang_typeinfo.o \ + $(MESASLANGBUILDDIR)/profiled/slang_utility.o \ + $(MESASLANGBUILDDIR)/profiled/slang_vartable.o diff --git a/nx-X11/programs/Xserver/GL/mesa/shader/slang/library/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/shader/slang/library/Imakefile.inc index 06b5300633..a51d6b0a1c 100644 --- a/nx-X11/programs/Xserver/GL/mesa/shader/slang/library/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/shader/slang/library/Imakefile.inc @@ -1,12 +1,8 @@ #ifdef NeedToLinkMesaSrc -LinkSourceFile(slang_common_builtin_gc_bin.h, $(MESASRCDIR)/src/mesa/shader/slang/library) LinkSourceFile(slang_common_builtin_gc.h, $(MESASRCDIR)/src/mesa/shader/slang/library) -LinkSourceFile(slang_core_gc_bin.h, $(MESASRCDIR)/src/mesa/shader/slang/library) LinkSourceFile(slang_core_gc.h, $(MESASRCDIR)/src/mesa/shader/slang/library) -LinkSourceFile(slang_fragment_builtin_gc_bin.h, $(MESASRCDIR)/src/mesa/shader/slang/library) LinkSourceFile(slang_fragment_builtin_gc.h, $(MESASRCDIR)/src/mesa/shader/slang/library) LinkSourceFile(slang_shader_syn.h, $(MESASRCDIR)/src/mesa/shader/slang/library) LinkSourceFile(slang_version_syn.h, $(MESASRCDIR)/src/mesa/shader/slang/library) -LinkSourceFile(slang_vertex_builtin_gc_bin.h, $(MESASRCDIR)/src/mesa/shader/slang/library) LinkSourceFile(slang_vertex_builtin_gc.h, $(MESASRCDIR)/src/mesa/shader/slang/library) #endif diff --git a/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile b/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile index df47a1caac..02d61edaa3 100644 --- a/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile @@ -20,6 +20,7 @@ -I$(MESASRCDIR)/src/mesa/swrast \ -I$(MESASRCDIR)/src/mesa/swrast_setup \ -I$(MESASRCDIR)/src/mesa/shader \ + -I$(MESASRCDIR)/src/mesa/shader/slang \ -I$(MESASRCDIR)/include \ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ diff --git a/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile.inc index f573098c16..d26a866c4f 100644 --- a/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/swrast/Imakefile.inc @@ -1,12 +1,13 @@ MESASWRASTBUILDDIR = MesaSwrastBuildDir - MESA_SWRAST_SRCS = $(MESASWRASTBUILDDIR)s_aaline.c \ +MESA_SWRAST_SRCS = $(MESASWRASTBUILDDIR)s_aaline.c \ $(MESASWRASTBUILDDIR)s_aatriangle.c \ $(MESASWRASTBUILDDIR)s_accum.c \ $(MESASWRASTBUILDDIR)s_alpha.c \ - $(MESASWRASTBUILDDIR)s_atifragshader.c \ + $(MESASWRASTBUILDDIR)s_atifragshader.c \ $(MESASWRASTBUILDDIR)s_bitmap.c \ $(MESASWRASTBUILDDIR)s_blend.c \ + $(MESASWRASTBUILDDIR)s_blit.c \ $(MESASWRASTBUILDDIR)s_buffers.c \ $(MESASWRASTBUILDDIR)s_context.c \ $(MESASWRASTBUILDDIR)s_copypix.c \ @@ -18,14 +19,14 @@ MESASWRASTBUILDDIR = MesaSwrastBuildDir $(MESASWRASTBUILDDIR)s_lines.c \ $(MESASWRASTBUILDDIR)s_logic.c \ $(MESASWRASTBUILDDIR)s_masking.c \ - $(MESASWRASTBUILDDIR)s_nvfragprog.c \ - $(MESASWRASTBUILDDIR)s_pixeltex.c \ + $(MESASWRASTBUILDDIR)s_fragprog.c \ $(MESASWRASTBUILDDIR)s_points.c \ $(MESASWRASTBUILDDIR)s_readpix.c \ $(MESASWRASTBUILDDIR)s_span.c \ $(MESASWRASTBUILDDIR)s_stencil.c \ + $(MESASWRASTBUILDDIR)s_texcombine.c \ + $(MESASWRASTBUILDDIR)s_texfilter.c \ $(MESASWRASTBUILDDIR)s_texstore.c \ - $(MESASWRASTBUILDDIR)s_texture.c \ $(MESASWRASTBUILDDIR)s_triangle.c \ $(MESASWRASTBUILDDIR)s_zoom.c @@ -45,6 +46,7 @@ LinkSourceFile(s_atifragshader.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_bitmap.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_blend.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_blend.h, $(MESASRCDIR)/src/mesa/swrast) +LinkSourceFile(s_blit.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_buffers.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_context.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_context.h, $(MESASRCDIR)/src/mesa/swrast) @@ -65,22 +67,21 @@ LinkSourceFile(s_logic.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_logic.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_masking.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_masking.h, $(MESASRCDIR)/src/mesa/swrast) -LinkSourceFile(s_nvfragprog.c, $(MESASRCDIR)/src/mesa/swrast) -LinkSourceFile(s_nvfragprog.h, $(MESASRCDIR)/src/mesa/swrast) -LinkSourceFile(s_pixeltex.c, $(MESASRCDIR)/src/mesa/swrast) -LinkSourceFile(s_pixeltex.h, $(MESASRCDIR)/src/mesa/swrast) +LinkSourceFile(s_fragprog.c, $(MESASRCDIR)/src/mesa/swrast) +LinkSourceFile(s_fragprog.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_points.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_points.h, $(MESASRCDIR)/src/mesa/swrast) -LinkSourceFile(s_pointtemp.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_readpix.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_span.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_span.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_spantemp.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_stencil.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_stencil.h, $(MESASRCDIR)/src/mesa/swrast) +LinkSourceFile(s_texcombine.c, $(MESASRCDIR)/src/mesa/swrast) +LinkSourceFile(s_texcombine.h, $(MESASRCDIR)/src/mesa/swrast) +LinkSourceFile(s_texfilter.c, $(MESASRCDIR)/src/mesa/swrast) +LinkSourceFile(s_texfilter.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_texstore.c, $(MESASRCDIR)/src/mesa/swrast) -LinkSourceFile(s_texture.c, $(MESASRCDIR)/src/mesa/swrast) -LinkSourceFile(s_texture.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_triangle.c, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_triangle.h, $(MESASRCDIR)/src/mesa/swrast) LinkSourceFile(s_trispan.h, $(MESASRCDIR)/src/mesa/swrast) @@ -94,9 +95,10 @@ LinkSourceFile(swrast.h, $(MESASRCDIR)/src/mesa/swrast) $(MESASWRASTBUILDDIR)s_aatriangle.o \ $(MESASWRASTBUILDDIR)s_accum.o \ $(MESASWRASTBUILDDIR)s_alpha.o \ - $(MESASWRASTBUILDDIR)s_atifragshader.o \ + $(MESASWRASTBUILDDIR)s_atifragshader.o \ $(MESASWRASTBUILDDIR)s_bitmap.o \ $(MESASWRASTBUILDDIR)s_blend.o \ + $(MESASWRASTBUILDDIR)s_blit.o \ $(MESASWRASTBUILDDIR)s_buffers.o \ $(MESASWRASTBUILDDIR)s_context.o \ $(MESASWRASTBUILDDIR)s_copypix.o \ @@ -108,14 +110,14 @@ LinkSourceFile(swrast.h, $(MESASRCDIR)/src/mesa/swrast) $(MESASWRASTBUILDDIR)s_lines.o \ $(MESASWRASTBUILDDIR)s_logic.o \ $(MESASWRASTBUILDDIR)s_masking.o \ - $(MESASWRASTBUILDDIR)s_nvfragprog.o \ - $(MESASWRASTBUILDDIR)s_pixeltex.o \ + $(MESASWRASTBUILDDIR)s_fragprog.o \ $(MESASWRASTBUILDDIR)s_points.o \ $(MESASWRASTBUILDDIR)s_readpix.o \ $(MESASWRASTBUILDDIR)s_span.o \ $(MESASWRASTBUILDDIR)s_stencil.o \ + $(MESASWRASTBUILDDIR)s_texcombine.o \ + $(MESASWRASTBUILDDIR)s_texfilter.o \ $(MESASWRASTBUILDDIR)s_texstore.o \ - $(MESASWRASTBUILDDIR)s_texture.o \ $(MESASWRASTBUILDDIR)s_triangle.o \ $(MESASWRASTBUILDDIR)s_zoom.o @@ -124,9 +126,10 @@ LinkSourceFile(swrast.h, $(MESASRCDIR)/src/mesa/swrast) $(MESASWRASTBUILDDIR)unshared/s_aatriangle.o \ $(MESASWRASTBUILDDIR)unshared/s_accum.o \ $(MESASWRASTBUILDDIR)unshared/s_alpha.o \ - $(MESASWRASTBUILDDIR)unshared/s_atifragshader.o \ + $(MESASWRASTBUILDDIR)unshared/s_atifragshader.o \ $(MESASWRASTBUILDDIR)unshared/s_bitmap.o \ $(MESASWRASTBUILDDIR)unshared/s_blend.o \ + $(MESASWRASTBUILDDIR)unshared/s_blit.o \ $(MESASWRASTBUILDDIR)unshared/s_buffers.o \ $(MESASWRASTBUILDDIR)unshared/s_context.o \ $(MESASWRASTBUILDDIR)unshared/s_copypix.o \ @@ -138,14 +141,14 @@ LinkSourceFile(swrast.h, $(MESASRCDIR)/src/mesa/swrast) $(MESASWRASTBUILDDIR)unshared/s_lines.o \ $(MESASWRASTBUILDDIR)unshared/s_logic.o \ $(MESASWRASTBUILDDIR)unshared/s_masking.o \ - $(MESASWRASTBUILDDIR)unshared/s_nvfragprog.o \ - $(MESASWRASTBUILDDIR)unshared/s_pixeltex.o \ + $(MESASWRASTBUILDDIR)unshared/s_fragprog.o \ $(MESASWRASTBUILDDIR)unshared/s_points.o \ $(MESASWRASTBUILDDIR)unshared/s_readpix.o \ $(MESASWRASTBUILDDIR)unshared/s_span.o \ $(MESASWRASTBUILDDIR)unshared/s_stencil.o \ + $(MESASWRASTBUILDDIR)unshared/s_texcombine.o \ + $(MESASWRASTBUILDDIR)unshared/s_texfilter.o \ $(MESASWRASTBUILDDIR)unshared/s_texstore.o \ - $(MESASWRASTBUILDDIR)unshared/s_texture.o \ $(MESASWRASTBUILDDIR)unshared/s_triangle.o \ $(MESASWRASTBUILDDIR)unshared/s_zoom.o #else @@ -156,9 +159,10 @@ LinkSourceFile(swrast.h, $(MESASRCDIR)/src/mesa/swrast) $(MESASWRASTBUILDDIR)debugger/s_aatriangle.o \ $(MESASWRASTBUILDDIR)debugger/s_accum.o \ $(MESASWRASTBUILDDIR)debugger/s_alpha.o \ - $(MESASWRASTBUILDDIR)debugger/s_atifragshader.o \ + $(MESASWRASTBUILDDIR)debugger/s_atifragshader.o \ $(MESASWRASTBUILDDIR)debugger/s_bitmap.o \ $(MESASWRASTBUILDDIR)debugger/s_blend.o \ + $(MESASWRASTBUILDDIR)debugger/s_blit.o \ $(MESASWRASTBUILDDIR)debugger/s_buffers.o \ $(MESASWRASTBUILDDIR)debugger/s_context.o \ $(MESASWRASTBUILDDIR)debugger/s_copypix.o \ @@ -170,14 +174,14 @@ LinkSourceFile(swrast.h, $(MESASRCDIR)/src/mesa/swrast) $(MESASWRASTBUILDDIR)debugger/s_lines.o \ $(MESASWRASTBUILDDIR)debugger/s_logic.o \ $(MESASWRASTBUILDDIR)debugger/s_masking.o \ - $(MESASWRASTBUILDDIR)debugger/s_nvfragprog.o \ - $(MESASWRASTBUILDDIR)debugger/s_pixeltex.o \ + $(MESASWRASTBUILDDIR)debugger/s_fragprog.o \ $(MESASWRASTBUILDDIR)debugger/s_points.o \ $(MESASWRASTBUILDDIR)debugger/s_readpix.o \ $(MESASWRASTBUILDDIR)debugger/s_span.o \ $(MESASWRASTBUILDDIR)debugger/s_stencil.o \ + $(MESASWRASTBUILDDIR)debugger/s_texcombine.o \ + $(MESASWRASTBUILDDIR)debugger/s_texfilter.o \ $(MESASWRASTBUILDDIR)debugger/s_texstore.o \ - $(MESASWRASTBUILDDIR)debugger/s_texture.o \ $(MESASWRASTBUILDDIR)debugger/s_triangle.o \ $(MESASWRASTBUILDDIR)debugger/s_zoom.o @@ -185,9 +189,10 @@ LinkSourceFile(swrast.h, $(MESASRCDIR)/src/mesa/swrast) $(MESASWRASTBUILDDIR)profiled/s_aatriangle.o \ $(MESASWRASTBUILDDIR)profiled/s_accum.o \ $(MESASWRASTBUILDDIR)profiled/s_alpha.o \ - $(MESASWRASTBUILDDIR)profiled/s_atifragshader.o \ + $(MESASWRASTBUILDDIR)profiled/s_atifragshader.o \ $(MESASWRASTBUILDDIR)profiled/s_bitmap.o \ $(MESASWRASTBUILDDIR)profiled/s_blend.o \ + $(MESASWRASTBUILDDIR)profiled/s_blit.o \ $(MESASWRASTBUILDDIR)profiled/s_buffers.o \ $(MESASWRASTBUILDDIR)profiled/s_context.o \ $(MESASWRASTBUILDDIR)profiled/s_copypix.o \ @@ -199,14 +204,14 @@ LinkSourceFile(swrast.h, $(MESASRCDIR)/src/mesa/swrast) $(MESASWRASTBUILDDIR)profiled/s_lines.o \ $(MESASWRASTBUILDDIR)profiled/s_logic.o \ $(MESASWRASTBUILDDIR)profiled/s_masking.o \ - $(MESASWRASTBUILDDIR)profiled/s_nvfragprog.o \ - $(MESASWRASTBUILDDIR)profiled/s_pixeltex.o \ + $(MESASWRASTBUILDDIR)profiled/s_fragprog.o \ $(MESASWRASTBUILDDIR)profiled/s_points.o \ $(MESASWRASTBUILDDIR)profiled/s_readpix.o \ $(MESASWRASTBUILDDIR)profiled/s_span.o \ $(MESASWRASTBUILDDIR)profiled/s_stencil.o \ + $(MESASWRASTBUILDDIR)profiled/s_texcombine.o \ + $(MESASWRASTBUILDDIR)profiled/s_texfilter.o \ $(MESASWRASTBUILDDIR)profiled/s_texstore.o \ - $(MESASWRASTBUILDDIR)profiled/s_texture.o \ $(MESASWRASTBUILDDIR)profiled/s_triangle.o \ $(MESASWRASTBUILDDIR)profiled/s_zoom.o diff --git a/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile b/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile index b36454259c..8dc64672a4 100644 --- a/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile @@ -16,11 +16,11 @@ OBJS = $(MESA_TNL_OBJS) INCLUDES = -I$(MESASRCDIR)/src/mesa \ - -I$(MESASRCDIR)/src/mesa/array_cache \ -I$(MESASRCDIR)/src/mesa/math \ -I$(MESASRCDIR)/src/mesa/main \ -I$(MESASRCDIR)/src/mesa/glapi \ -I$(MESASRCDIR)/src/mesa/shader \ + -I$(MESASRCDIR)/src/mesa/shader/slang \ -I$(MESASRCDIR)/src/mesa/tnl \ -I$(MESASRCDIR)/include \ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ diff --git a/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile.inc index a6c8f923e1..a1e3f9ad41 100644 --- a/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/tnl/Imakefile.inc @@ -1,14 +1,8 @@ MESATNLBUILDDIR = MesaTnlBuildDir - MESA_TNL_SRCS = $(MESATNLBUILDDIR)t_array_api.c \ - $(MESATNLBUILDDIR)t_array_import.c \ - $(MESATNLBUILDDIR)t_context.c \ + MESA_TNL_SRCS = $(MESATNLBUILDDIR)t_context.c \ + $(MESATNLBUILDDIR)t_draw.c \ $(MESATNLBUILDDIR)t_pipeline.c \ - $(MESATNLBUILDDIR)t_save_api.c \ - $(MESATNLBUILDDIR)t_save_loopback.c \ - $(MESATNLBUILDDIR)t_save_playback.c \ - $(MESATNLBUILDDIR)t_vb_arbprogram.c \ - $(MESATNLBUILDDIR)t_vb_arbprogram_sse.c \ $(MESATNLBUILDDIR)t_vb_fog.c \ $(MESATNLBUILDDIR)t_vb_cull.c \ $(MESATNLBUILDDIR)t_vb_light.c \ @@ -22,34 +16,15 @@ MESATNLBUILDDIR = MesaTnlBuildDir $(MESATNLBUILDDIR)t_vertex.c \ $(MESATNLBUILDDIR)t_vertex_generic.c \ $(MESATNLBUILDDIR)t_vertex_sse.c \ - $(MESATNLBUILDDIR)t_vp_build.c \ - $(MESATNLBUILDDIR)t_vtx_api.c \ - $(MESATNLBUILDDIR)t_vtx_eval.c \ - $(MESATNLBUILDDIR)t_vtx_exec.c \ - $(MESATNLBUILDDIR)t_vtx_generic.c - -#if defined(i386Architecture) && MesaUseX86Asm - MESA_TNL_SRCS += MesaTnlAsmSrcs $(MESATNLBUILDDIR)t_vtx_x86.c \ - $(MESATNLBUILDDIR)t_vtx_x86_gcc.S -#endif + $(MESATNLBUILDDIR)t_vp_build.c #ifdef NeedToLinkMesaSrc -LinkSourceFile(t_array_api.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_array_api.h, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_array_import.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_array_import.h, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_context.c, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_context.h, $(MESASRCDIR)/src/mesa/tnl) +LinkSourceFile(t_draw.c, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(tnl.h, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_pipeline.c, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_pipeline.h, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_save_api.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_save_api.h, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_save_loopback.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_save_playback.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vb_arbprogram.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vb_arbprogram.h, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vb_arbprogram_sse.c, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_vb_cliptmp.h, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_vb_fog.c, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_vb_cull.c, $(MESASRCDIR)/src/mesa/tnl) @@ -69,26 +44,11 @@ LinkSourceFile(t_vertex_generic.c, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_vertex_sse.c, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_vp_build.c, $(MESASRCDIR)/src/mesa/tnl) LinkSourceFile(t_vp_build.h, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vtx_api.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vtx_api.h, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vtx_eval.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vtx_exec.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vtx_generic.c, $(MESASRCDIR)/src/mesa/tnl) -#if defined(i386Architecture) && MesaUseX86Asm -LinkSourceFile(t_vtx_x86.c, $(MESASRCDIR)/src/mesa/tnl) -LinkSourceFile(t_vtx_x86_gcc.S, $(MESASRCDIR)/src/mesa/tnl) -#endif #endif - MESA_TNL_OBJS = $(MESATNLBUILDDIR)t_array_api.o \ - $(MESATNLBUILDDIR)t_array_import.o \ - $(MESATNLBUILDDIR)t_context.o \ + MESA_TNL_OBJS = $(MESATNLBUILDDIR)t_context.o \ + $(MESATNLBUILDDIR)t_draw.o \ $(MESATNLBUILDDIR)t_pipeline.o \ - $(MESATNLBUILDDIR)t_save_api.o \ - $(MESATNLBUILDDIR)t_save_loopback.o \ - $(MESATNLBUILDDIR)t_save_playback.o \ - $(MESATNLBUILDDIR)t_vb_arbprogram.o \ - $(MESATNLBUILDDIR)t_vb_arbprogram_sse.o \ $(MESATNLBUILDDIR)t_vb_fog.o \ $(MESATNLBUILDDIR)t_vb_cull.o \ $(MESATNLBUILDDIR)t_vb_light.o \ @@ -102,27 +62,12 @@ LinkSourceFile(t_vtx_x86_gcc.S, $(MESASRCDIR)/src/mesa/tnl) $(MESATNLBUILDDIR)t_vertex.o \ $(MESATNLBUILDDIR)t_vertex_generic.o \ $(MESATNLBUILDDIR)t_vertex_sse.o \ - $(MESATNLBUILDDIR)t_vp_build.o \ - $(MESATNLBUILDDIR)t_vtx_api.o \ - $(MESATNLBUILDDIR)t_vtx_eval.o \ - $(MESATNLBUILDDIR)t_vtx_exec.o \ - $(MESATNLBUILDDIR)t_vtx_generic.o - -#if defined(i386Architecture) && MesaUseX86Asm - MESA_TNL_OBJS += $(MESATNLBUILDDIR)t_vtx_x86.o \ - $(MESATNLBUILDDIR)t_vtx_x86_gcc.o -#endif - + $(MESATNLBUILDDIR)t_vp_build.o + #if defined(DoSharedLib) && DoSharedLib - MESA_TNL_UOBJS = $(MESATNLBUILDDIR)unshared/t_array_api.o \ - $(MESATNLBUILDDIR)unshared/t_array_import.o \ - $(MESATNLBUILDDIR)unshared/t_context.o \ + MESA_TNL_UOBJS = $(MESATNLBUILDDIR)unshared/t_context.o \ + $(MESATNLBUILDDIR)unshared/t_draw.o \ $(MESATNLBUILDDIR)unshared/t_pipeline.o \ - $(MESATNLBUILDDIR)unshared/t_save_api.o \ - $(MESATNLBUILDDIR)unshared/t_save_loopback.o \ - $(MESATNLBUILDDIR)unshared/t_save_playback.o \ - $(MESATNLBUILDDIR)unshared/t_vb_arbprogram.o \ - $(MESATNLBUILDDIR)unshared/t_vb_arbprogram_sse.o \ $(MESATNLBUILDDIR)unshared/t_vb_fog.o \ $(MESATNLBUILDDIR)unshared/t_vb_cull.o \ $(MESATNLBUILDDIR)unshared/t_vb_light.o \ @@ -136,30 +81,14 @@ LinkSourceFile(t_vtx_x86_gcc.S, $(MESASRCDIR)/src/mesa/tnl) $(MESATNLBUILDDIR)unshared/t_vertex.o \ $(MESATNLBUILDDIR)unshared/t_vertex_generic.o \ $(MESATNLBUILDDIR)unshared/t_vertex_sse.o \ - $(MESATNLBUILDDIR)unshared/t_vp_build.o \ - $(MESATNLBUILDDIR)unshared/t_vtx_api.o \ - $(MESATNLBUILDDIR)unshared/t_vtx_eval.o \ - $(MESATNLBUILDDIR)unshared/t_vtx_exec.o \ - $(MESATNLBUILDDIR)unshared/t_vtx_generic.o - -#if defined(i386Architecture) && MesaUseX86Asm - MESA_TNL_UOBJS += $(MESATNLBUILDDIR)unshared/t_vtx_x86.o \ - $(MESATNLBUILDDIR)t_vtx_x86_gcc.o -#endif - + $(MESATNLBUILDDIR)unshared/t_vp_build.o #else MESA_TNL_UOBJS = $(MESA_TNL_OBJS) #endif - MESA_TNL_DOBJS = $(MESATNLBUILDDIR)debugger/t_array_api.o \ - $(MESATNLBUILDDIR)debugger/t_array_import.o \ - $(MESATNLBUILDDIR)debugger/t_context.o \ + MESA_TNL_DOBJS = $(MESATNLBUILDDIR)debugger/t_context.o \ + $(MESATNLBUILDDIR)debugger/t_draw.o \ $(MESATNLBUILDDIR)debugger/t_pipeline.o \ - $(MESATNLBUILDDIR)debugger/t_save_api.o \ - $(MESATNLBUILDDIR)debugger/t_save_loopback.o \ - $(MESATNLBUILDDIR)debugger/t_save_playback.o \ - $(MESATNLBUILDDIR)debugger/t_vb_arbprogram.o \ - $(MESATNLBUILDDIR)debugger/t_vb_arbprogram_sse.o \ $(MESATNLBUILDDIR)debugger/t_vb_fog.o \ $(MESATNLBUILDDIR)debugger/t_vb_cull.o \ $(MESATNLBUILDDIR)debugger/t_vb_light.o \ @@ -173,26 +102,11 @@ LinkSourceFile(t_vtx_x86_gcc.S, $(MESASRCDIR)/src/mesa/tnl) $(MESATNLBUILDDIR)debugger/t_vertex.o \ $(MESATNLBUILDDIR)debugger/t_vertex_generic.o \ $(MESATNLBUILDDIR)debugger/t_vertex_sse.o \ - $(MESATNLBUILDDIR)debugger/t_vp_build.o \ - $(MESATNLBUILDDIR)debugger/t_vtx_api.o \ - $(MESATNLBUILDDIR)debugger/t_vtx_eval.o \ - $(MESATNLBUILDDIR)debugger/t_vtx_exec.o \ - $(MESATNLBUILDDIR)debugger/t_vtx_generic.o - -#if defined(i386Architecture) && MesaUseX86Asm - MESA_TNL_DOBJS += $(MESATNLBUILDDIR)debugger/t_vtx_x86.o \ - $(MESATNLBUILDDIR)debugger/t_vtx_x86_gcc.o -#endif + $(MESATNLBUILDDIR)debugger/t_vp_build.o - MESA_TNL_POBJS = $(MESATNLBUILDDIR)profiled/t_array_api.o \ - $(MESATNLBUILDDIR)profiled/t_array_import.o \ - $(MESATNLBUILDDIR)profiled/t_context.o \ + MESA_TNL_POBJS = $(MESATNLBUILDDIR)profiled/t_context.o \ + $(MESATNLBUILDDIR)profiled/t_draw.o \ $(MESATNLBUILDDIR)profiled/t_pipeline.o \ - $(MESATNLBUILDDIR)profiled/t_save_api.o \ - $(MESATNLBUILDDIR)profiled/t_save_loopback.o \ - $(MESATNLBUILDDIR)profiled/t_save_playback.o \ - $(MESATNLBUILDDIR)profiled/t_vb_arbprogram.o \ - $(MESATNLBUILDDIR)profiled/t_vb_arbprogram_sse.o \ $(MESATNLBUILDDIR)profiled/t_vb_fog.o \ $(MESATNLBUILDDIR)profiled/t_vb_cull.o \ $(MESATNLBUILDDIR)profiled/t_vb_light.o \ @@ -206,14 +120,5 @@ LinkSourceFile(t_vtx_x86_gcc.S, $(MESASRCDIR)/src/mesa/tnl) $(MESATNLBUILDDIR)profiled/t_vertex.o \ $(MESATNLBUILDDIR)profiled/t_vertex_generic.o \ $(MESATNLBUILDDIR)profiled/t_vertex_sse.o \ - $(MESATNLBUILDDIR)profiled/t_vp_build.o \ - $(MESATNLBUILDDIR)profiled/t_vtx_api.o \ - $(MESATNLBUILDDIR)profiled/t_vtx_eval.o \ - $(MESATNLBUILDDIR)profiled/t_vtx_exec.o \ - $(MESATNLBUILDDIR)profiled/t_vtx_generic.o - -#if defined(i386Architecture) && MesaUseX86Asm - MESA_TNL_POBJS += $(MESATNLBUILDDIR)profiled/t_vtx_x86.o \ - $(MESATNLBUILDDIR)profiled/t_vtx_x86_gcc.o -#endif + $(MESATNLBUILDDIR)profiled/t_vp_build.o diff --git a/nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile b/nx-X11/programs/Xserver/GL/mesa/vbo/Imakefile similarity index 63% rename from nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile rename to nx-X11/programs/Xserver/GL/mesa/vbo/Imakefile index 4747107479..8a4be7f759 100644 --- a/nx-X11/programs/Xserver/GL/mesa/array_cache/Imakefile +++ b/nx-X11/programs/Xserver/GL/mesa/vbo/Imakefile @@ -1,18 +1,27 @@ +/* Large PIC tables needed for Solaris/SPARC builds */ +#if defined(SunArchitecture) && defined(SparcArchitecture) && defined(LargePositionIndependentCFlags) + PICFLAGS = LargePositionIndependentCFlags +#endif + + #include #define NeedAllMesaSrc #define NeedToLinkMesaSrc -#define MesaACBuildDir /**/ +#define MesaVboBuildDir /**/ #include "Imakefile.inc" - SRCS = $(MESA_AC_SRCS) - OBJS = $(MESA_AC_OBJS) + + SRCS = $(MESA_VBO_SRCS) + OBJS = $(MESA_VBO_OBJS) INCLUDES = -I$(MESASRCDIR)/src/mesa \ - -I$(MESASRCDIR)/src/mesa/array_cache \ -I$(MESASRCDIR)/src/mesa/math \ -I$(MESASRCDIR)/src/mesa/main \ -I$(MESASRCDIR)/src/mesa/glapi \ + -I$(MESASRCDIR)/src/mesa/shader \ + -I$(MESASRCDIR)/src/mesa/shader/slang \ + -I$(MESASRCDIR)/src/mesa/vbo \ -I$(MESASRCDIR)/include \ -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ diff --git a/nx-X11/programs/Xserver/GL/mesa/vbo/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/vbo/Imakefile.inc new file mode 100644 index 0000000000..4eea8464fa --- /dev/null +++ b/nx-X11/programs/Xserver/GL/mesa/vbo/Imakefile.inc @@ -0,0 +1,104 @@ +MESAVBOBUILDDIR = MesaVboBuildDir + + MESA_VBO_SRCS = $(MESAVBOBUILDDIR)vbo_context.c \ + $(MESAVBOBUILDDIR)vbo_exec_api.c \ + $(MESAVBOBUILDDIR)vbo_exec_array.c \ + $(MESAVBOBUILDDIR)vbo_exec.c \ + $(MESAVBOBUILDDIR)vbo_exec_draw.c \ + $(MESAVBOBUILDDIR)vbo_exec_eval.c \ + $(MESAVBOBUILDDIR)vbo_rebase.c \ + $(MESAVBOBUILDDIR)vbo_save_api.c \ + $(MESAVBOBUILDDIR)vbo_save.c \ + $(MESAVBOBUILDDIR)vbo_save_draw.c \ + $(MESAVBOBUILDDIR)vbo_save_loopback.c \ + $(MESAVBOBUILDDIR)vbo_split.c \ + $(MESAVBOBUILDDIR)vbo_split_copy.c \ + $(MESAVBOBUILDDIR)vbo_split_inplace.c + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(vbo_attrib.h, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_attrib_tmp.h, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_context.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_context.h, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_exec_api.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_exec_array.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_exec.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_exec_draw.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_exec_eval.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_exec.h, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo.h, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_rebase.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_save_api.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_save.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_save_draw.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_save.h, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_save_loopback.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_split.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_split_copy.c, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_split.h, $(MESASRCDIR)/src/mesa/vbo) +LinkSourceFile(vbo_split_inplace.c, $(MESASRCDIR)/src/mesa/vbo) +#endif + + MESA_VBO_OBJS = $(MESAVBOBUILDDIR)vbo_context.o \ + $(MESAVBOBUILDDIR)vbo_exec_api.o \ + $(MESAVBOBUILDDIR)vbo_exec_array.o \ + $(MESAVBOBUILDDIR)vbo_exec.o \ + $(MESAVBOBUILDDIR)vbo_exec_draw.o \ + $(MESAVBOBUILDDIR)vbo_exec_eval.o \ + $(MESAVBOBUILDDIR)vbo_rebase.o \ + $(MESAVBOBUILDDIR)vbo_save_api.o \ + $(MESAVBOBUILDDIR)vbo_save.o \ + $(MESAVBOBUILDDIR)vbo_save_draw.o \ + $(MESAVBOBUILDDIR)vbo_save_loopback.o \ + $(MESAVBOBUILDDIR)vbo_split.o \ + $(MESAVBOBUILDDIR)vbo_split_copy.o \ + $(MESAVBOBUILDDIR)vbo_split_inplace.o + +#if defined(DoSharedLib) && DoSharedLib + MESA_VBO_UOBJS = $(MESAVBOBUILDDIR)unshared/vbo_context.o \ + $(MESAVBOBUILDDIR)unshared/vbo_exec_api.o \ + $(MESAVBOBUILDDIR)unshared/vbo_exec_array.o \ + $(MESAVBOBUILDDIR)unshared/vbo_exec.o \ + $(MESAVBOBUILDDIR)unshared/vbo_exec_draw.o \ + $(MESAVBOBUILDDIR)unshared/vbo_exec_eval.o \ + $(MESAVBOBUILDDIR)unshared/vbo_rebase.o \ + $(MESAVBOBUILDDIR)unshared/vbo_save_api.o \ + $(MESAVBOBUILDDIR)unshared/vbo_save.o \ + $(MESAVBOBUILDDIR)unshared/vbo_save_draw.o \ + $(MESAVBOBUILDDIR)unshared/vbo_save_loopback.o \ + $(MESAVBOBUILDDIR)unshared/vbo_split.o \ + $(MESAVBOBUILDDIR)unshared/vbo_split_copy.o \ + $(MESAVBOBUILDDIR)unshared/vbo_split_inplace.o +#else + MESA_VBO_UOBJS = $(MESA_VBO_OBJS) +#endif + + MESA_VBO_DOBJS = $(MESAVBOBUILDDIR)debugger/vbo_context.o \ + $(MESAVBOBUILDDIR)debugger/vbo_exec_api.o \ + $(MESAVBOBUILDDIR)debugger/vbo_exec_array.o \ + $(MESAVBOBUILDDIR)debugger/vbo_exec.o \ + $(MESAVBOBUILDDIR)debugger/vbo_exec_draw.o \ + $(MESAVBOBUILDDIR)debugger/vbo_exec_eval.o \ + $(MESAVBOBUILDDIR)debugger/vbo_rebase.o \ + $(MESAVBOBUILDDIR)debugger/vbo_save_api.o \ + $(MESAVBOBUILDDIR)debugger/vbo_save.o \ + $(MESAVBOBUILDDIR)debugger/vbo_save_draw.o \ + $(MESAVBOBUILDDIR)debugger/vbo_save_loopback.o \ + $(MESAVBOBUILDDIR)debugger/vbo_split.o \ + $(MESAVBOBUILDDIR)debugger/vbo_split_copy.o \ + $(MESAVBOBUILDDIR)debugger/vbo_split_inplace.o + + MESA_VBO_POBJS = $(MESAVBOBUILDDIR)profiled/vbo_context.o \ + $(MESAVBOBUILDDIR)profiled/vbo_exec_api.o \ + $(MESAVBOBUILDDIR)profiled/vbo_exec_array.o \ + $(MESAVBOBUILDDIR)profiled/vbo_exec.o \ + $(MESAVBOBUILDDIR)profiled/vbo_exec_draw.o \ + $(MESAVBOBUILDDIR)profiled/vbo_exec_eval.o \ + $(MESAVBOBUILDDIR)profiled/vbo_rebase.o \ + $(MESAVBOBUILDDIR)profiled/vbo_save_api.o \ + $(MESAVBOBUILDDIR)profiled/vbo_save.o \ + $(MESAVBOBUILDDIR)profiled/vbo_save_draw.o \ + $(MESAVBOBUILDDIR)profiled/vbo_save_loopback.o \ + $(MESAVBOBUILDDIR)profiled/vbo_split.o \ + $(MESAVBOBUILDDIR)profiled/vbo_split_copy.o \ + $(MESAVBOBUILDDIR)profiled/vbo_split_inplace.o diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c b/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c index 5512cae1b4..01560d58a7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglxext.c @@ -107,77 +107,10 @@ static int __glXDispatch(ClientPtr client) /* ** Use the opcode to index into the procedure table. */ - proc = __glXSingleTable[opcode]; - - /* - * Report upstream that we are - * dispatching a GLX operation. - */ - - nxagentGlxTrap = 1; - - #ifdef TEST - fprintf(stderr, "__glXDispatch: Going to dispatch GLX operation [%d] for client [%d].\n", - opcode, client -> index); - #endif - - result = (*proc)(cl, (GLbyte *) stuff); - - nxagentGlxTrap = 0; - - #ifdef TEST - fprintf(stderr, "__glXDispatch: Dispatched GLX operation [%d] for client [%d].\n", - opcode, client -> index); - #endif - - return result; -} - -static int __glXSwapDispatch(ClientPtr client) -{ - int result; - - REQUEST(xGLXSingleReq); - CARD8 opcode; - int (*proc)(__GLXclientState *cl, GLbyte *pc); - __GLXclientState *cl; - - opcode = stuff->glxCode; - cl = __glXClients[client->index]; - if (!cl) { - cl = (__GLXclientState *) malloc(sizeof(__GLXclientState)); - __glXClients[client->index] = cl; - if (!cl) { - return BadAlloc; - } - memset(cl, 0, sizeof(__GLXclientState)); - } - - if (!cl->inUse) { - /* - ** This is first request from this client. Associate a resource - ** with the client so we will be notified when the client dies. - */ - XID xid = FakeClientID(client->index); - if (!AddResource( xid, __glXClientRes, (void *)(long)client->index)) { - return BadAlloc; - } - ResetClientState(client->index); - cl->inUse = GL_TRUE; - cl->client = client; - } - - /* - ** Check for valid opcode. - */ - if (opcode >= __GLX_SINGLE_TABLE_SIZE) { - return BadRequest; - } - - /* - ** Use the opcode to index into the procedure table. - */ - proc = __glXSwapSingleTable[opcode]; + if (client->swapped) + proc = __glXSwapSingleTable[opcode]; + else + proc = __glXSingleTable[opcode]; /* * Report upstream that we are diff --git a/nx-X11/programs/Xserver/include/xorg-server.h b/nx-X11/programs/Xserver/include/xorg-server.h new file mode 100644 index 0000000000..73d3abf0d9 --- /dev/null +++ b/nx-X11/programs/Xserver/include/xorg-server.h @@ -0,0 +1,3 @@ +/* + dummy file to satisfy mesa's glxheader.h +*/ diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c index 6f6d678411..907698284e 100644 --- a/nx-X11/programs/Xserver/mi/miinitext.c +++ b/nx-X11/programs/Xserver/mi/miinitext.c @@ -224,6 +224,9 @@ extern void SecurityExtensionInit(void); extern void XFree86BigfontExtensionInit(void); #endif #ifdef GLXEXT +typedef struct __GLXprovider __GLXprovider; +extern __GLXprovider __glXMesaProvider; +extern void GlxPushProvider(__GLXprovider *impl); #ifndef __DARWIN__ extern void GlxExtensionInit(void); extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); @@ -443,6 +446,8 @@ InitExtensions(argc, argv) #endif #endif #ifdef GLXEXT + + GlxPushProvider(&__glXMesaProvider); #ifndef __DARWIN__ if (!noGlxExtension) GlxExtensionInit(); #else