glx: convert to direct GL dispatch (v2)

We now expect to be linked against something that provides the GL API,
instead of manually grubbing about in the DRI driver's dispatch table.
Since the GLX we expose calls GL functions that are meant to be looked
up dynamically, also add a way to thunk through to GetProcAddress.

This includes a refresh of the generated sources, which requires a
correspondingly new Mesa.

The GetProcAddress stubs are at the moment merely enough to make this
link against Mesa 9.2, but should really be provided for everything not
in the OpenGL 1.2 ABI.

v2: Explicitly hide the GetProcAddress stubs so we can't conflict with
libGL symbols; fix leading tab/space issues [anholt]

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2013-07-10 10:00:46 -04:00
parent 8aacf47e17
commit be6680967a
39 changed files with 3678 additions and 41645 deletions

View File

@ -1070,7 +1070,7 @@ if test "x$GLX" = xyes; then
AC_SUBST(XLIB_CFLAGS)
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
GLX_LIBS='$(top_builddir)/glx/libglx.la'
GLX_SYS_LIBS="$GLX_SYS_LIBS"
GLX_SYS_LIBS="$GLX_SYS_LIBS -lGL"
else
GLX=no
fi

View File

@ -26,7 +26,7 @@ if DRI2_AIGLX
AM_CPPFLAGS += -I$(top_srcdir)/hw/xfree86/dri2
endif
glapi_sources = \
indirect_sources = \
indirect_dispatch.c \
indirect_dispatch.h \
indirect_dispatch_swap.c \
@ -35,15 +35,7 @@ glapi_sources = \
indirect_size.h \
indirect_size_get.c \
indirect_size_get.h \
indirect_table.c \
dispatch.h \
glapitable.h \
glapi.c \
glapi.h \
glapi_gentable.c \
glprocs.h \
glthread.c \
glthread.h
indirect_table.c
libglxdri_la_SOURCES =
@ -55,7 +47,6 @@ libglxdri_la_LIBADD = $(DLOPEN_LIBS)
libglx_la_SOURCES = \
$(indirect_sources) \
$(glapi_sources) \
clientinfo.c \
createcontext.c \
extension_string.c \
@ -78,6 +69,7 @@ libglx_la_SOURCES = \
glxscreens.c \
glxscreens.h \
glxserver.h \
glxstubs.c \
glxutil.h \
render2.c \
render2swap.c \

File diff suppressed because it is too large Load Diff

View File

@ -1,504 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
*
* Copyright (C) 1999-2006 Brian Paul 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, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL 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.
*/
/*
* This file manages the OpenGL API dispatch layer. There are functions
* to set/get the current dispatch table for the current thread and to
* manage registration/dispatch of dynamically added extension functions.
*
* This code was originally general enough to be shared with Mesa, but
* they diverged long ago, so this is now just enough support to make
* indirect GLX work.
*/
#include <dix-config.h>
#include <X11/Xfuncproto.h>
#include <os.h>
#define PUBLIC _X_EXPORT
#include <stdlib.h>
#include <string.h>
#ifdef DEBUG
#include <assert.h>
#endif
#include "glapi.h"
#include "dispatch.h"
#include "glapitable.h"
#define FIRST_DYNAMIC_OFFSET (sizeof(struct _glapi_table) / sizeof(void *))
#if defined(PTHREADS) || defined(GLX_USE_TLS)
static void init_glapi_relocs(void);
#endif
/**
* \name Current dispatch and current context control variables
*
* Depending on whether or not multithreading is support, and the type of
* support available, several variables are used to store the current context
* pointer and the current dispatch table pointer. In the non-threaded case,
* the variables \c _glapi_Dispatch and \c _glapi_Context are used for this
* purpose.
*
* In the "normal" threaded case, the variables \c _glapi_Dispatch and
* \c _glapi_Context will be \c NULL if an application is detected as being
* multithreaded. Single-threaded applications will use \c _glapi_Dispatch
* and \c _glapi_Context just like the case without any threading support.
* When \c _glapi_Dispatch and \c _glapi_Context are \c NULL, the thread state
* data \c _gl_DispatchTSD and \c ContextTSD are used. Drivers and the
* static dispatch functions access these variables via \c _glapi_get_dispatch
* and \c _glapi_get_context.
*
* In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are
* hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and
* \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and
* \c _glapi_Context be hardcoded to \c NULL maintains binary compatability
* between TLS enabled loaders and non-TLS DRI drivers.
*/
/*@{*/
#if defined(GLX_USE_TLS)
PUBLIC TLS struct _glapi_table *_glapi_tls_Dispatch = NULL;
PUBLIC TLS void *_glapi_tls_Context;
PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
PUBLIC const void *_glapi_Context = NULL;
#else
#if defined(THREADS)
_glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */
static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
#if defined(WIN32_THREADS)
void FreeTSD(_glthread_TSD * p);
void
FreeAllTSD(void)
{
FreeTSD(&_gl_DispatchTSD);
FreeTSD(&ContextTSD);
}
#endif /* defined(WIN32_THREADS) */
#endif /* defined(THREADS) */
PUBLIC struct _glapi_table *_glapi_Dispatch = NULL;
PUBLIC void *_glapi_Context = NULL;
#endif /* defined(GLX_USE_TLS) */
/*@}*/
/*
* xserver's gl is not multithreaded, we promise.
*/
PUBLIC void
_glapi_check_multithread(void)
{
}
/**
* Set the current context pointer for this thread.
* The context pointer is an opaque type which should be cast to
* void from the real context pointer type.
*/
PUBLIC void
_glapi_set_context(void *context)
{
#if defined(GLX_USE_TLS)
_glapi_tls_Context = context;
#elif defined(THREADS)
_glthread_SetTSD(&ContextTSD, context);
_glapi_Context = context;
#else
_glapi_Context = context;
#endif
}
/**
* Get the current context pointer for this thread.
* The context pointer is an opaque type which should be cast from
* void to the real context pointer type.
*/
PUBLIC void *
_glapi_get_context(void)
{
#if defined(GLX_USE_TLS)
return _glapi_tls_Context;
#else
return _glapi_Context;
#endif
}
/**
* Set the global or per-thread dispatch table pointer.
*/
PUBLIC void
_glapi_set_dispatch(struct _glapi_table *dispatch)
{
#if defined(PTHREADS) || defined(GLX_USE_TLS)
static pthread_once_t once_control = PTHREAD_ONCE_INIT;
pthread_once(&once_control, init_glapi_relocs);
#endif
#if defined(GLX_USE_TLS)
_glapi_tls_Dispatch = dispatch;
#elif defined(THREADS)
_glthread_SetTSD(&_gl_DispatchTSD, (void *) dispatch);
_glapi_Dispatch = dispatch;
#else /*THREADS*/
_glapi_Dispatch = dispatch;
#endif /*THREADS*/
}
/**
* Return pointer to current dispatch table for calling thread.
*/
PUBLIC struct _glapi_table *
_glapi_get_dispatch(void)
{
struct _glapi_table *api;
#if defined(GLX_USE_TLS)
api = _glapi_tls_Dispatch;
#else
api = _glapi_Dispatch;
#endif
return api;
}
/***
*** The rest of this file is pretty much concerned with GetProcAddress
*** functionality.
***/
#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
#define DISPATCH_FUNCTION_SIZE 16
#elif defined(USE_X86_ASM)
#if defined(THREADS) && !defined(GLX_USE_TLS)
#define DISPATCH_FUNCTION_SIZE 32
#else
#define DISPATCH_FUNCTION_SIZE 16
#endif
#endif
/* The code in this file is auto-generated with Python */
#include "glprocs.h"
/**
* Search the table of static entrypoint functions for the named function
* and return the corresponding glprocs_table_t entry.
*/
static const glprocs_table_t *
find_entry(const char *n)
{
GLuint i;
for (i = 0; static_functions[i].Name_offset >= 0; i++) {
const char *testName =
gl_string_table + static_functions[i].Name_offset;
if (strcmp(testName, n) == 0) {
return &static_functions[i];
}
}
return NULL;
}
/**
* Return dispatch table offset of the named static (built-in) function.
* Return -1 if function not found.
*/
static GLint
get_static_proc_offset(const char *funcName)
{
const glprocs_table_t *const f = find_entry(funcName);
if (f) {
return f->Offset;
}
return -1;
}
/**********************************************************************
* Extension function management.
*/
/*
* Number of extension functions which we can dynamically add at runtime.
*/
#define MAX_EXTENSION_FUNCS 300
/*
* The dispatch table size (number of entries) is the size of the
* _glapi_table struct plus the number of dynamic entries we can add.
* The extra slots can be filled in by DRI drivers that register new extension
* functions.
*/
#define DISPATCH_TABLE_SIZE (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS)
/**
* Track information about a function added to the GL API.
*/
struct _glapi_function {
/**
* Name of the function.
*/
const char *name;
/**
* Text string that describes the types of the parameters passed to the
* named function. Parameter types are converted to characters using the
* following rules:
* - 'i' for \c GLint, \c GLuint, and \c GLenum
* - 'p' for any pointer type
* - 'f' for \c GLfloat and \c GLclampf
* - 'd' for \c GLdouble and \c GLclampd
*/
const char *parameter_signature;
/**
* Offset in the dispatch table where the pointer to the real function is
* located. If the driver has not requested that the named function be
* added to the dispatch table, this will have the value ~0.
*/
unsigned dispatch_offset;
};
static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS];
static GLuint NumExtEntryPoints = 0;
/**
* Generate new entrypoint
*
* Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver
* calls \c _glapi_add_dispatch we'll put in the proper offset. If that
* never happens, and the user calls this function, he'll segfault. That's
* what you get when you try calling a GL function that doesn't really exist.
*
* \param funcName Name of the function to create an entry-point for.
*
* \sa _glapi_add_entrypoint
*/
static struct _glapi_function *
add_function_name(const char *funcName)
{
struct _glapi_function *entry = NULL;
if (NumExtEntryPoints < MAX_EXTENSION_FUNCS) {
entry = &ExtEntryTable[NumExtEntryPoints];
ExtEntryTable[NumExtEntryPoints].name = strdup(funcName);
ExtEntryTable[NumExtEntryPoints].parameter_signature = NULL;
ExtEntryTable[NumExtEntryPoints].dispatch_offset = ~0;
NumExtEntryPoints++;
}
return entry;
}
/**
* Fill-in the dispatch stub for the named function.
*
* This function is intended to be called by a hardware driver. When called,
* a dispatch stub may be created created for the function. A pointer to this
* dispatch function will be returned by glXGetProcAddress.
*
* \param function_names Array of pointers to function names that should
* share a common dispatch offset.
* \param parameter_signature String representing the types of the parameters
* passed to the named function. Parameter types
* are converted to characters using the following
* rules:
* - 'i' for \c GLint, \c GLuint, and \c GLenum
* - 'p' for any pointer type
* - 'f' for \c GLfloat and \c GLclampf
* - 'd' for \c GLdouble and \c GLclampd
*
* \returns
* The offset in the dispatch table of the named function. A pointer to the
* driver's implementation of the named function should be stored at
* \c dispatch_table[\c offset].
*
* \sa glXGetProcAddress
*
* \warning
* This function can only handle up to 8 names at a time. As far as I know,
* the maximum number of names ever associated with an existing GL function is
* 4 (\c glPointParameterfSGIS, \c glPointParameterfEXT,
* \c glPointParameterfARB, and \c glPointParameterf), so this should not be
* too painful of a limitation.
*
* \todo
* Determine whether or not \c parameter_signature should be allowed to be
* \c NULL. It doesn't seem like much of a hardship for drivers to have to
* pass in an empty string.
*
* \todo
* Determine if code should be added to reject function names that start with
* 'glX'.
*
* \bug
* Add code to compare \c parameter_signature with the parameter signature of
* a static function. In order to do that, we need to find a way to \b get
* the parameter signature of a static function.
*/
PUBLIC int
_glapi_add_dispatch(const char *const *function_names,
const char *parameter_signature)
{
static int next_dynamic_offset = FIRST_DYNAMIC_OFFSET;
const char *const real_sig = (parameter_signature != NULL)
? parameter_signature : "";
struct _glapi_function *entry[8];
GLboolean is_static[8];
unsigned i;
unsigned j;
int offset = ~0;
int new_offset;
(void) memset(is_static, 0, sizeof(is_static));
(void) memset(entry, 0, sizeof(entry));
for (i = 0; function_names[i] != NULL; i++) {
/* Do some trivial validation on the name of the function. */
if (function_names[i][0] != 'g' || function_names[i][1] != 'l')
return GL_FALSE;
/* Determine if the named function already exists. If the function does
* exist, it must have the same parameter signature as the function
* being added.
*/
new_offset = get_static_proc_offset(function_names[i]);
if (new_offset >= 0) {
/* FIXME: Make sure the parameter signatures match! How do we get
* FIXME: the parameter signature for static functions?
*/
if ((offset != ~0) && (new_offset != offset)) {
return -1;
}
is_static[i] = GL_TRUE;
offset = new_offset;
}
for (j = 0; j < NumExtEntryPoints; j++) {
if (strcmp(ExtEntryTable[j].name, function_names[i]) == 0) {
/* The offset may be ~0 if the function name was added by
* glXGetProcAddress but never filled in by the driver.
*/
if (ExtEntryTable[j].dispatch_offset != ~0) {
if (strcmp(real_sig, ExtEntryTable[j].parameter_signature)
!= 0)
return -1;
if ((offset != ~0) &&
(ExtEntryTable[j].dispatch_offset != offset)) {
return -1;
}
offset = ExtEntryTable[j].dispatch_offset;
}
entry[i] = &ExtEntryTable[j];
break;
}
}
}
if (offset == ~0) {
offset = next_dynamic_offset;
next_dynamic_offset++;
}
for (i = 0; function_names[i] != NULL; i++) {
if (!is_static[i]) {
if (entry[i] == NULL) {
entry[i] = add_function_name(function_names[i]);
if (entry[i] == NULL)
return -1;
}
entry[i]->parameter_signature = strdup(real_sig);
entry[i]->dispatch_offset = offset;
}
}
return offset;
}
/*
* glXGetProcAddress doesn't exist in the protocol, the drivers never call
* this themselves, and neither does the server. warn if it happens though.
*/
PUBLIC _glapi_proc
_glapi_get_proc_address(const char *funcName)
{
ErrorF("_glapi_get_proc_address called!\n");
return NULL;
}
/**
* Return size of dispatch table struct as number of functions (or
* slots).
*/
PUBLIC GLuint
_glapi_get_dispatch_table_size(void)
{
return DISPATCH_TABLE_SIZE;
}
#if defined(PTHREADS) || defined(GLX_USE_TLS)
/**
* Perform platform-specific GL API entry-point fixups.
*/
static void
init_glapi_relocs(void)
{
#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
extern unsigned long _x86_get_dispatch(void);
char run_time_patch[] = {
0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
};
GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
const GLubyte *const get_disp = (const GLubyte *) run_time_patch;
GLubyte *curr_func = (GLubyte *) gl_dispatch_functions_start;
*offset = _x86_get_dispatch();
while (curr_func != (GLubyte *) gl_dispatch_functions_end) {
(void) memcpy(curr_func, get_disp, sizeof(run_time_patch));
curr_func += DISPATCH_FUNCTION_SIZE;
}
#endif
}
#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */

View File

@ -1,135 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 7.1
*
* Copyright (C) 1999-2008 Brian Paul 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, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL 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.
*/
/**
* \mainpage Mesa GL API Module
*
* \section GLAPIIntroduction Introduction
*
* The Mesa GL API module is responsible for dispatching all the
* gl*() functions. All GL functions are dispatched by jumping through
* the current dispatch table (basically a struct full of function
* pointers.)
*
* A per-thread current dispatch table and per-thread current context
* pointer are managed by this module too.
*
* This module is intended to be non-Mesa-specific so it can be used
* with the X/DRI libGL also.
*/
#ifndef _GLAPI_H
#define _GLAPI_H
#define GL_GLEXT_PROTOTYPES
#include "GL/gl.h"
#include "GL/glext.h"
#include "glthread.h"
struct _glapi_table;
typedef void (*_glapi_proc) (void); /* generic function pointer */
typedef void (*_glapi_warning_func) (void *ctx, const char *str, ...);
#if defined(USE_MGL_NAMESPACE)
#define _glapi_set_dispatch _mglapi_set_dispatch
#define _glapi_get_dispatch _mglapi_get_dispatch
#define _glapi_set_context _mglapi_set_context
#define _glapi_get_context _mglapi_get_context
#define _glapi_Context _mglapi_Context
#define _glapi_Dispatch _mglapi_Dispatch
#endif
/*
* Number of extension functions which we can dynamically add at runtime.
*/
#define MAX_EXTENSION_FUNCS 300
/**
** Define the GET_CURRENT_CONTEXT() macro.
** \param C local variable which will hold the current context.
**/
#if defined (GLX_USE_TLS)
const extern void *_glapi_Context;
const extern struct _glapi_table *_glapi_Dispatch;
extern TLS void *_glapi_tls_Context;
#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
#else
extern void *_glapi_Context;
extern struct _glapi_table *_glapi_Dispatch;
#ifdef THREADS
#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
#else
#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
#endif
#endif /* defined (GLX_USE_TLS) */
/**
** GL API public functions
**/
extern void
_glapi_check_multithread(void);
extern void
_glapi_set_context(void *context);
extern void *_glapi_get_context(void);
extern void
_glapi_set_dispatch(struct _glapi_table *dispatch);
extern struct _glapi_table *_glapi_get_dispatch(void);
extern int
_glapi_begin_dispatch_override(struct _glapi_table *override);
extern void
_glapi_end_dispatch_override(int layer);
struct _glapi_table *_glapi_get_override_dispatch(int layer);
extern GLuint _glapi_get_dispatch_table_size(void);
extern int
_glapi_add_dispatch(const char *const *function_names,
const char *parameter_signature);
extern _glapi_proc _glapi_get_proc_address(const char *funcName);
extern struct _glapi_table *_glapi_create_table_from_handle(void *handle,
const char
*symbol_prefix);
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,234 +0,0 @@
/*
* Mesa 3-D graphics library
* Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul 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, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL 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.
*/
/*
* Thread support for gl dispatch.
*
* Initial version by John Stone (j.stone@acm.org) (johns@cs.umr.edu)
* and Christoph Poliwoda (poliwoda@volumegraphics.com)
* Revised by Keith Whitwell
* Adapted for new gl dispatcher by Brian Paul
*
*
*
* DOCUMENTATION
*
* This thread module exports the following types:
* _glthread_TSD Thread-specific data area
* _glthread_Thread Thread datatype
* _glthread_Mutex Mutual exclusion lock
*
* Macros:
* _glthread_DECLARE_STATIC_MUTEX(name) Declare a non-local mutex
* _glthread_INIT_MUTEX(name) Initialize a mutex
* _glthread_LOCK_MUTEX(name) Lock a mutex
* _glthread_UNLOCK_MUTEX(name) Unlock a mutex
*
* Functions:
* _glthread_GetID(v) Get integer thread ID
* _glthread_InitTSD() Initialize thread-specific data
* _glthread_GetTSD() Get thread-specific data
* _glthread_SetTSD() Set thread-specific data
*
*/
/*
* If this file is accidentally included by a non-threaded build,
* it should not cause the build to fail, or otherwise cause problems.
* In general, it should only be included when needed however.
*/
#ifndef GLTHREAD_H
#define GLTHREAD_H
#if defined(USE_MGL_NAMESPACE)
#define _glapi_Dispatch _mglapi_Dispatch
#endif
#if (defined(PTHREADS) || defined(WIN32_THREADS)) \
&& !defined(THREADS)
#define THREADS
#endif
#ifdef VMS
#include <GL/vms_x_fix.h>
#endif
/*
* POSIX threads. This should be your choice in the Unix world
* whenever possible. When building with POSIX threads, be sure
* to enable any compiler flags which will cause the MT-safe
* libc (if one exists) to be used when linking, as well as any
* header macros for MT-safe errno, etc. For Solaris, this is the -mt
* compiler flag. On Solaris with gcc, use -D_REENTRANT to enable
* proper compiling for MT-safe libc etc.
*/
#if defined(PTHREADS)
#include <pthread.h> /* POSIX threads headers */
typedef struct {
pthread_key_t key;
int initMagic;
} _glthread_TSD;
typedef pthread_t _glthread_Thread;
typedef pthread_mutex_t _glthread_Mutex;
#define _glthread_DECLARE_STATIC_MUTEX(name) \
static _glthread_Mutex name = PTHREAD_MUTEX_INITIALIZER
#define _glthread_INIT_MUTEX(name) \
pthread_mutex_init(&(name), NULL)
#define _glthread_DESTROY_MUTEX(name) \
pthread_mutex_destroy(&(name))
#define _glthread_LOCK_MUTEX(name) \
(void) pthread_mutex_lock(&(name))
#define _glthread_UNLOCK_MUTEX(name) \
(void) pthread_mutex_unlock(&(name))
#endif /* PTHREADS */
/*
* Solaris threads. Use only up to Solaris 2.4.
* Solaris 2.5 and higher provide POSIX threads.
* Be sure to compile with -mt on the Solaris compilers, or
* use -D_REENTRANT if using gcc.
*/
/*
* Windows threads. Should work with Windows NT and 95.
* IMPORTANT: Link with multithreaded runtime library when THREADS are
* used!
*/
#ifdef WIN32_THREADS
#include <windows.h>
typedef struct {
DWORD key;
int initMagic;
} _glthread_TSD;
typedef HANDLE _glthread_Thread;
typedef CRITICAL_SECTION _glthread_Mutex;
#define _glthread_DECLARE_STATIC_MUTEX(name) /*static*/ _glthread_Mutex name = {0,0,0,0,0,0}
#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name)
#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name)
#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name)
#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name)
#endif /* WIN32_THREADS */
/*
* BeOS threads. R5.x required.
*/
#ifdef BEOS_THREADS
#include <kernel/OS.h>
#include <support/TLS.h>
typedef struct {
int32 key;
int initMagic;
} _glthread_TSD;
typedef thread_id _glthread_Thread;
/* Use Benaphore, aka speeder semaphore */
typedef struct {
int32 lock;
sem_id sem;
} benaphore;
typedef benaphore _glthread_Mutex;
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, 0 }
#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0
#define _glthread_DESTROY_MUTEX(name) delete_sem(name.sem), name.lock = 0
#define _glthread_LOCK_MUTEX(name) if (name.sem == 0) _glthread_INIT_MUTEX(name); \
if (atomic_add(&(name.lock), 1) >= 1) acquire_sem(name.sem)
#define _glthread_UNLOCK_MUTEX(name) if (atomic_add(&(name.lock), -1) > 1) release_sem(name.sem)
#endif /* BEOS_THREADS */
#ifndef THREADS
/*
* THREADS not defined
*/
typedef int _glthread_TSD;
typedef int _glthread_Thread;
typedef int _glthread_Mutex;
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
#define _glthread_INIT_MUTEX(name) (void) name
#define _glthread_DESTROY_MUTEX(name) (void) name
#define _glthread_LOCK_MUTEX(name) (void) name
#define _glthread_UNLOCK_MUTEX(name) (void) name
#endif /* THREADS */
/*
* Platform independent thread specific data API.
*/
extern unsigned long
_glthread_GetID(void);
extern void
_glthread_InitTSD(_glthread_TSD *);
extern void *_glthread_GetTSD(_glthread_TSD *);
extern void
_glthread_SetTSD(_glthread_TSD *, void *);
#if defined(GLX_USE_TLS)
extern TLS struct _glapi_table *_glapi_tls_Dispatch;
#define GET_DISPATCH() _glapi_tls_Dispatch
#elif !defined(GL_CALL)
#if defined(THREADS)
#define GET_DISPATCH() \
((__builtin_expect( _glapi_Dispatch != NULL, 1 )) \
? _glapi_Dispatch : _glapi_get_dispatch())
#else
#define GET_DISPATCH() _glapi_Dispatch
#endif /* defined(THREADS) */
#endif /* ndef GL_CALL */
#endif /* THREADS_H */

View File

@ -42,10 +42,6 @@
#include <windowstr.h>
#include "glxutil.h"
#include "glxext.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "indirect_dispatch.h"
#include "indirect_table.h"
#include "indirect_util.h"
@ -617,7 +613,7 @@ DoMakeCurrent(__GLXclientState * cl,
*/
if (prevglxc->hasUnflushedCommands) {
if (__glXForceCurrent(cl, tag, (int *) &error)) {
CALL_Flush(GET_DISPATCH(), ());
glFlush();
prevglxc->hasUnflushedCommands = GL_FALSE;
}
else {
@ -800,7 +796,7 @@ __glXDisp_WaitGL(__GLXclientState * cl, GLbyte * pc)
if (!__glXForceCurrent(cl, req->contextTag, &error))
return error;
CALL_Finish(GET_DISPATCH(), ());
glFinish();
}
if (glxc && glxc->drawPriv->waitGL)
@ -898,7 +894,7 @@ __glXDisp_CopyContext(__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.
*/
CALL_Finish(GET_DISPATCH(), ());
glFinish();
tagcx->hasUnflushedCommands = GL_FALSE;
}
else {
@ -1675,7 +1671,7 @@ __glXDisp_SwapBuffers(__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.
*/
CALL_Finish(GET_DISPATCH(), ());
glFinish();
glxc->hasUnflushedCommands = GL_FALSE;
}
else {
@ -1872,7 +1868,7 @@ __glXDisp_CopySubBufferMESA(__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.
*/
CALL_Finish(GET_DISPATCH(), ());
glFinish();
glxc->hasUnflushedCommands = GL_FALSE;
}
else {

View File

@ -40,10 +40,6 @@
#include <pixmapstr.h>
#include <windowstr.h>
#include "glxext.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "indirect_dispatch.h"
#include "indirect_table.h"
#include "indirect_util.h"

View File

@ -49,10 +49,6 @@
#include "glxdricommon.h"
#include <GL/glxtokens.h>
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "extension_string.h"
typedef struct __GLXDRIscreen __GLXDRIscreen;

View File

@ -48,10 +48,6 @@
#include "glxutil.h"
#include "glxdricommon.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "extension_string.h"
/* RTLD_LOCAL is not defined on Cygwin */

View File

@ -541,6 +541,19 @@ __glXleaveServer(GLboolean rendering)
glxServerLeaveCount++;
}
static void (*(*_get_proc_address)(const char *))(void);
void
__glXsetGetProcAddress(void (*(*get_proc_address) (const char *))(void))
{
_get_proc_address = get_proc_address;
}
void *__glGetProcAddress(const char *proc)
{
return _get_proc_address(proc);
}
/*
** Top level dispatcher; all commands are executed from here down.
*/

View File

@ -46,7 +46,9 @@
#include <resource.h>
#include <scrnintstr.h>
#define GL_GLEXT_PROTOTYPES /* we want prototypes */
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/glxproto.h>
/*
@ -115,6 +117,9 @@ void __glXleaveServer(GLboolean rendering);
void glxSuspendClients(void);
void glxResumeClients(void);
void __glXsetGetProcAddress(void (*(*get_proc_address) (const char *)) (void));
void *__glGetProcAddress(const char *);
/*
** State kept per client.
*/

50
glx/glxstubs.c Normal file
View File

@ -0,0 +1,50 @@
/*
* Copyright © 2013 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Authors:
* Adam Jackson <ajax@redhat.com>
*/
/*
* Redirection stubs for things that we call by name but that aren't exported
* from libGL by name. Strictly speaking this list should be a lot longer,
* but this is enough to get us linking against contemporary Mesa.
*/
#include <inttypes.h>
#include "glxserver.h"
#define thunk(name, type, call_args, ...) \
_X_HIDDEN void name(__VA_ARGS__) { \
static type proc; \
if (!proc) proc = __glGetProcAddress(#name); \
proc call_args; \
}
thunk(glSampleMaskSGIS, PFNGLSAMPLEMASKSGISPROC,
(value, invert), GLclampf value, GLboolean invert)
thunk(glSamplePatternSGIS, PFNGLSAMPLEPATTERNSGISPROC,
(pattern), GLenum pattern)
thunk(glActiveStencilFaceEXT, PFNGLACTIVESTENCILFACEEXTPROC,
(face), GLenum face)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -40,28 +40,15 @@
#include "unpack.h"
#include "indirect_size_get.h"
#include "indirect_dispatch.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc,
unsigned get_programiv_offset,
unsigned get_program_string_offset, Bool do_swap);
/**
* Handle both types of glGetProgramString calls.
*
* This single function handles both \c glGetProgramStringARB and
* \c glGetProgramStringNV. The dispatch offsets for the functions to use
* for \c glGetProgramivARB and \c glGetProgramStringARB are passed in by the
* caller. These can be the offsets of either the ARB versions or the NV
* versions.
*/
int
static int
DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc,
unsigned get_programiv_offset,
unsigned get_program_string_offset, Bool do_swap)
PFNGLGETPROGRAMIVARBPROC get_programiv,
PFNGLGETPROGRAMSTRINGARBPROC get_program_string,
Bool do_swap)
{
xGLXVendorPrivateWithReplyReq *const req =
(xGLXVendorPrivateWithReplyReq *) pc;
@ -88,19 +75,13 @@ DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc,
/* The value of the GL_PROGRAM_LENGTH_ARB and GL_PROGRAM_LENGTH_NV
* enumerants is the same.
*/
CALL_by_offset(GET_DISPATCH(),
(void (GLAPIENTRYP) (GLuint, GLenum, GLint *)),
get_programiv_offset,
(target, GL_PROGRAM_LENGTH_ARB, &compsize));
get_programiv(target, GL_PROGRAM_LENGTH_ARB, &compsize);
if (compsize != 0) {
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_by_offset(GET_DISPATCH(),
(void (GLAPIENTRYP) (GLuint, GLenum, GLubyte *)),
get_program_string_offset,
(target, pname, (GLubyte *) answer));
get_program_string(target, pname, (GLubyte *) answer);
}
if (__glXErrorOccured()) {
@ -123,27 +104,29 @@ DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc,
int
__glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc)
{
return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB,
_gloffset_GetProgramStringARB, False);
return DoGetProgramString(cl, pc, glGetProgramivARB,
glGetProgramStringARB, False);
}
int
__glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc)
{
return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB,
_gloffset_GetProgramStringARB, True);
return DoGetProgramString(cl, pc, glGetProgramivARB,
glGetProgramStringARB, True);
}
int
__glXDisp_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte * pc)
{
return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV,
_gloffset_GetProgramStringNV, False);
return DoGetProgramString(cl, pc, (PFNGLGETPROGRAMIVARBPROC)glGetProgramivNV,
(PFNGLGETPROGRAMSTRINGARBPROC)glGetProgramStringNV,
False);
}
int
__glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte * pc)
{
return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV,
_gloffset_GetProgramStringNV, True);
return DoGetProgramString(cl, pc, (PFNGLGETPROGRAMIVARBPROC)glGetProgramivNV,
(PFNGLGETPROGRAMSTRINGARBPROC)glGetProgramStringNV,
True);
}

View File

@ -613,7 +613,7 @@ __glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap)
}
int
__glXCompressedTexImage1DARBReqSize(const GLbyte * pc, Bool swap)
__glXCompressedTexImage1DReqSize(const GLbyte * pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 20);
@ -625,7 +625,7 @@ __glXCompressedTexImage1DARBReqSize(const GLbyte * pc, Bool swap)
}
int
__glXCompressedTexImage2DARBReqSize(const GLbyte * pc, Bool swap)
__glXCompressedTexImage2DReqSize(const GLbyte * pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 24);
@ -637,7 +637,7 @@ __glXCompressedTexImage2DARBReqSize(const GLbyte * pc, Bool swap)
}
int
__glXCompressedTexImage3DARBReqSize(const GLbyte * pc, Bool swap)
__glXCompressedTexImage3DReqSize(const GLbyte * pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 28);
@ -649,7 +649,7 @@ __glXCompressedTexImage3DARBReqSize(const GLbyte * pc, Bool swap)
}
int
__glXCompressedTexSubImage3DARBReqSize(const GLbyte * pc, Bool swap)
__glXCompressedTexSubImage3DReqSize(const GLbyte * pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 36);
@ -660,6 +660,32 @@ __glXCompressedTexSubImage3DARBReqSize(const GLbyte * pc, Bool swap)
return __GLX_PAD(imageSize);
}
int
__glXPointParameterfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 0);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glPointParameterfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXDrawBuffersReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 0);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 4));
}
int
__glXProgramStringARBReqSize(const GLbyte * pc, Bool swap)
{
@ -672,56 +698,6 @@ __glXProgramStringARBReqSize(const GLbyte * pc, Bool swap)
return __GLX_PAD(len);
}
int
__glXDrawBuffersARBReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 0);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 4));
}
int
__glXPointParameterfvEXTReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 0);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glPointParameterfvEXT_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXProgramParameters4dvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei num = *(GLsizei *) (pc + 8);
if (swap) {
num = bswap_32(num);
}
return __GLX_PAD((num * 32));
}
int
__glXProgramParameters4fvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei num = *(GLsizei *) (pc + 8);
if (swap) {
num = bswap_32(num);
}
return __GLX_PAD((num * 16));
}
int
__glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap)
{
@ -794,18 +770,6 @@ __glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap)
return __GLX_PAD((n * 32));
}
int
__glXProgramNamedParameter4fvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei len = *(GLsizei *) (pc + 4);
if (swap) {
len = bswap_32(len);
}
return __GLX_PAD(len);
}
ALIAS(Fogiv, Fogfv)
ALIAS(Lightiv, Lightfv)
ALIAS(LightModeliv, LightModelfv)
@ -816,10 +780,11 @@ ALIAS(Fogiv, Fogfv)
ALIAS(PixelMapuiv, PixelMapfv)
ALIAS(ColorTableParameteriv, ColorTableParameterfv)
ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB)
ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB)
ALIAS(LoadProgramNV, ProgramStringARB)
ALIAS(RequestResidentProgramsNV, DrawBuffersARB)
ALIAS(CompressedTexSubImage1D, CompressedTexImage1D)
ALIAS(CompressedTexSubImage2D, CompressedTexImage3D)
ALIAS(PointParameteriv, PointParameterfv)
ALIAS(DeleteFramebuffers, DrawBuffers)
ALIAS(DeleteRenderbuffers, DrawBuffers)
ALIAS(VertexAttribs1fvNV, PixelMapfv)
ALIAS(VertexAttribs1svNV, PixelMapusv)
ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV)
@ -827,7 +792,3 @@ ALIAS(Fogiv, Fogfv)
ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV)
ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV)
ALIAS(VertexAttribs4ubvNV, PixelMapfv)
ALIAS(PointParameterivNV, PointParameterfvEXT)
ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB)
ALIAS(DeleteFramebuffersEXT, DrawBuffersARB)
ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB)

View File

@ -96,32 +96,29 @@ extern PURE _X_HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte * pc,
extern PURE _X_HIDDEN int __glXTexImage3DReqSize(const GLbyte * pc, Bool swap);
extern PURE _X_HIDDEN int __glXTexSubImage3DReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte * pc,
extern PURE _X_HIDDEN int __glXCompressedTexImage1DReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexImage2DReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexImage3DReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexSubImage1DReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte * pc,
extern PURE _X_HIDDEN int __glXCompressedTexSubImage2DReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte * pc,
extern PURE _X_HIDDEN int __glXCompressedTexSubImage3DReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *
pc, Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *
pc, Bool swap);
extern PURE _X_HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *
pc, Bool swap);
extern PURE _X_HIDDEN int __glXPointParameterfvReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXPointParameterivReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXDrawBuffersReqSize(const GLbyte * pc, Bool swap);
extern PURE _X_HIDDEN int __glXProgramStringARBReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte * pc,
extern PURE _X_HIDDEN int __glXDeleteFramebuffersReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXDeleteRenderbuffersReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXLoadProgramNVReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *
pc, Bool swap);
extern PURE _X_HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte * pc,
@ -148,16 +145,6 @@ extern PURE _X_HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXPointParameterivNVReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *
pc, Bool swap);
extern PURE _X_HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *
pc, Bool swap);
extern PURE _X_HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte * pc,
Bool swap);
extern PURE _X_HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte * pc,
Bool swap);
#undef PURE

View File

@ -72,12 +72,14 @@ extern _X_INTERNAL PURE FASTCALL GLint __glMap2d_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glMap2f_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glColorTableParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glColorTableParameteriv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glConvolutionParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glConvolutionParameteriv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glPointParameterfvEXT_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glPointParameterivNV_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint
__glConvolutionParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint
__glConvolutionParameteriv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glPointParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glPointParameteriv_size(GLenum);
#undef PURE
#undef FASTCALL
#endif /* !defined( _INDIRECT_SIZE_H_ ) */
#endif /* !defined( _INDIRECT_SIZE_H_ ) */

View File

@ -25,6 +25,7 @@
* SOFTWARE.
*/
#include <X11/Xfuncproto.h>
#include <GL/gl.h>
#include "indirect_size_get.h"
@ -44,6 +45,7 @@
#define FASTCALL
#endif
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL)
#undef HAVE_ALIAS
#endif
@ -58,6 +60,7 @@
{ return __gl ## to ## _size( e ); }
#endif
_X_INTERNAL PURE FASTCALL GLint
__glCallLists_size(GLenum e)
{
@ -599,6 +602,7 @@ __glGetBooleanv_size(GLenum e)
case GL_OCCLUSION_TEST_HP:
case GL_OCCLUSION_TEST_RESULT_HP:
case GL_LIGHT_MODEL_COLOR_CONTROL:
case GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB:
case GL_RESET_NOTIFICATION_STRATEGY_ARB:
case GL_CURRENT_FOG_COORD:
case GL_FOG_COORDINATE_ARRAY_TYPE:
@ -664,11 +668,11 @@ __glGetBooleanv_size(GLenum e)
case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI:
case GL_FRAGMENT_PROGRAM_ARB:
case GL_MAX_DRAW_BUFFERS_ARB:
/* case GL_MAX_DRAW_BUFFERS_NV:*/
/* 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_NV:*/
/* case GL_DRAW_BUFFER1_ATI:*/
case GL_DRAW_BUFFER2_ARB:
/* case GL_DRAW_BUFFER2_ATI:*/
case GL_DRAW_BUFFER3_ARB:
@ -686,15 +690,15 @@ __glGetBooleanv_size(GLenum e)
case GL_DRAW_BUFFER9_ARB:
/* case GL_DRAW_BUFFER9_ATI:*/
case GL_DRAW_BUFFER10_ARB:
/* case GL_DRAW_BUFFER10_NV:*/
/* case GL_DRAW_BUFFER10_ATI:*/
case GL_DRAW_BUFFER11_ARB:
/* case GL_DRAW_BUFFER11_NV:*/
/* 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_NV:*/
/* case GL_DRAW_BUFFER14_ATI:*/
case GL_DRAW_BUFFER15_ARB:
/* case GL_DRAW_BUFFER15_ATI:*/
case GL_BLEND_EQUATION_ALPHA_EXT:
@ -708,6 +712,7 @@ __glGetBooleanv_size(GLenum e)
case GL_MATRIX_INDEX_ARRAY_TYPE_ARB:
case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB:
case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT:
case GL_TEXTURE_CUBE_MAP_SEAMLESS:
case GL_POINT_SPRITE_ARB:
/* case GL_POINT_SPRITE_NV:*/
case GL_POINT_SPRITE_R_MODE_NV:
@ -726,7 +731,6 @@ __glGetBooleanv_size(GLenum e)
case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
case GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB:
case GL_TEXTURE_CUBE_MAP_SEAMLESS:
case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
case GL_STENCIL_TEST_TWO_SIDE_EXT:
case GL_ACTIVE_STENCIL_FACE_EXT:
@ -744,6 +748,9 @@ __glGetBooleanv_size(GLenum e)
case GL_MAX_SAMPLES:
/* case GL_MAX_SAMPLES_EXT:*/
case GL_MAX_SERVER_WAIT_TIMEOUT:
case GL_MAX_DEBUG_MESSAGE_LENGTH_ARB:
case GL_MAX_DEBUG_LOGGED_MESSAGES_ARB:
case GL_DEBUG_LOGGED_MESSAGES_ARB:
case GL_RASTER_POSITION_UNCLIPPED_IBM:
return 1;
case GL_SMOOTH_POINT_SIZE_RANGE:
@ -916,6 +923,18 @@ __glGetTexLevelParameterfv_size(GLenum e)
}
}
_X_INTERNAL PURE FASTCALL GLint
__glGetPointerv_size(GLenum e)
{
switch (e) {
case GL_DEBUG_CALLBACK_FUNCTION_ARB:
case GL_DEBUG_CALLBACK_USER_PARAM_ARB:
return 1;
default:
return 0;
}
}
_X_INTERNAL PURE FASTCALL GLint
__glColorTableParameterfv_size(GLenum e)
{
@ -1035,6 +1054,56 @@ __glGetMinmaxParameterfv_size(GLenum e)
}
}
_X_INTERNAL PURE FASTCALL GLint
__glPointParameterfv_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;
}
}
_X_INTERNAL PURE FASTCALL GLint
__glGetQueryObjectiv_size(GLenum e)
{
switch (e) {
case GL_QUERY_RESULT_ARB:
case GL_QUERY_RESULT_AVAILABLE_ARB:
return 1;
default:
return 0;
}
}
_X_INTERNAL PURE FASTCALL GLint
__glGetQueryiv_size(GLenum e)
{
switch (e) {
case GL_QUERY_COUNTER_BITS_ARB:
case GL_CURRENT_QUERY_ARB:
case GL_ANY_SAMPLES_PASSED:
return 1;
default:
return 0;
}
}
_X_INTERNAL PURE FASTCALL GLint
__glGetProgramivARB_size(GLenum e)
{
@ -1089,106 +1158,25 @@ __glGetProgramivARB_size(GLenum e)
}
_X_INTERNAL PURE FASTCALL GLint
__glGetVertexAttribdvARB_size(GLenum e)
__glGetFramebufferAttachmentParameteriv_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:
case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
return 1;
default:
return 0;
}
}
_X_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;
}
}
_X_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;
}
}
_X_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;
}
}
_X_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;
}
}
_X_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;
}
}
_X_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_COLOR_ENCODING:
case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:
/* case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:*/
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:
/* case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:*/
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:
/* case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:*/
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:
/* case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:*/
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
return 1;
default:
@ -1226,11 +1214,7 @@ ALIAS(Fogiv, Fogfv)
ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv)
ALIAS(GetHistogramParameteriv, GetHistogramParameterfv)
ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv)
ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB)
ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB)
ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB)
ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV)
ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV)
ALIAS(PointParameterivNV, PointParameterfvEXT)
ALIAS(PointParameteriv, PointParameterfv)
ALIAS(GetQueryObjectuiv, GetQueryObjectiv)
#undef PURE
#undef FASTCALL

View File

@ -67,6 +67,7 @@ extern _X_INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetPointerv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint
__glGetColorTableParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint
@ -79,19 +80,12 @@ extern _X_INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectiv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectuiv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryiv_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
extern _X_INTERNAL PURE FASTCALL GLint
__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
__glGetFramebufferAttachmentParameteriv_size(GLenum);
#undef PURE
#undef FASTCALL

View File

@ -213,17 +213,16 @@ static const void *Single_function_table[112][2] = {
__glXDispSwap_GetMinmaxParameterfv},
/* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv,
__glXDispSwap_GetMinmaxParameteriv},
/* [ 104] = 160 */ {__glXDisp_GetCompressedTexImageARB,
__glXDispSwap_GetCompressedTexImageARB},
/* [ 105] = 161 */ {__glXDisp_DeleteQueriesARB,
__glXDispSwap_DeleteQueriesARB},
/* [ 106] = 162 */ {__glXDisp_GenQueriesARB, __glXDispSwap_GenQueriesARB},
/* [ 107] = 163 */ {__glXDisp_IsQueryARB, __glXDispSwap_IsQueryARB},
/* [ 108] = 164 */ {__glXDisp_GetQueryivARB, __glXDispSwap_GetQueryivARB},
/* [ 109] = 165 */ {__glXDisp_GetQueryObjectivARB,
__glXDispSwap_GetQueryObjectivARB},
/* [ 110] = 166 */ {__glXDisp_GetQueryObjectuivARB,
__glXDispSwap_GetQueryObjectuivARB},
/* [ 104] = 160 */ {__glXDisp_GetCompressedTexImage,
__glXDispSwap_GetCompressedTexImage},
/* [ 105] = 161 */ {__glXDisp_DeleteQueries, __glXDispSwap_DeleteQueries},
/* [ 106] = 162 */ {__glXDisp_GenQueries, __glXDispSwap_GenQueries},
/* [ 107] = 163 */ {__glXDisp_IsQuery, __glXDispSwap_IsQuery},
/* [ 108] = 164 */ {__glXDisp_GetQueryiv, __glXDispSwap_GetQueryiv},
/* [ 109] = 165 */ {__glXDisp_GetQueryObjectiv,
__glXDispSwap_GetQueryObjectiv},
/* [ 110] = 166 */ {__glXDisp_GetQueryObjectuiv,
__glXDispSwap_GetQueryObjectuiv},
/* [ 111] = 167 */ {NULL, NULL},
};
@ -576,52 +575,51 @@ static const void *Render_function_table[408][2] = {
/* [ 195] = 195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable},
/* [ 196] = 196 */ {__glXDisp_CopyColorSubTable,
__glXDispSwap_CopyColorSubTable},
/* [ 197] = 197 */ {__glXDisp_ActiveTextureARB,
__glXDispSwap_ActiveTextureARB},
/* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dvARB,
__glXDispSwap_MultiTexCoord1dvARB},
/* [ 197] = 197 */ {__glXDisp_ActiveTexture, __glXDispSwap_ActiveTexture},
/* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dv,
__glXDispSwap_MultiTexCoord1dv},
/* [ 199] = 199 */ {__glXDisp_MultiTexCoord1fvARB,
__glXDispSwap_MultiTexCoord1fvARB},
/* [ 200] = 200 */ {__glXDisp_MultiTexCoord1ivARB,
__glXDispSwap_MultiTexCoord1ivARB},
/* [ 201] = 201 */ {__glXDisp_MultiTexCoord1svARB,
__glXDispSwap_MultiTexCoord1svARB},
/* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dvARB,
__glXDispSwap_MultiTexCoord2dvARB},
/* [ 200] = 200 */ {__glXDisp_MultiTexCoord1iv,
__glXDispSwap_MultiTexCoord1iv},
/* [ 201] = 201 */ {__glXDisp_MultiTexCoord1sv,
__glXDispSwap_MultiTexCoord1sv},
/* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dv,
__glXDispSwap_MultiTexCoord2dv},
/* [ 203] = 203 */ {__glXDisp_MultiTexCoord2fvARB,
__glXDispSwap_MultiTexCoord2fvARB},
/* [ 204] = 204 */ {__glXDisp_MultiTexCoord2ivARB,
__glXDispSwap_MultiTexCoord2ivARB},
/* [ 205] = 205 */ {__glXDisp_MultiTexCoord2svARB,
__glXDispSwap_MultiTexCoord2svARB},
/* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dvARB,
__glXDispSwap_MultiTexCoord3dvARB},
/* [ 204] = 204 */ {__glXDisp_MultiTexCoord2iv,
__glXDispSwap_MultiTexCoord2iv},
/* [ 205] = 205 */ {__glXDisp_MultiTexCoord2sv,
__glXDispSwap_MultiTexCoord2sv},
/* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dv,
__glXDispSwap_MultiTexCoord3dv},
/* [ 207] = 207 */ {__glXDisp_MultiTexCoord3fvARB,
__glXDispSwap_MultiTexCoord3fvARB},
/* [ 208] = 208 */ {__glXDisp_MultiTexCoord3ivARB,
__glXDispSwap_MultiTexCoord3ivARB},
/* [ 209] = 209 */ {__glXDisp_MultiTexCoord3svARB,
__glXDispSwap_MultiTexCoord3svARB},
/* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dvARB,
__glXDispSwap_MultiTexCoord4dvARB},
/* [ 208] = 208 */ {__glXDisp_MultiTexCoord3iv,
__glXDispSwap_MultiTexCoord3iv},
/* [ 209] = 209 */ {__glXDisp_MultiTexCoord3sv,
__glXDispSwap_MultiTexCoord3sv},
/* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dv,
__glXDispSwap_MultiTexCoord4dv},
/* [ 211] = 211 */ {__glXDisp_MultiTexCoord4fvARB,
__glXDispSwap_MultiTexCoord4fvARB},
/* [ 212] = 212 */ {__glXDisp_MultiTexCoord4ivARB,
__glXDispSwap_MultiTexCoord4ivARB},
/* [ 213] = 213 */ {__glXDisp_MultiTexCoord4svARB,
__glXDispSwap_MultiTexCoord4svARB},
/* [ 214] = 214 */ {__glXDisp_CompressedTexImage1DARB,
__glXDispSwap_CompressedTexImage1DARB},
/* [ 215] = 215 */ {__glXDisp_CompressedTexImage2DARB,
__glXDispSwap_CompressedTexImage2DARB},
/* [ 216] = 216 */ {__glXDisp_CompressedTexImage3DARB,
__glXDispSwap_CompressedTexImage3DARB},
/* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1DARB,
__glXDispSwap_CompressedTexSubImage1DARB},
/* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2DARB,
__glXDispSwap_CompressedTexSubImage2DARB},
/* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3DARB,
__glXDispSwap_CompressedTexSubImage3DARB},
/* [ 212] = 212 */ {__glXDisp_MultiTexCoord4iv,
__glXDispSwap_MultiTexCoord4iv},
/* [ 213] = 213 */ {__glXDisp_MultiTexCoord4sv,
__glXDispSwap_MultiTexCoord4sv},
/* [ 214] = 214 */ {__glXDisp_CompressedTexImage1D,
__glXDispSwap_CompressedTexImage1D},
/* [ 215] = 215 */ {__glXDisp_CompressedTexImage2D,
__glXDispSwap_CompressedTexImage2D},
/* [ 216] = 216 */ {__glXDisp_CompressedTexImage3D,
__glXDispSwap_CompressedTexImage3D},
/* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1D,
__glXDispSwap_CompressedTexSubImage1D},
/* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2D,
__glXDispSwap_CompressedTexSubImage2D},
/* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3D,
__glXDispSwap_CompressedTexSubImage3D},
/* [ 220] = 220 */ {NULL, NULL},
/* [ 221] = 221 */ {NULL, NULL},
/* [ 222] = 222 */ {NULL, NULL},
@ -631,25 +629,21 @@ static const void *Render_function_table[408][2] = {
/* [ 226] = 226 */ {NULL, NULL},
/* [ 227] = 227 */ {NULL, NULL},
/* [ 228] = 228 */ {NULL, NULL},
/* [ 229] = 229 */ {__glXDisp_SampleCoverageARB,
__glXDispSwap_SampleCoverageARB},
/* [ 230] = 230 */ {__glXDisp_WindowPos3fvMESA,
__glXDispSwap_WindowPos3fvMESA},
/* [ 231] = 231 */ {__glXDisp_BeginQueryARB, __glXDispSwap_BeginQueryARB},
/* [ 232] = 232 */ {__glXDisp_EndQueryARB, __glXDispSwap_EndQueryARB},
/* [ 233] = 233 */ {__glXDisp_DrawBuffersARB,
__glXDispSwap_DrawBuffersARB},
/* [ 234] = 234 */ {__glXDisp_ClampColorARB, __glXDispSwap_ClampColorARB},
/* [ 229] = 229 */ {__glXDisp_SampleCoverage,
__glXDispSwap_SampleCoverage},
/* [ 230] = 230 */ {__glXDisp_WindowPos3fv, __glXDispSwap_WindowPos3fv},
/* [ 231] = 231 */ {__glXDisp_BeginQuery, __glXDispSwap_BeginQuery},
/* [ 232] = 232 */ {__glXDisp_EndQuery, __glXDispSwap_EndQuery},
/* [ 233] = 233 */ {__glXDisp_DrawBuffers, __glXDispSwap_DrawBuffers},
/* [ 234] = 234 */ {__glXDisp_ClampColor, __glXDispSwap_ClampColor},
/* [ 235] = 235 */ {NULL, NULL},
/* [ 236] = 236 */ {NULL, NULL},
/* [ 237] = 237 */ {__glXDisp_FramebufferTextureLayerEXT,
__glXDispSwap_FramebufferTextureLayerEXT},
/* [ 237] = 237 */ {__glXDisp_FramebufferTextureLayer,
__glXDispSwap_FramebufferTextureLayer},
/* [ 238] = 238 */ {NULL, NULL},
/* [ 239] = 239 */ {NULL, NULL},
/* [ 240] = 2048 */ {__glXDisp_SampleMaskSGIS,
__glXDispSwap_SampleMaskSGIS},
/* [ 241] = 2049 */ {__glXDisp_SamplePatternSGIS,
__glXDispSwap_SamplePatternSGIS},
/* [ 240] = 2048 */ {NULL, NULL},
/* [ 241] = 2049 */ {NULL, NULL},
/* [ 242] = 2050 */ {NULL, NULL},
/* [ 243] = 2051 */ {NULL, NULL},
/* [ 244] = 2052 */ {NULL, NULL},
@ -668,10 +662,10 @@ static const void *Render_function_table[408][2] = {
/* [ 254] = 2062 */ {NULL, NULL},
/* [ 255] = 2063 */ {NULL, NULL},
/* [ 256] = 2064 */ {NULL, NULL},
/* [ 257] = 2065 */ {__glXDisp_PointParameterfEXT,
__glXDispSwap_PointParameterfEXT},
/* [ 258] = 2066 */ {__glXDisp_PointParameterfvEXT,
__glXDispSwap_PointParameterfvEXT},
/* [ 257] = 2065 */ {__glXDisp_PointParameterf,
__glXDispSwap_PointParameterf},
/* [ 258] = 2066 */ {__glXDisp_PointParameterfv,
__glXDispSwap_PointParameterfv},
/* [ 259] = 2067 */ {NULL, NULL},
/* [ 260] = 2068 */ {NULL, NULL},
/* [ 261] = 2069 */ {NULL, NULL},
@ -722,38 +716,35 @@ static const void *Render_function_table[408][2] = {
/* [ 291] = 4123 */ {__glXDisp_CopyTexSubImage3D,
__glXDispSwap_CopyTexSubImage3D},
/* [ 292] = 4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT},
/* [ 293] = 4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT},
/* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bvEXT,
__glXDispSwap_SecondaryColor3bvEXT},
/* [ 295] = 4127 */ {__glXDisp_SecondaryColor3svEXT,
__glXDispSwap_SecondaryColor3svEXT},
/* [ 293] = 4125 */ {__glXDisp_FogCoorddv, __glXDispSwap_FogCoorddv},
/* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bv,
__glXDispSwap_SecondaryColor3bv},
/* [ 295] = 4127 */ {__glXDisp_SecondaryColor3sv,
__glXDispSwap_SecondaryColor3sv},
/* [ 296] = 4176 */ {NULL, NULL},
/* [ 297] = 4177 */ {NULL, NULL},
/* [ 298] = 4178 */ {NULL, NULL},
/* [ 299] = 4179 */ {NULL, NULL},
/* [ 300] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV},
/* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV,
__glXDispSwap_ExecuteProgramNV},
/* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV,
__glXDispSwap_RequestResidentProgramsNV},
/* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV},
/* [ 300] = 4180 */ {__glXDisp_BindProgramARB,
__glXDispSwap_BindProgramARB},
/* [ 301] = 4181 */ {NULL, NULL},
/* [ 302] = 4182 */ {NULL, NULL},
/* [ 303] = 4183 */ {NULL, NULL},
/* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB,
__glXDispSwap_ProgramEnvParameter4fvARB},
/* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB,
__glXDispSwap_ProgramEnvParameter4dvARB},
/* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV,
__glXDispSwap_ProgramParameters4fvNV},
/* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV,
__glXDispSwap_ProgramParameters4dvNV},
/* [ 308] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV},
/* [ 309] = 4189 */ {__glXDisp_VertexAttrib1svARB,
__glXDispSwap_VertexAttrib1svARB},
/* [ 310] = 4190 */ {__glXDisp_VertexAttrib2svARB,
__glXDispSwap_VertexAttrib2svARB},
/* [ 311] = 4191 */ {__glXDisp_VertexAttrib3svARB,
__glXDispSwap_VertexAttrib3svARB},
/* [ 312] = 4192 */ {__glXDisp_VertexAttrib4svARB,
__glXDispSwap_VertexAttrib4svARB},
/* [ 306] = 4186 */ {NULL, NULL},
/* [ 307] = 4187 */ {NULL, NULL},
/* [ 308] = 4188 */ {NULL, NULL},
/* [ 309] = 4189 */ {__glXDisp_VertexAttrib1sv,
__glXDispSwap_VertexAttrib1sv},
/* [ 310] = 4190 */ {__glXDisp_VertexAttrib2sv,
__glXDispSwap_VertexAttrib2sv},
/* [ 311] = 4191 */ {__glXDisp_VertexAttrib3sv,
__glXDispSwap_VertexAttrib3sv},
/* [ 312] = 4192 */ {__glXDisp_VertexAttrib4sv,
__glXDispSwap_VertexAttrib4sv},
/* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB,
__glXDispSwap_VertexAttrib1fvARB},
/* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB,
@ -762,16 +753,16 @@ static const void *Render_function_table[408][2] = {
__glXDispSwap_VertexAttrib3fvARB},
/* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB,
__glXDispSwap_VertexAttrib4fvARB},
/* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dvARB,
__glXDispSwap_VertexAttrib1dvARB},
/* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dvARB,
__glXDispSwap_VertexAttrib2dvARB},
/* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dvARB,
__glXDispSwap_VertexAttrib3dvARB},
/* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dvARB,
__glXDispSwap_VertexAttrib4dvARB},
/* [ 321] = 4201 */ {__glXDisp_VertexAttrib4NubvARB,
__glXDispSwap_VertexAttrib4NubvARB},
/* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dv,
__glXDispSwap_VertexAttrib1dv},
/* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dv,
__glXDispSwap_VertexAttrib2dv},
/* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dv,
__glXDispSwap_VertexAttrib3dv},
/* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dv,
__glXDispSwap_VertexAttrib4dv},
/* [ 321] = 4201 */ {__glXDisp_VertexAttrib4Nubv,
__glXDispSwap_VertexAttrib4Nubv},
/* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV,
__glXDispSwap_VertexAttribs1svNV},
/* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV,
@ -804,82 +795,80 @@ static const void *Render_function_table[408][2] = {
__glXDispSwap_ProgramLocalParameter4dvARB},
/* [ 337] = 4217 */ {__glXDisp_ProgramStringARB,
__glXDispSwap_ProgramStringARB},
/* [ 338] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV,
__glXDispSwap_ProgramNamedParameter4fvNV},
/* [ 339] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV,
__glXDispSwap_ProgramNamedParameter4dvNV},
/* [ 338] = 4218 */ {NULL, NULL},
/* [ 339] = 4219 */ {NULL, NULL},
/* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT,
__glXDispSwap_ActiveStencilFaceEXT},
/* [ 341] = 4221 */ {__glXDisp_PointParameteriNV,
__glXDispSwap_PointParameteriNV},
/* [ 342] = 4222 */ {__glXDisp_PointParameterivNV,
__glXDispSwap_PointParameterivNV},
/* [ 341] = 4221 */ {__glXDisp_PointParameteri,
__glXDispSwap_PointParameteri},
/* [ 342] = 4222 */ {__glXDisp_PointParameteriv,
__glXDispSwap_PointParameteriv},
/* [ 343] = 4223 */ {NULL, NULL},
/* [ 344] = 4224 */ {NULL, NULL},
/* [ 345] = 4225 */ {NULL, NULL},
/* [ 346] = 4226 */ {NULL, NULL},
/* [ 347] = 4227 */ {NULL, NULL},
/* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparateEXT,
__glXDispSwap_BlendEquationSeparateEXT},
/* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparate,
__glXDispSwap_BlendEquationSeparate},
/* [ 349] = 4229 */ {NULL, NULL},
/* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bvARB,
__glXDispSwap_VertexAttrib4bvARB},
/* [ 351] = 4231 */ {__glXDisp_VertexAttrib4ivARB,
__glXDispSwap_VertexAttrib4ivARB},
/* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubvARB,
__glXDispSwap_VertexAttrib4ubvARB},
/* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usvARB,
__glXDispSwap_VertexAttrib4usvARB},
/* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uivARB,
__glXDispSwap_VertexAttrib4uivARB},
/* [ 355] = 4235 */ {__glXDisp_VertexAttrib4NbvARB,
__glXDispSwap_VertexAttrib4NbvARB},
/* [ 356] = 4236 */ {__glXDisp_VertexAttrib4NsvARB,
__glXDispSwap_VertexAttrib4NsvARB},
/* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB,
__glXDispSwap_VertexAttrib4NivARB},
/* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB,
__glXDispSwap_VertexAttrib4NusvARB},
/* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB,
__glXDispSwap_VertexAttrib4NuivARB},
/* [ 360] = 4320 */ {__glXDisp_DeleteFramebuffersEXT,
__glXDispSwap_DeleteFramebuffersEXT},
/* [ 361] = 4321 */ {__glXDisp_FramebufferTexture1DEXT,
__glXDispSwap_FramebufferTexture1DEXT},
/* [ 362] = 4322 */ {__glXDisp_FramebufferTexture2DEXT,
__glXDispSwap_FramebufferTexture2DEXT},
/* [ 363] = 4323 */ {__glXDisp_FramebufferTexture3DEXT,
__glXDispSwap_FramebufferTexture3DEXT},
/* [ 364] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT,
__glXDispSwap_FramebufferRenderbufferEXT},
/* [ 365] = 4325 */ {__glXDisp_GenerateMipmapEXT,
__glXDispSwap_GenerateMipmapEXT},
/* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bv,
__glXDispSwap_VertexAttrib4bv},
/* [ 351] = 4231 */ {__glXDisp_VertexAttrib4iv,
__glXDispSwap_VertexAttrib4iv},
/* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubv,
__glXDispSwap_VertexAttrib4ubv},
/* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usv,
__glXDispSwap_VertexAttrib4usv},
/* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uiv,
__glXDispSwap_VertexAttrib4uiv},
/* [ 355] = 4235 */ {__glXDisp_VertexAttrib4Nbv,
__glXDispSwap_VertexAttrib4Nbv},
/* [ 356] = 4236 */ {__glXDisp_VertexAttrib4Nsv,
__glXDispSwap_VertexAttrib4Nsv},
/* [ 357] = 4237 */ {__glXDisp_VertexAttrib4Niv,
__glXDispSwap_VertexAttrib4Niv},
/* [ 358] = 4238 */ {__glXDisp_VertexAttrib4Nusv,
__glXDispSwap_VertexAttrib4Nusv},
/* [ 359] = 4239 */ {__glXDisp_VertexAttrib4Nuiv,
__glXDispSwap_VertexAttrib4Nuiv},
/* [ 360] = 4320 */ {__glXDisp_DeleteFramebuffers,
__glXDispSwap_DeleteFramebuffers},
/* [ 361] = 4321 */ {__glXDisp_FramebufferTexture1D,
__glXDispSwap_FramebufferTexture1D},
/* [ 362] = 4322 */ {__glXDisp_FramebufferTexture2D,
__glXDispSwap_FramebufferTexture2D},
/* [ 363] = 4323 */ {__glXDisp_FramebufferTexture3D,
__glXDispSwap_FramebufferTexture3D},
/* [ 364] = 4324 */ {__glXDisp_FramebufferRenderbuffer,
__glXDispSwap_FramebufferRenderbuffer},
/* [ 365] = 4325 */ {__glXDisp_GenerateMipmap,
__glXDispSwap_GenerateMipmap},
/* [ 366] = 4326 */ {NULL, NULL},
/* [ 367] = 4327 */ {NULL, NULL},
/* [ 368] = 4328 */ {NULL, NULL},
/* [ 369] = 4329 */ {NULL, NULL},
/* [ 370] = 4330 */ {__glXDisp_BlitFramebufferEXT,
__glXDispSwap_BlitFramebufferEXT},
/* [ 370] = 4330 */ {__glXDisp_BlitFramebuffer,
__glXDispSwap_BlitFramebuffer},
/* [ 371] = 4331 */ {__glXDisp_RenderbufferStorageMultisample,
__glXDispSwap_RenderbufferStorageMultisample},
/* [ 372] = 4332 */ {NULL, NULL},
/* [ 373] = 4333 */ {NULL, NULL},
/* [ 374] = 4334 */ {NULL, NULL},
/* [ 375] = 4335 */ {NULL, NULL},
/* [ 376] = 4128 */ {__glXDisp_SecondaryColor3ivEXT,
__glXDispSwap_SecondaryColor3ivEXT},
/* [ 376] = 4128 */ {__glXDisp_SecondaryColor3iv,
__glXDispSwap_SecondaryColor3iv},
/* [ 377] = 4129 */ {__glXDisp_SecondaryColor3fvEXT,
__glXDispSwap_SecondaryColor3fvEXT},
/* [ 378] = 4130 */ {__glXDisp_SecondaryColor3dvEXT,
__glXDispSwap_SecondaryColor3dvEXT},
/* [ 379] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT,
__glXDispSwap_SecondaryColor3ubvEXT},
/* [ 380] = 4132 */ {__glXDisp_SecondaryColor3usvEXT,
__glXDispSwap_SecondaryColor3usvEXT},
/* [ 381] = 4133 */ {__glXDisp_SecondaryColor3uivEXT,
__glXDispSwap_SecondaryColor3uivEXT},
/* [ 382] = 4134 */ {__glXDisp_BlendFuncSeparateEXT,
__glXDispSwap_BlendFuncSeparateEXT},
/* [ 378] = 4130 */ {__glXDisp_SecondaryColor3dv,
__glXDispSwap_SecondaryColor3dv},
/* [ 379] = 4131 */ {__glXDisp_SecondaryColor3ubv,
__glXDispSwap_SecondaryColor3ubv},
/* [ 380] = 4132 */ {__glXDisp_SecondaryColor3usv,
__glXDispSwap_SecondaryColor3usv},
/* [ 381] = 4133 */ {__glXDisp_SecondaryColor3uiv,
__glXDispSwap_SecondaryColor3uiv},
/* [ 382] = 4134 */ {__glXDisp_BlendFuncSeparate,
__glXDispSwap_BlendFuncSeparate},
/* [ 383] = 4135 */ {NULL, NULL},
/* [ 384] = 4264 */ {NULL, NULL},
/* [ 385] = 4265 */ {__glXDisp_VertexAttrib1svNV,
@ -914,14 +903,14 @@ static const void *Render_function_table[408][2] = {
/* [ 401] = 4313 */ {NULL, NULL},
/* [ 402] = 4314 */ {NULL, NULL},
/* [ 403] = 4315 */ {NULL, NULL},
/* [ 404] = 4316 */ {__glXDisp_BindRenderbufferEXT,
__glXDispSwap_BindRenderbufferEXT},
/* [ 405] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT,
__glXDispSwap_DeleteRenderbuffersEXT},
/* [ 406] = 4318 */ {__glXDisp_RenderbufferStorageEXT,
__glXDispSwap_RenderbufferStorageEXT},
/* [ 407] = 4319 */ {__glXDisp_BindFramebufferEXT,
__glXDispSwap_BindFramebufferEXT},
/* [ 404] = 4316 */ {__glXDisp_BindRenderbuffer,
__glXDispSwap_BindRenderbuffer},
/* [ 405] = 4317 */ {__glXDisp_DeleteRenderbuffers,
__glXDispSwap_DeleteRenderbuffers},
/* [ 406] = 4318 */ {__glXDisp_RenderbufferStorage,
__glXDispSwap_RenderbufferStorage},
/* [ 407] = 4319 */ {__glXDisp_BindFramebuffer,
__glXDispSwap_BindFramebuffer},
};
static const int_fast16_t Render_size_table[408][2] = {
@ -1165,8 +1154,8 @@ static const int_fast16_t Render_size_table[408][2] = {
/* [237] = 237 */ {24, ~0},
/* [238] = 238 */ {0, ~0},
/* [239] = 239 */ {0, ~0},
/* [240] = 2048 */ {12, ~0},
/* [241] = 2049 */ {8, ~0},
/* [240] = 2048 */ {0, ~0},
/* [241] = 2049 */ {0, ~0},
/* [242] = 2050 */ {0, ~0},
/* [243] = 2051 */ {0, ~0},
/* [244] = 2052 */ {0, ~0},
@ -1226,14 +1215,14 @@ static const int_fast16_t Render_size_table[408][2] = {
/* [298] = 4178 */ {0, ~0},
/* [299] = 4179 */ {0, ~0},
/* [300] = 4180 */ {12, ~0},
/* [301] = 4181 */ {28, ~0},
/* [302] = 4182 */ {8, 51},
/* [303] = 4183 */ {16, 52},
/* [301] = 4181 */ {0, ~0},
/* [302] = 4182 */ {0, ~0},
/* [303] = 4183 */ {0, ~0},
/* [304] = 4184 */ {28, ~0},
/* [305] = 4185 */ {44, ~0},
/* [306] = 4186 */ {16, 53},
/* [307] = 4187 */ {16, 54},
/* [308] = 4188 */ {20, ~0},
/* [306] = 4186 */ {0, ~0},
/* [307] = 4187 */ {0, ~0},
/* [308] = 4188 */ {0, ~0},
/* [309] = 4189 */ {12, ~0},
/* [310] = 4190 */ {12, ~0},
/* [311] = 4191 */ {16, ~0},
@ -1247,27 +1236,27 @@ static const int_fast16_t Render_size_table[408][2] = {
/* [319] = 4199 */ {32, ~0},
/* [320] = 4200 */ {40, ~0},
/* [321] = 4201 */ {12, ~0},
/* [322] = 4202 */ {12, 55},
/* [323] = 4203 */ {12, 56},
/* [324] = 4204 */ {12, 57},
/* [325] = 4205 */ {12, 58},
/* [326] = 4206 */ {12, 59},
/* [327] = 4207 */ {12, 60},
/* [328] = 4208 */ {12, 61},
/* [329] = 4209 */ {12, 62},
/* [330] = 4210 */ {12, 63},
/* [331] = 4211 */ {12, 64},
/* [332] = 4212 */ {12, 65},
/* [333] = 4213 */ {12, 66},
/* [334] = 4214 */ {12, 67},
/* [322] = 4202 */ {12, 51},
/* [323] = 4203 */ {12, 52},
/* [324] = 4204 */ {12, 53},
/* [325] = 4205 */ {12, 54},
/* [326] = 4206 */ {12, 55},
/* [327] = 4207 */ {12, 56},
/* [328] = 4208 */ {12, 57},
/* [329] = 4209 */ {12, 58},
/* [330] = 4210 */ {12, 59},
/* [331] = 4211 */ {12, 60},
/* [332] = 4212 */ {12, 61},
/* [333] = 4213 */ {12, 62},
/* [334] = 4214 */ {12, 63},
/* [335] = 4215 */ {28, ~0},
/* [336] = 4216 */ {44, ~0},
/* [337] = 4217 */ {16, 68},
/* [338] = 4218 */ {28, 69},
/* [339] = 4219 */ {44, 70},
/* [337] = 4217 */ {16, 64},
/* [338] = 4218 */ {0, ~0},
/* [339] = 4219 */ {0, ~0},
/* [340] = 4220 */ {8, ~0},
/* [341] = 4221 */ {12, ~0},
/* [342] = 4222 */ {8, 71},
/* [342] = 4222 */ {8, 65},
/* [343] = 4223 */ {0, ~0},
/* [344] = 4224 */ {0, ~0},
/* [345] = 4225 */ {0, ~0},
@ -1285,7 +1274,7 @@ static const int_fast16_t Render_size_table[408][2] = {
/* [357] = 4237 */ {24, ~0},
/* [358] = 4238 */ {16, ~0},
/* [359] = 4239 */ {24, ~0},
/* [360] = 4320 */ {8, 72},
/* [360] = 4320 */ {8, 66},
/* [361] = 4321 */ {24, ~0},
/* [362] = 4322 */ {24, ~0},
/* [363] = 4323 */ {28, ~0},
@ -1330,12 +1319,12 @@ static const int_fast16_t Render_size_table[408][2] = {
/* [402] = 4314 */ {0, ~0},
/* [403] = 4315 */ {0, ~0},
/* [404] = 4316 */ {12, ~0},
/* [405] = 4317 */ {8, 73},
/* [405] = 4317 */ {8, 67},
/* [406] = 4318 */ {20, ~0},
/* [407] = 4319 */ {12, ~0},
};
static const gl_proto_size_func Render_size_func_table[74] = {
static const gl_proto_size_func Render_size_func_table[68] = {
__glXCallListsReqSize,
__glXBitmapReqSize,
__glXFogfvReqSize,
@ -1366,17 +1355,17 @@ static const gl_proto_size_func Render_size_func_table[74] = {
__glXDrawPixelsReqSize,
__glXDrawArraysReqSize,
__glXColorSubTableReqSize,
__glXCompressedTexImage1DARBReqSize,
__glXCompressedTexImage2DARBReqSize,
__glXCompressedTexImage3DARBReqSize,
__glXCompressedTexSubImage1DARBReqSize,
__glXCompressedTexSubImage2DARBReqSize,
__glXCompressedTexSubImage3DARBReqSize,
__glXDrawBuffersARBReqSize,
__glXCompressedTexImage1DReqSize,
__glXCompressedTexImage2DReqSize,
__glXCompressedTexImage3DReqSize,
__glXCompressedTexSubImage1DReqSize,
__glXCompressedTexSubImage2DReqSize,
__glXCompressedTexSubImage3DReqSize,
__glXDrawBuffersReqSize,
__glXColorTableReqSize,
__glXColorTableParameterfvReqSize,
__glXColorTableParameterivReqSize,
__glXPointParameterfvEXTReqSize,
__glXPointParameterfvReqSize,
__glXTexSubImage1DReqSize,
__glXTexSubImage2DReqSize,
__glXConvolutionFilter1DReqSize,
@ -1387,10 +1376,6 @@ static const gl_proto_size_func Render_size_func_table[74] = {
__glXTexImage3DReqSize,
__glXTexSubImage3DReqSize,
__glXPrioritizeTexturesReqSize,
__glXRequestResidentProgramsNVReqSize,
__glXLoadProgramNVReqSize,
__glXProgramParameters4fvNVReqSize,
__glXProgramParameters4dvNVReqSize,
__glXVertexAttribs1svNVReqSize,
__glXVertexAttribs2svNVReqSize,
__glXVertexAttribs3svNVReqSize,
@ -1405,11 +1390,9 @@ static const gl_proto_size_func Render_size_func_table[74] = {
__glXVertexAttribs4dvNVReqSize,
__glXVertexAttribs4ubvNVReqSize,
__glXProgramStringARBReqSize,
__glXProgramNamedParameter4fvNVReqSize,
__glXProgramNamedParameter4dvNVReqSize,
__glXPointParameterivNVReqSize,
__glXDeleteFramebuffersEXTReqSize,
__glXDeleteRenderbuffersEXTReqSize,
__glXPointParameterivReqSize,
__glXDeleteFramebuffersReqSize,
__glXDeleteRenderbuffersReqSize,
};
const struct __glXDispatchInfo Render_dispatch_info = {
@ -1711,19 +1694,13 @@ static const void *VendorPriv_function_table[104][2] = {
__glXDispSwap_GetProgramEnvParameterfvARB},
/* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB,
__glXDispSwap_GetProgramEnvParameterdvARB},
/* [ 26] = 1298 */ {__glXDisp_GetProgramivNV,
__glXDispSwap_GetProgramivNV},
/* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV,
__glXDispSwap_GetProgramStringNV},
/* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV,
__glXDispSwap_GetTrackMatrixivNV},
/* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB,
__glXDispSwap_GetVertexAttribdvARB},
/* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvARB,
__glXDispSwap_GetVertexAttribfvARB},
/* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV,
__glXDispSwap_GetVertexAttribivNV},
/* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV},
/* [ 26] = 1298 */ {NULL, NULL},
/* [ 27] = 1299 */ {NULL, NULL},
/* [ 28] = 1300 */ {NULL, NULL},
/* [ 29] = 1301 */ {NULL, NULL},
/* [ 30] = 1302 */ {NULL, NULL},
/* [ 31] = 1303 */ {NULL, NULL},
/* [ 32] = 1304 */ {__glXDisp_IsProgramARB, __glXDispSwap_IsProgramARB},
/* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB,
__glXDispSwap_GetProgramLocalParameterfvARB},
/* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB,
@ -1733,20 +1710,18 @@ static const void *VendorPriv_function_table[104][2] = {
/* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB,
__glXDispSwap_GetProgramStringARB},
/* [ 37] = 1309 */ {NULL, NULL},
/* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV,
__glXDispSwap_GetProgramNamedParameterfvNV},
/* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV,
__glXDispSwap_GetProgramNamedParameterdvNV},
/* [ 38] = 1310 */ {NULL, NULL},
/* [ 39] = 1311 */ {NULL, NULL},
/* [ 40] = 1288 */ {NULL, NULL},
/* [ 41] = 1289 */ {NULL, NULL},
/* [ 42] = 1290 */ {NULL, NULL},
/* [ 43] = 1291 */ {NULL, NULL},
/* [ 44] = 1292 */ {NULL, NULL},
/* [ 45] = 1293 */ {__glXDisp_AreProgramsResidentNV,
__glXDispSwap_AreProgramsResidentNV},
/* [ 46] = 1294 */ {__glXDisp_DeleteProgramsNV,
__glXDispSwap_DeleteProgramsNV},
/* [ 47] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV},
/* [ 45] = 1293 */ {NULL, NULL},
/* [ 46] = 1294 */ {__glXDisp_DeleteProgramsARB,
__glXDispSwap_DeleteProgramsARB},
/* [ 47] = 1295 */ {__glXDisp_GenProgramsARB,
__glXDispSwap_GenProgramsARB},
/* [ 48] = 1328 */ {NULL, NULL},
/* [ 49] = 1329 */ {NULL, NULL},
/* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT,
@ -1763,20 +1738,19 @@ static const void *VendorPriv_function_table[104][2] = {
/* [ 59] = 1419 */ {NULL, NULL},
/* [ 60] = 1420 */ {NULL, NULL},
/* [ 61] = 1421 */ {NULL, NULL},
/* [ 62] = 1422 */ {__glXDisp_IsRenderbufferEXT,
__glXDispSwap_IsRenderbufferEXT},
/* [ 63] = 1423 */ {__glXDisp_GenRenderbuffersEXT,
__glXDispSwap_GenRenderbuffersEXT},
/* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT,
__glXDispSwap_GetRenderbufferParameterivEXT},
/* [ 65] = 1425 */ {__glXDisp_IsFramebufferEXT,
__glXDispSwap_IsFramebufferEXT},
/* [ 66] = 1426 */ {__glXDisp_GenFramebuffersEXT,
__glXDispSwap_GenFramebuffersEXT},
/* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT,
__glXDispSwap_CheckFramebufferStatusEXT},
/* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT,
__glXDispSwap_GetFramebufferAttachmentParameterivEXT},
/* [ 62] = 1422 */ {__glXDisp_IsRenderbuffer,
__glXDispSwap_IsRenderbuffer},
/* [ 63] = 1423 */ {__glXDisp_GenRenderbuffers,
__glXDispSwap_GenRenderbuffers},
/* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameteriv,
__glXDispSwap_GetRenderbufferParameteriv},
/* [ 65] = 1425 */ {__glXDisp_IsFramebuffer, __glXDispSwap_IsFramebuffer},
/* [ 66] = 1426 */ {__glXDisp_GenFramebuffers,
__glXDispSwap_GenFramebuffers},
/* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatus,
__glXDispSwap_CheckFramebufferStatus},
/* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameteriv,
__glXDispSwap_GetFramebufferAttachmentParameteriv},
/* [ 69] = 1429 */ {NULL, NULL},
/* [ 70] = 1430 */ {NULL, NULL},
/* [ 71] = 1431 */ {NULL, NULL},

View File

@ -34,13 +34,9 @@
#include "unpack.h"
#include "indirect_size_get.h"
#include "indirect_dispatch.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
int
__glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte * pc)
__glXDisp_GetCompressedTexImage(struct __GLXclientStateRec *cl, GLbyte * pc)
{
xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
@ -54,16 +50,13 @@ __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte * pc)
GLint compsize = 0;
char *answer = NULL, answerBuffer[200];
CALL_GetTexLevelParameteriv(GET_DISPATCH(),
(target, level,
GL_TEXTURE_COMPRESSED_IMAGE_SIZE,
&compsize));
glGetTexLevelParameteriv(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE,
&compsize);
if (compsize != 0) {
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetCompressedTexImageARB(GET_DISPATCH(),
(target, level, answer));
glGetCompressedTexImageARB(target, level, answer);
}
if (__glXErrorOccured()) {
@ -84,8 +77,7 @@ __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte * pc)
}
int
__glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *cl,
GLbyte * pc)
__glXDispSwap_GetCompressedTexImage(struct __GLXclientStateRec *cl, GLbyte * pc)
{
xGLXSingleReq *const req = (xGLXSingleReq *) pc;
int error;
@ -100,16 +92,13 @@ __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *cl,
GLint compsize = 0;
char *answer = NULL, answerBuffer[200];
CALL_GetTexLevelParameteriv(GET_DISPATCH(),
(target, level,
GL_TEXTURE_COMPRESSED_IMAGE_SIZE,
&compsize));
glGetTexLevelParameteriv(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE,
&compsize);
if (compsize != 0) {
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetCompressedTexImageARB(GET_DISPATCH(),
(target, level, answer));
glGetCompressedTexImageARB(target, level, answer);
}
if (__glXErrorOccured()) {

View File

@ -39,10 +39,6 @@
#include "glxserver.h"
#include "glxbyteorder.h"
#include "singlesize.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "glxext.h"
#include "indirect_table.h"
#include "indirect_util.h"
@ -57,8 +53,7 @@ __glGetBooleanv_variable_size(GLenum e)
if (e == GL_COMPRESSED_TEXTURE_FORMATS) {
GLint temp;
CALL_GetIntegerv(GET_DISPATCH(),
(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &temp));
glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &temp);
return temp;
}
else {

View File

@ -36,10 +36,6 @@
#include "unpack.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)
@ -55,7 +51,7 @@ __glXDisp_Map1f(GLbyte * pc)
points = (GLfloat *) (pc + 16);
k = __glMap1f_size(target);
CALL_Map1f(GET_DISPATCH(), (target, u1, u2, k, order, points));
glMap1f(target, u1, u2, k, order, points);
}
void
@ -78,9 +74,7 @@ __glXDisp_Map2f(GLbyte * pc)
ustride = vorder * k;
vstride = k;
CALL_Map2f(GET_DISPATCH(),
(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder,
points));
glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
}
void
@ -126,7 +120,7 @@ __glXDisp_Map1d(GLbyte * pc)
#else
points = (GLdouble *) pc;
#endif
CALL_Map1d(GET_DISPATCH(), (target, u1, u2, k, order, points));
glMap1d(target, u1, u2, k, order, points);
}
void
@ -178,9 +172,7 @@ __glXDisp_Map2d(GLbyte * pc)
#else
points = (GLdouble *) pc;
#endif
CALL_Map2d(GET_DISPATCH(),
(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder,
points));
glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
}
void
@ -215,39 +207,36 @@ __glXDisp_DrawArrays(GLbyte * pc)
switch (component) {
case GL_VERTEX_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_VERTEX_ARRAY));
CALL_VertexPointer(GET_DISPATCH(), (numVals, datatype, stride, pc));
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(numVals, datatype, stride, pc);
break;
case GL_NORMAL_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_NORMAL_ARRAY));
CALL_NormalPointer(GET_DISPATCH(), (datatype, stride, pc));
glEnableClientState(GL_NORMAL_ARRAY);
glNormalPointer(datatype, stride, pc);
break;
case GL_COLOR_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_COLOR_ARRAY));
CALL_ColorPointer(GET_DISPATCH(), (numVals, datatype, stride, pc));
glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(numVals, datatype, stride, pc);
break;
case GL_INDEX_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_INDEX_ARRAY));
CALL_IndexPointer(GET_DISPATCH(), (datatype, stride, pc));
glEnableClientState(GL_INDEX_ARRAY);
glIndexPointer(datatype, stride, pc);
break;
case GL_TEXTURE_COORD_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY));
CALL_TexCoordPointer(GET_DISPATCH(),
(numVals, datatype, stride, pc));
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(numVals, datatype, stride, pc);
break;
case GL_EDGE_FLAG_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY));
CALL_EdgeFlagPointer(GET_DISPATCH(),
(stride, (const GLboolean *) pc));
glEnableClientState(GL_EDGE_FLAG_ARRAY);
glEdgeFlagPointer(stride, (const GLboolean *) pc);
break;
case GL_SECONDARY_COLOR_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY));
CALL_SecondaryColorPointerEXT(GET_DISPATCH(),
(numVals, datatype, stride, pc));
glEnableClientState(GL_SECONDARY_COLOR_ARRAY);
glSecondaryColorPointerEXT(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));
glEnableClientState(GL_FOG_COORD_ARRAY);
glFogCoordPointerEXT(datatype, stride, pc);
break;
default:
break;
@ -256,15 +245,15 @@ __glXDisp_DrawArrays(GLbyte * pc)
pc += __GLX_PAD(numVals * __glXTypeSize(datatype));
}
CALL_DrawArrays(GET_DISPATCH(), (primType, 0, numVertexes));
glDrawArrays(primType, 0, numVertexes);
/* turn off anything we might have turned on */
CALL_DisableClientState(GET_DISPATCH(), (GL_VERTEX_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_NORMAL_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_COLOR_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_INDEX_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_FOG_COORD_ARRAY));
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_INDEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_EDGE_FLAG_ARRAY);
glDisableClientState(GL_SECONDARY_COLOR_ARRAY);
glDisableClientState(GL_FOG_COORD_ARRAY);
}

View File

@ -36,10 +36,6 @@
#include "unpack.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)
@ -73,7 +69,7 @@ __glXDispSwap_Map1f(GLbyte * pc)
}
__GLX_SWAP_FLOAT_ARRAY(points, compsize);
CALL_Map1f(GET_DISPATCH(), (target, u1, u2, k, order, points));
glMap1f(target, u1, u2, k, order, points);
}
void
@ -117,9 +113,7 @@ __glXDispSwap_Map2f(GLbyte * pc)
}
__GLX_SWAP_FLOAT_ARRAY(points, compsize);
CALL_Map2f(GET_DISPATCH(),
(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder,
points));
glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
}
void
@ -167,7 +161,7 @@ __glXDispSwap_Map1d(GLbyte * pc)
#else
points = (GLdouble *) pc;
#endif
CALL_Map1d(GET_DISPATCH(), (target, u1, u2, k, order, points));
glMap1d(target, u1, u2, k, order, points);
}
void
@ -223,9 +217,7 @@ __glXDispSwap_Map2d(GLbyte * pc)
#else
points = (GLdouble *) pc;
#endif
CALL_Map2d(GET_DISPATCH(),
(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder,
points));
glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
}
static void
@ -337,39 +329,36 @@ __glXDispSwap_DrawArrays(GLbyte * pc)
switch (component) {
case GL_VERTEX_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_VERTEX_ARRAY));
CALL_VertexPointer(GET_DISPATCH(), (numVals, datatype, stride, pc));
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(numVals, datatype, stride, pc);
break;
case GL_NORMAL_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_NORMAL_ARRAY));
CALL_NormalPointer(GET_DISPATCH(), (datatype, stride, pc));
glEnableClientState(GL_NORMAL_ARRAY);
glNormalPointer(datatype, stride, pc);
break;
case GL_COLOR_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_COLOR_ARRAY));
CALL_ColorPointer(GET_DISPATCH(), (numVals, datatype, stride, pc));
glEnableClientState(GL_COLOR_ARRAY);
glColorPointer(numVals, datatype, stride, pc);
break;
case GL_INDEX_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_INDEX_ARRAY));
CALL_IndexPointer(GET_DISPATCH(), (datatype, stride, pc));
glEnableClientState(GL_INDEX_ARRAY);
glIndexPointer(datatype, stride, pc);
break;
case GL_TEXTURE_COORD_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY));
CALL_TexCoordPointer(GET_DISPATCH(),
(numVals, datatype, stride, pc));
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(numVals, datatype, stride, pc);
break;
case GL_EDGE_FLAG_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY));
CALL_EdgeFlagPointer(GET_DISPATCH(),
(stride, (const GLboolean *) pc));
glEnableClientState(GL_EDGE_FLAG_ARRAY);
glEdgeFlagPointer(stride, (const GLboolean *) pc);
break;
case GL_SECONDARY_COLOR_ARRAY:
CALL_EnableClientState(GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY));
CALL_SecondaryColorPointerEXT(GET_DISPATCH(),
(numVals, datatype, stride, pc));
glEnableClientState(GL_SECONDARY_COLOR_ARRAY);
glSecondaryColorPointerEXT(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));
glEnableClientState(GL_FOG_COORD_ARRAY);
glFogCoordPointerEXT(datatype, stride, pc);
break;
default:
break;
@ -378,15 +367,15 @@ __glXDispSwap_DrawArrays(GLbyte * pc)
pc += __GLX_PAD(numVals * __glXTypeSize(datatype));
}
CALL_DrawArrays(GET_DISPATCH(), (primType, 0, numVertexes));
glDrawArrays(primType, 0, numVertexes);
/* turn off anything we might have turned on */
CALL_DisableClientState(GET_DISPATCH(), (GL_VERTEX_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_NORMAL_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_COLOR_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_INDEX_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_TEXTURE_COORD_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_EDGE_FLAG_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_SECONDARY_COLOR_ARRAY));
CALL_DisableClientState(GET_DISPATCH(), (GL_FOG_COORD_ARRAY));
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_INDEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_EDGE_FLAG_ARRAY);
glDisableClientState(GL_SECONDARY_COLOR_ARRAY);
glDisableClientState(GL_FOG_COORD_ARRAY);
}

View File

@ -35,10 +35,6 @@
#include "glxserver.h"
#include "unpack.h"
#include "indirect_dispatch.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
void
__glXDisp_SeparableFilter2D(GLbyte * pc)
@ -49,12 +45,12 @@ __glXDisp_SeparableFilter2D(GLbyte * pc)
hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE);
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));
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);
/* XXX check this usage - internal code called
** a version without the packing parameters
@ -64,10 +60,8 @@ __glXDisp_SeparableFilter2D(GLbyte * pc)
hdr->alignment);
image1len = __GLX_PAD(image1len);
CALL_SeparableFilter2D(GET_DISPATCH(), (hdr->target, hdr->internalformat,
hdr->width, hdr->height,
hdr->format, hdr->type,
((GLubyte *) hdr + hdrlen),
((GLubyte *) hdr + hdrlen +
image1len)));
glSeparableFilter2D(hdr->target, hdr->internalformat, hdr->width,
hdr->height, hdr->format, hdr->type,
((GLubyte *) hdr + hdrlen),
((GLubyte *) hdr + hdrlen + image1len));
}

View File

@ -35,10 +35,6 @@
#include "glxserver.h"
#include "unpack.h"
#include "indirect_dispatch.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
void
__glXDispSwap_SeparableFilter2D(GLbyte * pc)
@ -67,12 +63,12 @@ __glXDispSwap_SeparableFilter2D(GLbyte * pc)
** Just invert swapBytes flag; the GL will figure out if it needs to swap
** the pixel data.
*/
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));
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);
/* XXX check this usage - internal code called
** a version without the packing parameters
@ -82,10 +78,8 @@ __glXDispSwap_SeparableFilter2D(GLbyte * pc)
hdr->alignment);
image1len = __GLX_PAD(image1len);
CALL_SeparableFilter2D(GET_DISPATCH(), (hdr->target, hdr->internalformat,
hdr->width, hdr->height,
hdr->format, hdr->type,
((GLubyte *) hdr + hdrlen),
((GLubyte *) hdr + hdrlen +
image1len)));
glSeparableFilter2D(hdr->target, hdr->internalformat, hdr->width,
hdr->height, hdr->format, hdr->type,
((GLubyte *) hdr + hdrlen),
((GLubyte *) hdr + hdrlen + image1len));
}

View File

@ -41,10 +41,6 @@
#include "glxext.h"
#include "indirect_dispatch.h"
#include "unpack.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
int
__glXDisp_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
@ -72,7 +68,7 @@ __glXDisp_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
}
cx->feedbackBufSize = size;
}
CALL_FeedbackBuffer(GET_DISPATCH(), (size, type, cx->feedbackBuf));
glFeedbackBuffer(size, type, cx->feedbackBuf);
cx->hasUnflushedCommands = GL_TRUE;
return Success;
}
@ -100,7 +96,7 @@ __glXDisp_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
}
cx->selectBufSize = size;
}
CALL_SelectBuffer(GET_DISPATCH(), (size, cx->selectBuf));
glSelectBuffer(size, cx->selectBuf);
cx->hasUnflushedCommands = GL_TRUE;
return Success;
}
@ -123,10 +119,10 @@ __glXDisp_RenderMode(__GLXclientState * cl, GLbyte * pc)
pc += __GLX_SINGLE_HDR_SIZE;
newMode = *(GLenum *) pc;
retval = CALL_RenderMode(GET_DISPATCH(), (newMode));
retval = glRenderMode(newMode);
/* Check that render mode worked */
CALL_GetIntegerv(GET_DISPATCH(), (GL_RENDER_MODE, &newModeCheck));
glGetIntegerv(GL_RENDER_MODE, &newModeCheck);
if (newModeCheck != newMode) {
/* Render mode change failed. Bail */
newMode = newModeCheck;
@ -219,7 +215,7 @@ __glXDisp_Flush(__GLXclientState * cl, GLbyte * pc)
return error;
}
CALL_Flush(GET_DISPATCH(), ());
glFlush();
cx->hasUnflushedCommands = GL_FALSE;
return Success;
}
@ -237,7 +233,7 @@ __glXDisp_Finish(__GLXclientState * cl, GLbyte * pc)
}
/* Do a local glFinish */
CALL_Finish(GET_DISPATCH(), ());
glFinish();
cx->hasUnflushedCommands = GL_FALSE;
/* Send empty reply packet to indicate finish is finished */
@ -346,7 +342,7 @@ DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap)
pc += __GLX_SINGLE_HDR_SIZE;
name = *(GLenum *) (pc + 0);
string = (const char *) CALL_GetString(GET_DISPATCH(), (name));
string = (const char *) glGetString(name);
client = cl->client;
if (string == NULL)

View File

@ -37,10 +37,6 @@
#include "glxext.h"
#include "indirect_dispatch.h"
#include "unpack.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
int
__glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
@ -73,7 +69,7 @@ __glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
}
cx->feedbackBufSize = size;
}
CALL_FeedbackBuffer(GET_DISPATCH(), (size, type, cx->feedbackBuf));
glFeedbackBuffer(size, type, cx->feedbackBuf);
cx->hasUnflushedCommands = GL_TRUE;
return Success;
}
@ -105,7 +101,7 @@ __glXDispSwap_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
}
cx->selectBufSize = size;
}
CALL_SelectBuffer(GET_DISPATCH(), (size, cx->selectBuf));
glSelectBuffer(size, cx->selectBuf);
cx->hasUnflushedCommands = GL_TRUE;
return Success;
}
@ -133,10 +129,10 @@ __glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc)
pc += __GLX_SINGLE_HDR_SIZE;
__GLX_SWAP_INT(pc);
newMode = *(GLenum *) pc;
retval = CALL_RenderMode(GET_DISPATCH(), (newMode));
retval = glRenderMode(newMode);
/* Check that render mode worked */
CALL_GetIntegerv(GET_DISPATCH(), (GL_RENDER_MODE, &newModeCheck));
glGetIntegerv(GL_RENDER_MODE, &newModeCheck);
if (newModeCheck != newMode) {
/* Render mode change failed. Bail */
newMode = newModeCheck;
@ -239,7 +235,7 @@ __glXDispSwap_Flush(__GLXclientState * cl, GLbyte * pc)
return error;
}
CALL_Flush(GET_DISPATCH(), ());
glFlush();
cx->hasUnflushedCommands = GL_FALSE;
return Success;
}
@ -260,7 +256,7 @@ __glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc)
}
/* Do a local glFinish */
CALL_Finish(GET_DISPATCH(), ());
glFinish();
cx->hasUnflushedCommands = GL_FALSE;
/* Send empty reply packet to indicate finish is finished */

View File

@ -38,10 +38,6 @@
#include "unpack.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)
@ -71,16 +67,13 @@ __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst));
glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes);
glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_ReadPixels(GET_DISPATCH(), (*(GLint *) (pc + 0),
*(GLint *) (pc + 4),
*(GLsizei *) (pc + 8),
*(GLsizei *) (pc + 12),
*(GLenum *) (pc + 16),
*(GLenum *) (pc + 20), answer));
glReadPixels(*(GLint *) (pc + 0), *(GLint *) (pc + 4),
*(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12),
*(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -119,13 +112,10 @@ __glXDisp_GetTexImage(__GLXclientState * cl, GLbyte * pc)
target = *(GLenum *) (pc + 0);
swapBytes = *(GLboolean *) (pc + 16);
CALL_GetTexLevelParameteriv(GET_DISPATCH(),
(target, level, GL_TEXTURE_WIDTH, &width));
CALL_GetTexLevelParameteriv(GET_DISPATCH(),
(target, level, GL_TEXTURE_HEIGHT, &height));
glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width);
glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height);
if (target == GL_TEXTURE_3D) {
CALL_GetTexLevelParameteriv(GET_DISPATCH(),
(target, level, GL_TEXTURE_DEPTH, &depth));
glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth);
}
/*
* The three queries above might fail if we're in a state where queries
@ -136,13 +126,11 @@ __glXDisp_GetTexImage(__GLXclientState * cl, GLbyte * pc)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetTexImage(GET_DISPATCH(), (*(GLenum *) (pc + 0),
*(GLint *) (pc + 4),
*(GLenum *) (pc + 8),
*(GLenum *) (pc + 12), answer));
glGetTexImage(*(GLenum *) (pc + 0), *(GLint *) (pc + 4),
*(GLenum *) (pc + 8), *(GLenum *) (pc + 12), answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -177,11 +165,11 @@ __glXDisp_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc)
pc += __GLX_SINGLE_HDR_SIZE;
lsbFirst = *(GLboolean *) (pc + 0);
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst));
glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst);
__GLX_GET_ANSWER_BUFFER(answer, cl, 128, 1);
__glXClearErrorOccured();
CALL_GetPolygonStipple(GET_DISPATCH(), ((GLubyte *) answer));
glGetPolygonStipple((GLubyte *) answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -220,10 +208,8 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
/* target must be SEPARABLE_2D, however I guess we can let the GL
barf on this one.... */
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_WIDTH, &width));
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_HEIGHT, &height));
glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width);
glGetConvolutionParameteriv(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.
@ -238,13 +224,11 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
compsize = __GLX_PAD(compsize);
compsize2 = __GLX_PAD(compsize2);
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1);
__glXClearErrorOccured();
CALL_GetSeparableFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
*(GLenum *) (pc + 4),
*(GLenum *) (pc + 8),
answer, answer + compsize, NULL));
glGetSeparableFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer, answer + compsize, NULL);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -299,15 +283,12 @@ GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
target = *(GLenum *) (pc + 0);
swapBytes = *(GLboolean *) (pc + 12);
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_WIDTH, &width));
glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width);
if (target == GL_CONVOLUTION_1D) {
height = 1;
}
else {
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_HEIGHT,
&height));
glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height);
}
/*
* The two queries above might fail if we're in a state where queries
@ -317,12 +298,11 @@ GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetConvolutionFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
*(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer));
glGetConvolutionFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -378,8 +358,7 @@ GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
swapBytes = *(GLboolean *) (pc + 12);
reset = *(GLboolean *) (pc + 13);
CALL_GetHistogramParameteriv(GET_DISPATCH(),
(target, GL_HISTOGRAM_WIDTH, &width));
glGetHistogramParameteriv(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.
@ -388,10 +367,10 @@ GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetHistogram(GET_DISPATCH(), (target, reset, format, type, answer));
glGetHistogram(target, reset, format, type, answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -449,10 +428,10 @@ GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, answer));
glGetMinmax(target, reset, format, type, answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -505,8 +484,7 @@ GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
type = *(GLenum *) (pc + 8);
swapBytes = *(GLboolean *) (pc + 12);
CALL_GetColorTableParameteriv(GET_DISPATCH(),
(target, GL_COLOR_TABLE_WIDTH, &width));
glGetColorTableParameteriv(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.
@ -515,12 +493,11 @@ GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetColorTable(GET_DISPATCH(), (*(GLenum *) (pc + 0),
*(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer));
glGetColorTable(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);

View File

@ -38,10 +38,6 @@
#include "unpack.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,17 +77,13 @@ __glXDispSwap_ReadPixels(__GLXclientState * cl, GLbyte * pc)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst));
glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_ReadPixels(GET_DISPATCH(),
(*(GLint *) (pc + 0),
*(GLint *) (pc + 4),
*(GLsizei *) (pc + 8),
*(GLsizei *) (pc + 12),
*(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer)
);
glReadPixels(*(GLint *) (pc + 0), *(GLint *) (pc + 4),
*(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12),
*(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -140,13 +132,10 @@ __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc)
target = *(GLenum *) (pc + 0);
swapBytes = *(GLboolean *) (pc + 16);
CALL_GetTexLevelParameteriv(GET_DISPATCH(),
(target, level, GL_TEXTURE_WIDTH, &width));
CALL_GetTexLevelParameteriv(GET_DISPATCH(),
(target, level, GL_TEXTURE_HEIGHT, &height));
glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width);
glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height);
if (target == GL_TEXTURE_3D) {
CALL_GetTexLevelParameteriv(GET_DISPATCH(),
(target, level, GL_TEXTURE_DEPTH, &depth));
glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth);
}
/*
* The three queries above might fail if we're in a state where queries
@ -157,13 +146,11 @@ __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetTexImage(GET_DISPATCH(), (*(GLenum *) (pc + 0),
*(GLint *) (pc + 4),
*(GLenum *) (pc + 8),
*(GLenum *) (pc + 12), answer));
glGetTexImage(*(GLenum *) (pc + 0), *(GLint *) (pc + 4),
*(GLenum *) (pc + 8), *(GLenum *) (pc + 12), answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -205,11 +192,11 @@ __glXDispSwap_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc)
pc += __GLX_SINGLE_HDR_SIZE;
lsbFirst = *(GLboolean *) (pc + 0);
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_LSB_FIRST, lsbFirst));
glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst);
__GLX_GET_ANSWER_BUFFER(answer, cl, 128, 1);
__glXClearErrorOccured();
CALL_GetPolygonStipple(GET_DISPATCH(), ((GLubyte *) answer));
glGetPolygonStipple((GLubyte *) answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
__GLX_SWAP_REPLY_HEADER();
@ -255,10 +242,8 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
/* target must be SEPARABLE_2D, however I guess we can let the GL
barf on this one.... */
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_WIDTH, &width));
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_HEIGHT, &height));
glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width);
glGetConvolutionParameteriv(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.
@ -273,13 +258,11 @@ GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
compsize = __GLX_PAD(compsize);
compsize2 = __GLX_PAD(compsize2);
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1);
__glXClearErrorOccured();
CALL_GetSeparableFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
*(GLenum *) (pc + 4),
*(GLenum *) (pc + 8),
answer, answer + compsize, NULL));
glGetSeparableFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer, answer + compsize, NULL);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -342,15 +325,12 @@ GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
target = *(GLenum *) (pc + 0);
swapBytes = *(GLboolean *) (pc + 12);
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_WIDTH, &width));
glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width);
if (target == GL_CONVOLUTION_2D) {
height = 1;
}
else {
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_HEIGHT,
&height));
glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height);
}
/*
* The two queries above might fail if we're in a state where queries
@ -360,12 +340,11 @@ GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetConvolutionFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
*(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer));
glGetConvolutionFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -429,8 +408,7 @@ GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
swapBytes = *(GLboolean *) (pc + 12);
reset = *(GLboolean *) (pc + 13);
CALL_GetHistogramParameteriv(GET_DISPATCH(),
(target, GL_HISTOGRAM_WIDTH, &width));
glGetHistogramParameteriv(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.
@ -439,10 +417,10 @@ GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetHistogram(GET_DISPATCH(), (target, reset, format, type, answer));
glGetHistogram(target, reset, format, type, answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -507,10 +485,10 @@ GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, answer));
glGetMinmax(target, reset, format, type, answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -569,8 +547,7 @@ GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
target = *(GLenum *) (pc + 0);
swapBytes = *(GLboolean *) (pc + 12);
CALL_GetColorTableParameteriv(GET_DISPATCH(),
(target, GL_COLOR_TABLE_WIDTH, &width));
glGetColorTableParameteriv(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.
@ -579,12 +556,11 @@ GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag)
if (compsize < 0)
compsize = 0;
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes);
__GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1);
__glXClearErrorOccured();
CALL_GetColorTable(GET_DISPATCH(), (*(GLenum *) (pc + 0),
*(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer));
glGetColorTable(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4),
*(GLenum *) (pc + 8), answer);
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);

View File

@ -36,10 +36,6 @@
#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.
@ -75,7 +71,7 @@ __glGetMap_size(GLenum target, GLenum query)
switch (query) {
case GL_COEFF:
k = __glMap1d_size(target);
CALL_GetMapiv(GET_DISPATCH(), (target, GL_ORDER, &order));
glGetMapiv(target, GL_ORDER, &order);
/*
** The query above might fail, but then order will be zero anyway.
*/
@ -99,7 +95,7 @@ __glGetMap_size(GLenum target, GLenum query)
case GL_COEFF:
k = __glMap2d_size(target);
majorMinor[0] = majorMinor[1] = 0;
CALL_GetMapiv(GET_DISPATCH(), (target, GL_ORDER, majorMinor));
glGetMapiv(target, GL_ORDER, majorMinor);
/*
** The query above might fail, but then majorMinor will be zeroes
*/
@ -172,7 +168,7 @@ __glGetPixelMap_size(GLenum map)
default:
return -1;
}
CALL_GetIntegerv(GET_DISPATCH(), (query, &size));
glGetIntegerv(query, &size);
return size;
}

View File

@ -33,10 +33,6 @@
#include "unpack.h"
#include "indirect_size_get.h"
#include "indirect_dispatch.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "glxbyteorder.h"
static int DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap);

View File

@ -35,10 +35,6 @@
#include "glxserver.h"
#include "glxutil.h"
#include "unpack.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "indirect_dispatch.h"
#include <GL/gl.h>
#include <pixmapstr.h>
@ -94,10 +90,8 @@ __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci)
pglyph -= widthPadded;
p += widthPadded;
}
CALL_Bitmap(GET_DISPATCH(), (w, h, -pci->metrics.leftSideBearing,
pci->metrics.descent,
pci->metrics.characterWidth, 0,
allocbuf ? allocbuf : buf));
glBitmap(w, h, -pci->metrics.leftSideBearing, pci->metrics.descent,
pci->metrics.characterWidth, 0, allocbuf ? allocbuf : buf);
free(allocbuf);
return Success;
@ -118,13 +112,12 @@ MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base)
int rv; /* return value */
int encoding = (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit;
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));
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);
for (i = 0; i < count; i++) {
chs[0] = (first + i) >> 8; /* high byte is first byte */
chs[1] = first + i;
@ -135,14 +128,14 @@ MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base)
/*
** Define a display list containing just a glBitmap() call.
*/
CALL_NewList(GET_DISPATCH(), (list_base + i, GL_COMPILE));
glNewList(list_base + i, GL_COMPILE);
if (nglyphs) {
rv = __glXMakeBitmapFromGlyph(pFont, pci);
if (rv) {
return rv;
}
}
CALL_EndList(GET_DISPATCH(), ());
glEndList();
}
return Success;
}
@ -167,8 +160,7 @@ __glXDisp_UseXFont(__GLXclientState * cl, GLbyte * pc)
return error;
}
CALL_GetIntegerv(GET_DISPATCH(),
(GL_LIST_INDEX, (GLint *) &currentListIndex));
glGetIntegerv(GL_LIST_INDEX, (GLint *) &currentListIndex);
if (currentListIndex != 0) {
/*
** A display list is currently being made. It is an error